home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d523 / bmake.lha / BMake / source.lzh / cond.h < prev    next >
C/C++ Source or Header  |  1991-07-20  |  898b  |  37 lines

  1. /*    cond.h
  2.  *    (c) Copyright 1991 by Ben Eng, All Rights Reserved
  3.  *
  4.  */
  5.  
  6. #define STATE_IF_T    1
  7. #define STATE_IF_F    2    /* skip lines until ELSE mode */
  8. #define STATE_EL_T    3    /* skip lines until ENDIF mode */
  9. #define STATE_EL_F    4
  10.  
  11. struct mstate {
  12.     struct Node node;
  13.     int state;
  14. };
  15.  
  16. struct drctvs {
  17.     char *directive;    /* the name of the directive */
  18.     int (*call)(char *,...);    /* function call */
  19. };
  20.  
  21. struct drctvs *find_drctvs( struct drctvs *array, int array_size,
  22.     char *name );
  23. int push_state( struct List *stack, long state );
  24. int pop_state( struct List *stack );
  25. void clear_stack( struct List *stack );
  26. int get_directive_state( struct List *stack );
  27.  
  28. #define MAX_CDRCTVS 6
  29.  
  30. extern struct drctvs carray[ MAX_CDRCTVS ];
  31. extern struct List Mstack;
  32.  
  33. int drctv_if( char *string, struct List *stack );
  34. int drctv_else( char *string, struct List *stack );
  35. int drctv_endif( char *string, struct List *stack );
  36.  
  37.