-/* $OpenBSD: strftime.c,v 1.3 1996/03/09 02:42:58 niklas Exp $ */
+/* $OpenBSD: strftime.c,v 1.4 1996/03/25 21:17:36 tholo Exp $ */
/*
* Copyright (c) 1989 The Regents of the University of California.
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strftime.c 5.11 (Berkeley) 2/24/91";*/
-static char *rcsid = "$Id: strftime.c,v 1.3 1996/03/09 02:42:58 niklas Exp $";
+static char *rcsid = "$Id: strftime.c,v 1.4 1996/03/25 21:17:36 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/localedef.h>
static size_t gsize;
static char *pt;
-static int _add(), _conv(), _secs();
-static size_t _fmt();
+static int _add __P((const char *));
+static int _secs __P((const struct tm *));
+static int _conv __P((int, int, char));
+static size_t _fmt __P((const char *, const struct tm *));
size_t
strftime(s, maxsize, format, t)
((t)->tm_wday ? (t)->tm_wday - 1 : 6)) / 7)
static size_t
_fmt(format, t)
- register char *format;
- struct tm *t;
+ register const char *format;
+ const struct tm *t;
{
for (; *format; ++format) {
if (*format == '%') {
static int
_secs(t)
- struct tm *t;
+ const struct tm *t;
{
static char buf[15];
register time_t s;
}
static int
+#if __STDC__
+_conv(int n, int digits, char pad)
+#else
_conv(n, digits, pad)
int n, digits;
char pad;
+#endif
{
static char buf[10];
register char *p;
static int
_add(str)
- register char *str;
+ register const char *str;
{
for (;; ++pt, --gsize) {
if (!gsize)