IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2006, 1:32:23 PM (20 years ago)
Author:
jhoblitt
Message:

bug #790 - remove psErrorText.h and inline all error codes. all newly inlined error codes are wrapped with the _() macro from future gettextification

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src

    • Property svn:ignore
      •  

        old new  
        1010libpslib.la.temp
        1111config.h.in
        12 psErrorText.h
        1312*.bb
        1413*.bbg
  • trunk/psLib/src/xml/psXML.c

    r7766 r8232  
    1010*  @author David Robbins, MHPCC
    1111*
    12 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2006-06-30 02:20:06 $
     12*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2006-08-08 23:32:23 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    133133            else {
    134134                psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    135                         PS_ERRORTEXT_psXML_INVALID_CONTENT);
     135                        _("Failed to recognize XML content.  Invalid syntax."));
    136136                return NULL;
    137137            }
     
    188188            default:
    189189                psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    190                         PS_ERRORTEXT_psXML_INVALID_DATATYPE);
     190                        _("Failed to recognize datatype from/for XML file."));
    191191                psFree(XML);
    192192                psFree(iter);
     
    198198        default:
    199199            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    200                     PS_ERRORTEXT_psXML_INVALID_DATATYPE);
     200                    _("Failed to recognize datatype from/for XML file."));
    201201            psFree(XML);
    202202            psFree(iter);
     
    283283    default:
    284284        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    285                 PS_ERRORTEXT_psXML_INVALID_DATATYPE);
     285                _("Failed to recognize datatype from/for XML file."));
    286286    }
    287287}
     
    299299    else
    300300        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    301                 PS_ERRORTEXT_psXML_INVALID_CONTENT);
     301                _("Failed to recognize XML content.  Invalid syntax."));
    302302    in = endp;
    303303    nsec = (unsigned int)strtol(in, &endp, 10);
     
    307307    else
    308308        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    309                 PS_ERRORTEXT_psXML_INVALID_CONTENT);
     309                _("Failed to recognize XML content.  Invalid syntax."));
    310310    in = endp;
    311311    if ( !strncmp(in, "false", 10) || !strncmp(in, "f", 10) ||
     
    317317    else {
    318318        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    319                 PS_ERRORTEXT_psXML_INVALID_CONTENT);
     319                _("Failed to recognize XML content.  Invalid syntax."));
    320320    }
    321321}
     
    335335        } else {
    336336            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    337                     PS_ERRORTEXT_psXML_INVALID_CONTENT);
     337                    _("Failed to recognize XML content.  Invalid syntax."));
    338338            return(PS_DATA_UNKNOWN);
    339339        }
     
    348348        } else {
    349349            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    350                     PS_ERRORTEXT_psXML_INVALID_CONTENT);
     350                    _("Failed to recognize XML content.  Invalid syntax."));
    351351            return(PS_DATA_UNKNOWN);
    352352        }
     
    360360        } else {
    361361            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    362                     PS_ERRORTEXT_psXML_INVALID_CONTENT);
     362                    _("Failed to recognize XML content.  Invalid syntax."));
    363363            return(PS_DATA_UNKNOWN);
    364364        }
     
    370370        } else {
    371371            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    372                     PS_ERRORTEXT_psXML_INVALID_CONTENT);
     372                    _("Failed to recognize XML content.  Invalid syntax."));
    373373            return(PS_DATA_UNKNOWN);
    374374        }
     
    398398            if ( nodeNum == 0 && strncmp((const char*)cur_node->name, "metadata", MAXSTR) ) {
    399399                psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    400                         PS_ERRORTEXT_psXML_INVALID_CONTENT);
     400                        _("Failed to recognize XML content.  Invalid syntax."));
    401401                psFree(meta);
    402402                return NULL;
     
    440440                            || elemType == PS_DATA_BOOL) {
    441441                        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    442                                 PS_ERRORTEXT_psXML_INVALID_DATATYPE);
     442                                _("Failed to recognize datatype from/for XML file."));
    443443                        psFree(meta);
    444444                        return NULL;
     
    467467                    else {
    468468                        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    469                                 PS_ERRORTEXT_psXML_INVALID_CONTENT);
     469                                _("Failed to recognize XML content.  Invalid syntax."));
    470470                        psFree(meta);
    471471                        return NULL;
     
    501501                    } else {
    502502                        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    503                                 PS_ERRORTEXT_psXML_INVALID_CONTENT);
     503                                _("Failed to recognize XML content.  Invalid syntax."));
    504504                        psFree(meta);
    505505                        return NULL;
     
    509509                default:
    510510                    psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    511                             PS_ERRORTEXT_psXML_INVALID_DATATYPE);
     511                            _("Failed to recognize datatype from/for XML file."));
    512512                    psFree(meta);   //XXX: Do I really need this?
    513513                    return NULL;
     
    558558    FILE *file;
    559559    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);
    561561        return false;
    562562    }
     
    592592    xmlDocDumpMemory(*doc, &buff, &bufferSize);
    593593    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."));
    595595        //        xmlFree(buff);
    596596        return false;
     
    628628        write(fd, buf, n);
    629629    } 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."));
    631631        return false;
    632632    }
Note: See TracChangeset for help on using the changeset viewer.