diff options
Diffstat (limited to 'src/export')
-rw-r--r-- | src/export/extract_version_1.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/export/extract_version_1.c b/src/export/extract_version_1.c index 27489ec..8651735 100644 --- a/src/export/extract_version_1.c +++ b/src/export/extract_version_1.c | |||
@@ -124,13 +124,14 @@ void act_on_page( uint8_t *file, uint8_t *page, int page_nr ) | |||
124 | uint16_t * recs = (uint16_t*)(page + 0xe); | 124 | uint16_t * recs = (uint16_t*)(page + 0xe); |
125 | 125 | ||
126 | /* printf( " Acting on page %04d with flag %d and %04d records.\n", page_nr, flag, num_records ); */ | 126 | /* printf( " Acting on page %04d with flag %d and %04d records.\n", page_nr, flag, num_records ); */ |
127 | (void)page_nr; /* silence warning about unused variable */ | ||
127 | 128 | ||
128 | if( !blob_len ) /* Handle blob, pages when they're referenced */ | 129 | if( !blob_len ) /* Handle blob, pages when they're referenced */ |
129 | for( record = 0; record < num_records; ++record ) | 130 | for( record = 0; record < num_records; ++record ) |
130 | act_on_record( file, flag, page + 0xe, recs[record] ); | 131 | act_on_record( file, flag, page + 0xe, recs[record] ); |
131 | } | 132 | } |
132 | 133 | ||
133 | void act_on_file( uint8_t *file, size_t len ) | 134 | void act_on_file( uint8_t *file ) |
134 | { | 135 | { |
135 | int page, num_pages = *(uint16_t*)(file+0x40); | 136 | int page, num_pages = *(uint16_t*)(file+0x40); |
136 | int num_records = *(uint32_t*)(file+0x42); | 137 | int num_records = *(uint32_t*)(file+0x42); |
@@ -151,7 +152,7 @@ void act_on_file( uint8_t *file, size_t len ) | |||
151 | act_on_page( file, file + 0x800 + 0x2000 * page, page ); | 152 | act_on_page( file, file + 0x800 + 0x2000 * page, page ); |
152 | } | 153 | } |
153 | 154 | ||
154 | int main( int args, char **argv ) | 155 | int main( ) |
155 | { | 156 | { |
156 | char filename[1024]; | 157 | char filename[1024]; |
157 | MAP f; | 158 | MAP f; |
@@ -167,7 +168,7 @@ int main( int args, char **argv ) | |||
167 | filename[strlen(filename)-1] = 0; /* fgets sucks */ | 168 | filename[strlen(filename)-1] = 0; /* fgets sucks */ |
168 | f = map_file( filename, 1 ); | 169 | f = map_file( filename, 1 ); |
169 | 170 | ||
170 | act_on_file( f->addr, f->size ); | 171 | act_on_file( f->addr ); |
171 | unmap_file( &f ); | 172 | unmap_file( &f ); |
172 | } | 173 | } |
173 | 174 | ||