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 ep/src/conf.c between version 1.27 and 1.28

version 1.27, 2002/05/31 17:07:13 version 1.28, 2002/06/23 11:02:03
Line 41  static char *global_str
Line 41  static char *global_str
 static char *process_str                 = "Process";  static char *process_str                 = "Process";
 /* }}} */  /* }}} */
   
 /* Options structures (used only with libcfg context) {{{ */  /* Options structures (used only with libcfg+ context) {{{ */
 static struct conf_struct_global global_cfg;  static struct conf_struct_global global_cfg;
 static struct conf_struct_process process_cfg;  static struct conf_struct_process process_cfg;
 /* }}} */  /* }}} */
Line 70  static struct cfg_option process_options
Line 70  static struct cfg_option process_options
         {"input", 'i', "input", CFG_STRING+CFG_MULTI_SEPARATED, (void *) &(process_cfg.fd_str[0]), 0},          {"input", 'i', "input", CFG_STRING+CFG_MULTI_SEPARATED, (void *) &(process_cfg.fd_str[0]), 0},
         {"output", 'o', "output", CFG_STRING+CFG_MULTI_SEPARATED, (void *)&(process_cfg.fd_str[1]),0},          {"output", 'o', "output", CFG_STRING+CFG_MULTI_SEPARATED, (void *)&(process_cfg.fd_str[1]),0},
         {"errput", 'e', "errput", CFG_STRING+CFG_MULTI_SEPARATED, (void *)&(process_cfg.fd_str[2]),0},          {"errput", 'e', "errput", CFG_STRING+CFG_MULTI_SEPARATED, (void *)&(process_cfg.fd_str[2]),0},
         {NULL, '\0', "command", CFG_LEFTOVER_ARGS+CFG_STRING+CFG_MULTI_SEPARATED,(void *)&(process_cfg.argv),0},          {NULL, '\0', "command", CFG_LEFTOVER_ARGS+CFG_STRING+CFG_MULTI_SEPARATED,
         CFG_END_OF_LIST                  (void *)&(process_cfg.argv),0},
                   CFG_END_OF_LIST
 }; /* }}} */  }; /* }}} */
   
 /* Static function declarations {{{ */  /* Static function declarations {{{ */
Line 332  conf_parse_all(argc, argv)
Line 333  conf_parse_all(argc, argv)
   
         if (add_processes_to_proctable(&ptbl, processes,          if (add_processes_to_proctable(&ptbl, processes,
                                 start_idx_size, start_idx) < 0) {                                  start_idx_size, start_idx) < 0) {
                 msg_error_print("not enough memory\n");                  /* msg_error_print("not enough memory\n"); */
                 /* XXX: free structures */                  /* XXX: free structures */
                 proctable_destroy(&ptbl);                  proctable_destroy(&ptbl);
                 free(start_idx);                  free(start_idx);
Line 653  check_context(context, options)
Line 654  check_context(context, options)
   
                 /* TODO: one call for multi vals properties */                  /* TODO: one call for multi vals properties */
                 cfg_clear_property(*context, CFG_LINE_STOP_STRING);                  cfg_clear_property(*context, CFG_LINE_STOP_STRING);
                 cfg_clear_property(*context, CFG_LINE_MULTI_VALS_SEPARATOR);                  cfg_clear_property(*context, CFG_MULTI_VALS_SEPARATOR);
                 cfg_clear_property(*context, CFG_FILE_MULTI_VALS_SEPARATOR);  
                 cfg_clear_property(*context, CFG_FILE_STOP_PREFIX);                  cfg_clear_property(*context, CFG_FILE_STOP_PREFIX);
   
                 if (! cfg_add_property(*context, CFG_LINE_STOP_STRING, "--")                  if (! cfg_add_property(*context, CFG_LINE_STOP_STRING, "--")
                                 || ! cfg_add_property(*context,                                  || ! cfg_add_property(*context,
                                         CFG_LINE_MULTI_VALS_SEPARATOR, ",")                                          CFG_NORMAL_MULTI_VALS_SEPARATOR, ",")
                                   || ! cfg_add_property(*context,
                                           CFG_FILE_LEFTOVER_MULTI_VALS_SEPARATOR, " ")
                                 || ! cfg_add_property(*context,                                  || ! cfg_add_property(*context,
                                         CFG_FILE_STOP_PREFIX, section_boundaries[0]))                                          CFG_FILE_STOP_PREFIX, section_boundaries[0]))
                         return 0;                          return 0;
Line 865  add_processes_to_proctable(p_ptbl, proce
Line 867  add_processes_to_proctable(p_ptbl, proce
                         ptbl_size, new_ptbl_size);                          ptbl_size, new_ptbl_size);
 #endif  #endif
   
         if ((new_ptbl = proctable_create(new_ptbl_size)) == NULL)          if ((new_ptbl = proctable_create(new_ptbl_size)) == NULL) {
                   msg_error_print("not enough memory for process table creation\n");
                 return -1;                  return -1;
           }
   
         for (i = 0; i < new_ptbl_size; i++) {          for (i = 0; i < new_ptbl_size; i++) {
   
Line 1035  add_processes_to_proctable(p_ptbl, proce
Line 1039  add_processes_to_proctable(p_ptbl, proce
         }          }
   
         if (! proctable_join(p_ptbl, new_ptbl)) {          if (! proctable_join(p_ptbl, new_ptbl)) {
                 msg_error_print("not enought memory for"                  msg_error_print("not enought memory for process table resize\n");
                                 " process table resize\n");  
                 proctable_destroy(&new_ptbl);                  proctable_destroy(&new_ptbl);
                 return -1;                  return -1;
         }          }

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

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