diff options
author | otto <> | 2005-03-30 20:13:52 +0000 |
---|---|---|
committer | otto <> | 2005-03-30 20:13:52 +0000 |
commit | 862e6817b3f445520231811d27e5ba22fa2ed1c7 (patch) | |
tree | a84bc4f2badc3483fb1f0e8f1911cb99ac461521 /src/lib/libc/string/bm.c | |
parent | 894b6ab0099e7d9ca2ad9acb75246cd0a4542167 (diff) | |
download | openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.tar.gz openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.tar.bz2 openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.zip |
ansify + deregister. no binary change on i386. ok deraadt@ pat@ moritz@
Diffstat (limited to 'src/lib/libc/string/bm.c')
-rw-r--r-- | src/lib/libc/string/bm.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/lib/libc/string/bm.c b/src/lib/libc/string/bm.c index 2c7f8fac32..6c8e4c3472 100644 --- a/src/lib/libc/string/bm.c +++ b/src/lib/libc/string/bm.c | |||
@@ -31,7 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #if defined(LIBC_SCCS) && !defined(lint) | 33 | #if defined(LIBC_SCCS) && !defined(lint) |
34 | static char *rcsid = "$OpenBSD: bm.c,v 1.4 2003/06/02 20:18:38 millert Exp $"; | 34 | static char *rcsid = "$OpenBSD: bm.c,v 1.5 2005/03/30 20:13:52 otto Exp $"; |
35 | #endif /* LIBC_SCCS and not lint */ | 35 | #endif /* LIBC_SCCS and not lint */ |
36 | 36 | ||
37 | #include <sys/types.h> | 37 | #include <sys/types.h> |
@@ -85,14 +85,11 @@ static u_char const freq_def[256] = { | |||
85 | }; | 85 | }; |
86 | 86 | ||
87 | bm_pat * | 87 | bm_pat * |
88 | bm_comp(pb, len, freq) | 88 | bm_comp(u_char const *pb, size_t len, u_char const *freq) |
89 | u_char const *pb; | ||
90 | size_t len; | ||
91 | u_char const *freq; | ||
92 | { | 89 | { |
93 | register u_char const *pe, *p; | 90 | u_char const *pe, *p; |
94 | register size_t *d, r; | 91 | size_t *d, r; |
95 | register int j; | 92 | int j; |
96 | int sv_errno; | 93 | int sv_errno; |
97 | bm_pat *pat; | 94 | bm_pat *pat; |
98 | 95 | ||
@@ -142,8 +139,7 @@ mem: sv_errno = errno; | |||
142 | } | 139 | } |
143 | 140 | ||
144 | void | 141 | void |
145 | bm_free(pat) | 142 | bm_free(bm_pat *pat) |
146 | bm_pat *pat; | ||
147 | { | 143 | { |
148 | if (pat->pat != NULL) | 144 | if (pat->pat != NULL) |
149 | free(pat->pat); | 145 | free(pat->pat); |
@@ -153,14 +149,11 @@ bm_free(pat) | |||
153 | } | 149 | } |
154 | 150 | ||
155 | u_char * | 151 | u_char * |
156 | bm_exec(pat, base, n) | 152 | bm_exec(bm_pat *pat, u_char *base, size_t n) |
157 | bm_pat *pat; | ||
158 | u_char *base; | ||
159 | size_t n; | ||
160 | { | 153 | { |
161 | register u_char *e, *ep, *p, *q, *s; | 154 | u_char *e, *ep, *p, *q, *s; |
162 | register size_t *d0, k, md2, n1, ro; | 155 | size_t *d0, k, md2, n1, ro; |
163 | register int rc; | 156 | int rc; |
164 | 157 | ||
165 | if (n == 0) | 158 | if (n == 0) |
166 | return (NULL); | 159 | return (NULL); |