-/* $OpenBSD: io.c,v 1.17 2009/10/27 23:59:23 deraadt Exp $ */
+/* $OpenBSD: io.c,v 1.18 2014/07/13 19:40:57 tedu Exp $ */
/* $NetBSD: io.c,v 1.3 1995/04/24 12:21:37 cgd Exp $ */
/*-
int outsw = 0; /* putting stuff to data file? */
const char iotape[] = "Ax3F'\003tt$8h\315qer*h\017nGKrX\207:!l";
-const char *tape = iotape; /* pointer to encryption tape */
+const char *tape = iotape; /* pointer to obfuscation tape */
int
next(void) /* next virtual char, bump adr */
{
int ch;
- ch=(*inptr ^ random()) & 0xFF; /* Decrypt input data */
- if (outsw) { /* putting data in tmp file */
+ ch=(*inptr ^ random()) & 0xFF; /* Deobfuscate input data */
+ if (outsw) { /* putting data in tmp file */
if (*tape == 0)
- tape = iotape; /* rewind encryption tape */
- *inptr = ch ^ *tape++; /* re-encrypt and replace value */
+ tape = iotape; /* rewind obfuscation tape */
+ *inptr = ch ^ *tape++; /* re-obfuscate and replace value */
}
inptr++;
return (ch);
char ch;
inptr = data_file; /* Pointer to virtual data file */
- srandom(SEED); /* which is lightly encrypted. */
+ srandom(SEED); /* which is slightly obfuscated.*/
clsses = 1;
for (;;) { /* read data sections */
{
char *s;
- tape = iotape; /* restart encryption tape */
+ tape = iotape; /* restart obfuscation tape */
for (s = nbf, *s = 0;; s++)
if ((*s = next()) == TAB || *s == '\n' || *s == LF)
break;
}
/*
- * Read, decrypt, and print a message (not ptext)
+ * Read, deobfuscate, and print a message (not ptext)
* msg is a pointer to seek address and length of mess
*/
void
s = msg->seekadr;
nonfirst = 0;
while (s - msg->seekadr < msg->txtlen) { /* read a line at a time */
- tape = iotape; /* restart decryption tape */
+ tape = iotape; /* restart deobfuscation tape */
while ((*s++ ^ *tape++) != TAB); /* read past loc num */
/* assume tape is longer than location number */
/* plus the lookahead put together */
}
/*
- * Read, decrypt an print a ptext message
+ * Read, deobfuscate, and print a ptext message
* msg is the number of all the p msgs for this place
* assumes object 1 doesn't have prop 1, obj 2 no prop 2 &c
*/
nonfirst = 0;
while (s - tbuf < msg->txtlen) { /* read line at a time */
- tape = iotape; /* restart decryption tape */
+ tape = iotape; /* restart dobfuscation tape */
for (numst = s; (*s ^= *tape++) != TAB; s++)
; /* get number */
save = *s; /* Temporarily trash the string (cringe) */
- *s++ = 0; /* decrypting number within the string */
+ *s++ = 0; /* deobfuscation number within the string */
if (atoi(numst) != 100 * skip && skip >= 0) {
while ((*s++ ^ * tape++) != LF) /* flush the line */
-/* $OpenBSD: save.c,v 1.8 2009/10/27 23:59:23 deraadt Exp $ */
+/* $OpenBSD: save.c,v 1.9 2014/07/13 19:40:57 tedu Exp $ */
/* $NetBSD: save.c,v 1.2 1995/03/21 12:05:08 cgd Exp $ */
/*-
fwrite(&sum, sizeof(sum), 1, out); /* Here's the random() key */
for (p = save_array; p->address != NULL; p++) {
for (s = p->address, i = 0; i < p->width; i++, s++)
- *s = (*s ^ random()) & 0xFF; /* Lightly encrypt */
+ *s = (*s ^ random()) & 0xFF; /* Slightly obfuscate */
fwrite(p->address, p->width, 1, out);
}
fclose(out);
for (p = save_array; p->address != NULL; p++) {
fread(p->address, p->width, 1, in);
for (s = p->address, i = 0; i < p->width; i++, s++)
- *s = (*s ^ random()) & 0xFF; /* Lightly decrypt */
+ *s = (*s ^ random()) & 0xFF; /* deobfuscate */
}
fclose(in);
-/* $OpenBSD: setup.c,v 1.9 2009/10/27 23:59:23 deraadt Exp $ */
+/* $OpenBSD: setup.c,v 1.10 2014/07/13 19:40:57 tedu Exp $ */
/* $NetBSD: setup.c,v 1.2 1995/03/21 12:05:10 cgd Exp $ */
/*-
/*
* Setup: keep the structure of the original Adventure port, but use an
* internal copy of the data file, serving as a sort of virtual disk. It's
- * lightly encrypted to prevent casual snooping of the executable.
+ * lightly obfuscated to prevent casual snooping of the executable.
*
* Also do appropriate things to tabs so that bogus editors will do the right
* thing with the data file.
-/* $OpenBSD: vocab.c,v 1.13 2009/10/27 23:59:23 deraadt Exp $ */
+/* $OpenBSD: vocab.c,v 1.14 2014/07/13 19:40:57 tedu Exp $ */
/* $NetBSD: vocab.c,v 1.2 1995/03/21 12:05:13 cgd Exp $ */
/*-
for (s = word, t = h->atab; *s;)
*t++ = *s++ ^ '=';
*t = 0 ^ '=';
- /* encrypt slightly to thwart core reader */
+ /* obfuscate slightly to frustrate core reader */
/* printf("Stored \"%s\" (%d ch) as entry %d\n", */
/* word, length(word), adr); */
return (0); /* entry unused */