|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 614 (0x266) Types: TextFile Names: »read.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/X/Xwanderer/read.c«
#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); }