summaryrefslogtreecommitdiffstats
path: root/bin/sh/parser.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-09-01 10:22:36 +0000
committerpeter <peter@FreeBSD.org>1996-09-01 10:22:36 +0000
commit5195be912eb257c05a0c97e561e72f01af2583ff (patch)
treee47ab3981b495c675a987dd1e943d1f4c823f314 /bin/sh/parser.h
parent2fc7d7d1fa299368ccdddede67b31695266698bd (diff)
downloadFreeBSD-src-5195be912eb257c05a0c97e561e72f01af2583ff.zip
FreeBSD-src-5195be912eb257c05a0c97e561e72f01af2583ff.tar.gz
Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a
merge of parallel duplicate work by Steve Price and myself. :-] There are some changes to the build that are my fault... mkinit.c was trying (poorly) to duplicate some of the work that make(1) is designed to do. The Makefile hackery is my fault too, the depend list was incomplete because of some explicit OBJS+= entries, so mkdep wasn't picking up their source file #includes. This closes a pile of /bin/sh PR's, but not all of them.. Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter
Diffstat (limited to 'bin/sh/parser.h')
-rw-r--r--bin/sh/parser.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/bin/sh/parser.h b/bin/sh/parser.h
index 7408bd7..4bc1e9e 100644
--- a/bin/sh/parser.h
+++ b/bin/sh/parser.h
@@ -33,8 +33,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)parser.h 8.1 (Berkeley) 5/31/93
- * $Id$
+ * @(#)parser.h 8.3 (Berkeley) 5/4/95
+ * $Id: parser.h,v 1.2 1994/09/24 02:58:09 davidg Exp $
*/
/* control characters in argument strings */
@@ -48,16 +48,21 @@
#define CTLENDARI '\207'
/* variable substitution byte (follows CTLVAR) */
-#define VSTYPE 07 /* type of variable substitution */
-#define VSNUL 040 /* colon--treat the empty string as unset */
-#define VSQUOTE 0100 /* inside double quotes--suppress splitting */
+#define VSTYPE 0x0f /* type of variable substitution */
+#define VSNUL 0x10 /* colon--treat the empty string as unset */
+#define VSQUOTE 0x80 /* inside double quotes--suppress splitting */
/* values of VSTYPE field */
-#define VSNORMAL 1 /* normal variable: $var or ${var} */
-#define VSMINUS 2 /* ${var-text} */
-#define VSPLUS 3 /* ${var+text} */
-#define VSQUESTION 4 /* ${var?message} */
-#define VSASSIGN 5 /* ${var=text} */
+#define VSNORMAL 0x1 /* normal variable: $var or ${var} */
+#define VSMINUS 0x2 /* ${var-text} */
+#define VSPLUS 0x3 /* ${var+text} */
+#define VSQUESTION 0x4 /* ${var?message} */
+#define VSASSIGN 0x5 /* ${var=text} */
+#define VSTRIMLEFT 0x6 /* ${var#pattern} */
+#define VSTRIMLEFTMAX 0x7 /* ${var##pattern} */
+#define VSTRIMRIGHT 0x8 /* ${var%pattern} */
+#define VSTRIMRIGHTMAX 0x9 /* ${var%%pattern} */
+#define VSLENGTH 0xa /* ${#var} */
/*
@@ -70,12 +75,7 @@ extern int tokpushback;
extern int whichprompt; /* 1 == PS1, 2 == PS2 */
-#ifdef __STDC__
-union node *parsecmd(int);
-int goodname(char *);
-char *getprompt(void *);
-#else
-union node *parsecmd();
-int goodname();
-char *getprompt();
-#endif
+union node *parsecmd __P((int));
+void fixredir __P((union node *, const char *, int));
+int goodname __P((char *));
+char *getprompt __P((void *));
OpenPOWER on IntegriCloud