Index: trunk/psLib/src/astro/psTime.c
===================================================================
--- trunk/psLib/src/astro/psTime.c	(revision 2196)
+++ trunk/psLib/src/astro/psTime.c	(revision 2204)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-26 00:37:44 $
+ *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:30 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -144,5 +144,5 @@
 static double lookupSer7Table(
     const psTime *time,                 ///< time to lookup.
-    int col                             ///< Column to lookup.
+    psS32 col                             ///< Column to lookup.
 );
 
@@ -150,6 +150,6 @@
 {
     char line[LINESIZE];
-    int j = 0;
-    int maxLines = 100;
+    psS32 j = 0;
+    psS32 maxLines = 100;
     psF64 *ptr = NULL;
     psImage *table = NULL;
@@ -180,5 +180,5 @@
     }
 
-    *(unsigned int *)&table->numRows = j;
+    *(psU32 *)&table->numRows = j;
 
     p_psMemSetPersistent(table,true);
@@ -191,8 +191,8 @@
 static psImage* readSer7File(const char *fileName)
 {
-    bool beginRecord = false;
+    psBool beginRecord = false;
     char line[LINESIZE];
-    int j = 0;
-    int maxLines = 400;
+    psS32 j = 0;
+    psS32 maxLines = 400;
     psImage *table = NULL;
     FILE *fd = NULL;
@@ -231,5 +231,5 @@
         }
     }
-    *(unsigned int *)&table->numRows = j;
+    *(psU32 *)&table->numRows = j;
 
     p_psMemSetPersistent(table,true);
@@ -244,7 +244,7 @@
 {
     char line[LINESIZE];
-    int i = 0;
-    int j = 0;
-    int maxLines = 2500;
+    psS32 i = 0;
+    psS32 j = 0;
+    psS32 maxLines = 2500;
     psImage *table = NULL;
     FILE *fd = NULL;
@@ -276,5 +276,5 @@
     }
  
-    *(unsigned int *)&table->numRows = j;
+    *(psU32 *)&table->numRows = j;
  
     return table;
@@ -284,6 +284,6 @@
 {
     char line[LINESIZE];
-    int j = 0;
-    int maxLines = 15000;
+    psS32 j = 0;
+    psS32 maxLines = 15000;
     psImage *table = NULL;
     FILE *fd = NULL;
@@ -346,5 +346,5 @@
     }
  
-    *(unsigned int *)&table->numRows = j;
+    *(psU32 *)&table->numRows = j;
  
     return table;
@@ -354,7 +354,7 @@
 static double lookupTaiUtcTable(const psTime *time)
 {
-    int hiIdx = 0;
-    int loIdx = 0;
-    int numRows = 0;
+    psS32 hiIdx = 0;
+    psS32 loIdx = 0;
+    psS32 numRows = 0;
     double jd = 0.0;
     double mjd = 0.0;
@@ -422,9 +422,9 @@
 }
 
-static double lookupSer7Table(const psTime *time, int col)
-{
-    int hiIdx = 0;
-    int loIdx = 0;
-    int numRows = 0;
+static double lookupSer7Table(const psTime *time, psS32 col)
+{
+    psS32 hiIdx = 0;
+    psS32 loIdx = 0;
+    psS32 numRows = 0;
     double out = 0.0;
     double denom = 0.0;
@@ -752,7 +752,7 @@
 }
 
-long psTimeLeapseconds(const psTime *time1, const psTime *time2)
-{
-    long diff = 0;
+psS64 psTimeLeapseconds(const psTime *time1, const psTime *time2)
+{
+    psS64 diff = 0;
 
 
@@ -827,5 +827,5 @@
 char* psTimeToISOTime(const psTime *time)
 {
-    int ms = 0;
+    psS32 ms = 0;
     char *timeString = NULL;
     char *tempString = NULL;
@@ -889,12 +889,12 @@
 struct tm* psTimeToTM(const psTime *time)
 {
-    long cent = 0;
-    long year = 0;
-    long month = 0;
-    long day = 0;
-    long hour = 0;
-    long minute = 0;
-    long seconds = 0;
-    long temp = 0;
+    psS64 cent = 0;
+    psS64 year = 0;
+    psS64 month = 0;
+    psS64 day = 0;
+    psS64 hour = 0;
+    psS64 minute = 0;
+    psS64 seconds = 0;
+    psS64 temp = 0;
     struct tm* tmTime = NULL;
 
@@ -975,7 +975,7 @@
     seconds = days * SEC_PER_DAY;
     if(seconds < 0.0) {
-        outTime->usec = (seconds - (long)seconds) * -1000000.0;  // psTime earlier than epoch
+        outTime->usec = (seconds - (psS64)seconds) * -1000000.0;  // psTime earlier than epoch
     } else {
-        outTime->usec = (seconds - (long)seconds) * 1000000.0;   // psTime greater than epoch
+        outTime->usec = (seconds - (psS64)seconds) * 1000000.0;   // psTime greater than epoch
     }
     outTime->sec = seconds;
@@ -1003,7 +1003,7 @@
     seconds = days * SEC_PER_DAY;
     if(seconds < 0.0) {
-        outTime->usec = (seconds - (long)seconds) * -1000000.0;  // psTime earlier than epoch
+        outTime->usec = (seconds - (psS64)seconds) * -1000000.0;  // psTime earlier than epoch
     } else {
-        outTime->usec = (seconds - (long)seconds) * 1000000.0;   // psTime greater than epoch
+        outTime->usec = (seconds - (psS64)seconds) * 1000000.0;   // psTime greater than epoch
     }
     outTime->sec = seconds;
@@ -1020,11 +1020,11 @@
 {
     char tempString[MAX_TIME_STRING_LENGTH];
-    int month;
-    int day;
-    int year;
-    int hour;
-    int minute;
-    int second;
-    int millisecond;
+    psS32 month;
+    psS32 day;
+    psS32 year;
+    psS32 hour;
+    psS32 minute;
+    psS32 second;
+    psS32 millisecond;
     struct tm tmTime;
     psTime *outTime = NULL;
@@ -1127,11 +1127,11 @@
 psTime* psTimeFromTM(const struct tm* time)
 {
-    long year;
-    long month;
-    long day;
-    long hour;
-    long minute;
-    long seconds;
-    long temp;
+    psS64 year;
+    psS64 month;
+    psS64 day;
+    psS64 hour;
+    psS64 minute;
+    psS64 seconds;
+    psS64 temp;
     psTime *outTime = NULL;
 
@@ -1194,5 +1194,5 @@
 {
     psF64 deltaSec = 0;
-    long deltaUsec = 0;
+    psS64 deltaUsec = 0;
     psTime *outTime = NULL;
 
@@ -1243,5 +1243,5 @@
 {
     psS64 deltaSec = 0;
-    long deltaUsec = 0;
+    psS64 deltaUsec = 0;
     psTime *outTime = NULL;
 
@@ -1267,5 +1267,5 @@
     outTime = psTimeAlloc(tai1->type);
     deltaSec = tai1->sec - tai2->sec;
-    deltaUsec = (long)tai1->usec - (long)tai2->usec;
+    deltaUsec = (psS64)tai1->usec - (psS64)tai2->usec;
 
     // Adjust time in case of microsecond underflow after subtraction
@@ -1289,5 +1289,5 @@
 {
     psS64 deltaSec = 0;
-    long deltaUsec = 0;
+    psS64 deltaUsec = 0;
     psTime *outTime = NULL;
 
@@ -1313,5 +1313,5 @@
     outTime = psTimeAlloc(tai1->type);
     deltaSec = tai1->sec - tai2->sec;
-    deltaUsec = (long)tai1->usec - (long)tai2->usec;
+    deltaUsec = (psS64)tai1->usec - (psS64)tai2->usec;
 
     // Adjust time in case of microsecond underflow after subtraction
