Cover V03, I03
Article
Figure 1
Figure 2
Listing 1
Listing 10
Listing 11
Listing 12
Listing 13
Listing 14
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9

may94.tar


Listing 13: ctime.c

/* ctime.c */

/*
* print the UNIX time (day month time year) for the
* specified time.  See also yearago.sh
*/

#include <stdio.h>
#include <sys/types.h>
#include <time.h>

main(argc, argv)
int argc;
char *argv[];
{
int i;
time_t x;

if ( argc < 2 ) {
fprintf(stderr, "Usage: ctime [numbers]\n");
exit(1);
}

for ( i=1; i < argc; i++) {
x=(time_t)atol(argv[i]);
printf("%s", ctime(&x));
}
exit(0);
}
/* End of File */