2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: path.h /main/3 1995/11/01 16:42:10 rswiston $ */
24 /***************************************************************
26 * AT&T - PROPRIETARY *
28 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF *
29 * AT&T BELL LABORATORIES *
30 * AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN *
31 * ACCORDANCE WITH APPLICABLE AGREEMENTS *
33 * Copyright (c) 1995 AT&T Corp. *
34 * Unpublished & Not for Publication *
35 * All Rights Reserved *
37 * The copyright notice above does not evidence any *
38 * actual or intended publication of such source code *
40 * This software was created by the *
41 * Advanced Software Technology Department *
42 * AT&T Bell Laboratories *
44 * For further information contact *
45 * {research,attmail}!dgk *
47 ***************************************************************/
49 /* : : generated by proto : : */
52 #if !defined(__PROTO__)
53 #if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
54 #if defined(__cplusplus)
55 #define __MANGLE__ "C"
60 #define __PROTO__(x) x
62 #define __PARAM__(n,o) n
63 #if !defined(__STDC__) && !defined(__cplusplus)
64 #if !defined(c_plusplus)
75 #define __PROTO__(x) ()
76 #define __OTORP__(x) x
77 #define __PARAM__(n,o) o
85 #if defined(__cplusplus) || defined(c_plusplus)
86 #define __VARARG__ ...
90 #if defined(__STDARG__)
91 #define __VA_START__(p,a) va_start(p,a)
93 #define __VA_START__(p,a) va_start(p)
99 * UNIX shell path handling interface
100 * Written by David Korn
101 * These are the definitions for the lexical analyzer
104 #include "FEATURE/options"
107 #define PATH_OFFSET 2 /* path offset for path_join */
108 #define MAXDEPTH (32*sizeof(int)) /* maximum levels of recursion */
112 /* pathname handling routines */
113 extern __MANGLE__ void path_alias __PROTO__((Namval_t*,char*));
114 extern __MANGLE__ char *path_absolute __PROTO__((const char*,const char*));
115 extern __MANGLE__ char *path_basename __PROTO__((const char*));
116 extern __MANGLE__ int path_expand __PROTO__((const char*, struct argnod**));
117 extern __MANGLE__ void path_exec __PROTO__((const char*,char*[],struct argnod*));
118 extern __MANGLE__ int path_open __PROTO__((const char*,char*));
119 extern __MANGLE__ char *path_get __PROTO__((const char*));
120 extern __MANGLE__ char *path_join __PROTO__((char*,const char*));
121 extern __MANGLE__ char *path_pwd __PROTO__((int));
122 extern __MANGLE__ int path_search __PROTO__((const char*,const char*,int));
123 extern __MANGLE__ char *path_relative __PROTO__((const char*));
124 extern __MANGLE__ int path_complete __PROTO__((const char*, const char*,struct argnod**));
125 #ifdef SHOPT_BRACEPAT
126 extern __MANGLE__ int path_generate __PROTO__((struct argnod*,struct argnod**));
127 #endif /* SHOPT_BRACEPAT */
129 /* constant strings needed for whence */
130 extern __MANGLE__ const char e_real[];
131 extern __MANGLE__ const char e_user[];
132 extern __MANGLE__ const char e_sys[];
133 extern __MANGLE__ const char e_dot[];
134 extern __MANGLE__ const char e_pwd[];
135 extern __MANGLE__ const char e_logout[];
136 extern __MANGLE__ const char e_alphanum[];
137 extern __MANGLE__ const char e_mailmsg[];
138 extern __MANGLE__ const char e_suidprofile[];
139 extern __MANGLE__ const char e_sysprofile[];
140 extern __MANGLE__ const char e_traceprompt[];
141 extern __MANGLE__ const char e_crondir[];
142 #ifdef SHOPT_SUID_EXEC
143 extern __MANGLE__ const char e_suidexec[];
144 #endif /* SHOPT_SUID_EXEC */
146 extern __MANGLE__ const char e_vpix[];
147 extern __MANGLE__ const char e_vpixdir[];
148 #endif /* SHOPT_VPIX */
149 extern __MANGLE__ const char is_[];
150 extern __MANGLE__ const char is_alias[];
151 extern __MANGLE__ const char is_builtin[];
152 extern __MANGLE__ const char is_builtver[];
153 extern __MANGLE__ const char is_reserved[];
154 extern __MANGLE__ const char is_talias[];
155 extern __MANGLE__ const char is_xalias[];
156 extern __MANGLE__ const char is_function[];
157 extern __MANGLE__ const char is_xfunction[];
158 extern __MANGLE__ const char is_ufunction[];
160 extern __MANGLE__ const char e_prohibited[];
161 #endif /* SHELLMAGIC */
164 # include "FEATURE/acct"
166 extern __MANGLE__ void sh_accinit __PROTO__((void));
167 extern __MANGLE__ void sh_accbegin __PROTO__((const char*));
168 extern __MANGLE__ void sh_accend __PROTO__((void));
169 extern __MANGLE__ void sh_accsusp __PROTO__((void));
172 # endif /* _sys_acct */
173 #endif /* SHOPT_ACCT */
175 #endif /*! PATH_OFFSET */