home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c160 / 1.ddi / H / E4PARSE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-22  |  3.4 KB  |  130 lines

  1.  
  2. /*  e4parse.h  (c)Copyright Sequiter Software Inc., 1987-1990.    All rights reserved. */
  3.  
  4. /* This first section specifies the breakdown of the functions 
  5.    in file 'e4functi.c'.
  6. */
  7.  
  8. /* Codes for Immediate Data in Compile String */
  9. #define  I_FIELD_STR        0
  10. #define  I_FIELD_LOG        1
  11. #define  I_FIELD_DATE_D     2
  12. #define  I_FIELD_DATE_S     3
  13. #define  I_FIELD_NUM_D      4
  14. #define  I_FIELD_NUM_S      5
  15. #define  I_FIELD_MEMO       6
  16.  
  17. #define  LAST_I_FIELD       5
  18.  
  19. #define  I_STRING           6
  20. #define  I_DOUBLE           7
  21.  
  22. #define  LAST_IMMEDIATE     7
  23.  
  24.  
  25. #define  FIRST_LOG          8  /* Range of Logical Operators */
  26. #define  LAST_LOG            12
  27.  
  28. #define  FIRST_OPERATOR    13  /* Range of Other Operators */
  29. #define  LAST_OPERATOR     48
  30.  
  31. #define  FIRST_FUNCTION    49  /* Start of the List of Functions */
  32.  
  33. /* Additional Definitions */
  34.  
  35. #define   MAX_PARMS         3
  36. #define   PARM_STACK_SIZE  20 
  37.  
  38. typedef struct e4parm_st
  39. {
  40.    union
  41.    {
  42.       void   *v ;
  43.       char   *c ;
  44.       int    *i ;
  45.       long   *l ;
  46.       double *d ;
  47.    }  p ;       /* Pointer to the parameter */
  48.    int    type ;   /* The type of the parameter */
  49.    int    len ;       /* The number of bytes in the parameter */
  50.    #ifdef PORTABLE
  51.       int    extra_len ;  /* Extra bytes for alignment purposes. */
  52.    #endif
  53. }  E4PARM ;
  54.  
  55. typedef void E4FUNC( E4PARM *) ;
  56.  
  57. typedef struct e4functions_st
  58. {
  59.    int      code ;
  60.    int      name_len ;
  61.    char     name[12] ;
  62.    #ifdef KR
  63.       void     (*function_ptr)() ;
  64.    #else
  65.       void     (*function_ptr)( E4PARM *) ;
  66.    #endif
  67.    int      priority ;
  68.    int      return_type ;
  69.    int      num_parms ;         /* 0 - No Return;  -1 First Parm. Specifies # */
  70.    int      type[MAX_PARMS] ;        /* type[0] is the return type */
  71. }  E4FUNCTIONS ;
  72.  
  73. #define OPERATOR_LEN  128
  74.  
  75. /* Integer Codes for Function/Operator parameters and returns */
  76. #define   T_NUM_STR     ((int) 'n')
  77. #define   T_NUM_DOUB    ((int) 'N')
  78. #define   T_DATE_DOUB   ((int) 'd')
  79. #define   T_DATE_STR    ((int) 'D')
  80. #define   T_STR         ((int) 'C')
  81. #define   T_LOG         ((int) 'L')     /* Used for Logical */
  82. /*  #define   T_LONG        ((int) 'l')   Not Currently Used */
  83.  
  84. /* Quasi Operators */
  85. #define  Q_NO_FUNCTION  -2
  86. #define  Q_L_BRACKET    -3
  87. #define  Q_R_BRACKET    -4
  88. #define  Q_COMMA        -5
  89.  
  90. void  e4true(E4PARM *) ;
  91. void  e4false(E4PARM *) ;
  92. void  e4add(E4PARM *) ;
  93. void  e4add(E4PARM *) ;
  94. void  e4concatenate(E4PARM *) ;
  95. void  e4sub(E4PARM *) ;
  96. void  e4concat_two(E4PARM *) ;
  97. void  e4multiply(E4PARM *) ;
  98. void  e4divide(E4PARM *) ;
  99. void  e4power(E4PARM *) ;
  100. void  e4not_equal(E4PARM *) ;
  101. void  e4equal(E4PARM *) ;
  102. void  e4greater(E4PARM *) ;
  103. void  e4less(E4PARM *) ;
  104. void  e4greater_eq(E4PARM *) ;
  105. void  e4less_eq(E4PARM *) ;
  106. void  e4not(E4PARM *) ;
  107. void  e4or(E4PARM *) ;
  108. void  e4and(E4PARM *) ;
  109. void  e4ctod(E4PARM *) ;
  110. void  e4dtoc(E4PARM *) ;
  111. void  e4dtos(E4PARM *) ;
  112. void  e4stod(E4PARM *) ;
  113. void  e4date(E4PARM *) ;
  114. void  e4year(E4PARM *) ;
  115. void  e4month(E4PARM *) ;
  116. void  e4day(E4PARM *) ;
  117. void  e4del(E4PARM *) ;
  118. void  e4deleted(E4PARM *) ;
  119. void  e4iif(E4PARM *) ;
  120. void  e4reccount(E4PARM *) ;
  121. void  e4recno(E4PARM *) ;
  122. void  e4str(E4PARM *) ;
  123. void  e4substr(E4PARM *) ;
  124. void  e4time(E4PARM *) ;
  125. void  e4upper(E4PARM *) ;
  126. void  e4val(E4PARM *) ;
  127. void  e4contain(E4PARM *) ;
  128.  
  129. extern int  e4return_len( E4PARM *, int ) ;
  130.