xref: /titanic_41/usr/src/lib/libast/common/llib-last (revision 24a1f0af9f770e0e795ef1fa1c6dece8dd8dc959)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23 * Use is subject to license terms.
24 *
25 * lib/libast/common/llib-last
26 *
27 */
28
29#pragma ident	"%Z%%M%	%I%	%E% SMI"
30
31/*LINTLIBRARY*/
32/*PROTOLIB1*/
33
34#define _FTWALK_H 1
35
36#include <ast.h>
37#include <align.h>
38#include <ast_botch.h>
39#include <ast_ccode.h>
40#include <ast_common.h>
41#include <ast_dir.h>
42#include <ast_dirent.h>
43#include <ast_float.h>
44#include <ast_fs.h>
45#include <ast_getopt.h>
46#include <ast_iconv.h>
47#include <ast_lib.h>
48#include <ast_limits.h>
49#include <ast_mmap.h>
50#include <ast_mode.h>
51#include <ast_nl_types.h>
52#include <ast_param.h>
53#include <ast_time.h>
54#include <ast_tty.h>
55#include <ast_types.h>
56#include <ast_version.h>
57#include <bytesex.h>
58#include <ccode.h>
59#include <cdt.h>
60#include <debug.h>
61#include <dirent.h>
62#include <dt.h>
63#include <endian.h>
64#include <error.h>
65#include <find.h>
66#include <fnmatch.h>
67#include <fnv.h>
68#include <fs3d.h>
69#include <fts.h>
70#include <ftw.h>
71#include <getopt.h>
72#include <glob.h>
73#include <hash.h>
74#include <hashkey.h>
75#include <hashpart.h>
76#include <iconv.h>
77#include <lc.h>
78#include <limits.h>
79#include <ls.h>
80#include <magic.h>
81#include <magicid.h>
82#include <mc.h>
83#include <mime.h>
84#include <mnt.h>
85#include <modecanon.h>
86#include <namval.h>
87#include <nl_types.h>
88#include <option.h>
89#include <preroot.h>
90#include <proc.h>
91#include <re_comp.h>
92#include <recfmt.h>
93#include <regex.h>
94#include <regexp.h>
95#include <sfdisc.h>
96#include <sfio_s.h>
97#include <sfio_t.h>
98#include <sig.h>
99#include <stack.h>
100#include <stak.h>
101#include <stk.h>
102#include <swap.h>
103#include <tar.h>
104#include <times.h>
105#include <tm.h>
106#include <tmx.h>
107#include <tok.h>
108#include <tv.h>
109#include <usage.h>
110#include <vdb.h>
111#include <vecargs.h>
112#include <wait.h>
113#include <wchar.h>
114#include <wordexp.h>
115
116#if defined(_AST_STD_H) || defined(_POSIX_SOURCE) || defined(_XOPEN_SOURCE)
117#define _AST_mode_t     mode_t
118#else
119#define _AST_mode_t     int
120#endif
121
122/* automatically generated data start here */
123/* tmpastinclude/ast.h */
124extern char* astconf(const char*, const char*, const char*);
125extern Ast_confdisc_f astconfdisc(Ast_confdisc_f);
126extern void astconflist(Sfio_t*, const char*, int, const char*);
127extern off_t astcopy(int, int, off_t);
128extern int astlicense(char*, int, char*, char*, int, int, int);
129extern int astquery(int, const char*, ...);
130extern void astwinsize(int, int*, int*);
131extern ssize_t base64encode(const void*, size_t, void**, void*, size_t, void**);
132extern ssize_t base64decode(const void*, size_t, void**, void*, size_t, void**);
133extern int chresc(const char*, char**);
134extern int chrtoi(const char*);
135extern int eaccess(const char*, int);
136/*
137extern char* fmtbase(long, int, int);
138extern char* fmtbasell(_ast_intmax_t, int, int);
139extern char* fmtbuf(size_t);
140extern char* fmtclock(Sfulong_t);
141extern char* fmtelapsed(unsigned long, int);
142extern char* fmterror(int);
143extern char* fmtesc(const char*);
144extern char* fmtesq(const char*, const char*);
145extern char* fmtident(const char*);
146extern char* fmtip4(unsigned _ast_int4_t, int);
147extern char* fmtfmt(const char*);
148extern char* fmtgid(int);
149extern char* fmtmatch(const char*);
150extern char* fmtmode(int, int);
151extern char* fmtnesq(const char*, const char*, size_t);
152extern char* fmtnum(unsigned long, int);
153extern char* fmtperm(int);
154extern char* fmtquote(const char*, const char*, const char*, size_t, int);
155extern char* fmtre(const char*);
156extern char* fmtscale(Sfulong_t, int);
157extern char* fmtsignal(int);
158extern char* fmttime(const char*, time_t);
159extern char* fmtuid(int);
160extern char* fmtversion(unsigned long);
161*/
162extern void* _ast_memdup(const void*, size_t);
163extern void _ast_memfatal(void);
164extern unsigned int _ast_memhash(const void*, int);
165extern unsigned long memsum(const void*, int, unsigned long);
166extern char* _ast_pathaccess(char*, const char*, const char*, const char*, int);
167extern char* _ast_pathbin(void);
168extern char* _ast_pathcanon(char*, int);
169extern char* _ast_pathcat(char*, const char*, int, const char*, const char*);
170extern int _ast_pathcd(const char*, const char*);
171extern int _ast_pathcheck(const char*, const char*, Pathcheck_t*);
172extern int _ast_pathexists(char*, int);
173extern char* _ast_pathfind(const char*, const char*, const char*, char*, size_t);
174extern int _ast_pathgetlink(const char*, char*, int);
175extern int _ast_pathinclude(const char*);
176extern char* _ast_pathkey(char*, char*, const char*, const char*, const char*);
177extern size_t _ast_pathnative(const char*, char*, size_t);
178extern char* _ast_pathpath(char*, const char*, const char*, int);
179extern size_t _ast_pathposix(const char*, char*, size_t);
180extern char* _ast_pathprobe(char*, char*, const char*, const char*, const char*, int);
181extern char* _ast_pathrepl(char*, const char*, const char*);
182extern int _ast_pathsetlink(const char*, const char*);
183extern char* _ast_pathshell(void);
184extern char* _ast_pathtemp(char*, size_t, const char*, const char*, int*);
185extern char* _ast_pathtmp(char*, const char*, const char*, int*);
186extern char* _ast_setenviron(const char*);
187extern int _ast_stracmp(const char*, const char*);
188extern char* _ast_strcopy(char*, const char*);
189extern unsigned long _ast_strelapsed(const char*, char**, int);
190extern int _ast_stresc(char*);
191extern long _ast_streval(const char*, char**, long(*)(const char*, char**));
192extern long _ast_strexpr(const char*, char**, long(*)(const char*, char**, void*), void*);
193extern int _ast_strgid(const char*);
194extern int _ast_strgrpmatch(const char*, const char*, int*, int, int);
195extern unsigned int strhash(const char*);
196extern void* _ast_strlook(const void*, size_t, const char*);
197extern int _ast_strmatch(const char*, const char*);
198extern int _ast_strmode(const char*);
199extern int _ast_strnacmp(const char*, const char*, size_t);
200extern char* _ast_strncopy(char*, const char*, size_t);
201extern double _ast_strntod(const char*, size_t, char**);
202extern _ast_fltmax_t _ast_strntold(const char*, size_t, char**);
203extern long _ast_strntol(const char*, size_t, char**, int);
204extern _ast_intmax_t _ast_strntoll(const char*, size_t, char**, int);
205extern unsigned long strntoul(const char*, size_t, char**, int);
206extern unsigned _ast_intmax_t strntoull(const char*, size_t, char**, int);
207extern int _ast_stropt(const char*, const void*, int, int(*)(void*, const void*, int, const char*), void*);
208extern int _ast_strperm(const char*, char**, int);
209extern void* _ast_strpsearch(const void*, size_t, size_t, const char*, char**);
210extern void* _ast_strsearch(const void*, size_t, size_t, Strcmp_f, const char*, void*);
211extern void _ast_strsort(char**, int, int(*)(const char*, const char*));
212extern char* _ast_strsubmatch(const char*, const char*, int);
213extern unsigned long _ast_strsum(const char*, unsigned long);
214extern char* _ast_strtape(const char*, char**);
215extern int _ast_strtoip4(const char*, char**, unsigned _ast_int4_t*, unsigned char*);
216extern long _ast_strton(const char*, char**, char*, int);
217extern _ast_intmax_t _ast_strtonll(const char*, char**, char*, int);
218extern int _ast_struid(const char*);
219extern int _ast_struniq(char**, int);
220extern char** environ;
221
222/* tmpastinclude/align.h */
223
224/* tmpastinclude/ast_botch.h */
225
226/* tmpastinclude/ast_ccode.h */
227
228/* tmpastinclude/ast_common.h */
229
230/* tmpastinclude/ast_dir.h */
231
232/* tmpastinclude/ast_dirent.h */
233
234/* tmpastinclude/ast_float.h */
235
236/* tmpastinclude/ast_fs.h */
237extern int fstatvfs(int, struct statvfs*);
238extern int statvfs(const char*, struct statvfs*);
239extern int statvfs64(const char*, struct statvfs64*);
240extern int fstatvfs64(int, struct statvfs64*);
241
242/* tmpastinclude/ast_getopt.h */
243extern int opterr;
244extern int optind;
245extern int optopt;
246extern char* optarg;
247extern int _ast_getopt(int, char* const*, const char*);
248extern int _ast_getsubopt(char**, char* const*, char**);
249
250/* tmpastinclude/ast_hdr.h */
251
252/* tmpastinclude/ast_iconv.h */
253extern _ast_iconv_t _ast_iconv_open(const char*, const char*);
254extern size_t _ast_iconv(_ast_iconv_t, char**, size_t*, char**, size_t*);
255extern int _ast_iconv_close(_ast_iconv_t);
256extern _ast_iconv_list_t* _ast_iconv_list(_ast_iconv_list_t*);
257extern int _ast_iconv_name(const char*, char*, size_t);
258extern ssize_t _ast_iconv_move(_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*);
259extern ssize_t _ast_iconv_write(_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*);
260extern ssize_t _ast_iconv_move(_ast_iconv_t, FILE*, FILE*, size_t, size_t*);
261extern ssize_t _ast_iconv_write(_ast_iconv_t, FILE*, char**, size_t*, size_t*);
262
263/* tmpastinclude/ast_lib.h */
264
265/* tmpastinclude/ast_limits.h */
266
267/* tmpastinclude/ast_mmap.h */
268
269/* tmpastinclude/ast_mode.h */
270
271/* tmpastinclude/ast_nl_types.h */
272extern nl_catd catopen(const char*, int);
273extern char* catgets(nl_catd, int, int, const char*);
274extern int catclose(nl_catd);
275
276/* tmpastinclude/ast_param.h */
277
278/* tmpastinclude/ast_time.h */
279
280/* tmpastinclude/ast_tty.h */
281
282/* tmpastinclude/ast_types.h */
283
284/* tmpastinclude/ast_unistd.h */
285
286/* tmpastinclude/ast_version.h */
287
288/* tmpastinclude/ast_wait.h */
289
290/* tmpastinclude/bytesex.h */
291
292/* tmpastinclude/ccode.h */
293extern unsigned char* _ccmap(int, int);
294extern void* _ccmapcpy(unsigned char*, void*, const void*, size_t);
295extern void* _ccmapstr(unsigned char*, void*, size_t);
296extern int ccmapid(const char*);
297extern char* ccmapname(int);
298extern void* ccnative(void*, const void*, size_t);
299extern Ccmap_t* ccmaplist(Ccmap_t*);
300
301/* tmpastinclude/cdt.h */
302extern Dtmethod_t* Dtset;
303extern Dtmethod_t* Dtbag;
304extern Dtmethod_t* Dtoset;
305extern Dtmethod_t* Dtobag;
306extern Dtmethod_t* Dtlist;
307extern Dtmethod_t* Dtstack;
308extern Dtmethod_t* Dtqueue;
309extern Dtmethod_t* Dtorder;
310extern Dtmethod_t* Dttree;
311extern Dtmethod_t* Dthash;
312extern Dtmethod_t _Dttree;
313extern Dtmethod_t _Dthash;
314extern Dtmethod_t _Dtlist;
315extern Dtmethod_t _Dtqueue;
316extern Dtmethod_t _Dtstack;
317extern Dt_t* dtopen(Dtdisc_t*, Dtmethod_t*);
318extern int dtclose(Dt_t*);
319extern Dt_t* dtview(Dt_t*, Dt_t*);
320extern Dtdisc_t* dtdisc(Dt_t* dt, Dtdisc_t*, int);
321extern Dtmethod_t* dtmethod(Dt_t*, Dtmethod_t*);
322extern Dtlink_t* dtflatten(Dt_t*);
323extern Dtlink_t* dtextract(Dt_t*);
324extern int dtrestore(Dt_t*, Dtlink_t*);
325extern int dttreeset(Dt_t*, int, int);
326extern int dtwalk(Dt_t*, int(*)(Dt_t*,Void_t*,Void_t*), Void_t*);
327extern Void_t* dtrenew(Dt_t*, Void_t*);
328extern int dtsize(Dt_t*);
329extern int dtstat(Dt_t*, Dtstat_t*, int);
330extern unsigned int dtstrhash(unsigned int, Void_t*, int);
331extern int memcmp(const Void_t*, const Void_t*, size_t);
332extern int strcmp(const char*, const char*);
333
334/* tmpastinclude/debug.h */
335extern void systrace(const char*);
336
337/* tmpastinclude/dirent.h */
338
339/* tmpastinclude/dt.h */
340extern Dt_t* dtnew(Vmalloc_t*, Dtdisc_t*, Dtmethod_t*);
341
342/* tmpastinclude/endian.h */
343
344/* tmpastinclude/error.h */
345extern int errno;
346extern Error_info_t error_info;
347extern void error(int, ...);
348extern int errormsg(const char*, int, ...);
349extern int errorf(void*, void*, int, ...);
350extern void errorv(const char*, int, va_list);
351extern char* errorx(const char*, const char*, const char*, const char*);
352extern void liberror(const char*, int, ...);
353extern int libevent(void*, void*, int, ...);
354
355/* tmpastinclude/find.h */
356extern Find_t* findopen(const char*, const char*, const char*, Finddisc_t*);
357extern char* findread(Find_t*);
358extern int findwrite(Find_t*, const char*, size_t, const char*);
359extern int findclose(Find_t*);
360
361/* tmpastinclude/fnmatch.h */
362extern int _ast_fnmatch(const char*, const char*, int);
363
364/* tmpastinclude/fnv.h */
365
366/* tmpastinclude/fs3d.h */
367extern int mount(const char*, char*, int, void*);
368extern int fs3d(int);
369extern char* pathnext(char*, char*, long*);
370
371/* tmpastinclude/fts.h */
372extern FTSENT* _ast_fts_children(FTS*, int);
373extern int _ast_fts_close(FTS*);
374extern int _ast_fts_flags(void);
375extern int _ast_fts_notify(int(*)(FTS*, FTSENT*, void*), void*);
376extern FTS* _ast_fts_open(char* const*, int, int(*)(FTSENT* const*, FTSENT* const*));
377extern FTSENT* _ast_fts_read(FTS*);
378extern int _ast_fts_set(FTS*, FTSENT*, int);
379
380/* tmpastinclude/ftw.h */
381extern int _ast_ftw(const char*, int(*)(const char*, const struct stat*, int), int);
382extern int _ast_nftw(const char*, int(*)(const char*, const struct stat*, int, struct FTW*), int, int);
383
384/* tmpastinclude/getopt.h */
385extern int getopt_long(int, char* const*, const char*, const struct option*, int*);
386extern int getopt_long_only(int, char* const*, const char*, const struct option*, int*);
387
388/* tmpastinclude/glob.h */
389extern int _ast_glob(const char*, int, int(*)(const char*,int), glob_t*);
390extern void _ast_globfree(glob_t*);
391
392/* tmpastinclude/hash.h */
393extern Hash_table_t* hashalloc(Hash_table_t*, ...);
394extern void hashdone(Hash_position_t*);
395extern void hashdump(Hash_table_t*, int);
396extern Hash_table_t* hashfree(Hash_table_t*);
397extern Hash_bucket_t* hashlast(Hash_table_t*);
398extern char* hashlook(Hash_table_t*, const char*, long, const char*);
399extern Hash_bucket_t* hashnext(Hash_position_t*);
400extern Hash_position_t* hashscan(Hash_table_t*, int);
401extern void hashsize(Hash_table_t*, int);
402extern Hash_table_t* hashview(Hash_table_t*, Hash_table_t*);
403extern int hashwalk(Hash_table_t*, int, int (*)(const char*, char*, void*), void*);
404
405/* tmpastinclude/hashkey.h */
406extern long _ast_strkey(const char*);
407
408/* tmpastinclude/hashpart.h */
409
410/* tmpastinclude/iconv.h */
411
412/* tmpastinclude/lc.h */
413extern size_t lccanon(Lc_t*, unsigned long flags, char*, size_t);
414extern Lc_category_t* lccategories(void);
415extern int lcindex(int, int);
416extern Lc_info_t* lcinfo(int);
417extern Lc_t* lcmake(const char*);
418extern Lc_t* lcscan(Lc_t*);
419
420/* tmpastinclude/limits.h */
421
422/* tmpastinclude/ls.h */
423extern int chmod(const char*, _AST_mode_t);
424extern int fstat(int, struct stat*);
425extern int lstat(const char*, struct stat*);
426extern int mkdir(const char*, _AST_mode_t);
427extern int mkfifo(const char*, _AST_mode_t);
428extern int mknod(const char*, _AST_mode_t, dev_t);
429extern int stat(const char*, struct stat*);
430extern _AST_mode_t umask(_AST_mode_t);
431extern off_t _iblocks(struct stat*);
432extern char* fmtdev(struct stat*);
433extern char* fmtfs(struct stat*);
434extern char* fmtls(char*, const char*, struct stat*, const char*, const char*, int);
435extern int _ast_pathstat(const char*, struct stat*);
436
437/* tmpastinclude/magic.h */
438extern Magic_t* magicopen(Magicdisc_t*);
439extern int magicload(Magic_t*, const char*, unsigned long);
440extern int magiclist(Magic_t*, Sfio_t*);
441extern char* magictype(Magic_t*, Sfio_t*, const char*, struct stat*);
442extern int magicclose(Magic_t*);
443
444/* tmpastinclude/magicid.h */
445
446/* tmpastinclude/mc.h */
447extern char* mcfind(char*, const char*, const char*, int, int);
448extern Mc_t* mcopen(Sfio_t*);
449extern char* mcget(Mc_t*, int, int, const char*);
450extern int mcput(Mc_t*, int, int, const char*);
451extern int mcdump(Mc_t*, Sfio_t*);
452extern int mcindex(const char*, char**, int*, int*);
453extern int mcclose(Mc_t*);
454
455/* tmpastinclude/mime.h */
456extern Mime_t* mimeopen(Mimedisc_t*);
457extern int mimeload(Mime_t*, const char*, unsigned long);
458extern int mimelist(Mime_t*, Sfio_t*, const char*);
459extern int mimeclose(Mime_t*);
460extern int mimeset(Mime_t*, char*, unsigned long);
461extern char* mimetype(Mime_t*, Sfio_t*, const char*, struct stat*);
462extern char* mimeview(Mime_t*, const char*, const char*, const char*, const char*);
463extern int mimehead(Mime_t*, void*, size_t, size_t, char*);
464extern int mimecmp(const char*, const char*, char**);
465
466/* tmpastinclude/mnt.h */
467extern void* mntopen(const char*, const char*);
468extern Mnt_t* mntread(void*);
469extern int mntwrite(void*, const Mnt_t*);
470extern int mntclose(void*);
471
472/* tmpastinclude/modecanon.h */
473
474/* tmpastinclude/namval.h */
475
476/* tmpastinclude/nl_types.h */
477
478/* tmpastinclude/option.h */
479extern Opt_t opt_info;
480extern int _ast_optget(char**, const char*);
481extern int _ast_optjoin(char**, ...);
482extern char* _ast_opthelp(const char*, const char*);
483extern char* _ast_optusage(const char*);
484extern int _ast_optstr(const char*, const char*);
485extern int _ast_optesc(Sfio_t*, const char*, int);
486
487/* tmpastinclude/preroot.h */
488
489/* tmpastinclude/proc.h */
490extern int _ast_procclose(Proc_t*);
491extern int _ast_procfree(Proc_t*);
492extern Proc_t* _ast_procopen(const char*, char**, char**, long*, long);
493extern int _ast_procrun(const char*, char**);
494
495/* tmpastinclude/re_comp.h */
496extern char* _ast_re_comp(const char*);
497extern int _ast_re_exec(const char*);
498
499/* tmpastinclude/recfmt.h */
500extern char* fmtrec(Recfmt_t, int);
501extern Recfmt_t recfmt(const void*, size_t, off_t);
502extern Recfmt_t recstr(const char*, char**);
503extern ssize_t reclen(Recfmt_t, const void*, size_t);
504
505/* tmpastinclude/regex.h */
506extern int _ast_regcomp(regex_t*, const char*, regflags_t);
507extern size_t _ast_regerror(int, const regex_t*, char*, size_t);
508extern int _ast_regexec(const regex_t*, const char*, size_t, regmatch_t*, regflags_t);
509extern void _ast_regfree(regex_t*);
510extern regclass_t _ast_regclass(const char*, char**);
511extern int _ast_regaddclass(const char*, regclass_t);
512extern int _ast_regcollate(const char*, char**, char*, int);
513extern int _ast_regcomb(regex_t*, regex_t*);
514extern int _ast_regdup(regex_t*, regex_t*);
515extern int _ast_regncomp(regex_t*, const char*, size_t, regflags_t);
516extern int _ast_regnexec(const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t);
517extern void _ast_regfatal(regex_t*, int, int);
518extern void _ast_regfatalpat(regex_t*, int, int, const char*);
519extern int _ast_regrecord(const regex_t*);
520extern int _ast_regrexec(const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t, regflags_t, void*, regrecord_t);
521extern regstat_t* _ast_regstat(const regex_t*);
522extern regex_t* _ast_regcache(const char*, regflags_t, int*);
523extern int _ast_regsubcomp(regex_t*, const char*, const regflags_t*, int, regflags_t);
524extern int _ast_regsubexec(const regex_t*, const char*, size_t, regmatch_t*);
525extern int _ast_regsubflags(regex_t*, const char*, char**, int, const regflags_t*, int*, regflags_t*);
526extern void _ast_regsubfree(regex_t*);
527extern void _ast_regalloc(void*, regresize_t, regflags_t);
528extern int _ast_regsub(const regex_t*, struct _sfio_s*, const char*, const char*, size_t, regmatch_t*, regflags_t);
529
530/* tmpastinclude/regexp.h */
531extern int _re_comp(regexp_t*, const char*, char*, unsigned int);
532extern int _re_exec(regexp_t*, const char*, const char*, int);
533extern char* _re_putc(int);
534extern char* _re_read(regexp_t*, const char*, char*, const char*, int);
535
536/* tmpastinclude/sfdisc.h */
537extern int sfkeyprintf(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t);
538extern int sfkeyprintf(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t);
539extern int sfdcdio(Sfio_t*, size_t);
540extern int sfdcdos(Sfio_t*);
541extern int sfdcfilter(Sfio_t*, const char*);
542extern int sfdcmore(Sfio_t*, const char*, int, int);
543extern int sfdcprefix(Sfio_t*, const char*);
544extern int sfdcseekable(Sfio_t*);
545extern int sfdcslow(Sfio_t*);
546extern int sfdctee(Sfio_t*, Sfio_t*);
547extern int sfdcunion(Sfio_t*, Sfio_t**, int);
548extern Sfio_t* sfdcsubstream(Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t);
549
550/* tmpastinclude/sfio_s.h */
551
552/* tmpastinclude/sfio_t.h */
553
554/* tmpastinclude/sig.h */
555extern int kill(pid_t, int);
556extern int killpg(pid_t, int);
557extern Sig_info_t sig_info;
558extern int sigcritical(int);
559extern int sigunblock(int);
560
561/* tmpastinclude/stack.h */
562extern STACK stackalloc(int, void*);
563extern void stackfree(STACK);
564extern void stackclear(STACK);
565extern void* stackget(STACK);
566extern int stackpush(STACK, void*);
567extern int stackpop(STACK);
568extern void stacktell(STACK, int, STACKPOS*);
569
570/* tmpastinclude/stak.h */
571
572/* tmpastinclude/stk.h */
573extern Sfio_t _Stk_data;
574extern Stk_t* stkopen(int);
575extern Stk_t* stkinstall(Stk_t*, char*(*)(int));
576extern int stkclose(Stk_t*);
577extern int stklink(Stk_t*);
578extern char* stkalloc(Stk_t*, unsigned);
579extern char* stkcopy(Stk_t*,const char*);
580extern char* stkset(Stk_t*, char*, unsigned);
581extern char* _stkseek(Stk_t*, unsigned);
582extern char* stkfreeze(Stk_t*, unsigned);
583
584/* tmpastinclude/swap.h */
585extern void*	swapmem (int, const void*, void*, size_t);
586extern intmax_t swapget (int, const void*, int);
587extern void*	swapput (int, void*, int, intmax_t);
588extern int	swapop (const void*, const void*, int);
589
590/* tmpastinclude/tar.h */
591
592/* tmpastinclude/times.h */
593extern int _ast_touch(const char*, time_t, time_t, int);
594
595/* tmpastinclude/tm.h */
596extern Tm_data_t tm_data;
597extern Tm_info_t tm_info;
598extern time_t tmdate(const char*, char**, time_t*);
599extern int tmequiv(Tm_t*);
600extern Tm_t* tmfix(Tm_t*);
601extern char* tmfmt(char*, size_t, const char*, time_t*);
602extern char* tmform(char*, const char*, time_t*);
603extern int tmgoff(const char*, char**, int);
604extern void tminit(Tm_zone_t*);
605extern time_t tmleap(time_t*);
606extern int tmlex(const char*, char**, char**, int, char**, int);
607extern char** tmlocale(void);
608extern Tm_t* tmmake(time_t*);
609extern char* tmpoff(char*, size_t, const char*, int, int);
610extern time_t tmscan(const char*, char**, const char*, char**, time_t*, long);
611extern int tmsleep(time_t, time_t);
612extern time_t tmtime(Tm_t*, int);
613extern Tm_zone_t* tmtype(const char*, char**);
614extern int tmweek(Tm_t*, int, int, int);
615extern int tmword(const char*, char**, const char*, char**, int);
616extern Tm_zone_t* tmzone(const char*, char**, const char*, int*);
617
618/* tmpastinclude/tmx.h */
619extern Time_t tmxdate(const char*, char**, Time_t);
620extern char* tmxfmt(char*, size_t, const char*, Time_t);
621extern Time_t tmxleap(Time_t);
622extern Tm_t* tmxmake(Time_t);
623extern Time_t tmxscan(const char*, char**, const char*, char**, Time_t, long);
624extern int tmxsleep(Time_t);
625extern Time_t tmxtime(Tm_t*, int);
626extern Time_t tmxgettime(void);
627extern int tmxsettime(Time_t);
628extern int tmxtouch(const char*, Time_t, Time_t, Time_t, int);
629extern char* fmttmx(const char*, Time_t);
630
631/* tmpastinclude/tok.h */
632extern Sfio_t* tokline(const char*, int, int*);
633extern int tokscan(char*, char**, const char*, ...);
634extern char* tokopen(char*, int);
635extern void tokclose(char*);
636extern char* tokread(char*);
637
638/* tmpastinclude/tv.h */
639extern int tvgettime(Tv_t*);
640extern int tvsettime(const Tv_t*);
641extern int tvcmp(const Tv_t*, const Tv_t*);
642extern int tvtouch(const char*, const Tv_t*, const Tv_t*, const Tv_t*, int);
643extern int tvsleep(const Tv_t*, Tv_t*);
644extern char* fmttv(const char*, Tv_t*);
645
646/* tmpastinclude/usage.h */
647
648/* tmpastinclude/vdb.h */
649
650/* tmpastinclude/vecargs.h */
651extern int vecargs(char**, int*, char***);
652extern char** vecfile(const char*);
653extern void vecfree(char**, int);
654extern char** vecload(char*);
655extern char** vecstring(const char*);
656
657/* tmpastinclude/wchar.h */
658
659/* tmpastinclude/wordexp.h */
660extern int _ast_wordexp(const char*, wordexp_t*, int);
661extern int _ast_wordfree(wordexp_t*);
662/* end of automatically generated data */
663