summaryrefslogtreecommitdiff
path: root/usr.bin/dc
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2015-10-03 16:24:54 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2015-10-03 16:24:54 +0000
commita39c4dc7683c7cd58030627f42df14ec85187412 (patch)
treef7109a4197ba11c06facc7cb293d45717249ed96 /usr.bin/dc
parent693f3dae9d42f618ac1eb6c6cb40f2c89d777aa2 (diff)
disable ! command, makes dc(1) more tameable
Diffstat (limited to 'usr.bin/dc')
-rw-r--r--usr.bin/dc/bcode.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index 64bb41efd5f..d54fe632c75 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcode.c,v 1.47 2015/02/16 20:53:34 jca Exp $ */
+/* $OpenBSD: bcode.c,v 1.48 2015/10/03 16:24:53 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -87,7 +87,6 @@ static void num_digits(void);
static void to_ascii(void);
static void push_line(void);
static void comment(void);
-static void bexec(char *);
static void badd(void);
static void bsub(void);
static void bmul(void);
@@ -932,13 +931,6 @@ comment(void)
}
static void
-bexec(char *line)
-{
- (void)system(line);
- free(line);
-}
-
-static void
badd(void)
{
struct number *a, *b;
@@ -1434,7 +1426,7 @@ not_compare(void)
break;
default:
unreadch();
- bexec(readline());
+ (void)fprintf(stderr, "! command is deprecated\n");
break;
}
}