1da2e3ebchin
2da2e3ebchin/* : : generated by proto : : */
3da2e3ebchin/***********************************************************************
4da2e3ebchin*                                                                      *
5da2e3ebchin*               This software is part of the ast package               *
63e14f97Roger A. Faulkner*          Copyright (c) 1985-2010 AT&T Intellectual Property          *
7da2e3ebchin*                      and is licensed under the                       *
8da2e3ebchin*                  Common Public License, Version 1.0                  *
97c2fbfbApril Chin*                    by AT&T Intellectual Property                     *
10da2e3ebchin*                                                                      *
11da2e3ebchin*                A copy of the License is available at                 *
12da2e3ebchin*            http://www.opensource.org/licenses/cpl1.0.txt             *
13da2e3ebchin*         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
14da2e3ebchin*                                                                      *
15da2e3ebchin*              Information and Software Systems Research               *
16da2e3ebchin*                            AT&T Research                             *
17da2e3ebchin*                           Florham Park NJ                            *
18da2e3ebchin*                                                                      *
19da2e3ebchin*                 Glenn Fowler <gsf@research.att.com>                  *
20da2e3ebchin*                  David Korn <dgk@research.att.com>                   *
21da2e3ebchin*                   Phong Vo <kpv@research.att.com>                    *
22da2e3ebchin*                                                                      *
23da2e3ebchin***********************************************************************/
24da2e3ebchin
25da2e3ebchin/*
26da2e3ebchin * Advanced Software Technology Library
27da2e3ebchin * AT&T Research
28da2e3ebchin *
29da2e3ebchin * std + posix + ast
30da2e3ebchin */
31da2e3ebchin
32da2e3ebchin#ifndef _AST_H
33da2e3ebchin#if !defined(__PROTO__)
34da2e3ebchin#include <prototyped.h>
35da2e3ebchin#endif
36da2e3ebchin#if !defined(__LINKAGE__)
37da2e3ebchin#define __LINKAGE__		/* 2004-08-11 transition */
38da2e3ebchin#endif
39da2e3ebchin
40da2e3ebchin#define _AST_H
41da2e3ebchin
42da2e3ebchin#include <ast_version.h>
43da2e3ebchin
44da2e3ebchin#ifndef _AST_STD_H
45da2e3ebchin#include <ast_std.h>
46da2e3ebchin#endif
47da2e3ebchin
48da2e3ebchin#ifndef _SFIO_H
49da2e3ebchin#include <sfio.h>
50da2e3ebchin#endif
51da2e3ebchin
52da2e3ebchin#ifndef	ast
53da2e3ebchin#define ast		_ast_info
54da2e3ebchin#endif
55da2e3ebchin
56da2e3ebchin#ifndef PATH_MAX
57da2e3ebchin#define PATH_MAX	1024
58da2e3ebchin#endif
59da2e3ebchin
60da2e3ebchin/*
61da2e3ebchin * workaround botched headers that assume <stdio.h>
62da2e3ebchin */
63da2e3ebchin
64da2e3ebchin#ifndef FILE
65da2e3ebchin#ifndef _SFIO_H
66da2e3ebchinstruct _sfio_s;
67da2e3ebchin#endif
68da2e3ebchin#define FILE		struct _sfio_s
69da2e3ebchin#ifndef	__FILE_typedef
70da2e3ebchin#define __FILE_typedef	1
71da2e3ebchin#endif
72da2e3ebchin#ifndef _FILEDEFED
73da2e3ebchin#define _FILEDEFED	1
74da2e3ebchin#endif
75da2e3ebchin#endif
76da2e3ebchin
77da2e3ebchin/*
78da2e3ebchin * exit() support -- this matches shell exit codes
79da2e3ebchin */
80da2e3ebchin
81da2e3ebchin#define EXIT_BITS	8			/* # exit status bits	*/
82da2e3ebchin
83da2e3ebchin#define EXIT_USAGE	2			/* usage exit code	*/
84da2e3ebchin#define EXIT_QUIT	((1<<(EXIT_BITS))-1)	/* parent should quit	*/
85da2e3ebchin#define EXIT_NOTFOUND	((1<<(EXIT_BITS-1))-1)	/* command not found	*/
86da2e3ebchin#define EXIT_NOEXEC	((1<<(EXIT_BITS-1))-2)	/* other exec error	*/
87da2e3ebchin
88da2e3ebchin#define EXIT_CODE(x)	((x)&((1<<EXIT_BITS)-1))
89da2e3ebchin#define EXIT_CORE(x)	(EXIT_CODE(x)|(1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))
90da2e3ebchin#define EXIT_TERM(x)	(EXIT_CODE(x)|(1<<EXIT_BITS))
91da2e3ebchin
92da2e3ebchin/*
93da2e3ebchin * NOTE: for compatibility the following work for EXIT_BITS={7,8}
94da2e3ebchin */
95da2e3ebchin
96da2e3ebchin#define EXIT_STATUS(x)	(((x)&((1<<(EXIT_BITS-2))-1))?(x):EXIT_CODE((x)>>EXIT_BITS))
97da2e3ebchin
98da2e3ebchin#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))))
99da2e3ebchin#define EXITED_TERM(x)	((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))
100da2e3ebchin
101da2e3ebchin/*
102da2e3ebchin * astconflist() flags
103da2e3ebchin */
104da2e3ebchin
105da2e3ebchin#define ASTCONF_parse		0x0001
106da2e3ebchin#define ASTCONF_write		0x0002
107da2e3ebchin#define ASTCONF_read		0x0004
108da2e3ebchin#define ASTCONF_lower		0x0008
109da2e3ebchin#define ASTCONF_base		0x0010
110da2e3ebchin#define ASTCONF_defined		0x0020
111da2e3ebchin#define ASTCONF_quote		0x0040
112da2e3ebchin#define ASTCONF_table		0x0080
113da2e3ebchin#define ASTCONF_matchcall	0x0100
114da2e3ebchin#define ASTCONF_matchname	0x0200
115da2e3ebchin#define ASTCONF_matchstandard	0x0400
116da2e3ebchin#define ASTCONF_error		0x0800
117da2e3ebchin#define ASTCONF_system		0x1000
118da2e3ebchin#define ASTCONF_AST		0x2000
119da2e3ebchin
120da2e3ebchin/*
121da2e3ebchin * pathcanon() flags
122da2e3ebchin */
123da2e3ebchin
124da2e3ebchin#define PATH_PHYSICAL	01
125da2e3ebchin#define PATH_DOTDOT	02
126da2e3ebchin#define PATH_EXISTS	04
127da2e3ebchin#define PATH_VERIFIED(n) (((n)&01777)<<5)
128da2e3ebchin
129da2e3ebchin/*
130da2e3ebchin * pathaccess() flags
131da2e3ebchin */
132da2e3ebchin
133da2e3ebchin#define PATH_READ	004
134da2e3ebchin#define PATH_WRITE	002
135da2e3ebchin#define PATH_EXECUTE	001
136da2e3ebchin#define	PATH_REGULAR	010
137da2e3ebchin#define PATH_ABSOLUTE	020
138da2e3ebchin
139da2e3ebchin/*
140da2e3ebchin * touch() flags
141da2e3ebchin */
142da2e3ebchin
143da2e3ebchin#define PATH_TOUCH_CREATE	01
144da2e3ebchin#define PATH_TOUCH_VERBATIM	02
145da2e3ebchin
146da2e3ebchin/*
147da2e3ebchin * pathcheck() info
148da2e3ebchin */
149da2e3ebchin
150da2e3ebchintypedef struct
151da2e3ebchin{
152da2e3ebchin	unsigned long	date;
153da2e3ebchin	char*		feature;
154da2e3ebchin	char*		host;
155da2e3ebchin	char*		user;
156da2e3ebchin} Pathcheck_t;
157da2e3ebchin
158da2e3ebchin/*
159da2e3ebchin * strgrpmatch() flags
160da2e3ebchin */
161da2e3ebchin
162da2e3ebchin#define STR_MAXIMAL	01		/* maximal match		*/
163da2e3ebchin#define STR_LEFT	02		/* implicit left anchor		*/
164da2e3ebchin#define STR_RIGHT	04		/* implicit right anchor	*/
165da2e3ebchin#define STR_ICASE	010		/* ignore case			*/
166da2e3ebchin#define STR_GROUP	020		/* (|&) inside [@|&](...) only	*/
167da2e3ebchin
168da2e3ebchin/*
169da2e3ebchin * fmtquote() flags
170da2e3ebchin */
171da2e3ebchin
172da2e3ebchin#define FMT_ALWAYS	0x01		/* always quote			*/
173da2e3ebchin#define FMT_ESCAPED	0x02		/* already escaped		*/
174da2e3ebchin#define FMT_SHELL	0x04		/* escape $ ` too		*/
175da2e3ebchin#define FMT_WIDE	0x08		/* don't escape 8 bit chars	*/
176da2e3ebchin#define FMT_PARAM	0x10		/* disable FMT_SHELL ${$( quote	*/
177da2e3ebchin
178da2e3ebchin/*
179da2e3ebchin * multibyte macros
180da2e3ebchin */
181da2e3ebchin
182da2e3ebchin#define mbmax()		(ast.mb_cur_max)
183da2e3ebchin#define mberr()		(ast.tmp_int<0)
184da2e3ebchin
185da2e3ebchin#define mbcoll()	(ast.mb_xfrm!=0)
186da2e3ebchin#define mbwide()	(mbmax()>1)
187da2e3ebchin
18834f9b3eRoland Mainz#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++)))
189da2e3ebchin#define mbinit()	(mbwide()?(*ast.mb_towc)((wchar_t*)0,(char*)0,mbmax()):0)
190da2e3ebchin#define mbsize(p)	(mbwide()?(*ast.mb_len)((char*)(p),mbmax()):((p),1))
191da2e3ebchin#define mbconv(s,w)	(ast.mb_conv?(*ast.mb_conv)(s,w):((*(s)=(w)),1))
192da2e3ebchin#define mbwidth(w)	(ast.mb_width&&((ast.tmp_int=(*ast.mb_width)(w))>=0||(w)>UCHAR_MAX)?ast.tmp_int:1)
193da2e3ebchin#define mbxfrm(t,f,n)	(mbcoll()?(*ast.mb_xfrm)((char*)(t),(char*)(f),n):0)
194da2e3ebchin
195da2e3ebchin/*
196da2e3ebchin * common macros
197da2e3ebchin */
198da2e3ebchin
199da2e3ebchin#define elementsof(x)	(sizeof(x)/sizeof(x[0]))
200da2e3ebchin#define integralof(x)	(((char*)(x))-((char*)0))
201da2e3ebchin#define newof(p,t,n,x)	((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
202da2e3ebchin#define oldof(p,t,n,x)	((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)malloc(sizeof(t)*(n)+(x)))
203da2e3ebchin#define pointerof(x)	((__V_*)((char*)0+(x)))
204da2e3ebchin#define roundof(x,y)	(((x)+(y)-1)&~((y)-1))
205da2e3ebchin#define ssizeof(x)	((int)sizeof(x))
206da2e3ebchin
207da2e3ebchin#define streq(a,b)	(*(a)==*(b)&&!strcmp(a,b))
208da2e3ebchin#define strneq(a,b,n)	(*(a)==*(b)&&!strncmp(a,b,n))
209da2e3ebchin#define strsignal(s)	fmtsignal(s)
210da2e3ebchin
211da2e3ebchin#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
212da2e3ebchin#define NiL		0
213da2e3ebchin#define NoP(x)		(void)(x)
214da2e3ebchin#else
215da2e3ebchin#define NiL		((char*)0)
216da2e3ebchin#define NoP(x)		(&x,1)
217da2e3ebchin#endif
218da2e3ebchin
219da2e3ebchin#if !defined(NoF)
220da2e3ebchin#if defined(__STDC__) || defined(__STDPP__)
221da2e3ebchin#define NoF(x)		void _DATA_ ## x () {}
222da2e3ebchin#else
223da2e3ebchin#define NoF(x)		void _DATA_/**/x () {}
224da2e3ebchin#endif
225da2e3ebchin#if !defined(_DATA_)
226da2e3ebchin#define _DATA_
227da2e3ebchin#endif
228da2e3ebchin#endif
229da2e3ebchin
230da2e3ebchin#if !defined(NoN)
231da2e3ebchin#if defined(__STDC__) || defined(__STDPP__)
232da2e3ebchin#define NoN(x)		void _STUB_ ## x () {}
233da2e3ebchin#else
234da2e3ebchin#define NoN(x)		void _STUB_/**/x () {}
235da2e3ebchin#endif
236da2e3ebchin#if !defined(_STUB_)
237da2e3ebchin#define _STUB_
238da2e3ebchin#endif
239da2e3ebchin#endif
240da2e3ebchin
241da2e3ebchin#define NOT_USED(x)	NoP(x)
242da2e3ebchin
243da2e3ebchintypedef int (*Error_f) __PROTO__((__V_*, __V_*, int, ...));
244da2e3ebchin
245da2e3ebchintypedef int (*Ast_confdisc_f) __PROTO__((const char*, const char*, const char*));
246da2e3ebchintypedef int (*Strcmp_context_f) __PROTO__((const char*, const char*, __V_*));
247da2e3ebchintypedef int (*Strcmp_f) __PROTO__((const char*, const char*));
248da2e3ebchin
249da2e3ebchin#if _BLD_ast && defined(__EXPORT__)
250da2e3ebchin#undef __MANGLE__
251da2e3ebchin#define __MANGLE__ __LINKAGE__		__EXPORT__
252da2e3ebchin#endif
253da2e3ebchin
254da2e3ebchinextern __MANGLE__ char*		astgetconf __PROTO__((const char*, const char*, const char*, int, Error_f));
255da2e3ebchinextern __MANGLE__ char*		astconf __PROTO__((const char*, const char*, const char*));
256da2e3ebchinextern __MANGLE__ Ast_confdisc_f	astconfdisc __PROTO__((Ast_confdisc_f));
257da2e3ebchinextern __MANGLE__ void		astconflist __PROTO__((Sfio_t*, const char*, int, const char*));
258da2e3ebchinextern __MANGLE__ off_t		astcopy __PROTO__((int, int, off_t));
259da2e3ebchinextern __MANGLE__ int		astlicense __PROTO__((char*, int, char*, char*, int, int, int));
260da2e3ebchinextern __MANGLE__ int		astquery __PROTO__((int, const char*, ...));
261da2e3ebchinextern __MANGLE__ void		astwinsize __PROTO__((int, int*, int*));
262da2e3ebchin
263da2e3ebchinextern __MANGLE__ ssize_t		base64encode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
264da2e3ebchinextern __MANGLE__ ssize_t		base64decode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
265da2e3ebchinextern __MANGLE__ int		chresc __PROTO__((const char*, char**));
266da2e3ebchinextern __MANGLE__ int		chrtoi __PROTO__((const char*));
267da2e3ebchinextern __MANGLE__ int		eaccess __PROTO__((const char*, int));
268da2e3ebchinextern __MANGLE__ char*		fmtbase __PROTO__((long, int, int));
269da2e3ebchinextern __MANGLE__ char*		fmtbasell __PROTO__((intmax_t, int, int));
270da2e3ebchin#define fmtbase(a,b,c)	fmtbasell((intmax_t)(a),b,c) /* until 2003-09-01 */
271da2e3ebchinextern __MANGLE__ char*		fmtbuf __PROTO__((size_t));
272da2e3ebchinextern __MANGLE__ char*		fmtclock __PROTO__((Sfulong_t));
273da2e3ebchinextern __MANGLE__ char*		fmtelapsed __PROTO__((unsigned long, int));
274da2e3ebchinextern __MANGLE__ char*		fmterror __PROTO__((int));
275da2e3ebchinextern __MANGLE__ char*		fmtesc __PROTO__((const char*));
276da2e3ebchinextern __MANGLE__ char*		fmtesq __PROTO__((const char*, const char*));
277da2e3ebchinextern __MANGLE__ char*		fmtident __PROTO__((const char*));
278da2e3ebchinextern __MANGLE__ char*		fmtip4 __PROTO__((uint32_t, int));
279da2e3ebchinextern __MANGLE__ char*		fmtfmt __PROTO__((const char*));
280da2e3ebchinextern __MANGLE__ char*		fmtgid __PROTO__((int));
281da2e3ebchinextern __MANGLE__ char*		fmtmatch __PROTO__((const char*));
282da2e3ebchinextern __MANGLE__ char*		fmtmode __PROTO__((int, int));
283da2e3ebchinextern __MANGLE__ char*		fmtnesq __PROTO__((const char*, const char*, size_t));
284da2e3ebchinextern __MANGLE__ char*		fmtnum __PROTO__((unsigned long, int));
285da2e3ebchinextern __MANGLE__ char*		fmtperm __PROTO__((int));
286da2e3ebchinextern __MANGLE__ char*		fmtquote __PROTO__((const char*, const char*, const char*, size_t, int));
287da2e3ebchinextern __MANGLE__ char*		fmtre __PROTO__((const char*));
288da2e3ebchinextern __MANGLE__ char*		fmtscale __PROTO__((Sfulong_t, int));
289da2e3ebchinextern __MANGLE__ char*		fmtsignal __PROTO__((int));
290da2e3ebchinextern __MANGLE__ char*		fmttime __PROTO__((const char*, time_t));
291da2e3ebchinextern __MANGLE__ char*		fmtuid __PROTO__((int));
292da2e3ebchinextern __MANGLE__ char*		fmtversion __PROTO__((unsigned long));
293da2e3ebchinextern __MANGLE__ __V_*		memdup __PROTO__((const __V_*, size_t));
294da2e3ebchinextern __MANGLE__ void		memfatal __PROTO__((void));
295da2e3ebchinextern __MANGLE__ unsigned int	memhash __PROTO__((const __V_*, int));
296da2e3ebchinextern __MANGLE__ unsigned long	memsum __PROTO__((const __V_*, int, unsigned long));
297da2e3ebchinextern __MANGLE__ char*		pathaccess __PROTO__((char*, const char*, const char*, const char*, int));
298da2e3ebchinextern __MANGLE__ char*		pathbin __PROTO__((void));
299da2e3ebchinextern __MANGLE__ char*		pathcanon __PROTO__((char*, int));
300da2e3ebchinextern __MANGLE__ char*		pathcat __PROTO__((char*, const char*, int, const char*, const char*));
301da2e3ebchinextern __MANGLE__ int		pathcd __PROTO__((const char*, const char*));
302da2e3ebchinextern __MANGLE__ int		pathcheck __PROTO__((const char*, const char*, Pathcheck_t*));
303da2e3ebchinextern __MANGLE__ int		pathexists __PROTO__((char*, int));
304da2e3ebchinextern __MANGLE__ char*		pathfind __PROTO__((const char*, const char*, const char*, char*, size_t));
305da2e3ebchinextern __MANGLE__ int		pathgetlink __PROTO__((const char*, char*, int));
306da2e3ebchinextern __MANGLE__ int		pathinclude __PROTO__((const char*));
307da2e3ebchinextern __MANGLE__ char*		pathkey __PROTO__((char*, char*, const char*, const char*, const char*));
308da2e3ebchinextern __MANGLE__ size_t		pathnative __PROTO__((const char*, char*, size_t));
309da2e3ebchinextern __MANGLE__ char*		pathpath __PROTO__((char*, const char*, const char*, int));
310da2e3ebchinextern __MANGLE__ size_t		pathposix __PROTO__((const char*, char*, size_t));
311da2e3ebchinextern __MANGLE__ char*		pathprobe __PROTO__((char*, char*, const char*, const char*, const char*, int));
31234f9b3eRoland Mainzextern __MANGLE__ size_t		pathprog __PROTO__((const char*, char*, size_t));
313da2e3ebchinextern __MANGLE__ char*		pathrepl __PROTO__((char*, const char*, const char*));
314da2e3ebchinextern __MANGLE__ int		pathsetlink __PROTO__((const char*, const char*));
315da2e3ebchinextern __MANGLE__ char*		pathshell __PROTO__((void));
316da2e3ebchinextern __MANGLE__ char*		pathtemp __PROTO__((char*, size_t, const char*, const char*, int*));
317da2e3ebchinextern __MANGLE__ char*		pathtmp __PROTO__((char*, const char*, const char*, int*));
318da2e3ebchinextern __MANGLE__ char*		setenviron __PROTO__((const char*));
319da2e3ebchinextern __MANGLE__ int		stracmp __PROTO__((const char*, const char*));
320da2e3ebchinextern __MANGLE__ char*		strcopy __PROTO__((char*, const char*));
321da2e3ebchinextern __MANGLE__ unsigned long	strelapsed __PROTO__((const char*, char**, int));
322da2e3ebchinextern __MANGLE__ int		stresc __PROTO__((char*));
323da2e3ebchinextern __MANGLE__ long		streval __PROTO__((const char*, char**, long(*)(const char*, char**)));
324da2e3ebchinextern __MANGLE__ long		strexpr __PROTO__((const char*, char**, long(*)(const char*, char**, __V_*), __V_*));
325da2e3ebchinextern __MANGLE__ int		strgid __PROTO__((const char*));
326da2e3ebchinextern __MANGLE__ int		strgrpmatch __PROTO__((const char*, const char*, int*, int, int));
327da2e3ebchinextern __MANGLE__ unsigned int	strhash __PROTO__((const char*));
328da2e3ebchinextern __MANGLE__ __V_*		strlook __PROTO__((const __V_*, size_t, const char*));
329da2e3ebchinextern __MANGLE__ int		strmatch __PROTO__((const char*, const char*));
330da2e3ebchinextern __MANGLE__ int		strmode __PROTO__((const char*));
331da2e3ebchinextern __MANGLE__ int		strnacmp __PROTO__((const char*, const char*, size_t));
332da2e3ebchinextern __MANGLE__ char*		strncopy __PROTO__((char*, const char*, size_t));
33334f9b3eRoland Mainzextern __MANGLE__ int		strnpcmp __PROTO__((const char*, const char*, size_t));
334da2e3ebchinextern __MANGLE__ double		strntod __PROTO__((const char*, size_t, char**));
335da2e3ebchinextern __MANGLE__ _ast_fltmax_t	strntold __PROTO__((const char*, size_t, char**));
336da2e3ebchinextern __MANGLE__ long		strntol __PROTO__((const char*, size_t, char**, int));
337da2e3ebchinextern __MANGLE__ intmax_t		strntoll __PROTO__((const char*, size_t, char**, int));
3387c2fbfbApril Chinextern __MANGLE__ long		strnton __PROTO__((const char*, size_t, char**, char*, int));
339da2e3ebchinextern __MANGLE__ unsigned long	strntoul __PROTO__((const char*, size_t, char**, int));
3407c2fbfbApril Chinextern __MANGLE__ intmax_t		strntonll __PROTO__((const char*, size_t, char**, char*, int));
341da2e3ebchinextern __MANGLE__ uintmax_t	strntoull __PROTO__((const char*, size_t, char**, int));
34234f9b3eRoland Mainzextern __MANGLE__ int		strnvcmp __PROTO__((const char*, const char*, size_t));
343da2e3ebchinextern __MANGLE__ int		stropt __PROTO__((const char*, const __V_*, int, int(*)(__V_*, const __V_*, int, const char*), __V_*));
34434f9b3eRoland Mainzextern __MANGLE__ int		strpcmp __PROTO__((const char*, const char*));
345da2e3ebchinextern __MANGLE__ int		strperm __PROTO__((const char*, char**, int));
346da2e3ebchinextern __MANGLE__ __V_*		strpsearch __PROTO__((const __V_*, size_t, size_t, const char*, char**));
347da2e3ebchinextern __MANGLE__ __V_*		strsearch __PROTO__((const __V_*, size_t, size_t, Strcmp_f, const char*, __V_*));
348da2e3ebchinextern __MANGLE__ void		strsort __PROTO__((char**, int, int(*)(const char*, const char*)));
349da2e3ebchinextern __MANGLE__ char*		strsubmatch __PROTO__((const char*, const char*, int));
350da2e3ebchinextern __MANGLE__ unsigned long	strsum __PROTO__((const char*, unsigned long));
351da2e3ebchinextern __MANGLE__ char*		strtape __PROTO__((const char*, char**));
352da2e3ebchinextern __MANGLE__ int		strtoip4 __PROTO__((const char*, char**, uint32_t*, unsigned char*));
353da2e3ebchinextern __MANGLE__ long		strton __PROTO__((const char*, char**, char*, int));
354da2e3ebchinextern __MANGLE__ intmax_t		strtonll __PROTO__((const char*, char**, char*, int));
355da2e3ebchinextern __MANGLE__ int		struid __PROTO__((const char*));
356da2e3ebchinextern __MANGLE__ int		struniq __PROTO__((char**, int));
35734f9b3eRoland Mainzextern __MANGLE__ int		strvcmp __PROTO__((const char*, const char*));
358da2e3ebchin
359da2e3ebchin#undef __MANGLE__
360da2e3ebchin#define __MANGLE__ __LINKAGE__
361da2e3ebchin
362da2e3ebchin/*
363da2e3ebchin * C library global data symbols not prototyped by <unistd.h>
364da2e3ebchin */
365da2e3ebchin
366da2e3ebchin#if !defined(environ) && defined(__DYNAMIC__)
367da2e3ebchin#define	environ		__DYNAMIC__(environ)
368da2e3ebchin#else
369da2e3ebchinextern __MANGLE__ char**		environ;
370da2e3ebchin#endif
371da2e3ebchin
372da2e3ebchin/*
373da2e3ebchin * really handy malloc()/free() (__FILE__,__LINE__,__FUNCTION__) tracing
374da2e3ebchin * make with VMDEBUG==1 or debug=1 or CCFLAGS=$(CC.DEBUG)
375da2e3ebchin * VMDEBUG==0 disables
376da2e3ebchin * at runtime export VMDEBUG or VMTRACE per vmalloc.3
377da2e3ebchin * to list originating call locations
378da2e3ebchin */
379da2e3ebchin
380da2e3ebchin#if !_std_malloc && !defined(VMFL) && !defined(_VMHDR_H) && \
381da2e3ebchin	(!defined(VMDEBUG) || VMDEBUG) && (VMDEBUG || _BLD_DEBUG)
382da2e3ebchin
383da2e3ebchin#define VMFL	1
384da2e3ebchin#include <vmalloc.h>
385da2e3ebchin
386da2e3ebchin#endif
387da2e3ebchin
388da2e3ebchin#endif
389