X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=blobdiff_plain;f=time%2Fap.c;h=909ec0de734ff66d4ca17039847a75f6864caae5;hp=5319763384c11ee8f1809fd25331f83b1ef54053;hb=f8f163be7e94ff936153e93c73ce8283bfb82236;hpb=7bc76cb7f140f8f724d9a1eced966b4b5cd194ea diff --git a/time/ap.c b/time/ap.c index 5319763384..909ec0de73 100644 --- a/time/ap.c +++ b/time/ap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,11 +20,12 @@ #include #include #include +#include /* Prints the time in the form "hh:mm ?M", where ? is A or P. A simple test for strftime(). */ int -main (int argc, char **argv) +main (int argc, char *argv[]) { char buf[20]; time_t t; @@ -32,14 +33,13 @@ main (int argc, char **argv) mcheck (NULL); if (argc != 1) - fprintf(stderr, "Usage: %s\n", argv[0]); + fprintf (stderr, "Usage: %s\n", argv[0]); - t = time((time_t *) NULL); - if (strftime(buf, sizeof(buf), "%I:%M %p", localtime(&t)) == 0) - exit(EXIT_FAILURE); + t = time ((time_t *) NULL); + if (strftime (buf, sizeof (buf), "%I:%M %p", localtime (&t)) == 0) + exit (EXIT_FAILURE); - puts(buf); + puts (buf); - exit(EXIT_SUCCESS); return EXIT_SUCCESS; }