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.23 and 1.24

version 1.23, 2002/08/03 20:03:21 version 1.24, 2002/08/05 19:23:20
Line 5 
Line 5 
  * ____________________________________________________________   * ____________________________________________________________
  *   *
  * Developed by Ondrej Jombik <nepto@pobox.sk>   * Developed by Ondrej Jombik <nepto@pobox.sk>
 *          and Lubomir Host <rajo@host.sk>   *          and Lubomir Host <rajo@host.sk>
  * Copyright (c) 2001-2002 Platon SDG, http://www.platon.sk/   * Copyright (c) 2001-2002 Platon SDG, http://www.platon.sk/
  * All rights reserved.   * All rights reserved.
  *   *
Line 46  char *cfg_default_properties[CFG_N_PROPS
Line 46  char *cfg_default_properties[CFG_N_PROPS
         /* CFG_FILE_LEFTOVER_MULTI_VALS_SEPARATOR */    { " ",  NULL, NULL, NULL },          /* CFG_FILE_LEFTOVER_MULTI_VALS_SEPARATOR */    { " ",  NULL, NULL, NULL },
         /* CFG_FILE_QUOTE_PREFIX */                                             { "\"", "'",  NULL, NULL },          /* CFG_FILE_QUOTE_PREFIX */                                             { "\"", "'",  NULL, NULL },
         /* CFG_FILE_QUOTE_POSTFIX */                                    { "\"", "'",  NULL, NULL },          /* CFG_FILE_QUOTE_POSTFIX */                                    { "\"", "'",  NULL, NULL },
         }; /* }}} */  }; /* }}} */
   
 /*  /*
  * Static functions for strdyn manipulation   * Static functions for strdyn manipulation
Line 223  cfg_clear_property(con, type)
Line 223  cfg_clear_property(con, type)
 } /* }}} */  } /* }}} */
   
         int          int
   cfg_clear_properties(
           const CFG_CONTEXT con,
           enum cfg_property_type type, ...)
   { /* {{{ */
           va_list ap;
           enum cfg_property_type tmp_type;
           int ret = 1;
   
           /* initialization */
           tmp_type = type;
           va_start(ap, type);
   
           /* argument list must be termited with typeN = CFG_EOF */
           while (tmp_type != CFG_EOF) {
                   ret &= cfg_clear_property(con, tmp_type);
                   if (!ret)
                           break;
                   tmp_type = va_arg(ap, enum cfg_property_type);
           }
   
           /* cleanup */
           va_end(ap);
   
           return ret;
   } /* }}} */
   
           int
 cfg_add_property(con, type, str)  cfg_add_property(con, type, str)
         const CFG_CONTEXT con;          const CFG_CONTEXT con;
         enum cfg_property_type type;          enum cfg_property_type type;
Line 308  cfg_add_property(con, type, str)
Line 335  cfg_add_property(con, type, str)
   
         int          int
 cfg_add_properties(  cfg_add_properties(
                 const CFG_CONTEXT con,          const CFG_CONTEXT con,
                 enum cfg_property_type type,          enum cfg_property_type type,
                 char *str, ...)          char *str, ...)
 { /* {{{ */  { /* {{{ */
         va_list ap;          va_list ap;
         enum cfg_property_type tmp_type;          enum cfg_property_type tmp_type;
Line 341  cfg_add_properties(
Line 368  cfg_add_properties(
         return ret;          return ret;
 } /* }}} */  } /* }}} */
   
   
         int          int
 cfg_remove_property(con, type, str)  cfg_remove_property(con, type, str)
         const CFG_CONTEXT con;          const CFG_CONTEXT con;
Line 426  cfg_remove_property(con, type, str)
Line 452  cfg_remove_property(con, type, str)
         return 0; /* failure */          return 0; /* failure */
 } /* }}} */  } /* }}} */
   
           int
   cfg_remove_properties( /* code same like cfg_add_properties() */
           const CFG_CONTEXT con,
           enum cfg_property_type type,
           char *str, ...)
   { /* {{{ */
           va_list ap;
           enum cfg_property_type tmp_type;
           char * tmp_str;
           int ret = 1;
   
           /* initialization */
           tmp_type = type;
           tmp_str  = str;
           va_start(ap, str);
   
           /* argument list must be termited with typeN = CFG_EOF or
            * str = NULL
            */
           while (tmp_type != CFG_EOF && tmp_str != NULL) {
                   ret &= cfg_remove_property(con, tmp_type, tmp_str);
                   if (!ret)
                           break;
                   tmp_type = va_arg(ap, enum cfg_property_type);
                   if (tmp_type == CFG_EOF) /* if typeN == CFG_EOF, strN may be not specified! */
                           break;
                   tmp_str  = va_arg(ap, char *);
           }
   
           /* cleanup */
           va_end(ap);
   
           return ret;
   } /* }}} */
   
   
 /* Modeline for ViM {{{  /* Modeline for ViM {{{
  * vim:set ts=4:   * vim:set ts=4:
  * vim600:fdm=marker fdl=0 fdc=0:   * vim600:fdm=marker fdl=0 fdc=0:

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

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