summaryrefslogtreecommitdiff
blob: d7c01e6e0194bd3862a435b8b508b84dc98044f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
diff -ruN trimines-1.3.0.orig/Makefile trimines-1.3.0/Makefile
--- trimines-1.3.0.orig/Makefile	1969-12-31 19:00:00.000000000 -0500
+++ trimines-1.3.0/Makefile	2010-10-13 18:01:50.802198348 -0400
@@ -0,0 +1,2 @@
+trimines:
+	$(CC) $(LDFLAGS) $(CFLAGS) src/main.c -o ./trimines `sdl-config --cflags` `sdl-config --libs`
diff -ruN trimines-1.3.0.orig/src/boardinit.c trimines-1.3.0/src/boardinit.c
--- trimines-1.3.0.orig/src/boardinit.c	2006-05-13 15:40:32.000000000 -0400
+++ trimines-1.3.0/src/boardinit.c	2010-10-13 18:00:58.238609895 -0400
@@ -22,7 +22,7 @@
 
 void genrandmines(int ex, int ey)
 {
-int rx,ry,count,z,i,j;
+int rx,ry,count,i,j;
 
 // generate random mines + (ex,ey) will never be a mine
 
diff -ruN trimines-1.3.0.orig/src/gfx.c trimines-1.3.0/src/gfx.c
--- trimines-1.3.0.orig/src/gfx.c	2006-05-13 15:40:32.000000000 -0400
+++ trimines-1.3.0/src/gfx.c	2010-10-13 18:00:58.238609895 -0400
@@ -218,7 +218,7 @@
 
 void drawcounter(int n,int posx, int posy)
 {
-SDL_Surface *p1, *p2, *p3, *p4;
+SDL_Surface *p2, *p3, *p4;
 int n1,n2,n3,num;
 
 
diff -ruN trimines-1.3.0.orig/src/main.c trimines-1.3.0/src/main.c
--- trimines-1.3.0.orig/src/main.c	2006-05-13 15:40:32.000000000 -0400
+++ trimines-1.3.0/src/main.c	2010-10-13 18:00:58.239609676 -0400
@@ -131,14 +131,14 @@
 int out;
 int loadimgs = 1;
 
-#include "boardinit.c"
 #include "counters.c"
+#include "boardinit.c"
 #include "gfx.c"
 #include "gamestatus.c"
 #include "uncover.c"
 #include "menu.c"
 
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
     if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
         fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
@@ -189,7 +189,7 @@
 SDL_Event event;
 
 
-int x,y,x2,y2,mx,my,i,j;
+int x,y,x2,y2,mx,my;
 
 x2 = -1;
 
@@ -228,6 +228,7 @@
 					break;
 			case SDLK_F1: if (firstclick == 0 && gamestatus == 0) {solve();}
 					break;
+			default:;
 			}
 			
 	break; // end case SDL_KEYDOWN		
@@ -380,11 +381,13 @@
 		break; // end case SDL_MOUSEBUTTONDOWN
       
       case SDL_QUIT: SDL_ShowCursor(SDL_ENABLE); main(0,0);
+      		break;
       
+	default:;
         } // end switch (event.type)
   
   } }// end whiles
 
     atexit(SDL_Quit);
-
+    exit(0);
 }
diff -ruN trimines-1.3.0.orig/src/menu.c trimines-1.3.0/src/menu.c
--- trimines-1.3.0.orig/src/menu.c	2006-05-13 15:40:32.000000000 -0400
+++ trimines-1.3.0/src/menu.c	2010-10-13 18:00:58.239609676 -0400
@@ -104,6 +104,7 @@
 						if (mode == 6) {if (mines != 1){mines--;}
 																												}}}
 					break;
+			default:;
 			}
 
 
@@ -126,6 +127,7 @@
 		exit(0);
 		break;
 		
+	default:;
 	}
 }