about summary refs log tree commit diff
path: root/Etc
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-01 18:35:59 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-01 18:35:59 +0000
commita4e44197ae0f6e237f118e5b30c01eb12c460ec4 (patch)
treefb6a23f8a1eaaba1e97869ca54245e5bd986045e /Etc
parent2c5eaba1971c212412eb212184ee724cf7d0ac70 (diff)
downloadzsh-a4e44197ae0f6e237f118e5b30c01eb12c460ec4.tar.gz
zsh-a4e44197ae0f6e237f118e5b30c01eb12c460ec4.tar.xz
zsh-a4e44197ae0f6e237f118e5b30c01eb12c460ec4.zip
zsh-workers/8843
Diffstat (limited to 'Etc')
-rw-r--r--Etc/zsh-development-guide20
1 files changed, 15 insertions, 5 deletions
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)