Deleted Added
full compact
egetopt.c (204359) egetopt.c (289677)
1/*-
2 * Copyright (c) 1991 Keith Muller.
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
8 *

--- 28 unchanged lines hidden (view full) ---

37
38#if 0
39#ifndef lint
40static char sccsid[] = "@(#)egetopt.c 8.1 (Berkeley) 6/6/93";
41#endif /* not lint */
42#endif
43
44#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1991 Keith Muller.
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
8 *

--- 28 unchanged lines hidden (view full) ---

37
38#if 0
39#ifndef lint
40static char sccsid[] = "@(#)egetopt.c 8.1 (Berkeley) 6/6/93";
41#endif /* not lint */
42#endif
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/usr.bin/pr/egetopt.c 204359 2010-02-26 13:48:04Z ed $");
45__FBSDID("$FreeBSD: head/usr.bin/pr/egetopt.c 289677 2015-10-21 05:37:09Z eadler $");
46
47#include <ctype.h>
48#include <stdio.h>
49#include <string.h>
50
51#include "extern.h"
52
53/*

--- 17 unchanged lines hidden (view full) ---

71
72static char emsg[] = "";
73
74int
75egetopt(int nargc, char * const *nargv, const char *ostr)
76{
77 static char *place = emsg; /* option letter processing */
78 char *oli; /* option letter list index */
46
47#include <ctype.h>
48#include <stdio.h>
49#include <string.h>
50
51#include "extern.h"
52
53/*

--- 17 unchanged lines hidden (view full) ---

71
72static char emsg[] = "";
73
74int
75egetopt(int nargc, char * const *nargv, const char *ostr)
76{
77 static char *place = emsg; /* option letter processing */
78 char *oli; /* option letter list index */
79 static int delim; /* which option delimeter */
79 static int delim; /* which option delimiter */
80 char *p;
81 static char savec = '\0';
82
83 if (savec != '\0') {
84 *place = savec;
85 savec = '\0';
86 }
87

--- 130 unchanged lines hidden ---
80 char *p;
81 static char savec = '\0';
82
83 if (savec != '\0') {
84 *place = savec;
85 savec = '\0';
86 }
87

--- 130 unchanged lines hidden ---