diff options
Diffstat (limited to 'src/lib/libc/net/nsap_addr.c')
| -rw-r--r-- | src/lib/libc/net/nsap_addr.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/lib/libc/net/nsap_addr.c b/src/lib/libc/net/nsap_addr.c index 22a5f8d66e..58c0d5e493 100644 --- a/src/lib/libc/net/nsap_addr.c +++ b/src/lib/libc/net/nsap_addr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: nsap_addr.c,v 1.4 1997/07/09 01:08:45 millert Exp $ */ | 1 | /* $OpenBSD: nsap_addr.c,v 1.5 2005/03/25 13:24:12 otto Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1996 by Internet Software Consortium. | 4 | * Copyright (c) 1996 by Internet Software Consortium. |
| @@ -21,7 +21,7 @@ | |||
| 21 | #if 0 | 21 | #if 0 |
| 22 | static char rcsid[] = "$From: nsap_addr.c,v 8.3 1996/08/05 08:31:35 vixie Exp $"; | 22 | static char rcsid[] = "$From: nsap_addr.c,v 8.3 1996/08/05 08:31:35 vixie Exp $"; |
| 23 | #else | 23 | #else |
| 24 | static char rcsid[] = "$OpenBSD: nsap_addr.c,v 1.4 1997/07/09 01:08:45 millert Exp $"; | 24 | static char rcsid[] = "$OpenBSD: nsap_addr.c,v 1.5 2005/03/25 13:24:12 otto Exp $"; |
| 25 | #endif | 25 | #endif |
| 26 | #endif /* LIBC_SCCS and not lint */ | 26 | #endif /* LIBC_SCCS and not lint */ |
| 27 | 27 | ||
| @@ -34,19 +34,15 @@ static char rcsid[] = "$OpenBSD: nsap_addr.c,v 1.4 1997/07/09 01:08:45 millert E | |||
| 34 | #include <resolv.h> | 34 | #include <resolv.h> |
| 35 | 35 | ||
| 36 | static char | 36 | static char |
| 37 | xtob(c) | 37 | xtob(int c) |
| 38 | register int c; | ||
| 39 | { | 38 | { |
| 40 | return (c - (((c >= '0') && (c <= '9')) ? '0' : '7')); | 39 | return (c - (((c >= '0') && (c <= '9')) ? '0' : '7')); |
| 41 | } | 40 | } |
| 42 | 41 | ||
| 43 | u_int | 42 | u_int |
| 44 | inet_nsap_addr(ascii, binary, maxlen) | 43 | inet_nsap_addr(const char *ascii, u_char *binary, int maxlen) |
| 45 | const char *ascii; | ||
| 46 | u_char *binary; | ||
| 47 | int maxlen; | ||
| 48 | { | 44 | { |
| 49 | register u_char c, nib; | 45 | u_char c, nib; |
| 50 | u_int len = 0; | 46 | u_int len = 0; |
| 51 | 47 | ||
| 52 | while ((c = *ascii++) != '\0' && len < maxlen) { | 48 | while ((c = *ascii++) != '\0' && len < maxlen) { |
| @@ -76,12 +72,9 @@ inet_nsap_addr(ascii, binary, maxlen) | |||
| 76 | } | 72 | } |
| 77 | 73 | ||
| 78 | char * | 74 | char * |
| 79 | inet_nsap_ntoa(binlen, binary, ascii) | 75 | inet_nsap_ntoa(int binlen, const u_char *binary, char *ascii) |
| 80 | int binlen; | ||
| 81 | register const u_char *binary; | ||
| 82 | register char *ascii; | ||
| 83 | { | 76 | { |
| 84 | register int nib; | 77 | int nib; |
| 85 | int i; | 78 | int i; |
| 86 | static char tmpbuf[255*3]; | 79 | static char tmpbuf[255*3]; |
| 87 | char *start; | 80 | char *start; |
