/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
/*
* Advanced Software Technology Library
* AT&T Research
*
* std + posix + ast
*/
#ifndef _AST_H
#if !defined(__PROTO__)
#include <prototyped.h>
#endif
#if !defined(__LINKAGE__)
#endif
#define _AST_H
#include <ast_version.h>
#ifndef _AST_STD_H
#include <ast_std.h>
#endif
#ifndef _SFIO_H
#include <sfio.h>
#endif
#ifndef ast
#endif
#ifndef PATH_MAX
#endif
/*
* workaround botched headers that assume <stdio.h>
*/
#ifndef FILE
#ifndef _SFIO_H
struct _sfio_s;
#endif
#ifndef __FILE_typedef
#endif
#ifndef _FILEDEFED
#endif
#endif
/*
* exit() support -- this matches shell exit codes
*/
/*
* NOTE: for compatibility the following work for EXIT_BITS={7,8}
*/
#define EXITED_CORE(x) (((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))==((1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))||((x)&((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))==((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))
/*
* astconflist() flags
*/
/*
* pathcanon() flags
*/
/*
* pathaccess() flags
*/
/*
* touch() flags
*/
/*
* pathcheck() info
*/
typedef struct
{
unsigned long date;
char* feature;
char* host;
char* user;
} Pathcheck_t;
/*
* strgrpmatch() flags
*/
/*
* fmtquote() flags
*/
/*
* multibyte macros
*/
#define mbchar(p) (mbwide()?((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),mbmax()))>0?((p+=ast.tmp_int),ast.tmp_wchar):(p+=ast.mb_sync+1,ast.tmp_int)):(*(unsigned char*)(p++)))
#define mbwidth(w) (ast.mb_width&&((ast.tmp_int=(*ast.mb_width)(w))>=0||(w)>UCHAR_MAX)?ast.tmp_int:1)
/*
* common macros
*/
#define elementsof(x) (sizeof(x)/sizeof(x[0]))
#define integralof(x) (((char*)(x))-((char*)0))
#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
#define oldof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)malloc(sizeof(t)*(n)+(x)))
#define ssizeof(x) ((int)sizeof(x))
#define NiL 0
#define NoP(x) (void)(x)
#else
#define NiL ((char*)0)
#endif
#if !defined(NoF)
#else
#endif
#if !defined(_DATA_)
#define _DATA_
#endif
#endif
#if !defined(NoN)
#else
#endif
#if !defined(_STUB_)
#define _STUB_
#endif
#endif
#if _BLD_ast && defined(__EXPORT__)
#endif
extern __MANGLE__ char* astgetconf __PROTO__((const char*, const char*, const char*, int, Error_f));
extern __MANGLE__ ssize_t base64encode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
extern __MANGLE__ ssize_t base64decode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
extern __MANGLE__ char* pathprobe __PROTO__((char*, char*, const char*, const char*, const char*, int));
extern __MANGLE__ long strexpr __PROTO__((const char*, char**, long(*)(const char*, char**, __V_*), __V_*));
extern __MANGLE__ int stropt __PROTO__((const char*, const __V_*, int, int(*)(__V_*, const __V_*, int, const char*), __V_*));
extern __MANGLE__ __V_* strsearch __PROTO__((const __V_*, size_t, size_t, Strcmp_f, const char*, __V_*));
/*
* C library global data symbols not prototyped by <unistd.h>
*/
#if !defined(environ) && defined(__DYNAMIC__)
#else
extern __MANGLE__ char** environ;
#endif
/*
* really handy malloc()/free() (__FILE__,__LINE__,__FUNCTION__) tracing
* make with VMDEBUG==1 or debug=1 or CCFLAGS=$(CC.DEBUG)
* VMDEBUG==0 disables
* at runtime export VMDEBUG or VMTRACE per vmalloc.3
* to list originating call locations
*/
#include <vmalloc.h>
#endif
#endif