home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume23 / rc / part01 / addon.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-18  |  1.1 KB  |  45 lines

  1. /*
  2.    This file is the interface to the rest of rc for any locally
  3.    defined addon builtins.  By default there are none.
  4.    The interface consists of the following macros.
  5.   
  6.    ADDON_FUN    A comma-separated list of the function names for the
  7.           builtins.
  8.   
  9.    ADDON_STR    A comma-separated list of string literals corresponding
  10.           to the function names in ADDON_FUN.
  11.   
  12.    The addon functions must also have proper prototypes in this file.
  13.    The builtins all have the form:
  14.   
  15.       void b_NAME(char **av);
  16.   
  17.    Builtins report their exit status using set(TRUE) or set(FALSE).
  18.   
  19.    Example:
  20.   
  21.       #define ADDON_FUN    b_test, b_printf
  22.       #define ADDON_STR    "test", "printf"
  23.       extern void b_test(char **av);
  24.       extern void b_printf(char **av);
  25. */
  26.  
  27. #define ADDON_FUN    /* no addons by default */
  28. #define ADDON_STR    /* no addons by default */
  29.  
  30. #ifdef    DWS
  31.  
  32. /*
  33.    This is what DaviD Sanderson (dws@cs.wisc.edu) uses.
  34. */
  35.  
  36. #undef    ADDON_FUN
  37. #define ADDON_FUN    b_access, b_test, b_test
  38. #undef    ADDON_STR
  39. #define ADDON_STR    "access", "test", "["
  40.  
  41. extern void b_access(char **av);
  42. extern void b_test(char **av);
  43.  
  44. #endif
  45.