home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Utilities / Calc / symbol.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-24  |  1.1 KB  |  50 lines  |  [TEXT/????]

  1. /*
  2.  * Copyright (c) 1992 David I. Bell
  3.  * Permission is granted to use, distribute, or modify this source,
  4.  * provided that this copyright notice remains intact.
  5.  */
  6.  
  7.  
  8. /*
  9.  * Symbol Declarations.
  10.  */
  11. #define SYM_UNDEFINED    0    /* undefined symbol */
  12. #define SYM_PARAM    1    /* paramater symbol */
  13. #define SYM_LOCAL    2    /* local symbol */
  14. #define SYM_GLOBAL    3    /* global symbol */
  15.  
  16.  
  17. typedef struct global GLOBAL;
  18. struct global {
  19.     int g_len;        /* length of symbol name */
  20.     char *g_name;        /* global symbol name */
  21.     VALUE g_value;        /* global symbol value */
  22.     GLOBAL *g_next;        /* next symbol in hash chain */
  23. };
  24.  
  25.  
  26. /*
  27.  * Routines to search for global symbols.
  28.  */
  29. extern GLOBAL *addglobal(), *findglobal();
  30.  
  31.  
  32. /*
  33.  * Routines to return names of variables.
  34.  */
  35. extern char *localname(), *globalname(), *paramname();
  36.  
  37.  
  38. /*
  39.  * Other routines.
  40.  */
  41. extern long addlocal(), findlocal(), addparam(), findparam();
  42. extern void initlocals();
  43. extern void initglobals();
  44. extern void initfunctions();
  45. extern int writeglobals();
  46. extern int symboltype();    /* return the type of a variable name */
  47. extern void showglobals();    /* show the value of all global variables */
  48.  
  49. /* END CODE */
  50.