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

Rozdiely pre libcfg+/src/shared.c medzi verziami 1.22 a 1.23

verzia 1.22, 2002/08/16 20:31:43 verzia 1.23, 2002/08/27 13:19:18
Riadok 85  static int unquote_single_arg(
Riadok 85  static int unquote_single_arg(
 /* }}} */  /* }}} */
   
 /*  /*
  * EXTERN FUNCTIONS   * EXTERN PLATON_FUNCS
  */   */
   
         void          void
Riadok 212  __cfg_process_currents(con, ret_val, arg
Riadok 212  __cfg_process_currents(con, ret_val, arg
                                                         quote_prefix_ar, quote_postfix_ar, separator_ar);                                                          quote_prefix_ar, quote_postfix_ar, separator_ar);
   
                                         if (ret != CFG_OK) {                                          if (ret != CFG_OK) {
                                                 FUNCTION(strdyn_safe_free)(add);                                                  PLATON_FUNC(strdyn_safe_free)(add);
                                                 return ret;                                                  return ret;
                                         }                                          }
                                 }                                  }
Riadok 226  __cfg_process_currents(con, ret_val, arg
Riadok 226  __cfg_process_currents(con, ret_val, arg
                                                 con->options[opt_idx].value);                                                  con->options[opt_idx].value);
   
                                 if (add != static_add)                                  if (add != static_add)
                                         FUNCTION(strdyn_free)((char **) add);                                          PLATON_FUNC(strdyn_free)((char **) add);
                         }                          }
                         else {                          else {
                                 ret = unquote_single_arg(con->cur_arg,                                  ret = unquote_single_arg(con->cur_arg,
Riadok 265  __cfg_process_currents(con, ret_val, arg
Riadok 265  __cfg_process_currents(con, ret_val, arg
                                                                 separator_ar);                                                                  separator_ar);
   
                                                 if (ret != CFG_OK) {                                                  if (ret != CFG_OK) {
                                                         FUNCTION(strdyn_safe_free)(ar);                                                          PLATON_FUNC(strdyn_safe_free)(ar);
                                                         return ret;                                                          return ret;
                                                 }                                                  }
   
                                                 if ((*p = FUNCTION(strdyn_add_ar)(*p, ar)) == NULL)                                                  if ((*p = PLATON_FUNC(strdyn_add_ar)(*p, ar)) == NULL)
                                                         return CFG_ERROR_NOMEM;                                                          return CFG_ERROR_NOMEM;
   
                                                 FUNCTION(strdyn_free)(ar);                                                  PLATON_FUNC(strdyn_free)(ar);
                                         }                                          }
                                         else {                                          else {
                                                 ret = unquote_single_arg(con->cur_arg,                                                  ret = unquote_single_arg(con->cur_arg,
Riadok 281  __cfg_process_currents(con, ret_val, arg
Riadok 281  __cfg_process_currents(con, ret_val, arg
                                                 if (ret != CFG_OK)                                                  if (ret != CFG_OK)
                                                         return ret;                                                          return ret;
   
                                                 if ((*p = FUNCTION(strdyn_add)(*p, con->cur_arg)) == NULL)                                                  if ((*p = PLATON_FUNC(strdyn_add)(*p, con->cur_arg)) == NULL)
                                                         return CFG_ERROR_NOMEM;                                                          return CFG_ERROR_NOMEM;
                                         }                                          }
                                 }                                  }
Riadok 446  __cfg_cfgfile_set_currents(con, buf)
Riadok 446  __cfg_cfgfile_set_currents(con, buf)
                 if ((con->cur_arg = strdup(s_sep + size)) == NULL)                  if ((con->cur_arg = strdup(s_sep + size)) == NULL)
                         return 0;                          return 0;
   
                 FUNCTION(str_right_trim)(con->cur_opt);                  PLATON_FUNC(str_right_trim)(con->cur_opt);
                 FUNCTION(str_left_trim)(con->cur_arg);                  PLATON_FUNC(str_left_trim)(con->cur_arg);
         }          }
   
         return 1;          return 1;
 } /* }}} */  } /* }}} */
   
 /*  /*
  * STATIC FUNCTIONS   * STATIC PLATON_FUNCS
  */   */
   
 /*  /*
Riadok 496  search_cur_opt_idx(con)
Riadok 496  search_cur_opt_idx(con)
   
                         if (con->cur_opt != NULL                          if (con->cur_opt != NULL
                                         && con->options[i].cfgfile_name != NULL                                          && con->options[i].cfgfile_name != NULL
                                         && con->cur_opt == FUNCTION(str_white_str)(con->cur_opt,                                          && con->cur_opt == PLATON_FUNC(str_white_str)(con->cur_opt,
                                                 (char *)(con->options[i].cfgfile_name), &len)                                                  (char *)(con->options[i].cfgfile_name), &len)
                                         && len == strlen(con->cur_opt))                                          && len == strlen(con->cur_opt))
   
Riadok 806  split_multi_arg(arg, ar, quote_prefix_ar
Riadok 806  split_multi_arg(arg, ar, quote_prefix_ar
         char *p_quote, *p_sep, *tmp_s;          char *p_quote, *p_sep, *tmp_s;
         char *arg_base = arg;          char *arg_base = arg;
   
         if ((*ar = FUNCTION(strdyn_create)()) == NULL)          if ((*ar = PLATON_FUNC(strdyn_create)()) == NULL)
                 return CFG_ERROR_NOMEM;                  return CFG_ERROR_NOMEM;
   
         do {          do {
   
                 /* Searching first quotation string (p_quote)                  /* Searching first quotation string (p_quote)
                    and set quotation variables */                     and set quotation variables */
                 p_quote    = FUNCTION(strdyn_str2)(arg, quote_prefix_ar, &quote_idx);                  p_quote    = PLATON_FUNC(strdyn_str2)(arg, quote_prefix_ar, &quote_idx);
                 p_sep      = NULL; /* pointer to separator */                  p_sep      = NULL; /* pointer to separator */
                 sep_ar_idx = -1;   /* index of separator */                  sep_ar_idx = -1;   /* index of separator */
                 sep_size   =  0;   /* length of separator string */                  sep_size   =  0;   /* length of separator string */
   
                 /* Searching first separator string (p_sep) */                  /* Searching first separator string (p_sep) */
                 for (i = 0; separator_ar[i] != NULL; i++) {                  for (i = 0; separator_ar[i] != NULL; i++) {
                         if ((tmp_s = FUNCTION(str_white_str)(arg, separator_ar[i], &tmp_sep_size))                          if ((tmp_s = PLATON_FUNC(str_white_str)(arg, separator_ar[i], &tmp_sep_size))
                                         != NULL && (p_sep == NULL || tmp_s < p_sep)) {                                          != NULL && (p_sep == NULL || tmp_s < p_sep)) {
                                 p_sep      = tmp_s;                                  p_sep      = tmp_s;
                                 sep_ar_idx = i;                                  sep_ar_idx = i;
Riadok 837  split_multi_arg(arg, ar, quote_prefix_ar
Riadok 837  split_multi_arg(arg, ar, quote_prefix_ar
                         register int prefix_len, postfix_len;                          register int prefix_len, postfix_len;
   
                         if (quote_idx < 0 /* not optimized */                          if (quote_idx < 0 /* not optimized */
                                         || quote_idx > FUNCTION(strdyn_get_size)(quote_prefix_ar) - 1                                          || quote_idx > PLATON_FUNC(strdyn_get_size)(quote_prefix_ar) - 1
                                         || quote_idx > FUNCTION(strdyn_get_size)(quote_postfix_ar) - 1                                          || quote_idx > PLATON_FUNC(strdyn_get_size)(quote_postfix_ar) - 1
                                         || (prefix  = quote_prefix_ar[quote_idx]) == NULL                                          || (prefix  = quote_prefix_ar[quote_idx]) == NULL
                                         || (postfix = quote_postfix_ar[quote_idx]) == NULL)                                          || (postfix = quote_postfix_ar[quote_idx]) == NULL)
                                 return CFG_ERROR_INTERNAL;                                  return CFG_ERROR_INTERNAL;
Riadok 867  split_multi_arg(arg, ar, quote_prefix_ar
Riadok 867  split_multi_arg(arg, ar, quote_prefix_ar
   
                         c      = *p_sep;                          c      = *p_sep;
                         *p_sep = '\0';                          *p_sep = '\0';
                         *ar    = FUNCTION(strdyn_add_va)(*ar, arg_base, NULL);                          *ar    = PLATON_FUNC(strdyn_add_va)(*ar, arg_base, NULL);
                         *p_sep = c;                          *p_sep = c;
                         arg    = arg_base = p_sep + sep_size;                          arg    = arg_base = p_sep + sep_size;
   
Riadok 877  split_multi_arg(arg, ar, quote_prefix_ar
Riadok 877  split_multi_arg(arg, ar, quote_prefix_ar
   
         } while (p_quote != NULL || p_sep != NULL);          } while (p_quote != NULL || p_sep != NULL);
   
         if ((*ar = FUNCTION(strdyn_add_va)(*ar, arg_base, NULL)) == NULL)          if ((*ar = PLATON_FUNC(strdyn_add_va)(*ar, arg_base, NULL)) == NULL)
                 return CFG_ERROR_NOMEM;                  return CFG_ERROR_NOMEM;
   
         return CFG_OK;          return CFG_OK;
Riadok 900  unquote_single_arg(arg, quote_prefix_ar,
Riadok 900  unquote_single_arg(arg, quote_prefix_ar,
         int quote_idx;          int quote_idx;
   
         do {          do {
                 p_quote = FUNCTION(strdyn_str2)(arg, quote_prefix_ar, &quote_idx);                  p_quote = PLATON_FUNC(strdyn_str2)(arg, quote_prefix_ar, &quote_idx);
   
                 /* If beginning of quotation was found */                  /* If beginning of quotation was found */
                 if (p_quote != NULL) {                  if (p_quote != NULL) {
Riadok 908  unquote_single_arg(arg, quote_prefix_ar,
Riadok 908  unquote_single_arg(arg, quote_prefix_ar,
                         register int prefix_len, postfix_len;                          register int prefix_len, postfix_len;
   
                         if (quote_idx < 0 /* not optimized */                          if (quote_idx < 0 /* not optimized */
                                         || quote_idx > FUNCTION(strdyn_get_size)(quote_prefix_ar) - 1                                          || quote_idx > PLATON_FUNC(strdyn_get_size)(quote_prefix_ar) - 1
                                         || quote_idx > FUNCTION(strdyn_get_size)(quote_postfix_ar) - 1                                          || quote_idx > PLATON_FUNC(strdyn_get_size)(quote_postfix_ar) - 1
                                         || (prefix  = quote_prefix_ar[quote_idx]) == NULL                                          || (prefix  = quote_prefix_ar[quote_idx]) == NULL
                                         || (postfix = quote_postfix_ar[quote_idx]) == NULL)                                          || (postfix = quote_postfix_ar[quote_idx]) == NULL)
                                 return CFG_ERROR_INTERNAL;                                  return CFG_ERROR_INTERNAL;

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

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