Changeset 459


Ignore:
Timestamp:
Aug 24, 2006, 7:10:24 AM (19 years ago)
Author:
root
Message:

Add more

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CodingStyle.txt

    r392 r459  
    11
    22Coding Style Guide
     3==================
     4
     5Line lengths
     6
     7  Try to keep lines less than 80 characters.
     8
     9  Break lines after logical separators
     10
     11  Vertically align like constructs
    312
    413Indents
    514
    6   Start function with { in column 1
     15  Place function definition { in column 1
    716
    8   Intent by 2 characters
     17  Place function definition } in column 1
    918
    10   Layouts
     19  Intent nested constructs by 2 characters
    1120
    12     if (expr) {
    13     }
    14     else {
    15     }
     21  void func()
     22  {
     23    stmt
     24    if (expr)
     25      stmt2
     26  }
    1627
    17     while (expr) {
    18     }
     28Tabs
    1929
    20     for (expr) {
    21     }
     30  Use only 8 column tabs
     31
     32Layouts
     33
     34  if (expr)
     35    statement
     36
     37  // If expr and statement are brief
     38  if (expr) statement
     39
     40  if (expr1) {
     41  }
     42  else {
     43  }
     44
     45  // If expression must be wrapped
     46  // align like constructs vertically
     47  if (expr1 &&
     48      expr2))
     49  {
     50  }
     51
     52  while (expr) {
     53  }
     54
     55  for (expr; expr; expr) {
     56  }
     57
     58  typedef struct {
     59
     60  } TYPENAME;
     61
     62Variable definitions
     63
     64  Define one per line
     65
     66    INT a;
     67    INT b;
     68
     69  not
     70
     71    INT a,b;
     72
     73Spaces
     74
     75  Separate keywords from leading paren with 1 space
     76
     77    if (expr) dothis
     78
     79  No space between function name and leading paren
     80  No space between last arg and trailing paren
     81
     82    func()
     83
     84  Follow separating commas and semicolons with a space
     85
     86    x = func(a, c)
     87
     88  Surround binary operators with a leading and trailing spaces
     89
     90    x = a + b
     91
     92  Try to avoid spurious internal and trailing whitespace
    2293
    2394Memory
     
    32103Windows
    33104
    34  - Check all WinCreateWindow call
     105 - Check all WinCreateWindow calls
    35106 - Check QWL_USER pointer data
    36107
    37 Beeps
     108Error notifications
    38109
    39   DosBeep(50,100)               Alert user to failure - must include visual action
     110  DosBeep(50,100)       Alert user to operator error
     111                        Use only when failure reason is obvious
    40112
     113  saymsg                Alert user to operator error with popup
     114
     115  Runtime_Error         Report "should not occur" errors
     116  Dos_Error
     117  Win_Error
    41118
    42119$Id$
  • trunk/select.tmp

    r2 r459  
    131310008
    1414;
     15Select Dirs
     16+Dirs
     170
     1810010
     19;
     20Select List
     21+List
     220
     2310033
     24;
    1525Select Mask
    1626+Mask
     
    22320
    233310007
     34;
    2435Deselect Dirs
    2536-Dirs
    26370
    273810011
     39;
     40Deselect Files
     41-Files
     420
     4310009
    2844;
    2945Deselect Mask
     
    56720
    57734900
     74;
     75; $Id$
Note: See TracChangeset for help on using the changeset viewer.