From: Neil H. <nh...@us...> - 2009-12-14 13:52:03
|
Update of /cvsroot/cscope/cscope/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5592/src Modified Files: main.c Log Message: Fixing argv/argc adjustment in parse_options Index: main.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/main.c,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -r1.48 -r1.49 *** main.c 9 Dec 2009 20:29:34 -0000 1.48 --- main.c 14 Dec 2009 13:51:50 -0000 1.49 *************** *** 147,154 **** { int opt; ! int optind; char path[PATHLEN + 1]; /* file path */ char *s; - int args_handled = 1; int argcc = *argc; --- 147,153 ---- { int opt; ! int longind; char path[PATHLEN + 1]; /* file path */ char *s; int argcc = *argc; *************** *** 156,161 **** while ((opt = getopt_long(argcc, argv, "hVbcCdeF:f:I:i:kLl0:1:2:3:4:5:6:7:8:9:P:p:qRs:TUuv", ! lopts, &optind)) != -1) { ! args_handled++; switch(opt) { --- 155,159 ---- while ((opt = getopt_long(argcc, argv, "hVbcCdeF:f:I:i:kLl0:1:2:3:4:5:6:7:8:9:P:p:qRs:TUuv", ! lopts, &longind)) != -1) { switch(opt) { *************** *** 250,255 **** * of the main routine doesn't get all confused */ ! *argc = *argc - args_handled; ! return &argv[*argc]; } #endif --- 248,253 ---- * of the main routine doesn't get all confused */ ! *argc = *argc - optind; ! return &argv[optind]; } #endif |