xref: /titanic_44/usr/src/lib/libshell/common/llib-lshell (revision d0538f66491267879b7418b21ad78e3dcc2dcc83)
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/libshell/common/llib-lshell
26 *
27 */
28
29#pragma ident	"%Z%%M%	%I%	%E% SMI"
30
31/*LINTLIBRARY*/
32/*PROTOLIB1*/
33
34#include <shell.h>
35#include <nval.h>
36
37/* automatically generated data start here */
38extern const char e_defpath[];
39extern const char e_found[];
40extern const char e_nospace[];
41extern const char e_format[];
42extern const char e_number[];
43extern const char e_restricted[];
44extern const char e_recursive[];
45extern char e_version[];
46extern Dt_t *sh_bltin_tree (void);
47extern void sh_subfork (void);
48extern Shell_t *sh_init (int,char*[],Shinit_f);
49extern int sh_reinit (char*[]);
50extern int sh_eval (Sfio_t*,int);
51extern void sh_delay (double);
52extern void *sh_parse (Shell_t*, Sfio_t*,int);
53extern int sh_trap (const char*,int);
54extern int sh_fun (Namval_t*,Namval_t*, char*[]);
55extern int sh_funscope (int,char*[],int(*)(void*),void*,int);
56extern Sfio_t *sh_iogetiop (int,int);
57extern int sh_main (int, char*[], void(*)(int));
58extern void sh_menu (Sfio_t*, int, char*[]);
59extern Namval_t *sh_addbuiltin (const char*, int(*)(int, char*[],void*), void*);
60extern char *sh_fmtq (const char*);
61extern char *sh_fmtqf (const char*, int, int);
62extern Sfdouble_t sh_strnum (const char*, char**, int);
63extern int sh_access (const char*,int);
64extern int sh_close (int);
65extern int sh_dup (int);
66extern void sh_exit (int);
67extern int sh_fcntl (int, int, ...);
68extern Sfio_t *sh_fd2sfio (int);
69extern Shell_t *sh_getinterp (void);
70extern int sh_open (const char*, int, ...);
71extern int sh_openmax (void);
72extern Sfio_t *sh_pathopen (const char*);
73extern ssize_t sh_read (int, void*, size_t);
74extern ssize_t sh_write (int, const void*, size_t);
75extern off_t sh_seek (int, off_t, int);
76extern int sh_pipe (int[]);
77extern mode_t sh_umask (mode_t);
78extern void *sh_waitnotify (Shwait_f);
79extern Shscope_t *sh_getscope (int,int);
80extern Shscope_t *sh_setscope (Shscope_t*);
81extern void sh_sigcheck (void);
82extern unsigned long sh_isoption (int);
83extern unsigned long sh_onoption (int);
84extern unsigned long sh_offoption (int);
85extern int sh_waitsafe (void);
86extern int sh_exec (const Shnode_t*,int);
87extern int sh_waitsafe(void);
88extern int sh_exec(const Shnode_t*,int);
89extern void **sh_getliblist(void);
90extern Shell_t sh;
91extern Namarr_t *nv_setarray (Namval_t*,void*(*)(Namval_t*,const char*,int));
92extern void *nv_associative (Namval_t*,const char*,int);
93extern int nv_aindex (Namval_t*);
94extern int nv_nextsub (Namval_t*);
95extern char *nv_getsub (Namval_t*);
96extern Namval_t *nv_putsub (Namval_t*, char*, long);
97extern Namval_t *nv_opensub (Namval_t*);
98extern int nv_adddisc (Namval_t*, const char**, Namval_t**);
99extern int nv_clone (Namval_t*, Namval_t*, int);
100extern void nv_close (Namval_t*);
101extern void *nv_context (Namval_t*);
102extern Namval_t *nv_create (const char*, Dt_t*, int,Namfun_t*);
103extern Dt_t *nv_dict (Namval_t*);
104extern Sfdouble_t nv_getn (Namval_t*, Namfun_t*);
105extern Sfdouble_t nv_getnum (Namval_t*);
106extern char *nv_getv (Namval_t*, Namfun_t*);
107extern char *nv_getval (Namval_t*);
108extern Namfun_t *nv_hasdisc (Namval_t*, const Namdisc_t*);
109extern int nv_isnull (Namval_t*);
110extern Namval_t *nv_lastdict (void);
111extern void nv_newattr (Namval_t*,unsigned,int);
112extern Namval_t *nv_open (const char*,Dt_t*,int);
113extern void nv_putval (Namval_t*,const char*,int);
114extern void nv_putv (Namval_t*,const char*,int,Namfun_t*);
115extern int nv_scan (Dt_t*,void(*)(Namval_t*,void*),void*,int,int);
116extern Namval_t *nv_scoped (Namval_t*);
117extern char *nv_setdisc (Namval_t*,const char*,Namval_t*,Namfun_t*);
118extern void nv_setref (Namval_t*, Dt_t*,int);
119extern int nv_settype (Namval_t*, Namval_t*, int);
120extern void nv_setvec (Namval_t*,int,int,char*[]);
121extern void nv_setvtree (Namval_t*);
122extern int nv_setsize (Namval_t*,int);
123extern Namfun_t *nv_disc (Namval_t*,Namfun_t*,int);
124extern void nv_unset (Namval_t*);
125extern Namval_t *nv_search (const char *, Dt_t*, int);
126extern void nv_unscope (void);
127extern char *nv_name (Namval_t*);
128extern Namval_t *nv_type (Namval_t*);
129extern const Namdisc_t *nv_discfun (int);
130/* end of automatically generated data */
131
132/* Manually added based on libshell/common/include/builtins.h */
133extern int b_printf(int, char*[],void*);
134extern int B_echo(int, char*[],void*);
135extern int b_print(int, char*[],void*);
136extern int b_pwd(int, char*[],void*);
137extern int b_sleep(int, char*[],void*);
138extern int b_test(int, char*[],void*);
139