home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
uccs
/
root.14
/
udk
/
usr
/
include
/
search.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-08-19
|
2KB
|
74 lines
/*
* Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
* SANTA CRUZ OPERATION INC.
*
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*/
#ifndef _SEARCH_H
#define _SEARCH_H
#ident "@(#)sgs-head:common/head/search.h 1.3.3.5"
#ifndef _SIZE_T
# define _SIZE_T
typedef unsigned int size_t;
#endif
typedef enum {FIND, ENTER} ACTION;
typedef enum {preorder, postorder, endorder, leaf} VISIT;
typedef struct entry
{
char *key;
void *data;
} ENTRY;
#ifndef _XOPEN_SOURCE
struct qelem
{
struct qelem *q_forw;
struct qelem *q_back;
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int hcreate(size_t);
extern void hdestroy(void);
extern ENTRY *hsearch(ENTRY, ACTION);
extern void *lfind(const void *, const void *, size_t *, size_t,
int (*)(const void *, const void *));
extern void *lsearch(const void *, void *, size_t *, size_t,
int (*)(const void *, const void *));
extern void *tdelete(const void *, void **,
int (*)(const void *, const void *));
extern void *tfind(const void *, void *const *,
int (*)(const void *, const void *));
extern void *tsearch(const void *, void **,
int (*)(const void *, const void *));
extern void twalk(const void *, void (*)(const void *, VISIT, int));
#ifndef _XOPEN_SOURCE
extern void *bsearch(const void *, const void *, size_t, size_t,
int (*)(const void *, const void *));
extern void insque(struct qelem *, struct qelem *);
extern void remque(struct qelem *);
#elif defined(_XOPEN_SOURCE) && _XOPEN_SOURCE_EXTENDED - 0 >= 1
extern void insque(void *, void *);
extern void remque(void *);
#endif /*_XOPEN_SOURCE*/
#ifdef __cplusplus
}
#endif
#endif /*_SEARCH_H*/