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/trunk/src/getopt.c (file contents):
Revision 2916 by michael, Sat Jan 25 21:09:18 2014 UTC vs.
Revision 3250 by michael, Sun Mar 30 20:47:30 2014 UTC

# Line 50 | Line 50 | usage(const char *name, const struct lge
50   void
51   parseargs(int *argc, char ***argv, struct lgetopt *opts)
52   {
53  unsigned int i;
53    const char *progname = (*argv)[0];
54  
55 <  /* loop through each argument */
55 >  /* Loop through each argument */
56    while (1)
57    {
58      int found = 0;
# Line 66 | Line 65 | parseargs(int *argc, char ***argv, struc
65  
66      (*argv)[0]++;
67  
68 <    /* search through our argument list, and see if it matches */
69 <    for (i = 0; opts[i].opt; i++)
68 >    /* Search through our argument list, and see if it matches */
69 >    for (unsigned int i = 0; opts[i].opt; ++i)
70      {
71        if (!strcmp(opts[i].opt, (*argv)[0]))
72        {
73 <        /* found our argument */
73 >        /* Found our argument */
74          found = 1;
75  
76          switch (opts[i].argtype)

Diff Legend

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