[BACK]Return to arguments.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/arguments.c between version 1.35 and 1.36

version 1.35, 2020/06/12 07:10:43 version 1.36, 2021/08/20 17:53:54
Line 64 
Line 64 
         return (RB_FIND(args_tree, &args->tree, &entry));          return (RB_FIND(args_tree, &args->tree, &entry));
 }  }
   
   /* Create an empty arguments set. */
   struct args *
   args_create(void)
   {
           struct args      *args;
   
           args = xcalloc(1, sizeof *args);
           RB_INIT(&args->tree);
           return (args);
   }
   
 /* Parse an argv and argc into a new argument set. */  /* Parse an argv and argc into a new argument set. */
 struct args *  struct args *
 args_parse(const char *template, int argc, char **argv)  args_parse(const char *template, int argc, char **argv)
Line 71 
Line 82 
         struct args     *args;          struct args     *args;
         int              opt;          int              opt;
   
         args = xcalloc(1, sizeof *args);  
   
         optreset = 1;          optreset = 1;
         optind = 1;          optind = 1;
         optarg = NULL;          optarg = NULL;
   
           args = args_create();
         while ((opt = getopt(argc, argv, template)) != -1) {          while ((opt = getopt(argc, argv, template)) != -1) {
                 if (opt < 0)                  if (opt < 0)
                         continue;                          continue;

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36