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/cfg+.c between version 1.44 and 1.45

version 1.44, 2002/07/15 16:17:02 version 1.45, 2002/07/15 16:43:12
Line 79  cfg_get_context(options)
Line 79  cfg_get_context(options)
 } /* }}} */  } /* }}} */
   
         CFG_CONTEXT          CFG_CONTEXT
 cfg_get_cmdline_context(argc, argv, options)  cfg_get_cmdline_context(begin_pos, end_pos, argv, options)
         long              argc;          long              begin_pos;
           long              end_pos;
         char              **argv;          char              **argv;
         struct cfg_option *options;          struct cfg_option *options;
 { /* {{{ */  { /* {{{ */
Line 90  cfg_get_cmdline_context(argc, argv, opti
Line 91  cfg_get_cmdline_context(argc, argv, opti
         if (con == NULL)          if (con == NULL)
                 return NULL;                  return NULL;
   
         cfg_set_cmdline_context(con, argc, argv);          cfg_set_cmdline_context(con, begin_pos, end_pos, argv);
   
         return con;          return con;
 } /* }}} */  } /* }}} */
Line 114  cfg_get_cfgfile_context(begin_pos, end_p
Line 115  cfg_get_cfgfile_context(begin_pos, end_p
 } /* }}} */  } /* }}} */
   
         void          void
 cfg_set_cmdline_context(con, argc, argv)  cfg_set_cmdline_context(con, begin_pos, end_pos, argv)
         const CFG_CONTEXT con;          const CFG_CONTEXT con;
         long              argc;          long              begin_pos;
           long              end_pos;
         char              **argv;          char              **argv;
 { /* {{{ */  { /* {{{ */
         cfg_reset_context(con);          cfg_reset_context(con);
   
         con->type = CFG_CMDLINE;          con->type      = CFG_CMDLINE;
         /* con->argc = argc; */          con->begin_pos = begin_pos;
         con->begin_pos = argc;          con->end_pos   = end_pos;
         con->argv = argv;          con->argv      = argv;
   
         con->cur_idx_tmp = con->flags & CFG_PROCESS_FIRST ? 0 : 1;          /* TODO: init also by con->begin_pos property */
         con->cur_idx = 0;          con->cur_idx      = 0;
           con->cur_idx_tmp  = 0;
           con->cur_idx_tmp += con->flags & CFG_PROCESS_FIRST ? 0 : 1;
           con->cur_idx_tmp += con->begin_pos;
 } /* }}} */  } /* }}} */
   
         void          void
Line 139  cfg_set_cfgfile_context(con, begin_pos,
Line 144  cfg_set_cfgfile_context(con, begin_pos,
 { /* {{{ */  { /* {{{ */
         cfg_reset_context(con);          cfg_reset_context(con);
   
         if (filename == NULL) {          /*
                 if (begin_pos > 0 && con->fhandle != NULL)             if (filename == NULL) {
                         fseek(con->fhandle, begin_pos, SEEK_SET);             if (begin_pos > 0 && con->fhandle != NULL)
         }             fseek(con->fhandle, begin_pos, SEEK_SET);
              }
              */
   
         con->type      = CFG_CFGFILE;          con->type      = CFG_CFGFILE;
         con->begin_pos = begin_pos;          con->begin_pos = begin_pos;

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

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