IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1272


Ignore:
Timestamp:
Jul 22, 2004, 11:24:54 AM (22 years ago)
Author:
harman
Message:

Changed if statement

Location:
trunk/psLib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psTime.c

    r1271 r1272  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-07-22 21:01:43 $
     14 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-07-22 21:24:54 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    283283    month = atoi(strtok(NULL, "/"));
    284284    if(month<1 || month>12) {
    285         psError(__func__,"Month must have a value from 0 to 11. Value: %d", month);
     285        psError(__func__,"Month must have a value from 1 to 12. Value: %d", month);
    286286        return outTime;
    287287    }
     
    435435    } else if(time->tm_year < 70)
    436436    {
    437         psError(__func__,"Input times earlier than 1970 not allowed");
     437        psError(__func__,"Input times earlier than 1970 not allowed. Value: %d", time->tm_year+1900);
     438        return outTime;
     439    } else  if(time->tm_mon<0 || time->tm_mon>11)
     440    {
     441        psError(__func__,"Month must have a value from 0 to 11. Value: %d", time->tm_mon);
     442        return outTime;
     443    } else if(time->tm_mday<1 || time->tm_mday>31)
     444    {
     445        psError(__func__,"Day must have a value from 1 to 31. Value: %d", time->tm_mday);
     446        return outTime;
     447    } else if(time->tm_hour<0 || time->tm_hour>23)
     448    {
     449        psError(__func__,"Hour must have a value from 0 to 23. Value: %d", time->tm_hour);
     450        return outTime;
     451    } else if(time->tm_min<0 || time->tm_min>59)
     452    {
     453        psError(__func__,"Minute must have a value from 0 to 59. Value: %d", time->tm_min);
     454        return outTime;
     455    } else if(time->tm_sec<0 || time->tm_sec>59)
     456    {
     457        psError(__func__,"Second must have a value from 0 to 59. Value: %d", time->tm_sec);
    438458        return outTime;
    439459    }
  • trunk/psLib/src/astronomy/psTime.c

    r1271 r1272  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-07-22 21:01:43 $
     14 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-07-22 21:24:54 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    283283    month = atoi(strtok(NULL, "/"));
    284284    if(month<1 || month>12) {
    285         psError(__func__,"Month must have a value from 0 to 11. Value: %d", month);
     285        psError(__func__,"Month must have a value from 1 to 12. Value: %d", month);
    286286        return outTime;
    287287    }
     
    435435    } else if(time->tm_year < 70)
    436436    {
    437         psError(__func__,"Input times earlier than 1970 not allowed");
     437        psError(__func__,"Input times earlier than 1970 not allowed. Value: %d", time->tm_year+1900);
     438        return outTime;
     439    } else  if(time->tm_mon<0 || time->tm_mon>11)
     440    {
     441        psError(__func__,"Month must have a value from 0 to 11. Value: %d", time->tm_mon);
     442        return outTime;
     443    } else if(time->tm_mday<1 || time->tm_mday>31)
     444    {
     445        psError(__func__,"Day must have a value from 1 to 31. Value: %d", time->tm_mday);
     446        return outTime;
     447    } else if(time->tm_hour<0 || time->tm_hour>23)
     448    {
     449        psError(__func__,"Hour must have a value from 0 to 23. Value: %d", time->tm_hour);
     450        return outTime;
     451    } else if(time->tm_min<0 || time->tm_min>59)
     452    {
     453        psError(__func__,"Minute must have a value from 0 to 59. Value: %d", time->tm_min);
     454        return outTime;
     455    } else if(time->tm_sec<0 || time->tm_sec>59)
     456    {
     457        psError(__func__,"Second must have a value from 0 to 59. Value: %d", time->tm_sec);
    438458        return outTime;
    439459    }
Note: See TracChangeset for help on using the changeset viewer.