00001 #ifndef vmstime_h
00002 #define vmstime_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __VMSTIME__
00022 #define __VMSTIME__ loaded
00023
00024 struct dsc_descriptor;
00025
00026 #ifdef __ALPHA
00027 #define VMSTIME_64BIT __int64
00028 #endif
00029
00030
00031
00032 #ifdef VMSTIME_64BIT
00033 typedef VMSTIME_64BIT VMSTIME[1];
00034 typedef VMSTIME_64BIT *pVMSTIME;
00035 #define ISDELTA(x) (*x < 0)
00036 #define VMSTIME_ZERO {0}
00037 #else
00038 typedef unsigned char VMSTIME[8];
00039 typedef unsigned char *pVMSTIME;
00040 #define ISDELTA(x) (x[7] & 0x80)
00041 #define VMSTIME_ZERO {0,0,0,0,0,0,0,0}
00042 #endif
00043
00044
00045
00046
00047 #ifndef SS__NORMAL
00048 #define SS__NORMAL 1
00049 #define SS__IVTIME 388
00050 #define LIB__NORMAL 1409025
00051 #define LIB__IVTIME 1410012
00052 #define LIB__ONEDELTIM 1410020
00053 #define LIB__ABSTIMREQ 1410044
00054 #define LIB__DELTIMREQ 1410052
00055 #define LIB__INVOPER 1410060
00056
00057 #ifndef NO_DOLLAR
00058 #ifndef SS__NORMAL
00059 #define SS__NORMAL SS__NORMAL
00060 #define SS__IVTIME SS__IVTIME
00061 #define LIB__NORMAL LIB__NORMAL
00062 #define LIB__IVTIME LIB__IVTIME
00063 #define LIB__ONEDELTIM LIB__ONEDELTIM
00064 #define LIB__ABSTIMREQ LIB__ABSTIMREQ
00065 #define LIB__DELTIMREQ LIB__DELTIMREQ
00066 #define LIB__INVOPER LIB__INVOPER
00067 #endif
00068 #endif
00069 #endif
00070
00071
00072
00073 #define LIB_K_MONTH_OF_YEAR 1
00074 #define LIB_K_DAY_OF_YEAR 2
00075 #define LIB_K_HOUR_OF_YEAR 3
00076 #define LIB_K_MINUTE_OF_YEAR 4
00077 #define LIB_K_SECOND_OF_YEAR 5
00078 #define LIB_K_DAY_OF_MONTH 6
00079 #define LIB_K_HOUR_OF_MONTH 7
00080 #define LIB_K_MINUTE_OF_MONTH 8
00081 #define LIB_K_SECOND_OF_MONTH 9
00082 #define LIB_K_DAY_OF_WEEK 10
00083 #define LIB_K_HOUR_OF_WEEK 11
00084 #define LIB_K_MINUTE_OF_WEEK 12
00085 #define LIB_K_SECOND_OF_WEEK 13
00086 #define LIB_K_HOUR_OF_DAY 14
00087 #define LIB_K_MINUTE_OF_DAY 15
00088 #define LIB_K_SECOND_OF_DAY 16
00089 #define LIB_K_MINUTE_OF_HOUR 17
00090 #define LIB_K_SECOND_OF_HOUR 18
00091 #define LIB_K_SECOND_OF_MINUTE 19
00092 #define LIB_K_JULIAN_DATE 20
00093 #define LIB_K_DELTA_WEEKS 21
00094 #define LIB_K_DELTA_DAYS 22
00095 #define LIB_K_DELTA_HOURS 23
00096 #define LIB_K_DELTA_MINUTES 24
00097 #define LIB_K_DELTA_SECONDS 25
00098 #define LIB_K_DELTA_WEEKS_F 26
00099 #define LIB_K_DELTA_DAYS_F 27
00100 #define LIB_K_DELTA_HOURS_F 28
00101 #define LIB_K_DELTA_MINUTES_F 29
00102 #define LIB_K_DELTA_SECONDS_F 30
00103 #define LIB_K_MAX_OPERATION 31
00104
00105
00106
00107 #ifndef NO_DOLLAR
00108 #define sys_asctim sys_asctim
00109 #define sys_bintim sys_bintim
00110 #define sys_gettim sys_gettim
00111 #define sys_numtim sys_numtim
00112 #define lib_add_times lib_add_times
00113 #define lib_addx lib_addx
00114 #define lib_cvt_from_internal_time lib_cvt_from_internal_time
00115 #define lib_cvt_to_internal_time lib_cvt_to_internal_time
00116 #define lib_cvt_vectim lib_cvt_vectim
00117 #define lib_day lib_day
00118 #define lib_day_of_week lib_day_of_week
00119 #define lib_mult_delta_time lib_mult_delta_time
00120 #define lib_sub_times lib_sub_times
00121 #define lib_subx lib_subx
00122
00123 #define LIB_K_MONTH_OF_YEAR LIB_K_MONTH_OF_YEAR
00124 #define LIB_K_DAY_OF_YEAR LIB_K_DAY_OF_YEAR
00125 #define LIB_K_HOUR_OF_YEAR LIB_K_HOUR_OF_YEAR
00126 #define LIB_K_MINUTE_OF_YEAR LIB_K_MINUTE_OF_YEAR
00127 #define LIB_K_SECOND_OF_YEAR LIB_K_SECOND_OF_YEAR
00128 #define LIB_K_DAY_OF_MONTH LIB_K_DAY_OF_MONTH
00129 #define LIB_K_HOUR_OF_MONTH LIB_K_HOUR_OF_MONTH
00130 #define LIB_K_MINUTE_OF_MONTH LIB_K_MINUTE_OF_MONTH
00131 #define LIB_K_SECOND_OF_MONTH LIB_K_SECOND_OF_MONTH
00132 #define LIB_K_DAY_OF_WEEK LIB_K_DAY_OF_WEEK
00133 #define LIB_K_HOUR_OF_WEEK LIB_K_HOUR_OF_WEEK
00134 #define LIB_K_MINUTE_OF_WEEK LIB_K_MINUTE_OF_WEEK
00135 #define LIB_K_SECOND_OF_WEEK LIB_K_SECOND_OF_WEEK
00136 #define LIB_K_HOUR_OF_DAY LIB_K_HOUR_OF_DAY
00137 #define LIB_K_MINUTE_OF_DAY LIB_K_MINUTE_OF_DAY
00138 #define LIB_K_SECOND_OF_DAY LIB_K_SECOND_OF_DAY
00139 #define LIB_K_MINUTE_OF_HOUR LIB_K_MINUTE_OF_HOUR
00140 #define LIB_K_SECOND_OF_HOUR LIB_K_SECOND_OF_HOUR
00141 #define LIB_K_SECOND_OF_MINUTE LIB_K_SECOND_OF_MINUTE
00142 #define LIB_K_JULIAN_DATE LIB_K_JULIAN_DATE
00143 #define LIB_K_DELTA_WEEKS LIB_K_DELTA_WEEKS
00144 #define LIB_K_DELTA_DAYS LIB_K_DELTA_DAYS
00145 #define LIB_K_DELTA_HOURS LIB_K_DELTA_HOURS
00146 #define LIB_K_DELTA_MINUTES LIB_K_DELTA_MINUTES
00147 #define LIB_K_DELTA_SECONDS LIB_K_DELTA_SECONDS
00148 #define LIB_K_DELTA_WEEKS_F LIB_K_DELTA_WEEKS_F
00149 #define LIB_K_DELTA_DAYS_F LIB_K_DELTA_DAYS_F
00150 #define LIB_K_DELTA_HOURS_F LIB_K_DELTA_HOURS_F
00151 #define LIB_K_DELTA_MINUTES_F LIB_K_DELTA_MINUTES_F
00152 #define LIB_K_DELTA_SECONDS_F LIB_K_DELTA_SECONDS_F
00153 #define LIB_K_MAX_OPERATION LIB_K_MAX_OPERATION
00154 #endif
00155
00156
00157 unsigned sys_gettim(VMSTIME timadr);
00158 unsigned sys_numtim(unsigned short timvec[7],VMSTIME timadr);
00159 unsigned sys_bintim(struct dsc_descriptor *timbuf,VMSTIME timadr);
00160 unsigned sys_asctim(unsigned short *timlen,struct dsc_descriptor *timbuf,
00161 VMSTIME timadr,unsigned cvtflg);
00162 unsigned lib_add_times(VMSTIME time1,VMSTIME time2,VMSTIME result);
00163 unsigned lib_addx(void *addant,void *addee,void *result,int *lenadd);
00164 unsigned lib_cvt_from_internal_time(unsigned *operation,
00165 unsigned *result,VMSTIME input_time);
00166 unsigned lib_cvt_to_internal_time(unsigned *operation,int *input,
00167 VMSTIME result);
00168 unsigned lib_cvt_vectim(unsigned short timbuf[7],VMSTIME timadr);
00169 unsigned lib_day(int *days,VMSTIME timadr,int *day_time);
00170 unsigned lib_day_of_week(VMSTIME timadr,unsigned *weekday);
00171 unsigned lib_mult_delta_time(int *multiple,VMSTIME timadr);
00172 unsigned lib_subx(void *subant,void *subee,void *result,int *lenadd);
00173 unsigned lib_sub_times(VMSTIME time1,VMSTIME time2,VMSTIME result);
00174 unsigned vmstime_from_nt(VMSTIME nt_time,VMSTIME vms_time);
00175 unsigned vmstime_to_nt(VMSTIME vms_time,VMSTIME nt_time);
00176 int vmstime_compare(VMSTIME time1,VMSTIME time2);
00177 #endif
00178
00179 #endif
00180