DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦be6d0cc70⟧ TextFile

    Length: 462 (0x1ce)
    Types: TextFile
    Names: »decode.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Zork/decode.c« 

TextFile

/*
 * Decode dtext.dat file into readable ASCII.
 * John Gilmore (hoptoad!gnu), December 1986
 */
#include <stdio.h>
#define STRLEN 74
char string[STRLEN+1];
int recno = 0;

main() {
	unsigned char byte, byte2;
	int i;

	while (1) {
		recno++;
		byte = getchar();
		byte2 = getchar();
		if (1 != fread (string, STRLEN, 1, stdin)) exit(0);
		for (i = 1; i <= STRLEN; i++) 
			string[i-1] ^= (recno&31)+i;
		printf("%2x%02x %s\n",
			byte2, byte, string);
	}
}