ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/getopt.c
(Generate patch)

Comparing:
ircd-hybrid/src/getopt.c (file contents), Revision 33 by knight, Sun Oct 2 20:50:00 2005 UTC vs.
ircd-hybrid-7.2/src/getopt.c (file contents), Revision 755 by michael, Thu Aug 17 14:49:17 2006 UTC

# Line 68 | Line 68 | parseargs(int *argc, char ***argv, struc
68                  {
69                  case YESNO:
70                    *((int *)opts[i].argloc) = 1;
71 +            (*argc)--;
72 +            (*argv)++;
73                    break;
74                  case INTEGER:
75                    if (*argc < 2)
# Line 78 | Line 80 | parseargs(int *argc, char ***argv, struc
80                      }
81                    
82                    *((int *)opts[i].argloc) = atoi((*argv)[1]);
83 +            (*argc)--;
84 +            (*argv)++;
85                    break;
86                  case STRING:
87                    if (*argc < 2)
# Line 89 | Line 93 | parseargs(int *argc, char ***argv, struc
93                    
94                    *((char**)opts[i].argloc) = malloc(strlen((*argv)[1]) + 1);
95                    strcpy(*((char**)opts[i].argloc), (*argv)[1]);
96 +            (*argc)--;
97 +            (*argv)++;
98                    break;
99  
100                  case USAGE:

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)