aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2002-10-03 06:31:16 +0000
committerMike Barcroft <mike@FreeBSD.org>2002-10-03 06:31:16 +0000
commita23db95772699f0131b88a5a65f43fad0b6143db (patch)
tree57375697570517123b52d74306627d99b78aebf2 /include
parent26371587bc10ce68ce18106db23f87cf6237524f (diff)
downloadsrc-a23db95772699f0131b88a5a65f43fad0b6143db.tar.gz
src-a23db95772699f0131b88a5a65f43fad0b6143db.zip
Fix various style(9) bugs:
o Source ID's in wrong location. o Space used, instead of tab, after typedef. o Unaligned function prototype for twalk(). Other changes: o Add missing const qualifier in tfind(). o Add comment about missing functions.
Notes
Notes: svn path=/head/; revision=104399
Diffstat (limited to 'include')
-rw-r--r--include/search.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/include/search.h b/include/search.h
index e89b0c49f384..a62f772b731c 100644
--- a/include/search.h
+++ b/include/search.h
@@ -1,9 +1,9 @@
-/* $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $ */
-/* $FreeBSD$ */
-
-/*
+/*-
* Written by J.T. Conklin <jtc@netbsd.org>
* Public domain.
+ *
+ * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $
+ * $FreeBSD$
*/
#ifndef _SEARCH_H_
@@ -17,16 +17,16 @@ typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
-typedef struct entry {
- char *key;
- void *data;
+typedef struct entry {
+ char *key;
+ void *data;
} ENTRY;
-typedef enum {
+typedef enum {
FIND, ENTER
} ACTION;
-typedef enum {
+typedef enum {
preorder,
postorder,
endorder,
@@ -34,7 +34,7 @@ typedef enum {
} VISIT;
#ifdef _SEARCH_PRIVATE
-typedef struct node {
+typedef struct node {
char *key;
struct node *llink, *rlink;
} node_t;
@@ -46,9 +46,13 @@ void hdestroy(void);
ENTRY *hsearch(ENTRY, ACTION);
void *tdelete(const void * __restrict, void ** __restrict,
int (*)(const void *, const void *));
-void *tfind(const void *, void **, int (*)(const void *, const void *));
+void *tfind(const void *, void * const *,
+ int (*)(const void *, const void *));
void *tsearch(const void *, void **, int (*)(const void *, const void *));
-void twalk(const void *, void (*)(const void *, VISIT, int));
+void twalk(const void *, void (*)(const void *, VISIT, int));
+/*
+ * XXX missing insque(), lsearch(), remque().
+ */
__END_DECLS
#endif /* !_SEARCH_H_ */