summaryrefslogtreecommitdiffstats
path: root/bin/sh/histedit.c
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1997-04-28 03:10:31 +0000
committersteve <steve@FreeBSD.org>1997-04-28 03:10:31 +0000
commit101652d62132008837e3506320d3da66eda40f91 (patch)
tree038edaf23f4a2a883b3def66e1c90f6b83bb8ac0 /bin/sh/histedit.c
parentd13866ebb9d6af93bc306edabc7eb8fb942e75d0 (diff)
downloadFreeBSD-src-101652d62132008837e3506320d3da66eda40f91.zip
FreeBSD-src-101652d62132008837e3506320d3da66eda40f91.tar.gz
When NO_HISTORY is defined and the history command is used
show an error message. Inspired by: NetBSD
Diffstat (limited to 'bin/sh/histedit.c')
-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 5605d13..541a6eb 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
OpenPOWER on IntegriCloud