# 2.11BSD#431 - /usr/src/new/notes/src/gtime.c

##### Functions

    gettime           X
    maketime          X

       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 45 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 200, 300, 496
- in /usr/src/new/notes/src/buildnf.c line 297-300(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 457
- in /usr/src/new/notes/src/index.c line 247
- 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 442-443(2), 506, 693-694(2), 782
- in /usr/src/new/notes/src/newsout.c line 86
- in /usr/src/new/notes/src/nfmail.c line 310-311(2), 367
- 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/nftimestamp.c line 32
- 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 175
- in /usr/src/new/notes/src/resp.c line 122, 150-151(2)

maketime defined in line 35; used 8 times

- in line 32
- in /usr/src/new/notes/src/archiver.c line 202
- in /usr/src/new/notes/src/checknotes.c line 67
- in /usr/src/new/notes/src/compress.c line 252
- in /usr/src/new/notes/src/control.c line 62
- in /usr/src/new/notes/src/datein.c line 92
- in /usr/src/new/notes/src/newsout.c line 66
- in /usr/src/new/notes/src/nfsend.c line 81

#### Defined variables

rcsid defined in line 5; never used

Last modified: 1985-01-19 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 574 |