home *** CD-ROM | disk | FTP | other *** search
- /*************************************************
- ** **
- ** sc_clock.h **
- ** **
- ** SoftC Clock/Calendar functions header **
- ** **
- ** Copyright (C) 1989, 1990 by **
- ** SoftC, Ltd. **
- ** 16820 3rd St NE **
- ** Ham Lake, MN 55304 **
- ** (612) 434-6968 **
- ** **
- ** All rights reserved. **
- *************************************************/
-
-
-
- /**********
- *
- * Defines
- *
- **********/
-
-
-
-
- #define SC_GREGOR 1 /* Gregorian date "mm/dd/yy" */
- #define SC_GREGORL 2 /* Gregorian date "mm/dd/yyyy" */
- #define SC_JULIAN 3 /* Julian date "yyyy/ddd" */
- #define SC_YMD 4 /* dBASE date "yyyymmdd" */
- #define SC_DMY 5 /* European Military date "ddmmyy" */
- #define SC_EURODATE 6 /* European date "dd.mm.yy" */
- #define SC_EURODATEL 7 /* European date "dd.mm.yyyy" */
-
- #define SC_CSHMS 1 /* colon separated time "hh:mm:ss" */
- #define SC_MIL 2 /* Military time 0000 - 2359 */
-
-
-
- /**********
- *
- * Integer Date Source Function Prototypes
- *
- **********/
-
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- INT sccdi2l( LONG *, /* number of days since 1/1 0001 */
- INT, /* year */
- INT, /* month */
- INT ); /* day */
-
- INT sccdi2s( CHAR *, /* date string */
- INT, /* date string format (YMD, GREG, JUL) */
- INT, /* year */
- INT, /* month */
- INT ); /* day */
-
- INT sccdiget( INT *, /* current DOS year */
- INT *, /* month */
- INT *, /* day of month */
- INT *); /* day of week */
-
- INT sccdileap( INT ); /* year */
-
- INT sccdiperm( CHAR *, /* number of days in month */
- INT, /* desired year */
- INT); /* desired month */
-
-
-
-
- /**********
- *
- * Long Date Source Function Prototypes
- *
- **********/
-
-
-
-
- INT sccdl2dow( CHAR *, /* day number (0-6) */
- LONG ); /* LONG date source */
-
- INT sccdl2i( INT *, /* year */
- INT *, /* month */
- INT *, /* day */
- LONG ); /* LONG date source */
-
- INT sccdl2sx( CHAR *, /* date string */
- INT, /* date string format */
- LONG); /* number of days since 1/1/00 */
-
-
-
-
- /**********
- *
- * String Date Source Function Prototypes
- *
- **********/
-
-
-
- INT sccds2day( CHAR *, /* day of week string */
- CHAR *, /* source date string */
- INT ); /* source date string format */
-
- INT sccds2dow( CHAR *, /* day of week number */
- CHAR *, /* source date string */
- INT ); /* source date string format */
-
- INT sccds2i( INT *, /* year */
- INT *, /* month */
- INT *, /* day */
- CHAR *, /* date string */
- INT ); /* string format */
-
- INT sccds2lx( LONG *, /* number of days since 1/1 0001 */
- CHAR *, /* date string */
- INT ); /* date string format (YMD,GREG, JUL) */
-
- INT sccds2mon( CHAR *, /* month of year string */
- CHAR *, /* source date string */
- INT ); /* source date string format */
-
- INT sccds2s( CHAR *, /* output date string */
- INT, /* output string format */
- CHAR *, /* source date string */
- INT ); /* source string format */
-
- INT sccdsday( CHAR *, /* day of week text string */
- CHAR); /* numeric day of week */
-
- INT sccdsdiff( LONG *, /* difference in days */
- CHAR *, /* date string */
- INT, /* string format (YMD, GREG, JULIAN) */
- CHAR *, /* date string */
- INT); /* string format (YMD, GREG, JULIAN) */
-
- INT sccdsget( CHAR *, /* DOS date string */
- INT ); /* date string format */
-
- INT sccdsleap( CHAR *, /* date string */
- INT ); /* string format (YMD,GREG,JULIAN) */
-
- INT sccdsmonth( CHAR *, /* month text string */
- CHAR); /* numeric month */
-
- INT sccdsperm( CHAR *, /* number of days in month */
- CHAR *, /* date string */
- INT ); /* string format (YMD, GREG, JUL) */
-
- INT sccdsvalid( CHAR *, /* date string */
- INT ); /* string format (YMD,GREG,JULIAN) */
-
-
-
-
-
- /**********
- *
- * Integer Clock Source Function Prototypes
- *
- **********/
-
-
-
-
- INT sccti2s( CHAR *, /* time string */
- INT, /* string format (H:M:S) */
- INT, /* hours */
- INT, /* minutes */
- INT); /* seconds */
-
- INT scctiget( INT *, /* current DOS hour */
- INT *, /* minute */
- INT *, /* second */
- INT * ); /* hundredths of second */
-
-
-
-
-
-
- /**********
- *
- * String Clock Source Function Prototypes
- *
- **********/
-
-
-
-
- INT sccts2i( INT *, /* hours */
- INT *, /* minutes */
- INT *, /* seconds */
- CHAR *, /* time string */
- INT); /* string format (H:M:S) */
-
- INT scctsdiff( LONG *, /* number of seconds difference */
- CHAR *, /* time 1 */
- INT, /* string format */
- CHAR *, /* time 2 */
- INT); /* string format (H:M:S) */
-
- INT scctsget( CHAR *, /* current time in string format */
- INT); /* time string format (MIL, H:M:S) */
-
- INT scctsvalid( CHAR *, /* time string */
- INT); /* string format (H:M:S) */
- #ifdef __cplusplus
- }
- #endif
-
-
-
-
- /**********
- *
- * External Variables
- *
- **********/
-
-
-
-
- extern CHAR sc_dpm[13]; /* days per month array */
-
-
-
- /**********
- *
- * Compatibility Definitions
- *
- **********/
-
-
-
-
- #define sccday(a,b) sccdsday(a,b)
- #define sccddiff(a,b,c) sccdsdiff(a,b,SC_YMD,c,SC_YMD)
- #define sccdl2s(a,b) sccdl2sx(a,SC_YMD,b)
- #define sccdn2s(a,b,c,d) sccdi2s(a,SC_YMD,b,c,d)
- #define sccdperm(a,b) sccdsperm(a,b,SC_YMD)
- #define sccdpermi(a,b,c) sccdiperm(a,b,c)
- #define sccds2l(a,b) sccds2lx(a,b,SC_YMD)
- #define sccds2n(a,b,c,d) sccds2i(a,b,c,d,SC_YMD)
- #define sccdvalid(a) sccdsvalid(a,SC_YMD)
- #define sccleap(a) sccdsleap(a,SC_YMD)
- #define sccleapi(a) sccdileap(a)
- #define sccmonth(a,b) sccdsmonth(a,b)
-
- #define scctdiff(a,b,c) scctsdiff(a,b,SC_CSHMS,c,SC_CSHMS)
- #define scctn2s(a,b,c,d) sccti2s(a,SC_CSHMS,b,c,d)
- #define sccts2n(a,b,c,d) sccts2i(a,b,c,d,SC_CSHMS)
- #define scctvalid(a) scctsvalid(a,SC_CSHMS)
-
-