aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unprotbas.12
-rw-r--r--unprotbas.c5
-rw-r--r--unprotbas.rst2
3 files changed, 6 insertions, 3 deletions
diff --git a/unprotbas.1 b/unprotbas.1
index 33afa02..6f1fa8f 100644
--- a/unprotbas.1
+++ b/unprotbas.1
@@ -170,7 +170,7 @@ a new one that\(aqs valid. However, since there are no real variable
names in the program, the recovery process just invents new ones,
named A through Z, A1 through A9, B1 through B9, etc, etc. It\(aqll
require human intelligence to figure out what each variable is for,
-since the names are meaningless.
+since the names are meaningless. See \fBVARIABLE NAMES\fP, below.
.sp
The \fBoutput\-file\fP may not be the exact size that the
\fBinput\-file\fP was. Some types of variable\-name scrambling shrink
diff --git a/unprotbas.c b/unprotbas.c
index 1697aa8..4ed831f 100644
--- a/unprotbas.c
+++ b/unprotbas.c
@@ -633,6 +633,9 @@ FILE *open_file(const char *name, const char *mode) {
void open_input(const char *name) {
if(!name) {
+ if(isatty(fileno(stdin))) {
+ die("can't read binary data from the terminal");
+ }
if(freopen(NULL, "rb", stdin)) {
input_file = stdin;
return;
@@ -648,7 +651,7 @@ void open_input(const char *name) {
void open_output(const char *name) {
if(!name) {
if(isatty(fileno(stdout))) {
- die("refusing to write binary data to standard output");
+ die("refusing to write binary data to the terminal");
}
if(freopen(NULL, "wb", stdout)) {
output_file = stdout;
diff --git a/unprotbas.rst b/unprotbas.rst
index c8584e8..743559b 100644
--- a/unprotbas.rst
+++ b/unprotbas.rst
@@ -144,7 +144,7 @@ Variable name table scrambling
names in the program, the recovery process just invents new ones,
named A through Z, A1 through A9, B1 through B9, etc, etc. It'll
require human intelligence to figure out what each variable is for,
- since the names are meaningless.
+ since the names are meaningless. See **VARIABLE NAMES**, below.
The **output-file** may not be the exact size that the
**input-file** was. Some types of variable-name scrambling shrink