optarg = NULL; errno  = EINVAL; 
if (argc > optind) optind++; optarg = letP = NULL; errno  = EINVAL; 
int	getopt(int argc, char *argv[], char *optionS){	unsigned char ch;	char *optP; #if 0	if (SW == 0) {		/* get SW using dos call 0x37 */		_AX = 0x3700;		geninterrupt(0x21);		SW = _DL;	}#endif	if (argc > optind) {		if (letP == NULL) {			if ((letP = argv[optind]) == NULL ||				*(letP++) != SW)  goto gopEOF;			if (*letP == SW) {				optind++;  goto gopEOF;			}		}		if (0 == (ch = *(letP++))) {			optind++;  goto gopEOF;		}		if (':' == ch  ||  (optP = strchr(optionS, ch)) == NULL)			goto gopError;		if (':' == *(++optP)) {			optind++;			if (0 == *letP) {				if (argc <= optind)  goto  gopError;				letP = argv[optind++];			}			optarg = letP;			letP = NULL;		} else {			if (0 == *letP) {				optind++;				letP = NULL;			}			optarg = NULL;		}		return ch;	}gopEOF:	optarg = letP = NULL;  	return EOF; gopError:	optarg = NULL;	errno  = EINVAL;	if (opterr)		perror ("get command line option");	return ('?');}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/cb293c4705e0c7b93d3269c59bcf9bbcab7f6278/getopt.c/buggy/getopt.c