]> git.pld-linux.org Git - packages/apt.git/blame - apt-gcc31.patch
- %s/pld\.org\.pl/pld-linux.org/
[packages/apt.git] / apt-gcc31.patch
CommitLineData
a470da4d
AM
1diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire-method.cc apt-0.3.19cnc55/apt-pkg/acquire-method.cc
2--- apt-0.3.19cnc55.org/apt-pkg/acquire-method.cc Tue Mar 12 18:04:10 2002
3+++ apt-0.3.19cnc55/apt-pkg/acquire-method.cc Tue Mar 12 17:18:31 2002
4@@ -27,6 +27,8 @@
5 #include <stdarg.h>
6 #include <stdio.h>
7 #include <unistd.h>
8+#include <iostream>
9+using namespace std;
10 /*}}}*/
11
12 // AcqMethod::pkgAcqMethod - Constructor /*{{{*/
13@@ -85,7 +87,7 @@
14 void pkgAcqMethod::Fail(string Err,bool Transient)
15 {
16 // Strip out junk from the error messages
17- for (char *I = Err.begin(); I != Err.end(); I++)
18+ for (string::iterator I = Err.begin(); I != Err.end(); I++)
19 {
20 if (*I == '\r')
21 *I = ' ';
22@@ -285,10 +287,10 @@
23 {
24 ::Configuration &Cnf = *_config;
25
26- const char *I = Message.begin();
27+ const char *I = Message.data();
28
29 unsigned int Length = strlen("Config-Item");
30- for (; I + Length < Message.end(); I++)
31+ for (; I + Length < Message.data()+Message.size(); I++)
32 {
33 // Not a config item
34 if (I[Length] != ':' || stringcasecmp(I,I+Length,"Config-Item") != 0)
35@@ -296,11 +298,11 @@
36
37 I += Length + 1;
38
39- for (; I < Message.end() && *I == ' '; I++);
40+ for (; I < Message.data()+Message.size() && *I == ' '; I++);
41 const char *Equals = I;
42- for (; Equals < Message.end() && *Equals != '='; Equals++);
43+ for (; Equals < Message.data()+Message.size() && *Equals != '='; Equals++);
44 const char *End = Equals;
45- for (; End < Message.end() && *End != '\n'; End++);
46+ for (; End < Message.data()+Message.size() && *End != '\n'; End++);
47 if (End == Equals)
48 return false;
49
50diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire-worker.cc apt-0.3.19cnc55/apt-pkg/acquire-worker.cc
51--- apt-0.3.19cnc55.org/apt-pkg/acquire-worker.cc Tue Mar 12 18:04:10 2002
52+++ apt-0.3.19cnc55/apt-pkg/acquire-worker.cc Tue Mar 12 17:18:31 2002
53@@ -131,7 +131,7 @@
54 // Setup the FDs
55 dup2(Pipes[1],STDOUT_FILENO);
56 dup2(Pipes[2],STDIN_FILENO);
57- dup2(((filebuf *)clog.rdbuf())->fd(),STDERR_FILENO);
58+// dup2(((filebuf *)clog.rdbuf())->fd(),STDERR_FILENO);
59 SetCloseExec(STDOUT_FILENO,false);
60 SetCloseExec(STDIN_FILENO,false);
61 SetCloseExec(STDERR_FILENO,false);
62@@ -465,7 +465,7 @@
63 int Res;
64 do
65 {
66- Res = write(OutFd,OutQueue.begin(),OutQueue.length());
67+ Res = write(OutFd,OutQueue.data(),OutQueue.length());
68 }
69 while (Res < 0 && errno == EINTR);
70
71diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire-worker.h apt-0.3.19cnc55/apt-pkg/acquire-worker.h
72--- apt-0.3.19cnc55.org/apt-pkg/acquire-worker.h Tue Mar 12 18:04:10 2002
73+++ apt-0.3.19cnc55/apt-pkg/acquire-worker.h Tue Mar 12 17:18:38 2002
74@@ -21,10 +21,10 @@
75 // Interfacing to the method process
76 class pkgAcquire::Worker
77 {
78- friend pkgAcquire;
79+ friend class pkgAcquire;
80
81 protected:
82- friend Queue;
83+ friend class Queue;
84
85 /* Linked list starting at a Queue and a linked list starting
86 at Acquire */
87diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire.cc apt-0.3.19cnc55/apt-pkg/acquire.cc
88--- apt-0.3.19cnc55.org/apt-pkg/acquire.cc Tue Mar 12 18:04:10 2002
89+++ apt-0.3.19cnc55/apt-pkg/acquire.cc Tue Mar 12 17:18:31 2002
90@@ -365,7 +365,7 @@
91 I->Shutdown(false);
92
93 // Shut down the items
94- for (Item **I = Items.begin(); I != Items.end(); I++)
95+ for (vector<Item *>::iterator I = Items.begin(); I != Items.end(); I++)
96 (*I)->Finished();
97
98 if (_error->PendingError())
99diff -urN apt-0.3.19cnc55.org/apt-pkg/acquire.h apt-0.3.19cnc55/apt-pkg/acquire.h
100--- apt-0.3.19cnc55.org/apt-pkg/acquire.h Tue Mar 12 18:04:10 2002
101+++ apt-0.3.19cnc55/apt-pkg/acquire.h Tue Mar 12 17:18:38 2002
102@@ -34,6 +34,7 @@
103
104 #include <vector>
105 #include <string>
106+using namespace std;
107
108 #ifdef __GNUG__
109 #pragma interface "apt-pkg/acquire.h"
110@@ -52,8 +53,8 @@
111 class Worker;
112 struct MethodConfig;
113 struct ItemDesc;
114- friend Item;
115- friend Queue;
116+ friend class Item;
117+ friend class Queue;
118
119 protected:
120
121@@ -100,8 +101,8 @@
122 // Simple iteration mechanism
123 inline Worker *WorkersBegin() {return Workers;};
124 Worker *WorkerStep(Worker *I);
125- inline Item **ItemsBegin() {return Items.begin();};
126- inline Item **ItemsEnd() {return Items.end();};
127+ inline Item **ItemsBegin() {return &*Items.begin();};
128+ inline Item **ItemsEnd() {return &*Items.end();};
129
130 // Iterate over queued Item URIs
131 class UriIterator;
132@@ -132,8 +133,8 @@
133 // List of possible items queued for download.
134 class pkgAcquire::Queue
135 {
136- friend pkgAcquire;
137- friend pkgAcquire::UriIterator;
138+ friend class pkgAcquire;
139+ friend class pkgAcquire::UriIterator;
140 Queue *Next;
141
142 public:
143diff -urN apt-0.3.19cnc55.org/apt-pkg/algorithms.cc apt-0.3.19cnc55/apt-pkg/algorithms.cc
144--- apt-0.3.19cnc55.org/apt-pkg/algorithms.cc Tue Mar 12 18:04:10 2002
145+++ apt-0.3.19cnc55/apt-pkg/algorithms.cc Tue Mar 12 17:21:54 2002
146@@ -20,7 +20,7 @@
147 #include <apt-pkg/algorithms.h>
148 #include <apt-pkg/error.h>
149 #include <apt-pkg/configuration.h>
150-#include <iostream.h>
151+#include <iostream>
152 /*}}}*/
153 #include <i18n.h>
154
155diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/cdromutl.h apt-0.3.19cnc55/apt-pkg/contrib/cdromutl.h
156--- apt-0.3.19cnc55.org/apt-pkg/contrib/cdromutl.h Tue Mar 12 18:04:10 2002
157+++ apt-0.3.19cnc55/apt-pkg/contrib/cdromutl.h Tue Mar 12 17:18:38 2002
158@@ -11,6 +11,7 @@
159 #define PKGLIB_ACQUIRE_METHOD_H
160
161 #include <string>
162+using namespace std;
163
164 #ifdef __GNUG__
165 #pragma interface "apt-pkg/cdromutl.h"
166diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/configuration.cc apt-0.3.19cnc55/apt-pkg/contrib/configuration.cc
167--- apt-0.3.19cnc55.org/apt-pkg/contrib/configuration.cc Tue Mar 12 18:04:10 2002
168+++ apt-0.3.19cnc55/apt-pkg/contrib/configuration.cc Tue Mar 12 17:19:51 2002
169@@ -20,7 +20,8 @@
170 #include <apt-pkg/strutl.h>
171
172 #include <stdio.h>
173-#include <fstream.h>
174+#include <fstream>
175+#include <iostream>
176 /*}}}*/
177
178 Configuration *_config = new Configuration;
179@@ -84,7 +85,7 @@
180 if (Len != 0)
181 {
182 for (; I != 0; Last = &I->Next, I = I->Next)
183- if ((Res = stringcasecmp(I->Tag.begin(),I->Tag.end(),S,S + Len)) == 0)
184+ if ((Res = stringcasecmp(I->Tag.data(),I->Tag.data()+I->Tag.size(),S,S + Len)) == 0)
185 break;
186 }
187 else
188@@ -429,7 +430,7 @@
189 unsigned Depth)
190 {
191 // Open the stream for reading
192- ifstream F(FName.c_str(),ios::in | ios::nocreate);
193+ ifstream F(FName.c_str(),ios::in);
194 if (!F != 0)
195 return _error->Errno("ifstream::ifstream","Opening configuration file %s",FName.c_str());
196
197diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/configuration.h apt-0.3.19cnc55/apt-pkg/contrib/configuration.h
198--- apt-0.3.19cnc55.org/apt-pkg/contrib/configuration.h Tue Mar 12 18:04:10 2002
199+++ apt-0.3.19cnc55/apt-pkg/contrib/configuration.h Tue Mar 12 17:18:38 2002
200@@ -33,6 +33,7 @@
201 #endif
202
203 #include <string>
204+using namespace std;
205
206 class Configuration
207 {
208@@ -70,7 +71,7 @@
209 string FindFile(const char *Name,const char *Default = 0) const;
210 string FindDir(const char *Name,const char *Default = 0) const;
211 int FindI(const char *Name,int Default = 0) const;
212- int FindI(string Name,bool Default = 0) const {return FindI(Name.c_str(),Default);};
213+ int FindI(string Name,bool Default = 0) const {return FindI(Name.c_str(),int (Default));};
214 bool FindB(const char *Name,bool Default = false) const;
215 bool FindB(string Name,bool Default = false) const {return FindB(Name.c_str(),Default);};
216 string FindAny(const char *Name,const char *Default = 0) const;
217diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/error.cc apt-0.3.19cnc55/apt-pkg/contrib/error.cc
218--- apt-0.3.19cnc55.org/apt-pkg/contrib/error.cc Tue Mar 12 18:04:10 2002
219+++ apt-0.3.19cnc55/apt-pkg/contrib/error.cc Tue Mar 12 17:18:31 2002
220@@ -26,6 +26,9 @@
221 #include <stdarg.h>
222 #include <unistd.h>
223
224+#include <iostream>
225+using namespace std;
226+
227 #include "config.h"
228 /*}}}*/
229
230diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/error.h apt-0.3.19cnc55/apt-pkg/contrib/error.h
231--- apt-0.3.19cnc55.org/apt-pkg/contrib/error.h Tue Mar 12 18:04:10 2002
232+++ apt-0.3.19cnc55/apt-pkg/contrib/error.h Tue Mar 12 17:18:38 2002
233@@ -45,6 +45,7 @@
234 #endif
235
236 #include <string>
237+using namespace std;
238
239 class GlobalError
240 {
241diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/fileutl.cc apt-0.3.19cnc55/apt-pkg/contrib/fileutl.cc
242--- apt-0.3.19cnc55.org/apt-pkg/contrib/fileutl.cc Tue Mar 12 18:04:10 2002
243+++ apt-0.3.19cnc55/apt-pkg/contrib/fileutl.cc Tue Mar 12 17:18:31 2002
244@@ -28,6 +28,8 @@
245 #include <sys/wait.h>
246 #include <signal.h>
247 #include <errno.h>
248+#include <iostream>
249+using namespace std;
250 /*}}}*/
251
252 // CopyFile - Buffered copy of a file /*{{{*/
253diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/fileutl.h apt-0.3.19cnc55/apt-pkg/contrib/fileutl.h
254--- apt-0.3.19cnc55.org/apt-pkg/contrib/fileutl.h Tue Mar 12 18:04:10 2002
255+++ apt-0.3.19cnc55/apt-pkg/contrib/fileutl.h Tue Mar 12 17:18:38 2002
256@@ -26,6 +26,7 @@
257 #endif
258
259 #include <string>
260+using namespace std;
261
262 class FileFd
263 {
264diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/i18n.h apt-0.3.19cnc55/apt-pkg/contrib/i18n.h
265--- apt-0.3.19cnc55.org/apt-pkg/contrib/i18n.h Tue Mar 12 18:04:10 2002
266+++ apt-0.3.19cnc55/apt-pkg/contrib/i18n.h Tue Mar 12 17:18:31 2002
267@@ -46,8 +46,8 @@
268 # define bindtextdomain(Domain, Directory) /* empty */
269 # undef textdomain
270 # define textdomain(Domain) /* empty */
271-# undef setlocale
272-# define setlocale(cat, log)
273+//# undef setlocale
274+//# define setlocale(cat, log)
275 # define _(a) a
276 #endif
277
278diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/md5.cc apt-0.3.19cnc55/apt-pkg/contrib/md5.cc
279--- apt-0.3.19cnc55.org/apt-pkg/contrib/md5.cc Tue Mar 12 18:04:10 2002
280+++ apt-0.3.19cnc55/apt-pkg/contrib/md5.cc Tue Mar 12 17:18:31 2002
281@@ -191,7 +191,7 @@
282 /* Converts the hex string into a set of chars */
283 bool MD5SumValue::Set(string Str)
284 {
285- return Hex2Num(Str.begin(),Str.end(),Sum,sizeof(Sum));
286+ return Hex2Num(Str.data(),Str.data()+Str.size(),Sum,sizeof(Sum));
287 }
288 /*}}}*/
289 // MD5SumValue::Value - Convert the number into a string /*{{{*/
290diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/md5.h apt-0.3.19cnc55/apt-pkg/contrib/md5.h
291--- apt-0.3.19cnc55.org/apt-pkg/contrib/md5.h Tue Mar 12 18:04:10 2002
292+++ apt-0.3.19cnc55/apt-pkg/contrib/md5.h Tue Mar 12 17:18:38 2002
293@@ -28,12 +28,13 @@
294 #endif
295
296 #include <string>
297+using namespace std;
298
299 class MD5Summation;
300
301 class MD5SumValue
302 {
303- friend MD5Summation;
304+ friend class MD5Summation;
305 unsigned char Sum[4*4];
306
307 public:
308diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/mmap.h apt-0.3.19cnc55/apt-pkg/contrib/mmap.h
309--- apt-0.3.19cnc55.org/apt-pkg/contrib/mmap.h Tue Mar 12 18:04:10 2002
310+++ apt-0.3.19cnc55/apt-pkg/contrib/mmap.h Tue Mar 12 17:18:38 2002
311@@ -92,7 +92,7 @@
312 unsigned long RawAllocate(unsigned long Size,unsigned long Aln = 0);
313 unsigned long Allocate(unsigned long ItemSize);
314 unsigned long WriteString(const char *String,unsigned long Len = (unsigned long)-1);
315- inline unsigned long WriteString(string S) {return WriteString(S.begin(),S.size());};
316+ inline unsigned long WriteString(string S) {return WriteString(S.data(),S.size());};
317 void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;};
318
319 DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace = 2*1024*1024);
320diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/progress.cc apt-0.3.19cnc55/apt-pkg/contrib/progress.cc
321--- apt-0.3.19cnc55.org/apt-pkg/contrib/progress.cc Tue Mar 12 18:04:10 2002
322+++ apt-0.3.19cnc55/apt-pkg/contrib/progress.cc Tue Mar 12 17:18:31 2002
323@@ -15,6 +15,7 @@
324 #include <apt-pkg/error.h>
325 #include <apt-pkg/configuration.h>
326 #include <stdio.h>
327+#include <iostream>
328 /*}}}*/
329 #include <i18n.h>
330
331diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/progress.h apt-0.3.19cnc55/apt-pkg/contrib/progress.h
332--- apt-0.3.19cnc55.org/apt-pkg/contrib/progress.h Tue Mar 12 18:04:10 2002
333+++ apt-0.3.19cnc55/apt-pkg/contrib/progress.h Tue Mar 12 17:18:38 2002
334@@ -27,6 +27,7 @@
335
336 #include <string>
337 #include <sys/time.h>
338+using namespace std;
339
340 class Configuration;
341 class OpProgress
342diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/strutl.cc apt-0.3.19cnc55/apt-pkg/contrib/strutl.cc
343--- apt-0.3.19cnc55.org/apt-pkg/contrib/strutl.cc Tue Mar 12 18:04:10 2002
344+++ apt-0.3.19cnc55/apt-pkg/contrib/strutl.cc Tue Mar 12 17:18:31 2002
345@@ -464,22 +464,22 @@
346 {
347 // Look for a matching tag.
348 int Length = strlen(Tag);
349- for (string::iterator I = Message.begin(); I + Length < Message.end(); I++)
350+ for (const char *I = Message.data(); I + Length < Message.data()+Message.size(); I++)
351 {
352 // Found the tag
353 if (I[Length] == ':' && stringcasecmp(I,I+Length,Tag) == 0)
354 {
355 // Find the end of line and strip the leading/trailing spaces
356- string::iterator J;
357+ const char *J;
358 I += Length + 1;
359- for (; isspace(*I) != 0 && I < Message.end(); I++);
360- for (J = I; *J != '\n' && J < Message.end(); J++);
361+ for (; isspace(*I) != 0 && I < Message.data()+Message.size(); I++);
362+ for (J = I; *J != '\n' && J < Message.data()+Message.size(); J++);
363 for (; J > I && isspace(J[-1]) != 0; J--);
364
365 return string(I,J-I);
366 }
367
368- for (; *I != '\n' && I < Message.end(); I++);
369+ for (; *I != '\n' && I < Message.data()+Message.size(); I++);
370 }
371
372 // Failed to find a match
373@@ -492,7 +492,7 @@
374 // ---------------------------------------------------------------------
375 /* This inspects the string to see if it is true or if it is false and
376 then returns the result. Several varients on true/false are checked. */
377-int StringToBool(string Text,int Default = -1)
378+int StringToBool(string Text,int Default)
379 {
380 char *End;
381 int Res = strtol(Text.c_str(),&End,0);
382@@ -867,16 +867,16 @@
383 matched against the argument */
384 bool CheckDomainList(string Host,string List)
385 {
386- string::const_iterator Start = List.begin();
387- for (string::const_iterator Cur = List.begin(); Cur <= List.end(); Cur++)
388+ const char *Start = List.data();
389+ for (const char *Cur = List.data(); Cur <= List.data()+List.size(); Cur++)
390 {
391- if (Cur < List.end() && *Cur != ',')
392+ if (Cur < List.data()+List.size() && *Cur != ',')
393 continue;
394
395 // Match the end of the string..
396 if ((Host.size() >= (unsigned)(Cur - Start)) &&
397 Cur - Start != 0 &&
398- stringcasecmp(Host.end() - (Cur - Start),Host.end(),Start,Cur) == 0)
399+ stringcasecmp(Host.data()+Host.size() - (Cur - Start),Host.data()+Host.size(),Start,Cur) == 0)
400 return true;
401
402 Start = Cur + 1;
403diff -urN apt-0.3.19cnc55.org/apt-pkg/contrib/strutl.h apt-0.3.19cnc55/apt-pkg/contrib/strutl.h
404--- apt-0.3.19cnc55.org/apt-pkg/contrib/strutl.h Tue Mar 12 18:04:10 2002
405+++ apt-0.3.19cnc55/apt-pkg/contrib/strutl.h Tue Mar 12 17:18:38 2002
406@@ -24,7 +24,8 @@
407 #include <string>
408 #include <vector>
409 #include <time.h>
410-
411+using namespace std;
412+
413 char *_strstrip(char *String);
414 char *_strtabexpand(char *String,size_t Len);
415 bool ParseQuoteWord(const char *&String,string &Res);
416@@ -49,11 +50,11 @@
417
418 int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
419 inline int stringcmp(const char *A,const char *AEnd,const char *B) {return stringcmp(A,AEnd,B,B+strlen(B));};
420-inline int stringcmp(string A,const char *B) {return stringcmp(A.begin(),A.end(),B,B+strlen(B));};
421+inline int stringcmp(string A,const char *B) {return stringcmp(A.data(),A.data()+A.size(),B,B+strlen(B));};
422 int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
423 inline int stringcasecmp(const char *A,const char *AEnd,const char *B) {return stringcasecmp(A,AEnd,B,B+strlen(B));};
424-inline int stringcasecmp(string A,const char *B) {return stringcasecmp(A.begin(),A.end(),B,B+strlen(B));};
425-inline int stringcasecmp(string A,string B) {return stringcasecmp(A.begin(),A.end(),B.begin(),B.end());};
426+inline int stringcasecmp(string A,const char *B) {return stringcasecmp(A.data(),A.data()+A.size(),B,B+strlen(B));};
427+inline int stringcasecmp(string A,string B) {return stringcasecmp(A.data(),A.data()+A.size(),B.data(),B.data()+B.size());};
428
429 class URI
430 {
431diff -urN apt-0.3.19cnc55.org/apt-pkg/deb/deblistparser.cc apt-0.3.19cnc55/apt-pkg/deb/deblistparser.cc
432--- apt-0.3.19cnc55.org/apt-pkg/deb/deblistparser.cc Tue Mar 12 18:04:10 2002
433+++ apt-0.3.19cnc55/apt-pkg/deb/deblistparser.cc Tue Mar 12 17:18:31 2002
434@@ -17,6 +17,7 @@
435 #include <apt-pkg/crc-16.h>
436
437 #include <system.h>
438+#include <ctype.h>
439 /*}}}*/
440
441 // ListParser::debListParser - Constructor /*{{{*/
442@@ -483,7 +484,7 @@
443 if (Section.Find("Architecture",Start,Stop) == false)
444 return true;
445
446- if (stringcmp(Start,Stop,Arch.begin(),Arch.end()) == 0)
447+ if (stringcmp(Start,Stop,Arch.data(),Arch.data()+Arch.size()) == 0)
448 return true;
449
450 if (stringcmp(Start,Stop,"all") == 0)
451diff -urN apt-0.3.19cnc55.org/apt-pkg/deb/debsrcrecords.cc apt-0.3.19cnc55/apt-pkg/deb/debsrcrecords.cc
452--- apt-0.3.19cnc55.org/apt-pkg/deb/debsrcrecords.cc Tue Mar 12 18:04:10 2002
453+++ apt-0.3.19cnc55/apt-pkg/deb/debsrcrecords.cc Tue Mar 12 17:18:31 2002
454@@ -33,17 +33,17 @@
455 return 0;
456 // XXX no bounds check: exploitable?
457 // Strip any leading spaces
458- string::const_iterator Start = Bins.begin();
459- for (; Start != Bins.end() && isspace(*Start) != 0; Start++);
460+ const char *Start = Bins.data();
461+ for (; Start != Bins.data()+Bins.size() && isspace(*Start) != 0; Start++);
462
463- string::const_iterator Pos = Start;
464- while (Pos != Bins.end())
465+ const char *Pos = Start;
466+ while (Pos != Bins.data()+Bins.size())
467 {
468 // Skip to the next ','
469- for (; Pos != Bins.end() && *Pos != ','; Pos++);
470+ for (; Pos != Bins.data()+Bins.size() && *Pos != ','; Pos++);
471
472 // Back remove spaces
473- string::const_iterator End = Pos;
474+ const char *End = Pos;
475 for (; End > Start && (End[-1] == ',' || isspace(End[-1]) != 0); End--);
476
477 // Stash the string
478@@ -54,7 +54,7 @@
479 *Buf++ = 0;
480
481 // Advance pos
482- for (; Pos != Bins.end() && (*Pos == ',' || isspace(*Pos) != 0); Pos++);
483+ for (; Pos != Bins.data()+Bins.size() && (*Pos == ',' || isspace(*Pos) != 0); Pos++);
484 Start = Pos;
485 }
486
487diff -urN apt-0.3.19cnc55.org/apt-pkg/deb/dpkginit.cc apt-0.3.19cnc55/apt-pkg/deb/dpkginit.cc
488--- apt-0.3.19cnc55.org/apt-pkg/deb/dpkginit.cc Tue Mar 12 18:04:10 2002
489+++ apt-0.3.19cnc55/apt-pkg/deb/dpkginit.cc Tue Mar 12 17:18:31 2002
490@@ -23,6 +23,7 @@
491 #include <sys/types.h>
492 #include <unistd.h>
493 #include <dirent.h>
494+#include <ctype.h>
495 /*}}}*/
496
497 // DpkgLock::pkgDpkgLock - Constructor /*{{{*/
498diff -urN apt-0.3.19cnc55.org/apt-pkg/deb/dpkgpm.cc apt-0.3.19cnc55/apt-pkg/deb/dpkgpm.cc
499--- apt-0.3.19cnc55.org/apt-pkg/deb/dpkgpm.cc Tue Mar 12 18:04:10 2002
500+++ apt-0.3.19cnc55/apt-pkg/deb/dpkgpm.cc Tue Mar 12 17:18:31 2002
501@@ -23,6 +23,8 @@
502 #include <signal.h>
503 #include <errno.h>
504 #include <stdio.h>
505+#include <iostream>
506+using namespace std;
507 /*}}}*/
508
509 // DPkgPM::pkgDPkgPM - Constructor /*{{{*/
510@@ -200,7 +202,7 @@
511
512 /* Feed the filename of each package that is pending install
513 into the pipe. */
514- if (Fd.Write(I->File.begin(),I->File.length()) == false ||
515+ if (Fd.Write(I->File.data(),I->File.length()) == false ||
516 Fd.Write("\n",1) == false)
517 {
518 kill(Process,SIGINT);
519diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgcache.cc apt-0.3.19cnc55/apt-pkg/pkgcache.cc
520--- apt-0.3.19cnc55.org/apt-pkg/pkgcache.cc Tue Mar 12 18:04:10 2002
521+++ apt-0.3.19cnc55/apt-pkg/pkgcache.cc Tue Mar 12 17:18:31 2002
522@@ -144,7 +144,7 @@
523 for (const char *I = Str.begin(); I != Str.end(); I++)
524 Hash = 5*Hash + tolower(*I);
525 #else
526- for (const char *I = Str.begin(); I != Str.end(); I++)
527+ for (const char *I = Str.data(); I != Str.data()+Str.size(); I++)
528 Hash = 5*Hash + *I;
529 #endif
530 return Hash % _count(HeaderP->HashTable);
531@@ -179,7 +179,7 @@
532 return PkgIterator(*this,Pkg);
533 #else
534 if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] &&
535- stringcmp(Name.begin(),Name.end(),StrP + Pkg->Name) == 0)
536+ stringcmp(Name.data(),Name.data()+Name.size(),StrP + Pkg->Name) == 0)
537 return PkgIterator(*this,Pkg);
538 #endif
539 }
540diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgcache.h apt-0.3.19cnc55/apt-pkg/pkgcache.h
541--- apt-0.3.19cnc55.org/apt-pkg/pkgcache.h Tue Mar 12 18:04:10 2002
542+++ apt-0.3.19cnc55/apt-pkg/pkgcache.h Tue Mar 12 17:18:38 2002
543@@ -48,12 +48,12 @@
544 class PrvIterator;
545 class PkgFileIterator;
546 class VerFileIterator;
547- friend PkgIterator;
548- friend VerIterator;
549- friend DepIterator;
550- friend PrvIterator;
551- friend PkgFileIterator;
552- friend VerFileIterator;
553+ friend class PkgIterator;
554+ friend class VerIterator;
555+ friend class DepIterator;
556+ friend class PrvIterator;
557+ friend class PkgFileIterator;
558+ friend class VerFileIterator;
559
560 // These are all the constants used in the cache structures
561 struct Dep
562diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgcachegen.cc apt-0.3.19cnc55/apt-pkg/pkgcachegen.cc
563--- apt-0.3.19cnc55.org/apt-pkg/pkgcachegen.cc Tue Mar 12 18:04:10 2002
564+++ apt-0.3.19cnc55/apt-pkg/pkgcachegen.cc Tue Mar 12 17:18:31 2002
565@@ -108,7 +108,7 @@
566 int Res = 1;
567 for (; Ver.end() == false; Last = &Ver->NextVer, Ver++)
568 {
569- Res = _system->versionCompare(Version.begin(),Version.end(),Ver.VerStr(),
570+ Res = _system->versionCompare(Version.data(),Version.data()+Version.size(),Ver.VerStr(),
571 Ver.VerStr() + strlen(Ver.VerStr()));
572 if (Res >= 0) {
573 break;
574@@ -158,7 +158,7 @@
575 {
576 for (; Ver.end() == false; Last = &Ver->NextVer, Ver++)
577 {
578- Res = _system->versionCompare(Version.begin(),Version.end(),Ver.VerStr(),
579+ Res = _system->versionCompare(Version.data(),Version.data()+Version.size(),Ver.VerStr(),
580 Ver.VerStr() + strlen(Ver.VerStr()));
581 if (Res != 0)
582 break;
583diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgcachegen.h apt-0.3.19cnc55/apt-pkg/pkgcachegen.h
584--- apt-0.3.19cnc55.org/apt-pkg/pkgcachegen.h Tue Mar 12 18:04:10 2002
585+++ apt-0.3.19cnc55/apt-pkg/pkgcachegen.h Tue Mar 12 17:18:38 2002
586@@ -39,7 +39,7 @@
587 public:
588
589 class ListParser;
590- friend ListParser;
591+ friend class ListParser;
592
593 protected:
594
595@@ -74,7 +74,7 @@
596 class pkgCacheGenerator::ListParser
597 {
598 pkgCacheGenerator *Owner;
599- friend pkgCacheGenerator;
600+ friend class pkgCacheGenerator;
601
602 // Some cache items
603 pkgCache::VerIterator OldDepVer;
604diff -urN apt-0.3.19cnc55.org/apt-pkg/pkgrecords.h apt-0.3.19cnc55/apt-pkg/pkgrecords.h
605--- apt-0.3.19cnc55.org/apt-pkg/pkgrecords.h Tue Mar 12 18:04:10 2002
606+++ apt-0.3.19cnc55/apt-pkg/pkgrecords.h Tue Mar 12 17:18:38 2002
607@@ -60,7 +60,7 @@
608 protected:
609
610 public:
611- friend pkgRecords;
612+ friend class pkgRecords;
613
614 virtual bool Jump(pkgCache::VerFileIterator const &Ver) = 0;
615
616diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmfactory.h apt-0.3.19cnc55/apt-pkg/rpm/rpmfactory.h
617--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmfactory.h Tue Mar 12 18:04:10 2002
618+++ apt-0.3.19cnc55/apt-pkg/rpm/rpmfactory.h Tue Mar 12 17:18:38 2002
619@@ -4,7 +4,7 @@
620
621 #include <apt-pkg/systemfactory.h>
622 #include <map>
623-#include <slist>
624+#include <list>
625 #include <vector>
626
627 class RPMFactory : public SystemFactory
628diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmlistparser.cc apt-0.3.19cnc55/apt-pkg/rpm/rpmlistparser.cc
629--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmlistparser.cc Tue Mar 12 18:04:10 2002
630+++ apt-0.3.19cnc55/apt-pkg/rpm/rpmlistparser.cc Tue Mar 12 17:18:31 2002
631@@ -80,7 +80,7 @@
632 char *p;
633
634 #ifdef DUPPACK
635- AllowedDupPackages = new slist<regex_t*>;
636+ AllowedDupPackages = new list<regex_t*>;
637
638 const Configuration::Item *Top = _config->Tree("RPM::AllowedDupPkgs");
639
640@@ -108,7 +108,7 @@
641 AllowedDupPackages = NULL;//akk
642 #endif
643
644- HoldPackages = new slist<regex_t*>;
645+ HoldPackages = new list<regex_t*>;
646
647 Top = _config->Tree("RPM::HoldPkgs");
648
649@@ -180,7 +180,7 @@
650
651 if (AllowedDupPackages != NULL)
652 {
653- for (slist<regex_t*>::iterator iter = AllowedDupPackages->begin();
654+ for (list<regex_t*>::iterator iter = AllowedDupPackages->begin();
655 iter != AllowedDupPackages->end();
656 iter++)
657 {
658@@ -459,7 +459,7 @@
659 {
660 const char *str = Package().c_str();
661
662- for (slist<regex_t*>::iterator iter = HoldPackages->begin();
663+ for (list<regex_t*>::iterator iter = HoldPackages->begin();
664 iter != HoldPackages->end();
665 iter++)
666 {
667diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmlistparser.h apt-0.3.19cnc55/apt-pkg/rpm/rpmlistparser.h
668--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmlistparser.h Tue Mar 12 18:04:10 2002
669+++ apt-0.3.19cnc55/apt-pkg/rpm/rpmlistparser.h Tue Mar 12 17:18:38 2002
670@@ -16,9 +16,10 @@
671 #include <apt-pkg/pkgcachegen.h>
672 #include <rpm/rpmlib.h>
673 #include <map>
674-#include <slist>
675+#include <list>
676 #include <vector>
677 #include <regex.h>
678+using namespace std;
679
680 class rpmListParser : public pkgCacheGenerator::ListParser
681 {
682@@ -33,10 +34,10 @@
683 map<string,string> *multiarchs;
684
685 map<string,long> *DupPackages;
686- slist<regex_t*> *AllowedDupPackages;
687+ list<regex_t*> *AllowedDupPackages;
688 bool duplicated;
689
690- slist<regex_t*> *HoldPackages;
691+ list<regex_t*> *HoldPackages;
692
693 bool parsing_hdlist;
694
695diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmpm.cc apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.cc
696--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmpm.cc Tue Mar 12 18:04:10 2002
697+++ apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.cc Tue Mar 12 17:18:31 2002
698@@ -26,6 +26,8 @@
699 #include <stdio.h>
700
701 #include <string.h>
702+#include <iostream>
703+using namespace std;
704
705 #include <i18n.h>
706
707@@ -208,7 +210,7 @@
708
709 /* Feed the filename of each package that is pending install
710 into the pipe. */
711- if (Fd.Write(I->File.begin(),I->File.length()) == false ||
712+ if (Fd.Write(I->File.data(),I->File.length()) == false ||
713 Fd.Write("\n",1) == false)
714 {
715 kill(Process,SIGINT);
716@@ -229,7 +231,7 @@
717
718 /*}}}*/
719
720-bool pkgRPMPM::ExecRPM(Operation operation, slist<char*> *files, bool nodeps)
721+bool pkgRPMPM::ExecRPM(Operation operation, list<char*> *files, bool nodeps)
722 {
723 // Generate the argument list
724 const char *Args[10000];
725@@ -330,7 +332,7 @@
726 break;
727 }
728
729- for (slist<char*>::iterator i = files->begin();
730+ for (list<char*>::iterator i = files->begin();
731 i != files->end() && n < sizeof(Args);
732 i++)
733 {
734@@ -422,9 +424,9 @@
735 }
736
737
738-bool pkgRPMPM::Process(slist<char*> *install,
739- slist<char*> *upgrade,
740- slist<char*> *uninstall)
741+bool pkgRPMPM::Process(list<char*> *install,
742+ list<char*> *upgrade,
743+ list<char*> *uninstall)
744 {
745 if (_config->FindB("RPM::Check-Signatures", false) == true)
746 {
747@@ -469,9 +471,9 @@
748 if (RunScriptsWithPkgs("RPM::Pre-Install-Pkgs") == false)
749 return false;
750
751- slist<char*> *install = new slist<char*>;
752- slist<char*> *upgrade = new slist<char*>;
753- slist<char*> *uninstall = new slist<char*>;
754+ list<char*> *install = new list<char*>;
755+ list<char*> *upgrade = new list<char*>;
756+ list<char*> *uninstall = new list<char*>;
757
758 for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)
759 {
760diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmpm.h apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.h
761--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmpm.h Tue Mar 12 18:04:10 2002
762+++ apt-0.3.19cnc55/apt-pkg/rpm/rpmpm.h Tue Mar 12 17:18:38 2002
763@@ -17,7 +17,7 @@
764
765 #include <apt-pkg/packagemanager.h>
766 #include <vector>
767-#include <slist>
768+#include <list>
769
770
771 class pkgRPMPM : public pkgPackageManager
772@@ -50,10 +50,10 @@
773 virtual bool Configure(PkgIterator Pkg);
774 virtual bool Remove(PkgIterator Pkg,bool Purge = false);
775
776- bool ExecRPM(Operation operation, slist<char*> *files, bool nodeps);
777- bool Process(slist<char*> *install,
778- slist<char*> *upgrade,
779- slist<char*> *uninstall);
780+ bool ExecRPM(Operation operation, list<char*> *files, bool nodeps);
781+ bool Process(list<char*> *install,
782+ list<char*> *upgrade,
783+ list<char*> *uninstall);
784
785 virtual bool Go();
786 virtual void Reset();
787diff -urN apt-0.3.19cnc55.org/apt-pkg/rpm/rpmversion.cc apt-0.3.19cnc55/apt-pkg/rpm/rpmversion.cc
788--- apt-0.3.19cnc55.org/apt-pkg/rpm/rpmversion.cc Tue Mar 12 18:04:10 2002
789+++ apt-0.3.19cnc55/apt-pkg/rpm/rpmversion.cc Tue Mar 12 17:18:31 2002
790@@ -22,7 +22,7 @@
791
792 int RPMFactory::versionCompare(string A,string B)
793 {
794- return versionCompare(A.begin(),A.end(),B.begin(),B.end());
795+ return versionCompare(A.data(),A.data()+A.size(),B.data(),B.data()+B.size());
796 }
797
798
799diff -urN apt-0.3.19cnc55.org/apt-pkg/sourcelist.cc apt-0.3.19cnc55/apt-pkg/sourcelist.cc
800--- apt-0.3.19cnc55.org/apt-pkg/sourcelist.cc Tue Mar 12 18:04:10 2002
801+++ apt-0.3.19cnc55/apt-pkg/sourcelist.cc Tue Mar 12 17:21:01 2002
802@@ -22,7 +22,7 @@
803
804 #include <i18n.h>
805
806-#include <fstream.h>
807+#include <fstream>
808 #include <stdio.h>
809 #include <unistd.h>
810 #include <errno.h>
811@@ -91,7 +91,7 @@
812 bool pkgSourceList::Read(string File)
813 {
814 // Open the stream for reading
815- ifstream F(File.c_str(),ios::in | ios::nocreate);
816+ ifstream F(File.c_str(),ios::in);
817 if (!F != 0)
818 return _error->Errno("ifstream::ifstream","Opening %s",File.c_str());
819
820diff -urN apt-0.3.19cnc55.org/apt-pkg/sourcelist.h apt-0.3.19cnc55/apt-pkg/sourcelist.h
821--- apt-0.3.19cnc55.org/apt-pkg/sourcelist.h Tue Mar 12 18:04:10 2002
822+++ apt-0.3.19cnc55/apt-pkg/sourcelist.h Tue Mar 12 17:20:20 2002
823@@ -23,7 +23,7 @@
824 #include <string>
825 #include <vector>
826 #include <map>
827-#include <iostream.h>
828+#include <iostream>
829 #include <apt-pkg/pkgcache.h>
830
831 #ifdef __GNUG__
832diff -urN apt-0.3.19cnc55.org/apt-pkg/tagfile.cc apt-0.3.19cnc55/apt-pkg/tagfile.cc
833--- apt-0.3.19cnc55.org/apt-pkg/tagfile.cc Tue Mar 12 18:04:10 2002
834+++ apt-0.3.19cnc55/apt-pkg/tagfile.cc Tue Mar 12 17:18:31 2002
835@@ -23,6 +23,8 @@
836
837 #include <string>
838 #include <stdio.h>
839+#include <iostream>
840+using namespace std;
841 /*}}}*/
842
843 // TagFile::pkgTagFile - Constructor /*{{{*/
844diff -urN apt-0.3.19cnc55.org/apt-pkg/version.cc apt-0.3.19cnc55/apt-pkg/version.cc
845--- apt-0.3.19cnc55.org/apt-pkg/version.cc Tue Mar 12 18:04:10 2002
846+++ apt-0.3.19cnc55/apt-pkg/version.cc Tue Mar 12 17:18:31 2002
847@@ -50,7 +50,7 @@
848
849 int SystemFactory::versionCompare(string A,string B)
850 {
851- return versionCompare(A.begin(),A.end(),B.begin(),B.end());
852+ return versionCompare(A.data(),A.data()+A.size(),B.data(),B.data()+B.size());
853 }
854
855 /*}}}*/
856diff -urN apt-0.3.19cnc55.org/cmdline/apt-cache.cc apt-0.3.19cnc55/cmdline/apt-cache.cc
857--- apt-0.3.19cnc55.org/cmdline/apt-cache.cc Tue Mar 12 18:04:10 2002
858+++ apt-0.3.19cnc55/cmdline/apt-cache.cc Tue Mar 12 17:24:41 2002
859@@ -38,7 +38,7 @@
860
861 #include <i18n.h>
862
863-#include <iostream.h>
864+#include <iostream>
865 #include <unistd.h>
866 #include <errno.h>
867 #include <regex.h>
868diff -urN apt-0.3.19cnc55.org/cmdline/apt-cdrom.cc apt-0.3.19cnc55/cmdline/apt-cdrom.cc
869--- apt-0.3.19cnc55.org/cmdline/apt-cdrom.cc Tue Mar 12 18:04:10 2002
870+++ apt-0.3.19cnc55/cmdline/apt-cdrom.cc Tue Mar 12 17:31:04 2002
871@@ -34,6 +34,7 @@
872 #include <unistd.h>
873 #include <stdio.h>
874 /*}}}*/
875+using namespace std;
876
877 #define PACKAGES "pkglist"
878 #define SOURCES "srclist"
879@@ -514,7 +515,8 @@
880 string File = _config->FindFile("Dir::Etc::sourcelist");
881
882 // Open the stream for reading
883- ifstream F(File.c_str(),ios::in | ios::nocreate);
884+ ifstream F((FileExists(File)?File.c_str():"/dev/null"),
885+ ios::in );
886 if (!F != 0)
887 return _error->Errno("ifstream::ifstream","Opening %s",File.c_str());
888
889diff -urN apt-0.3.19cnc55.org/cmdline/apt-get.cc apt-0.3.19cnc55/cmdline/apt-get.cc
890--- apt-0.3.19cnc55.org/cmdline/apt-get.cc Tue Mar 12 18:04:10 2002
891+++ apt-0.3.19cnc55/cmdline/apt-get.cc Tue Mar 12 17:28:13 2002
892@@ -54,7 +54,7 @@
893
894 #include "acqprogress.h"
895
896-#include <fstream.h>
897+#include <fstream>
898 #include <termios.h>
899 #include <sys/ioctl.h>
900 #include <sys/stat.h>
901@@ -66,11 +66,11 @@
902 #include <regex.h>
903 #include <sys/wait.h>
904 /*}}}*/
905+using namespace std;
906
907-
908-ostream c0out;
909-ostream c1out;
910-ostream c2out;
911+ostream c0out(0);
912+ostream c1out(0);
913+ostream c2out(0);
914 ofstream devnull("/dev/null");
915 unsigned int ScreenWidth = 80;
916
917@@ -1202,7 +1202,7 @@
918 // Populate it with the source selection
919 for (I = List.begin(); I != List.end(); I++)
920 {
921- new pkgAcqIndex(&Fetcher,I);
922+ new pkgAcqIndex(&Fetcher,&*I);
923 if (_error->PendingError() == true)
924 return false;
925 }
926diff -urN apt-0.3.19cnc55.org/cmdline/rpmindexcopy.cc apt-0.3.19cnc55/cmdline/rpmindexcopy.cc
927--- apt-0.3.19cnc55.org/cmdline/rpmindexcopy.cc Tue Mar 12 18:04:10 2002
928+++ apt-0.3.19cnc55/cmdline/rpmindexcopy.cc Tue Mar 12 17:31:30 2002
929@@ -7,7 +7,7 @@
930 #include <apt-pkg/tagfile.h>
931
932
933-#include <iostream.h>
934+#include <iostream>
935 #include <unistd.h>
936 #include <sys/stat.h>
937 #include <stdio.h>
938diff -urN apt-0.3.19cnc55.org/methods/cdrom.cc apt-0.3.19cnc55/methods/cdrom.cc
939--- apt-0.3.19cnc55.org/methods/cdrom.cc Tue Mar 12 18:04:10 2002
940+++ apt-0.3.19cnc55/methods/cdrom.cc Tue Mar 12 17:18:31 2002
941@@ -17,6 +17,8 @@
942 #include <utime.h>
943 #include <sys/stat.h>
944 #include <unistd.h>
945+#include <iostream>
946+using namespace std;
947 /*}}}*/
948
949 class CDROMMethod : public pkgAcqMethod
950diff -urN apt-0.3.19cnc55.org/methods/gpg.cc apt-0.3.19cnc55/methods/gpg.cc
951--- apt-0.3.19cnc55.org/methods/gpg.cc Tue Mar 12 18:04:10 2002
952+++ apt-0.3.19cnc55/methods/gpg.cc Tue Mar 12 17:18:31 2002
953@@ -8,6 +8,7 @@
954 #include <utime.h>
955 #include <stdio.h>
956 #include <sys/wait.h>
957+#include <ctype.h>
958
959
960 class GPGMethod : public pkgAcqMethod
961diff -urN apt-0.3.19cnc55.org/tools/cached_md5.cc apt-0.3.19cnc55/tools/cached_md5.cc
962--- apt-0.3.19cnc55.org/tools/cached_md5.cc Tue Mar 12 18:04:10 2002
963+++ apt-0.3.19cnc55/tools/cached_md5.cc Tue Mar 12 17:40:00 2002
964@@ -38,10 +38,10 @@
965 #include <dirent.h>
966 #include <errno.h>
967 #include <fcntl.h>
968+#include <string.h>
969 #include <rpm/rpmlib.h>
970 #include <rpm/misc.h>
971 #include <stdlib.h>
972-#include <string.h>
973 #include <sys/stat.h>
974 #include <unistd.h>
975 #include <assert.h>
976diff -urN apt-0.3.19cnc55.org/tools/cached_md5.h apt-0.3.19cnc55/tools/cached_md5.h
977--- apt-0.3.19cnc55.org/tools/cached_md5.h Tue Mar 12 18:04:10 2002
978+++ apt-0.3.19cnc55/tools/cached_md5.h Tue Mar 12 17:39:18 2002
979@@ -16,6 +16,8 @@
980 #include <string>
981 #include <map>
982
983+using namespace std;
984+
985 class CachedMD5
986 {
987 string filename;
988diff -urN apt-0.3.19cnc55.org/tools/genpkglist.cc apt-0.3.19cnc55/tools/genpkglist.cc
989--- apt-0.3.19cnc55.org/tools/genpkglist.cc Tue Mar 12 18:04:10 2002
990+++ apt-0.3.19cnc55/tools/genpkglist.cc Tue Mar 12 17:38:11 2002
991@@ -74,6 +74,7 @@
992 #include <assert.h>
993
994 #include <map>
995+#include <iostream>
996
997 #include <apt-pkg/error.h>
998 #include <apt-pkg/tagfile.h>
999@@ -82,7 +83,7 @@
1000
1001 #include "cached_md5.h"
1002
1003-
1004+using namespace std;
1005
1006 #define CRPMTAG_TIMESTAMP 1012345
1007
1008diff -urN apt-0.3.19cnc55.org/tools/gensrclist.cc apt-0.3.19cnc55/tools/gensrclist.cc
1009--- apt-0.3.19cnc55.org/tools/gensrclist.cc Tue Mar 12 18:04:10 2002
1010+++ apt-0.3.19cnc55/tools/gensrclist.cc Tue Mar 12 17:49:06 2002
1011@@ -47,8 +47,9 @@
1012 #include <unistd.h>
1013 #include <assert.h>
1014
1015+#include <iostream>
1016 #include <map>
1017-#include <slist>
1018+#include <list>
1019
1020 #include <apt-pkg/error.h>
1021 #include <apt-pkg/tagfile.h>
1022@@ -56,7 +57,7 @@
1023
1024 #include "cached_md5.h"
1025
1026-
1027+using namespace std;
1028
1029
1030
1031@@ -105,7 +106,7 @@
1032 }
1033 }
1034
1035-bool readRPMTable(char *file, map<string, slist<char*>* > &table)
1036+bool readRPMTable(char *file, map<string, list<char*>* > &table)
1037 {
1038 FILE *indexf;
1039 char buf[512];
1040@@ -129,14 +130,14 @@
1041 srpm = string(buf);
1042
1043 if (table.find(srpm) != table.end()) {
1044- slist<char*> *list = table[srpm];
1045+ list<char*> *xlist = table[srpm];
1046
1047- list->push_front(strdup(f));
1048+ xlist->push_front(strdup(f));
1049 } else {
1050- slist<char*> *list = new slist<char*>;
1051+ list<char*> *xlist = new list<char*>;
1052
1053- list->push_front(strdup(f));
1054- table[srpm] = list;
1055+ xlist->push_front(strdup(f));
1056+ table[srpm] = xlist;
1057 }
1058 }
1059
1060@@ -175,7 +176,7 @@
1061 char *directory;
1062 char *index;
1063 CachedMD5 *md5cache;
1064- map<string, slist<char*>* > rpmTable; // table that maps srpm -> generated rpm
1065+ map<string, list<char*>* > rpmTable; // table that maps srpm -> generated rpm
1066 bool mapi = false;
1067 bool progressBar = false;
1068 bool flatStructure = false;
1069@@ -329,24 +330,24 @@
1070 foundInIndex = false;
1071 {
1072 int count = 0;
1073- char **list = NULL;
1074- slist<char*> *rpmlist = rpmTable[string(dirEntries[entry_cur]->d_name)];
1075+ char **xlist = NULL;
1076+ list<char*> *rpmlist = rpmTable[string(dirEntries[entry_cur]->d_name)];
1077
1078 if (rpmlist) {
1079- list = new char *[rpmlist->size()];
1080+ xlist = new char *[rpmlist->size()];
1081
1082 foundInIndex = true;
1083
1084- for (slist<char*>::const_iterator i = rpmlist->begin();
1085+ for (list<char*>::const_iterator i = rpmlist->begin();
1086 i != rpmlist->end();
1087 i++) {
1088- list[count++] = *i;
1089+ xlist[count++] = *i;
1090 }
1091 }
1092
1093 if (count) {
1094 headerAddEntry(newHeader, CRPMTAG_BINARY,
1095- RPM_STRING_ARRAY_TYPE, list, count);
1096+ RPM_STRING_ARRAY_TYPE, xlist, count);
1097 }
1098 }
1099 if (foundInIndex || !mapi)
1100diff -urN apt-0.3.19cnc55.org/tools/hdlist2pkglist.cc apt-0.3.19cnc55/tools/hdlist2pkglist.cc
1101--- apt-0.3.19cnc55.org/tools/hdlist2pkglist.cc Tue Mar 12 18:04:10 2002
1102+++ apt-0.3.19cnc55/tools/hdlist2pkglist.cc Tue Mar 12 17:50:29 2002
1103@@ -36,21 +36,24 @@
1104 #include <dirent.h>
1105 #include <errno.h>
1106 #include <fcntl.h>
1107+#include <string.h>
1108 #include <rpmlib.h>
1109 #include <rpm/misc.h>
1110 #include <stdlib.h>
1111-#include <string.h>
1112 #include <sys/stat.h>
1113 #include <sys/types.h>
1114 #include <unistd.h>
1115 #include <assert.h>
1116
1117 #include <map>
1118+#include <iostream>
1119
1120 #include <apt-pkg/error.h>
1121 #include <apt-pkg/tagfile.h>
1122 #include <apt-pkg/rpminit.h>
1123
1124+using namespace std;
1125+
1126 // from rpmlib
1127 extern "C" {
1128 extern int mdfile(const char *fn, unsigned char *digest);
This page took 0.173148 seconds and 4 git commands to generate.