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/props.c between version 1.9 and 1.10

version 1.9, 2001/12/10 21:01:48 version 1.10, 2001/12/16 20:44:37
Line 3 
Line 3 
 #include "str/strdyn.h"  #include "str/strdyn.h"
 #include "cfg.h"  #include "cfg.h"
   
   /*
    * Functions for context flags manipulation.
    */
   
 void cfg_set_context_flag(const CFG_CONTEXT con, int flag)  void cfg_set_context_flag(const CFG_CONTEXT con, int flag)
 {  {
         con->flags |= flag;          con->flags |= flag;
Line 18  int cfg_get_context_flag(const CFG_CONTE
Line 22  int cfg_get_context_flag(const CFG_CONTE
         return con->flags & flag;          return con->flags & flag;
 }  }
   
   
 void cfg_set_context_flags(const CFG_CONTEXT con, int flags)  void cfg_set_context_flags(const CFG_CONTEXT con, int flags)
 {  {
         con->flags = flags;          con->flags = flags;
Line 30  int cfg_get_context_flags(const CFG_CONT
Line 35  int cfg_get_context_flags(const CFG_CONT
         return con->flags;          return con->flags;
 }  }
   
   /*
    * Functions for multi values separator manipulation.
    */
   
   void cfg_clear_multi_vals_separator(const CFG_CONTEXT con)
   {
           cfg_clear_cmdline_multi_vals_separator(con);
           cfg_clear_cfgfile_multi_vals_separator(con);
   }
   
   int cfg_add_multi_vals_separator(const CFG_CONTEXT con, char *str)
   {
           return cfg_add_cmdline_multi_vals_separator(con, str)
                   && cfg_add_cfgfile_multi_vals_separator(con, str);
   }
   
   int cfg_remove_multi_vals_separator(const CFG_CONTEXT con, char *str)
   {
           return cfg_remove_cmdline_multi_vals_separator(con, str)
                   && cfg_remove_cfgfile_multi_vals_separator(con, str);
   }
   
   /*
    * Functions for option argument separator manipulation.
    */
   
   void cfg_clear_option_arg_separator(const CFG_CONTEXT con)
   {
           cfg_clear_cmdline_option_arg_separator(con);
           cfg_clear_cfgfile_option_arg_separator(con);
   }
   
   int cfg_add_option_arg_separator(const CFG_CONTEXT con, char *str)
   {
           return cfg_add_cmdline_option_arg_separator(con, str)
                   && cfg_add_cfgfile_option_arg_separator(con, str);
   }
   
   int cfg_remove_option_arg_separator(const CFG_CONTEXT con, char *str)
   {
           return cfg_remove_cmdline_option_arg_separator(con, str)
                   && cfg_remove_cfgfile_option_arg_separator(con, str);
   }
   
   /*
    * Functions for quotations string manipulation.
    */
   
   void cfg_clear_quote_strings(const CFG_CONTEXT con)
   {
           __cfg_clear_strdyn_array(&con->quote_prefix);
           __cfg_clear_strdyn_array(&con->quote_postfix);
   }
   
   int cfg_add_quote_strings(const CFG_CONTEXT con, char *prefix, char *postfix)
   {
           return  __cfg_add_strdyn_array(&con->quote_prefix, prefix)
                   && __cfg_add_strdyn_array(&con->quote_postfix, postfix);
   }
   
   int cfg_remove_quote_strings(const CFG_CONTEXT con, char *prefix, char *postfix)
   {
           return __cfg_remove_strdyn_array(&con->quote_prefix, prefix)
                   && __cfg_remove_strdyn_array(&con->quote_postfix, postfix);
   }
   
   /*
    * Universal functions for various properties manipulation.
    */
   
 void __cfg_clear_strdyn_array(char ***where)  void __cfg_clear_strdyn_array(char ***where)
 {  {
         if (*where != NULL)          if (*where != NULL)

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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