Changeset 8627 for trunk/psLib/src/astro/psTime.c
- Timestamp:
- Aug 25, 2006, 6:34:28 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psTime.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psTime.c
r8232 r8627 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.9 3$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-08- 08 23:32:22$12 * @version $Revision: 1.94 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-26 04:34:27 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 80 80 81 81 // Offset of year 0000 from epoch 82 #define YEAR_0000_SEC -62125920000 .082 #define YEAR_0000_SEC -62125920000 83 83 84 84 // Offset of year 9999 from epoch 85 #define YEAR_9999_SEC 253202544000 .085 #define YEAR_9999_SEC 253202544000 86 86 87 87 /** Static function prototypes */ … … 299 299 if(tablesFrom->n != numTables) { 300 300 p_psMemAllocatePersistent(initialPersistence); 301 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: % d, Expected %d."), tablesFrom->n, numTables);301 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: %ld, Expected %d."), tablesFrom->n, numTables); 302 302 psFree(tablesFrom); 303 303 return false; … … 316 316 if(tablesTo->n != numTables) { 317 317 p_psMemAllocatePersistent(initialPersistence); 318 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: % d, Expected %d."), tablesTo->n, numTables);318 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: %ld, Expected %d."), tablesTo->n, numTables); 319 319 psFree(tablesFrom); 320 320 psFree(tablesTo); … … 335 335 if(tablesIndex->n != numTables) { 336 336 p_psMemAllocatePersistent(initialPersistence); 337 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Incorrect vector size. Size: % d, Expected %d."),tablesIndex->n,numTables);337 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Incorrect vector size. Size: %ld, Expected %d."),tablesIndex->n,numTables); 338 338 psFree(tablesFrom); 339 339 psFree(tablesTo); … … 1357 1357 1358 1358 // Check valid year range 1359 PS_ASSERT_ LONG_WITHIN_RANGE(time->sec,YEAR_0000_SEC,YEAR_9999_SEC,NULL)1359 PS_ASSERT_S64_WITHIN_RANGE(time->sec, (psS64)YEAR_0000_SEC, (psS64)YEAR_9999_SEC, NULL); 1360 1360 1361 1361 // Allocate temp strings … … 1727 1727 // Create output time 1728 1728 sec = delta + (psF64)tempTime->sec + (psF64)tempTime->nsec/1e9; 1729 PS_ASSERT_ LONG_WITHIN_RANGE((psS64)sec,0,PS_MAX_S64,outTime);1729 PS_ASSERT_S64_WITHIN_RANGE((psS64)sec, (psS64)0, PS_MAX_S64, NULL); 1730 1730 outTime->sec = (psS64)sec; 1731 1731 outTime->nsec = (psU32)((sec - (psF64)outTime->sec)*1e9); 1732 1732 1733 1733 // Error check 1734 PS_ASSERT_INT_WITHIN_RANGE(outTime->nsec,0,(psU32)((1e9)-1), outTime);1734 PS_ASSERT_INT_WITHIN_RANGE(outTime->nsec,0,(psU32)((1e9)-1), NULL); 1735 1735 1736 1736 // Convert result to same time type as input
Note:
See TracChangeset
for help on using the changeset viewer.
