aboutsummaryrefslogtreecommitdiff
path: root/bin/sh
diff options
context:
space:
mode:
authorSteve Price <steve@FreeBSD.org>1997-04-28 03:10:31 +0000
committerSteve Price <steve@FreeBSD.org>1997-04-28 03:10:31 +0000
commit62730a71b93a22630a938878f24640a05c4876e4 (patch)
tree39b1e8803c58cd0d20273a3d78530e4ba65af02d /bin/sh
parent76ad65f7f6f6a8d06d12e3de926077a418c14fef (diff)
downloadsrc-62730a71b93a22630a938878f24640a05c4876e4.tar.gz
src-62730a71b93a22630a938878f24640a05c4876e4.zip
When NO_HISTORY is defined and the history command is used
show an error message. Inspired by: NetBSD
Notes
Notes: svn path=/head/; revision=25224
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/histedit.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c
index 5605d13bbb28..541a6ebed77a 100644
--- a/bin/sh/histedit.c
+++ b/bin/sh/histedit.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: histedit.c,v 1.9 1997/02/22 13:58:27 peter Exp $
+ * $Id: histedit.c,v 1.10 1997/03/28 15:24:38 imp Exp $
*/
#ifndef lint
@@ -57,7 +57,6 @@ static char const sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95";
#include "mystring.h"
#ifndef NO_HISTORY
#include "myhistedit.h"
-#endif
#include "error.h"
#include "eval.h"
#include "memalloc.h"
@@ -420,7 +419,7 @@ not_fcnumber(s)
char *s;
{
if (s == NULL)
- return (1);
+ return (0);
if (*s == '-')
s++;
return (!is_number(s));
@@ -475,3 +474,17 @@ str_to_event(str, last)
}
return (he->num);
}
+#else
+#include "error.h"
+
+int
+histcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ error("not compiled with history support");
+ /*NOTREACHED*/
+ return (0);
+}
+#endif