summaryrefslogtreecommitdiff
path: root/src/cmd/ksh93/include/regress.h
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-06-24 22:28:35 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-06-24 22:28:35 +0000
commit3950ffe2a485479f6561c27364d3d7df5a21d124 (patch)
tree468c6e14449d1b1e279222ec32f676b0311917d2 /src/cmd/ksh93/include/regress.h
downloadksh-upstream.tar.gz
Imported Upstream version 93u+upstream
Diffstat (limited to 'src/cmd/ksh93/include/regress.h')
-rw-r--r--src/cmd/ksh93/include/regress.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/cmd/ksh93/include/regress.h b/src/cmd/ksh93/include/regress.h
new file mode 100644
index 0000000..83c1824
--- /dev/null
+++ b/src/cmd/ksh93/include/regress.h
@@ -0,0 +1,66 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* David Korn <dgk@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * David Korn
+ * AT&T Labs
+ *
+ * Shell interface private definitions
+ *
+ */
+
+#ifndef _REGRESS_H
+#define _REGRESS_H 1
+
+#if SHOPT_REGRESS
+
+typedef struct Regress_s
+{
+ Shopt_t options;
+} Regress_t;
+
+#define sh_isregress(r) is_option(&sh.regress->options,r)
+#define sh_onregress(r) on_option(&sh.regress->options,r)
+#define sh_offregress(r) off_option(&sh.regress->options,r)
+
+#define REGRESS(r,i,f) do { if (sh_isregress(REGRESS_##r)) sh_regress(REGRESS_##r, i, sfprints f, __LINE__, __FILE__); } while (0)
+
+#define REGRESS_egid 1
+#define REGRESS_euid 2
+#define REGRESS_p_suid 3
+#define REGRESS_source 4
+#define REGRESS_etc 5
+
+#undef SHOPT_P_SUID
+#define SHOPT_P_SUID sh_regress_p_suid(__LINE__, __FILE__)
+
+extern int b___regress__(int, char**, Shbltin_t*);
+extern void sh_regress_init(Shell_t*);
+extern void sh_regress(unsigned int, const char*, const char*, unsigned int, const char*);
+extern uid_t sh_regress_p_suid(unsigned int, const char*);
+extern char* sh_regress_etc(const char*, unsigned int, const char*);
+
+#else
+
+#define REGRESS(r,i,f)
+
+#endif /* SHOPT_REGRESS */
+
+#endif /* _REGRESS_H */