1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1985-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * Glenn Fowler <gsf@research.att.com> *
18 * David Korn <dgk@research.att.com> *
19 * Phong Vo <kpv@research.att.com> *
21 ***********************************************************************/
27 * fast find interface definitions
33 #define FIND_VERSION 19980301L
36 #define FIND_CODES "lib/find/codes"
39 #define FIND_CODES_ENV "FINDCODES"
41 #define FIND_GENERATE (1<<0) /* generate new codes */
42 #define FIND_ICASE (1<<1) /* ignore case in match */
43 #define FIND_GNU (1<<2) /* generate gnu format codes */
44 #define FIND_OLD (1<<3) /* generate old format codes */
45 #define FIND_TYPE (1<<4) /* generate type with codes */
46 #define FIND_VERIFY (1<<5) /* verify the dir hierarchy */
48 #define FIND_USER (1L<<16) /* first user flag bit */
53 typedef int (*Findverify_f
)(struct Find_s
*, const char*, size_t, struct Finddisc_s
*);
55 typedef struct Finddisc_s
57 unsigned long version
; /* interface version */
58 unsigned long flags
; /* FIND_* flags */
59 Error_f errorf
; /* error function */
60 Findverify_f verifyf
; /* dir verify function */
61 char** dirs
; /* dir prefixes to search */
66 const char* id
; /* library id string */
67 unsigned long stamp
; /* codes time stamp */
75 #if _BLD_ast && defined(__EXPORT__)
76 #define extern __EXPORT__
79 extern Find_t
* findopen(const char*, const char*, const char*, Finddisc_t
*);
80 extern char* findread(Find_t
*);
81 extern int findwrite(Find_t
*, const char*, size_t, const char*);
82 extern int findclose(Find_t
*);