Line Name ----- ---- 62 kwdef_code 61 kwdef_handler 59 kwdef_keyword 60 kwdef_minlen 40 max 66 set_kwdef_code 65 set_kwdef_handler 63 set_kwdef_keyword 64 set_kwdef_minlen
BEGINNING OF FILE
1: /****************************************************************************/ 2: /* */ 3: /* FACILITY: Generic Support Library */ 4: /* */ 5: /* MODULE: Command Line Keyword and Option Processing Header */ 6: /* */ 7: /* AUTHOR: Steve Branam, Network Product Support Group, Digital */ 8: /* Equipment Corporation, Littleton, MA, USA. */ 9: /* */ 10: /* DESCRIPTION: This header contains definitions used in the processing of */ 11: /* program command line arguments, given a dispatch table of keywords and */ 12: /* handlers. */ 13: /* */ 14: /* REVISION HISTORY: */ 15: /* */ 16: /* V0.1-00 24-AUG-1994 Steve Branam */ 17: /* */ 18: /* Original version. */ 19: /* */ 20: /* V0.2-00 23-SEP-1994 Steve Branam */ 21: /* */ 22: /* Addded keyword translation code. */ 23: /* */ 24: /****************************************************************************/ 25: 26: #ifndef __CMDOPT_H 27: #define __CMDOPT_H 28: 29: #ifdef VAXC 30: #define CMDLINE_OPTION_SWITCH '/' /* VMS option switch char. */ 31: #else 32: #define CMDLINE_OPTION_SWITCH '-' /* Non-VMS option switch char. */ 33: #endif 34: #define CMDLINE_OPTION_SEPARATOR '=' /* Separates option from value. */ 35: #define CMDLINE_OPTION_COMMENT '!' /* Rest of option is comment. */ 36: #define CMDLINE_OPTVAL_SEPARATOR ',' /* Separates values in list. */ 37: #define CMDLINE_HELP_SWITCH '#' /* Switch char to show help. */ 38: #define KEYWORD_LIST_SEPARATOR ',' /* Separates values in list. */ 39:
40: #define max(x, y) (x > y ? x : y)END max. Go to: Beginning of routine.
41: 42: /* */ 43: /* Keyword definition object. Keyword dispatch tables are composed of these */ 44: /* objects. */ 45: /* */ 46: 47: typedef struct { 48: char *keyword; /* Keyword string. */ 49: int minlen; /* Minimum required command */ 50: /* line argument length. */ 51: int (*handler)(); /* Keyword handler ptr. */ 52: int code; /* Translation code. */ 53: } KEYWORD_DEFINITION; 54: 55: /* */ 56: /* Keyword definition object member access routines. */ 57: /* */ 58:
59: #define kwdef_keyword(d) ((d)->keyword)END kwdef_keyword. Go to: Beginning of routine.
60: #define kwdef_minlen(d) ((d)->minlen)END kwdef_minlen. Go to: Beginning of routine.
61: #define kwdef_handler(d) ((d)->handler)END kwdef_handler. Go to: Beginning of routine.
62: #define kwdef_code(d) ((d)->code)END kwdef_code. Go to: Beginning of routine.
63: #define set_kwdef_keyword(d, s) ((d)->keyword = s)END set_kwdef_keyword. Go to: Beginning of routine.
64: #define set_kwdef_minlen(d, x) ((d)->minlen = x)END set_kwdef_minlen. Go to: Beginning of routine.
65: #define set_kwdef_handler(d, h) ((d)->handler = h)END set_kwdef_handler. Go to: Beginning of routine.
66: #define set_kwdef_code(d, x) ((d)->code = x)END set_kwdef_code. Go to: Beginning of routine.
67: 68: /* */ 69: /* Forward declarations. */ 70: /* */ 71: 72: int ustrncmp(); 73: int process_options(); 74: int process_keyword(); 75: int process_options_file(); 76: int translate_keyword(); 77: 78: #endif /* #ifndef __CMDOPT_H */
END OF FILE TOTAL: 9 routines, 1 Avg Length