代码拉取完成,页面将自动刷新
This file summarizes 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.
Not exported functions that are of general interest for the Jim
core, like JimFreeInterp() are capitalized the same way, but the
prefix used for this functions is "Jim" instead of "Jim_".
Another example is:
JimNotExportedFunction()
Not exported functions that are not general, like functions
implementing hashtables or Jim objects methods can be named
in any prefix as long as capitalization rules are followed,
like in:
ListSetIndex()
---------------
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
----
GOTO
----
Goto is allowed every time it makes the code cleaner, like in complex
functions that need to handle exceptions, there is often an "err" label
at the end of the function where allocated resources are freed before to exit
with an error. Goto is also used in order to escape multiple nested loops.
----------
C FEATURES
----------
Only C89 ANSI C is allowed. C99 features can't be used currently.
GCC extensions are not allowed.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。