--- block.c.orig Wed Mar 24 01:39:36 1999 +++ block.c Sat Apr 10 09:57:16 1999 @@ -32,7 +32,7 @@ #define FF_HOME 4 #define FF_OVEN 5 -#define SCORE_FILE "/usr/games/lib/save/score" +#define SCORE_FILE PREFIX "/share/block/save/score" /* uncomment if you like lots of diagnostic garbage */ /* #define DEBUG 1 */ @@ -93,16 +93,16 @@ username = (char *) getlogin(); - sprintf(buf,"/usr/games/lib/save/%s",username); + sprintf(buf, PREFIX "/share/block/%s",username); fp = fopen( buf , "rt"); if( fp != NULL ) { fscanf(fp , "%d", &level); fclose(fp); } if( level != 0 ) { - sprintf( buf , "/usr/games/lib/%d.block" , level); + sprintf( buf , PREFIX "/share/block/%d.block" , level); } else { - sprintf( buf , "/usr/games/lib/1.block"); + sprintf( buf , PREFIX "/share/block/1.block"); level=1; } strcpy(lname,buf); @@ -172,7 +172,7 @@ break; case 1 : case 2 : printf("Hmmm... trouble reading file %s\n",lname); - sprintf(tmp,"/usr/games/lib/%s.block",lname); + sprintf(tmp, PREFIX "/share/block/%s.block",lname); if(loadnext(&cw,tmp)){ printf("Could not read %s either\n",tmp); if(loadnext(&cw,"default")){ @@ -539,7 +539,7 @@ printw( "\t\t %2d. %8s %4d %5ld %5ld\n", i+1, (char *)High[i].Name,High[i].Level,High[i].Score,High[i].Moves); } level++; - sprintf(buf,"/usr/games/lib/save/%s",username); + sprintf(buf,PREFIX "/share/block/save/%s",username); fp = fopen(buf,"wt"); if( fp != NULL ) { fprintf(fp , "%d", level); @@ -557,7 +557,7 @@ endwin(); /*Hope they come back again*/ - sprintf(lname,"/usr/games/lib/%d.block",level); + sprintf(lname,PREFIX "/share/block/%d.block",level); /* yuck - a messy kludge - the fname stores the name of the next game*/ moves=0; if(looper)looper=2; @@ -756,7 +756,9 @@ High[j].Moves = High[j-1].Moves; strncpy(High[j].Name,High[j-1].Name,10); } + #if 0 cuserid((char *) High[i].Name); + #endif High[i].Score = ThisScore; High[i].Level = Level; High[i].Moves = Moves;