Changeset 8232 for trunk/psLib/src/xml/psXML.c
- Timestamp:
- Aug 8, 2006, 1:32:23 PM (20 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
xml/psXML.c (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src
- Property svn:ignore
-
old new 10 10 libpslib.la.temp 11 11 config.h.in 12 psErrorText.h13 12 *.bb 14 13 *.bbg
-
- Property svn:ignore
-
trunk/psLib/src/xml/psXML.c
r7766 r8232 10 10 * @author David Robbins, MHPCC 11 11 * 12 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 6-30 02:20:06$12 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 133 133 else { 134 134 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 135 PS_ERRORTEXT_psXML_INVALID_CONTENT);135 _("Failed to recognize XML content. Invalid syntax.")); 136 136 return NULL; 137 137 } … … 188 188 default: 189 189 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 190 PS_ERRORTEXT_psXML_INVALID_DATATYPE);190 _("Failed to recognize datatype from/for XML file.")); 191 191 psFree(XML); 192 192 psFree(iter); … … 198 198 default: 199 199 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 200 PS_ERRORTEXT_psXML_INVALID_DATATYPE);200 _("Failed to recognize datatype from/for XML file.")); 201 201 psFree(XML); 202 202 psFree(iter); … … 283 283 default: 284 284 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 285 PS_ERRORTEXT_psXML_INVALID_DATATYPE);285 _("Failed to recognize datatype from/for XML file.")); 286 286 } 287 287 } … … 299 299 else 300 300 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 301 PS_ERRORTEXT_psXML_INVALID_CONTENT);301 _("Failed to recognize XML content. Invalid syntax.")); 302 302 in = endp; 303 303 nsec = (unsigned int)strtol(in, &endp, 10); … … 307 307 else 308 308 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 309 PS_ERRORTEXT_psXML_INVALID_CONTENT);309 _("Failed to recognize XML content. Invalid syntax.")); 310 310 in = endp; 311 311 if ( !strncmp(in, "false", 10) || !strncmp(in, "f", 10) || … … 317 317 else { 318 318 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 319 PS_ERRORTEXT_psXML_INVALID_CONTENT);319 _("Failed to recognize XML content. Invalid syntax.")); 320 320 } 321 321 } … … 335 335 } else { 336 336 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 337 PS_ERRORTEXT_psXML_INVALID_CONTENT);337 _("Failed to recognize XML content. Invalid syntax.")); 338 338 return(PS_DATA_UNKNOWN); 339 339 } … … 348 348 } else { 349 349 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 350 PS_ERRORTEXT_psXML_INVALID_CONTENT);350 _("Failed to recognize XML content. Invalid syntax.")); 351 351 return(PS_DATA_UNKNOWN); 352 352 } … … 360 360 } else { 361 361 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 362 PS_ERRORTEXT_psXML_INVALID_CONTENT);362 _("Failed to recognize XML content. Invalid syntax.")); 363 363 return(PS_DATA_UNKNOWN); 364 364 } … … 370 370 } else { 371 371 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 372 PS_ERRORTEXT_psXML_INVALID_CONTENT);372 _("Failed to recognize XML content. Invalid syntax.")); 373 373 return(PS_DATA_UNKNOWN); 374 374 } … … 398 398 if ( nodeNum == 0 && strncmp((const char*)cur_node->name, "metadata", MAXSTR) ) { 399 399 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 400 PS_ERRORTEXT_psXML_INVALID_CONTENT);400 _("Failed to recognize XML content. Invalid syntax.")); 401 401 psFree(meta); 402 402 return NULL; … … 440 440 || elemType == PS_DATA_BOOL) { 441 441 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 442 PS_ERRORTEXT_psXML_INVALID_DATATYPE);442 _("Failed to recognize datatype from/for XML file.")); 443 443 psFree(meta); 444 444 return NULL; … … 467 467 else { 468 468 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 469 PS_ERRORTEXT_psXML_INVALID_CONTENT);469 _("Failed to recognize XML content. Invalid syntax.")); 470 470 psFree(meta); 471 471 return NULL; … … 501 501 } else { 502 502 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 503 PS_ERRORTEXT_psXML_INVALID_CONTENT);503 _("Failed to recognize XML content. Invalid syntax.")); 504 504 psFree(meta); 505 505 return NULL; … … 509 509 default: 510 510 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 511 PS_ERRORTEXT_psXML_INVALID_DATATYPE);511 _("Failed to recognize datatype from/for XML file.")); 512 512 psFree(meta); //XXX: Do I really need this? 513 513 return NULL; … … 558 558 FILE *file; 559 559 if( (file = fopen(filename, "w")) == NULL ) { 560 psError(PS_ERR_IO, true, PS_ERRORTEXT_psXML_IO_FILE_OPEN_FAILED, filename);560 psError(PS_ERR_IO, true, _("Failed to open file '%s'. Check if it exists and it has the proper permissions."), filename); 561 561 return false; 562 562 } … … 592 592 xmlDocDumpMemory(*doc, &buff, &bufferSize); 593 593 if ( MAXVEC < strlen((char *)buff) ) { 594 psError(PS_ERR_LOCATION_INVALID, true, PS_ERRORTEXT_psXML_BUFFER_TOO_SMALL);594 psError(PS_ERR_LOCATION_INVALID, true, _("Buffer to small to store XML doc.")); 595 595 // xmlFree(buff); 596 596 return false; … … 628 628 write(fd, buf, n); 629 629 } else { 630 psError(PS_ERR_LOCATION_INVALID, true, PS_ERRORTEXT_psXML_BUFFER_TOO_SMALL);630 psError(PS_ERR_LOCATION_INVALID, true, _("Buffer to small to store XML doc.")); 631 631 return false; 632 632 }
Note:
See TracChangeset
for help on using the changeset viewer.
