home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Software / TemaCD / activetcltk / ActiveTcl8.3.4.1-8.win32-ix86.exe / ActiveTcl8.3.4.1-win32-ix86 / include / util / cfg.h next >
Encoding:
C/C++ Source or Header  |  2001-10-22  |  4.7 KB  |  156 lines

  1. /**********************************************************************/
  2. /*  File: cfg.h                                                       */
  3. /*  Desc: The include file for definition of the configuration        */
  4. /*        structure.                                                  */
  5. /*  Date: Sept, 1990                                                  */
  6. /**********************************************************************/
  7. #define CFG_H_VERSION "V1.0"
  8.  
  9. #define NOT_CONFIG_ID    (-1)
  10.  
  11. /* filename definitions */
  12. #define CFG_ROOT    "ROOT_DIR"
  13. #define CFG_CODESET    "CODESET"
  14. #define CFG_LEX        "LEX"
  15. #define CFG_HOMO    "HOMO"
  16. #define CFG_REF        "REF"
  17. #define CFG_SPLTMRG    "SPLTMRG"
  18. #define CFG_MONO    "MONOSYL"
  19. #define CFG_LSUBS    "LSUBS"
  20. #define CFG_ALP_NUM    "ALP_NUM"
  21. #define CFG_FILE    "CFG"
  22. #define CFG_WWL_FILE    "WWL"
  23.  
  24. /* print filetype defintions */
  25. #define CFG_SHLEX    "SHLEX"
  26. #define CFG_SHLSUBS    "SHLSUBS"
  27. #define CFG_SHCODESET    "SHCODE"
  28. #define CFG_SHHOMO    "SHHOMO"
  29. #define CFG_SHALP_NUM    "SHALPHA"
  30. #define CFG_SHMONO    "SHMONO"
  31. #define CFG_SHSPLT_MRG    "SHSPLT_MRG"
  32.  
  33. /* alignment program definitions */
  34. #define CFG_HOMO_ERROR    "HOMO_ERROR"
  35. #define CFG_STR_SIL    "SILENCE"
  36. #define CFG_NO_GR    "NO_GR"
  37. #define CFG_ATIS_FILES    "ATIS"
  38. #define CFG_ATIS3_FILES    "ATIS3"
  39. #define CFG_RM_FILES    "RM"
  40. #define CFG_WSJ_FILES    "WSJ"
  41. #define CFG_SWB_FILES    "SWB"
  42. #define CFG_TIMIT_FILES    "TIMIT"
  43. #define CFG_NTYPE_FILES    "NOTYPE"
  44. #define CFG_SPUID_FILES    "SPU_ID"
  45. #define CFG_NO_ID_FILES    "NO_ID"
  46. #define CFG_USE_PHONE     "PHONE"
  47. #define CFG_PHDIST_FILE    "DIST_TBL"
  48. #define CFG_OUT_FILE    "OUTFILE"
  49. #define CFG_SYS_NAME    "NAME"
  50. #define CFG_SYS_DESC    "DESC"
  51. #define CFG_ONE_TO_ONE    "ONE2ONE"
  52. #define CFG_ONE_TO_MANY    "ONE2MANY"
  53. #define CFG_SM_RESCORE  "SM"
  54. #define CFG_SM_FOM      "SM_FOM"
  55. #define CFG_FRAG_RESCORE "FRAG"
  56. #define CFG_MRK_FILES    "TMK"
  57. #define CFG_CMRK_FILES   "CTM"
  58. #define CFG_QSCR         "SUM"
  59. #define CFG_QSCR_RAW     "RSUM"
  60. #define CFG_PERMIT_OOCE  "POOCE"
  61.  
  62. /* statistics program defintions */
  63.  
  64. #define CFG_TESTNAME    "TEST_NAME"
  65. #define CFG_LPR        "LP"
  66. #define CFG_HDR        "HDR"
  67. #define CFG_MTCHPR    "MTCH_PR"
  68. #define CFG_SENT_MCN    "SENT_MCN"
  69. #define CFG_COUNT    "DUMP_COUNT"
  70. #define CFG_LONG_SEG    "SEG_LONG"
  71. #define CFG_AVE_SEG    "SEG_AVE"
  72. #define CFG_ANOVAR    "ANOVAR"
  73. #define CFG_SIGNTEST    "SIGNTEST"
  74. #define CFG_WILCOXON    "WILCOXON"
  75. #define CFG_2_SAMP      "SAMP_Z"
  76. #define CFG_SIG         "SIG"
  77. #define CFG_RANGE    "RANGE"
  78. #define CFG_TROFF    "TROFF"
  79. #define CFG_MINGOOD    "MIN_GOOD"
  80. #define CFG_PCT_FORMULA    "PCT_FORM"
  81. #define CFG_VERBOSE     "V"
  82.  
  83.  
  84. /* unique scoring defintions */
  85. #define CFG_OVR_SCR    "OVRALL"
  86. #define CFG_OVR_RAW    "OVRRAW"
  87. #define CFG_OVR_DTL    "OVRDTL"
  88. #define CFG_SPKR_SCR    "SPKR"
  89. #define CFG_SENT_SCR    "SENT"
  90. #define CFG_OUT_DIR    "OUT_DIR"
  91.  
  92. /* general difinitions */
  93. #define CFG_DUMPARG    "DUMP"
  94. #define CFG_ALI_FILE    "ALIGN"
  95. #define CFG_HYP_FILE    "HYP"
  96. #define CFG_ALL_SENT    "ALL"
  97. #define CFG_DIFF_SENT    "DIFF"
  98. #define CFG_DIFF_SCORE    "SDIFF"
  99. #define CFG_ERRORS    "ERRORS"
  100.  
  101. #define MAX_CONFIG_REC    40
  102. #define MAX_CONFIG_LENGTH    160
  103. #define TOGGLE_ON    1
  104. #define TOGGLE_OFF    0
  105. #define TOGGLE_ON_CHR   "on"
  106. #define TOGGLE_OFF_CHR  "off"
  107.  
  108.  
  109. #define CFG_TGL    0
  110. #define CFG_C    1
  111. #define CFG_C2    2
  112. #define CFG_STR    3
  113.  
  114. #define NO_GRP    0
  115.  
  116. typedef struct config_record_struct{
  117.     char *intern_id;
  118.     int num_elem;
  119.     int value_type;
  120.     int flag_group;
  121.     char *value;
  122. } CONFIG_REC;
  123.  
  124. typedef struct config_struct{
  125.     CONFIG_REC rec_list[MAX_CONFIG_REC];
  126. } CONFIG;
  127.  
  128. #if defined(__STDC__) || defined(__GNUC__) || defined(sgi)
  129. #define PROTO(ARGS)    ARGS
  130. #else
  131. #define PROTO(ARGS)    ()
  132. #endif
  133.  
  134. void set_cfg_debug PROTO((int)) ;
  135. void alloc_CONFIG PROTO((CONFIG *)) ;
  136. void cfg_get_args PROTO((CONFIG *, int, char **, char *)) ;
  137. void load_com_line_CONFIG PROTO((CONFIG *cfg, int argc, char **argv, 
  138.                  int silent)) ;
  139. void load_CONFIG PROTO((CONFIG *cfg, char *file, int silent)) ;
  140. void reset_group PROTO((CONFIG *cfg, int cfg_ind)) ;
  141. char * CONFIG_elem_C PROTO((CONFIG *cfg, char *str)) ;
  142. int CONFIG_elem_TGL PROTO((CONFIG *cfg, char *str)) ;
  143. char ** CONFIG_elem_C2 PROTO((CONFIG *cfg, char *str)) ;
  144. void set_CONFIG_elem_TGL PROTO((CONFIG *cfg, char *str, int value)) ;
  145. void set_CONFIG_elem_C PROTO((CONFIG *cfg, char *str, char *value)) ;
  146. void set_CONFIG_elem_STR PROTO((CONFIG *cfg, char *str, char *value)) ;
  147. int CONFIG_elem_count PROTO((CONFIG *cfg, char *str)) ;
  148. int CONFIG_elem_present_C2 PROTO((CONFIG *cfg, char *str)) ;
  149. int is_CONFIG_id PROTO((CONFIG *cfg, char *id)) ;
  150. void dump_CONFIG PROTO((CONFIG *cfg)) ;
  151. void print_usage_CONFIG PROTO((CONFIG *cfg, char *prog_name)) ;
  152. char * CONFIG_elem_STR PROTO((CONFIG *cfg, char *str)) ;
  153. int is_CONFIG_set PROTO((CONFIG *cfg, char *str, int verbose)) ;
  154. int is_CONFIG_group_set PROTO((CONFIG *cfg, int grp_ind, int verbose)) ;
  155. int is_CONFIG_ind_set PROTO((CONFIG *cfg, int ind, int verbose)) ;
  156.