]> git.pld-linux.org Git - packages/OpenPTC-GGI.git/blob - OpenPTC-GGI-gcc3.patch
- tabs in preamble
[packages/OpenPTC-GGI.git] / OpenPTC-GGI-gcc3.patch
1 --- OpenPTC-GGI-0.5.0/source/GGI/Console.h.orig Tue May  4 08:47:41 1999
2 +++ OpenPTC-GGI-0.5.0/source/GGI/Console.h      Sat Dec 21 09:44:00 2002
3 @@ -12,7 +12,7 @@
4  #include <ptc.h>
5  #include <stdlib.h>
6  #include <string.h>
7 -#include <fstream.h>
8 +#include <fstream>
9  #include <ggi/ggi.h>
10  #include <ggi/gii.h>
11  
12 --- OpenPTC-GGI-0.5.0/source/GGI/Console.cc.orig        Tue May  4 08:51:14 1999
13 +++ OpenPTC-GGI-0.5.0/source/GGI/Console.cc     Sat Dec 21 09:45:35 2002
14 @@ -59,7 +59,7 @@
15  void Console::configure( const char file[] )
16  {
17      // open configuration file
18 -    ifstream f( file, ios::in );
19 +    std::ifstream f( file, std::ios::in );
20      
21      // check file
22      if( !f ) {
23 @@ -327,7 +327,7 @@
24  
25      // Block until we get a key.
26      giiEventRead( l_ggi_input, &l_ggi_event, ( ggi_event_mask )
27 -                                        emKeyPress | emKeyRepeat );
28 +                                        (emKeyPress | emKeyRepeat) );
29  
30      int code = l_ggi_event.key.sym;
31      bool alt = l_ggi_event.key.modifiers & GII_MOD_ALT;
32 @@ -922,7 +922,7 @@
33      return l_ptc_mode;
34  }
35  
36 -ggi_mode *Console::translate( const Mode &l_ptc_mode, int pages = 0 )
37 +ggi_mode *Console::translate( const Mode &l_ptc_mode, int pages /* = 0 */)
38  {
39      
40      ggi_mode    *l_ggi_mode = new ggi_mode;
41 --- OpenPTC-GGI-0.5.0/source/Core/Palette.cc.orig       Mon May  3 20:06:57 1999
42 +++ OpenPTC-GGI-0.5.0/source/Core/Palette.cc    Sat Dec 21 09:50:18 2002
43 @@ -116,7 +116,7 @@
44  {
45      // load palette data
46    //    memcpy(Hermes_PaletteGet(m_handle),data,1024);
47 -    Hermes_PaletteSet(m_handle,data);
48 +    Hermes_PaletteSet(m_handle,(int32*)data);
49  }
50  
51  
52 --- OpenPTC-GGI-0.5.0/demos/tunnel3d/Tunnel3D.cc.orig   Thu Apr  1 02:04:41 1999
53 +++ OpenPTC-GGI-0.5.0/demos/tunnel3d/Tunnel3D.cc        Sat Dec 21 09:58:50 2002
54 @@ -11,8 +11,8 @@
55  #include "ptc.h"
56  #include <math.h>
57  #include <string.h>
58 -#include <iostream.h>
59 -#include <fstream.h>
60 +#include <iostream>
61 +#include <fstream>
62  #include "Tunnel3D.h"
63  #include "Calc.h"
64  
65 @@ -94,9 +94,9 @@
66    while(((int)tunneltex)&0xffff!=0)
67    tunneltex++;
68  
69 -  ifstream texfile("Tunnel3D.raw",ios::binary|ios::in);
70 -  texfile.read(pal,768);
71 -  texfile.read(tmp,65536);
72 +  std::ifstream texfile("Tunnel3D.raw",std::ios::binary|std::ios::in);
73 +  texfile.read((char*)pal,768);
74 +  texfile.read((char*)tmp,65536);
75    texfile.close();
76  
77    // Generate lookup table for lighting (65 because of possible inaccuracies)
78 @@ -319,7 +319,7 @@
79  }
80  
81  
82 -void main()
83 +int main()
84  {
85  
86    try {
87 @@ -370,4 +370,5 @@
88    { error.report();
89  
90    }
91 +  return 0;
92  }
93 --- OpenPTC-GGI-0.5.0/examples/image/Image.cc.orig      Sat Mar 20 23:11:27 1999
94 +++ OpenPTC-GGI-0.5.0/examples/image/Image.cc   Sat Dec 21 10:03:27 2002
95 @@ -6,13 +6,13 @@
96  
97  // include files
98  #include "ptc.h"
99 -#include <fstream.h>
100 +#include <fstream>
101  
102  
103  void load(Surface &surface,char filename[])
104  {
105      // open image file
106 -    ifstream is(filename,ios::in|ios::binary|ios::nocreate);
107 +    std::ifstream is(filename,std::ios::in|std::ios::binary);
108  
109      // check image file stream
110      if (!is) throw Error("could not load image");
111 --- OpenPTC-GGI-0.5.0/examples/info/Info.cc.orig        Sat Mar 20 23:12:18 1999
112 +++ OpenPTC-GGI-0.5.0/examples/info/Info.cc     Sat Dec 21 10:04:07 2002
113 @@ -34,7 +34,7 @@
114  }
115  
116  
117 -void main()
118 +int main()
119  {
120      try
121      {
122 @@ -68,5 +68,6 @@
123          // report error
124          error.report();
125      }
126 +    return 0;
127  }
128  
129 --- OpenPTC-GGI-0.5.0/examples/modes/Modes.cc.orig      Sat Mar 20 23:14:23 1999
130 +++ OpenPTC-GGI-0.5.0/examples/modes/Modes.cc   Sat Dec 21 10:05:07 2002
131 @@ -47,7 +47,7 @@
132  }\r
133  \r
134  \r
135 -void main()\r
136 +int main()\r
137  {\r
138      try\r
139      {\r
140 @@ -87,5 +87,6 @@
141          // report error\r
142          error.report();\r
143      }\r
144 +    return 0;\r
145  }\r
146  \r
147 --- OpenPTC-GGI-0.5.0/examples/pixel/Pixel.cc.orig      Sat Mar 20 23:16:04 1999
148 +++ OpenPTC-GGI-0.5.0/examples/pixel/Pixel.cc   Sat Dec 21 10:07:02 2002
149 @@ -24,7 +24,7 @@
150  }
151  
152  
153 -void main()
154 +int main()
155  {
156      try
157      {
158 @@ -57,4 +57,5 @@
159          // report error
160          error.report();
161      }
162 +    return 0;
163  }
164 --- OpenPTC-GGI-0.5.0/examples/save/Save.cc.orig        Sat Mar 20 23:17:22 1999
165 +++ OpenPTC-GGI-0.5.0/examples/save/Save.cc     Sat Dec 21 10:08:29 2002
166 @@ -7,13 +7,13 @@
167  // include files
168  #include "ptc.h"
169  #include <math.h>
170 -#include <fstream.h>
171 +#include <fstream>
172  
173  
174  void save(Surface &surface,char filename[])
175  {
176      // open image file for writing
177 -    ofstream os(filename,ios::out|ios::binary);
178 +    std::ofstream os(filename,std::ios::out|std::ios::binary);
179  
180      // check image file stream
181      if (!os) throw Error("could not open image file for writing");
182 @@ -37,7 +37,7 @@
183      header[16] = 24;
184  
185      // write tga header
186 -    os.write(header,18);
187 +    os.write((const char*)header,18);
188  
189      // calculate size of image pixels
190      const int size = width * height * 3;
191 --- OpenPTC-GGI-0.5.0/examples/stretch/Stretch.cc.orig  Sun Mar 21 00:07:08 1999
192 +++ OpenPTC-GGI-0.5.0/examples/stretch/Stretch.cc       Sat Dec 21 10:09:52 2002
193 @@ -7,13 +7,13 @@
194  // include files
195  #include "ptc.h"
196  #include <math.h>
197 -#include <fstream.h>
198 +#include <fstream>
199  
200  
201  void load(Surface &surface,char filename[])
202  {
203      // open image file
204 -    ifstream is(filename,ios::in|ios::binary|ios::nocreate);
205 +    std::ifstream is(filename,std::ios::in|std::ios::binary);
206  
207      // check image file stream
208      if (!is) throw Error("could not load image");
209 --- OpenPTC-GGI-0.5.0/demos/fire/Fire.cc.orig   Sun Mar 21 00:46:48 1999
210 +++ OpenPTC-GGI-0.5.0/demos/fire/Fire.cc        Sat Dec 21 10:10:48 2002
211 @@ -68,7 +68,7 @@
212  }
213  
214  
215 -void main()
216 +int main()
217  {
218      try
219      {
220 --- OpenPTC-GGI-0.5.0/demos/flower/Flower.cc.orig       Sun Mar 21 00:47:26 1999
221 +++ OpenPTC-GGI-0.5.0/demos/flower/Flower.cc    Sat Dec 21 10:11:24 2002
222 @@ -93,7 +93,7 @@
223  }
224  
225  
226 -void main()
227 +int main()
228  {
229      try
230      {
231 --- OpenPTC-GGI-0.5.0/demos/land/Land.cc.orig   Sun Mar 21 01:06:36 1999
232 +++ OpenPTC-GGI-0.5.0/demos/land/Land.cc        Sat Dec 21 10:13:06 2002
233 @@ -256,10 +256,11 @@
234  //
235  void View(int x0,int y0,int angle, int height, int32 *surface_buffer)
236  {
237 + int d;
238   //
239   // Initialize last-y and last-color arrays
240   //
241 - for ( int d=0; d<SCREENWIDTH; d++ )
242 + for ( d=0; d<SCREENWIDTH; d++ )
243   {
244    lasty[d]=SCREENHEIGHT;
245    lastc[d]=-1;
246 --- OpenPTC-GGI-0.5.0/demos/lights/Lights.cc.orig       Sun Mar 21 00:48:15 1999
247 +++ OpenPTC-GGI-0.5.0/demos/lights/Lights.cc    Sat Dec 21 10:13:49 2002
248 @@ -22,7 +22,7 @@
249  }
250  
251  
252 -void main()
253 +int main()
254  {
255      try
256      {
257 --- OpenPTC-GGI-0.5.0/demos/mojo/Mojo.cc.orig   Sun Mar 21 00:47:37 1999
258 +++ OpenPTC-GGI-0.5.0/demos/mojo/Mojo.cc        Sat Dec 21 10:15:57 2002
259 @@ -20,7 +20,7 @@
260  #include "ptc.h"
261  #include <math.h>
262  #include <stdio.h>
263 -#include <fstream.h>
264 +#include <fstream>
265  #include <stdlib.h>
266  #include <string.h>
267  
268 @@ -316,7 +316,7 @@
269         /////////////////
270         // load Mojo.raw
271  
272 -    ifstream file("Mojo.raw");
273 +    std::ifstream file("Mojo.raw");
274      file.read((char*)MaskMap,320*200);
275      file.close();
276  
277 @@ -456,7 +456,7 @@
278  }
279  
280  
281 -void main()
282 +int main()
283  {
284      try
285      {
286 @@ -486,4 +486,5 @@
287          // report error
288          error.report();
289      }
290 +    return 0;
291  }
292 --- OpenPTC-GGI-0.5.0/demos/tunnel/Tunnel.cc.orig       Sun Mar 21 00:47:18 1999
293 +++ OpenPTC-GGI-0.5.0/demos/tunnel/Tunnel.cc    Sat Dec 21 10:16:41 2002
294 @@ -103,7 +103,7 @@
295  };
296  
297  
298 -void main()
299 +int main()
300  {
301      try
302      {
303 @@ -153,4 +153,5 @@
304          // report error
305          error.report();
306      }
307 +    return 0;
308  }
309 --- OpenPTC-GGI-0.5.0/tests/Console.cc.orig     Thu Feb 18 16:08:52 1999
310 +++ OpenPTC-GGI-0.5.0/tests/Console.cc  Sat Dec 21 10:17:48 2002
311 @@ -10,7 +10,7 @@
312  #include <string.h>
313  
314  
315 -void main()
316 +int main()
317  {
318      try
319      {
320 @@ -169,4 +169,5 @@
321          // report error
322          error.report();
323      }
324 +    return 0;
325  }
326 --- OpenPTC-GGI-0.5.0/tests/Link.cc.orig        Thu Feb 18 16:07:46 1999
327 +++ OpenPTC-GGI-0.5.0/tests/Link.cc     Sat Dec 21 10:18:50 2002
328 @@ -603,8 +603,9 @@
329  }\r
330  
331  \r
332 -void main()
333 +int main()
334  {\r
335      // this program does nothing but test linkage with OpenPTC\r
336      printf("congratulations you passed the link test\n");\r
337 +    return 0;
338  }
339 --- OpenPTC-GGI-0.5.0/tests/Timer.cc.orig       Thu Feb 18 16:28:08 1999
340 +++ OpenPTC-GGI-0.5.0/tests/Timer.cc    Sat Dec 21 10:19:11 2002
341 @@ -10,7 +10,7 @@
342  #include <stdio.h>
343  
344  
345 -void main()
346 +int main()
347  {
348      try
349      {
350 @@ -84,4 +84,5 @@
351          // report error
352          error.report();
353      }
354 +    return 0;
355  }
This page took 0.103707 seconds and 3 git commands to generate.