aboutsummaryrefslogtreecommitdiff
path: root/time/ap.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-01-06 22:07:28 +0000
committerUlrich Drepper <drepper@redhat.com>1997-01-06 22:07:28 +0000
commitdf4ef2ab9c0899b2670067cd97e58f7eb2913e00 (patch)
tree4cb343b5ba9ccdc9c0b96144412567b6a4eda0ee /time/ap.c
parent6f9e7002f38ae778b3ff2f586a3e5766382228e9 (diff)
downloadglibc-df4ef2ab9c0899b2670067cd97e58f7eb2913e00.tar
glibc-df4ef2ab9c0899b2670067cd97e58f7eb2913e00.tar.gz
glibc-df4ef2ab9c0899b2670067cd97e58f7eb2913e00.tar.bz2
glibc-df4ef2ab9c0899b2670067cd97e58f7eb2913e00.zip
update from main archive 960105cvs/libc-970107cvs/libc-970106
Diffstat (limited to 'time/ap.c')
-rw-r--r--time/ap.c16
1 files changed, 8 insertions, 8 deletions
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 <stdlib.h>
#include <time.h>
#include <malloc.h>
+#include <mcheck.h>
/* 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;
}