1N/A
1N/A/* : : generated by proto : : */
1N/A/***********************************************************************
1N/A* *
1N/A* This software is part of the ast package *
1N/A* Copyright (c) 1985-2011 AT&T Intellectual Property *
1N/A* and is licensed under the *
1N/A* Common Public License, Version 1.0 *
1N/A* by AT&T Intellectual Property *
1N/A* *
1N/A* A copy of the License is available at *
1N/A* http://www.opensource.org/licenses/cpl1.0.txt *
1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
1N/A* *
1N/A* Information and Software Systems Research *
1N/A* AT&T Research *
1N/A* Florham Park NJ *
1N/A* *
1N/A* Glenn Fowler <gsf@research.att.com> *
1N/A* David Korn <dgk@research.att.com> *
1N/A* Phong Vo <kpv@research.att.com> *
1N/A* *
1N/A***********************************************************************/
1N/A
1N/A/*
1N/A * posix glob interface definitions with gnu extensions
1N/A */
1N/A
1N/A#ifndef _GLOB_H
1N/A#if !defined(__PROTO__)
1N/A#include <prototyped.h>
1N/A#endif
1N/A#if !defined(__LINKAGE__)
1N/A#define __LINKAGE__ /* 2004-08-11 transition */
1N/A#endif
1N/A
1N/A#define _GLOB_H
1N/A
1N/A#define GLOB_VERSION 20060717L
1N/A
1N/A#include <stdlib.h>
1N/A
1N/Astruct dirent;
1N/Astruct stat;
1N/A
1N/Astruct _glob_;
1N/Astruct _globlist_;
1N/A
1N/Atypedef struct _glob_ glob_t;
1N/Atypedef struct _globlist_ globlist_t;
1N/A
1N/Astruct _globlist_
1N/A{
1N/A globlist_t* gl_next;
1N/A char* gl_begin;
1N/A unsigned char gl_flags;
1N/A char gl_path[1];
1N/A};
1N/A
1N/Astruct _glob_
1N/A{
1N/A size_t gl_pathc;
1N/A char** gl_pathv;
1N/A size_t gl_offs;
1N/A globlist_t* gl_list;
1N/A int gl_flags;
1N/A
1N/A /* GLOB_DISC data -- memset(&gl,0,sizeof(gl)) before using! */
1N/A
1N/A const char* gl_fignore;
1N/A const char* gl_suffix;
1N/A unsigned char* gl_intr;
1N/A
1N/A int gl_delim;
1N/A
1N/A __V_* gl_handle;
1N/A __V_* (*gl_diropen) __PROTO__((glob_t*, const char*));
1N/A char* (*gl_dirnext) __PROTO__((glob_t*, __V_*));
1N/A void (*gl_dirclose) __PROTO__((glob_t*, __V_*));
1N/A int (*gl_type) __PROTO__((glob_t*, const char*, int));
1N/A int (*gl_attr) __PROTO__((glob_t*, const char*, int));
1N/A
1N/A /* gnu extensions -- but how do you synthesize dirent and stat? */
1N/A
1N/A __V_* (*gl_opendir) __PROTO__((const char*));
1N/A struct dirent* (*gl_readdir) __PROTO__((__V_*));
1N/A void (*gl_closedir) __PROTO__((__V_*));
1N/A int (*gl_stat) __PROTO__((const char*, struct stat*));
1N/A int (*gl_lstat) __PROTO__((const char*, struct stat*));
1N/A
1N/A /* ast additions */
1N/A
1N/A char* (*gl_nextdir) __PROTO__((glob_t*, char*));
1N/A unsigned long gl_status;
1N/A unsigned long gl_version;
1N/A unsigned short gl_extra;
1N/A
1N/A#ifdef _GLOB_PRIVATE_
1N/A _GLOB_PRIVATE_
1N/A#else
1N/A char* gl_pad[23];
1N/A#endif
1N/A
1N/A};
1N/A
1N/A/* standard interface */
1N/A#define GLOB_APPEND 0x0001 /* append to previous */
1N/A#define GLOB_DOOFFS 0x0002 /* gl_offs defines argv offset */
1N/A#define GLOB_ERR 0x0004 /* abort on error */
1N/A#define GLOB_MARK 0x0008 /* append / to directories */
1N/A#define GLOB_NOCHECK 0x0010 /* nomatch is original pattern */
1N/A#define GLOB_NOESCAPE 0x0020 /* don't treat \ specially */
1N/A#define GLOB_NOSORT 0x0040 /* don't sort the list */
1N/A
1N/A/* extended interface */
1N/A#define GLOB_STARSTAR 0x0080 /* enable [/]**[/] expansion */
1N/A#define GLOB_BRACE 0x0100 /* enable {...} expansion */
1N/A#define GLOB_ICASE 0x0200 /* ignore case on match */
1N/A#define GLOB_COMPLETE 0x0400 /* shell file completeion */
1N/A#define GLOB_AUGMENTED 0x0800 /* augmented shell patterns */
1N/A#define GLOB_STACK 0x1000 /* allocate on current stack */
1N/A#define GLOB_LIST 0x2000 /* just create gl_list */
1N/A#define GLOB_ALTDIRFUNC 0x4000 /* gnu discipline functions */
1N/A#define GLOB_DISC 0x8000 /* discipline initialized */
1N/A
1N/A#define GLOB_GROUP 0x10000 /* REG_SHELL_GROUP */
1N/A
1N/A/* gl_status */
1N/A#define GLOB_NOTDIR 0x0001 /* last gl_dirnext() not a dir */
1N/A
1N/A/* gl_type return */
1N/A#define GLOB_NOTFOUND 0 /* does not exist */
1N/A#define GLOB_DEV 1 /* exists but not DIR EXE REG */
1N/A#define GLOB_DIR 2 /* directory */
1N/A#define GLOB_EXE 3 /* executable regular file */
1N/A#define GLOB_REG 4 /* regular file */
1N/A
1N/A/* error return values */
1N/A#define GLOB_ABORTED 1
1N/A#define GLOB_NOMATCH 2
1N/A#define GLOB_NOSPACE 3
1N/A#define GLOB_INTR 4
1N/A#define GLOB_APPERR 5
1N/A#define GLOB_NOSYS 6
1N/A
1N/A#if _BLD_ast && defined(__EXPORT__)
1N/A#undef __MANGLE__
1N/A#define __MANGLE__ __LINKAGE__ __EXPORT__
1N/A#endif
1N/A
1N/Aextern __MANGLE__ int glob __PROTO__((const char*, int, int(*)(const char*,int), glob_t*));
1N/Aextern __MANGLE__ void globfree __PROTO__((glob_t*));
1N/A
1N/A#undef __MANGLE__
1N/A#define __MANGLE__ __LINKAGE__
1N/A
1N/A#endif /* _GLOB_H */