Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 25. október 2026

Rozdiely pre libcfg+/src/cfg+.c medzi verziami 1.2 a 1.3

verzia 1.2, 2001/10/04 11:55:04 verzia 1.3, 2001/10/10 19:23:13
Riadok 31  CFG_CONTEXT cfg_get_cmdline_context(
Riadok 31  CFG_CONTEXT cfg_get_cmdline_context(
         if (con == NULL)          if (con == NULL)
                 return NULL;                  return NULL;
   
         con->argc = argc;          cfg_set_cmdline_context(con, argc, argv);
         con->argv = argv;  
   
         return con;          return con;
 }  }
   
 CFG_CONTEXT cfg_get_cfgfile_context(  CFG_CONTEXT cfg_get_cfgfile_context(
                                                 const long begin_pos,                                                  const int begin_pos,
                                                 const long end_pos,                                                  const int end_pos,
                                                 const char *filename,                                                  const char *filename,
                                                 const struct cfg_option *options                                                  const struct cfg_option *options
                                                 )                                                  )
Riadok 50  CFG_CONTEXT cfg_get_cfgfile_context(
Riadok 49  CFG_CONTEXT cfg_get_cfgfile_context(
         if (con == NULL)          if (con == NULL)
                 return NULL;                  return NULL;
   
         con->begin_pos = begin_pos;          cfg_set_cfgfile_context(con, begin_pos, end_pos, filename);
         con->end_pos = end_pos;  
         con->filename = filename;  
   
         return con;          return con;
 }  }
   
   void cfg_set_cmdline_context(
                                                   const CFG_CONTEXT con,
                                                   const int argc,
                                                   const char **argv
                                                   )
   {
           con->type = CFG_CMDLINE;
   
           con->argc = argc;
           con->argv = argv;
   }
   
   void cfg_set_cfgfile_context(
                                                   const CFG_CONTEXT con,
                                                   const int begin_pos,
                                                   const int end_pos,
                                                   const char *filename
                                                   )
   {
           con->type = CFG_CFGFILE;
   
           con->begin_pos = begin_pos;
           con->end_pos = end_pos;
           con->filename = (char *) filename;
   }
   
 void cfg_free_context(  void cfg_free_context(
                                                 const CFG_CONTEXT con                                                  const CFG_CONTEXT con
                                          )                                           )
Riadok 65  void cfg_free_context(
Riadok 88  void cfg_free_context(
         free((void *) con);          free((void *) con);
 }  }
   
 #if defined(SELFTEST)  #if defined(SELF) || defined(SELFTEST) || defined(SELF_CFG)
   
 int main(void) {  int main(void) {
   
         int nice;          int nice;
   
         struct cfg_option options[2] = {          struct cfg_option options[] = {
                 { "nice", 'n', "nice", CFG_INT, (void *) &nice, 0 },                  { "nice", 'n', "nice", CFG_INT, (void *) &nice, 0 },
                 CFG_END_OF_LIST                  CFG_END_OF_LIST
         };          };

Legend:
Odstranené z verzie1.2  
zmenené riadky
  Pridané vo verzii1.3

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok