http://www.ousob.com --- Legacy Redefined #include <dos.h> #include <stdio.h> #include <extend50.h> void ex_date(int *day, int *month, int *year, unsigned int num); CLIPPER b_fdate() { unsigned notfound, temp; int done, d, m, y; char clipper_date[9]; char *p_ptr = _parc(1); struct find_t file_info; if( !ISCHAR(1) ){ _retds(clipper_date); return; } notfound = _dos_findfirst(p_ptr, _A_NORMAL, &file_info); if( notfound ){ _retds(clipper_date); return; } temp = file_info.wr_date; ex_date(&d, &m, &y, temp); sprintf(clipper_date,"%d%02d%02d", y, m, d); clipper_date[9] = NULL; _retds(clipper_date); } void ex_date(int *day, int *month, int *year, unsigned int num) { *day = num & 0x1f; *month = (num & 0x1e0) >> 0x05; *year = (num & 0xfe00) >> 0x09; *year += 1980; }