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/math/psBinaryOp.c

    r7766 r8232  
    3030 *  @author Robert DeSonia, MHPCC
    3131 *
    32  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2006-06-30 02:20:06 $
     32 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2006-08-08 23:32:23 $
    3434 *
    3535 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5050#include "psLogMsg.h"
    5151#include "psAssert.h"
    52 #include "psErrorText.h"
     52
    5353
    5454/*****************************************************************************
     
    107107    long n2 = ((psVector*)IN2)->n; \
    108108    if (n1 != n2) { \
    109         psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_COUNT_DIFFERS, n1, n2); \
     109        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, n2); \
    110110        if (OUT != IN1 && OUT != IN2) { \
    111111            psFree(OUT); \
     
    129129    if (((psVector*)IN1)->type.dimen == PS_DIMEN_VECTOR) { /* Regular vectors */ \
    130130        if (n1 != numRows2) { \
    131             psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_COUNT_DIFFERS, n1, numRows2); \
     131            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, numRows2); \
    132132            if (OUT != IN1 && OUT != IN2) { \
    133133                psFree(OUT); \
     
    146146    } else {  /* Transposed vectors */ \
    147147        if (n1 != numCols2) { \
    148             psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_COUNT_DIFFERS, n1, numCols2); \
     148            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, numCols2); \
    149149            if (OUT != IN1 && OUT != IN2) { \
    150150                psFree(OUT); \
     
    187187    if (((psVector*)IN2)->type.dimen == PS_DIMEN_VECTOR) { /* Regular vectors */ \
    188188        if (n2 != numRows1) { \
    189             psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_COUNT_DIFFERS, n2, numRows1); \
     189            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n2, numRows1); \
    190190            if (OUT != IN1 && OUT != IN2) { \
    191191                psFree(OUT); \
     
    204204    } else {  /* Transposed vectors */ \
    205205        if (n2 != numCols1) { \
    206             psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_COUNT_DIFFERS, n2, numCols1); \
     206            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n2, numCols1); \
    207207            if (OUT != IN1) { \
    208208                psFree(OUT); \
     
    229229    long numCols2 = ((psImage*)IN2)->numCols; \
    230230    if (numRows1 != numRows2 || numCols1 != numCols2) { \
    231         psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_IMAGE_SIZE_DIFFERS, \
     231        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified psImage dimensions differed, %dx%d vs %dx%d."), \
    232232                numCols1, numRows1, numCols2, numRows2); \
    233233        if (OUT != IN1 && OUT != IN2) { \
     
    278278    PS_TYPE_NAME(strType,IN1->type);                                                                         \
    279279    psError(PS_ERR_BAD_PARAMETER_TYPE, true,                                                                 \
    280             PS_ERRORTEXT_psMatrix_TYPE_MISMATCH,                                                             \
     280            _("Specified data type, %s, is not supported."),                                                             \
    281281            strType);  */                                                                                    \
    282282    if (OUT != IN1 && OUT != IN2) {                                                                          \
     
    329329    PS_TYPE_NAME(strType,IN1->type);                                                                         \
    330330    psError(PS_ERR_BAD_PARAMETER_TYPE, true,                                                                 \
    331             PS_ERRORTEXT_psMatrix_TYPE_MISMATCH,                                                             \
     331            _("Specified data type, %s, is not supported."),                                                             \
    332332            strType);  */                                                                                    \
    333333    if (OUT != IN1 && OUT != IN2) {                                                                          \
     
    372372    if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) {                                                               \
    373373        psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                            \
    374                 PS_ERRORTEXT_psMatrix_MIN_COMPLEX_SUPPORT);                                                  \
     374                _("The minimum operation is not supported with complex data."));                                                  \
    375375        if (OUT != IN1 && OUT != IN2) {                                                                      \
    376376            psFree(OUT);                                                                                     \
     
    383383    if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) {                                                               \
    384384        psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                            \
    385                 PS_ERRORTEXT_psMatrix_MAX_COMPLEX_SUPPORT);                                                  \
     385                _("The maximum operation is not supported with complex data."));                                                  \
    386386        if (OUT != IN1 && OUT != IN2) {                                                                      \
    387387            psFree(OUT);                                                                                     \
     
    393393} else {                                                                                                     \
    394394    psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                                \
    395             PS_ERRORTEXT_psMatrix_OPERATION_UNSUPPORTED,                                                     \
     395            _("Specified operation, %s, is not supported."),                                                     \
    396396            OP);                                                                                             \
    397397    if (OUT != IN1 && OUT != IN2) {                                                                          \
     
    469469            if (out == NULL) {
    470470                psError(PS_ERR_UNKNOWN, false,
    471                         PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED);
     471                        _("Couldn't create a proper output psVector."));
    472472                return NULL;
    473473            }
     
    478478            if (out == NULL) {
    479479                psError(PS_ERR_UNKNOWN, false,
    480                         PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED);
     480                        _("Couldn't create a proper output psImage."));
    481481                return NULL;
    482482            }
     
    484484        } else {
    485485            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    486                     PS_ERRORTEXT_psMatrix_DIMEN_INVALID,
     486                    _("Specified parameter, %s, has invalid dimensionality, %d."),
    487487                    "in2",dim2);
    488488            psBinaryOp_EXIT;
     
    493493            if (out == NULL) {
    494494                psError(PS_ERR_UNKNOWN, false,
    495                         PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED);
     495                        _("Couldn't create a proper output psVector."));
    496496                return NULL;
    497497            }
     
    502502            if (out == NULL) {
    503503                psError(PS_ERR_UNKNOWN, false,
    504                         PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED);
     504                        _("Couldn't create a proper output psVector."));
    505505                return NULL;
    506506            }
     
    511511            if (out == NULL) {
    512512                psError(PS_ERR_UNKNOWN, false,
    513                         PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED);
     513                        _("Couldn't create a proper output psImage."));
    514514                return NULL;
    515515            }
     
    517517        } else {
    518518            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    519                     PS_ERRORTEXT_psMatrix_DIMEN_INVALID,
     519                    _("Specified parameter, %s, has invalid dimensionality, %d."),
    520520                    "in2",dim2);
    521521            psBinaryOp_EXIT;
     
    525525        if (out == NULL) {
    526526            psError(PS_ERR_UNKNOWN, false,
    527                     PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED);
     527                    _("Couldn't create a proper output psImage."));
    528528            return NULL;
    529529        }
     
    536536        } else {
    537537            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    538                     PS_ERRORTEXT_psMatrix_DIMEN_INVALID,
     538                    _("Specified parameter, %s, has invalid dimensionality, %d."),
    539539                    "in2",dim2);
    540540            psBinaryOp_EXIT;
     
    542542    } else {
    543543        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    544                 PS_ERRORTEXT_psMatrix_DIMEN_INVALID,
     544                _("Specified parameter, %s, has invalid dimensionality, %d."),
    545545                "in1",dim1);
    546546        psBinaryOp_EXIT;
Note: See TracChangeset for help on using the changeset viewer.