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

Rozdiely pre ep/src/conf.c medzi verziami 1.27 a 1.28

verzia 1.27, 2002/05/31 17:07:13 verzia 1.28, 2002/06/23 11:02:03
Riadok 41  static char *global_str
Riadok 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;
 /* }}} */  /* }}} */
Riadok 70  static struct cfg_option process_options
Riadok 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 {{{ */
Riadok 332  conf_parse_all(argc, argv)
Riadok 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);
Riadok 653  check_context(context, options)
Riadok 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;
Riadok 865  add_processes_to_proctable(p_ptbl, proce
Riadok 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++) {
   
Riadok 1035  add_processes_to_proctable(p_ptbl, proce
Riadok 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:
Odstranené z verzie1.27  
zmenené riadky
  Pridané vo verzii1.28

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