summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmakecolumns.sh26
-rw-r--r--src/export/split_version_2.c98
2 files changed, 64 insertions, 60 deletions
diff --git a/makecolumns.sh b/makecolumns.sh
index 810992d..a6e0572 100755
--- a/makecolumns.sh
+++ b/makecolumns.sh
@@ -132,18 +132,22 @@ handle_format_version_2() {
132 done 132 done
133 133
134 mv 01_unknown 01_Flags 134 mv 01_unknown 01_Flags
135 mv 17_unknown 02_Nachname 135 mv 16_unknown 02_Nachname
136 mv 08_unknown 03_Vorname 136 mv 07_unknown 03_Vorname
137 mv 15_unknown 04_Namenszusatz 137 mv 14_unknown 04_Namenszusatz
138 mv 12_unknown 05_Adresszusatz 138 mv 11_unknown 05_Adresszusatz
139 mv 13_unknown 06_Ortszusatz 139 mv 12_unknown 06_Ortszusatz
140 mv 09_unknown 07_Strasse 140 mv 08_unknown 07_Strasse
141 mv 11_unknown 08_Hausnummer 141 mv 10_unknown 08_Hausnummer
142 mv 14_unknown 09_Fax_Verweise 142 mv 13_unknown 09_Fax_Verweise
143 mv 02_unknown 10_Postleitzahl 143 mv 02_unknown 10_Postleitzahl
144 mv 16_unknown 11_Ort 144 mv 15_unknown 11_Ort
145 mv 06_unknown 12_Vorwahl 145 mv 09_unknown 11_Ort_Gemeinde
146 mv 07_unknown 13_Rufnummer 146 mv 05_unknown 12_Vorwahl
147 mv 06_unknown 13_Rufnummer
148
149 # remove entries that are for searching only
150 rm 03_unknown 04_unknown
147 151
148 printf "Normalizing zusaetze ... " 152 printf "Normalizing zusaetze ... "
149 lam 04_Namenszusatz 05_Adresszusatz | tr '\t' ' ' | sed -E s/' +'/' '/g > 04_Zusaetze 153 lam 04_Namenszusatz 05_Adresszusatz | tr '\t' ' ' | sed -E s/' +'/' '/g > 04_Zusaetze
diff --git a/src/export/split_version_2.c b/src/export/split_version_2.c
index 64c3eee..324e61d 100644
--- a/src/export/split_version_2.c
+++ b/src/export/split_version_2.c
@@ -9,22 +9,22 @@
9/* 9/*
10 10
1101_unknown => 01_Flags 1101_unknown => 01_Flags
1217_unknown => 02_Nachname 1216_unknown => 02_Nachname
1308_unknown => 03_Vorname 1307_unknown => 03_Vorname
1412_unknown => 04_Zusaetze 1411_unknown => 04_Zusaetze
15 14_unknown => 05_Zusaetze (sw) 15 13_unknown => 05_Zusaetze (sw)
16 15_unknown => 05_Zusaetze (no) 16 14_unknown => 05_Zusaetze (no)
1713_unknown => 06_Ortszusatz 1712_unknown => 06_Ortszusatz
1809_unknown => 07_Strasse 1808_unknown => 07_Strasse
1911_unknown => 08_Hausnummer 1910_unknown => 08_Hausnummer
20 15_unknown => 09_Verweise (sw) 20 14_unknown => 09_Verweise (sw)
21 14_unknown => 09_Verweise (no) 21 13_unknown => 09_Verweise (no)
2204_unknown => 10_Postleitzahl 2203_unknown => 10_Postleitzahl
2310_unknown => 11_Ort 2309_unknown => 11_Ort
24 06_unknown => 12_Vorwahl (sw) 24 05_unknown => 12_Vorwahl (sw)
25 07_unknown => 12_Vorwahl (no) 25 06_unknown => 12_Vorwahl (no)
26 07_unknown => 13_Rufnummer (sw) 26 06_unknown => 13_Rufnummer (sw)
27 06_unknown => 13_Rufnummer (no) 27 05_unknown => 13_Rufnummer (no)
28 28
29 no s w 29 no s w
304003 01 01 01 304003 01 01 01
@@ -32,29 +32,29 @@
324009 - *:"0" - 324009 - *:"0" -
33400B - - 6:"0" 33400B - - 6:"0"
34400C - !!! - => in 1996_Q1: 04_Namenszusatz 34400C - !!! - => in 1996_Q1: 04_Namenszusatz
35400E 12 07 - 35400E 11 06 -
36400F 06 06 14 36400F 05 05 13
374010 - - 07 374010 - - 06
384011 17 - 17 384011 16 - 16
394012 07 17 06 394012 06 16 05
404013 14 09 09 404013 13 08 08
414014 13 11 11 414014 12 10 10
424015 09 12 04 424015 08 11 03
434016 11 04 10 434016 10 03 09
444017 04 10 13 444017 03 09 12
454018 10 14 - 454018 09 13 -
46401A - 13 12 46401A - 12 11
47401B 08 08 08 47401B 07 07 07
48401C 15 15 15 48401C 14 14 14
49 49
50*/ 50*/
51 51
52enum { g_outfiles = 17 }; 52enum { g_outfiles = 16 };
53static enum { CD_NO = 0, CD_S = 1, CD_W = 2 } g_cd; 53static enum { CD_NO = 0, CD_S = 1, CD_W = 2 } g_cd;
54static int g_outfilemap[3][29] = { 54static int g_outfilemap[3][29] = {
55 {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,11, 6,-1,16, 5,13,12, 8,10, 1, 9,-1,-1, 7,14 }, 55 {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10, 5,-1,15, 4,12,11, 7, 9, 1, 8,-1,-1, 6,13 },
56 {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,11,-1, 6, 5,-1,-1,16, 8,10,11, 1, 9,13,-1,12, 7,14 }, 56 {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,10,-1, 5, 4,-1,-1,15, 7, 9,10, 1, 8,12,-1,11, 6,13 },
57 {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,13, 6,16, 5, 8,10, 1, 9,12,-1,-1,11, 7,14 } 57 {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,12, 5,15, 4, 7, 9, 1, 8,11,-1,-1,10, 6,13 }
58}; 58};
59 59
60static struct { 60static struct {
@@ -131,31 +131,31 @@ static void dump_primary( uint8_t *end, uint32_t flags ) {
131 if( flags & 0x0080 ) dump_string( end -= 5, 5, 1 ); 131 if( flags & 0x0080 ) dump_string( end -= 5, 5, 1 );
132 132
133 /* There is an unclear X present, if this bit is set */ 133 /* There is an unclear X present, if this bit is set */
134 if( flags & 0x0040 ) dump_string( end -= 1, 1, 4 ); 134 if( flags & 0x0040 ) dump_string( end -= 1, 1, 3 );
135 135
136 if( flags & 0x0020 ) { 136 if( flags & 0x0020 ) {
137 if( g_cd != CD_NO ) 137 if( g_cd != CD_NO )
138 dump_string( end -= 5, 5, 5 ); 138 dump_string( end -= 5, 5, 4 );
139 else 139 else
140 dump_field( &end, 6 ); 140 dump_field( &end, 5 );
141 } 141 }
142 142
143 if( flags & 0x0010 ) dump_field( &end, g_cd == CD_NO ? 5 : 6 ); 143 if( flags & 0x0010 ) dump_field( &end, g_cd == CD_NO ? 4 : 5 );
144 if( flags & 0x0008 ) dump_field( &end, 7 ); 144 if( flags & 0x0008 ) dump_field( &end, 6 );
145 if( flags & 0x0004 ) dump_field( &end, 8 ); 145 if( flags & 0x0004 ) dump_field( &end, 7 );
146 if( flags & 0x0002 ) dump_field( &end, 9 ); 146 if( flags & 0x0002 ) dump_field( &end, 8 );
147 if( flags & 0x0001 ) dump_field( &end, 10 ); 147 if( flags & 0x0001 ) dump_field( &end, 9 );
148 if( flags & 0x8000 ) dump_field( &end, 11 ); 148 if( flags & 0x8000 ) dump_field( &end, 10 );
149 if( flags & 0x4000 ) dump_field( &end, 12 ); 149 if( flags & 0x4000 ) dump_field( &end, 11 );
150 if( flags & 0x2000 ) dump_field( &end, g_cd == CD_NO ? 13 : 14 ); 150 if( flags & 0x2000 ) dump_field( &end, g_cd == CD_NO ? 12 : 13 );
151 if( flags & 0x1000 ) dump_field( &end, g_cd == CD_NO ? 14 : 13 ); 151 if( flags & 0x1000 ) dump_field( &end, g_cd == CD_NO ? 13 : 12 );
152 152
153 dump_field( &end, 15 ); 153 dump_field( &end, 14 );
154 154
155 /* Dump first 5 chars of prefix, they're always here in no */ 155 /* Dump static prefix, it's always here in no */
156 if( g_cd == CD_NO ) 156 if( g_cd == CD_NO )
157 dump_field( &end, 2 ); 157 dump_field( &end, 2 );
158 dump_field( &end, 16 ); 158 dump_field( &end, 15 );
159} 159}
160 160
161static void act_on_record( uint8_t * end, uint16_t base ) { 161static void act_on_record( uint8_t * end, uint16_t base ) {