diff options
author | antirez <antirez> | 2005-03-01 23:04:12 +0000 |
---|---|---|
committer | antirez <antirez> | 2005-03-01 23:04:12 +0000 |
commit | 74088508a2e812131de328cc662eab0ae8cd605c (patch) | |
tree | 2dd00464b282c435444e77378cdf7041458f6e42 /STYLE | |
parent | 9f759113d985cc935b90f0c11ff0fdf9a9b46772 (diff) | |
download | jimtcl-74088508a2e812131de328cc662eab0ae8cd605c.zip jimtcl-74088508a2e812131de328cc662eab0ae8cd605c.tar.gz jimtcl-74088508a2e812131de328cc662eab0ae8cd605c.tar.bz2 |
Style guidelines
Diffstat (limited to 'STYLE')
-rw-r--r-- | STYLE | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -0,0 +1,45 @@ +This file summarize the C style used for Jim. +Copyright (C) 2005 Salvatore Sanfilippo. + +----------- +INDENTATION +----------- + +indentation is 4 spaces, no smart-tabs are used (i.e. +two indentation steps of 4 spaces will not be converted +into a real tab, but 8 spaces). + +--------------- +FUNCTIONS NAMES +--------------- + +Functions names of exported functions are in the form: + +Jim_ExportedFunctionName() + +The prefix is "Jim_", every word composing the function name +is capitalized. + +Non exported functions are also capitalized, but in such +a case the prefix is just "Jim", like in + +JimNotExportedFunction() + +--------------- +VARIABLES NAMES +--------------- + +Global variables follow the same names convention of functions. + +Local variables have usually short names. A counter is just 'i', or 'j', +or something like this. When a longer name is required, composed of +more words, capitalization is used, but the first word starts in +lowcase: + +thisIsALogVarName + +---------- +C FEATURES +---------- + +Only C89 ANSI C is allowed. C99 features can't be used currently. |