Changeset 8232 for trunk/psLib/src/mathtypes
- Timestamp:
- Aug 8, 2006, 1:32:23 PM (20 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
mathtypes/psImage.c (modified) (10 diffs)
-
mathtypes/psScalar.c (modified) (5 diffs)
-
mathtypes/psVector.c (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src
- Property svn:ignore
-
old new 10 10 libpslib.la.temp 11 11 config.h.in 12 psErrorText.h13 12 *.bb 14 13 *.bbg
-
- Property svn:ignore
-
trunk/psLib/src/mathtypes/psImage.c
r7914 r8232 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.11 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-0 7-15 02:57:12$11 * @version $Revision: 1.113 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2006-08-08 23:32:23 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 #include "psString.h" 28 28 29 #include "psErrorText.h" 29 30 30 31 31 #define SQUARE(x) ((x)*(x)) … … 64 64 if (numRows < 1) { 65 65 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 66 PS_ERRORTEXT_psImage_AREA_NEGATIVE,66 _("Specified number of rows (%d) or columns (%d) is invalid."), 67 67 numRows, numCols); 68 68 return NULL; … … 70 70 if (numCols < 1) { 71 71 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 72 PS_ERRORTEXT_psImage_AREA_NEGATIVE,72 _("Specified number of rows (%d) or columns (%d) is invalid."), 73 73 numRows, numCols); 74 74 return NULL; … … 380 380 psFree(old); 381 381 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.")); 383 383 return NULL; 384 384 } … … 417 417 if (input == NULL || input->data.V == NULL) { 418 418 psError(PS_ERR_BAD_PARAMETER_NULL, true, 419 PS_ERRORTEXT_psImage_IMAGE_NULL);419 _("Can not operate on a NULL psImage.")); 420 420 return false; 421 421 } … … 423 423 if (input->type.dimen != PS_DIMEN_IMAGE) { 424 424 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.")); 426 426 return false; 427 427 } … … 536 536 PS_TYPE_NAME(typeStr,type); 537 537 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 538 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,538 _("Specified psImage type, %s, is not supported."), 539 539 typeStr); 540 540 break; … … 634 634 default: \ 635 635 psError(PS_ERR_BAD_PARAMETER_VALUE,true, \ 636 PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID, \636 _("Specified interpolation method (%d) is not supported."), \ 637 637 mode); \ 638 638 } \ … … 656 656 PS_TYPE_NAME(typeStr,input->type.type); 657 657 psError(PS_ERR_BAD_PARAMETER_TYPE,true, 658 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,658 _("Specified psImage type, %s, is not supported."), 659 659 typeStr); 660 660 } -
trunk/psLib/src/mathtypes/psScalar.c
r7914 r8232 8 8 * @author Ross Harman, MHPCC 9 9 * 10 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 7-15 02:57:12$10 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:23 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 20 20 #include "psAbort.h" 21 21 22 #include "psErrorText.h" 22 23 23 24 24 static void scalarFree(psScalar *scalar) … … 76 76 default: 77 77 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 78 PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,78 _("Specified datatype (%d) is unsupported by psScalar."), 79 79 type); 80 80 psFree(scalar); … … 103 103 if (value == NULL) { 104 104 psError(PS_ERR_BAD_PARAMETER_NULL, true, 105 PS_ERRORTEXT_psScalar_COPY_NULL);105 _("Can not copy a NULL psScalar.")); 106 106 return NULL; 107 107 } … … 147 147 default: 148 148 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 149 PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,149 _("Specified datatype (%d) is unsupported by psScalar."), 150 150 dataType); 151 151 return NULL; -
trunk/psLib/src/mathtypes/psVector.c
r7979 r8232 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1. 79$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-0 7-26 02:19:32$11 * @version $Revision: 1.80 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2006-08-08 23:32:23 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 #include "psCompare.h" 28 28 29 #include "psErrorText.h" 29 30 30 31 31 typedef struct … … 79 79 if (elementSize < 1) { 80 80 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 81 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, type);81 _("Input psVector is an unsupported type (0x%x)."), type); 82 82 return NULL; 83 83 } … … 108 108 if (vector == NULL) { 109 109 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.")); 111 111 return NULL; 112 112 } else if (vector->nalloc != nalloc) { // No need to realloc to same size … … 138 138 psFree(vector); 139 139 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 140 PS_ERRORTEXT_psVector_NOT_A_VECTOR);140 _("The input psVector must have a vector dimension type.")); 141 141 return NULL; 142 142 } … … 163 163 if (vector == NULL) { 164 164 psError(PS_ERR_BAD_PARAMETER_NULL, true, 165 PS_ERRORTEXT_psVector_NULL);165 _("The input psVector can not be NULL.")); 166 166 return NULL; 167 167 } … … 201 201 if (input == NULL) { 202 202 psError(PS_ERR_BAD_PARAMETER_NULL, true, 203 PS_ERRORTEXT_psVector_NULL);203 _("The input psVector can not be NULL.")); 204 204 psFree(output); 205 205 return NULL; … … 241 241 PS_TYPE_NAME(typeStr,type); 242 242 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 243 // PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, typeStr);243 // _("Input psVector is an unsupported type (0x%x)."), typeStr); 244 244 "Input psVector is an unsupported type.\n"); 245 245 psFree(output); … … 301 301 PS_TYPE_NAME(typeStr,type); \ 302 302 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 303 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, \303 _("Input psVector is an unsupported type (0x%x)."), \ 304 304 typeStr); \ 305 305 psFree(output); \ … … 326 326 PS_TYPE_NAME(typeStr,type); 327 327 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 328 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,328 _("Input psVector is an unsupported type (0x%x)."), 329 329 typeStr); 330 330 psFree(output); … … 378 378 if (!inVector) { 379 379 psError(PS_ERR_BAD_PARAMETER_NULL, true, 380 PS_ERRORTEXT_psVector_SORT_NULL);380 _("psVectorSort can not sort a NULL psVector.")); 381 381 psFree(outVector); 382 382 return NULL; … … 408 408 default: 409 409 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 410 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,410 _("Input psVector is an unsupported type (0x%x)."), 411 411 inVector->type.type); 412 412 psFree(outVector); … … 455 455 if (inVector == NULL) { 456 456 psError(PS_ERR_BAD_PARAMETER_NULL, true, 457 PS_ERRORTEXT_psVector_SORT_NULL);457 _("psVectorSort can not sort a NULL psVector.")); 458 458 psFree(outVector); 459 459 return NULL; … … 481 481 default: 482 482 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 483 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,483 _("Input psVector is an unsupported type (0x%x)."), 484 484 inVector->type.type); 485 485 psFree(outVector); … … 896 896 { 897 897 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.")); 899 899 return false; 900 900 } … … 969 969 { 970 970 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.")); 972 972 return NAN; 973 973 } … … 1032 1032 long Npixels = 0; 1033 1033 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.")); 1035 1035 Npixels = -1; 1036 1036 return Npixels; … … 1067 1067 default: 1068 1068 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 1069 PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, type);1069 _("Input psVector is an unsupported type (0x%x)."), type); 1070 1070 return -1; 1071 1071 }
Note:
See TracChangeset
for help on using the changeset viewer.
