1: #include "parms.h"
2: #include "structs.h"
3:
4: #ifdef RCSIDENT
5: static char rcsid[] = "$Header: gtime.c,v 1.7 85/01/18 15:12:21 notes Rel $";
6: #endif RCSIDENT
7:
8: /*
9: * gettime(whenvec) struct when_f *whenvec; {}
10: *
11: * fills in whenvec with the most uptodate time
12: *
13: * Rob Kolstad Winter 1980
14: * Modified to split getting and formatting time
15: * Malcolm Slaney March 1983
16: */
17:
18: /*
19: * 4.2 Bsd moved the file!
20: */
21: #ifndef BSD42
22: #include <time.h>
23: #else
24: #include <sys/time.h>
25: #endif !BSD42
26:
27: gettime (whenvec) struct when_f *whenvec;
28: {
29: long tvec;
30:
31: time (&tvec); /* get the funky number */
32: return (maketime (whenvec, tvec));
33: }
34:
35: maketime (whenvec, tvec)
36: struct when_f *whenvec;
37: long tvec;
38: {
39: struct tm *ovec;
40: struct tm *localtime ();
41: ovec = localtime (&tvec); /* convert to local time */
42: whenvec -> w_mins = ovec -> tm_min;
43: whenvec -> w_hours = ovec -> tm_hour;
44: whenvec -> w_day = ovec -> tm_mday;
45: whenvec -> w_month = ovec -> tm_mon + 1; /* jan= 0 as supplied, correct it */
46: whenvec -> w_year = ovec -> tm_year + 1900; /* all from CTIME (III) */
47: whenvec -> w_gmttime = tvec;
48: }
Defined functions
gettime
defined in line
27; used 44 times
- in /usr/src/new/notes/src/adnote.c line
103
- in /usr/src/new/notes/src/adresp.c line
68
- in /usr/src/new/notes/src/archiver.c line
199,
299,
477
- in /usr/src/new/notes/src/buildnf.c line
259-262(4)
- in /usr/src/new/notes/src/control.c line
75
- in /usr/src/new/notes/src/datein.c line
49-50(2)
- in /usr/src/new/notes/src/dropt.c line
485
- in /usr/src/new/notes/src/index.c line
232
- in /usr/src/new/notes/src/ldmisc.c line
32,
56-58(3)
- in /usr/src/new/notes/src/loadem.c line
231-232(2)
- in /usr/src/new/notes/src/newsinput.c line
373-374(2),
437,
585-586(2),
674
- in /usr/src/new/notes/src/newsout.c line
81
- in /usr/src/new/notes/src/nfmail.c line
270-271(2),
327
- in /usr/src/new/notes/src/nfpipe.c line
110
- in /usr/src/new/notes/src/nfrcv.c line
50
- in /usr/src/new/notes/src/nfsend.c line
58,
116,
220
- in /usr/src/new/notes/src/nfstats.c line
66
- in /usr/src/new/notes/src/note.c line
46-47(2),
98
- in /usr/src/new/notes/src/prtind.c line
34
- in /usr/src/new/notes/src/recsio.c line
168
- in /usr/src/new/notes/src/resp.c line
122,
150-151(2)
Defined variables
rcsid
defined in line
5;
never used