comparison scn2k/scn2kdump.cc @ 52:15a18fbe6f21

* Known bugs added to the README * Code cleaning (0 -> NULL when needed, indentation, spaces, ...)
author thib
date Sat, 18 Apr 2009 18:35:39 +0000
parents d229cce98f50
children 4416cfac86ae
comparison
equal deleted inserted replaced
51:cbb301016a4e 52:15a18fbe6f21
16 * with this program; if not, write to the Free Software Foundation, Inc., 16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 * 18 *
19 */ 19 */
20 20
21 #include<stdlib.h> 21 #include <stdlib.h>
22 #include<stdarg.h> 22 #include <stdarg.h>
23 #include<stdio.h> 23 #include <stdio.h>
24 #include<string.h> 24 #include <string.h>
25 #include<string> 25 #include <string>
26 #include<vector> 26 #include <vector>
27 #include<map> 27 #include <map>
28 28
29 using namespace std; 29 using namespace std;
30 30
31 #include"system/file.h" 31 #include "system/file.h"
32 #include"system/file_impl.h" 32 #include "system/file_impl.h"
33 33
34 #include "scn2k.h" 34 #include "scn2k.h"
35 35
36 36
37 #define SCN_DUMP 37 #define SCN_DUMP
116 /* dump files */ 116 /* dump files */
117 archive.InitList(); 117 archive.InitList();
118 char* fname; 118 char* fname;
119 fprintf(stderr,"Dump start\n"); 119 fprintf(stderr,"Dump start\n");
120 while( (fname = archive.ListItem()) != 0) { 120 while( (fname = archive.ListItem()) != 0) {
121 ARCINFO* info = archive.Find(fname,""); 121 ARCINFO* info = archive.Find(fname, "");
122 if (info == 0) continue; 122 if (info == NULL) continue;
123 char* data = info->CopyRead(); 123 char* data = info->CopyRead();
124 char* d = data; 124 char* d = data;
125 char* dend = d + info->Size(); 125 char* dend = d + info->Size();
126 /* version ³ΞΗ§ */ 126 /* version ³ΞΗ§ */
127 if (read_little_endian_int(d) == 0x1cc) { 127 if (read_little_endian_int(d) == 0x1cc) {