|
Last change
on this file since 452 was 392, checked in by root, 19 years ago |
|
Added
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
|
File size:
583 bytes
|
| Line | |
|---|
| 1 |
|
|---|
| 2 | Coding Style Guide
|
|---|
| 3 |
|
|---|
| 4 | Indents
|
|---|
| 5 |
|
|---|
| 6 | Start function with { in column 1
|
|---|
| 7 |
|
|---|
| 8 | Intent by 2 characters
|
|---|
| 9 |
|
|---|
| 10 | Layouts
|
|---|
| 11 |
|
|---|
| 12 | if (expr) {
|
|---|
| 13 | }
|
|---|
| 14 | else {
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | while (expr) {
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | for (expr) {
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | Memory
|
|---|
| 24 |
|
|---|
| 25 | - Check all malloc/realloc/strdup/DosAllocMem calls
|
|---|
| 26 | Use xmalloc in non-time critical code
|
|---|
| 27 | Use xrealloc in non-time critical code
|
|---|
| 28 | Use xstrdup in non-time critical code
|
|---|
| 29 |
|
|---|
| 30 | - Use xfree rather than free
|
|---|
| 31 |
|
|---|
| 32 | Windows
|
|---|
| 33 |
|
|---|
| 34 | - Check all WinCreateWindow call
|
|---|
| 35 | - Check QWL_USER pointer data
|
|---|
| 36 |
|
|---|
| 37 | Beeps
|
|---|
| 38 |
|
|---|
| 39 | DosBeep(50,100) Alert user to failure - must include visual action
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 | $Id: CodingStyle.txt 392 2006-07-27 18:16:09Z root $
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.