From 2b295f43938a1b7defc151111a15021f197317fa Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Mon, 7 Apr 2003 21:24:39 +0000 Subject: [PATCH] afsutil-protos-20030407 remove redundant prototypes and move to afsutil_prototypes.h fix protos for int64_to_flipbase64 thanks to Alexei Kosut --- src/util/afsutil.h | 35 ++--------------------------------- src/util/afsutil_prototypes.h | 11 ++++++++++- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/src/util/afsutil.h b/src/util/afsutil.h index fdff525dc..b5d5b4c5d 100644 --- a/src/util/afsutil.h +++ b/src/util/afsutil.h @@ -56,15 +56,6 @@ extern char *vctime(const time_t *atime); #endif /* AFS_PTHREAD_ENV && !AFS_NT40_ENV */ -/* Convert a 4 byte integer to a text string. */ -extern char* afs_inet_ntoa(afs_uint32 addr); -extern char* afs_inet_ntoa_r(afs_uint32 addr, char *buf); - -/* copy strings, converting case along the way. */ -extern char *lcstring(char *d, char *s, int n); -extern char *ucstring(char *d, char *s, int n); -extern char *strcompose(char *buf, size_t len, ...); - /* abort the current process. */ #ifdef AFS_NT40_ENV #define afs_abort() afs_NTAbort() @@ -97,33 +88,11 @@ extern int rc_exec(char *p); /* Abort on error, possibly trapping to debugger or dumping a trace. */ void afs_NTAbort(void); -#endif +#endif /* NT40 */ -/* get temp dir path */ -char *gettmpdir(void); - -/* Base 32 conversions used for NT since directory names are - * case-insensitive. - */ typedef char b32_string_t[8]; -char *int_to_base32(b32_string_t s, int a); -int base32_to_int(char *s); - -#if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV) -/* base 64 converters for namei interface. Flip bits to differences are - * early in name. - */ +/* b64_string_t is 8 bytes, in stds.h */ typedef char lb64_string_t[12]; -#ifdef AFS_64BIT_ENV -#define int32_to_flipbase64(S, A) int64_to_flipbase64(S, (afs_int64)(A)) -char *int64_to_flipbase64(b64_string_t s, afs_int64 a); -afs_int64 flipbase64_to_int64(char *s); -#else -#define int32_to_flipbase64(S, A) int64_to_flipbase64(S, (u_int64_t)(A)) -char *int64_to_flipbase64(b64_string_t s, u_int64_t a); -int64_t flipbase64_to_int64(char *s); -#endif -#endif #ifndef UKERNEL #include "afs/ktime.h" diff --git a/src/util/afsutil_prototypes.h b/src/util/afsutil_prototypes.h index e1babe30c..34dec79a4 100644 --- a/src/util/afsutil_prototypes.h +++ b/src/util/afsutil_prototypes.h @@ -31,6 +31,7 @@ extern int base64_to_int(char *s); /* casestrcpy.c */ extern char *lcstring (char *d, char *s, int n); extern char *ucstring (char *d, char *s, int n); +extern char *strcompose(char *buf, size_t len, ...); /* dirpath.c */ extern unsigned int initAFSDirPath(void); @@ -49,14 +50,22 @@ extern void FilepathNormalizeEx(char *path, int slashType); extern void FilepathNormalize(char *path); /* flipbase64.c */ +extern char *int_to_base32(b32_string_t s, int a); +extern int base32_to_int(char *s); +#if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV) +/* base 64 converters for namei interface. Flip bits to differences are + * early in name. + */ #ifdef AFS_64BIT_ENV +#define int32_to_flipbase64(S, A) int64_to_flipbase64(S, (afs_int64)(A)) extern char *int64_to_flipbase64(lb64_string_t s, afs_int64 a); extern afs_int64 flipbase64_to_int64(char *s); #else +#define int32_to_flipbase64(S, A) int64_to_flipbase64(S, (u_int64_t)(A)) extern char *int64_to_flipbase64(lb64_string_t s, u_int64_t a); extern int64_t flipbase64_to_int64(char *s); #endif - +#endif /* get_krbrlm.c */ extern int afs_krb_get_lrealm(char *r, int n); -- 2.39.5