unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 3d076afb39e376eb403af04b5442d3fcedd789f1 12656 bytes (raw)
name: patches/ri-li-modernize_cpp.patch 	 # note: path name is non-authoritative(*)

  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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
 
diff -r -u Ri-li-2.0.1.orig/src/audio.cc Ri-li-2.0.1/src/audio.cc
--- Ri-li-2.0.1.orig/src/audio.cc	2012-01-22 00:40:56.928609371 -0800
+++ Ri-li-2.0.1/src/audio.cc	2012-01-22 00:28:33.360636539 -0800
@@ -22,8 +22,8 @@
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 #include <stdlib.h>
-#include <iostream.h>
-#include <string.h>
+#include <iostream>
+#include <string>
 
 #include "audio.h"
 #include "utils.h"
@@ -57,7 +57,7 @@
   char PathFile[512];
 
   if(Mix_OpenAudio(22050,AUDIO_S16,1,1024)) {
-    cerr <<"Enable to init Sound card ! "<<SDL_GetError()<<endl;
+    std::cerr <<"Enable to init Sound card ! "<<SDL_GetError()<<std::endl;
     return false;
   }
   
diff -r -u Ri-li-2.0.1.orig/src/ecran.cc Ri-li-2.0.1/src/ecran.cc
--- Ri-li-2.0.1.orig/src/ecran.cc	2007-11-02 04:48:16.000000000 -0700
+++ Ri-li-2.0.1/src/ecran.cc	2012-01-22 00:13:54.422798653 -0800
@@ -21,7 +21,7 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
diff -r -u Ri-li-2.0.1.orig/src/editeur.cc Ri-li-2.0.1/src/editeur.cc
--- Ri-li-2.0.1.orig/src/editeur.cc	2007-11-02 04:48:17.000000000 -0700
+++ Ri-li-2.0.1/src/editeur.cc	2012-01-22 00:28:59.632635579 -0800
@@ -25,10 +25,10 @@
 #include <windows.h>
 #endif
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include <math.h>
 #include <SDL/SDL.h>
 
@@ -374,7 +374,7 @@
     
     // Sauve le niveau
     if(Niveau.Save()==false) {
-      cerr <<"ERREUR Saving levels!"<<endl;
+      std::cerr <<"ERREUR Saving levels!"<<std::endl;
       exit(-1);
     }
     
diff -r -u Ri-li-2.0.1.orig/src/jeux.cc Ri-li-2.0.1/src/jeux.cc
--- Ri-li-2.0.1.orig/src/jeux.cc	2007-11-02 04:48:17.000000000 -0700
+++ Ri-li-2.0.1/src/jeux.cc	2012-01-22 00:14:08.422798143 -0800
@@ -25,10 +25,10 @@
 #include <windows.h>
 #endif
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include <math.h>
 #include <SDL/SDL.h>
 
diff -r -u Ri-li-2.0.1.orig/src/loco.cc Ri-li-2.0.1/src/loco.cc
--- Ri-li-2.0.1.orig/src/loco.cc	2007-11-02 04:48:18.000000000 -0700
+++ Ri-li-2.0.1/src/loco.cc	2012-01-22 00:14:17.878797797 -0800
@@ -21,10 +21,10 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include <math.h>
 #include "preference.h"
 #include "loco.h"
diff -r -u Ri-li-2.0.1.orig/src/main.cc Ri-li-2.0.1/src/main.cc
--- Ri-li-2.0.1.orig/src/main.cc	2007-11-02 04:48:19.000000000 -0700
+++ Ri-li-2.0.1/src/main.cc	2012-01-22 00:29:40.080634136 -0800
@@ -23,8 +23,8 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <iostream.h>
-#include <string.h>
+#include <iostream>
+#include <string>
 #include <SDL/SDL.h>
 #include <SDL/SDL_mixer.h>
 
@@ -115,7 +115,7 @@
  
   // Initilise SDL
   if( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_AUDIO|SDL_INIT_NOPARACHUTE) < 0 ) {
-    cerr <<"Impossible d'initialiser SDL:"<<SDL_GetError()<<endl;
+    std::cerr <<"Impossible d'initialiser SDL:"<<SDL_GetError()<<std::endl;
     exit(-1);
   }
   // Ferme le programme correctement quant quit
@@ -125,7 +125,7 @@
   sdlVideoInfo=(SDL_VideoInfo*)SDL_GetVideoInfo();
 
   if(sdlVideoInfo->vfmt->BitsPerPixel==8) {
-    cerr <<"Impossible d'utiliser 8bits pour la vidéo !"<<endl;
+    std::cerr <<"Impossible d'utiliser 8bits pour la vidéo !"<<std::endl;
     exit(-1);
   }
   
@@ -145,7 +145,7 @@
   sdlVideo=SDL_SetVideoMode(800,600,sdlVideoInfo->vfmt->BitsPerPixel,vOption);
 
   if(sdlVideo==NULL) {
-    cerr <<"Impossible de passer dans le mode vidéo 800x600 !"<<endl;
+    std::cerr <<"Impossible de passer dans le mode vidéo 800x600 !"<<std::endl;
     exit(-1);
   }
   // Change le nom de la fenetre
diff -r -u Ri-li-2.0.1.orig/src/menu.cc Ri-li-2.0.1/src/menu.cc
--- Ri-li-2.0.1.orig/src/menu.cc	2007-11-02 04:48:19.000000000 -0700
+++ Ri-li-2.0.1/src/menu.cc	2012-01-22 00:30:04.752633198 -0800
@@ -21,10 +21,10 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include "preference.h"
 #include "menu.h"
 #include "sprite.h"
@@ -92,7 +92,7 @@
   // Teste la resolution video
   sdlVideoInfo=(SDL_VideoInfo*)SDL_GetVideoInfo();
   if(sdlVideoInfo->vfmt->BitsPerPixel==8) {
-    cerr <<"Impossible d'utiliser 8bits pour la vidéo !"<<endl;
+    std::cerr <<"Impossible d'utiliser 8bits pour la vidéo !"<<std::endl;
     exit(-1);
   }
   
@@ -112,7 +112,7 @@
   if(Pref.FullScreen) vOption|=SDL_FULLSCREEN;
   sdlVideo=SDL_SetVideoMode(800,600,sdlVideoInfo->vfmt->BitsPerPixel,vOption);
   if(sdlVideo==NULL) {
-    cerr <<"Impossible de passer dans le mode vidéo 800x600 !"<<endl;
+    std::cerr <<"Impossible de passer dans le mode vidéo 800x600 !"<<std::endl;
     exit(-1);
   }
   
diff -r -u Ri-li-2.0.1.orig/src/mouse.cc Ri-li-2.0.1/src/mouse.cc
--- Ri-li-2.0.1.orig/src/mouse.cc	2007-11-02 04:48:20.000000000 -0700
+++ Ri-li-2.0.1/src/mouse.cc	2012-01-22 00:14:36.438797120 -0800
@@ -21,7 +21,7 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include "mouse.h"
 #include "preference.h"
diff -r -u Ri-li-2.0.1.orig/src/sprite.cc Ri-li-2.0.1/src/sprite.cc
--- Ri-li-2.0.1.orig/src/sprite.cc	2007-11-02 04:48:20.000000000 -0700
+++ Ri-li-2.0.1/src/sprite.cc	2012-01-22 00:30:43.640631779 -0800
@@ -21,10 +21,10 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include <math.h>
 #include "sprite.h"
 #include "preference.h"
@@ -84,7 +84,7 @@
   strcpy(PathFile,Langue[Pref.Langue]);
   GetPath(PathFile);
   if(FileExiste(PathFile)==false) {
-    cerr <<"Impossible de trouver "<<Langue[Pref.Langue]<<endl;
+    std::cerr <<"Impossible de trouver "<<Langue[Pref.Langue]<<std::endl;
     return false;
   }
   L=ChargeFichier(PathFile,Buf);
@@ -128,7 +128,7 @@
   // *** Charge le fichier des langues ***
   // *************************************
   if(FileExiste(PathFile)==false) {
-    cerr <<"Impossible de trouver 'language.dat'"<<endl;
+    std::cerr <<"Impossible de trouver 'language.dat'"<<std::endl;
     return false;
   }
   L=ChargeFichier(PathFile,Buf);
@@ -163,7 +163,7 @@
   strcpy(PathFile,"sprites.dat");
   GetPath(PathFile);
   if(FileExiste(PathFile)==false) {
-    cerr <<"Impossible de trouver 'sprites.dat'"<<endl;
+    std::cerr <<"Impossible de trouver 'sprites.dat'"<<std::endl;
     return false;
   }
   L=ChargeFichier(PathFile,Buf);
@@ -352,7 +352,7 @@
     Image[i]=SDL_CreateRGBSurface((Dim[i].bpp-3)*SDL_SRCALPHA,Dim[i].L,Dim[i].H,Dim[i].bpp*8,
 				  0xff,0xff00,0xff0000,0xff000000*(Dim[i].bpp-3));
     if(Image[i]<=NULL) {
-      cerr <<"Impossible de créer une Surface SDL!"<<endl;
+      std::cerr <<"Impossible de créer une Surface SDL!"<<std::endl;
       return false;
     }
     
@@ -486,7 +486,7 @@
   Image[0]=SDL_CreateRGBSurface((Dim[0].bpp-3)*SDL_SRCALPHA,Dim[0].L,Dim[0].H,Dim[0].bpp*8,
 				0xff,0xff00,0xff0000,0xff000000*(Dim[0].bpp-3));
   if(Image[0]<=NULL) {
-    cerr <<"Impossible de créer une Surface SDL!"<<endl;
+    std::cerr <<"Impossible de créer une Surface SDL!"<<std::endl;
     return false;
   }
   return true;
diff -r -u Ri-li-2.0.1.orig/src/tableau.cc Ri-li-2.0.1/src/tableau.cc
--- Ri-li-2.0.1.orig/src/tableau.cc	2007-11-02 04:48:21.000000000 -0700
+++ Ri-li-2.0.1/src/tableau.cc	2012-01-22 00:14:50.710796598 -0800
@@ -21,7 +21,7 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
 #include "preference.h"
diff -r -u Ri-li-2.0.1.orig/src/utils.cc Ri-li-2.0.1/src/utils.cc
--- Ri-li-2.0.1.orig/src/utils.cc	2007-11-02 04:48:22.000000000 -0700
+++ Ri-li-2.0.1/src/utils.cc	2012-01-22 00:31:30.944630051 -0800
@@ -21,10 +21,10 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 
 #ifdef WINDOWS
 #include <windows.h>
@@ -77,7 +77,7 @@
 
   file=fopen(Path,"r");
   if(!file) {
-    cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<endl;
+    std::cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<std::endl;
     perror("fopen");
     return -1;
   }
@@ -93,7 +93,7 @@
 
   Buf=new unsigned char [L+1];
   if(Buf==NULL) {
-    cerr <<"ERREUR: Memoire insuffisante!"<<endl;
+    std::cerr <<"ERREUR: Memoire insuffisante!"<<std::endl;
     fclose(file);
     return -1;
   }
@@ -104,7 +104,7 @@
   while(Compt>1024) {
     AfficheChargeur();
     if( fread(Po,1,1024,file) != 1024 ) {
-      cerr <<"ERREUR de lecture du fichier '"<<Path<<"'"<<endl;
+      std::cerr <<"ERREUR de lecture du fichier '"<<Path<<"'"<<std::endl;
       perror("fread");
       fclose(file);
       delete [] Buf;
@@ -131,13 +131,13 @@
 
   file=_lopen(Path,OF_READ);
   if(file==-1) {
-    cerr <<"Impossible d'ouvrir "<<Path<<endl;
+    std::cerr <<"Impossible d'ouvrir "<<Path<<std::endl;
     exit(-1);
   }
   
   long L=(long)_llseek(file,0,SEEK_END);
   if(L==-1) {
-    cerr <<"Impossible de trouver la longueur du fichier"<<endl;
+    std::cerr <<"Impossible de trouver la longueur du fichier"<<std::endl;
     perror("lseek");
     _lclose(file);
     return -1;
@@ -146,7 +146,7 @@
   
   Buf=new unsigned char [L+1];
   if(Buf==NULL) {
-    cerr <<"ERREUR: Memoire insuffisante!"<<endl;
+    std::cerr <<"ERREUR: Memoire insuffisante!"<<std::endl;
     _lclose(file);
     return -1;
   }
@@ -169,14 +169,14 @@
   
   file=fopen(Path,"w");
   if(!file) {
-    cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<endl;
+    std::cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<std::endl;
     perror("fopen");
     return false;
   }
   
   while(L>512) {
     if( fwrite(Buf,1,512,file) != 512 ) {
-      cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<endl;
+      std::cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<std::endl;
       perror("fwrite");
       fclose(file);
       return false;
@@ -187,7 +187,7 @@
 
   if(L>0) {
     if( fwrite(Buf,1,(size_t)L,file) != (size_t)L ) {
-      cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<endl;
+      std::cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<std::endl;
       perror("fwrite");
       fclose(file);
       return false;
@@ -208,7 +208,7 @@
 
   file=_lcreat(Path,0);
   if(!file) {
-    cerr <<"ERREUR: Impossible de créer le fichier '"<<Path<<"'"<<endl;
+    std::cerr <<"ERREUR: Impossible de créer le fichier '"<<Path<<"'"<<std::endl;
     return false;
   }
   
@@ -216,7 +216,7 @@
   _lclose(file);
 
   if(Lec!=L) {
-    cerr <<"Problème d'ecriture du fichier '"<<Path<<"' ecris="<<Lec<<" au lieux de ="<<L<<endl;
+    std::cerr <<"Problème d'ecriture du fichier '"<<Path<<"' ecris="<<Lec<<" au lieux de ="<<L<<std::endl;
     return false;
   }
 
@@ -250,7 +250,7 @@
   sprintf(Path,"/usr/share/games/Ri-li/%s",Provi);
   if(FileExiste(Path)) return;
   
-  cerr <<"Impossible de trouver le fichier '"<<Provi<<endl;
+  std::cerr <<"Impossible de trouver le fichier '"<<Provi<<std::endl;
   exit(-1);
 }
 #endif
@@ -266,7 +266,7 @@
   sprintf(Path,"PROGDIR:%s",Provi);
   if(FileExiste(Path)) return;
   
-  cerr <<"Impossible de trouver le fichier '"<<Path<<endl;
+  std::cerr <<"Impossible de trouver le fichier '"<<Path<<std::endl;
   exit(-1);
 }
 #endif
@@ -282,7 +282,7 @@
   sprintf(Path,"Ri-li.app/Contents/Resources/%s",Provi);
   if(FileExiste(Path)) return;
   
-  cerr <<"Impossible de trouver le fichier '"<<Path<<endl;
+  std::cerr <<"Impossible de trouver le fichier '"<<Path<<std::endl;
   exit(-1);
 }
 #endif

debug log:

solving 3d076afb39e376eb403af04b5442d3fcedd789f1 ...
found 3d076afb39e376eb403af04b5442d3fcedd789f1 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).