Path: blob/main/games/apoolGL/files/patch-apool.c
16149 views
--- apool.c.orig Fri Aug 12 00:09:34 20051+++ apool.c Thu Sep 1 02:23:50 20052@@ -27,7 +27,7 @@3#include <math.h>4#include <time.h>5#include <string.h>6-#include <getopt.h>7+#include <unistd.h>8#include <SDL/SDL.h>9#include <GL/gl.h>10#include <GL/glu.h>11@@ -103,10 +103,10 @@12for( i=0;i<2;i++)13{ ply[i].stat = ply[i].wait = ply[i].col = ply[i].hole_black = 0; }14first_hit = bande_hit = anstoss = 1;15- if( !(dat = fopen("table.dat","r")) )16+ if( !(dat = fopen(DATADIR"/table.dat","r")) )17{18close_graphics();19- printf("error: can't find the file 'table.dat'. \n");20+ printf("error: can't find the file '" DATADIR "/table.dat'. \n");21printf("create this file using 'apool -init 50' ...\n\n");22exit(0);23}24@@ -427,9 +427,9 @@25time_t sys_time;26char opt;27opterr=0; /* Keine Fehlermeldung bei "falscher" Option ausgeben */28- if( !(datei = fopen("konst.dat","r") ) )29+ if( !(datei = fopen(DATADIR"/konst.dat","r") ) )30{ /* Datei f�r die (phys.) Konstanten */31- printf("can't open file 'konst.dat'\n");32+ printf("can't open file '" DATADIR "/konst.dat'\n");33exit( 0 );34}35fscanf(datei,"%lg%*[^\n]%lg%*[^\n]%lg%*[^\n]%lg%*[^\n]%lg%*[^\n]",363738