1 /*************************************************************************** 2 * S3m/Mod player by Daniel Marks (dmarks@ais.net) 3 * GUS support by David Jeske (jeske@uiuc.edu) 4 * 5 * (C) 1994,1995 By Daniel Marks and David Jeske 6 * 7 * While we retain the copyright to this code, this source code is FREE. 8 * You may use it in any way you wish, in any product you wish. You may 9 * NOT steal the copyright for this code from us. 10 * 11 * We respectfully ask that you email one of us, if possible, if you 12 * produce something significant with this code, or if you have any bug 13 * fixes to contribute. We also request that you give credit where 14 * credit is due if you include part of this code in a program of your own. 15 * 16 * Email: s3mod@uiuc.edu 17 * jeske@uiuc.edu 18 * 19 * See the associated README file for Thanks 20 *************************************************************************** 21 * 22 * cmdline.h - header file for command line parser 23 * 24 */ 25 26 #ifndef _CMDLINE_H 27 #define _CMDLINE_H 1 28 29 #ifndef NULL 30 #define NULL 0 31 #endif 32 33 int parm_setup(int argc,char **argv,char *str_prms,char *flag_prms, 34 char *num_prms); 35 36 /* My own favorite GETOPT substitute */ 37 /* letter <= 32 means get non-flagged regular parameter # letter */ 38 /* num_types = letters that take numerical parameters */ 39 /* str_types = letters that take string parameters */ 40 /* flag_types = letters that take no parameters */ 41 /* str_value = returned string value */ 42 /* num_value = returned numerical value */ 43 /* argv/argc = parameter list / parameter count */ 44 45 int read_next_parm(char letter, 46 char *num_types, char *str_types, char *flag_types, 47 char **str_value, long int *num_value, 48 int argc, char **argv); 49 50 int read_parm(char letter, char **str_value, long int *num_value); 51 #define NON_FLAGGED 1 52 53 #endif /* _CMDLINE_H */ 54