home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 285_02 / hocdecl.h < prev    next >
Text File  |  1990-07-09  |  1KB  |  53 lines

  1. /*
  2. ** HOCDECL.H   definitions for the hoc3.y calculator
  3. **              in K&P p246 ch8.
  4. */
  5.  
  6. typedef struct Symbol {    /* symbol table entry */
  7.          char *name ;
  8.          short type ;      /* VAR, BLTIN, UNDEF  */
  9.          union {
  10.                double val ;         /* if VAR */
  11.                double (*ptr)() ;    /* if BLTIN */
  12.          } u ;
  13.          struct Symbol *next ;
  14. } Symbol ;
  15.  
  16. /*
  17. **        functions in HOC3.C
  18. */
  19.  
  20. extern int main( char **) ;
  21. extern int yylex( void) ;
  22. extern void execerror( char *, char *) ;
  23. extern void fpecatch( void) ;
  24. extern void yyerror( char *) ;
  25. extern void warning( char *, char *) ;
  26.  
  27. /*
  28. **        functions in SYMBOL.C
  29. */
  30.  
  31. extern Symbol *lookup( char *) ;
  32. extern Symbol *install( char *, int, double) ;
  33. extern char *emalloc( unsigned) ;
  34.  
  35. /*
  36. **        function in INIT.C
  37. */
  38.  
  39. extern void init( void) ;
  40.  
  41. /*
  42. **        functions in MATH.C
  43. */
  44.  
  45. extern  double Log(double x);
  46. extern  double Log10(double x);
  47. extern  double Exp(double x);
  48. extern  double Pow(double x,double y);
  49. extern  double integer(double x);
  50. extern  double Sqrt(double x);
  51. extern  double errcheck( double, char *) ;
  52.  
  53.