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:
4 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/mathtypes/psImage.c

    r7914 r8232  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.112 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-07-15 02:57:12 $
     11 *  @version $Revision: 1.113 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-08-08 23:32:23 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2727#include "psString.h"
    2828
    29 #include "psErrorText.h"
     29
    3030
    3131#define SQUARE(x) ((x)*(x))
     
    6464    if (numRows < 1) {
    6565        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    66                 PS_ERRORTEXT_psImage_AREA_NEGATIVE,
     66                _("Specified number of rows (%d) or columns (%d) is invalid."),
    6767                numRows, numCols);
    6868        return NULL;
     
    7070    if (numCols < 1) {
    7171        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    72                 PS_ERRORTEXT_psImage_AREA_NEGATIVE,
     72                _("Specified number of rows (%d) or columns (%d) is invalid."),
    7373                numRows, numCols);
    7474        return NULL;
     
    380380        psFree(old);
    381381        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    382                 PS_ERRORTEXT_psImage_NOT_AN_IMAGE);
     382                _("The input psImage must have a PS_DIMEN_IMAGE dimension type."));
    383383        return NULL;
    384384    }
     
    417417    if (input == NULL || input->data.V == NULL) {
    418418        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    419                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     419                _("Can not operate on a NULL psImage."));
    420420        return false;
    421421    }
     
    423423    if (input->type.dimen != PS_DIMEN_IMAGE) {
    424424        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    425                 PS_ERRORTEXT_psImage_NOT_AN_IMAGE);
     425                _("The input psImage must have a PS_DIMEN_IMAGE dimension type."));
    426426        return false;
    427427    }
     
    536536            PS_TYPE_NAME(typeStr,type);
    537537            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    538                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     538                    _("Specified psImage type, %s, is not supported."),
    539539                    typeStr);
    540540            break;
     
    634634    default:                                                         \
    635635        psError(PS_ERR_BAD_PARAMETER_VALUE,true,                     \
    636                 PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID,     \
     636                _("Specified interpolation method (%d) is not supported."),     \
    637637                mode);                                               \
    638638    }                                                                \
     
    656656            PS_TYPE_NAME(typeStr,input->type.type);
    657657            psError(PS_ERR_BAD_PARAMETER_TYPE,true,
    658                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     658                    _("Specified psImage type, %s, is not supported."),
    659659                    typeStr);
    660660        }
  • trunk/psLib/src/mathtypes/psScalar.c

    r7914 r8232  
    88 *  @author Ross Harman, MHPCC
    99 *
    10  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-07-15 02:57:12 $
     10 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-08-08 23:32:23 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2020#include "psAbort.h"
    2121
    22 #include "psErrorText.h"
     22
    2323
    2424static void scalarFree(psScalar *scalar)
     
    7676    default:
    7777        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    78                 PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,
     78                _("Specified datatype (%d) is unsupported by psScalar."),
    7979                type);
    8080        psFree(scalar);
     
    103103    if (value == NULL) {
    104104        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    105                 PS_ERRORTEXT_psScalar_COPY_NULL);
     105                _("Can not copy a NULL psScalar."));
    106106        return NULL;
    107107    }
     
    147147    default:
    148148        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    149                 PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,
     149                _("Specified datatype (%d) is unsupported by psScalar."),
    150150                dataType);
    151151        return NULL;
  • trunk/psLib/src/mathtypes/psVector.c

    r7979 r8232  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2006-07-26 02:19:32 $
     11*  @version $Revision: 1.80 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2006-08-08 23:32:23 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2727#include "psCompare.h"
    2828
    29 #include "psErrorText.h"
     29
    3030
    3131typedef struct
     
    7979    if (elementSize < 1) {
    8080        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    81                 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, type);
     81                _("Input psVector is an unsupported type (0x%x)."), type);
    8282        return NULL;
    8383    }
     
    108108    if (vector == NULL) {
    109109        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    110                 PS_ERRORTEXT_psVector_REALLOC_NULL);
     110                _("psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown."));
    111111        return NULL;
    112112    } else if (vector->nalloc != nalloc) {     // No need to realloc to same size
     
    138138        psFree(vector);
    139139        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    140                 PS_ERRORTEXT_psVector_NOT_A_VECTOR);
     140                _("The input psVector must have a vector dimension type."));
    141141        return NULL;
    142142    }
     
    163163    if (vector == NULL) {
    164164        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    165                 PS_ERRORTEXT_psVector_NULL);
     165                _("The input psVector can not be NULL."));
    166166        return NULL;
    167167    }
     
    201201    if (input == NULL) {
    202202        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    203                 PS_ERRORTEXT_psVector_NULL);
     203                _("The input psVector can not be NULL."));
    204204        psFree(output);
    205205        return NULL;
     
    241241                PS_TYPE_NAME(typeStr,type);
    242242                psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    243                         //                        PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, typeStr);
     243                        //                        _("Input psVector is an unsupported type (0x%x)."), typeStr);
    244244                        "Input psVector is an unsupported type.\n");
    245245                psFree(output);
     
    301301                PS_TYPE_NAME(typeStr,type); \
    302302                psError(PS_ERR_BAD_PARAMETER_TYPE, true, \
    303                         PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, \
     303                        _("Input psVector is an unsupported type (0x%x)."), \
    304304                        typeStr); \
    305305                psFree(output); \
     
    326326            PS_TYPE_NAME(typeStr,type);
    327327            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    328                     PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
     328                    _("Input psVector is an unsupported type (0x%x)."),
    329329                    typeStr);
    330330            psFree(output);
     
    378378    if (!inVector) {
    379379        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    380                 PS_ERRORTEXT_psVector_SORT_NULL);
     380                _("psVectorSort can not sort a NULL psVector."));
    381381        psFree(outVector);
    382382        return NULL;
     
    408408    default:
    409409        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    410                 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
     410                _("Input psVector is an unsupported type (0x%x)."),
    411411                inVector->type.type);
    412412        psFree(outVector);
     
    455455    if (inVector == NULL) {
    456456        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    457                 PS_ERRORTEXT_psVector_SORT_NULL);
     457                _("psVectorSort can not sort a NULL psVector."));
    458458        psFree(outVector);
    459459        return NULL;
     
    481481    default:
    482482        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    483                 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
     483                _("Input psVector is an unsupported type (0x%x)."),
    484484                inVector->type.type);
    485485        psFree(outVector);
     
    896896{
    897897    if (input == NULL) {
    898         psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psVector_NULL);
     898        psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psVector can not be NULL."));
    899899        return false;
    900900    }
     
    969969{
    970970    if (input == NULL) {
    971         psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psVector_NULL);
     971        psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psVector can not be NULL."));
    972972        return NAN;
    973973    }
     
    10321032    long Npixels = 0;
    10331033    if (mask == NULL) {
    1034         psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psVector_NULL);
     1034        psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psVector can not be NULL."));
    10351035        Npixels = -1;
    10361036        return Npixels;
     
    10671067    default:
    10681068        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    1069                 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, type);
     1069                _("Input psVector is an unsupported type (0x%x)."), type);
    10701070        return -1;
    10711071    }
Note: See TracChangeset for help on using the changeset viewer.