home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 595.lha / MountStuff / EStartup / Template.h < prev   
C/C++ Source or Header  |  1990-10-16  |  1KB  |  49 lines

  1.  
  2. #ifndef HH_TEMPLATE_H
  3. #define HH_TEMPLATE_H
  4.  
  5. #ifndef EXEC_TYPES_H
  6. #include <exec/types.h>
  7. #endif
  8.  
  9. #ifndef EXEC_MEMORY_H
  10. #include <exec/memory.h>
  11. #endif
  12.  
  13. #ifndef _CDECL
  14. #define _CDECL(a) _cdecl(a)
  15. #ifndef _cdecl(a)
  16. #define _cdecl(a) ()
  17. #endif
  18. #endif
  19.  
  20. #define MEMF_X        (MEMF_PUBLIC|MEMF_CLEAR)
  21. #define MEMF_CHIP_X    (MEMF_CHIP|MEMF_X)
  22. #define MEMF_FAST_X    (MEMF_FAST|MEMF_X)
  23.  
  24. typedef struct TEMPLATE {
  25.        BOOL tp_Flags;       /* A/K/S or EOTP */
  26.        TEXT  *tp_Key;        /* KeyWord */
  27.        TEXT  **tp_UserVar;   /* If Not NULL, Filled With ArgV */
  28.        TEXT  *tp_ArgV;       /* Set By FetchTemplate() */
  29. } TEMPLATE;
  30.  
  31. extern TEMPLATE Template[]; /* User Must Declare The Real Array */
  32.  
  33. /* TEMPLATE.tp_Flags, user settable */
  34. #define NOFLAGS    (0x00L)   /* Normal Name */
  35. #define A_FLAG     (0x01L)   /* One That Must Be Given */
  36. #define K_FLAG     (0x02L)   /* Keyword Must Be Preceded If Given */
  37. #define S_FLAG     (0x04L)   /* The Ultimate Switch */
  38. #define EOTP       (0x80L)   /* End Of Template */
  39. /* another flag, but set by FetchTemplate() */
  40. #define FETCHED    (0x40L)   /* Found A Match */
  41.  
  42. extern BOOL  FetchTemplate   _CDECL((LONG argc, TEXT *argv[]));
  43. extern VOID  ReleaseTemplate _CDECL((VOID));
  44. extern TEXT *KeyArgV         _CDECL((TEXT *key));
  45. extern TEXT *DefaultKeyArgV  _CDECL((TEXT *key, TEXT *defkey));
  46.  
  47. #endif
  48.  
  49.