ChangeSet ID: 26107 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2006/06/28 12:21:58
Modified files: . : CODING_STANDARD
Log message: Jonathan Ernst jonathan@ernstfamily.ch Update coding standards to specify function prefix that should match the module name and 'sh' a new variable prefix that means 'string html'
Patch: http://cvs.winehq.org/patch.py?id=26107
Old revision New revision Changes Path 1.7 1.8 +2 -1 appdb/CODING_STANDARD
Index: appdb/CODING_STANDARD diff -u -p appdb/CODING_STANDARD:1.7 appdb/CODING_STANDARD:1.8 --- appdb/CODING_STANDARD:1.7 28 Jun 2006 17:21:58 -0000 +++ appdb/CODING_STANDARD 28 Jun 2006 17:21:58 -0000 @@ -22,6 +22,7 @@ Scalar types: i for integers f for floats s for strings +sh for html strings b for booleans Compound types: a for arrays @@ -41,7 +42,7 @@ $hResult /** * Functions naming */ -1)functions name should be declarative (i.e. put a declarative verb as the first word like in do_someting()) +1)functions name should be declarative and be prefixed with the name of the module (=file) where it is stored (for example image_show_thumbnail()) 2)methods (functions inside a class) are named like this: setMyName() (i.e. words separated with an upper case character) 3)normal functions (outside a class) are named like this: query_appdb() (i.e. words separated with an underscore)