summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--src/export/split_version_2.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index cc8af84..22a1693 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
1BINARIES=bin/extract_version_1 bin/extract_version_2 bin/extract_version_3 bin/extract_version_4 bin/split_version_3 bin/map_coords bin/convert_coords 1BINARIES=bin/extract_version_1 bin/extract_version_2 bin/extract_version_3 bin/extract_version_4 bin/split_version_2 bin/split_version_3 bin/map_coords bin/convert_coords
2CFLAGS += -W -Wall -Wextra -O3 # -Weverything -Wno-cast-align -Wno-padded 2CFLAGS += -W -Wall -Wextra -O3 # -Weverything -Wno-cast-align -Wno-padded
3 3
4all: $(BINARIES) 4all: $(BINARIES)
@@ -18,6 +18,9 @@ bin/extract_version_1: src/export/extract_version_1.c src/export/mystdlib.c
18bin/split_version_3: src/export/split_version_3.c 18bin/split_version_3: src/export/split_version_3.c
19 $(CC) $(CFLAGS) -o $@ src/export/split_version_3.c 19 $(CC) $(CFLAGS) -o $@ src/export/split_version_3.c
20 20
21bin/split_version_2: src/export/split_version_2.c src/export/mystdlib.c
22 $(CC) $(CFLAGS) -o $@ src/export/split_version_2.c src/export/mystdlib.c
23
21bin/map_coords: src/export/map_coords.c src/export/mystdlib.c 24bin/map_coords: src/export/map_coords.c src/export/mystdlib.c
22 $(CC) $(CFLAGS) -o $@ src/export/map_coords.c src/export/mystdlib.c 25 $(CC) $(CFLAGS) -o $@ src/export/map_coords.c src/export/mystdlib.c
23 26
diff --git a/src/export/split_version_2.c b/src/export/split_version_2.c
index 9f04412..2b7a79f 100644
--- a/src/export/split_version_2.c
+++ b/src/export/split_version_2.c
@@ -129,7 +129,7 @@ static void act_on_record( uint8_t * end, uint16_t base ) {
129 uint16_t num_dwords = rec[0]; 129 uint16_t num_dwords = rec[0];
130 uint16_t flagbytes = rec[1]; 130 uint16_t flagbytes = rec[1];
131 uint32_t flags = 0; 131 uint32_t flags = 0;
132 int bold = 0, i, j; 132 int bold = 0, i;
133 133
134 for (i=0; i<flagbytes; ++i) flags = (flags<<8) | *--end; 134 for (i=0; i<flagbytes; ++i) flags = (flags<<8) | *--end;
135 135
@@ -137,6 +137,7 @@ static void act_on_record( uint8_t * end, uint16_t base ) {
137 putchar( 27 ) ; putchar( '[' ); putchar( '3' ); 137 putchar( 27 ) ; putchar( '[' ); putchar( '3' );
138 putchar( ( flags & test_me ) ? '1' : '2' ); 138 putchar( ( flags & test_me ) ? '1' : '2' );
139 putchar( 'm' ); */ 139 putchar( 'm' ); */
140 (void)bold;
140 141
141 printf( "-------- %03d: %06X\n", num_dwords, flags ); 142 printf( "-------- %03d: %06X\n", num_dwords, flags );
142 for (i = 0; i < num_dwords; i++ ) { 143 for (i = 0; i < num_dwords; i++ ) {
@@ -160,6 +161,10 @@ int main( int args, char **argv ) {
160 MAP data, index; 161 MAP data, index;
161 uint32_t * indoff; 162 uint32_t * indoff;
162 163
164 if( args != 3 ) {
165 fprintf( stderr, "Syntax: %s <dumpfile> <indexfile>\n", argv[0] );
166 exit(1);
167 }
163 data = map_file( argv[1], 1 ); 168 data = map_file( argv[1], 1 );
164 index = map_file( argv[2], 1 ); 169 index = map_file( argv[2], 1 );
165 170