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/psUnaryOp.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
     
    5151#include "psLogMsg.h"
    5252#include "psAssert.h"
    53 #include "psErrorText.h"
     53
    5454
    5555/*****************************************************************************
     
    7878    long nOut = ((psVector*)OUT)->n; \
    7979    if (nIn != nOut) { \
    80         psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_COUNT_DIFFERS, nIn, nOut); \
     80        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), nIn, nOut); \
    8181        if (OUT != IN) { \
    8282            psFree(OUT); \
     
    9999    long numColsOut = ((psImage*)OUT)->numCols; \
    100100    if(numRowsIn!=numRowsOut || numColsIn!=numColsOut) { \
    101         psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_IMAGE_SIZE_DIFFERS, \
     101        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified psImage dimensions differed, %dx%d vs %dx%d."), \
    102102                numColsIn, numRowsIn, numColsOut, numRowsOut); \
    103103        if (OUT != IN) { \
     
    157157        char* strType; \
    158158        PS_TYPE_NAME(strType, IN->type); \
    159         psError(PS_ERR_BAD_PARAMETER_TYPE, true, PS_ERRORTEXT_psMatrix_TYPE_MISMATCH, strType); \
     159        psError(PS_ERR_BAD_PARAMETER_TYPE, true, _("Specified data type, %s, is not supported."), strType); \
    160160        if (OUT != IN) { \
    161161            psFree(OUT); \
     
    275275    } \
    276276} else { \
    277     psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psMatrix_OPERATION_UNSUPPORTED, OP); \
     277    psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified operation, %s, is not supported."), OP); \
    278278    if (OUT != IN) { \
    279279        psFree(OUT); \
     
    309309    case PS_DIMEN_TRANSV:
    310310        if (((psVector*)in)->n == 0) {
    311             psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_VECTOR_EMPTY);
     311            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Input psVector contains no elements.  No data to perform operation with."));
    312312            psUnaryOp_EXIT;
    313313        }
     
    315315        out = psVectorRecycle(out, ((psVector*)in)->n, psTypeIn->type);
    316316        if (out == NULL) {
    317             psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED);
     317            psError(PS_ERR_UNKNOWN, false, _("Couldn't create a proper output psVector."));
    318318            psUnaryOp_EXIT;
    319319        }
     
    324324    case PS_DIMEN_IMAGE:
    325325        if (((psImage* ) in)->numCols == 0 || ((psImage* ) in)->numRows == 0) {
    326             psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_IMAGE_EMPTY);
     326            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Input psImage contains no pixels.  No data to perform operation with."));
    327327            psUnaryOp_EXIT;
    328328        }
     
    330330        out = psImageRecycle(out, ((psImage*)in)->numCols, ((psImage*)in)->numRows, psTypeIn->type);
    331331        if (out == NULL) {
    332             psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED);
     332            psError(PS_ERR_UNKNOWN, false, _("Couldn't create a proper output psImage."));
    333333            psUnaryOp_EXIT;
    334334        }
     
    340340            psFree(out);
    341341        }
    342         psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psMatrix_DIMEN_INVALID, "in", psTypeIn->dimen);
     342        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified parameter, %s, has invalid dimensionality, %d."), "in", psTypeIn->dimen);
    343343        psUnaryOp_EXIT;
    344344    }
Note: See TracChangeset for help on using the changeset viewer.