gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r3280 - GNUnet/src/util/getopt


From: grothoff
Subject: [GNUnet-SVN] r3280 - GNUnet/src/util/getopt
Date: Sun, 20 Aug 2006 18:30:41 -0700 (PDT)

Author: grothoff
Date: 2006-08-20 18:30:40 -0700 (Sun, 20 Aug 2006)
New Revision: 3280

Modified:
   GNUnet/src/util/getopt/getopt.c
Log:
fix

Modified: GNUnet/src/util/getopt/getopt.c
===================================================================
--- GNUnet/src/util/getopt/getopt.c     2006-08-21 01:27:11 UTC (rev 3279)
+++ GNUnet/src/util/getopt/getopt.c     2006-08-21 01:30:40 UTC (rev 3280)
@@ -1024,12 +1024,12 @@
   shorts = MALLOC(count*2+1);
   spos = 0;
   for (i=0;i<count;i++) {
-    long_options[i].name = allOptions[count].name;
-    long_options[i].has_arg = allOptions[count].require_argument;
+    long_options[i].name = allOptions[i].name;
+    long_options[i].has_arg = allOptions[i].require_argument;
     long_options[i].flag = NULL;
-    long_options[i].val = allOptions[count].shortName;
-    shorts[spos++] = allOptions[count].shortName;
-    if (allOptions[count].require_argument != 0)
+    long_options[i].val = allOptions[i].shortName;
+    shorts[spos++] = allOptions[i].shortName;
+    if (allOptions[i].require_argument != 0)
       shorts[spos++] = ':';
   }
   long_options[count].name = NULL;
@@ -1037,7 +1037,7 @@
   long_options[count].flag = NULL;
   long_options[count].val = '\0';
   shorts[spos++] = '\0';
-  
+  printf("shorts: %s %d\n", shorts, count);
   cont = OK;
   /* main getopt loop */
   while (cont == OK) {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]