1 --- block.c.orig Wed Mar 24 01:39:36 1999
2 +++ block.c Wed Jun 18 04:38:34 2003
9 /*heck - i started writing the thing using curses - then
10 switched to ncurses, did not seem to make much
15 -#define SCORE_FILE "/usr/games/lib/save/score"
16 +#define SCORE_FILE PREFIX "/share/block/save/score"
17 /* uncomment if you like lots of diagnostic garbage */
24 - username = (char *) getlogin();
25 - sprintf(buf,"/usr/games/lib/save/%s",username);
26 + username = getlogin();
27 + sprintf(buf, PREFIX "/share/block/%s",username);
28 fp = fopen( buf , "rt");
30 fscanf(fp , "%d", &level);
34 - sprintf( buf , "/usr/games/lib/%d.block" , level);
35 + sprintf( buf , PREFIX "/share/block/%d.block" , level);
37 - sprintf( buf , "/usr/games/lib/1.block");
38 + sprintf( buf , PREFIX "/share/block/1.block");
45 case 2 : printf("Hmmm... trouble reading file %s\n",lname);
46 - sprintf(tmp,"/usr/games/lib/%s.block",lname);
47 + sprintf(tmp, PREFIX "/share/block/%s.block",lname);
48 if(loadnext(&cw,tmp)){
49 printf("Could not read %s either\n",tmp);
50 if(loadnext(&cw,"default")){
52 printw( "\t\t %2d. %8s %4d %5ld %5ld\n", i+1, (char *)High[i].Name,High[i].Level,High[i].Score,High[i].Moves);
55 - sprintf(buf,"/usr/games/lib/save/%s",username);
56 + sprintf(buf,PREFIX "/share/block/save/%s",username);
59 fprintf(fp , "%d", level);
62 /*Hope they come back again*/
64 - sprintf(lname,"/usr/games/lib/%d.block",level);
65 + sprintf(lname,PREFIX "/share/block/%d.block",level);
66 /* yuck - a messy kludge - the fname stores the name of the next game*/
70 High[j].Moves = High[j-1].Moves;
71 strncpy(High[j].Name,High[j-1].Name,10);
74 cuserid((char *) High[i].Name);
76 High[i].Score = ThisScore;
77 High[i].Level = Level;
78 High[i].Moves = Moves;