Changeset 34089 for trunk/psLib
- Timestamp:
- Jun 26, 2012, 11:47:13 AM (14 years ago)
- Location:
- trunk/psLib
- Files:
-
- 14 edited
-
configure.ac (modified) (2 diffs)
-
m4/ipp_stdopts.m4 (modified) (2 diffs)
-
src/astro/psTime.c (modified) (2 diffs)
-
src/fits/psFitsTable.c (modified) (2 diffs)
-
src/imageops/psImageGeomManip.c (modified) (2 diffs)
-
src/imageops/psImageInterpolate.c (modified) (5 diffs)
-
src/imageops/psImageStructManip.c (modified) (1 diff)
-
src/math/psMinimizePowell.c (modified) (2 diffs)
-
src/mathtypes/psVector.c (modified) (1 diff)
-
src/types/psLookupTable.c (modified) (2 diffs)
-
src/types/psMetadata.c (modified) (1 diff)
-
src/types/psMetadataConfig.c (modified) (1 diff)
-
src/types/psMetadataItemCompare.c (modified) (2 diffs)
-
test/tap/src/tap.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/configure.ac
r29542 r34089 27 27 AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION) 28 28 29 IPP_STD CFLAGS29 IPP_STDLDFLAGS 30 30 31 31 dnl ------------------- PERL options --------------------- … … 473 473 dnl ------- enable -Werror after all of the probes have run --------- 474 474 IPP_STDOPTS 475 476 CFLAGS="${CFLAGS} -Wall -Werror" 477 dnl enable POSIX/XSI and C99 compliance 475 IPP_STDCFLAGS 478 476 CFLAGS="${CFLAGS=} -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L" 479 477 -
trunk/psLib/m4/ipp_stdopts.m4
r23793 r34089 1 1 2 dnl IPP_STDCFLAGS must go *after* external probes (to avoid Werror confusing things) 2 3 AC_DEFUN([IPP_STDCFLAGS], 3 4 [ 5 dnl this section currently overrides a user-defined CFLAGS 4 6 AC_ARG_ENABLE(optimize, 5 7 [AS_HELP_STRING(--enable-optimize,enable compiler optimization)], … … 12 14 ] 13 15 ) 16 dnl this section accepts a user-defined CFLAGS, and sets CFLAGS to the empty string if not present 17 AC_ARG_ENABLE(debug-build, 18 [AS_HELP_STRING(--enable-debug-build,enable debug build: ie disable Werror)], 19 [AC_MSG_RESULT(debug build enabled) 20 if test x"${CFLAGS}" == x; then 21 CFLAGS="-Wall" 22 else 23 CFLAGS="${CFLAGS=} -Wall" 24 fi 25 ], 26 [AC_MSG_RESULT([compile optimization disabled]) 27 if test x"${CFLAGS}" == x; then 28 CFLAGS="-Wall -Werror" 29 else 30 CFLAGS="${CFLAGS=} -Wall -Werror" 31 fi 32 ] 33 ) 14 34 ]) 35 36 dnl IPP_STDLDFLAGS must go *before* external probes (so linking is done with --no-as-needed if needed) 37 AC_DEFUN([IPP_STDLDFLAGS], 38 [ 39 dnl this section accepts a user-defined LDFLAGS, and sets LDFLAGS to the empty string if not present 40 AC_ARG_ENABLE(no-as-needed, 41 [AS_HELP_STRING(--enable-no-as-needed, prevent as-needed option sometimes supplied to gcc such as Ubuntu after 11.11)], 42 [AC_MSG_RESULT(no-as-needed passed to linker) 43 if test x"${LDFLAGS}" == x; then 44 LDFLAGS="-Wl,--no-as-needed" 45 else 46 LDFLAGS="${LDFLAGS=} -Wl,--no-as-needed" 47 fi 48 ], 49 [AC_MSG_RESULT(as-needed linker flags accepted) 50 if test x"${LDFLAGS}" == x; then 51 LDFLAGS="" 52 fi 53 ] 54 ) 55 ]) 56 dnl 15 57 16 58 AC_DEFUN([IPP_STDOPTS], -
trunk/psLib/src/astro/psTime.c
r30724 r34089 223 223 static bool timeInit(const char *fileName) 224 224 { 225 psS32 numLines = 0;226 225 bool foundTable = false; 227 226 char *tableDir = NULL; … … 390 389 if (i < numTables) { 391 390 table = psLookupTableAlloc(fullTableName, (const char*)tableFormat, tablesIndex->data.S32[i]); 392 numLines =psLookupTableRead(table);391 psLookupTableRead(table); 393 392 } else { 394 393 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, -
trunk/psLib/src/fits/psFitsTable.c
r31152 r34089 511 511 colSpec *spec = psAlloc(sizeof(colSpec)); // Specification for this column 512 512 // BOOL type is not a valid vector type, so we translate it to U8 513 spec->type = colItem->type == PS_ TYPE_BOOL ? PS_TYPE_U8 : colItem->type;513 spec->type = colItem->type == PS_DATA_BOOL ? PS_DATA_U8 : colItem->type; 514 514 spec->size = size; 515 515 if (colItem->type == PS_DATA_VECTOR) { … … 526 526 } 527 527 if (colItem->type != spec->type && 528 colItem->type != PS_ TYPE_BOOL && spec->type != PS_TYPE_U8) {528 colItem->type != PS_DATA_BOOL && spec->type != PS_DATA_U8) { 529 529 psWarning("Differing type found for column %s: %x vs %x --- using the first found.\n", 530 530 colSpecItem->name, colItem->type, spec->type); -
trunk/psLib/src/imageops/psImageGeomManip.c
r31446 r34089 580 580 psS32 outRows; 581 581 psS32 outCols; 582 psS32 elementSize;583 582 psElemType type; 584 583 … … 594 593 outCols = input->numCols; 595 594 type = input->type.type; 596 elementSize = PSELEMTYPE_SIZEOF(type);595 // XXX unused psS32 elementSize = PSELEMTYPE_SIZEOF(type); 597 596 out = psImageRecycle(out, outCols, outRows, type); 598 597 -
trunk/psLib/src/imageops/psImageInterpolate.c
r31446 r34089 461 461 } 462 462 463 #define INTERPOLATE_CHECK() \ 464 if (xMin < 0) { /* XXX warn or error? */ } \ 465 if (yMin < 0) { /* XXX warn or error? */ } \ 466 if (xMax >= image->numCols) { /* XXX warn or error? */ } \ 467 if (yMax >= image->numRows) { /* XXX warn or error? */ } \ 468 463 469 // Determine the result of the interpolation after all the math has been done 464 470 static psImageInterpolateStatus interpolateResult(const psImageInterpolation *interp, … … 523 529 } 524 530 INTERPOLATE_RANGE(); 531 INTERPOLATE_CHECK(); 525 532 526 533 // Get the appropriate kernels … … 779 786 } 780 787 INTERPOLATE_RANGE(); 788 INTERPOLATE_CHECK(); 781 789 782 790 // Get the appropriate kernels … … 989 997 INTERPOLATE_SETUP(x, y); 990 998 xExact = yExact = false; 999 if (xExact && yExact) { /* possible alternative */ } 991 1000 992 1001 psF32 xKernel[size], yKernel[size]; // Interpolation kernels … … 1038 1047 INTERPOLATE_SETUP(x, y); 1039 1048 xExact = yExact = false; 1049 if (xExact && yExact) { /* possible alternative */ } 1040 1050 1041 1051 psF32 xKernel[size], yKernel[size]; // Interpolation kernels -
trunk/psLib/src/imageops/psImageStructManip.c
r21347 r34089 212 212 elementSize = PSELEMTYPE_SIZEOF(inDatatype); 213 213 214 if (0) { fprintf (stderr, "%d elements, %d total memory\n", elements, elements * elementSize); } 215 214 216 output = p_psImageRecycle(file, lineno, func, output, numCols, numRows, type); 215 217 P_PSIMAGE_SET_COL0(output, input->col0); -
trunk/psLib/src/math/psMinimizePowell.c
r28998 r34089 367 367 psF32 c = 0.0; 368 368 psF32 n = 0.0; 369 psF32 fa = 0.0;370 psF32 fb = 0.0;371 psF32 fc = 0.0;372 369 psF32 fn = 0.0; 373 370 psF32 mul = 0.0; … … 415 412 PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, tmpb, b); 416 413 PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, tmpc, c); 417 fa = func(tmpa, coords); 418 fb = func(tmpb, coords); 419 fc = func(tmpc, coords); 414 psF32 fb = func(tmpb, coords); 415 # if (PS_TRACE_ON) 416 psF32 fa = func(tmpa, coords); 417 psF32 fc = func(tmpc, coords); 420 418 psTrace("psLib.math", 6, "LineMin: f(%f %f %f) is (%f %f %f)\n", a, b, c, fa, fb, fc); 419 # endif 421 420 422 421 // We determine which is the biggest segment in [a,b,c] then split -
trunk/psLib/src/mathtypes/psVector.c
r26892 r34089 322 322 PSVECTOR_COPY_SAME_CASE(F32); 323 323 PSVECTOR_COPY_SAME_CASE(F64); 324 default: { 325 char* typeStr; 326 PS_TYPE_NAME(typeStr,type); 327 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 328 // _("Input psVector is an unsupported type (0x%x)."), typeStr); 329 "Input psVector is an unsupported type.\n"); 330 psFree(output); 331 return NULL; 332 } 324 default: { 325 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Input psVector is an unsupported type.\n"); 326 psFree(output); 327 return NULL; 328 } 333 329 } 334 330 return output; -
trunk/psLib/src/types/psLookupTable.c
r27774 r34089 607 607 psU64 loIdx = 0; 608 608 long numRows = 0; 609 long numCols = 0;610 609 psF64 out = 0.0; 611 610 psF64 denom = 0.0; … … 619 618 values = table->values; 620 619 numRows = table->index->n; 621 numCols = table->values->n;622 620 valuesVec = (psVector*)values->data[column]; 623 621 -
trunk/psLib/src/types/psMetadata.c
r30024 r34089 1504 1504 fprintf(fd, "\n"); 1505 1505 break; 1506 case PS_DATA_UNKNOWN:1507 1506 default: 1508 1507 fprintf(fd, "<Unsupported type>\n"); -
trunk/psLib/src/types/psMetadataConfig.c
r31902 r34089 1573 1573 } 1574 1574 break; 1575 case PS_DATA_UNKNOWN:1576 1575 default: 1577 1576 psError(PS_ERR_BAD_PARAMETER_VALUE, true, -
trunk/psLib/src/types/psMetadataItemCompare.c
r20479 r34089 129 129 case PS_TYPE_##COMPARETYPENAME: { \ 130 130 TEMPLATETYPE valueC = (TEMPLATETYPE)compare->data.COMPARENAME; \ 131 TEMPLATETYPE valueT = (TEMPLATETYPE)template->data.TEMPLATENAME; \ 132 /* XXX check the validiy of the type casting? */ \ 133 if (valueC != compare->data.COMPARENAME) { \ 134 return false; \ 135 } \ 136 COMPARE_VALUES(valueT, valueC, (template->type == PS_TYPE_F32 || template->type == PS_TYPE_F64)); \ 131 TEMPLATETYPE valueT = (TEMPLATETYPE)template->data.TEMPLATENAME; \ 132 /* XXX check the validiy of the type casting? */ \ 133 if (valueC != compare->data.COMPARENAME) { \ 134 return false; \ 135 } \ 136 COMPARE_VALUES(valueT, valueC, (template->type == PS_DATA_F32 || template->type == PS_DATA_F64)); \ 137 /* COMPARE_VALUES(valueT, valueC, 1); */ \ 137 138 psAbort("Should never reach here."); \ 138 139 } … … 277 278 return false; 278 279 } 279 double compareValue = compare->type == PS_ TYPE_F32 ? compare->data.F32 : compare->data.F64;280 double compareValue = compare->type == PS_DATA_F32 ? compare->data.F32 : compare->data.F64; 280 281 COMPARE_VALUES(templateValue, compareValue, true); 281 282 } -
trunk/psLib/test/tap/src/tap.c
r8958 r34089 87 87 if(test_name != NULL) { 88 88 va_start(ap, test_name); 89 vasprintf(&local_test_name, test_name, ap); 89 int status = vasprintf(&local_test_name, test_name, ap); 90 if (status) {/* warning? */} 90 91 va_end(ap); 91 92 … … 303 304 304 305 va_start(ap, fmt); 305 asprintf(&skip_msg, fmt, ap); 306 int status = asprintf(&skip_msg, fmt, ap); 307 if (status) {/* warning? */} 306 308 va_end(ap); 307 309 … … 328 330 329 331 va_start(ap, fmt); 330 vasprintf(&todo_msg, fmt, ap); 332 int status = vasprintf(&todo_msg, fmt, ap); 333 if (status) {/* warning? */} 331 334 va_end(ap); 332 335
Note:
See TracChangeset
for help on using the changeset viewer.
