Changes between Version 19 and Version 20 of Hacking


Ignore:
Timestamp:
12/29/11 09:06:00 (12 years ago)
Author:
andrew_b
Comment:

Formatting.

Legend:

Unmodified
Added
Removed
Modified
  • Hacking

    v19 v20  
    5858 */ 
    5959int example (int param1, int *result1); 
    60  
    6160}}} 
    6261 
     
    6968/* This is a multi line comment, 
    7069   with some more words...*/ 
    71  
    7270}}} 
    7371 
     
    8078{{{ 
    8179if (i == 0) 
    82  
    83 }}} 
     80}}} 
     81 
    8482'''This is wrong:''' 
    8583{{{ 
     
    8785 
    8886if (0 == i) 
    89  
    9087}}} 
    9188 
     
    9794{{{ 
    9895do_example (int param1, int *result1); 
    99  
    100 }}} 
     96}}} 
     97 
    10198'''This is wrong:''' 
    10299{{{ 
    103100do_example(int param1, int *result1); 
    104  
    105101}}} 
    106102 
     
    126122        g_free (*str_options[i].opt_addr); 
    127123} 
    128  
    129 }}} 
     124}}} 
     125 
    130126'''This is wrong:''' 
    131127{{{ 
     
    139135    path = strip_home_and_password (current_panel->cwd); } 
    140136 
    141 for (k = 0; k < 10; k++) 
    142     for (j = 0; j < 10; j++) 
    143         for (i = 0; str_options[i].opt_name != NULL; i++) 
    144             g_free (*str_options[i].opt_addr); 
    145  
     137    for (k = 0; k < 10; k++) 
     138        for (j = 0; j < 10; j++) 
     139            for (i = 0; str_options[i].opt_name != NULL; i++) 
     140                g_free (*str_options[i].opt_addr); 
    146141}}} 
    147142 
     
    170165    g_free (dest); 
    171166} 
    172  
    173167}}} 
    174168 
     
    182176bytes = read (fd, &routine.pointer, sizeof (routine)); 
    183177if (bytes == -1 || (size_t) bytes < (sizeof (routine))) 
    184  
    185178}}} 
    186179 
     
    191184if (read (from_parent_fd, &i, sizeof (int)) != sizeof (int)) 
    192185    return NULL; 
    193  
    194186}}} 
    195187 
     
    200192'''This is right:''' 
    201193{{{ 
    202         vfs_path_t *vpath; 
    203  
    204         vpath = vfs_path_from_str (filename); 
    205 }}} 
    206  
    207 '''This is wrong:''' 
    208 {{{ 
    209         vfs_path_t *vpath = vfs_path_from_str (filename); 
     194vfs_path_t *vpath; 
     195 
     196vpath = vfs_path_from_str (filename); 
     197}}} 
     198 
     199'''This is wrong:''' 
     200 
     201{{{ 
     202vfs_path_t *vpath = vfs_path_from_str (filename); 
    210203}}} 
    211204 
     
    229222    recalculate_panel_summary (panel); 
    230223} 
    231  
    232224}}} 
    233225 
     
    239231    compute_dir_size_destroy_ui (compute_dir_size_create_ui ()); 
    240232} 
    241  
    242233}}} 
    243234 
     
    248239'''This is right:''' 
    249240{{{ 
    250  
    251241#include <errno.h> 
    252242#include <stdio.h> 
     
    263253#include "src/help.h"           /* interactive_display() */ 
    264254#include "src/setup.h" 
    265  
    266255}}} 
    267256 
     
    283272#include "src/setup.h" 
    284273#include "lib/global.h" 
    285  
    286274}}} 
    287275 
     
    294282#include "src/subshell.h"       /* use_subshell */ 
    295283#include "src/help.h"           /* interactive_display() */ 
    296  
    297284}}} 
    298285 
     
    323310/* --------------------------------------------------------------------------------------------- */ 
    324311}}} 
    325