f_print( stderr, "Cannot have more than one file generation flag!\n");
parseargs(argc, argv, cmd)	int argc;	char *argv[];	struct commandline *cmd;{	int i;	int j;	char c;	char flag[(1 << 8 * sizeof(char))];	int nflags;	cmdname = argv[0];	cmd->infile = cmd->outfile = NULL;	if (argc < 2) {		return (0);	}	flag['c'] = 0;	flag['h'] = 0;	flag['s'] = 0;	flag['o'] = 0;	flag['l'] = 0;	flag['m'] = 0;	for (i = 1; i < argc; i++) {		if (argv[i][0] != '-') {			if (cmd->infile) {				return (0);			}			cmd->infile = argv[i];		} else {			for (j = 1; argv[i][j] != 0; j++) {				c = argv[i][j];				switch (c) {				case 'c':				case 'h':				case 'l':				case 'm':					if (flag[c]) {						return (0);					}					flag[c] = 1;					break;				case 'o':				case 's':					if (argv[i][j - 1] != '-' ||					    argv[i][j + 1] != 0) {						return (0);					}					flag[c] = 1;					if (++i == argc) {						return (0);					}					if (c == 's') {						if (!streq(argv[i], "udp") &&						    !streq(argv[i], "tcp")) {							return (0);						}					} else if (c == 'o') {						if (cmd->outfile) {							return (0);						}						cmd->outfile = argv[i];					}					goto nextarg;				default:					return (0);				}			}	nextarg:			;		}	}	cmd->cflag = flag['c'];	cmd->hflag = flag['h'];	cmd->sflag = flag['s'];	cmd->lflag = flag['l'];	cmd->mflag = flag['m'];	nflags = cmd->cflag + cmd->hflag + cmd->sflag + cmd->lflag + cmd->mflag;	if (nflags == 0) {		if (cmd->outfile != NULL || cmd->infile == NULL) {			return (0);		}	} else if (nflags > 1) {		return (0);	}	return (1);}