getopt(3) returns -1 not EOF.
This commit is contained in:
parent
c8b4bd56c2
commit
b790f1b6de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47442
@ -496,7 +496,7 @@ do_status(char *cname, int argc, char **argv)
|
|||||||
description = NULL;
|
description = NULL;
|
||||||
|
|
||||||
optind = optreset = 1;
|
optind = optreset = 1;
|
||||||
while ((c = getopt(argc, argv, "vVsSbaI")) != EOF) {
|
while ((c = getopt(argc, argv, "vVsSbaI")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'v':
|
case 'v':
|
||||||
pvoltag = 1;
|
pvoltag = 1;
|
||||||
@ -730,7 +730,7 @@ do_voltag(char *cname, int argc, char **argv)
|
|||||||
bzero(&csvr, sizeof(csvr));
|
bzero(&csvr, sizeof(csvr));
|
||||||
|
|
||||||
optind = optreset = 1;
|
optind = optreset = 1;
|
||||||
while ((c = getopt(argc, argv, "fca")) != EOF) {
|
while ((c = getopt(argc, argv, "fca")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'f':
|
case 'f':
|
||||||
force = 1;
|
force = 1;
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
*
|
*
|
||||||
* last edit-date: [Mon Apr 26 14:00:31 1999]
|
* last edit-date: [Mon Apr 26 14:00:31 1999]
|
||||||
*
|
*
|
||||||
* $Id: g711conv.c,v 1.3 1999/04/26 12:10:39 hm Exp $
|
* $Id: g711conv.c,v 1.1 1999/05/20 10:12:14 hm Exp $
|
||||||
*
|
*
|
||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ main(int argc, char **argv)
|
|||||||
int opt_R = 0;
|
int opt_R = 0;
|
||||||
unsigned char uc;
|
unsigned char uc;
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "aurPR?")) != EOF)
|
while ((c = getopt(argc, argv, "aurPR?")) != -1)
|
||||||
{
|
{
|
||||||
switch(c)
|
switch(c)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* i4b daemon - main program entry
|
* i4b daemon - main program entry
|
||||||
* -------------------------------
|
* -------------------------------
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.36 1999/04/29 08:27:10 hm Exp $
|
* $Id: main.c,v 1.3 1999/05/20 10:12:42 hm Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Thu Apr 29 09:41:21 1999]
|
* last edit-date: [Thu Apr 29 09:41:21 1999]
|
||||||
*
|
*
|
||||||
@ -118,7 +118,7 @@ main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "bmc:d:fFlL:Pr:s:t:u:?")) != EOF)
|
while ((i = getopt(argc, argv, "bmc:d:fFlL:Pr:s:t:u:?")) != -1)
|
||||||
{
|
{
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* main.c - i4b set debug options
|
* main.c - i4b set debug options
|
||||||
* ------------------------------
|
* ------------------------------
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.17 1999/04/28 14:48:06 hm Exp $
|
* $Id: main.c,v 1.3 1999/05/20 10:13:12 hm Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Wed Apr 28 16:47:28 1999]
|
* last edit-date: [Wed Apr 28 16:47:28 1999]
|
||||||
*
|
*
|
||||||
@ -84,7 +84,7 @@ main(int argc, char **argv)
|
|||||||
ctl_debug_t cdbg;
|
ctl_debug_t cdbg;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "eghl:mrs:u:zH?")) != EOF)
|
while ((c = getopt(argc, argv, "eghl:mrs:u:zH?")) != -1)
|
||||||
{
|
{
|
||||||
switch(c)
|
switch(c)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* main.c - isdndecode main program file
|
* main.c - isdndecode main program file
|
||||||
* -------------------------------------
|
* -------------------------------------
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.8 1999/04/26 12:10:39 hm Exp $
|
* $Id: main.c,v 1.3 1999/05/20 10:13:30 hm Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Mon Apr 26 14:02:44 1999]
|
* last edit-date: [Mon Apr 26 14:02:44 1999]
|
||||||
*
|
*
|
||||||
@ -90,7 +90,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
b = &buf[sizeof(i4b_trace_hdr_t)];
|
b = &buf[sizeof(i4b_trace_hdr_t)];
|
||||||
|
|
||||||
while( (c = getopt(argc, argv, "abdf:hiln:op:u:BPR:T:?")) != EOF)
|
while( (c = getopt(argc, argv, "abdf:hiln:op:u:BPR:T:?")) != -1)
|
||||||
{
|
{
|
||||||
switch(c)
|
switch(c)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* isdntel - isdn4bsd telephone answering machine support
|
* isdntel - isdn4bsd telephone answering machine support
|
||||||
* ======================================================
|
* ======================================================
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.8 1999/04/26 12:10:39 hm Exp $
|
* $Id: main.c,v 1.3 1999/05/20 10:13:55 hm Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Mon Apr 26 13:56:35 1999]
|
* last edit-date: [Mon Apr 26 13:56:35 1999]
|
||||||
*
|
*
|
||||||
@ -61,7 +61,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "a:d:p:t:?")) != EOF)
|
while ((i = getopt(argc, argv, "a:d:p:t:?")) != -1)
|
||||||
{
|
{
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* isdntelctl - i4b set telephone interface options
|
* isdntelctl - i4b set telephone interface options
|
||||||
* ------------------------------------------------
|
* ------------------------------------------------
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.9 1999/04/26 12:10:39 hm Exp $
|
* $Id: main.c,v 1.3 1999/05/20 10:14:04 hm Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Mon Apr 26 14:07:06 1999]
|
* last edit-date: [Mon Apr 26 14:07:06 1999]
|
||||||
*
|
*
|
||||||
@ -72,7 +72,7 @@ main(int argc, char **argv)
|
|||||||
int telfd;
|
int telfd;
|
||||||
char namebuffer[128];
|
char namebuffer[128];
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "cgu:AUN?")) != EOF)
|
while ((c = getopt(argc, argv, "cgu:AUN?")) != -1)
|
||||||
{
|
{
|
||||||
switch(c)
|
switch(c)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
* trace.c - print traces of D (B) channel activity for isdn4bsd
|
* trace.c - print traces of D (B) channel activity for isdn4bsd
|
||||||
* -------------------------------------------------------------
|
* -------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* $Id: trace.c,v 1.11 1999/02/14 09:44:58 hm Exp $
|
* $Id: trace.c,v 1.3 1999/05/20 10:14:35 hm Exp $
|
||||||
*
|
*
|
||||||
* last edit-date: [Sun Feb 14 10:23:28 1999]
|
* last edit-date: [Sun Feb 14 10:23:28 1999]
|
||||||
*
|
*
|
||||||
@ -146,7 +146,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
b = &buf[sizeof(i4b_trace_hdr_t)];
|
b = &buf[sizeof(i4b_trace_hdr_t)];
|
||||||
|
|
||||||
while( (c = getopt(argc, argv, "abdf:hiln:op:ru:BFPR:T:?")) != EOF)
|
while( (c = getopt(argc, argv, "abdf:hiln:op:ru:BFPR:T:?")) != -1)
|
||||||
{
|
{
|
||||||
switch(c)
|
switch(c)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: mptable.c,v 1.9 1997/09/25 06:47:33 charnier Exp $";
|
"$Id: mptable.c,v 1.10 1998/02/24 01:11:47 bde Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#define VMAJOR 2
|
#define VMAJOR 2
|
||||||
@ -321,7 +321,7 @@ main( int argc, char *argv[] )
|
|||||||
|
|
||||||
printf( "MPTable, version %d.%d.%d\n", VMAJOR, VMINOR, VDELTA );
|
printf( "MPTable, version %d.%d.%d\n", VMAJOR, VMINOR, VDELTA );
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "d:g:h:v:")) != EOF) {
|
while ((ch = getopt(argc, argv, "d:g:h:v:")) != -1) {
|
||||||
switch(ch) {
|
switch(ch) {
|
||||||
case 'd':
|
case 'd':
|
||||||
if ( strcmp( optarg, "mesg") == 0 )
|
if ( strcmp( optarg, "mesg") == 0 )
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: ypupdated_main.c,v 1.2 1997/10/13 11:21:01 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "ypupdate_prot.h"
|
#include "ypupdate_prot.h"
|
||||||
@ -197,7 +197,7 @@ main(argc, argv)
|
|||||||
int asize = sizeof (saddr);
|
int asize = sizeof (saddr);
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "p:h")) != EOF) {
|
while ((ch = getopt(argc, argv, "p:h")) != -1) {
|
||||||
switch(ch) {
|
switch(ch) {
|
||||||
case 'p':
|
case 'p':
|
||||||
yp_dir = optarg;
|
yp_dir = optarg;
|
||||||
|
Loading…
Reference in New Issue
Block a user