Minor cleanup.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@223 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained 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 | ||||
|   | ||||
| @@ -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 <config.h> | ||||
| #endif | ||||
|  | ||||
| #include <sys/types.h> | ||||
| #include <sys/time.h> | ||||
| #ifdef notdef | ||||
| #include <tzfile.h> | ||||
| #else | ||||
| #define TM_YEAR_BASE	1900	/* from <tzfile.h> */ | ||||
| #endif | ||||
| #ifdef	NO_STRING_H | ||||
| #include <strings.h> | ||||
| #else | ||||
| #include <string.h> | ||||
| #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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Unknown User d91-jda
					Unknown User d91-jda