home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / math / cephes / qfloat / qcalc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-17  |  1.1 KB  |  78 lines

  1. /*        calc.h
  2.  * include file for calc.c
  3.  */
  4.  
  5. /* Set LARGEMEM to 1 for 32 bit memory addresses: */
  6. #define LARGEMEM 0
  7.  
  8. /* data structure of symbol table */
  9. struct symbol
  10.     {
  11.     char *spel;
  12.     short attrib;
  13. #if LARGEMEM
  14.     long sym;
  15. #else
  16.     short sym;
  17. #endif
  18.     };
  19.  
  20. struct funent
  21.     {
  22.     char *spel;
  23.     short attrib;
  24.     int (*fun )();
  25.     };
  26.  
  27. struct varent
  28.         {
  29.     char *spel;
  30.     short attrib;
  31.     short *value;
  32.         };
  33.  
  34. struct strent
  35.     {
  36.     char *spel;
  37.     short attrib;
  38.     char *string;
  39.     };
  40.  
  41.  
  42. /*    general symbol attributes:    */
  43. #define OPR 0x8000
  44. #define    VAR 0x4000
  45. #define CONST 0x2000
  46. #define FUNC 0x1000
  47. #define ILLEG 0x800
  48. #define BUSY 0x400
  49. #define TEMP 0x200
  50. #define STRING 0x100
  51. #define COMMAN 0x80
  52. #define IND 0x1
  53.  
  54. /* attributes of operators (ordered by precedence): */
  55. #define BOL 1
  56. #define EOL 2
  57. /* end of expression (comma): */
  58. #define EOE 3
  59. #define EQU 4
  60. #define PLUS 5
  61. #define MINUS 6
  62. #define MULT 7
  63. #define DIV 8
  64. #define UMINUS 9
  65. #define LPAREN 10
  66. #define RPAREN 11
  67. #define COMP 12
  68. #define MOD 13
  69. #define LAND 14
  70. #define LOR 15
  71. #define LXOR 16
  72.  
  73.  
  74. extern struct funent funtbl[];
  75. /*extern struct symbol symtbl[];*/
  76. extern struct varent indtbl[];
  77.  
  78.