diff --git a/appl/telnet/libtelnet/Makefile.in b/appl/telnet/libtelnet/Makefile.in index da8a1de90..404d5aa5e 100644 --- a/appl/telnet/libtelnet/Makefile.in +++ b/appl/telnet/libtelnet/Makefile.in @@ -24,9 +24,7 @@ SOURCES=auth.c encrypt.c genget.c \ strchr.c strdup.c strerror.c strftime.c strrchr.c -OBJECTS=auth.o encrypt.o genget.o \ - misc.o kerberos.o kerberos5.o forward.o spx.o enc_des.o \ - rsaencpwd.o krb4encpwd.o read_password.o \ +OBJECTS=auth.o encrypt.o genget.o enc_des.o misc.o kerberos.o read_password.o \ $(LIBOBJS) all: libtelnet.a diff --git a/lib/roken/strftime.c b/lib/roken/strftime.c index 5b5ed7857..0edba972f 100644 --- a/lib/roken/strftime.c +++ b/lib/roken/strftime.c @@ -31,26 +31,13 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strftime.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ - -#ifndef __STDC__ -#define const +#ifdef HAVE_CONFIG_H +#include #endif - #include #include -#ifdef notdef -#include -#else #define TM_YEAR_BASE 1900 /* from */ -#endif -#ifdef NO_STRING_H -#include -#else #include -#endif static char *afmt[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", @@ -75,17 +62,13 @@ static char *pt; #endif static int _add __P((char *)); static int _conv __P((int, int, int)); -#ifndef NO_MKTIME +#ifdef HAVE_MKTIME static int _secs __P((const struct tm *)); -#endif /* NO_MKTIME */ +#endif /* HAVE_MKTIME */ static size_t _fmt __P((const char *, const struct tm *)); size_t -strftime(s, maxsize, format, t) - char *s; - size_t maxsize; - const char *format; - const struct tm *t; +strftime(char *s, size_t maxsize, const char *format, const struct tm *t) { pt = s; @@ -99,9 +82,7 @@ strftime(s, maxsize, format, t) } static size_t -_fmt(format, t) - register const char *format; - const struct tm *t; +_fmt(const char *format, const struct tm *t) { for (; *format; ++format) { if (*format == '%') @@ -204,12 +185,12 @@ _fmt(format, t) if (!_conv(t->tm_sec, 2, '0')) return(0); continue; -#ifndef NO_MKTIME +#ifdef HAVE_MKTIME case 's': if (!_secs(t)) return(0); continue; -#endif /* NO_MKTIME */ +#endif /* HAVE_MKTIME */ case 'T': case 'X': if (!_fmt("%H:%M:%S", t)) @@ -269,10 +250,9 @@ _fmt(format, t) return(gsize); } -#ifndef NO_MKTIME +#ifdef HAVE_MKTIME static int -_secs(t) - const struct tm *t; +_secs(const struct tm *t) { static char buf[15]; register time_t s; @@ -286,11 +266,10 @@ _secs(t) *p-- = s % 10 + '0'; return(_add(++p)); } -#endif /* NO_MKTIME */ +#endif /* HAVE_MKTIME */ static int -_conv(n, digits, pad) - int n, digits, pad; +_conv(int n, int digits, int pad) { static char buf[10]; register char *p;