/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1985-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* David Korn <[email protected]> *18* Phong Vo <[email protected]> *19* *20***********************************************************************/21#pragma prototyped22/*23* Glenn Fowler24* AT&T Research25*26* fast find interface definitions27*/2829#ifndef _FIND_H30#define _FIND_H3132#define FIND_VERSION 19980301L3334#ifndef FIND_CODES35#define FIND_CODES "lib/find/codes"36#endif3738#define FIND_CODES_ENV "FINDCODES"3940#define FIND_GENERATE (1<<0) /* generate new codes */41#define FIND_ICASE (1<<1) /* ignore case in match */42#define FIND_GNU (1<<2) /* generate gnu format codes */43#define FIND_OLD (1<<3) /* generate old format codes */44#define FIND_TYPE (1<<4) /* generate type with codes */45#define FIND_VERIFY (1<<5) /* verify the dir hierarchy */4647#define FIND_USER (1L<<16) /* first user flag bit */4849struct Find_s;50struct Finddisc_s;5152typedef int (*Findverify_f)(struct Find_s*, const char*, size_t, struct Finddisc_s*);5354typedef struct Finddisc_s55{56unsigned long version; /* interface version */57unsigned long flags; /* FIND_* flags */58Error_f errorf; /* error function */59Findverify_f verifyf; /* dir verify function */60char** dirs; /* dir prefixes to search */61} Finddisc_t;6263typedef struct Find_s64{65const char* id; /* library id string */66unsigned long stamp; /* codes time stamp */6768#ifdef _FIND_PRIVATE_69_FIND_PRIVATE_70#endif7172} Find_t;7374#if _BLD_ast && defined(__EXPORT__)75#define extern __EXPORT__76#endif7778extern Find_t* findopen(const char*, const char*, const char*, Finddisc_t*);79extern char* findread(Find_t*);80extern int findwrite(Find_t*, const char*, size_t, const char*);81extern int findclose(Find_t*);8283#undef extern8485#endif868788