diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2015-05-12 22:50:18 +0200 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2015-05-12 22:50:18 +0200 |
commit | aef71733e0912bc9ffd9df80c75378c11c70a361 (patch) | |
tree | 153ca0cc1ef2241b437b221633a695f7ebc35778 /src/export | |
parent | 0aa86c5517397a635ca1e63747dd1eefad944960 (diff) |
Fix: dump Ort and PLZ in the first record of a continuation. Until now it only was dumped in continuations
Diffstat (limited to 'src/export')
-rw-r--r-- | src/export/extract_version_1.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/export/extract_version_1.c b/src/export/extract_version_1.c index f5a75b8..0e03e1e 100644 --- a/src/export/extract_version_1.c +++ b/src/export/extract_version_1.c | |||
@@ -94,15 +94,14 @@ static void split_to_files( uint8_t *entries, int num_entries ) | |||
94 | 94 | ||
95 | *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '0'; | 95 | *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '0'; |
96 | 96 | ||
97 | /* mimic flags from telefonbuch v4 */ | ||
97 | if( entry ) | 98 | if( entry ) |
98 | { | ||
99 | /* mimic flags from telefonbuch v4 */ | ||
100 | *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '2'; | 99 | *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '2'; |
100 | else { | ||
101 | *( g_state.outbuf[0] + g_state.outfill[0]++ ) = num_entries > 1 ? '1' : '0'; | ||
101 | memcpy( g_state.outbuf[12] + g_state.outfill[12], g_state.ort, g_state.ort_len ); g_state.outfill[12] += g_state.ort_len; | 102 | memcpy( g_state.outbuf[12] + g_state.outfill[12], g_state.ort, g_state.ort_len ); g_state.outfill[12] += g_state.ort_len; |
102 | memcpy( g_state.outbuf[13] + g_state.outfill[13], g_state.zip, g_state.zip_len ); g_state.outfill[13] += g_state.zip_len; | 103 | memcpy( g_state.outbuf[13] + g_state.outfill[13], g_state.zip, g_state.zip_len ); g_state.outfill[13] += g_state.zip_len; |
103 | } | 104 | } |
104 | else | ||
105 | *( g_state.outbuf[0] + g_state.outfill[0]++ ) = num_entries > 1 ? '1' : '0'; | ||
106 | 105 | ||
107 | *( g_state.outbuf[0 ] + g_state.outfill[0 ]++ ) = '\n'; | 106 | *( g_state.outbuf[0 ] + g_state.outfill[0 ]++ ) = '\n'; |
108 | *( g_state.outbuf[12] + g_state.outfill[12]++ ) = '\n'; | 107 | *( g_state.outbuf[12] + g_state.outfill[12]++ ) = '\n'; |