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/props.c between version 1.12 and 1.13

version 1.12, 2002/02/18 21:34:56 version 1.13, 2002/02/25 18:45:56
Line 24 
Line 24 
  * Functions for context flags manipulation.   * Functions for context flags manipulation.
  */   */
   
 void cfg_set_context_flag(const CFG_CONTEXT con, int flag)          void
   cfg_set_context_flag(con, flag)
           const CFG_CONTEXT con;
           int               flag;
 {  {
         con->flags |= flag;          con->flags |= flag;
 }  }
   
 void cfg_clear_context_flag(const CFG_CONTEXT con, int flag)          void
   cfg_clear_context_flag(con, flag)
           const CFG_CONTEXT con;
           int               flag;
 {  {
         con->flags &= ~flag;          con->flags &= ~flag;
 }  }
   
 int cfg_get_context_flag(const CFG_CONTEXT con, int flag)          int
   cfg_get_context_flag(con, flag)
           const CFG_CONTEXT con;
           int               flag;
 {  {
         return con->flags & flag;          return con->flags & flag;
 }  }
   
   
 void cfg_set_context_flags(const CFG_CONTEXT con, int flags)          void
   cfg_set_context_flags(con, flags)
           const CFG_CONTEXT con;
           int               flags;
 {  {
         con->flags = flags;          con->flags = flags;
   
         con->cur_idx_tmp = con->flags & CFG_PROCESS_FIRST ? 0 : 1;          con->cur_idx_tmp = con->flags & CFG_PROCESS_FIRST ? 0 : 1;
 }  }
   
 int cfg_get_context_flags(const CFG_CONTEXT con, int flags)          int
   cfg_get_context_flags(con, flags)
           const CFG_CONTEXT con;
           int               flags;
 {  {
         return con->flags;          return con->flags;
 }  }
Line 56  int cfg_get_context_flags(const CFG_CONT
Line 71  int cfg_get_context_flags(const CFG_CONT
  * Functions for multi values separator manipulation.   * Functions for multi values separator manipulation.
  */   */
   
 void cfg_clear_multi_vals_separator(const CFG_CONTEXT con)          void
   cfg_clear_multi_vals_separator(con)
           const CFG_CONTEXT con;
 {  {
         cfg_clear_cmdline_multi_vals_separator(con);          cfg_clear_cmdline_multi_vals_separator(con);
         cfg_clear_cfgfile_multi_vals_separator(con);          cfg_clear_cfgfile_multi_vals_separator(con);
 }  }
   
 int cfg_add_multi_vals_separator(const CFG_CONTEXT con, char *str)          int
   cfg_add_multi_vals_separator(con, str)
           const CFG_CONTEXT con;
           char              *str;
 {  {
         return cfg_add_cmdline_multi_vals_separator(con, str)          return cfg_add_cmdline_multi_vals_separator(con, str)
                 && cfg_add_cfgfile_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)          int
   cfg_remove_multi_vals_separator(con, str)
           const CFG_CONTEXT con;
           char              *str;
 {  {
         return cfg_remove_cmdline_multi_vals_separator(con, str)          return cfg_remove_cmdline_multi_vals_separator(con, str)
                 && cfg_remove_cfgfile_multi_vals_separator(con, str);                  && cfg_remove_cfgfile_multi_vals_separator(con, str);
Line 78  int cfg_remove_multi_vals_separator(cons
Line 101  int cfg_remove_multi_vals_separator(cons
  * Functions for option argument separator manipulation.   * Functions for option argument separator manipulation.
  */   */
   
 void cfg_clear_option_arg_separator(const CFG_CONTEXT con)          void
   cfg_clear_option_arg_separator(con)
           const CFG_CONTEXT con;
 {  {
         cfg_clear_cmdline_option_arg_separator(con);          cfg_clear_cmdline_option_arg_separator(con);
         cfg_clear_cfgfile_option_arg_separator(con);          cfg_clear_cfgfile_option_arg_separator(con);
 }  }
   
 int cfg_add_option_arg_separator(const CFG_CONTEXT con, char *str)          int
   cfg_add_option_arg_separator(con, str)
           const CFG_CONTEXT con;
           char              *str;
 {  {
         return cfg_add_cmdline_option_arg_separator(con, str)          return cfg_add_cmdline_option_arg_separator(con, str)
                 && cfg_add_cfgfile_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)          int
   cfg_remove_option_arg_separator(con, str)
           const CFG_CONTEXT con;
           char              *str;
 {  {
         return cfg_remove_cmdline_option_arg_separator(con, str)          return cfg_remove_cmdline_option_arg_separator(con, str)
                 && cfg_remove_cfgfile_option_arg_separator(con, str);                  && cfg_remove_cfgfile_option_arg_separator(con, str);
Line 100  int cfg_remove_option_arg_separator(cons
Line 131  int cfg_remove_option_arg_separator(cons
  * Functions for quotations string manipulation.   * Functions for quotations string manipulation.
  */   */
   
 void cfg_clear_quote_strings(const CFG_CONTEXT con)          void
   cfg_clear_quote_strings(con)
           const CFG_CONTEXT con;
 {  {
         __cfg_clear_strdyn_array(&con->quote_prefix);          __cfg_clear_strdyn_array(&con->quote_prefix);
         __cfg_clear_strdyn_array(&con->quote_postfix);          __cfg_clear_strdyn_array(&con->quote_postfix);
 }  }
   
 int cfg_add_quote_strings(const CFG_CONTEXT con, char *prefix, char *postfix)          int
   cfg_add_quote_strings(con, prefix, postfix)
           const CFG_CONTEXT con;
           char              *prefix;
           char              *postfix;
 {  {
         return __cfg_add_strdyn_array(&con->quote_prefix, prefix)          return __cfg_add_strdyn_array(&con->quote_prefix, prefix)
                 && __cfg_add_strdyn_array(&con->quote_postfix, postfix);                  && __cfg_add_strdyn_array(&con->quote_postfix, postfix);
 }  }
   
 int cfg_remove_quote_strings(const CFG_CONTEXT con, char *prefix, char *postfix)          int
   cfg_remove_quote_strings(con, prefix, postfix)
           const CFG_CONTEXT con;
           char              *prefix;
           char              *postfix;
 {  {
         return __cfg_remove_strdyn_array(&con->quote_prefix, prefix)          return __cfg_remove_strdyn_array(&con->quote_prefix, prefix)
                 && __cfg_remove_strdyn_array(&con->quote_postfix, postfix);                  && __cfg_remove_strdyn_array(&con->quote_postfix, postfix);
Line 122  int cfg_remove_quote_strings(const CFG_C
Line 163  int cfg_remove_quote_strings(const CFG_C
  * Universal functions for various properties manipulation.   * Universal functions for various properties manipulation.
  */   */
   
 void __cfg_clear_strdyn_array(char ***where)          void
   __cfg_clear_strdyn_array(where)
           char ***where;
 {  {
         if (*where != NULL)          if (*where != NULL)
                 strdyn_free(*where);                  strdyn_free(*where);
Line 130  void __cfg_clear_strdyn_array(char ***wh
Line 173  void __cfg_clear_strdyn_array(char ***wh
         *where = NULL;          *where = NULL;
 }  }
   
 int __cfg_add_strdyn_array(char ***where, char *str)          int
   __cfg_add_strdyn_array(where, str)
           char ***where;
           char *str;
 {  {
         if (*where == NULL)          if (*where == NULL)
                 *where = strdyn_create();                  *where = strdyn_create();
Line 140  int __cfg_add_strdyn_array(char ***where
Line 186  int __cfg_add_strdyn_array(char ***where
         return *where == NULL ? 0 : 1;          return *where == NULL ? 0 : 1;
 }  }
   
 int __cfg_remove_strdyn_array(char ***where, char *str)          int
   __cfg_remove_strdyn_array(where, str)
           char ***where;
           char *str;
 {  {
         if (*where != NULL)          if (*where != NULL)
                 *where = strdyn_remove_str_all(*where, str);                  *where = strdyn_remove_str_all(*where, str);

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

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