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

Diff for libcfg+/src/cfg+.c between version 1.22 and 1.23

version 1.22, 2002/02/18 21:34:56 version 1.23, 2002/02/25 18:45:56
Line 38  static char *default_multi_line_postfix[
Line 38  static char *default_multi_line_postfix[
 static char *default_quote_prefix[3] = { "\"", "'", NULL };  static char *default_quote_prefix[3] = { "\"", "'", NULL };
 static char *default_quote_postfix[3] = { "\"", "'", NULL };  static char *default_quote_postfix[3] = { "\"", "'", NULL };
   
 CFG_CONTEXT cfg_get_context(struct cfg_option *options)          CFG_CONTEXT
   cfg_get_context(options)
           struct cfg_option *options;
 {  {
         CFG_CONTEXT con;          CFG_CONTEXT con;
   
Line 87  CFG_CONTEXT cfg_get_context(struct cfg_o
Line 89  CFG_CONTEXT cfg_get_context(struct cfg_o
         return con;          return con;
 }  }
   
 CFG_CONTEXT cfg_get_cmdline_context(          CFG_CONTEXT
                 int argc,  cfg_get_cmdline_context(argc, argv, options)
                 char **argv,          int               argc;
                 struct cfg_option *options          char              **argv;
                 )          struct cfg_option *options;
 {  {
         CFG_CONTEXT con;          CFG_CONTEXT con;
   
Line 104  CFG_CONTEXT cfg_get_cmdline_context(
Line 106  CFG_CONTEXT cfg_get_cmdline_context(
         return con;          return con;
 }  }
   
 CFG_CONTEXT cfg_get_cfgfile_context(          CFG_CONTEXT
                 long begin_pos,  cfg_get_cfgfile_context(begin_pos, end_pos, filename, options)
                 long end_pos,          long              begin_pos;
                 char *filename,          long              end_pos;
                 struct cfg_option *options          char              *filename;
                 )          struct cfg_option *options;
 {  {
         CFG_CONTEXT con;          CFG_CONTEXT con;
   
Line 122  CFG_CONTEXT cfg_get_cfgfile_context(
Line 124  CFG_CONTEXT cfg_get_cfgfile_context(
         return con;          return con;
 }  }
   
 void cfg_set_cmdline_context(          void
                 const CFG_CONTEXT con,  cfg_set_cmdline_context(con, argc, argv)
                 int argc,          const CFG_CONTEXT con;
                 char **argv          int               argc;
                 )          char              **argv;
 {  {
         cfg_reset_context(con);          cfg_reset_context(con);
   
Line 139  void cfg_set_cmdline_context(
Line 141  void cfg_set_cmdline_context(
         con->cur_idx = 0;          con->cur_idx = 0;
 }  }
   
 void cfg_set_cfgfile_context(          void
                 const CFG_CONTEXT con,  cfg_set_cfgfile_context(con, begin_pos, end_pos, filename)
                 long begin_pos,          const CFG_CONTEXT con;
                 long end_pos,          long              begin_pos;
                 char *filename          long              end_pos;
                 )          char              *filename;
 {  {
         cfg_reset_context(con);          cfg_reset_context(con);
   
Line 165  void cfg_set_cfgfile_context(
Line 167  void cfg_set_cfgfile_context(
         con->fhandle = NULL;          con->fhandle = NULL;
 }  }
   
 void cfg_reset_context(const CFG_CONTEXT con)          void
   cfg_reset_context(con)
           const CFG_CONTEXT con;
 {  {
         con->cur_idx = 0;          con->cur_idx = 0;
         con->cur_idx_tmp = 0;          con->cur_idx_tmp = 0;
Line 185  void cfg_reset_context(const CFG_CONTEXT
Line 189  void cfg_reset_context(const CFG_CONTEXT
            */             */
 }  }
   
 void cfg_free_context(const CFG_CONTEXT con)          void
   cfg_free_context(con)
           const CFG_CONTEXT con;
 {  {
         cfg_reset_context(con);          cfg_reset_context(con);
   
Line 216  void cfg_free_context(const CFG_CONTEXT
Line 222  void cfg_free_context(const CFG_CONTEXT
 #if defined(SELF) || defined(SELFTEST) || defined(SELF_CFG)  #if defined(SELF) || defined(SELFTEST) || defined(SELF_CFG)
   
   
 void ar_print(char *name, char *format, void **vals)          void
   ar_print(name, format, vals)
           char *name;
           char *format;
           void **vals;
 {  {
         if (vals != NULL) {          if (vals != NULL) {
                 if (strcmp(format, "%s")) {                  if (strcmp(format, "%s")) {
Line 249  void ar_print(char *name, char *format,
Line 259  void ar_print(char *name, char *format,
                 printf("%s uninitialized\n", name);                  printf("%s uninitialized\n", name);
 }  }
   
 int main(int argc, char **argv)          int
   main(argc, argv)
           int  argc;
           char **argv;
 {  {
   
         CFG_CONTEXT con;          CFG_CONTEXT con;

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

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