Update 'Coding Style'
parent
674e131ea2
commit
2aa9f8cd1d
1 changed files with 13 additions and 0 deletions
|
@ -36,7 +36,20 @@ Above all, the following rule from the GNOME developer documentation should alwa
|
|||
>Most importantly, do not make your first contribution to a project a change in the coding style to suit your taste. That is incredibly disrespectful.
|
||||
|
||||
## Formatting
|
||||
Keep the length of source code lines to 100 characters or less to ensure maximum readability on most modern monitors with a reasonable font size. Longer lines of code are more difficult to read and understand. Too many indentations should be interpreted as an indication that code restructuring is required.
|
||||
### Indentation
|
||||
|
||||
|
||||
```c
|
||||
while ((c = *str++))
|
||||
{
|
||||
if ((c >= 97) && (c <= 122))
|
||||
{
|
||||
c = c - 32;
|
||||
}
|
||||
hash = (hash * 33) ^ c;
|
||||
}
|
||||
```
|
||||
### Braces
|
||||
### Functions
|
||||
### Derived Types
|
||||
|
|
Loading…
Reference in a new issue