Changes between Version 7 and Version 8 of Hacking


Ignore:
Timestamp:
02/15/11 20:30:43 (13 years ago)
Author:
angel_il
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Hacking

    v7 v8  
    3131The lines before a comment should be empty. If the comment directly belongs to the following code, there should be no empty line after the comment, except if the comment contains a summary of multiple following code blocks. 
    3232 
     33'''This is right:''' 
     34{{{ 
     35    int i; 
     36 
     37    /* 
     38     * This is a multi line comment, 
     39     * Delete '\n' char. 
     40     * Note that edit_delete() will not corrupt anything if called while 
     41     *   cursor position is EOF. 
     42     */ 
     43    (void) edit_delete (edit); 
     44 
     45     /*  This is a one line comment. Allocate additional memory.  */ 
     46     mem = (char *) malloc (memneed); 
     47 
     48    /** 
     49     * @brief This is a doxygen comment. 
     50     * 
     51     * This is a more detailed explanation of 
     52     * this simple function. 
     53     * 
     54     * @param[in]   param1     The parameter value of the function. 
     55     * 
     56     * @param[out]  result1    The result value of the function. 
     57     * 
     58     * @return              0 on success and -1 on error. 
     59     */ 
     60    int example(int param1, int *result1); 
     61}}} 
     62 
     63'''This is wrong:''' 
     64{{{ 
     65    //This is a one line comment. 
     66 
     67    /*This is a one line comment.*/ 
     68 
     69    /* This is a multi line comment, 
     70       with some more words...*/ 
     71}}} 
    3372 
    3473typical structure of *.c file