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

Rozdiely pre libcfg+/src/cfg+.c medzi verziami 1.21 a 1.22

verzia 1.21, 2002/02/17 15:18:45 verzia 1.22, 2002/02/18 21:34:56
Riadok 137  void cfg_set_cmdline_context(
Riadok 137  void cfg_set_cmdline_context(
   
         con->cur_idx_tmp = con->flags & CFG_PROCESS_FIRST ? 0 : 1;          con->cur_idx_tmp = con->flags & CFG_PROCESS_FIRST ? 0 : 1;
         con->cur_idx = 0;          con->cur_idx = 0;
   
         con->used_opt_idx = NULL;  
 }  }
   
 void cfg_set_cfgfile_context(  void cfg_set_cfgfile_context(
Riadok 150  void cfg_set_cfgfile_context(
Riadok 148  void cfg_set_cfgfile_context(
 {  {
         cfg_reset_context(con);          cfg_reset_context(con);
   
           if (filename == NULL) {
                   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;
         con->end_pos = end_pos;          con->end_pos = end_pos;
   
         /* TODO: filename copying? (if yes than don't forget memory freeing) */          /* TODO: filename copying? (if yes than don't forget memory freeing) */
         con->filename = (char *) filename;          if (filename != NULL)
                   con->filename = (char *) filename;
   
         con->fhandle = NULL;          con->fhandle = NULL;
 }  }
Riadok 173  void cfg_reset_context(const CFG_CONTEXT
Riadok 177  void cfg_reset_context(const CFG_CONTEXT
   
         __cfg_free_currents(con);          __cfg_free_currents(con);
   
         if (con->fhandle != NULL) {          /*
                 fclose(con->fhandle);             if (con->fhandle != NULL) {
                 con->fhandle = NULL;             fclose(con->fhandle);
         }             con->fhandle = NULL;
              }
              */
 }  }
   
 void cfg_free_context(const CFG_CONTEXT con)  void cfg_free_context(const CFG_CONTEXT con)
Riadok 219  void ar_print(char *name, char *format,
Riadok 225  void ar_print(char *name, char *format,
                         printf("%s: ", name);                          printf("%s: ", name);
                         for (i = 0; vals[i] != NULL; i++) {                          for (i = 0; vals[i] != NULL; i++) {
   
   
                                 if (! strcmp(format, "%e") || ! strcmp(format, "%f"))                                  if (! strcmp(format, "%e") || ! strcmp(format, "%f"))
                                         printf(format, *(((float **) vals)[i]));                                          printf(format, *(((float **) vals)[i]));
                                 else                                  else
Riadok 288  int main(int argc, char **argv)
Riadok 293  int main(int argc, char **argv)
   
         con = cfg_get_cmdline_context(argc, argv, options);          con = cfg_get_cmdline_context(argc, argv, options);
   
         /* Deprecated and obsolote context flags initialization. */  
         /* cfg_set_context_flags(con, con->flags + CFG_ADVANCED_LEFTOVERS); */  
   
         /* This is powerful testing stuff :)          /* This is powerful testing stuff :)
   
            printf("advanced leftovers: %d\n", cfg_get_context_flag(con, CFG_ADVANCED_LEFTOVERS));             printf("advanced leftovers: %d\n", cfg_get_context_flag(con, CFG_ADVANCED_LEFTOVERS));

Legend:
Odstranené z verzie1.21  
zmenené riadky
  Pridané vo verzii1.22

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