From a4e44197ae0f6e237f118e5b30c01eb12c460ec4 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 1 Dec 1999 18:35:59 +0000 Subject: zsh-workers/8843 --- Etc/zsh-development-guide | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'Etc') diff --git a/Etc/zsh-development-guide b/Etc/zsh-development-guide index fa0ad8e76..ec8620973 100644 --- a/Etc/zsh-development-guide +++ b/Etc/zsh-development-guide @@ -99,15 +99,25 @@ C coding style type of the function, and finally the name of the function with typed arguments. These lines must not be indented. The script generating function prototypes and the ansi2knr program depend on this format. - If the function is not used outside the file it is defined in, it - should be declared "static"; this keyword goes on the type line, - before the return type. -* Global variable declarations must similarly be preceded by a +* Variable declarations must similarly be preceded by a line containing only "/**/", for the prototype generation script. The declaration itself should be all on one line (except for multi-line initialisers). +* Preprocessor directives thst affect the function/variable declarations must + also be preceded by a "/**/" line, so that they get copied into the + prototype lists. + +* There are three levels of visibility for a function or variable. It can + be file-local, for which it must be marked with the keyword "static" at + the front of the declaration. It can be visible to other object files in + the same module, for which it requires no extra keyword. Or it can be + made available to the entire program (including other dynamically loaded + modules), for which it must be marked with the pseudo-keyword "mod_export" + at the front of the declaration. Symbols should have the least visibility + possible. + * Leave a blank line between the declarations and statements in a compound statement, if both are present. Use blank lines elsewhere to separate groups of statements in the interests of clarity. There should never @@ -131,7 +141,7 @@ variables: - autoparams parameters defined by the module, for autoloading - automathfuncs math functions defined by the module, for autoloading - objects .o files making up this module (*must* be defined) - - proto .pro files for this module (default generated from $objects) + - proto .syms files for this module (default generated from $objects) - headers extra headers for this module (default none) - hdrdeps extra headers on which the .mdh depends (default none) - otherincs extra headers that are included indirectly (default none) -- cgit 1.4.1