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/imageops/psImagePixelManip.c

    r7766 r8232  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-06-30 02:20:06 $
     12 *  @version $Revision: 1.20 $ $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
     
    2828#include "psMemory.h"
    2929#include "psAssert.h"
    30 #include "psErrorText.h"
     30
    3131#include "psCoord.h"
    3232
     
    4747    if (max < min) {
    4848        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    49                 PS_ERRORTEXT_psImageManip_MAXMIN,
     49                _("Specified min value, %g, can not be greater than the specified max value, %g."),
    5050                (double)min,(double)max);
    5151        return 0;
     
    6161            if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \
    6262                psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    63                         PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \
     63                        _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \
    6464                        "vmin",vmin, PS_TYPE_##type##_NAME, \
    6565                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
     
    6767            if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \
    6868                psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    69                         PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \
     69                        _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \
    7070                        "vmax",vmax, PS_TYPE_##type##_NAME, \
    7171                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
     
    9090            if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \
    9191                psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    92                         PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \
     92                        _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \
    9393                        "vmin",vmin, PS_TYPE_##type##_NAME, \
    9494                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
     
    9696            if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \
    9797                psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    98                         PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \
     98                        _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \
    9999                        "vmax",vmax, PS_TYPE_##type##_NAME, \
    100100                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
     
    132132            PS_TYPE_NAME(typeStr,input->type.type);
    133133            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    134                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     134                    _("Specified psImage type, %s, is not supported."),
    135135                    typeStr);
    136136        }
     
    177177            PS_TYPE_NAME(typeStr,input->type.type);
    178178            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    179                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     179                    _("Specified psImage type, %s, is not supported."),
    180180                    typeStr);
    181181        }
     
    202202    if (image == NULL || overlay == NULL) {
    203203        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    204                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     204                _("Can not operate on a NULL psImage."));
    205205        return pixelsOverlaid;
    206206    }
     
    208208    if (op == NULL) {
    209209        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    210                 PS_ERRORTEXT_psImageManip_OPERATION_NULL);
     210                _("Operation can not be NULL."));
    211211        return pixelsOverlaid;
    212212    }
     
    220220        PS_TYPE_NAME(typeStrOverlay,overlay->type.type);
    221221        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    222                 PS_ERRORTEXT_psImageManip_OVERLAY_TYPE_MISMATCH,
     222                _("Input overlay psImage type, %s, must match input psImage type, %s."),
    223223                typeStrOverlay, typeStr);
    224224        return pixelsOverlaid;
     
    239239
    240240        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    241                 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,
     241                _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."),
    242242                x0, imageColLimit, y0, imageRowLimit,
    243243                imageNumCols, imageNumRows);
     
    295295    default: \
    296296        psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    297                 PS_ERRORTEXT_psImageManip_OVERLAY_OPERATOR_INVALID, \
     297                _("Specified operation, '%s', is not supported."), \
    298298                op); \
    299299        return pixelsOverlaid; \
     
    319319            PS_TYPE_NAME(typeStr,type);
    320320            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    321                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     321                    _("Specified psImage type, %s, is not supported."),
    322322                    typeStr);
    323323            return pixelsOverlaid;
     
    344344    if (input == NULL) {
    345345        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    346                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     346                _("Can not operate on a NULL psImage."));
    347347        return 0;
    348348    }
     
    350350    if (realMax < realMin) {
    351351        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    352                 PS_ERRORTEXT_psImageManip_MAXMIN_REAL,
     352                _("Specified real-portion of min value, %g, can not be greater than the real-portion of max value, %g."),
    353353                (double)realMin, (double)realMax);
    354354        return 0;
     
    356356    if (imagMax < imagMin) {
    357357        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    358                 PS_ERRORTEXT_psImageManip_MAXMIN_IMAG,
     358                _("Specified imaginary-portion of min value, %g, can not be greater than the imaginary-portion of max value, %g."),
    359359                (double)imagMin, (double)imagMax);
    360360        return 0;
     
    369369                realfcn(vmin) > PS_MAX_##type || imagfcn(vmin) > PS_MAX_##type ) { \
    370370            psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    371                     PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \
     371                    _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \
    372372                    "vmin", creal(vmin), cimag(vmin), \
    373373                    PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \
     
    377377                realfcn(vmax) < PS_MIN_##type || imagfcn(vmax) < PS_MIN_##type ) { \
    378378            psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    379                     PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \
     379                    _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \
    380380                    "vmax", creal(vmax), cimag(vmax), \
    381381                    PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \
     
    406406            PS_TYPE_NAME(typeStr,input->type.type);
    407407            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    408                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     408                    _("Specified psImage type, %s, is not supported."),
    409409                    typeStr);
    410410        }
Note: See TracChangeset for help on using the changeset viewer.