Changeset 8232 for trunk/psLib/src
- Timestamp:
- Aug 8, 2006, 1:32:23 PM (20 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 deleted
- 50 edited
-
. (modified) (1 prop)
-
.cvsignore (modified) (1 diff)
-
Makefile.am (modified) (2 diffs)
-
astro/psCoord.c (modified) (4 diffs)
-
astro/psEarthOrientation.c (modified) (13 diffs)
-
astro/psSphereOps.c (modified) (8 diffs)
-
astro/psTime.c (modified) (43 diffs)
-
db/psDB.c (modified) (17 diffs)
-
fft/psImageFFT.c (modified) (13 diffs)
-
fft/psVectorFFT.c (modified) (10 diffs)
-
fits/psFits.c (modified) (31 diffs)
-
fits/psFitsHeader.c (modified) (10 diffs)
-
fits/psFitsImage.c (modified) (33 diffs)
-
fits/psFitsTable.c (modified) (30 diffs)
-
imageops/psImageConvolve.c (modified) (13 diffs)
-
imageops/psImageGeomManip.c (modified) (30 diffs)
-
imageops/psImageMaskOps.c (modified) (2 diffs)
-
imageops/psImagePixelExtract.c (modified) (25 diffs)
-
imageops/psImagePixelManip.c (modified) (21 diffs)
-
imageops/psImageStats.c (modified) (5 diffs)
-
imageops/psImageStructManip.c (modified) (12 diffs)
-
math/psBinaryOp.c (modified) (23 diffs)
-
math/psMathUtils.c (modified) (2 diffs)
-
math/psMatrix.c (modified) (3 diffs)
-
math/psPolynomial.c (modified) (6 diffs)
-
math/psRandom.c (modified) (8 diffs)
-
math/psRegion.c (modified) (4 diffs)
-
math/psSpline.c (modified) (2 diffs)
-
math/psStats.c (modified) (7 diffs)
-
math/psUnaryOp.c (modified) (11 diffs)
-
mathtypes/psImage.c (modified) (10 diffs)
-
mathtypes/psScalar.c (modified) (5 diffs)
-
mathtypes/psVector.c (modified) (18 diffs)
-
psErrorText.h.in (deleted)
-
psErrorText_en.dat (deleted)
-
sys/psConfigure.c (modified) (6 diffs)
-
sys/psErrorCodes.c.in (modified) (2 diffs)
-
sys/psLogMsg.c (modified) (4 diffs)
-
sys/psMemory.c (modified) (8 diffs)
-
sys/psString.c (modified) (3 diffs)
-
sys/psTrace.c (modified) (9 diffs)
-
types/psArguments.c (modified) (2 diffs)
-
types/psArray.c (modified) (7 diffs)
-
types/psBitSet.c (modified) (13 diffs)
-
types/psHash.c (modified) (3 diffs)
-
types/psList.c (modified) (19 diffs)
-
types/psLookupTable.c (modified) (6 diffs)
-
types/psMetadata.c (modified) (18 diffs)
-
types/psMetadataConfig.c (modified) (36 diffs)
-
types/psPixels.c (modified) (13 diffs)
-
xml/psXML.c (modified) (20 diffs)
-
xml/psXML.h (modified) (2 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/.cvsignore
r7985 r8232 10 10 libpslib.la.temp 11 11 config.h.in 12 psErrorText.h13 12 *.bb 14 13 *.bbg -
trunk/psLib/src/Makefile.am
r7985 r8232 11 11 12 12 13 EXTRA_DIST = mainpage.dox psErrorCodes_en.dat psTest.h psErrorText.h.in psErrorText_en.dat 14 15 BUILT_SOURCES = psErrorText.h 16 psErrorText.h: psErrorText_$(PS_LANG).dat 17 $(top_srcdir)/psParseErrorCodes --data=$? $(srcdir)/psErrorText.h 13 EXTRA_DIST = mainpage.dox psErrorCodes_en.dat psTest.h 18 14 19 15 pslibincludedir = $(includedir) … … 21 17 psTest.h \ 22 18 pslib.h \ 23 pslib_strict.h \ 24 psErrorText.h 19 pslib_strict.h 25 20 26 21 install-exec-local: libpslib.la -
trunk/psLib/src/astro/psCoord.c
r7914 r8232 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.12 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 7-15 02:57:12 $12 * @version $Revision: 1.122 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:22 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 26 26 #include "psLogMsg.h" 27 27 #include "psTrace.h" 28 #include "psErrorText.h" 28 29 29 #include "psMatrix.h" 30 30 #include "psMinimizePolyFit.h" … … 435 435 default: 436 436 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 437 PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNKNOWN,437 _("The projection type, %d, is unknown."), 438 438 projection->type); 439 439 psFree(out); … … 537 537 default: 538 538 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 539 PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNKNOWN,539 _("The projection type, %d, is unknown."), 540 540 projection->type); 541 541 psFree(out); -
trunk/psLib/src/astro/psEarthOrientation.c
r7766 r8232 8 8 * @author Robert Daniel DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 6-30 02:20:06$10 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:22 $ 12 12 * 13 13 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 24 24 #include "psMetadataConfig.h" 25 25 #include "psError.h" 26 #include "psErrorText.h" 26 27 27 #include "psMemory.h" 28 28 #include "psCoord.h" … … 103 103 "psLib.eoc.precession.table.format"); 104 104 if(! success || tableFormat == NULL) { 105 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,105 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 106 106 "psLib.eoc.precession.table.format"); 107 107 return false; … … 112 112 if(! success || xTableName == NULL) { 113 113 psFree(tableFormat); 114 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,114 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 115 115 "psLib.eoc.precession.x.file"); 116 116 return false; … … 122 122 psFree(tableFormat); 123 123 psFree(xTableName); 124 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,124 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 125 125 "psLib.eoc.precession.y.file"); 126 126 return false; … … 133 133 psFree(xTableName); 134 134 psFree(yTableName); 135 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,135 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 136 136 "psLib.eoc.precession.s.file"); 137 137 return false; … … 145 145 psFree(yTableName); 146 146 psFree(sTableName); 147 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,147 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 148 148 "psLib.eoc.precession.iers.file"); 149 149 return false; … … 158 158 psFree(sTableName); 159 159 psFree(iersTableName); 160 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,160 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 161 161 "psLib.eoc.precession.finals.file"); 162 162 return false; … … 172 172 psFree(iersTableName); 173 173 psFree(finalsTableName); 174 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,174 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 175 175 "psLib.eoc.precession.iers.table.format"); 176 176 return false; … … 187 187 psFree(finalsTableName); 188 188 psFree(iersTableFormat); 189 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,189 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 190 190 "psLib.eoc.precession.iers.table.format"); 191 191 return false; … … 214 214 psVector* xCoeff = psMetadataLookupPtr(&success, eocMetadata, "psLib.eoc.precession.poly.x"); 215 215 if(! success || xCoeff == NULL || xCoeff->type.type != PS_TYPE_F64) { 216 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,216 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 217 217 "psLib.eoc.precession.poly.x"); 218 218 return false; … … 221 221 if(! success || yCoeff == NULL || yCoeff->type.type != PS_TYPE_F64) { 222 222 psFree(xCoeff); 223 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,223 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 224 224 "psLib.eoc.precession.poly.y"); 225 225 return false; … … 229 229 psFree(xCoeff); 230 230 psFree(yCoeff); 231 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,231 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 232 232 "psLib.eoc.precession.poly.s"); 233 233 return false; -
trunk/psLib/src/astro/psSphereOps.c
r7914 r8232 8 8 * @author Dave Robbins, MHPCC 9 9 * 10 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 7-15 02:57:12 $10 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:22 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include "psError.h" 26 26 #include "psLogMsg.h" 27 #include "psErrorText.h" 27 28 28 29 29 … … 225 225 // Check the specified MJD is greater than 1900 226 226 if ( MJD < MJD_1900 ) { 227 psError(PS_ERR_BAD_PARAMETER_TYPE,true, PS_ERRORTEXT_psCoord_INVALID_MJD);227 psError(PS_ERR_BAD_PARAMETER_TYPE,true,_("Specified time is less than 1900.")); 228 228 return NULL; 229 229 } … … 252 252 // Check the specified MJD is greater than 1900 253 253 if ( MJD < MJD_1900 ) { 254 psError(PS_ERR_BAD_PARAMETER_TYPE,true, PS_ERRORTEXT_psCoord_INVALID_MJD);254 psError(PS_ERR_BAD_PARAMETER_TYPE,true,_("Specified time is less than 1900.")); 255 255 return NULL; 256 256 } … … 361 361 else { 362 362 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 363 PS_ERRORTEXT_psCoord_UNITS_UNKNOWN,363 _("Specified units, 0x%x, is not supported."), 364 364 unit); 365 365 psFree(tmp); … … 370 370 } else { 371 371 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 372 PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN,372 _("Specified offset mode, 0x%x, is not supported."), 373 373 mode); 374 374 psFree(tmp); … … 432 432 } else { 433 433 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 434 PS_ERRORTEXT_psCoord_UNITS_UNKNOWN,434 _("Specified units, 0x%x, is not supported."), 435 435 unit); 436 436 return NULL; … … 451 451 } else { 452 452 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 453 PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN,453 _("Specified offset mode, 0x%x, is not supported."), 454 454 mode); 455 455 return NULL; -
trunk/psLib/src/astro/psTime.c
r7961 r8232 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.9 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 7-25 01:16:04$12 * @version $Revision: 1.93 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:22 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 33 33 #include "psLookupTable.h" 34 34 #include "psAssert.h" 35 #include "psErrorText.h" 35 36 36 37 37 #include "config.h" … … 205 205 // Check if table not a metadata item 206 206 if(tableMetadataItem == NULL) { 207 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,207 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 208 208 tableName); 209 209 *status = PS_LOOKUP_ERROR; … … 282 282 if(metadataItem == NULL) { 283 283 p_psMemAllocatePersistent(initialPersistence); 284 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,284 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 285 285 "psLib.time.tables.n"); 286 286 return false; … … 292 292 if(metadataItem == NULL) { 293 293 p_psMemAllocatePersistent(initialPersistence); 294 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,294 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 295 295 "psLib.time.tables.from"); 296 296 return false; … … 299 299 if(tablesFrom->n != numTables) { 300 300 p_psMemAllocatePersistent(initialPersistence); 301 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_BAD_VECTOR, tablesFrom->n, numTables);301 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: %d, Expected %d."), tablesFrom->n, numTables); 302 302 psFree(tablesFrom); 303 303 return false; … … 308 308 if(metadataItem == NULL) { 309 309 p_psMemAllocatePersistent(initialPersistence); 310 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,310 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 311 311 "psLib.time.tables.to"); 312 312 psFree(tablesFrom); … … 316 316 if(tablesTo->n != numTables) { 317 317 p_psMemAllocatePersistent(initialPersistence); 318 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_BAD_VECTOR, tablesTo->n, numTables);318 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: %d, Expected %d."), tablesTo->n, numTables); 319 319 psFree(tablesFrom); 320 320 psFree(tablesTo); … … 326 326 if(metadataItem == NULL) { 327 327 p_psMemAllocatePersistent(initialPersistence); 328 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,328 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Failed find '%s' in time metadata."), 329 329 "psLib.time.tables.index"); 330 330 psFree(tablesFrom); … … 335 335 if(tablesIndex->n != numTables) { 336 336 p_psMemAllocatePersistent(initialPersistence); 337 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_BAD_VECTOR,tablesIndex->n,numTables);337 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Incorrect vector size. Size: %d, Expected %d."),tablesIndex->n,numTables); 338 338 psFree(tablesFrom); 339 339 psFree(tablesTo); … … 346 346 if(metadataItem == NULL) { 347 347 p_psMemAllocatePersistent(initialPersistence); 348 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,348 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 349 349 "psLib.time.tables.dir"); 350 350 psFree(tablesFrom); … … 359 359 if(metadataItem == NULL) { 360 360 p_psMemAllocatePersistent(initialPersistence); 361 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,361 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 362 362 "psLib.time.tables.files"); 363 363 … … 374 374 if(metadataItem == NULL) { 375 375 p_psMemAllocatePersistent(initialPersistence); 376 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,376 psError(PS_ERR_BAD_PARAMETER_VALUE,true, _("Failed find '%s' in time metadata."), 377 377 "psLib.time.tables.format"); 378 378 psFree(tablesFrom); … … 404 404 tableFormat = getToken(&formatPtr,",",&status); 405 405 if(tableFormat == NULL) { 406 psError(PS_ERR_BAD_PARAMETER_VALUE,no_problem, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,406 psError(PS_ERR_BAD_PARAMETER_VALUE,no_problem,_("Failed find '%s' in time metadata."), 407 407 "psLib.time.tables.format"); 408 408 no_problem = false; … … 415 415 } else { 416 416 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, 417 PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, i+1, numTables);417 _("Incorrect number of table files entered. Found: %d. Expected: %d."), i+1, numTables); 418 418 no_problem = false; 419 419 } … … 429 429 } else if(foundTable==false && j==numTables-1) { 430 430 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, 431 PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, j, numTables);431 _("Incorrect number of table files entered. Found: %d. Expected: %d."), j, numTables); 432 432 no_problem = false; 433 433 } … … 444 444 445 445 if(numTables != i) { 446 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, i, numTables);446 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, _("Incorrect number of table files entered. Found: %d. Expected: %d."), i, numTables); 447 447 } 448 448 … … 480 480 type!=PS_TIME_TT) { 481 481 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 482 PS_ERRORTEXT_psTime_TYPE_UNKNOWN,482 _("Specified type, %d, is not supported."), 483 483 type); 484 484 return NULL; … … 521 521 if (gettimeofday(&now, 0) == -1) { 522 522 psError(PS_ERR_OS_CALL_FAILED, true, 523 PS_ERRORTEXT_psTime_GET_TOD_FAILED);523 _("Failed to determine the current time from gettimeofday function.")); 524 524 return NULL; 525 525 } … … 728 728 // Convert from TAI to unknown time type 729 729 } else { 730 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);730 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type); 731 731 return NULL; 732 732 } … … 753 753 // Convert from TT to unknown time type 754 754 } else { 755 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);755 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type); 756 756 return NULL; 757 757 } … … 772 772 // Convert UTC to unknown time type 773 773 } else { 774 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);774 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type); 775 775 return NULL; 776 776 } 777 777 // Convert unknown time type 778 778 } else { 779 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, time->type);779 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), time->type); 780 780 return NULL; 781 781 } … … 810 810 // Verify input time is not in UT1 seconds 811 811 if(time->type == PS_TIME_UT1) { 812 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_TYPE_INCORRECT,time->type);812 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),time->type); 813 813 return NAN; 814 814 } … … 897 897 898 898 // Date too early for tables. Get default time delta value from metadata, and issue warning. 899 psLogMsg(__func__,PS_LOG_WARN, PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES,mjd,"UT1-UTC");899 psLogMsg(__func__,PS_LOG_WARN,_("Specified psTime predates (%g) all tables of %s information."),mjd,"UT1-UTC"); 900 900 901 901 // Lookup value from time metadata loaded from pslib.config 902 902 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.before.dut"); 903 903 if(tableMetadataItem == NULL) { 904 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,904 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 905 905 "psLib.time.before.dut"); 906 906 return NAN; … … 917 917 */ 918 918 // Generate warning of postdate information 919 psLogMsg(__func__,PS_LOG_WARN, PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "UT1-UTC");919 psLogMsg(__func__,PS_LOG_WARN,_("Specified psTime postdates (%g) all tables of %s information."), mjd, "UT1-UTC"); 920 920 921 921 // Lookup values to calculate prediction 922 922 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.dut"); 923 923 if(tableMetadataItem == NULL) { 924 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,924 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 925 925 "psLib.time.predict.dut"); 926 926 return NAN; … … 935 935 936 936 } else if(status != PS_LOOKUP_SUCCESS) { 937 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);937 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation.")); 938 938 return NAN; 939 939 } … … 1059 1059 1060 1060 if(time->type != PS_TIME_TAI) { 1061 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_INCORRECT, time->type);1061 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is incorrect."), time->type); 1062 1062 return NULL; 1063 1063 } … … 1075 1075 // Date too earlier for tables. Get default polar coodinate values from metadata, and issue warning. 1076 1076 #if 0 1077 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES, mjd, "polar motion");1077 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified psTime predates (%g) all tables of %s information."), mjd, "polar motion"); 1078 1078 return NULL; 1079 1079 #else 1080 1080 1081 psLogMsg(PS_FILE_LINE, PS_LOG_ERROR, PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES, mjd, "polar motion");1081 psLogMsg(PS_FILE_LINE, PS_LOG_ERROR, _("Specified psTime predates (%g) all tables of %s information."), mjd, "polar motion"); 1082 1082 #endif 1083 1083 … … 1085 1085 if(tableMetadataItem == NULL) { 1086 1086 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1087 PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.before.xp");1087 _("Failed find '%s' in time metadata."), "psLib.time.before.xp"); 1088 1088 return NULL; 1089 1089 } … … 1092 1092 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.before.yp"); 1093 1093 if(tableMetadataItem == NULL) { 1094 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.before.yp");1094 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.before.yp"); 1095 1095 return NULL; 1096 1096 } … … 1110 1110 #if 0 1111 1111 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1112 PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "polar motion");1112 _("Specified psTime postdates (%g) all tables of %s information."), mjd, "polar motion"); 1113 1113 return NULL; 1114 1114 #else 1115 1115 1116 1116 psLogMsg(PS_FILE_LINE, PS_LOG_ERROR, 1117 PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "polar motion");1117 _("Specified psTime postdates (%g) all tables of %s information."), mjd, "polar motion"); 1118 1118 #endif 1119 1119 … … 1121 1121 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.mjd"); 1122 1122 if(tableMetadataItem == NULL) { 1123 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,1123 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 1124 1124 "psLib.time.predict.mjd"); 1125 1125 return NULL; … … 1130 1130 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.xp"); 1131 1131 if(tableMetadataItem == NULL) { 1132 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.predict.xp");1132 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.predict.xp"); 1133 1133 return NULL; 1134 1134 } … … 1139 1139 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.yp"); 1140 1140 if(tableMetadataItem == NULL) { 1141 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.predict.yp");1141 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.predict.yp"); 1142 1142 return NULL; 1143 1143 } … … 1163 1163 1164 1164 } else if(xStatus!=PS_LOOKUP_SUCCESS || yStatus!=PS_LOOKUP_SUCCESS) { 1165 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);1165 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation.")); 1166 1166 return NULL; 1167 1167 } … … 1193 1193 // Check if psTime tables are loaded/loadable 1194 1194 if(!p_psTimeInit(p_psGetConfigFileName())) { 1195 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_FILE_NOT_FOUND,1195 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed to open file %s."), 1196 1196 p_psGetConfigFileName()); 1197 1197 return NAN; … … 1201 1201 tableMetadataItem = psMetadataLookup(timeMetadata, "taiTable"); 1202 1202 if(tableMetadataItem == NULL) { 1203 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "taiTable");1203 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "taiTable"); 1204 1204 return NAN; 1205 1205 } … … 1228 1228 // Check for successful interpolation 1229 1229 if(results == NULL) { 1230 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);1230 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation.")); 1231 1231 return NAN; 1232 1232 } … … 1273 1273 // Verify time is UTC type 1274 1274 if(utc->type != PS_TIME_UTC) { 1275 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_TYPE_INCORRECT,utc->type);1275 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),utc->type); 1276 1276 return false; 1277 1277 } … … 1371 1371 // Converts psTime to YYYY-MM-DDThh:mm:ss.sss in string form 1372 1372 if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y-%m-%dT%H:%M:%S", tmTime)) { 1373 psError(PS_ERR_OS_CALL_FAILED, true, PS_ERRORTEXT_psTime_CONVERT_TIME_TO_STRING_FAILED);1373 psError(PS_ERR_OS_CALL_FAILED, true, _("Failed to convert a time via strftime function.")); 1374 1374 return NULL; 1375 1375 } … … 1385 1385 // Create string with milliseconds 1386 1386 if (snprintf(timeString, MAX_TIME_STRING_LENGTH, "%s.%1dZ", tempString, ds) < 0) { 1387 psError(PS_ERR_OS_CALL_FAILED, true, PS_ERRORTEXT_psTime_APPEND_MSEC_FAILED);1387 psError(PS_ERR_OS_CALL_FAILED, true, _("Failed to append millisecond to time string with snprintf function.")); 1388 1388 return NULL; 1389 1389 } … … 1501 1501 if (sscanf(input, "%d-%d-%dT%d:%d:%d.%d", &tmTime.tm_year, &tmTime.tm_mon, &tmTime.tm_mday, 1502 1502 &tmTime.tm_hour, &tmTime.tm_min, &tmTime.tm_sec,&millisecond) < 7) { 1503 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_ISOTIME_MALFORMED, input);1503 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified ISO Time string, '%s', is malformed. Must be in 'YYYY-MM-DDThh:mm:ss.sss' format."), input); 1504 1504 return NULL; 1505 1505 } … … 1760 1760 // Verify both times of the same type 1761 1761 if(time1->type != time2->type) { 1762 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_TYPE_INCORRECT,time1->type);1762 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),time1->type); 1763 1763 return NAN; 1764 1764 } -
trunk/psLib/src/db/psDB.c
r8116 r8232 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.7 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-08-0 4 03:50:56$14 * @version $Revision: 1.78 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-08-08 23:32:22 $ 16 16 * 17 17 * Copyright (C) 2005-2006 Joshua Hoblitt, University of Hawaii … … 37 37 #include "psError.h" 38 38 #include "psString.h" 39 #include "psErrorText.h" 39 40 40 41 41 // set the pointer to NULL if we are actually freeing the memory … … 142 142 if (!mysql_real_connect(mysql, host, user, passwd, dbname, 0, NULL, 0)) { 143 143 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 144 PS_ERRORTEXT_psDB_FAILED_TO_CONNECT,mysql_error(mysql));144 _("Failed to connect to database. Error: %s"),mysql_error(mysql)); 145 145 146 146 mysql_close(mysql); … … 247 247 // Attempt to select new database 248 248 if (mysql_select_db(dbh->mysql, dbname) != 0) { 249 psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_FAILED_TO_CHANGE,249 psError(PS_ERR_UNKNOWN, true, _("Failed to change database. Error: %s"), 250 250 mysql_error(dbh->mysql)); 251 251 … … 287 287 char *query = psDBGenerateCreateTableSQL(tableName, md); 288 288 if (!query) { 289 psError(PS_ERR_UNEXPECTED_NULL, false, PS_ERRORTEXT_psDB_QUERY_GEN_FAIL);289 psError(PS_ERR_UNEXPECTED_NULL, false, _("Query generation failed.")); 290 290 return false; 291 291 } … … 294 294 bool status = p_psDBRunQuery(dbh, query); 295 295 if (!status) { 296 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psDB_TABLE_CREATE_FAIL);296 psError(PS_ERR_UNKNOWN, false, _("Failed to create table.")); 297 297 } 298 298 … … 315 315 bool status = p_psDBRunQuery(dbh, query); 316 316 if (!status) { 317 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psDB_TABLE_DROP_FAIL);317 psError(PS_ERR_UNKNOWN, false, _("Failed to drop table.")); 318 318 } 319 319 … … 343 343 char *query = psDBGenerateSelectRowSQL(tableName, col, NULL, limit); 344 344 if (!query) { 345 psError(PS_ERR_UNEXPECTED_NULL, false, PS_ERRORTEXT_psDB_QUERY_GEN_FAIL);345 psError(PS_ERR_UNEXPECTED_NULL, false, _("Query generation failed.")); 346 346 return NULL; 347 347 } … … 349 349 // Execut SQL query string 350 350 if (!p_psDBRunQuery(dbh, query)) { 351 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psDB_SEL_COL_FAIL);351 psError(PS_ERR_UNKNOWN, false, _("Failed to select column.")); 352 352 psFree(query); 353 353 return NULL; … … 365 365 // then something bad has happened. 366 366 if (fieldCount != 0) { 367 psError(PS_ERR_UNEXPECTED_NULL, true, PS_ERRORTEXT_psDB_QUERY_NO_DATA,367 psError(PS_ERR_UNEXPECTED_NULL, true, _("Query returned no data. Error: %s"), 368 368 mysql_error(dbh->mysql)); 369 369 return NULL; … … 561 561 // Execute function to insert rows 562 562 if (!psDBInsertRows(dbh, tableName, rowSet)) { 563 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psDB_INSERT_ROW_FAIL);563 psError(PS_ERR_UNKNOWN, false, _("Failed to insert row.")); 564 564 psFree(rowSet); 565 565 return false; … … 586 586 char *query = psDBGenerateInsertRowSQL(tableName, row); 587 587 if (!query) { 588 psError(PS_ERR_UNEXPECTED_NULL, false, PS_ERRORTEXT_psDB_QUERY_GEN_FAIL);588 psError(PS_ERR_UNEXPECTED_NULL, false, _("Query generation failed.")); 589 589 return false; 590 590 } … … 675 675 char *query = psDBGenerateUpdateRowSQL(tableName, where, values); 676 676 if (!query) { 677 psError(PS_ERR_UNEXPECTED_NULL, false, PS_ERRORTEXT_psDB_QUERY_GEN_FAIL);677 psError(PS_ERR_UNEXPECTED_NULL, false, _("Query generation failed.")); 678 678 return -1; 679 679 } … … 801 801 "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null) WHERE' at line 1", 165); 802 802 if ( !strncmp(mysql_error(dbh->mysql), mysqlTemp, 145) ) { 803 psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_SQL_QUERY_FAIL, mysqlTemp);803 psError(PS_ERR_UNKNOWN, true, _("Failed to execute SQL query. Error: %s"), mysqlTemp); 804 804 } else { 805 psError(PS_ERR_UNKNOWN, true, PS_ERRORTEXT_psDB_SQL_QUERY_FAIL, mysql_error(dbh->mysql));805 psError(PS_ERR_UNKNOWN, true, _("Failed to execute SQL query. Error: %s"), mysql_error(dbh->mysql)); 806 806 } 807 807 psFree(query); … … 1405 1405 setSQL = psDBGenerateSetSQL(values); 1406 1406 if (!setSQL) { 1407 psError(PS_ERR_UNEXPECTED_NULL, false, PS_ERRORTEXT_psDB_SQL_SUBSTR_FAIL);1407 psError(PS_ERR_UNEXPECTED_NULL, false, _("SQL substring generation failed.")); 1408 1408 return NULL; 1409 1409 } … … 1412 1412 whereSQL = psDBGenerateWhereSQL(where); 1413 1413 if (!whereSQL) { 1414 psError(PS_ERR_UNEXPECTED_NULL, false, PS_ERRORTEXT_psDB_SQL_SUBSTR_FAIL);1414 psError(PS_ERR_UNEXPECTED_NULL, false, _("SQL substring generation failed.")); 1415 1415 return NULL; 1416 1416 } … … 1443 1443 whereSQL = psDBGenerateWhereSQL(where); 1444 1444 if (!whereSQL) { 1445 psError(PS_ERR_UNEXPECTED_NULL, false, PS_ERRORTEXT_psDB_SQL_SUBSTR_FAIL);1445 psError(PS_ERR_UNEXPECTED_NULL, false, _("SQL substring generation failed.")); 1446 1446 return NULL; 1447 1447 } -
trunk/psLib/src/fft/psImageFFT.c
r4543 r8232 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $8 * @date $Date: 200 5-07-12 19:30:18$7 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-08-08 23:32:23 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psImageStructManip.h" 22 22 23 #include "psErrorText.h" 23 24 24 25 25 #define PS_FFTW_PLAN_RIGOR FFTW_ESTIMATE … … 43 43 if ((direction & PS_FFT_REVERSE) != 0) { 44 44 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 45 PS_ERRORTEXT_psImageFFT_FORWARD_REVERSE);45 _("Can not specify both PS_FFT_FORWARD and PS_FFT_REVERSE options.")); 46 46 psFree(out); 47 47 return NULL; … … 49 49 if ((direction & PS_FFT_REAL_RESULT) != 0) { 50 50 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 51 PS_ERRORTEXT_psImageFFT_REAL_FORWARD_NOTSUPPORTED);51 _("The PS_FFT_FORWARD and PS_FFT_REAL_RESULT combinition is not supported.")); 52 52 psFree(out); 53 53 return NULL; … … 55 55 } else if ((direction & PS_FFT_REVERSE) == 0) { 56 56 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 57 PS_ERRORTEXT_psImageFFT_NO_DIRECTION_OPTION);57 _("Must specify either PS_FFT_FORWARD or PS_FFT_REVERSE option.")); 58 58 psFree(out); 59 59 return NULL; … … 86 86 if (plan == NULL) { 87 87 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 88 PS_ERRORTEXT_psImageFFT_FFTW_PLAN_NULL);88 _("Could not create a valid FFT plan to perform the transform.")); 89 89 psFree(out); 90 90 return NULL; … … 179 179 PS_TYPE_NAME(typeStr,type); 180 180 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 181 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,181 _("Specified psImage type, %s, is not supported."), 182 182 typeStr); 183 183 … … 241 241 PS_TYPE_NAME(typeStr,type); 242 242 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 243 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,243 _("Specified psImage type, %s, is not supported."), 244 244 typeStr); 245 245 psFree(out); … … 271 271 PS_TYPE_NAME(typeStrImag,imag->type.type); 272 272 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 273 PS_ERRORTEXT_psImageFFT_REAL_IMAG_TYPE_MISMATCH,273 _("Real psImage type (%s) and imaginary psImage type (%s) must be the same."), 274 274 typeStrReal,typeStrImag); 275 275 psFree(out); … … 279 279 if (imag->numCols != numCols || imag->numRows != numRows) { 280 280 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 281 PS_ERRORTEXT_psImageFFT_REAL_IMAG_SIZE_MISMATCH,281 _("Real psImage size (%dx%d) and imaginary psImage size (%dx%d) must be the same."), 282 282 numCols, numRows, imag->numCols, imag->numRows); 283 283 psFree(out); … … 320 320 PS_TYPE_NAME(typeStr,type); 321 321 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 322 PS_ERRORTEXT_psImageFFT_NONREAL_NOTSUPPORTED,322 _("Input psImage type, %s, is required to be either psF32 or psF64."), 323 323 typeStr); 324 324 psFree(out); … … 380 380 PS_TYPE_NAME(typeStr,type); 381 381 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 382 PS_ERRORTEXT_psImageFFT_NONCOMPLEX_NOTSUPPORTED,382 _("Input psImage type, %s, is required to be either psC32 or psC64."), 383 383 typeStr); 384 384 psFree(out); … … 446 446 PS_TYPE_NAME(typeStr,type); 447 447 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 448 PS_ERRORTEXT_psImageFFT_NONCOMPLEX_NOTSUPPORTED,448 _("Input psImage type, %s, is required to be either psC32 or psC64."), 449 449 typeStr); 450 450 psFree(out); -
trunk/psLib/src/fft/psVectorFFT.c
r4540 r8232 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.3 3$ $Name: not supported by cvs2svn $8 * @date $Date: 200 5-07-12 19:12:01$7 * @version $Revision: 1.34 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-08-08 23:32:23 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 22 22 #include "psLogMsg.h" 23 23 24 #include "psErrorText.h" 24 25 25 26 26 #define P_FFTW_PLAN_RIGOR FFTW_ESTIMATE … … 63 63 } else { 64 64 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 65 PS_ERRORTEXT_psVectorFFT_DIRECTION_NOTSET);65 _("Must specify the direction as either PS_FFT_FORWARD or PS_FFT_REVERSE.")); 66 66 psFree(out); 67 67 return NULL; … … 71 71 if (plan == NULL) { 72 72 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 73 PS_ERRORTEXT_psVectorFFT_FFTW_PLAN_NULL);73 _("Could not create a valid FFT plan to perform the transform.")); 74 74 psFree(out); 75 75 return NULL; … … 142 142 PS_TYPE_NAME(typeStr,type); 143 143 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 144 PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED,144 _("Specified psVector type, %s, is not supported."), 145 145 typeStr); 146 146 psFree(out); … … 201 201 PS_TYPE_NAME(typeStr,type); 202 202 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 203 PS_ERRORTEXT_psVectorFFT_TYPE_UNSUPPORTED,203 _("Specified psVector type, %s, is not supported."), 204 204 typeStr); 205 205 psFree(out); … … 233 233 PS_TYPE_NAME(typeStrImag,imag->type.type); 234 234 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 235 PS_ERRORTEXT_psVectorFFT_REAL_IMAG_TYPE_MISMATCH,235 _("Real psVector type, %s, and imaginary psVector type, %s, must be the same."), 236 236 typeStrReal,typeStrImag); 237 237 psFree(out); … … 267 267 PS_TYPE_NAME(typeStr,type); 268 268 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 269 PS_ERRORTEXT_psVectorFFT_NONREAL_NOTSUPPORTED,269 _("Input psVector type, %s, is required to be either psF32 or psF64."), 270 270 typeStr); 271 271 psFree(out); … … 327 327 PS_TYPE_NAME(typeStr,type); 328 328 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 329 PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED,329 _("Input psVector type, %s, is required to be either psC32 or psC64."), 330 330 typeStr); 331 331 psFree(out); … … 407 407 PS_TYPE_NAME(typeStr,type); 408 408 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 409 PS_ERRORTEXT_psVectorFFT_NONCOMPLEX_NOTSUPPORTED,409 _("Input psVector type, %s, is required to be either psC32 or psC64."), 410 410 typeStr); 411 411 psFree(out); -
trunk/psLib/src/fits/psFits.c
r7914 r8232 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.5 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 7-15 02:57:12$9 * @version $Revision: 1.58 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 18 18 #include "string.h" 19 19 #include "psError.h" 20 #include "psErrorText.h" 20 21 21 #include "psImageStructManip.h" 22 22 #include "psMemory.h" … … 73 73 if (fits == NULL) { 74 74 psError(PS_ERR_BAD_PARAMETER_NULL, true, 75 PS_ERRORTEXT_psFits_NULL);75 _("The input psFits object can not NULL.")); 76 76 return false; 77 77 } … … 91 91 if (name == NULL) { 92 92 psError(PS_ERR_BAD_PARAMETER_NULL, true, 93 PS_ERRORTEXT_psFits_FILENAME_NULL);93 _("Specified filename can not be NULL.")); 94 94 return NULL; 95 95 } … … 139 139 fits_get_errstatus(status, fitsErr); 140 140 psError(PS_ERR_IO, true, 141 PS_ERRORTEXT_psFits_FILENAME_CREATE_FAILED,141 _("Could not create file,'%s'. CFITSIO Error: %s"), 142 142 name, fitsErr); 143 143 return NULL; … … 158 158 fits_get_errstatus(status, fitsErr); 159 159 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 160 PS_ERRORTEXT_psFits_FILENAME_INVALID,160 _("Could not open file,'%s'. CFITSIO Error: %s"), 161 161 name, fitsErr); 162 162 return NULL; … … 188 188 if (fits == NULL) { 189 189 psError(PS_ERR_BAD_PARAMETER_NULL, true, 190 PS_ERRORTEXT_psFits_NULL);190 _("The input psFits object can not NULL.")); 191 191 return false; 192 192 } … … 194 194 if (extname == NULL) { 195 195 psError(PS_ERR_BAD_PARAMETER_NULL, true, 196 PS_ERRORTEXT_psFits_EXTNAME_NULL);196 _("Specified extension name can not be NULL.")); 197 197 return false; 198 198 } … … 203 203 fits_get_errstatus(status, fitsErr); 204 204 psError(PS_ERR_LOCATION_INVALID, true, 205 PS_ERRORTEXT_psFits_EXTNAME_INVALID,205 _("Could not find HDU '%s'. CFITSIO Error: %s"), 206 206 extname, fitsErr); 207 207 return false; … … 217 217 if (fits == NULL) { 218 218 psError(PS_ERR_BAD_PARAMETER_NULL, true, 219 PS_ERRORTEXT_psFits_NULL);219 _("The input psFits object can not NULL.")); 220 220 return false; 221 221 } … … 230 230 fits_get_errstatus(status, fitsErr); 231 231 psError(PS_ERR_LOCATION_INVALID, true, 232 PS_ERRORTEXT_psFits_EXTNUM_REL_MOVE_FAILED,232 _("Could not move %d HDUs from current position. CFITSIO Error: %s"), 233 233 extnum, fitsErr); 234 234 return false; … … 240 240 fits_get_errstatus(status, fitsErr); 241 241 psError(PS_ERR_LOCATION_INVALID, true, 242 PS_ERRORTEXT_psFits_EXTNUM_ABS_MOVE_FAILED,242 _("Could not move to specified HDU #%d. CFITSIO Error: %s"), 243 243 extnum, fitsErr); 244 244 return false; … … 253 253 if (fits == NULL) { 254 254 psError(PS_ERR_BAD_PARAMETER_NULL, true, 255 PS_ERRORTEXT_psFits_NULL);255 _("The input psFits object can not NULL.")); 256 256 return false; 257 257 } … … 270 270 if (fits == NULL) { 271 271 psError(PS_ERR_BAD_PARAMETER_NULL, true, 272 PS_ERRORTEXT_psFits_NULL);272 _("The input psFits object can not NULL.")); 273 273 return PS_FITS_TYPE_NONE; 274 274 } … … 282 282 if (fits == NULL) { 283 283 psError(PS_ERR_BAD_PARAMETER_NULL, true, 284 PS_ERRORTEXT_psFits_NULL);284 _("The input psFits object can not NULL.")); 285 285 return NULL; 286 286 } … … 303 303 if (fits == NULL) { 304 304 psError(PS_ERR_BAD_PARAMETER_NULL, true, 305 PS_ERRORTEXT_psFits_NULL);305 _("The input psFits object can not NULL.")); 306 306 return false; 307 307 } … … 309 309 if (name == NULL) { 310 310 psError(PS_ERR_BAD_PARAMETER_NULL, true, 311 PS_ERRORTEXT_psFits_EXTNAME_NULL);311 _("Specified extension name can not be NULL.")); 312 312 return false; 313 313 } … … 319 319 (void)fits_get_errstatus(status, fitsErr); 320 320 psError(PS_ERR_IO, true, 321 PS_ERRORTEXT_psFits_WRITE_FAILED,321 _("Could not write data to file. CFITSIO Error: %s"), 322 322 fitsErr); 323 323 return false; … … 333 333 if (fits == NULL) { 334 334 psError(PS_ERR_BAD_PARAMETER_NULL, true, 335 PS_ERRORTEXT_psFits_NULL);335 _("The input psFits object can not NULL.")); 336 336 return false; 337 337 } … … 339 339 if (! fits->writable) { 340 340 psError(PS_ERR_IO, true, 341 PS_ERRORTEXT_psFits_NOT_WRITABLE);341 _("The psFits object is not writable.")); 342 342 return false; 343 343 } … … 358 358 (void)fits_get_errstatus(status, fitsErr); 359 359 psError(PS_ERR_IO, true, 360 PS_ERRORTEXT_psFits_WRITE_FAILED,360 _("Could not write data to file. CFITSIO Error: %s"), 361 361 fitsErr); 362 362 return false; … … 371 371 if (fits == NULL) { 372 372 psError(PS_ERR_BAD_PARAMETER_NULL, true, 373 PS_ERRORTEXT_psFits_NULL);373 _("The input psFits object can not NULL.")); 374 374 return false; 375 375 } … … 377 377 if (! fits->writable) { 378 378 psError(PS_ERR_IO, true, 379 PS_ERRORTEXT_psFits_NOT_WRITABLE);379 _("The psFits object is not writable.")); 380 380 return false; 381 381 } … … 397 397 (void)fits_get_errstatus(status, fitsErr); 398 398 psError(PS_ERR_IO, true, 399 PS_ERRORTEXT_psFits_WRITE_FAILED,399 _("Could not write data to file. CFITSIO Error: %s"), 400 400 fitsErr); 401 401 return false; … … 409 409 if (fits == NULL) { 410 410 psError(PS_ERR_BAD_PARAMETER_NULL, true, 411 PS_ERRORTEXT_psFits_NULL);411 _("The input psFits object can not NULL.")); 412 412 return 0; 413 413 } … … 420 420 fits_get_errstatus(status, fitsErr); 421 421 psError(PS_ERR_LOCATION_INVALID, true, 422 PS_ERRORTEXT_psFits_GETNUMHDUS_FAILED,422 _("Failed to determine the number of HDUs. CFITSIO Error: %s"), 423 423 fitsErr); 424 424 return 0; … … 432 432 if (fits == NULL) { 433 433 psError(PS_ERR_BAD_PARAMETER_NULL, true, 434 PS_ERRORTEXT_psFits_NULL);434 _("The input psFits object can not NULL.")); 435 435 return PS_FITS_TYPE_NONE; 436 436 } … … 443 443 fits_get_errstatus(status, fitsErr); 444 444 psError(PS_ERR_LOCATION_INVALID, true, 445 PS_ERRORTEXT_psFits_GETHDUTYPE_FAILED,445 _("Failed to determine an HDU type. CFITSIO Error: %s"), 446 446 fitsErr); 447 447 return PS_FITS_TYPE_NONE; … … 461 461 if (fits == NULL) { 462 462 psError(PS_ERR_BAD_PARAMETER_NULL, true, 463 PS_ERRORTEXT_psFits_NULL);463 _("The input psFits object can not NULL.")); 464 464 return PS_FITS_TYPE_NONE; 465 465 } … … 467 467 if (! fits->writable) { 468 468 psError(PS_ERR_IO, true, 469 PS_ERRORTEXT_psFits_NOT_WRITABLE);469 _("The psFits object is not writable.")); 470 470 return PS_FITS_TYPE_NONE; 471 471 } … … 601 601 PS_TYPE_NAME(typeStr,type); 602 602 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 603 PS_ERRORTEXT_psFits_TYPE_UNSUPPORTED,603 _("Specified type, %s, is not supported."), 604 604 typeStr); 605 605 return false; -
trunk/psLib/src/fits/psFitsHeader.c
r7823 r8232 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 7-06 01:13:11$9 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 19 19 #include "strings.h" 20 20 #include "psError.h" 21 #include "psErrorText.h" 21 22 22 #include "psImageStructManip.h" 23 23 #include "psMemory.h" … … 48 48 if (fits == NULL) { 49 49 psError(PS_ERR_BAD_PARAMETER_NULL, true, 50 PS_ERRORTEXT_psFits_NULL);50 _("The input psFits object can not NULL.")); 51 51 return NULL; 52 52 } … … 181 181 } 182 182 default: 183 psError(PS_ERR_IO, true, PS_ERRORTEXT_psFits_METATYPE_INVALID, keyType);183 psError(PS_ERR_IO, true, _("Specified FITS metadata type, %c, is not supported."), keyType); 184 184 return out; 185 185 } 186 186 187 187 if (!success) { 188 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psFits_METADATA_ADD_FAILED, keyName);188 psError(PS_ERR_UNKNOWN, false, _("Failed to add metadata item, %s."), keyName); 189 189 return out; 190 190 } … … 195 195 char fitsErr[MAX_STRING_LENGTH]; 196 196 (void)fits_get_errstatus(status, fitsErr); 197 psError(PS_ERR_IO, true, PS_ERRORTEXT_psFits_METADATA_ADD_FAILED, fitsErr);197 psError(PS_ERR_IO, true, _("Failed to add metadata item, %s."), fitsErr); 198 198 return false; 199 199 } … … 205 205 { 206 206 if (fits == NULL) { 207 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psFits_NULL);207 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psFits object can not NULL.")); 208 208 psFree(out); 209 209 return NULL; … … 385 385 char fitsErr[MAX_STRING_LENGTH]; 386 386 (void)fits_get_errstatus(status, fitsErr); 387 psError(PS_ERR_IO, true, PS_ERRORTEXT_psFits_WRITE_FAILED, fitsErr);387 psError(PS_ERR_IO, true, _("Could not write data to file. CFITSIO Error: %s"), fitsErr); 388 388 return false; 389 389 } … … 400 400 { 401 401 if (!fits) { 402 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psFits_NULL);402 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psFits object can not NULL.")); 403 403 return false; 404 404 } 405 405 406 406 if (!output) { 407 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psFits_METADATA_NULL);407 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psMetadata was NULL. Need a non-NULL psMetadata for operation to be performed.")); 408 408 return false; 409 409 } … … 417 417 { 418 418 if (!fits) { 419 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psFits_NULL);419 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psFits object can not NULL.")); 420 420 return false; 421 421 } … … 443 443 { 444 444 if (header == NULL) { 445 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psFits_METADATA_NULL);445 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psMetadata was NULL. Need a non-NULL psMetadata for operation to be performed.")); 446 446 return false; 447 447 } -
trunk/psLib/src/fits/psFitsImage.c
r7846 r8232 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 7-08 03:06:40$9 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 19 19 #include "string.h" 20 20 #include "psError.h" 21 #include "psErrorText.h" 21 22 22 #include "psImageStructManip.h" 23 23 #include "psMemory.h" … … 49 49 if (fits == NULL) { 50 50 psError(PS_ERR_BAD_PARAMETER_NULL, true, 51 PS_ERRORTEXT_psFits_NULL);51 _("The input psFits object can not NULL.")); 52 52 return NULL; 53 53 } … … 59 59 (void)fits_get_errstatus(status, fitsErr); 60 60 psError(PS_ERR_IO, true, 61 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,61 _("Could not determine the HDU type. CFITSIO Error: %s"), 62 62 fitsErr); 63 63 return NULL; … … 65 65 if (hdutype != IMAGE_HDU) { 66 66 psError(PS_ERR_IO, true, 67 PS_ERRORTEXT_psFits_NOT_IMAGE_TYPE);67 _("Current FITS HDU type must be an image.")); 68 68 return NULL; 69 69 } … … 73 73 fits_get_errstatus(status, fitsErr); 74 74 psError(PS_ERR_IO, true, 75 PS_ERRORTEXT_psFits_DATATYPE_UNKNOWN,75 _("Could not determine image data type. CFITSIO Error: %s"), 76 76 fitsErr); 77 77 return NULL; … … 82 82 (void)fits_get_errstatus(status, fitsErr); 83 83 psError(PS_ERR_IO, true, 84 PS_ERRORTEXT_psFits_IMAGE_DIM_UNKNOWN,84 _("Could not determine image dimensions. CFITSIO Error: %s"), 85 85 fitsErr); 86 86 return NULL; … … 90 90 if ((nAxis < 2) || (nAxis > 3)) { 91 91 psError(PS_ERR_IO, true, 92 PS_ERRORTEXT_psFits_IMAGE_DIMENSION_UNSUPPORTED,92 _("Image number of dimensions, %d, is not valid. Only two or three dimensions supported for FITS I/O."), 93 93 nAxis); 94 94 return NULL; … … 99 99 (void)fits_get_errstatus(status, fitsErr); 100 100 psError(PS_ERR_IO, true, 101 PS_ERRORTEXT_psFits_IMAGE_SIZE_UNKNOWN,101 _("Could not determine image size. CFITSIO Error: %s"), 102 102 fitsErr); 103 103 return NULL; … … 163 163 default: 164 164 psError(PS_ERR_IO, true, 165 PS_ERRORTEXT_psFits_FITS_TYPE_UNSUPPORTED,165 _("FITS image type, BITPIX=%d, is not supported."), 166 166 bitPix); 167 167 return NULL; … … 178 178 (void)fits_get_errstatus(status, fitsErr); 179 179 psError(PS_ERR_IO, true, 180 PS_ERRORTEXT_psFits_READ_FAILED,180 _("Reading FITS file failed. CFITSIO Error: %s"), 181 181 fitsErr); 182 182 return NULL; … … 208 208 209 209 if (!fits) { 210 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psFits_NULL);210 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psFits object can not NULL.")); 211 211 return false; 212 212 } 213 213 214 214 if (!input) { 215 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psFits_IMAGE_NULL);215 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("The input psImage was NULL. Need a non-NULL psImage for operation to be performed.")); 216 216 return false; 217 217 } … … 299 299 (void)fits_get_errstatus(status, fitsErr); 300 300 psError(PS_ERR_IO, true, 301 PS_ERRORTEXT_psFits_WRITE_FAILED,301 _("Could not write data to file. CFITSIO Error: %s"), 302 302 fitsErr); 303 303 return false; … … 318 318 if (fits == NULL) { 319 319 psError(PS_ERR_BAD_PARAMETER_NULL, true, 320 PS_ERRORTEXT_psFits_NULL);320 _("The input psFits object can not NULL.")); 321 321 return false; 322 322 } … … 324 324 if (input == NULL) { 325 325 psError(PS_ERR_BAD_PARAMETER_NULL, true, 326 PS_ERRORTEXT_psFits_IMAGE_NULL);326 _("The input psImage was NULL. Need a non-NULL psImage for operation to be performed.")); 327 327 return false; 328 328 } … … 334 334 (void)fits_get_errstatus(status, fitsErr); 335 335 psError(PS_ERR_IO, true, 336 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,336 _("Could not determine the HDU type. CFITSIO Error: %s"), 337 337 fitsErr); 338 338 return NULL; … … 340 340 if (hdutype != IMAGE_HDU) { 341 341 psError(PS_ERR_IO, true, 342 PS_ERRORTEXT_psFits_NOT_IMAGE_TYPE);342 _("Current FITS HDU type must be an image.")); 343 343 return NULL; 344 344 } … … 369 369 PS_TYPE_NAME(imageTypeStr,input->type.type); 370 370 psError(PS_ERR_IO, true, 371 PS_ERRORTEXT_psFits_IMAGE_UPDATE_TYPE_MISMATCH,371 _("Can not update a %s image given a %s image."), 372 372 fitsTypeStr, imageTypeStr); 373 373 return false; … … 377 377 if (z >= nAxes[2]) { 378 378 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 379 PS_ERRORTEXT_psFits_FITS_Z_SMALL,379 _("Current FITS HDU has %d z-planes, but z-plane %d was specified."), 380 380 nAxes[2],z); 381 381 return false; … … 412 412 (void)fits_get_errstatus(status, fitsErr); 413 413 psError(PS_ERR_IO, true, 414 PS_ERRORTEXT_psFits_WRITE_FAILED,414 _("Could not write data to file. CFITSIO Error: %s"), 415 415 fitsErr); 416 416 return false; … … 429 429 if (fits == NULL) { 430 430 psError(PS_ERR_BAD_PARAMETER_NULL, true, 431 PS_ERRORTEXT_psFits_NULL);431 _("The input psFits object can not NULL.")); 432 432 return NULL; 433 433 } … … 439 439 (void)fits_get_errstatus(status, fitsErr); 440 440 psError(PS_ERR_IO, true, 441 PS_ERRORTEXT_psFits_IMAGE_DIM_UNKNOWN,441 _("Could not determine image dimensions. CFITSIO Error: %s"), 442 442 fitsErr); 443 443 return NULL; … … 454 454 (void)fits_get_errstatus(status, fitsErr); 455 455 psError(PS_ERR_IO, true, 456 PS_ERRORTEXT_psFits_IMAGE_SIZE_UNKNOWN,456 _("Could not determine image size. CFITSIO Error: %s"), 457 457 fitsErr); 458 458 return NULL; … … 469 469 470 470 // Bad dimensionality 471 psError(PS_ERR_IO, true, PS_ERRORTEXT_psFits_IMAGE_DIMENSION_UNSUPPORTED, nAxis);471 psError(PS_ERR_IO, true, _("Image number of dimensions, %d, is not valid. Only two or three dimensions supported for FITS I/O."), nAxis); 472 472 return NULL; 473 473 } … … 477 477 if (fits == NULL) { 478 478 psError(PS_ERR_BAD_PARAMETER_NULL, true, 479 PS_ERRORTEXT_psFits_NULL);479 _("The input psFits object can not NULL.")); 480 480 return false; 481 481 } … … 483 483 if (input == NULL) { 484 484 psError(PS_ERR_BAD_PARAMETER_NULL, true, 485 PS_ERRORTEXT_psFits_IMAGE_NULL);485 _("The input psImage was NULL. Need a non-NULL psImage for operation to be performed.")); 486 486 return false; 487 487 } 488 488 489 489 if (input->n == 0) { 490 psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psFits_ARRAY_EMPTY);490 psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("The input array was empty.")); 491 491 return false; 492 492 } … … 504 504 testImage = input->data[i]; 505 505 if (testImage->numCols != numCols || testImage->numRows != numRows) { 506 psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psFits_ARRAY_SIZE_DIFFER);506 psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("The sizes of images in the array differ.")); 507 507 return false; 508 508 } … … 522 522 input->n); 523 523 if (! update) { 524 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psFits_METADATA_ADD_FAILED,524 psError(PS_ERR_UNKNOWN, false, _("Failed to add metadata item, %s."), 525 525 "NAXIS, NAXIS1, NAXIS2, NAXIS3"); 526 526 psFree(headerCopy); … … 532 532 // The next are psFitsImageUpdate to write into the extension. 533 533 if (! psFitsWriteImage(fits, headerCopy, input->data[0], input->n, extname)) { 534 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psFits_WRITE_PLANE_FAILED, 0);534 psError(PS_ERR_UNKNOWN, false, _("Could not write image plane %d."), 0); 535 535 psFree(headerCopy); 536 536 return false; … … 540 540 for (int i = 1; i < input->n; i++) { 541 541 if (! psFitsUpdateImage(fits, input->data[i], 0, 0, i)) { 542 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psFits_WRITE_PLANE_FAILED, i);542 psError(PS_ERR_UNKNOWN, false, _("Could not write image plane %d."), i); 543 543 return false; 544 544 } … … 552 552 if (fits == NULL) { 553 553 psError(PS_ERR_BAD_PARAMETER_NULL, true, 554 PS_ERRORTEXT_psFits_NULL);554 _("The input psFits object can not NULL.")); 555 555 return false; 556 556 } … … 558 558 if (input == NULL) { 559 559 psError(PS_ERR_BAD_PARAMETER_NULL, true, 560 PS_ERRORTEXT_psFits_IMAGE_NULL);560 _("The input psImage was NULL. Need a non-NULL psImage for operation to be performed.")); 561 561 return false; 562 562 } 563 563 564 564 if (input->n == 0) { 565 psError(PS_ERR_BAD_PARAMETER_SIZE, true, PS_ERRORTEXT_psFits_ARRAY_EMPTY);565 psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("The input array was empty.")); 566 566 return false; 567 567 } … … 569 569 for (int i = 0; i < input->n; i++) { 570 570 if (! psFitsUpdateImage(fits, input->data[i], x0, y0, i)) { 571 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psFits_UPDATE_PLANE_FAILED, i);571 psError(PS_ERR_UNKNOWN, false, _("Could not update image plane %d."), i); 572 572 return false; 573 573 } -
trunk/psLib/src/fits/psFitsTable.c
r7984 r8232 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 7-26 03:37:57$9 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 17 17 #include "string.h" 18 18 #include "psError.h" 19 #include "psErrorText.h" 19 20 20 #include "psImageStructManip.h" 21 21 #include "psMemory.h" … … 41 41 if (fits == NULL) { 42 42 psError(PS_ERR_BAD_PARAMETER_NULL, true, 43 PS_ERRORTEXT_psFits_NULL);43 _("The input psFits object can not NULL.")); 44 44 return NULL; 45 45 } … … 52 52 (void)fits_get_errstatus(status, fitsErr); 53 53 psError(PS_ERR_IO, true, 54 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,54 _("Could not determine the HDU type. CFITSIO Error: %s"), 55 55 fitsErr); 56 56 return NULL; … … 58 58 if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) { 59 59 psError(PS_ERR_IO, true, 60 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);60 _("Current FITS HDU type must be a table.")); 61 61 return NULL; 62 62 } … … 69 69 (void)fits_get_errstatus(status, fitsErr); 70 70 psError(PS_ERR_IO, true, 71 PS_ERRORTEXT_psFits_GET_TABLE_SIZE_FAILED,71 _("Failed to determine the size of the current HDU table. CFITSIO Error: %s"), 72 72 fitsErr); 73 73 return NULL; … … 78 78 if (row < 0 || row >= numRows) { 79 79 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 80 PS_ERRORTEXT_psFits_ROW_INVALID,80 _("Specified row, %d, is not valid for current table of %d rows."), 81 81 row,numRows); 82 82 return NULL; … … 168 168 (void)fits_get_errstatus(status, fitsErr); 169 169 psError(PS_ERR_IO, true, 170 PS_ERRORTEXT_psFits_GET_TABLE_ELEMENT,170 _("Failed to retrieve table element (%d,%d). CFITSIO Error: %s"), 171 171 col,row,fitsErr); 172 172 psFree(data); … … 187 187 if (fits == NULL) { 188 188 psError(PS_ERR_BAD_PARAMETER_NULL, true, 189 PS_ERRORTEXT_psFits_NULL);189 _("The input psFits object can not NULL.")); 190 190 return NULL; 191 191 } … … 197 197 (void)fits_get_errstatus(status, fitsErr); 198 198 psError(PS_ERR_IO, true, 199 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,199 _("Could not determine the HDU type. CFITSIO Error: %s"), 200 200 fitsErr); 201 201 return NULL; … … 203 203 if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) { 204 204 psError(PS_ERR_IO, true, 205 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);205 _("Current FITS HDU type must be a table.")); 206 206 return NULL; 207 207 } … … 212 212 (void)fits_get_errstatus(status, fitsErr); 213 213 psError(PS_ERR_IO, true, 214 PS_ERRORTEXT_psFits_FIND_COLUMN,214 _("Specified column, %s, was not found. CFITSIO Error: %s"), 215 215 colname, fitsErr); 216 216 return NULL; … … 227 227 (void)fits_get_errstatus(status, fitsErr); 228 228 psError(PS_ERR_IO, true, 229 PS_ERRORTEXT_psFits_GET_COLTYPE,229 _("Could not determine the datatype of the table column. CFITSIO Error: %s"), 230 230 fitsErr); 231 231 return NULL; … … 253 253 (void)fits_get_errstatus(status, fitsErr); 254 254 psError(PS_ERR_IO, true, 255 PS_ERRORTEXT_psFits_TABLE_READ_COL,255 _("Failed to read table column. CFITSIO Error: %s"), 256 256 fitsErr); 257 257 return NULL; … … 269 269 if (fits == NULL) { 270 270 psError(PS_ERR_BAD_PARAMETER_NULL, true, 271 PS_ERRORTEXT_psFits_NULL);271 _("The input psFits object can not NULL.")); 272 272 return NULL; 273 273 } … … 279 279 (void)fits_get_errstatus(status, fitsErr); 280 280 psError(PS_ERR_IO, true, 281 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,281 _("Could not determine the HDU type. CFITSIO Error: %s"), 282 282 fitsErr); 283 283 return NULL; … … 285 285 if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) { 286 286 psError(PS_ERR_IO, true, 287 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);287 _("Current FITS HDU type must be a table.")); 288 288 return NULL; 289 289 } … … 294 294 (void)fits_get_errstatus(status, fitsErr); 295 295 psError(PS_ERR_IO, true, 296 PS_ERRORTEXT_psFits_FIND_COLUMN,296 _("Specified column, %s, was not found. CFITSIO Error: %s"), 297 297 colname, fitsErr); 298 298 return NULL; … … 313 313 (void)fits_get_errstatus(status, fitsErr); 314 314 psError(PS_ERR_IO, true, 315 PS_ERRORTEXT_psFits_GET_COLTYPE,315 _("Could not determine the datatype of the table column. CFITSIO Error: %s"), 316 316 fitsErr); 317 317 return NULL; … … 336 336 (void)fits_get_errstatus(status, fitsErr); 337 337 psError(PS_ERR_IO, true, 338 PS_ERRORTEXT_psFits_TABLE_READ_COL,338 _("Failed to read table column. CFITSIO Error: %s"), 339 339 fitsErr); 340 340 return NULL; … … 351 351 if (fits == NULL) { 352 352 psError(PS_ERR_BAD_PARAMETER_NULL, true, 353 PS_ERRORTEXT_psFits_NULL);353 _("The input psFits object can not NULL.")); 354 354 return NULL; 355 355 } … … 361 361 (void)fits_get_errstatus(status, fitsErr); 362 362 psError(PS_ERR_IO, true, 363 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,363 _("Could not determine the HDU type. CFITSIO Error: %s"), 364 364 fitsErr); 365 365 return NULL; … … 367 367 if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) { 368 368 psError(PS_ERR_IO, true, 369 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);369 _("Current FITS HDU type must be a table.")); 370 370 return NULL; 371 371 } … … 378 378 (void)fits_get_errstatus(status, fitsErr); 379 379 psError(PS_ERR_IO, true, 380 PS_ERRORTEXT_psFits_GET_TABLE_SIZE_FAILED,380 _("Failed to determine the size of the current HDU table. CFITSIO Error: %s"), 381 381 fitsErr); 382 382 return NULL; … … 488 488 // no table data, what can I do? 489 489 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 490 PS_ERRORTEXT_psFits_TABLE_EMPTY);490 _("Can't create a table without any rows.")); 491 491 return false; 492 492 } … … 731 731 if (fits == NULL) { 732 732 psError(PS_ERR_BAD_PARAMETER_NULL, true, 733 PS_ERRORTEXT_psFits_NULL);733 _("The input psFits object can not NULL.")); 734 734 return false; 735 735 } … … 737 737 if (data == NULL) { 738 738 psError(PS_ERR_BAD_PARAMETER_NULL, true, 739 PS_ERRORTEXT_psFits_IMAGE_NULL);739 _("The input psImage was NULL. Need a non-NULL psImage for operation to be performed.")); 740 740 return false; 741 741 } … … 747 747 (void)fits_get_errstatus(status, fitsErr); 748 748 psError(PS_ERR_IO, true, 749 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED,749 _("Could not determine the HDU type. CFITSIO Error: %s"), 750 750 fitsErr); 751 751 return false; … … 753 753 if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) { 754 754 psError(PS_ERR_IO, true, 755 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE);755 _("Current FITS HDU type must be a table.")); 756 756 return false; 757 757 } … … 777 777 (void)fits_get_errstatus(status, fitsErr); 778 778 psError(PS_ERR_IO, true, 779 PS_ERRORTEXT_psFits_WRITE_FAILED,779 _("Could not write data to file. CFITSIO Error: %s"), 780 780 fitsErr); 781 781 psFree(iter); -
trunk/psLib/src/imageops/psImageConvolve.c
r7914 r8232 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-0 7-15 02:57:12$7 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-08-08 23:32:23 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psError.h" 22 22 23 #include "psErrorText.h" 23 24 24 25 25 #define FOURIER_PADDING 32 /* padding amount in every side of the image for fourier convolution */ … … 120 120 if (tShifts == NULL || xShifts == NULL || yShifts == NULL) { 121 121 psError(PS_ERR_BAD_PARAMETER_NULL, true, 122 PS_ERRORTEXT_psImageConvolve_SHIFT_NULL);122 _("Specified shift vectors can not be NULL.")); 123 123 return NULL; 124 124 } … … 134 134 PS_TYPE_NAME(typeTStr,tShifts->type.type); 135 135 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 136 PS_ERRORTEXT_psImageConvolve_SHIFT_TYPE_MISMATCH,136 _("Input t-, x-, and y-shift vector types (%s/%s/%s) must match."), 137 137 typeTStr, typeXStr, typeYStr); 138 138 return NULL; … … 257 257 PS_TYPE_NAME(typeStr,xShifts->type.type); 258 258 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 259 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,259 _("Specified psImage type, %s, is not supported."), 260 260 typeStr); 261 261 } … … 280 280 PS_TYPE_NAME(typeStr,xShifts->type.type); 281 281 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 282 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,282 _("Specified psImage type, %s, is not supported."), 283 283 typeStr); 284 284 } … … 301 301 if (kernel == NULL) { 302 302 psError(PS_ERR_BAD_PARAMETER_NULL, true, 303 PS_ERRORTEXT_psImageConvolve_KERNEL_NULL);303 _("Specified psKernel can not be NULL.")); 304 304 psFree(out); 305 305 return NULL; … … 361 361 PS_TYPE_NAME(typeStr,in->type.type); 362 362 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 363 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,363 _("Specified psImage type, %s, is not supported."), 364 364 typeStr); 365 365 psFree(out); … … 380 380 if (kRows >= numRows || kCols >= numCols) { 381 381 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 382 PS_ERRORTEXT_psImageConvolve_KERNEL_TOO_LARGE,382 _("Specified psKernel size, %dx%d, can not be larger than input psImage size, %dx%d."), 383 383 kCols,kRows, 384 384 numCols, numRows); … … 434 434 if (kernelFourier == NULL) { 435 435 psError(PS_ERR_UNKNOWN, false, 436 PS_ERRORTEXT_psImageConvolve_KERNEL_FFT_FAILED);436 _("Failed to perform a fourier transform of kernel.")); 437 437 psFree(out); 438 438 return NULL; … … 442 442 if (inFourier == NULL) { 443 443 psError(PS_ERR_UNKNOWN, false, 444 PS_ERRORTEXT_psImageConvolve_FFT_FAILED);444 _("Failed to perform a fourier transform of input image.")); 445 445 psFree(out); 446 446 return NULL; … … 460 460 if (complexOut == NULL) { 461 461 psError(PS_ERR_UNKNOWN, false, 462 PS_ERRORTEXT_psImageConvolve_FFT_FAILED);462 _("Failed to perform a fourier transform of input image.")); 463 463 psFree(out); 464 464 return NULL; … … 665 665 PS_TYPE_NAME(typeStr,image->type.type); 666 666 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 667 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,667 _("Specified psImage type, %s, is not supported."), 668 668 typeStr); 669 669 return false; -
trunk/psLib/src/imageops/psImageGeomManip.c
r7999 r8232 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 7-28 00:44:05$12 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 30 30 #include "psMemory.h" 31 31 #include "psAssert.h" 32 #include "psErrorText.h" 32 33 33 #include "psCoord.h" 34 34 … … 51 51 if (in == NULL) { 52 52 psError(PS_ERR_BAD_PARAMETER_NULL, true, 53 PS_ERRORTEXT_psImage_IMAGE_NULL);53 _("Can not operate on a NULL psImage.")); 54 54 psFree(out); 55 55 return NULL; … … 58 58 if (scale < 1) { 59 59 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 60 PS_ERRORTEXT_psImageManip_SCALE_NOT_POSITIVE,60 _("Specified scale value, %d, must be a positive value."), 61 61 scale); 62 62 psFree(out); … … 66 66 if (stats == NULL) { 67 67 psError(PS_ERR_BAD_PARAMETER_NULL, true, 68 PS_ERRORTEXT_psImage_STAT_NULL);68 _("Specified statistic can not be NULL.")); 69 69 psFree(out); 70 70 return NULL; … … 74 74 if (statistic == 0) { 75 75 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 76 PS_ERRORTEXT_psImage_BAD_STAT,76 _("Specified statistic option, %d, is not valid. Must specify one and only one statistic type."), 77 77 stats->options); 78 78 psFree(out); … … 87 87 PS_TYPE_NAME(typeStr,mask->type.type); 88 88 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 89 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,89 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 90 90 typeStr, PS_TYPE_MASK_NAME); 91 91 psFree(out); … … 159 159 PS_TYPE_NAME(typeStr,in->type.type); 160 160 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 161 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,161 _("Specified psImage type, %s, is not supported."), 162 162 typeStr); 163 163 psFree(out); … … 184 184 if (in == NULL) { 185 185 psError(PS_ERR_BAD_PARAMETER_NULL, true, 186 PS_ERRORTEXT_psImage_IMAGE_NULL);186 _("Can not operate on a NULL psImage.")); 187 187 psFree(out); 188 188 return NULL; … … 191 191 if (scale < 1) { 192 192 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 193 PS_ERRORTEXT_psImageManip_SCALE_NOT_POSITIVE,193 _("Specified scale value, %d, must be a positive value."), 194 194 scale); 195 195 psFree(out); … … 199 199 if (mode > PS_INTERPOLATE_LANCZOS4_VARIANCE ) { 200 200 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 201 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,201 _("Specified interpolation mode, %d, is unsupported."), 202 202 mode); 203 203 psFree(out); … … 241 241 PS_TYPE_NAME(typeStr,in->type.type); 242 242 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 243 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,243 _("Specified psImage type, %s, is not supported."), 244 244 typeStr); 245 245 psFree(out); … … 262 262 if (input == NULL) { 263 263 psError(PS_ERR_BAD_PARAMETER_NULL, true, 264 PS_ERRORTEXT_psImage_IMAGE_NULL);264 _("Can not operate on a NULL psImage.")); 265 265 psFree(out); 266 266 return NULL; … … 311 311 if (input == NULL) { 312 312 psError(PS_ERR_BAD_PARAMETER_NULL, true, 313 PS_ERRORTEXT_psImage_IMAGE_NULL);313 _("Can not operate on a NULL psImage.")); 314 314 psFree(out); 315 315 return NULL; … … 357 357 PS_TYPE_NAME(typeStr,type); 358 358 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 359 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,359 _("Specified psImage type, %s, is not supported."), 360 360 typeStr); 361 361 psFree(out); … … 403 403 PS_TYPE_NAME(typeStr,type); 404 404 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 405 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,405 _("Specified psImage type, %s, is not supported."), 406 406 typeStr); 407 407 psFree(out); … … 448 448 PS_TYPE_NAME(typeStr,type); 449 449 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 450 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,450 _("Specified psImage type, %s, is not supported."), 451 451 typeStr); 452 452 psFree(out); … … 503 503 cimag(exposed) > PS_MAX_##TYPE) { \ 504 504 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 505 PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \505 _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \ 506 506 "exposed", \ 507 507 creal(exposed),cimag(exposed), \ … … 570 570 PS_TYPE_NAME(typeStr,type); \ 571 571 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 572 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \572 _("Specified psImage type, %s, is not supported."), \ 573 573 typeStr); \ 574 574 psFree(out); \ … … 584 584 default: 585 585 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 586 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,586 _("Specified interpolation mode, %d, is unsupported."), 587 587 mode); 588 588 psFree(out); … … 608 608 if (input == NULL) { 609 609 psError(PS_ERR_BAD_PARAMETER_NULL, true, 610 PS_ERRORTEXT_psImage_IMAGE_NULL);610 _("Can not operate on a NULL psImage.")); 611 611 psFree(out); 612 612 return NULL; … … 627 627 cimag(exposed) > PS_MAX_##TYPE) { \ 628 628 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 629 PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \629 _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \ 630 630 "exposed", \ 631 631 creal(exposed),cimag(exposed), \ … … 666 666 PS_TYPE_NAME(typeStr,type); \ 667 667 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 668 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \668 _("Specified psImage type, %s, is not supported."), \ 669 669 typeStr); \ 670 670 psFree(out); \ … … 680 680 default: 681 681 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 682 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,682 _("Specified interpolation mode, %d, is unsupported."), 683 683 mode); 684 684 psFree(out); … … 702 702 if (input == NULL) { 703 703 psError(PS_ERR_BAD_PARAMETER_NULL, true, 704 PS_ERRORTEXT_psImage_IMAGE_NULL);704 _("Can not operate on a NULL psImage.")); 705 705 psFree(output); 706 706 return NULL; … … 715 715 if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) { 716 716 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 717 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE,717 _("Input psImage mask size, %dx%d, does not match psImage input size, %dx%d."), 718 718 input->numCols, input->numRows, 719 719 inputMask->numCols, inputMask->numRows ); … … 725 725 PS_TYPE_NAME(typeStr,inputMask->type.type); 726 726 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 727 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,727 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 728 728 typeStr, PS_TYPE_MASK_NAME); 729 729 psFree(output); … … 734 734 if (outToIn == NULL) { 735 735 psError(PS_ERR_BAD_PARAMETER_NULL, true, 736 PS_ERRORTEXT_psImageManip_TRANSFORM_NULL);736 _("Specified input transform can not be NULL.")); 737 737 return NULL; 738 738 } … … 853 853 PS_TYPE_NAME(typeStr,type); \ 854 854 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 855 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \855 _("Specified psImage type, %s, is not supported."), \ 856 856 typeStr); \ 857 857 psFree(output); \ … … 867 867 default: 868 868 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 869 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,869 _("Specified interpolation mode, %d, is unsupported."), 870 870 mode); 871 871 psFree(output); -
trunk/psLib/src/imageops/psImageMaskOps.c
r7766 r8232 8 8 * @author David Robbins, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 6-30 02:20:06$10 * @version $Revision: 1.3 $ $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 … … 26 26 #include "psMemory.h" 27 27 #include "psAssert.h" 28 #include "psErrorText.h" 28 29 29 #include "psCoord.h" 30 30 -
trunk/psLib/src/imageops/psImagePixelExtract.c
r7999 r8232 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 7-28 00:44:05$10 * @version $Revision: 1.26 $ $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 … … 21 21 #include "psError.h" 22 22 23 #include "psErrorText.h" 23 24 24 25 25 #define VECTOR_STORE_ROW_CASE(TYPE) \ … … 34 34 if (input == NULL || input->data.V == NULL) { 35 35 psError(PS_ERR_BAD_PARAMETER_NULL, true, 36 PS_ERRORTEXT_psImage_IMAGE_NULL);36 _("Can not operate on a NULL psImage.")); 37 37 psFree(out); 38 38 return NULL; … … 124 124 if (input == NULL || input->data.V == NULL) { 125 125 psError(PS_ERR_BAD_PARAMETER_NULL, true, 126 PS_ERRORTEXT_psImage_IMAGE_NULL);126 _("Can not operate on a NULL psImage.")); 127 127 psFree(out); 128 128 return NULL; … … 223 223 if (input == NULL || input->data.V == NULL) { 224 224 psError(PS_ERR_BAD_PARAMETER_NULL, true, 225 PS_ERRORTEXT_psImage_IMAGE_NULL);225 _("Can not operate on a NULL psImage.")); 226 226 psFree(out); 227 227 return NULL; … … 350 350 if (inRows != mask->numRows || inCols != mask->numCols) { 351 351 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 352 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE,352 _("Input psImage mask size, %dx%d, does not match psImage input size, %dx%d."), 353 353 mask->numCols,mask->numRows, 354 354 inCols, inRows); … … 360 360 PS_TYPE_NAME(typeStr,mask->type.type); 361 361 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 362 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,362 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 363 363 typeStr, PS_TYPE_MASK_NAME); 364 364 psFree(out); … … 369 369 if (stats == NULL) { 370 370 psError(PS_ERR_BAD_PARAMETER_NULL, true, 371 PS_ERRORTEXT_psImage_STAT_NULL);371 _("Specified statistic can not be NULL.")); 372 372 psFree(out); 373 373 return NULL; … … 378 378 if (statistic == 0) { 379 379 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 380 PS_ERRORTEXT_psImage_BAD_STAT,stats->options);380 _("Specified statistic option, %d, is not valid. Must specify one and only one statistic type."),stats->options); 381 381 psFree(out); 382 382 return NULL; … … 466 466 PS_TYPE_NAME(typeStr,type); 467 467 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 468 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,468 _("Specified psImage type, %s, is not supported."), 469 469 typeStr); 470 470 psFree(out); … … 531 531 } else { // don't know what the direction flag is 532 532 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 533 PS_ERRORTEXT_psImage_SLICE_DIRECTION_INVALID,533 _("Specified slice direction, %d, is invalid."), 534 534 direction); 535 535 psFree(out); … … 555 555 if (input == NULL || input->data.V == NULL) { 556 556 psError(PS_ERR_BAD_PARAMETER_NULL, true, 557 PS_ERRORTEXT_psImage_IMAGE_NULL);557 _("Can not operate on a NULL psImage.")); 558 558 psFree(out); 559 559 return NULL; … … 588 588 if (nSamples < 2) { 589 589 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 590 PS_ERRORTEXT_psImage_nSamples_TOOSMALL,590 _("Specified number of samples, %d, must be greater than 1 to make a line."), 591 591 nSamples); 592 592 psFree(out); … … 639 639 if (mode < PS_INTERPOLATE_FLAT ) { 640 640 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 641 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,641 _("Specified interpolation mode, %d, is unsupported."), 642 642 mode); 643 643 psFree(out); … … 648 648 if (numRows != mask->numRows || numCols != mask->numCols) { 649 649 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 650 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE,650 _("Input psImage mask size, %dx%d, does not match psImage input size, %dx%d."), 651 651 mask->numCols,mask->numRows, 652 652 numCols-1, numRows); … … 658 658 PS_TYPE_NAME(typeStr,mask->type.type); 659 659 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 660 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,660 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 661 661 typeStr, PS_TYPE_MASK_NAME); 662 662 psFree(out); … … 719 719 PS_TYPE_NAME(typeStr,input->type.type); 720 720 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 721 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,721 _("Specified psImage type, %s, is not supported."), 722 722 typeStr); 723 723 psFree(out); … … 742 742 if (input == NULL || input->data.V == NULL) { 743 743 psError(PS_ERR_BAD_PARAMETER_NULL, true, 744 PS_ERRORTEXT_psImage_IMAGE_NULL);744 _("Can not operate on a NULL psImage.")); 745 745 psFree(out); 746 746 return NULL; … … 752 752 if (numRows != mask->numRows || numCols != mask->numCols) { 753 753 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 754 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE,754 _("Input psImage mask size, %dx%d, does not match psImage input size, %dx%d."), 755 755 mask->numCols,mask->numRows, 756 756 numCols, numRows); … … 762 762 PS_TYPE_NAME(typeStr,mask->type.type); 763 763 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 764 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,764 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 765 765 typeStr, PS_TYPE_MASK_NAME); 766 766 psFree(out); … … 774 774 y < input->row0 || y >= (input->row0 + numRows) ) { 775 775 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 776 PS_ERRORTEXT_psImage_CENTER_NOT_IN_IMAGE,776 _("Specified center, (%g,%g), is outside of the psImage boundaries, [0:%d,0:%d]."), 777 777 x, y, 778 778 numCols-1, numRows-1); … … 783 783 if (radii == NULL) { 784 784 psError(PS_ERR_BAD_PARAMETER_NULL, true, 785 PS_ERRORTEXT_psImage_RADII_VECTOR_NULL);785 _("Specified radii vector can not be NULL.")); 786 786 psFree(out); 787 787 return NULL; … … 790 790 if (radii->n < 2) { 791 791 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 792 PS_ERRORTEXT_psImage_RADII_VECTOR_TOOSMALL,792 _("Input radii vector size, %d, can not be less than 2."), 793 793 radii->n); 794 794 psFree(out); … … 798 798 if (stats == NULL) { 799 799 psError(PS_ERR_BAD_PARAMETER_NULL, true, 800 PS_ERRORTEXT_psImage_STAT_NULL);800 _("Specified statistic can not be NULL.")); 801 801 psFree(out); 802 802 return NULL; … … 807 807 if (statistic == 0) { 808 808 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 809 PS_ERRORTEXT_psImage_BAD_STAT,809 _("Specified statistic option, %d, is not valid. Must specify one and only one statistic type."), 810 810 stats->options); 811 811 psFree(out); -
trunk/psLib/src/imageops/psImagePixelManip.c
r7766 r8232 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 6-30 02:20:06$12 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 #include "psMemory.h" 29 29 #include "psAssert.h" 30 #include "psErrorText.h" 30 31 31 #include "psCoord.h" 32 32 … … 47 47 if (max < min) { 48 48 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."), 50 50 (double)min,(double)max); 51 51 return 0; … … 61 61 if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \ 62 62 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)."), \ 64 64 "vmin",vmin, PS_TYPE_##type##_NAME, \ 65 65 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 67 67 if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \ 68 68 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)."), \ 70 70 "vmax",vmax, PS_TYPE_##type##_NAME, \ 71 71 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 90 90 if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \ 91 91 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)."), \ 93 93 "vmin",vmin, PS_TYPE_##type##_NAME, \ 94 94 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 96 96 if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \ 97 97 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)."), \ 99 99 "vmax",vmax, PS_TYPE_##type##_NAME, \ 100 100 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 132 132 PS_TYPE_NAME(typeStr,input->type.type); 133 133 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 134 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,134 _("Specified psImage type, %s, is not supported."), 135 135 typeStr); 136 136 } … … 177 177 PS_TYPE_NAME(typeStr,input->type.type); 178 178 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 179 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,179 _("Specified psImage type, %s, is not supported."), 180 180 typeStr); 181 181 } … … 202 202 if (image == NULL || overlay == NULL) { 203 203 psError(PS_ERR_BAD_PARAMETER_NULL, true, 204 PS_ERRORTEXT_psImage_IMAGE_NULL);204 _("Can not operate on a NULL psImage.")); 205 205 return pixelsOverlaid; 206 206 } … … 208 208 if (op == NULL) { 209 209 psError(PS_ERR_BAD_PARAMETER_NULL, true, 210 PS_ERRORTEXT_psImageManip_OPERATION_NULL);210 _("Operation can not be NULL.")); 211 211 return pixelsOverlaid; 212 212 } … … 220 220 PS_TYPE_NAME(typeStrOverlay,overlay->type.type); 221 221 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."), 223 223 typeStrOverlay, typeStr); 224 224 return pixelsOverlaid; … … 239 239 240 240 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]."), 242 242 x0, imageColLimit, y0, imageRowLimit, 243 243 imageNumCols, imageNumRows); … … 295 295 default: \ 296 296 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 297 PS_ERRORTEXT_psImageManip_OVERLAY_OPERATOR_INVALID, \297 _("Specified operation, '%s', is not supported."), \ 298 298 op); \ 299 299 return pixelsOverlaid; \ … … 319 319 PS_TYPE_NAME(typeStr,type); 320 320 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 321 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,321 _("Specified psImage type, %s, is not supported."), 322 322 typeStr); 323 323 return pixelsOverlaid; … … 344 344 if (input == NULL) { 345 345 psError(PS_ERR_BAD_PARAMETER_NULL, true, 346 PS_ERRORTEXT_psImage_IMAGE_NULL);346 _("Can not operate on a NULL psImage.")); 347 347 return 0; 348 348 } … … 350 350 if (realMax < realMin) { 351 351 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."), 353 353 (double)realMin, (double)realMax); 354 354 return 0; … … 356 356 if (imagMax < imagMin) { 357 357 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."), 359 359 (double)imagMin, (double)imagMax); 360 360 return 0; … … 369 369 realfcn(vmin) > PS_MAX_##type || imagfcn(vmin) > PS_MAX_##type ) { \ 370 370 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]."), \ 372 372 "vmin", creal(vmin), cimag(vmin), \ 373 373 PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \ … … 377 377 realfcn(vmax) < PS_MIN_##type || imagfcn(vmax) < PS_MIN_##type ) { \ 378 378 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]."), \ 380 380 "vmax", creal(vmax), cimag(vmax), \ 381 381 PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \ … … 406 406 PS_TYPE_NAME(typeStr,input->type.type); 407 407 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 408 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,408 _("Specified psImage type, %s, is not supported."), 409 409 typeStr); 410 410 } -
trunk/psLib/src/imageops/psImageStats.c
r7766 r8232 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.9 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-0 6-30 02:20:06$11 * @version $Revision: 1.99 $ $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 … … 30 30 #include "psImageStats.h" 31 31 #include "psAssert.h" 32 #include "psErrorText.h" 32 33 33 #include "psRegion.h" 34 34 #include "psRegionForImage.h" … … 497 497 if (mask == NULL) { 498 498 psError(PS_ERR_BAD_PARAMETER_NULL, true, 499 PS_ERRORTEXT_psImage_IMAGE_NULL);499 _("Can not operate on a NULL psImage.")); 500 500 return -1; 501 501 } … … 592 592 return -1; 593 593 }/* else if (col0 == col1 && row0 == row1) { 594 psError(PS_ERR_BAD_PARAMETER_VALUE, true,595 "Invalid psRegion specified. Region contains only 1 pixel.\n");596 return -1;597 }598 */594 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 595 "Invalid psRegion specified. Region contains only 1 pixel.\n"); 596 return -1; 597 } 598 */ 599 599 x0 = col0; 600 600 x1 = col1; … … 632 632 default: 633 633 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 634 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE, type, PS_TYPE_U8);634 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), type, PS_TYPE_U8); 635 635 return -1; 636 636 } -
trunk/psLib/src/imageops/psImageStructManip.c
r7524 r8232 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 6-12 20:44:04$10 * @version $Revision: 1.11 $ $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 … … 21 21 #include "psError.h" 22 22 23 #include "psErrorText.h" 23 24 24 25 25 static psImage* imageSubset(psImage* out, … … 35 35 if (image == NULL || image->data.V == NULL) { 36 36 psError(PS_ERR_BAD_PARAMETER_NULL, true, 37 PS_ERRORTEXT_psImage_IMAGE_NULL);37 _("Can not operate on a NULL psImage.")); 38 38 return NULL; 39 39 } … … 41 41 if ( col0 < image->col0 || row0 < image->row0 ) { 42 42 // psError(PS_ERR_BAD_PARAMETER_VALUE, true, 43 // PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID);43 // _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d].")); 44 44 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 45 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,45 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."), 46 46 col0, col1-1, row0, row1-1, 47 47 image->numCols-1, image->numRows-1); … … 51 51 if (image->type.dimen != PS_DIMEN_IMAGE) { 52 52 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 53 PS_ERRORTEXT_psImage_NOT_AN_IMAGE);53 _("The input psImage must have a PS_DIMEN_IMAGE dimension type.")); 54 54 return NULL; 55 55 } … … 69 69 row1 > image->row0 + image->numRows ) { 70 70 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 71 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,71 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."), 72 72 col0, col1-1, row0, row1-1, 73 73 image->numCols-1, image->numRows-1); … … 153 153 if (input == NULL || input->data.V == NULL) { 154 154 psError(PS_ERR_BAD_PARAMETER_NULL, true, 155 PS_ERRORTEXT_psImage_IMAGE_NULL);155 _("Can not operate on a NULL psImage.")); 156 156 psFree(output); 157 157 return NULL; … … 160 160 if (input == output) { 161 161 psError(PS_ERR_BAD_PARAMETER_NULL, true, 162 PS_ERRORTEXT_psImage_INPLACE_NOTSUPPORTED);162 _("Specified input and output psImage can not reference the same psImage.")); 163 163 psFree(output); 164 164 return NULL; … … 167 167 if (input->type.dimen != PS_DIMEN_IMAGE) { 168 168 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 169 PS_ERRORTEXT_psImage_NOT_AN_IMAGE);169 _("The input psImage must have a PS_DIMEN_IMAGE dimension type.")); 170 170 psFree(output); 171 171 return NULL; … … 287 287 PS_TYPE_NAME(typeStr,type); 288 288 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 289 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,289 _("Specified psImage type, %s, is not supported."), 290 290 typeStr); 291 291 psFree(output); … … 302 302 if (image == NULL || image->data.V == NULL) { 303 303 psError(PS_ERR_BAD_PARAMETER_NULL, true, 304 PS_ERRORTEXT_psImage_IMAGE_NULL);304 _("Can not operate on a NULL psImage.")); 305 305 return NULL; 306 306 } … … 335 335 row0 >= row1 ) { 336 336 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 337 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,337 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."), 338 338 col0, col1-1, row0, row1-1, 339 339 image->numCols-1, image->numRows-1); -
trunk/psLib/src/math/psBinaryOp.c
r7766 r8232 30 30 * @author Robert DeSonia, MHPCC 31 31 * 32 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $33 * @date $Date: 2006-0 6-30 02:20:06$32 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 33 * @date $Date: 2006-08-08 23:32:23 $ 34 34 * 35 35 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 50 50 #include "psLogMsg.h" 51 51 #include "psAssert.h" 52 #include "psErrorText.h" 52 53 53 54 54 /***************************************************************************** … … 107 107 long n2 = ((psVector*)IN2)->n; \ 108 108 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); \ 110 110 if (OUT != IN1 && OUT != IN2) { \ 111 111 psFree(OUT); \ … … 129 129 if (((psVector*)IN1)->type.dimen == PS_DIMEN_VECTOR) { /* Regular vectors */ \ 130 130 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); \ 132 132 if (OUT != IN1 && OUT != IN2) { \ 133 133 psFree(OUT); \ … … 146 146 } else { /* Transposed vectors */ \ 147 147 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); \ 149 149 if (OUT != IN1 && OUT != IN2) { \ 150 150 psFree(OUT); \ … … 187 187 if (((psVector*)IN2)->type.dimen == PS_DIMEN_VECTOR) { /* Regular vectors */ \ 188 188 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); \ 190 190 if (OUT != IN1 && OUT != IN2) { \ 191 191 psFree(OUT); \ … … 204 204 } else { /* Transposed vectors */ \ 205 205 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); \ 207 207 if (OUT != IN1) { \ 208 208 psFree(OUT); \ … … 229 229 long numCols2 = ((psImage*)IN2)->numCols; \ 230 230 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."), \ 232 232 numCols1, numRows1, numCols2, numRows2); \ 233 233 if (OUT != IN1 && OUT != IN2) { \ … … 278 278 PS_TYPE_NAME(strType,IN1->type); \ 279 279 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 280 PS_ERRORTEXT_psMatrix_TYPE_MISMATCH, \280 _("Specified data type, %s, is not supported."), \ 281 281 strType); */ \ 282 282 if (OUT != IN1 && OUT != IN2) { \ … … 329 329 PS_TYPE_NAME(strType,IN1->type); \ 330 330 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 331 PS_ERRORTEXT_psMatrix_TYPE_MISMATCH, \331 _("Specified data type, %s, is not supported."), \ 332 332 strType); */ \ 333 333 if (OUT != IN1 && OUT != IN2) { \ … … 372 372 if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) { \ 373 373 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 374 PS_ERRORTEXT_psMatrix_MIN_COMPLEX_SUPPORT); \374 _("The minimum operation is not supported with complex data.")); \ 375 375 if (OUT != IN1 && OUT != IN2) { \ 376 376 psFree(OUT); \ … … 383 383 if (PS_IS_PSELEMTYPE_COMPLEX(IN1->type)) { \ 384 384 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 385 PS_ERRORTEXT_psMatrix_MAX_COMPLEX_SUPPORT); \385 _("The maximum operation is not supported with complex data.")); \ 386 386 if (OUT != IN1 && OUT != IN2) { \ 387 387 psFree(OUT); \ … … 393 393 } else { \ 394 394 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 395 PS_ERRORTEXT_psMatrix_OPERATION_UNSUPPORTED, \395 _("Specified operation, %s, is not supported."), \ 396 396 OP); \ 397 397 if (OUT != IN1 && OUT != IN2) { \ … … 469 469 if (out == NULL) { 470 470 psError(PS_ERR_UNKNOWN, false, 471 PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED);471 _("Couldn't create a proper output psVector.")); 472 472 return NULL; 473 473 } … … 478 478 if (out == NULL) { 479 479 psError(PS_ERR_UNKNOWN, false, 480 PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED);480 _("Couldn't create a proper output psImage.")); 481 481 return NULL; 482 482 } … … 484 484 } else { 485 485 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 486 PS_ERRORTEXT_psMatrix_DIMEN_INVALID,486 _("Specified parameter, %s, has invalid dimensionality, %d."), 487 487 "in2",dim2); 488 488 psBinaryOp_EXIT; … … 493 493 if (out == NULL) { 494 494 psError(PS_ERR_UNKNOWN, false, 495 PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED);495 _("Couldn't create a proper output psVector.")); 496 496 return NULL; 497 497 } … … 502 502 if (out == NULL) { 503 503 psError(PS_ERR_UNKNOWN, false, 504 PS_ERRORTEXT_psMatrix_OUTPUT_VECTOR_NOT_CREATED);504 _("Couldn't create a proper output psVector.")); 505 505 return NULL; 506 506 } … … 511 511 if (out == NULL) { 512 512 psError(PS_ERR_UNKNOWN, false, 513 PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED);513 _("Couldn't create a proper output psImage.")); 514 514 return NULL; 515 515 } … … 517 517 } else { 518 518 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 519 PS_ERRORTEXT_psMatrix_DIMEN_INVALID,519 _("Specified parameter, %s, has invalid dimensionality, %d."), 520 520 "in2",dim2); 521 521 psBinaryOp_EXIT; … … 525 525 if (out == NULL) { 526 526 psError(PS_ERR_UNKNOWN, false, 527 PS_ERRORTEXT_psMatrix_OUTPUT_IMAGE_NOT_CREATED);527 _("Couldn't create a proper output psImage.")); 528 528 return NULL; 529 529 } … … 536 536 } else { 537 537 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 538 PS_ERRORTEXT_psMatrix_DIMEN_INVALID,538 _("Specified parameter, %s, has invalid dimensionality, %d."), 539 539 "in2",dim2); 540 540 psBinaryOp_EXIT; … … 542 542 } else { 543 543 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 544 PS_ERRORTEXT_psMatrix_DIMEN_INVALID,544 _("Specified parameter, %s, has invalid dimensionality, %d."), 545 545 "in1",dim1); 546 546 psBinaryOp_EXIT; -
trunk/psLib/src/math/psMathUtils.c
r7766 r8232 3 3 * This file contains standard math routines. 4 4 * 5 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-0 6-30 02:20:06$5 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-08-08 23:32:23 $ 7 7 * 8 8 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 26 26 #include "psAssert.h" 27 27 #include "psConstants.h" 28 #include "psErrorText.h" 28 29 29 30 30 /*****************************************************************************/ -
trunk/psLib/src/math/psMatrix.c
r7766 r8232 21 21 * @author Robert DeSonia, MHPCC 22 22 * 23 * @version $Revision: 1.4 0$ $Name: not supported by cvs2svn $24 * @date $Date: 2006-0 6-30 02:20:06$23 * @version $Revision: 1.41 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2006-08-08 23:32:23 $ 25 25 * 26 26 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 43 43 #include "psMatrix.h" 44 44 #include "psAssert.h" 45 #include "psErrorText.h" 45 46 46 #include "psTrace.h" 47 47 … … 568 568 569 569 if(numRowsIn!=numColsOut && numRowsOut!=numColsIn) { 570 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psMatrix_TRANSPOSE_MISMATCH);570 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Number of rows do not match number of columns.")); 571 571 TRANSPOSE_CLEANUP; 572 572 } -
trunk/psLib/src/math/psPolynomial.c
r7914 r8232 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.14 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 7-15 02:57:12$9 * @version $Revision: 1.148 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 #include "psPolynomial.h" 33 33 #include "psAssert.h" 34 #include "psErrorText.h" 34 35 35 36 36 /*****************************************************************************/ … … 795 795 } else { 796 796 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 797 PS_ERRORTEXT_psPolynomial_INVALID_POLYNOMIAL_TYPE,797 _("Unknown polynomial type 0x%x found. Evaluation failed."), 798 798 poly->type); 799 799 } … … 845 845 } else { 846 846 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 847 PS_ERRORTEXT_psPolynomial_INVALID_POLYNOMIAL_TYPE,847 _("Unknown polynomial type 0x%x found. Evaluation failed."), 848 848 poly->type); 849 849 } … … 924 924 } else { 925 925 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 926 PS_ERRORTEXT_psPolynomial_INVALID_POLYNOMIAL_TYPE,926 _("Unknown polynomial type 0x%x found. Evaluation failed."), 927 927 poly->type); 928 928 } … … 1040 1040 } else { 1041 1041 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 1042 PS_ERRORTEXT_psPolynomial_INVALID_POLYNOMIAL_TYPE,1042 _("Unknown polynomial type 0x%x found. Evaluation failed."), 1043 1043 poly->type); 1044 1044 } -
trunk/psLib/src/math/psRandom.c
r7766 r8232 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 6-30 02:20:06$12 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 31 31 #include "psLogMsg.h" 32 32 #include "psAssert.h" 33 #include "psErrorText.h" 33 34 34 35 35 psU64 p_psRandomGetSystemSeed() … … 78 78 psError(PS_ERR_UNEXPECTED_NULL, 79 79 true, 80 PS_ERRORTEXT_psRandom_UNKNOWN_RANDFOM_NUMBER_GENERATOR_TYPE);80 _("Unknown Random Number Generator Type")); 81 81 break; 82 82 } … … 92 92 psError(PS_ERR_UNEXPECTED_NULL, 93 93 true, 94 PS_ERRORTEXT_psRandom_NULL_RANDOM_VAR);94 _("Random variable is NULL.")); 95 95 } else { 96 96 // Check seed value to see if system seed should be used … … 109 109 psError(PS_ERR_UNEXPECTED_NULL, 110 110 true, 111 PS_ERRORTEXT_psRandom_NULL_RANDOM_VAR);111 _("Random variable is NULL.")); 112 112 return(0); 113 113 } else { … … 122 122 psError(PS_ERR_UNEXPECTED_NULL, 123 123 true, 124 PS_ERRORTEXT_psRandom_NULL_RANDOM_VAR);124 _("Random variable is NULL.")); 125 125 return(0); 126 126 } else { … … 136 136 psError(PS_ERR_UNEXPECTED_NULL, 137 137 true, 138 PS_ERRORTEXT_psRandom_NULL_RANDOM_VAR);138 _("Random variable is NULL.")); 139 139 return(0); 140 140 } else { … … 149 149 psError(PS_ERR_UNEXPECTED_NULL, 150 150 true, 151 PS_ERRORTEXT_psRandom_NULL_RANDOM_VAR);151 _("Random variable is NULL.")); 152 152 return(0); 153 153 } else { -
trunk/psLib/src/math/psRegion.c
r7901 r8232 3 3 #include "psMemory.h" 4 4 #include "psError.h" 5 #include "psErrorText.h" 5 6 6 #include "psRegion.h" 7 7 … … 52 52 if (sscanf(region,"[%d:%d,%d:%d]",&col0,&col1,&row0,&row1) < 4) { 53 53 psError(PS_ERR_BAD_PARAMETER_NULL, true, 54 PS_ERRORTEXT_psImage_SUBSECTION_INVALID,54 _("Specified subsection string, '%s', can not be parsed. Must be in the form '[x1:x2,y1:y2]'."), 55 55 region); 56 56 return psRegionSet(NAN,NAN,NAN,NAN); … … 64 64 if ((col1 > 0) && (col0 > col1)) { 65 65 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 66 PS_ERRORTEXT_psImage_SUBSET_RANGE_MALFORMED,66 _("Specified subset range, [%d:%d,%d:%d], is invalid. Ranges must be incremental."), 67 67 col0,col1,row0,row1); 68 68 return psRegionSet(NAN,NAN,NAN,NAN); … … 71 71 if ((row1 > 0) && (row0 > row1)) { 72 72 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 73 PS_ERRORTEXT_psImage_SUBSET_RANGE_MALFORMED,73 _("Specified subset range, [%d:%d,%d:%d], is invalid. Ranges must be incremental."), 74 74 col0,col1,row0,row1); 75 75 return psRegionSet(NAN,NAN,NAN,NAN); -
trunk/psLib/src/math/psSpline.c
r7914 r8232 6 6 * This file contains the routines that allocate, free, and evaluate splines. 7 7 * 8 * @version $Revision: 1.15 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 7-15 02:57:12$8 * @version $Revision: 1.151 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-08 23:32:23 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 #include "psSpline.h" 29 29 #include "psAssert.h" 30 #include "psErrorText.h" 30 31 31 #include "psMathUtils.h" 32 32 -
trunk/psLib/src/math/psStats.c
r7999 r8232 16 16 * use ->min and ->max (PS_STAT_USE_RANGE) 17 17 * 18 * @version $Revision: 1.18 2$ $Name: not supported by cvs2svn $19 * @date $Date: 2006-0 7-28 00:44:05$18 * @version $Revision: 1.183 $ $Name: not supported by cvs2svn $ 19 * @date $Date: 2006-08-08 23:32:23 $ 20 20 * 21 21 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 #include "psString.h" 50 50 51 #include "psErrorText.h" 51 52 52 53 53 /*****************************************************************************/ … … 440 440 psError(PS_ERR_UNEXPECTED_NULL, 441 441 false, 442 PS_ERRORTEXT_psStats_STATS_SAMPLE_MEDIAN_SORT_PROBLEM);442 _("Failed to sort input data.")); 443 443 psTrace(__func__, 4, "---- %s(false) end ----\n", __func__); 444 444 psFree(vector); … … 924 924 ((y->data.F64[2] <= yVal) && (yVal <= y->data.F64[0]))) ) { 925 925 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 926 PS_ERRORTEXT_psStats_YVAL_OUT_OF_RANGE,926 _("Specified yVal, %g, is not within y-range, %g to %g."), 927 927 (psF64)yVal, y->data.F64[0], y->data.F64[2]); 928 928 } … … 946 946 if (myPoly == NULL) { 947 947 psError(PS_ERR_UNEXPECTED_NULL, false, 948 PS_ERRORTEXT_psStats_STATS_FIT_QUADRATIC_POLYNOMIAL_1D_FIT);948 _("Failed to fit a 1-dimensional polynomial to the three specified data points. Returning NAN.")); 949 949 psFree(x); 950 950 psFree(y); … … 967 967 if (isnan(tmpFloat)) { 968 968 psError(PS_ERR_UNEXPECTED_NULL, 969 false, PS_ERRORTEXT_psStats_STATS_FIT_QUADRATIC_POLY_MEDIAN);969 false, _("Failed to determine the median of the fitted polynomial. Returning NAN.")); 970 970 psFree(x); 971 971 psFree(y); … … 2035 2035 PS_STAT_FITTED_MEAN | PS_STAT_FITTED_STDEV)) { 2036 2036 if (!vectorRobustStats(inF32, errorsF32, maskU8, maskVal, stats)) { 2037 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psStats_STATS_FAILED);2037 psError(PS_ERR_UNKNOWN, false, _("Failed to calculate the specified statistic.")); 2038 2038 psFree(stats); 2039 2039 psFree(inF32); -
trunk/psLib/src/math/psUnaryOp.c
r7766 r8232 30 30 * @author Robert DeSonia, MHPCC 31 31 * 32 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $33 * @date $Date: 2006-0 6-30 02:20:06$32 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 33 * @date $Date: 2006-08-08 23:32:23 $ 34 34 * 35 35 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 51 51 #include "psLogMsg.h" 52 52 #include "psAssert.h" 53 #include "psErrorText.h" 53 54 54 55 55 /***************************************************************************** … … 78 78 long nOut = ((psVector*)OUT)->n; \ 79 79 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); \ 81 81 if (OUT != IN) { \ 82 82 psFree(OUT); \ … … 99 99 long numColsOut = ((psImage*)OUT)->numCols; \ 100 100 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."), \ 102 102 numColsIn, numRowsIn, numColsOut, numRowsOut); \ 103 103 if (OUT != IN) { \ … … 157 157 char* strType; \ 158 158 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); \ 160 160 if (OUT != IN) { \ 161 161 psFree(OUT); \ … … 275 275 } \ 276 276 } 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); \ 278 278 if (OUT != IN) { \ 279 279 psFree(OUT); \ … … 309 309 case PS_DIMEN_TRANSV: 310 310 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.")); 312 312 psUnaryOp_EXIT; 313 313 } … … 315 315 out = psVectorRecycle(out, ((psVector*)in)->n, psTypeIn->type); 316 316 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.")); 318 318 psUnaryOp_EXIT; 319 319 } … … 324 324 case PS_DIMEN_IMAGE: 325 325 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.")); 327 327 psUnaryOp_EXIT; 328 328 } … … 330 330 out = psImageRecycle(out, ((psImage*)in)->numCols, ((psImage*)in)->numRows, psTypeIn->type); 331 331 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.")); 333 333 psUnaryOp_EXIT; 334 334 } … … 340 340 psFree(out); 341 341 } 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); 343 343 psUnaryOp_EXIT; 344 344 } -
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 } -
trunk/psLib/src/sys/psConfigure.c
r7646 r8232 13 13 * @author Robert DeSonia, MHPCC 14 14 * 15 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $16 * @date $Date: 2006-0 6-23 01:59:15$15 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2006-08-08 23:32:23 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 #include "psError.h" 29 29 #include "psConfigure.h" 30 #include "psErrorText.h" 30 31 31 #include "config.h" 32 32 … … 98 98 if (!p_psTimeInit(timeConfig)) { 99 99 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 100 PS_ERRORTEXT_psConfigure_INITIALIZATION_FAILED, "psTime");100 _("Failed to initialize %s."), "psTime"); 101 101 return; 102 102 } … … 104 104 if (!p_psEOCInit()) { 105 105 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 106 PS_ERRORTEXT_psConfigure_INITIALIZATION_FAILED, "psEOC");106 _("Failed to initialize %s."), "psEOC"); 107 107 return; 108 108 } … … 125 125 if (!p_psTimeFinalize()) { 126 126 psError(PS_ERR_UNKNOWN, false, 127 PS_ERRORTEXT_psConfigure_FINALIZATION_FAILED, "psTime");127 _("Failed to finalize %s."), "psTime"); 128 128 return; 129 129 } … … 132 132 if (!p_psEOCFinalize()) { 133 133 psError(PS_ERR_UNKNOWN, false, 134 PS_ERRORTEXT_psConfigure_FINALIZATION_FAILED, "psEOC");134 _("Failed to finalize %s."), "psEOC"); 135 135 return; 136 136 } -
trunk/psLib/src/sys/psErrorCodes.c.in
r7967 r8232 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 7-25 01:27:48$9 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 20 20 #include "psMemory.h" 21 21 22 #include "psErrorText.h" 22 23 23 24 24 static psErrorDescription staticErrorCodes[] = { -
trunk/psLib/src/sys/psLogMsg.c
r8098 r8232 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1. 59$ $Name: not supported by cvs2svn $14 * @date $Date: 2006-08-0 3 03:26:28$13 * @version $Revision: 1.60 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2006-08-08 23:32:23 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 36 36 #include "psString.h" 37 37 38 #include "psErrorText.h" 38 39 39 40 40 #define MIN_LOG_LEVEL 0 … … 165 165 default: 166 166 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 167 PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr);167 _("Unknown logging keyword %c."), *ptr); 168 168 return false; 169 169 } … … 210 210 211 211 if (fileD == 0) { 212 psError(PS_ERR_IO, true, PS_ERRORTEXT_psLogMsg_OPEN_FILE_FAILED,212 psError(PS_ERR_IO, true, _("Could not open file '%s' for output."), 213 213 location); 214 214 psFree(protocolLocation); -
trunk/psLib/src/sys/psMemory.c
r7901 r8232 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.7 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 7-14 02:26:25$10 * @version $Revision: 1.75 $ $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 … … 33 33 #include "psLine.h" 34 34 #include "psRegion.h" 35 #include "psErrorText.h" 35 36 36 37 37 #define P_PS_MEMMAGIC (psPtr )0xdeadbeef // Magic number in psMemBlock header … … 126 126 if (ptr->refCounter < 1) { 127 127 psError(PS_ERR_MEMORY_CORRUPTION, false, 128 PS_ERRORTEXT_psMemory_MULTIPLE_FREE,128 _("Block %lu, allocated at %s:%d, freed multiple times at %s:%d."), 129 129 (unsigned long)ptr->id, ptr->file, ptr->lineno, file, lineno); 130 130 } … … 148 148 if (m == NULL) { 149 149 psError(PS_ERR_MEMORY_CORRUPTION, true, 150 PS_ERRORTEXT_psMemory_NULL_BLOCK);150 _("NULL memory block found.")); 151 151 return 1; 152 152 } … … 155 155 // using an unreferenced block of memory, are you? 156 156 psError(PS_ERR_MEMORY_CORRUPTION, true, 157 PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE,157 _("Memory block %lu was freed but still being used."), 158 158 (unsigned long)m->id); 159 159 return 1; … … 162 162 if (m->startblock != P_PS_MEMMAGIC || m->endblock != P_PS_MEMMAGIC) { 163 163 psError(PS_ERR_MEMORY_CORRUPTION, true, 164 PS_ERRORTEXT_psMemory_UNDERFLOW,164 _("Memory block %lu is corrupted; buffer underflow detected."), 165 165 (unsigned long)m->id); 166 166 return 1; … … 168 168 if (*(psPtr *)((int8_t *) (m + 1) + m->userMemorySize) != P_PS_MEMMAGIC) { 169 169 psError(PS_ERR_MEMORY_CORRUPTION, true, 170 PS_ERRORTEXT_psMemory_OVERFLOW,170 _("Memory block %lu is corrupted; buffer overflow detected."), 171 171 (unsigned long)m->id); 172 172 return 1; … … 506 506 psMemBlock* ptr = ((psMemBlock* ) vptr) - 1; 507 507 508 psAbort(__func__, PS_ERRORTEXT_psMemory_MULTIPLE_FREE,508 psAbort(__func__,_("Block %lu, allocated at %s:%d, freed multiple times at %s:%d."), 509 509 (unsigned long)ptr->id, ptr->file, ptr->lineno, filename, lineno); 510 510 } -
trunk/psLib/src/sys/psString.c
r7912 r8232 13 13 * @author David Robbins, MHPCC 14 14 * 15 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $16 * @date $Date: 2006-0 7-15 02:50:51$15 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2006-08-08 23:32:23 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 #include "psAbort.h" 29 29 30 #include "psErrorText.h" 30 31 31 32 32 static void stringFree(psString string) … … 78 78 // Log error message and return NULL 79 79 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 80 PS_ERRORTEXT_psString_NCHAR_NEGATIVE,80 _("Can not copy a negative number of characters (%d)."), 81 81 nChar); 82 82 return NULL; -
trunk/psLib/src/sys/psTrace.c
r7571 r8232 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.6 4$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-0 6-15 00:22:54$11 * @version $Revision: 1.65 $ $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 … … 51 51 #include "psLogMsg.h" 52 52 53 #include "psErrorText.h" 53 54 54 55 55 static p_psComponent* cRoot = NULL; // The root of the trace component … … 132 132 if (NULL == currentNode->subcomp[i]) { 133 133 psLogMsg("p_psTraceReset", PS_LOG_WARN, 134 PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,134 _("Sub-component %d of node %s in trace tree is NULL."), 135 135 i, currentNode->name); 136 136 } else { … … 165 165 if (strcmp("", addNodeName) == 0) { 166 166 psError(PS_ERR_BAD_PARAMETER_NULL,true, 167 PS_ERRORTEXT_psTrace_ADD_NULL_COMPONENT);167 _("Failed to add null component to trace tree.")); 168 168 return false; 169 169 } … … 177 177 if (addNodeName[0] != '.') { 178 178 psError(PS_ERR_BAD_PARAMETER_VALUE,true, 179 PS_ERRORTEXT_psTrace_MALFORMED_COMPONENT_NAME,179 _("Failed to add '%s' to the root component tree; component must start with '.'."), 180 180 addNodeName); 181 181 return false; … … 274 274 if ( !componentAdd(compName, level) ) { 275 275 psError(PS_ERR_UNKNOWN, false, 276 PS_ERRORTEXT_psTrace_FAILED_TO_ADD_COMPONENT,276 _("Failed to set trace level (%d) to '%s'."), 277 277 level, 278 278 compName); … … 346 346 if (NULL == currentNode->subcomp[i]) { 347 347 psLogMsg("p_psTraceReset", PS_LOG_WARN, 348 PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,348 _("Sub-component %d of node %s in trace tree is NULL."), 349 349 i, currentNode->name); 350 350 } … … 504 504 if (NULL == comp) { 505 505 psError(PS_ERR_BAD_PARAMETER_NULL, true, 506 PS_ERRORTEXT_psTrace_NULL_TRACETREE,506 _("Function %s called on a NULL trace level tree."), 507 507 __func__); 508 508 return; … … 705 705 default: 706 706 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 707 PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr);707 _("Unknown logging keyword %c."), *ptr); 708 708 return false; 709 709 } -
trunk/psLib/src/types/psArguments.c
r8049 r8232 7 7 * @author David Robbins, MHPCC 8 8 * 9 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-08-0 2 02:28:04$9 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psError.h" 22 22 #include "psAbort.h" 23 #include "psErrorText.h" 23 24 24 #include "psLogMsg.h" 25 25 #include "psTrace.h" -
trunk/psLib/src/types/psArray.c
r7914 r8232 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-0 7-15 02:57:12$11 * @version $Revision: 1.46 $ $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 … … 28 28 #include "psLogMsg.h" 29 29 30 #include "psErrorText.h" 30 31 31 32 32 /***************************************************************************** … … 79 79 { 80 80 if (in == NULL) { 81 psError(PS_ERR_BAD_PARAMETER_NULL,true, PS_ERRORTEXT_psArray_REALLOC_NULL);81 psError(PS_ERR_BAD_PARAMETER_NULL,true,_("psArrayRealloc must be given a non-NULL psArray to resize.")); 82 82 return NULL; 83 83 } else if (in->nalloc != nalloc) { // No need to realloc to same size … … 132 132 if (array == NULL) { 133 133 psError(PS_ERR_BAD_PARAMETER_NULL, true, 134 PS_ERRORTEXT_psArray_ARRAY_NULL);134 _("Specified psArray can not be NULL.")); 135 135 return false; 136 136 } … … 184 184 { 185 185 psError(PS_ERR_BAD_PARAMETER_NULL, true, 186 PS_ERRORTEXT_psArray_ARRAY_NULL);186 _("Specified psArray can not be NULL.")); 187 187 return false; 188 188 } … … 208 208 if (position >= array->nalloc) { 209 209 psError(PS_ERR_BAD_PARAMETER_NULL, true, 210 PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC,210 _("Specified position, %d, is greater than the allocated size of the array, %d."), 211 211 position, array->nalloc); 212 212 return false; … … 226 226 if (array == NULL) { 227 227 psError(PS_ERR_BAD_PARAMETER_NULL, true, 228 PS_ERRORTEXT_psArray_ARRAY_NULL);228 _("Specified psArray can not be NULL.")); 229 229 return NULL; 230 230 } -
trunk/psLib/src/types/psBitSet.c
r7914 r8232 11 11 * @author Robert DeSonia, MHPCC 12 12 * 13 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $14 * @date $Date: 2006-0 7-15 02:57:12$13 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2006-08-08 23:32:23 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 #include "psString.h" 29 29 30 #include "psErrorText.h" 30 31 31 32 32 enum { … … 82 82 if (nalloc < 0) { 83 83 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 84 PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE,84 _("The number of bit in a psBitSet (%d) must be greater than zero."), 85 85 nalloc); 86 86 return NULL; … … 108 108 if (bitSet == NULL) { 109 109 psError(PS_ERR_BAD_PARAMETER_NULL, true, 110 PS_ERRORTEXT_psBitSet_SET_NULL);110 _("Can not operate on a NULL psBitSet.")); 111 111 return bitSet; 112 112 } else if ( (bit < 0) || 113 113 (bit > bitSet->n * 8 - 1) ) { 114 114 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 115 PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,115 _("The specified bit position (%d) is invalid. Position must be between 0 and %d."), 116 116 bit,bitSet->n * 8 - 1); 117 117 return bitSet; … … 131 131 if (bitSet == NULL) { 132 132 psError(PS_ERR_BAD_PARAMETER_NULL, true, 133 PS_ERRORTEXT_psBitSet_SET_NULL);133 _("Can not operate on a NULL psBitSet.")); 134 134 return bitSet; 135 135 } else if ( (bit < 0) || 136 136 (bit > bitSet->n * 8 - 1) ) { 137 137 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 138 PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,138 _("The specified bit position (%d) is invalid. Position must be between 0 and %d."), 139 139 bit,bitSet->n * 8 - 1); 140 140 return bitSet; … … 154 154 if (bitSet == NULL) { 155 155 psError(PS_ERR_BAD_PARAMETER_NULL, true, 156 PS_ERRORTEXT_psBitSet_SET_NULL);156 _("Can not operate on a NULL psBitSet.")); 157 157 return false; 158 158 } else if ( (bit < 0) || 159 159 (bit > bitSet->n * 8 - 1) ) { 160 160 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 161 PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,161 _("The specified bit position (%d) is invalid. Position must be between 0 and %d."), 162 162 bit,bitSet->n * 8 - 1); 163 163 return false; … … 183 183 if (inBitSet1 == NULL) { 184 184 psError(PS_ERR_BAD_PARAMETER_NULL, true, 185 PS_ERRORTEXT_psBitSet_FIRST_OPERAND_NULL);185 _("First psBitSet operand can not be NULL.")); 186 186 psFree(outBitSet); 187 187 return NULL; … … 191 191 if (operator == NULL) { 192 192 psError(PS_ERR_BAD_PARAMETER_NULL, true, 193 PS_ERRORTEXT_psBitSet_OPERATOR_NULL);193 _("Specified operator is NULL. Must specify desired operator.")); 194 194 psFree(outBitSet); 195 195 return NULL; … … 208 208 psFree(outBitSet); 209 209 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 210 PS_ERRORTEXT_psBitSet_OPERATOR_INVALID,210 _("Specified operator, %s, is invalid. Valid operators are AND, OR, and XOR."), 211 211 operator); 212 212 return NULL; … … 216 216 if (inBitSet2 == NULL) { 217 217 psError(PS_ERR_BAD_PARAMETER_NULL, true, 218 PS_ERRORTEXT_psBitSet_SECOND_OPERAND_NULL);218 _("Second psBitSet operand can not be NULL.")); 219 219 psFree(outBitSet); 220 220 return NULL; … … 223 223 if (inBitSet1->n != inBitSet2->n) { 224 224 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 225 PS_ERRORTEXT_psBitSet_OPERANDS_SIZE_DIFFER);225 _("The psBitSet operand must be the same size.")); 226 226 psFree(outBitSet); 227 227 return NULL; … … 274 274 if (inBitSet == NULL) { 275 275 psError(PS_ERR_BAD_PARAMETER_NULL, true, 276 PS_ERRORTEXT_psBitSet_OPERAND_NULL);276 _("Operand can not be NULL.")); 277 277 psFree(outBitSet); 278 278 return NULL; … … 283 283 if (outBitSet == NULL) { 284 284 psError(PS_ERR_UNKNOWN, false, 285 PS_ERRORTEXT_psBitSet_NOT_OP_FAILED);285 _("Could not perform NOT operation.")); 286 286 } 287 287 -
trunk/psLib/src/types/psHash.c
r7914 r8232 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.2 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-0 7-15 02:57:12$14 * @version $Revision: 1.27 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-08-08 23:32:23 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 #include "psAssert.h" 28 28 29 #include "psErrorText.h" 29 30 30 31 31 static psHashBucket* hashBucketAlloc(const char *key, psPtr data, psHashBucket* next); … … 240 240 if ((table == NULL) || (key == NULL)) { 241 241 psError(PS_ERR_BAD_PARAMETER_NULL, true, 242 PS_ERRORTEXT_psHash_KEY_NULL);242 _("Input key can not be NULL.")); 243 243 return NULL; 244 244 } -
trunk/psLib/src/types/psList.c
r7914 r8232 6 6 * @author Robert Daniel DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1.5 0$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 7-15 02:57:12$8 * @version $Revision: 1.51 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-08 23:32:23 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psLogMsg.h" 22 22 23 #include "psErrorText.h" 23 24 24 25 25 #define ITER_INIT_HEAD ((psPtr )1) // next iteration should return head … … 206 206 if (location < 0 || location >= (int)list->n) { 207 207 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 208 PS_ERRORTEXT_psList_LOCATION_INVALID,208 _("Specified location, %d, is invalid."), 209 209 location); 210 210 return false; … … 248 248 if (list == NULL) { 249 249 psError(PS_ERR_BAD_PARAMETER_NULL, true, 250 PS_ERRORTEXT_psList_LIST_NULL);250 _("Specified psList reference is NULL.")); 251 251 return false; 252 252 } … … 254 254 if (data == NULL) { 255 255 psError(PS_ERR_BAD_PARAMETER_NULL, true, 256 PS_ERRORTEXT_psList_DATA_NULL);256 _("Specified data item is NULL.")); 257 257 return false; 258 258 } … … 283 283 if (data == NULL) { 284 284 psError(PS_ERR_BAD_PARAMETER_NULL, true, 285 PS_ERRORTEXT_psList_DATA_NULL);285 _("Specified data item is NULL.")); 286 286 return false; 287 287 } … … 289 289 if (iterator == NULL) { 290 290 psError(PS_ERR_BAD_PARAMETER_NULL, true, 291 PS_ERRORTEXT_psList_ITERATOR_NULL);291 _("Specified iterator is NULL.")); 292 292 return false; 293 293 } … … 296 296 if (!iterator->mutable) { 297 297 psError(PS_ERR_BAD_PARAMETER_NULL, true, 298 PS_ERRORTEXT_psList_ITERATOR_NONMUTABLE);298 _("Specified iterator indicates list is non-mutable.")); 299 299 return false; 300 300 } … … 305 305 if (cursor == NULL && list->head != NULL) { 306 306 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 307 PS_ERRORTEXT_psList_ITERATOR_INVALID);307 _("Specified iterator is not valid.")); 308 308 return false; 309 309 } … … 352 352 if (data == NULL) { 353 353 psError(PS_ERR_BAD_PARAMETER_NULL, true, 354 PS_ERRORTEXT_psList_DATA_NULL);354 _("Specified data item is NULL.")); 355 355 return false; 356 356 } … … 358 358 if (iterator == NULL) { 359 359 psError(PS_ERR_BAD_PARAMETER_NULL, true, 360 PS_ERRORTEXT_psList_ITERATOR_NULL);360 _("Specified iterator is NULL.")); 361 361 return false; 362 362 } … … 365 365 if (!iterator->mutable) { 366 366 psError(PS_ERR_BAD_PARAMETER_NULL, true, 367 PS_ERRORTEXT_psList_ITERATOR_NONMUTABLE);367 _("Specified iterator indicates list is non-mutable.")); 368 368 return false; 369 369 } … … 374 374 if (cursor == NULL && list->head != NULL) { 375 375 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 376 PS_ERRORTEXT_psList_ITERATOR_INVALID);376 _("Specified iterator is not valid.")); 377 377 return false; 378 378 } … … 422 422 if (list == NULL) { 423 423 psError(PS_ERR_BAD_PARAMETER_NULL, true, 424 PS_ERRORTEXT_psList_LIST_NULL);424 _("Specified psList reference is NULL.")); 425 425 return false; 426 426 } … … 440 440 if (list == NULL) { 441 441 psError(PS_ERR_BAD_PARAMETER_NULL, true, 442 PS_ERRORTEXT_psList_LIST_NULL);442 _("Specified psList reference is NULL.")); 443 443 return false; 444 444 } … … 446 446 if (data == NULL) { 447 447 psError(PS_ERR_BAD_PARAMETER_NULL, true, 448 PS_ERRORTEXT_psList_DATA_NULL);448 _("Specified data item is NULL.")); 449 449 return false; 450 450 } … … 458 458 if (elem == NULL) { 459 459 psError(PS_ERR_BAD_PARAMETER_NULL, true, 460 PS_ERRORTEXT_psList_DATA_NOT_FOUND);460 _("Specified data item is not found in the psList.")); 461 461 return false; 462 462 } … … 473 473 if (list == NULL) { 474 474 psError(PS_ERR_BAD_PARAMETER_NULL, true, 475 PS_ERRORTEXT_psList_LIST_NULL);475 _("Specified psList reference is NULL.")); 476 476 return NULL; 477 477 } … … 485 485 if (! psListIteratorSet(iterator,location)) { 486 486 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 487 PS_ERRORTEXT_psList_LOCATION_INVALID,487 _("Specified location, %d, is invalid."), 488 488 location); 489 489 return NULL; -
trunk/psLib/src/types/psLookupTable.c
r7943 r8232 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 7-20 13:00:10$9 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii … … 25 25 #include "psError.h" 26 26 #include "psLookupTable.h" 27 #include "psErrorText.h" 27 28 28 #include "psAssert.h" 29 29 … … 487 487 // Open specified file 488 488 if((fp=fopen(filename, "r")) == NULL) { 489 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psLookupTable_FILE_NOT_FOUND,489 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed to open file %s."), 490 490 filename); 491 491 psFree(outputArray); … … 813 813 if(hiIdx >= numRows) { 814 814 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 815 PS_ERRORTEXT_psLookupTable_INTERPOLATE_HIGH, hiIdx);815 _("High index too big, %d."), hiIdx); 816 816 return NAN; 817 817 } … … 823 823 if(loIdx < 0) { 824 824 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 825 PS_ERRORTEXT_psLookupTable_INTERPOLATE_LOW, loIdx);825 _("Low index too small, %d."), loIdx); 826 826 return NAN; 827 827 } … … 832 832 denom -= convertVal; 833 833 if(fabs(denom) < FLT_EPSILON) { 834 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psLookupTable_DIVIDE_BY_ZERO);834 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Divide by zero error during interpolation.")); 835 835 return NAN; 836 836 } else { -
trunk/psLib/src/types/psMetadata.c
r7937 r8232 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.12 0$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-0 7-19 03:43:14$14 * @version $Revision: 1.121 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-08-08 23:32:23 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 36 36 #include "psLookupTable.h" 37 37 #include "psString.h" 38 #include "psErrorText.h" 38 39 39 #include "psAssert.h" 40 40 #include "psLogMsg.h" … … 319 319 break; 320 320 default: 321 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psMetadata_METATYPE_INVALID, type);321 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified psDataType, %d, is not supported."), type); 322 322 psFree(metadataItem); 323 323 metadataItem = NULL; … … 554 554 // add to the hash's list of duplicate entries 555 555 if (! psListAdd(existingEntry->data.list, PS_LIST_TAIL, (psPtr)item) ) { 556 psError(PS_ERR_UNKNOWN,false, PS_ERRORTEXT_psMetadata_ADD_COLLECTION_FAILED,key);556 psError(PS_ERR_UNKNOWN,false,_("Failed to add metadata item, %s, to metadata collection list."),key); 557 557 return false; 558 558 } … … 565 565 // treat as if new (added to list below) 566 566 if(!psHashAdd(mdTable, key, (psPtr)item)) { 567 psError(PS_ERR_UNKNOWN,false, PS_ERRORTEXT_psMetadata_ADD_TABLE_FAILED,key);567 psError(PS_ERR_UNKNOWN,false,_("Failed to add metadata item, %s, to items table."),key); 568 568 return false; 569 569 } … … 578 578 } 579 579 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 580 PS_ERRORTEXT_psMetadata_DUPLICATE_NOT_ALLOWED);580 _("Duplicate metadata item name is not allowed. Use a psMetadataFlags option to allow such action.")); 581 581 return false; 582 582 } … … 586 586 // Node doesn't exist - Add new metadata item to metadata collection's hash 587 587 if(!psHashAdd(mdTable, key, (psPtr)item)) { 588 psError(PS_ERR_UNKNOWN,false, PS_ERRORTEXT_psMetadata_ADD_TABLE_FAILED,key);588 psError(PS_ERR_UNKNOWN,false,_("Failed to add metadata item, %s, to items table."),key); 589 589 return false; 590 590 } … … 597 597 598 598 if(!psListAdd(mdList, location, (psPtr)item)) { 599 psError(PS_ERR_UNKNOWN,false, PS_ERRORTEXT_psMetadata_ADD_COLLECTION_FAILED,key);599 psError(PS_ERR_UNKNOWN,false,_("Failed to add metadata item, %s, to metadata collection list."),key); 600 600 return false; 601 601 } … … 635 635 636 636 if (!psMetadataAddItem(md, metadataItem, location, format & PS_METADATA_FLAGS_MASK)) { 637 psError(PS_ERR_UNKNOWN,false, PS_ERRORTEXT_psMetadata_ADD_FAILED);637 psError(PS_ERR_UNKNOWN,false,_("Failed to add metadata item to metadata collection list.")); 638 638 psFree(metadataItem); 639 639 return false; … … 717 717 psMetadataItem* entry = psHashLookup(mdTable,key); 718 718 if (entry == NULL) { 719 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);719 psError(PS_ERR_UNKNOWN, false, _("Failed to remove metadata item, %s, from metadata table."), key); 720 720 return false; 721 721 } … … 739 739 psMetadataItem* entry = psListGet(mdList, where); 740 740 if (entry == NULL) { 741 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psMetadata_FIND_INDEX_FAILED, where);741 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Could not find metadata item at index %d."), where); 742 742 return false; 743 743 } … … 745 745 746 746 if (key == NULL) { 747 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psMetadata_REMOVE_LIST_INDEX_FAILED, where);747 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed to remove metadata item, at index %d, from metadata list."), where); 748 748 return false; 749 749 } … … 751 751 psMetadataItem* tableItem = psHashLookup(mdTable, key); 752 752 if (tableItem == NULL) { 753 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);753 psError(PS_ERR_UNKNOWN, false, _("Failed to remove metadata item, %s, from metadata table."), key); 754 754 return false; 755 755 } … … 760 760 } else { 761 761 if (!psHashRemove(mdTable, key)) { 762 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);762 psError(PS_ERR_UNKNOWN, false, _("Failed to remove metadata item, %s, from metadata table."), key); 763 763 return false; 764 764 } … … 828 828 } 829 829 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 830 PS_ERRORTEXT_psMetadata_METATYPE_INVALID,830 _("Specified psDataType, %d, is not supported."), 831 831 metadataItem->type); 832 832 return NULL; … … 928 928 entry = (psMetadataItem*) psListGet(md->list, location); 929 929 if (entry == NULL) { 930 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psMetadata_FIND_INDEX_FAILED, location);930 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Could not find metadata item at index %d."), location); 931 931 return NULL; 932 932 } … … 954 954 regerror(regRtn, newIter->regex, errMsg, 256); 955 955 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 956 PS_ERRORTEXT_psMetadata_REGEX_INVALID,956 _("Specified regular expression is invalid. %s."), 957 957 errMsg); 958 958 psFree(newIter); … … 1333 1333 default: 1334 1334 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1335 PS_ERRORTEXT_psMetadata_METATYPE_INVALID, vector->type.type);1335 _("Specified psDataType, %d, is not supported."), vector->type.type); 1336 1336 return false; 1337 1337 } -
trunk/psLib/src/types/psMetadataConfig.c
r8146 r8232 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1. 69$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-08-0 4 22:58:58$12 * @version $Revision: 1.70 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 #include "psMetadataConfig.h" 33 33 #include "psAssert.h" 34 #include "psErrorText.h" 34 35 35 36 36 /******************************************************************************/ … … 399 399 *status = 1; 400 400 psError(PS_ERR_BAD_PARAMETER_VALUE,true, 401 PS_ERRORTEXT_psMetadataIO_TYPE_INVALID,401 _("Specified type, %d, is not supported."), 402 402 elemType); 403 403 } … … 510 510 default: \ 511 511 psError(PS_ERR_BAD_PARAMETER_TYPE,true, \ 512 PS_ERRORTEXT_psMetadata_METATYPE_INVALID, (int)type); \512 _("Specified psDataType, %d, is not supported."), (int)type); \ 513 513 success = false; \ 514 514 } \ … … 542 542 } else { 543 543 psError(PS_ERR_BAD_PARAMETER_TYPE,true, 544 PS_ERRORTEXT_psMetadata_METATYPE_INVALID, (int)type);544 _("Specified psDataType, %d, is not supported."), (int)type); 545 545 success = false; 546 546 } … … 551 551 default: 552 552 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 553 PS_ERRORTEXT_psMetadata_FORMAT_INVALID, *fType);553 _("Specified print format, %%%c, is not supported."), *fType); 554 554 break; 555 555 } … … 709 709 // Check for no type 710 710 if(strType==NULL) { 711 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_FILE_ELEMENT_NULL, "type",lineCount,711 psError(PS_ERR_IO, true, _("Failed to read a metadata %s on line %u of %s."), "type",lineCount, 712 712 fileName); 713 713 returnValue = false; … … 741 741 vectorType = PS_TYPE_F64; 742 742 } else { 743 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, "", keyName,743 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), "", keyName, 744 744 strType, lineCount, fileName); 745 745 psFree(strType); … … 786 786 // Check for add failure 787 787 if (! addStatus) { 788 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_OVERWRITE_ITEM,788 psError(PS_ERR_IO, true, _("Duplicate Metadata item, %s, found on line %u of %s. Overwrite not allowed."), 789 789 keyName, lineCount, fileName); 790 790 psFree(strType); … … 795 795 } else { 796 796 // Metadata type read error 797 psError(PS_ERR_IO,true, PS_ERRORTEXT_psMetadataIO_FILE_ELEMENT_NULL,797 psError(PS_ERR_IO,true,_("Failed to read a metadata %s on line %u of %s."), 798 798 keyName,lineCount,fileName); 799 799 psFree(strType); … … 805 805 } 806 806 if(!typeFound) { 807 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_FILE_TYPE_INVALID,807 psError(PS_ERR_IO, true, _("Metadata type '%s', found on line %u of %s, is invalid."), 808 808 strType, lineCount,fileName); 809 809 psFree(strType); … … 822 822 strValue = getToken(&linePtr, "#", &status,true); 823 823 if(status) { 824 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_FILE_ELEMENT_NULL, "value", lineCount,824 psError(PS_ERR_IO, true, _("Failed to read a metadata %s on line %u of %s."), "value", lineCount, 825 825 fileName); 826 826 psFree(strType); … … 829 829 } 830 830 if(strValue==NULL) { 831 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_FILE_ELEMENT_NULL, "value", lineCount,831 psError(PS_ERR_IO, true, _("Failed to read a metadata %s on line %u of %s."), "value", lineCount, 832 832 fileName); 833 833 psFree(strType); … … 839 839 strComment = getToken(&linePtr,"~", &status,true); 840 840 if(status) { 841 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_FILE_ELEMENT_NULL, "comment", lineCount,841 psError(PS_ERR_IO, true, _("Failed to read a metadata %s on line %u of %s."), "comment", lineCount, 842 842 fileName); 843 843 psFree(strType); … … 864 864 strComment, tempBool); 865 865 } else { 866 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,866 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 867 867 strType, lineCount, fileName); 868 868 returnValue = false; … … 878 878 } else { 879 879 psError(PS_ERR_IO, true, 880 PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName, strType, lineCount,880 _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, strType, lineCount, 881 881 fileName); 882 882 returnValue = false; … … 888 888 addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempInt); 889 889 } else { 890 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,890 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 891 891 strType, lineCount, fileName); 892 892 returnValue = false; … … 898 898 addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempInt); 899 899 } else { 900 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,900 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 901 901 strType, lineCount, fileName); 902 902 returnValue = false; … … 908 908 addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempInt); 909 909 } else { 910 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,910 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 911 911 strType, lineCount, fileName); 912 912 returnValue = false; … … 918 918 addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempUint); 919 919 } else { 920 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,920 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 921 921 strType, lineCount, fileName); 922 922 returnValue = false; … … 928 928 addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempUint); 929 929 } else { 930 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,930 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 931 931 strType, lineCount, fileName); 932 932 returnValue = false; … … 938 938 addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempUint); 939 939 } else { 940 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,940 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 941 941 strType, lineCount, fileName); 942 942 returnValue = false; … … 958 958 strComment, mTime); 959 959 } else { 960 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,960 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 961 961 strType, lineCount, fileName); 962 962 returnValue = false; … … 971 971 strComment, tempVec); 972 972 } else { 973 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,973 psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u of %s."), strValue, keyName, 974 974 strType, lineCount, fileName); 975 975 returnValue = false; … … 983 983 for(psS32 k=0; k < nonUniqueKeys->n; k++) { 984 984 if(strcmp(keyName,(char*)nonUniqueKeys->data[k]) == 0) { 985 psError(PS_ERR_IO,true, PS_ERRORTEXT_psMetadataIO_DUPLICATE_MULTI,985 psError(PS_ERR_IO,true,_("Duplicate MULTI specifier on line %u of %s."), 986 986 lineCount,fileName); 987 987 psFree(strType); … … 1009 1009 break; 1010 1010 default: 1011 psError(PS_ERR_IO,true, PS_ERRORTEXT_psMetadataIO_FILE_TYPE_INVALID,1011 psError(PS_ERR_IO,true,_("Metadata type '%s', found on line %u of %s, is invalid."), 1012 1012 lineCount,fileName); 1013 1013 break; … … 1057 1057 if(repeatedChars(linePtr, '@') > 1) { 1058 1058 psError(PS_ERR_IO, true, 1059 PS_ERRORTEXT_psMetadataIO_FILE_MULTIPLE_CHAR, '@', lineCount, fileName);1059 _("More than one '%c' character not allowed. Found on line %u of %s."), '@', lineCount, fileName); 1060 1060 return false; 1061 1061 } … … 1065 1065 if(status) { 1066 1066 psError(PS_ERR_IO, true, 1067 PS_ERRORTEXT_psMetadataIO_FILE_ELEMENT_NULL, "keyName", lineCount, fileName);1067 _("Failed to read a metadata %s on line %u of %s."), "keyName", lineCount, fileName); 1068 1068 psFree(keyName); 1069 1069 return false; … … 1075 1075 strType = getToken(&linePtr," ",&status,true); 1076 1076 if(strType == NULL) { 1077 psError(PS_ERR_IO,true, PS_ERRORTEXT_psMetadataIO_FILE_ELEMENT_NULL,"type",lineCount,1077 psError(PS_ERR_IO,true,_("Failed to read a metadata %s on line %u of %s."),"type",lineCount, 1078 1078 fileName); 1079 1079 psFree(keyName); … … 1089 1089 // Compare type name with the list of current types 1090 1090 if(strcmp(strType,(char*)typeArray->data[k]) == 0) { 1091 psError(PS_ERR_IO,true, PS_ERRORTEXT_psMetadataIO_TYPE_DUPLICATE,1091 psError(PS_ERR_IO,true,_("Specified type, %s, on line %u of %s is already defined."), 1092 1092 strType,lineCount,fileName); 1093 1093 psFree(tempTemplate); … … 1104 1104 psFree(tempTemplate); 1105 1105 } else { 1106 psError(PS_ERR_IO,true, PS_ERRORTEXT_psMetadataIO_FILE_TYPE_INVALID,1106 psError(PS_ERR_IO,true,_("Metadata type '%s', found on line %u of %s, is invalid."), 1107 1107 strType,lineCount,fileName); 1108 1108 psFree(keyName); … … 1187 1187 // Attempt to open specified file 1188 1188 if((fp=fopen(filename, "r")) == NULL) { 1189 psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_FILE_OPEN_FAILED, filename);1189 psError(PS_ERR_IO, true, _("Failed to open file '%s'. Check if it exists and it has the proper permissions."), filename); 1190 1190 return NULL; 1191 1191 } … … 1246 1246 // XXX : this is probably not the right error value 1247 1247 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1248 PS_ERRORTEXT_psMetadata_METATYPE_INVALID, PS_DATA_UNKNOWN);1248 _("Specified psDataType, %d, is not supported."), PS_DATA_UNKNOWN); 1249 1249 psFree(keys); 1250 1250 psFree(format); … … 1385 1385 psStringAppend(&content, "PS_TIME_TT "); 1386 1386 else { 1387 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psMetadata_METATYPE_INVALID, time->type);1387 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified psDataType, %d, is not supported."), time->type); 1388 1388 psFree(content); 1389 1389 return NULL; … … 1469 1469 default: 1470 1470 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1471 PS_ERRORTEXT_psMetadata_METATYPE_INVALID, vector->type.type);1471 _("Specified psDataType, %d, is not supported."), vector->type.type); 1472 1472 psFree(content); 1473 1473 return NULL; … … 1481 1481 default: 1482 1482 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1483 PS_ERRORTEXT_psMetadata_METATYPE_INVALID, item->type);1483 _("Specified psDataType, %d, is not supported."), item->type); 1484 1484 psFree(content); 1485 1485 return NULL; -
trunk/psLib/src/types/psPixels.c
r7914 r8232 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 7-15 02:57:12$9 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-08 23:32:23 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 20 20 21 21 #include "psError.h" 22 #include "psErrorText.h" 22 23 23 24 24 typedef int(*qsortCompareFcn)(const void *, const void *); … … 133 133 { 134 134 if (pixels == NULL) { 135 psError(PS_ERR_BAD_PARAMETER_NULL,true, PS_ERRORTEXT_psPixels_NULL);135 psError(PS_ERR_BAD_PARAMETER_NULL,true,_("Input psPixels can not be NULL.")); 136 136 psFree(out); 137 137 return NULL; … … 154 154 if (pixels == NULL) { 155 155 psError(PS_ERR_BAD_PARAMETER_NULL, true, 156 PS_ERRORTEXT_psPixels_NULL);156 _("Input psPixels can not be NULL.")); 157 157 psFree(out); 158 158 return NULL; … … 161 161 if (data == NULL) { 162 162 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 163 PS_ERRORTEXT_psPixels_DATA_NULL);163 _("Input psPixels contains no data.")); 164 164 psFree(out); 165 165 return NULL; … … 173 173 if ( (x0 < 0 || x1 < 0) || (y0 < 0 || y1 < 0) ) { 174 174 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 175 PS_ERRORTEXT_psPixels_REGION_INVALID,175 _("Specified psRegion, [%d:%d,%d:%d], does not specify a valid region."), 176 176 (int)y0,(int)y1,(int)x0,(int)x1); 177 177 psFree(out); … … 186 186 if (numRows < 1 || numCols < 1) { 187 187 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 188 PS_ERRORTEXT_psPixels_REGION_INVALID,188 _("Specified psRegion, [%d:%d,%d:%d], does not specify a valid region."), 189 189 (int)y0,(int)y1,(int)x0,(int)x1); 190 190 psFree(out); … … 196 196 if (out == NULL) { 197 197 psError(PS_ERR_UNKNOWN, false, 198 PS_ERRORTEXT_psPixels_FAILED_IMAGE_CREATE,198 _("Failed to create image of size %dx%d."), 199 199 numCols, numRows); 200 200 return NULL; … … 232 232 if (mask == NULL) { 233 233 psError(PS_ERR_BAD_PARAMETER_NULL, true, 234 PS_ERRORTEXT_psPixels_MASK_NULL);234 _("Specified mask can not be NULL.")); 235 235 psFree(out); 236 236 return NULL; … … 240 240 PS_TYPE_NAME(typeStr,mask->type.type); 241 241 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 242 PS_ERRORTEXT_psPixels_MASK_TYPE,242 _("Specified mask's type, %s, is invalid. Should be PS_TYPE_MASK."), 243 243 typeStr); 244 244 psFree(out); … … 295 295 if (pixels == NULL) { 296 296 psError(PS_ERR_BAD_PARAMETER_NULL, true, 297 PS_ERRORTEXT_psPixels_NULL);297 _("Input psPixels can not be NULL.")); 298 298 return NULL; 299 299 } … … 363 363 { 364 364 if (pixels == NULL) { 365 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psPixels_NULL);365 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("Input psPixels can not be NULL.")); 366 366 return false; 367 367 } … … 397 397 psPixelCoord out; 398 398 if (pixels == NULL) { 399 psError(PS_ERR_BAD_PARAMETER_NULL, true, PS_ERRORTEXT_psPixels_NULL);399 psError(PS_ERR_BAD_PARAMETER_NULL, true, _("Input psPixels can not be NULL.")); 400 400 out.x = 0; //XXX: should be NAN when changed to float 401 401 out.y = 0; //XXX: should be NAN when changed to float -
trunk/psLib/src/xml/psXML.c
r7766 r8232 10 10 * @author David Robbins, MHPCC 11 11 * 12 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 6-30 02:20:06$12 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 133 133 else { 134 134 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 135 PS_ERRORTEXT_psXML_INVALID_CONTENT);135 _("Failed to recognize XML content. Invalid syntax.")); 136 136 return NULL; 137 137 } … … 188 188 default: 189 189 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 190 PS_ERRORTEXT_psXML_INVALID_DATATYPE);190 _("Failed to recognize datatype from/for XML file.")); 191 191 psFree(XML); 192 192 psFree(iter); … … 198 198 default: 199 199 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 200 PS_ERRORTEXT_psXML_INVALID_DATATYPE);200 _("Failed to recognize datatype from/for XML file.")); 201 201 psFree(XML); 202 202 psFree(iter); … … 283 283 default: 284 284 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 285 PS_ERRORTEXT_psXML_INVALID_DATATYPE);285 _("Failed to recognize datatype from/for XML file.")); 286 286 } 287 287 } … … 299 299 else 300 300 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 301 PS_ERRORTEXT_psXML_INVALID_CONTENT);301 _("Failed to recognize XML content. Invalid syntax.")); 302 302 in = endp; 303 303 nsec = (unsigned int)strtol(in, &endp, 10); … … 307 307 else 308 308 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 309 PS_ERRORTEXT_psXML_INVALID_CONTENT);309 _("Failed to recognize XML content. Invalid syntax.")); 310 310 in = endp; 311 311 if ( !strncmp(in, "false", 10) || !strncmp(in, "f", 10) || … … 317 317 else { 318 318 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 319 PS_ERRORTEXT_psXML_INVALID_CONTENT);319 _("Failed to recognize XML content. Invalid syntax.")); 320 320 } 321 321 } … … 335 335 } else { 336 336 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 337 PS_ERRORTEXT_psXML_INVALID_CONTENT);337 _("Failed to recognize XML content. Invalid syntax.")); 338 338 return(PS_DATA_UNKNOWN); 339 339 } … … 348 348 } else { 349 349 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 350 PS_ERRORTEXT_psXML_INVALID_CONTENT);350 _("Failed to recognize XML content. Invalid syntax.")); 351 351 return(PS_DATA_UNKNOWN); 352 352 } … … 360 360 } else { 361 361 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 362 PS_ERRORTEXT_psXML_INVALID_CONTENT);362 _("Failed to recognize XML content. Invalid syntax.")); 363 363 return(PS_DATA_UNKNOWN); 364 364 } … … 370 370 } else { 371 371 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 372 PS_ERRORTEXT_psXML_INVALID_CONTENT);372 _("Failed to recognize XML content. Invalid syntax.")); 373 373 return(PS_DATA_UNKNOWN); 374 374 } … … 398 398 if ( nodeNum == 0 && strncmp((const char*)cur_node->name, "metadata", MAXSTR) ) { 399 399 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 400 PS_ERRORTEXT_psXML_INVALID_CONTENT);400 _("Failed to recognize XML content. Invalid syntax.")); 401 401 psFree(meta); 402 402 return NULL; … … 440 440 || elemType == PS_DATA_BOOL) { 441 441 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 442 PS_ERRORTEXT_psXML_INVALID_DATATYPE);442 _("Failed to recognize datatype from/for XML file.")); 443 443 psFree(meta); 444 444 return NULL; … … 467 467 else { 468 468 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 469 PS_ERRORTEXT_psXML_INVALID_CONTENT);469 _("Failed to recognize XML content. Invalid syntax.")); 470 470 psFree(meta); 471 471 return NULL; … … 501 501 } else { 502 502 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 503 PS_ERRORTEXT_psXML_INVALID_CONTENT);503 _("Failed to recognize XML content. Invalid syntax.")); 504 504 psFree(meta); 505 505 return NULL; … … 509 509 default: 510 510 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 511 PS_ERRORTEXT_psXML_INVALID_DATATYPE);511 _("Failed to recognize datatype from/for XML file.")); 512 512 psFree(meta); //XXX: Do I really need this? 513 513 return NULL; … … 558 558 FILE *file; 559 559 if( (file = fopen(filename, "w")) == NULL ) { 560 psError(PS_ERR_IO, true, PS_ERRORTEXT_psXML_IO_FILE_OPEN_FAILED, filename);560 psError(PS_ERR_IO, true, _("Failed to open file '%s'. Check if it exists and it has the proper permissions."), filename); 561 561 return false; 562 562 } … … 592 592 xmlDocDumpMemory(*doc, &buff, &bufferSize); 593 593 if ( MAXVEC < strlen((char *)buff) ) { 594 psError(PS_ERR_LOCATION_INVALID, true, PS_ERRORTEXT_psXML_BUFFER_TOO_SMALL);594 psError(PS_ERR_LOCATION_INVALID, true, _("Buffer to small to store XML doc.")); 595 595 // xmlFree(buff); 596 596 return false; … … 628 628 write(fd, buf, n); 629 629 } else { 630 psError(PS_ERR_LOCATION_INVALID, true, PS_ERRORTEXT_psXML_BUFFER_TOO_SMALL);630 psError(PS_ERR_LOCATION_INVALID, true, _("Buffer to small to store XML doc.")); 631 631 return false; 632 632 } -
trunk/psLib/src/xml/psXML.h
r5000 r8232 10 10 * @author David Robbins, MHPCC 11 11 * 12 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $13 * @date $Date: 200 5-09-12 21:36:54$12 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 #include "psConstants.h" 33 33 #include "psTime.h" 34 #include "psErrorText.h" 34 35 35 36 36
Note:
See TracChangeset
for help on using the changeset viewer.
