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
Index: T c

⟦b4bdc3ad9⟧ TextFile

    Length: 940 (0x3ac)
    Types: TextFile
    Names: »cinit.c«

Derivation

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

TextFile

#include <stdio.h>


/*	read one integer from the open file */
intrd_(valptr)

int *valptr;
{
	scanf("%d",valptr);
	while((getchar() != '\n'));
	return;
}

/*	read an array from the open file */
aryrd_(cntptr,aryptr)

int *cntptr,*aryptr[];
{
	int i;

	for(i = *cntptr; i > 0;--i,++aryptr)
		scanf("%d",aryptr);
	while((getchar() != '\n'));
	return;
}

/* get a logical value */
logrd_(ptr)
int *ptr;
{
static char byte;

	*ptr = 0;
	while((byte = getchar()) != '\n'){
		if ((byte == 'T') || (byte == 't'))
			*ptr = 1;
	}
	return;
}


/* wait for end of init flag */
initnd_()
{
	static int chr;

	while ((chr = getchar()) != '?'){	/* wait for end flag */
		if (chr == 'R')		/* check for restore flag */
			rstrgm_();	/* call restore routine  */
	}
	return;
}

/*	write an array to the open pipe */
arywt_(cntptr,aryptr)

int *cntptr,*aryptr[];
{
	static int i;

	for(i = *cntptr; i > 0;--i,++aryptr)
		printf("%d\n",*aryptr);
	return;
}