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 r

⟦578a60752⟧ TextFile

    Length: 614 (0x266)
    Types: TextFile
    Names: »read.c«

Derivation

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

TextFile

#include "wand_head.h"

int rscreen(num,row_ptr,maxmoves)
int *maxmoves, num;
char (*row_ptr)[ROWLEN+1];
{
int  y;
FILE *fp;
char name[50];
sprintf(name,"%s/screen.%d",SCREENPATH,num);
fp = fopen(name,"r");
if(fp == NULL)
    printf("File for screen %d unavailable.\n\n",num) ;
else
    {
    for(y = 0;y<NOOFROWS;y++)
        {
        fgets((*row_ptr++),ROWLEN + 1,fp);
	fgetc(fp);                         /* remove newline char*/
	};
    if(fscanf(fp,"%*s\n%d",maxmoves) != 1) {
	printf("no maxmoves specified: assuming infinite movement.\n");
	*maxmoves= (-1);
	}
    fclose(fp);
    };
return (fp == NULL);
}