home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / sharedmem / part01 / src / franz / module.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-17  |  1.6 KB  |  56 lines

  1. /*                    -[Sat Jun  2 08:09:36 1984 by jkf]-
  2.  *     module.h            $Locker:  $
  3.  * 
  4.  *  module interface includes
  5.  *
  6.  * $Header: module.h,v 40.2 84/11/13 14:23:46 schlafly Exp $
  7.  *
  8.  * (c) copyright 1984, Franz Inc., Oakland California
  9.  */
  10.  
  11. /*
  12.  * All C coded modules will contain a VERSION
  13.  * header in which the rcs header is stored
  14.  */
  15.  
  16. #ifndef lint
  17. #define VERSION(s)    static char *rcsid = s
  18. #else
  19. #define VERSION(s)
  20. #endif
  21.  
  22.  
  23. /*
  24.  * All variables are either private in the module or else are
  25.  * shared among 2 or more files.
  26.  * Private variables are declared Private inside the file.
  27.  * Non-private variables are either declared Public in a .h file which
  28.  * all files that wish to reference that variable must include,
  29.  * or are declared Export in a C (non-header) file.  C files wishing
  30.  * to reference those variables declare the variable Import.
  31.  * 
  32.  *
  33.  * Private corresponds to 'static' in C, although it usually isn't a good
  34.  * idea to declare variables or functions to be static if you want to debug
  35.  * the code with something like adb.
  36.  * Export corresponds to '' (nothing), and Import to 'extern'.
  37.  * Public corresponds to 'extern' in C, although there must be one file
  38.  * in which the 'extern' isn't declared.  To order to strip the extern,
  39.  * the macro DefineData should be set before including files.
  40.  *
  41.  * Public should be used instead of Import and Export since it assures
  42.  * that every module gets the same declaration.  However it does require
  43.  * a .h file, and this may be too much effort for one or two variables.
  44.  *
  45.  */
  46.  
  47. #define Private static
  48. #define Export
  49. #define Import extern
  50.  
  51. #ifdef DefineData
  52. # define Public
  53. #else
  54. # define Public extern
  55. #endif
  56.