Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 17, 2026

Diff for libcfg+/src/cfg+.c between version 1.29 and 1.30

version 1.29, 2002/04/08 20:57:35 version 1.30, 2002/04/10 13:51:46
Line 219  cfg_free_context(con)
Line 219  cfg_free_context(con)
         free((void *) con);          free((void *) con);
 }  }
   
           void
   cfg_print_error(con, errorcode)
           const CFG_CONTEXT con;
           const int errorcode;
   {
           char *s;
   
           switch (errorcode) {
   
                   /* case CFG_ERR_OK: */
                   /* case CFG_ERROR_OK: */
                   case CFG_OK:
                           s = "no error";
                           break;
   
                           /* case CFG_ERR_NOARG: */
                   case CFG_ERROR_NOARG:
                           s = "argument is missing for option";
                           break;
   
                           /* case CFG_ERR_NOTALLOWEDARG: */
                   case CFG_ERROR_NOTALLOWEDARG:
                           s = "argument is not allowed for option";
                           break;
   
                           /* case CFG_ERR_BADOPT: */
                   case CFG_ERROR_BADOPT:
                           s = "option's argument could not be parsed";
                           break;
   
                           /* case CFG_ERR_BADQUOTE: */
                   case CFG_ERROR_BADQUOTE:
                           s = "error in quotations";
                           break;
   
                           /* case CFG_ERR_BADNUMBER: */
                   case CFG_ERROR_BADNUMBER:
                           s = "option could not be converted to appropriate numeric type";
                           break;
   
                           /* case CFG_ERR_OVERFLOW: */
                   case CFG_ERROR_OVERFLOW:
                           s = "given number was too big or too small";
                           break;
   
                           /* case CFG_ERR_MULTI: */
                   case CFG_ERROR_MULTI:
                           s = "multiple arguments used for single option";
                           break;
   
                           /* case CFG_ERR_NOMEM: */
                   case CFG_ERROR_NOMEM:
                           s = "not enough memory";
                           break;
   
                           /* case CFG_ERR_STOP_STR: */
                           /* case CFG_ERR_STOP_STR_FOUND: */
                           /* case CFG_ERROR_STOP_STR: */
                   case CFG_ERROR_STOP_STR_FOUND:
                           s = "stop string was found";
                           break;
   
                           /* case CFG_ERR_NOEQUAL: */
                   case CFG_ERROR_NOEQUAL:
                           s = "no equal sign on the line";
                           break;
   
                           /* case CFG_ERR_UNKNOWN: */
                   case CFG_ERROR_UNKNOWN:
                           s = "unknown option";
                           break;
   
                           /* case CFG_ERR_FILE_NOT_FOUND: */
                   case CFG_ERROR_FILE_NOT_FOUND:
                           s = "file not found";
                           break;
   
                           /* case CFG_ERR_SEEK_ERROR: */
                   case CFG_ERROR_SEEK_ERROR:
                           s = "file seek error";
                           break;
   
                           /* case CFG_ERR_INTERNAL: */
                   case CFG_ERROR_INTERNAL:
                           s = "internal error";
                   default:
                           s = "unknown error";
                           break;
           }
   
           printf(s);
   }
   
         const char*          const char*
 cfg_get_error_str(errorcode)  cfg_get_error_str(errorcode)
         const int errorcode;          const int errorcode;
Line 422  main(argc, argv)
Line 515  main(argc, argv)
                                         "|  Error printing  |\n"                                          "|  Error printing  |\n"
                                         "+------------------+");                                          "+------------------+");
   
                           printf("*****");
                           cfg_print_error(con, ret);
                           putchar('\n');
   
                         printf("***** %s error %d at %d: %s\n",                          printf("***** %s error %d at %d: %s\n",
                                         i == 0 ? "cmdline" : "cfgfile",                                          i == 0 ? "cmdline" : "cfgfile",
                                         ret, cfg_get_cur_idx(con),                                          ret, cfg_get_cur_idx(con),

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

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