summary refs log tree commit diff
diff options
context:
space:
mode:
authorherbert <herbert@gondor.apana.org.au>2005-02-28 21:47:22 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2005-09-26 18:33:04 +1000
commit25c3f7b660bbed01a81b44690de1e89c4086b069 (patch)
tree9cc2c1164e2e16b39570fde537753a312e6d1301
parentOnly set skipcount for break and continue. (diff)
downloaddash-25c3f7b660bbed01a81b44690de1e89c4086b069.tar.gz
dash-25c3f7b660bbed01a81b44690de1e89c4086b069.zip
Removed expcmd built-in.
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--src/arith.y40
-rw-r--r--src/builtins.def1
3 files changed, 1 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index 13fc33f..41d99b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
 	* Replaced EXEVAL with SKIPEVAL.
 	* Update funcnest atomically.
 	* Only set skipcount for break and continue.
+	* Removed expcmd built-in.
 
 2005-02-28  A Costa <agcosta@gis.net>
 
diff --git a/src/arith.y b/src/arith.y
index be836c8..35d012d 100644
--- a/src/arith.y
+++ b/src/arith.y
@@ -137,46 +137,6 @@ arith(s)
 }
 
 
-/*
- *  The exp(1) builtin.
- */
-int
-expcmd(argc, argv)
-	int argc;
-	char **argv;
-{
-	const char *p;
-	char *concat;
-	char **ap;
-	long i;
-
-	if (argc > 1) {
-		p = argv[1];
-		if (argc > 2) {
-			/*
-			 * concatenate arguments
-			 */
-			STARTSTACKSTR(concat);
-			ap = argv + 2;
-			for (;;) {
-				while (*p)
-					STPUTC(*p++, concat);
-				if ((p = *ap++) == NULL)
-					break;
-				STPUTC(' ', concat);
-			}
-			STPUTC('\0', concat);
-			p = grabstackstr(concat);
-		}
-	} else
-		p = nullstr;
-
-	i = arith(p);
-
-	out1fmt("%ld\n", i);
-	return (! i);
-}
-
 /*************************/
 #ifdef TEST_ARITH
 #include <stdio.h>
diff --git a/src/builtins.def b/src/builtins.def
index 2fa6d5b..1f8c4f4 100644
--- a/src/builtins.def
+++ b/src/builtins.def
@@ -59,7 +59,6 @@ echocmd		echo
 evalcmd		-s eval
 execcmd		-s exec
 exitcmd		-s exit
-expcmd		exp let
 exportcmd	-as export -as readonly
 falsecmd	-u false
 histcmd -h	-u fc