Author: wyoung
Date: Thu Mar 19 21:00:28 2009
New Revision: 2485

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2485&view=rev
Log:
att_getopt() stuff was broken in moving it into the library, then
checked in because we're doing development on a system that supplies
getopt, so it wasn't being compiled.  Fixed.

Modified:
    trunk/lib/cmdline.cpp

Modified: trunk/lib/cmdline.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/cmdline.cpp?rev=2485&r1=2484&r2=2485&view=diff
==============================================================================
--- trunk/lib/cmdline.cpp (original)
+++ trunk/lib/cmdline.cpp Thu Mar 19 21:00:28 2009
@@ -63,7 +63,7 @@
                                if (optind >= argc) {
                                        return EOF;
                                }
-                               if (argv[optind][0] != '-' || 
argv[ag_optind][1] == '\0') {
+                               if (argv[optind][0] != '-' || argv[optind][1] 
== '\0') {
                                        return EOF;
                                }
                        }
@@ -76,7 +76,7 @@
                        optopt = c = argv[optind][sp];
 
                        /* Check for invalid goption */
-                       if (c == ':' || (cp = strchr(gopts, c)) == 0) {
+                       if (c == ':' || (cp = strchr(opts, c)) == 0) {
                                fprintf(stderr, "%s: illegal option -- %c\n", 
argv[0], c);
                                if (argv[optind][++sp] == '\0') {
                                        optind++;
@@ -90,7 +90,7 @@
                        if (*++cp == ':') {
                                /* If so, get argument; if none provided output 
error */
                                if (argv[optind][sp + 1] != '\0') {
-                                       optarg = &argv[ag_optind++][sp + 1];
+                                       optarg = &argv[optind++][sp + 1];
                                }
                                else if (++optind >= argc) {
                                        fprintf(stderr,
@@ -99,7 +99,7 @@
                                        return '?';
                                }
                                else {
-                                       optarg = argv[ag_optind++];
+                                       optarg = argv[optind++];
                                }
                                sp = 1;
                        }


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to