summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/radixsort.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib/radixsort.c')
-rw-r--r--src/lib/libc/stdlib/radixsort.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/lib/libc/stdlib/radixsort.c b/src/lib/libc/stdlib/radixsort.c
index dd51013c94..1ff30416d9 100644
--- a/src/lib/libc/stdlib/radixsort.c
+++ b/src/lib/libc/stdlib/radixsort.c
@@ -13,11 +13,7 @@
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution. 15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software 16 * 3. Neither the name of the University nor the names of its contributors
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. Neither the name of the University nor the names of its contributors
21 * may be used to endorse or promote products derived from this software 17 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission. 18 * without specific prior written permission.
23 * 19 *
@@ -35,8 +31,7 @@
35 */ 31 */
36 32
37#if defined(LIBC_SCCS) && !defined(lint) 33#if defined(LIBC_SCCS) && !defined(lint)
38/*static char sccsid[] = "from: @(#)radixsort.c 8.1 (Berkeley) 6/4/93";*/ 34static char *rcsid = "$OpenBSD: radixsort.c,v 1.6 2003/06/02 20:18:38 millert Exp $";
39static char *rcsid = "$Id: radixsort.c,v 1.1.1.1 1995/10/18 08:42:19 deraadt Exp $";
40#endif /* LIBC_SCCS and not lint */ 35#endif /* LIBC_SCCS and not lint */
41 36
42/* 37/*
@@ -61,11 +56,11 @@ typedef struct {
61 int sn, si; 56 int sn, si;
62} stack; 57} stack;
63 58
64static inline void simplesort 59static __inline void simplesort
65 __P((const u_char **, int, int, const u_char *, u_int)); 60(const u_char **, int, int, const u_char *, u_int);
66static void r_sort_a __P((const u_char **, int, int, const u_char *, u_int)); 61static void r_sort_a(const u_char **, int, int, const u_char *, u_int);
67static void r_sort_b __P((const u_char **, 62static void r_sort_b(const u_char **,
68 const u_char **, int, int, const u_char *, u_int)); 63 const u_char **, int, int, const u_char *, u_int);
69 64
70#define THRESHOLD 20 /* Divert to simplesort(). */ 65#define THRESHOLD 20 /* Divert to simplesort(). */
71#define SIZE 512 /* Default stack size. */ 66#define SIZE 512 /* Default stack size. */
@@ -295,7 +290,7 @@ r_sort_b(a, ta, n, i, tr, endch)
295 } 290 }
296} 291}
297 292
298static inline void 293static __inline void
299simplesort(a, n, b, tr, endch) /* insertion sort */ 294simplesort(a, n, b, tr, endch) /* insertion sort */
300 register const u_char **a; 295 register const u_char **a;
301 int n, b; 296 int n, b;