Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for libcfg+/src/cmdline.c between version 1.13 and 1.14

version 1.13, 2001/12/08 18:23:52 version 1.14, 2001/12/09 15:07:37
Line 11 
Line 11 
 static int cfg_cmdline_get_next_opt(const CFG_CONTEXT con);  static int cfg_cmdline_get_next_opt(const CFG_CONTEXT con);
 static int process_currents(const CFG_CONTEXT con, int *ret_val, int *arg_used);  static int process_currents(const CFG_CONTEXT con, int *ret_val, int *arg_used);
 static void free_currents(const CFG_CONTEXT con);  static void free_currents(const CFG_CONTEXT con);
 static int set_currents(const CFG_CONTEXT con);  static int cmdline_set_currents(const CFG_CONTEXT con);
 static int search_cur_opt_idx(const CFG_CONTEXT con);  static int search_cur_opt_idx(const CFG_CONTEXT con);
 static int add_to_used_opt_idx(const CFG_CONTEXT con, int opt_idx);  static int add_to_used_opt_idx(const CFG_CONTEXT con, int opt_idx);
 static int store_multi_arg(const int type, const char **multi_arg, void ***ar);  static int store_multi_arg(const int type, const char **multi_arg, void ***ar);
Line 71  static int cfg_cmdline_get_next_opt(cons
Line 71  static int cfg_cmdline_get_next_opt(cons
                         if (! strdyn_compare(con->line_stop_str, con->argv[con->cur_idx]))                          if (! strdyn_compare(con->line_stop_str, con->argv[con->cur_idx]))
                                 return CFG_ERROR_STOP_STR_FOUND;                                  return CFG_ERROR_STOP_STR_FOUND;
   
                         /* Skip option analyze in set_currents(), count it as leftover. */                          /* Skip option analyze in cmdline_set_currents(),
                              count it as leftover. */
                         if (leftover_init) {                          if (leftover_init) {
                                 con->cur_opt_type = CFG_NONE_OPTION;                                  con->cur_opt_type = CFG_NONE_OPTION;
                                 con->cur_opt = NULL;                                  con->cur_opt = NULL;
Line 79  static int cfg_cmdline_get_next_opt(cons
Line 80  static int cfg_cmdline_get_next_opt(cons
                                         return CFG_ERROR_NOMEM;                                          return CFG_ERROR_NOMEM;
                         }                          }
                         else {                          else {
                                 if (set_currents(con) == 0)                                  if (cmdline_set_currents(con) == 0)
                                         return CFG_ERROR_NOMEM;                                          return CFG_ERROR_NOMEM;
                         }                          }
                 }                  }
Line 301  static void free_currents(const CFG_CONT
Line 302  static void free_currents(const CFG_CONT
   
   
 /*  /*
  * set_curents()   * cmdline_set_curents()
  *   *
  * Function allocate and initialize variables con->cur_opt and con->cur_arg   * Function allocate and initialize variables con->cur_opt and con->cur_arg
  * according to con->argv[con->cur_idx].   * according to con->argv[con->cur_idx].
  * Returns 1 on success, 0 on error (not enough memory).   * Returns 1 on success, 0 on error (not enough memory).
  */   */
   
 static int set_currents(const CFG_CONTEXT con)  static int cmdline_set_currents(const CFG_CONTEXT con)
 {  {
         register int i, size;          register int i, size;
         register char *s, *s_sep, *s_tmp;          register char *s, *s_sep, *s_tmp;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top