File: didate.c

package info (click to toggle)
diablo 1.16.test2-1
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 1,504 kB
  • ctags: 1,603
  • sloc: ansic: 17,654; perl: 2,054; sh: 260; csh: 118; makefile: 73
file content (31 lines) | stat: -rw-r--r-- 496 bytes parent folder | download
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

/*
 * UTIL/DIDATE.C
 *
 * (c)Copyright 1997, Matthew Dillon, All Rights Reserved.  Refer to
 *    the COPYRIGHT file in the base directory of this distribution 
 *    for specific rights granted.
 */

#include "defs.h"

int
main(int ac, char **av)
{
    time_t t;

    LoadDiabloConfig();

    if (ac == 1) {
	puts("didate datestr");
	exit(0);
    }
    t = parsedate(av[1]);
    if (t == (time_t)-1) {
	printf("Illegal format\n");
    } else {
	printf("%s", ctime(&t));
    }
    return(0);
}