-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathctime.c.diff
67 lines (61 loc) · 1.65 KB
/
ctime.c.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
*** ./ctime.c.orig Tue Jun 16 23:00:00 1998
--- ./ctime.c Thu Feb 01 23:36:23 2001
***************
*** 1,45 ****
! /***
! *ctime.c - convert time argument into ASCII string
! *
! * Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
! *
! *Purpose:
! * contains ctime() - convert time value to string
! *
! *******************************************************************************/
! #include <cruntime.h>
#include <time.h>
- #include <stddef.h>
- #include <tchar.h>
! /***
! *_TSCHAR *ctime(time) - converts a time stored as a long to a ASCII string
! *
! *Purpose:
! * Converts a time stored as a long (time_t) to an ASCII string of
! * the form:
! * Tue May 1 14:25:03 1984
! *
! *Entry:
! * long *time - time value in XENIX format
! *
! *Exit:
! * returns pointer to static string or NULL if time is before
! * Jan 1 1980.
! *
! *Exceptions:
! *
! *******************************************************************************/
!
! _TSCHAR * __cdecl _tctime (
! const time_t *timp
! )
{
! struct tm *tmtemp;
! if ((tmtemp=localtime(timp)) != NULL)
! return(_tasctime((const struct tm *)tmtemp));
! else
! return(NULL);
}
--- 1,17 ----
! // ctime.c
! //
! // Time-stamp: <01/02/01 21:25:06 keuchel@lightning>
! #include "celib.h"
#include <time.h>
! char *
! ctime (const time_t *timp)
{
! struct tm *tmtemp;
! if ((tmtemp = localtime(timp)) != NULL)
! return(asctime((const struct tm *)tmtemp));
! else
! return(NULL);
}