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