xref: /titanic_41/usr/src/lib/libast/sparcv9/include/ast/find.h (revision 82629e3015252bf18319ba3815c773df23e21436)
1 
2 /* : : generated by proto : : */
3 /***********************************************************************
4 *                                                                      *
5 *               This software is part of the ast package               *
6 *          Copyright (c) 1985-2009 AT&T Intellectual Property          *
7 *                      and is licensed under the                       *
8 *                  Common Public License, Version 1.0                  *
9 *                    by AT&T Intellectual Property                     *
10 *                                                                      *
11 *                A copy of the License is available at                 *
12 *            http://www.opensource.org/licenses/cpl1.0.txt             *
13 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
14 *                                                                      *
15 *              Information and Software Systems Research               *
16 *                            AT&T Research                             *
17 *                           Florham Park NJ                            *
18 *                                                                      *
19 *                 Glenn Fowler <gsf@research.att.com>                  *
20 *                  David Korn <dgk@research.att.com>                   *
21 *                   Phong Vo <kpv@research.att.com>                    *
22 *                                                                      *
23 ***********************************************************************/
24 
25 /*
26  * Glenn Fowler
27  * AT&T Research
28  *
29  * fast find interface definitions
30  */
31 
32 #ifndef _FIND_H
33 #if !defined(__PROTO__)
34 #include <prototyped.h>
35 #endif
36 #if !defined(__LINKAGE__)
37 #define __LINKAGE__		/* 2004-08-11 transition */
38 #endif
39 
40 #define _FIND_H
41 
42 #define FIND_VERSION	19980301L
43 
44 #ifndef FIND_CODES
45 #define FIND_CODES	"lib/find/codes"
46 #endif
47 
48 #define FIND_CODES_ENV	"FINDCODES"
49 
50 #define FIND_GENERATE	(1<<0)		/* generate new codes		*/
51 #define FIND_ICASE	(1<<1)		/* ignore case in match		*/
52 #define FIND_GNU	(1<<2)		/* generate gnu format codes	*/
53 #define FIND_OLD	(1<<3)		/* generate old format codes	*/
54 #define FIND_TYPE	(1<<4)		/* generate type with codes	*/
55 #define FIND_VERIFY	(1<<5)		/* verify the dir hierarchy	*/
56 
57 #define FIND_USER	(1L<<16)	/* first user flag bit		*/
58 
59 struct Find_s;
60 struct Finddisc_s;
61 
62 typedef int (*Findverify_f) __PROTO__((struct Find_s*, const char*, size_t, struct Finddisc_s*));
63 
64 typedef struct Finddisc_s
65 {
66 	unsigned long	version;	/* interface version		*/
67 	unsigned long	flags;		/* FIND_* flags			*/
68 	Error_f		errorf;		/* error function		*/
69 	Findverify_f	verifyf;	/* dir verify function		*/
70 	char**		dirs;		/* dir prefixes to search	*/
71 } Finddisc_t;
72 
73 typedef struct Find_s
74 {
75 	const char*	id;		/* library id string		*/
76 	unsigned long	stamp;		/* codes time stamp		*/
77 
78 #ifdef _FIND_PRIVATE_
79 	_FIND_PRIVATE_
80 #endif
81 
82 } Find_t;
83 
84 #if _BLD_ast && defined(__EXPORT__)
85 #undef __MANGLE__
86 #define __MANGLE__ __LINKAGE__		__EXPORT__
87 #endif
88 
89 extern __MANGLE__ Find_t*		findopen __PROTO__((const char*, const char*, const char*, Finddisc_t*));
90 extern __MANGLE__ char*		findread __PROTO__((Find_t*));
91 extern __MANGLE__ int		findwrite __PROTO__((Find_t*, const char*, size_t, const char*));
92 extern __MANGLE__ int		findclose __PROTO__((Find_t*));
93 
94 #undef __MANGLE__
95 #define __MANGLE__ __LINKAGE__
96 
97 #endif
98