35 | | /* |
36 | | * This is a multi line comment, |
37 | | * Delete '\n' char. |
38 | | * Note that edit_delete() will not corrupt anything if called while |
39 | | * cursor position is EOF. |
40 | | */ |
41 | | (void) edit_delete (edit); |
42 | | |
43 | | /* This is a one line comment. Allocate additional memory. */ |
44 | | mem = (char *) malloc (memneed); |
45 | | |
46 | | /** |
47 | | * @brief This is a doxygen comment. |
48 | | * |
49 | | * This is a more detailed explanation of |
50 | | * this simple function. |
51 | | * |
52 | | * @param[in] param1 The parameter value of the function. |
53 | | * |
54 | | * @param[out] result1 The result value of the function. |
55 | | * |
56 | | * @return 0 on success and -1 on error. |
57 | | */ |
58 | | int example (int param1, int *result1); |
59 | | |
60 | | }}} |
61 | | |
62 | | '''This is wrong:''' |
63 | | {{{ |
64 | | //This is a one line comment. |
65 | | |
66 | | /*This is a one line comment.*/ |
67 | | |
68 | | /* This is a multi line comment, |
69 | | with some more words...*/ |
| 35 | /* |
| 36 | * This is a multi line comment, |
| 37 | * Delete '\n' char. |
| 38 | * Note that edit_delete() will not corrupt anything if called while |
| 39 | * cursor position is EOF. |
| 40 | */ |
| 41 | (void) edit_delete (edit); |
| 42 | |
| 43 | /* This is a one line comment. Allocate additional memory. */ |
| 44 | mem = (char *) malloc (memneed); |
| 45 | |
| 46 | /** |
| 47 | * @brief This is a doxygen comment. |
| 48 | * |
| 49 | * This is a more detailed explanation of |
| 50 | * this simple function. |
| 51 | * |
| 52 | * @param[in] param1 The parameter value of the function. |
| 53 | * |
| 54 | * @param[out] result1 The result value of the function. |
| 55 | * |
| 56 | * @return 0 on success and -1 on error. |
| 57 | */ |
| 58 | int example (int param1, int *result1); |
| 59 | |
| 60 | }}} |
| 61 | |
| 62 | '''This is wrong:''' |
| 63 | {{{ |
| 64 | //This is a one line comment. |
| 65 | |
| 66 | /*This is a one line comment.*/ |
| 67 | |
| 68 | /* This is a multi line comment, |
| 69 | with some more words...*/ |
180 | | bytes = read (fd, &routine.pointer, sizeof (routine)); |
181 | | if (bytes == -1 || (size_t) bytes < (sizeof (routine))) |
182 | | |
183 | | }}} |
184 | | |
185 | | '''This is wrong:''' |
186 | | {{{ |
187 | | if (bytes = read (fd, &routine.pointer, sizeof (routine)) == -1 || (size_t) bytes < (sizeof (routine))) |
188 | | |
189 | | if (read (from_parent_fd, &i, sizeof (int)) != sizeof (int)) |
190 | | return NULL; |
| 181 | bytes = read (fd, &routine.pointer, sizeof (routine)); |
| 182 | if (bytes == -1 || (size_t) bytes < (sizeof (routine))) |
| 183 | |
| 184 | }}} |
| 185 | |
| 186 | '''This is wrong:''' |
| 187 | {{{ |
| 188 | if (bytes = read (fd, &routine.pointer, sizeof (routine)) == -1 || (size_t) bytes < (sizeof (routine))) |
| 189 | |
| 190 | if (read (from_parent_fd, &i, sizeof (int)) != sizeof (int)) |
| 191 | return NULL; |