From 3b80551d7892d9151aa372f3644c76fb471cc96a Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 15 May 2015 01:35:59 +0200 Subject: Renumbering for one unused file --- makecolumns.sh | 26 +++++++----- src/export/split_version_2.c | 98 ++++++++++++++++++++++---------------------- 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() { done mv 01_unknown 01_Flags - mv 17_unknown 02_Nachname - mv 08_unknown 03_Vorname - mv 15_unknown 04_Namenszusatz - mv 12_unknown 05_Adresszusatz - mv 13_unknown 06_Ortszusatz - mv 09_unknown 07_Strasse - mv 11_unknown 08_Hausnummer - mv 14_unknown 09_Fax_Verweise + mv 16_unknown 02_Nachname + mv 07_unknown 03_Vorname + mv 14_unknown 04_Namenszusatz + mv 11_unknown 05_Adresszusatz + mv 12_unknown 06_Ortszusatz + mv 08_unknown 07_Strasse + mv 10_unknown 08_Hausnummer + mv 13_unknown 09_Fax_Verweise mv 02_unknown 10_Postleitzahl - mv 16_unknown 11_Ort - mv 06_unknown 12_Vorwahl - mv 07_unknown 13_Rufnummer + mv 15_unknown 11_Ort + mv 09_unknown 11_Ort_Gemeinde + mv 05_unknown 12_Vorwahl + mv 06_unknown 13_Rufnummer + + # remove entries that are for searching only + rm 03_unknown 04_unknown printf "Normalizing zusaetze ... " 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 @@ /* 01_unknown => 01_Flags -17_unknown => 02_Nachname -08_unknown => 03_Vorname -12_unknown => 04_Zusaetze - 14_unknown => 05_Zusaetze (sw) - 15_unknown => 05_Zusaetze (no) -13_unknown => 06_Ortszusatz -09_unknown => 07_Strasse -11_unknown => 08_Hausnummer - 15_unknown => 09_Verweise (sw) - 14_unknown => 09_Verweise (no) -04_unknown => 10_Postleitzahl -10_unknown => 11_Ort - 06_unknown => 12_Vorwahl (sw) - 07_unknown => 12_Vorwahl (no) - 07_unknown => 13_Rufnummer (sw) - 06_unknown => 13_Rufnummer (no) +16_unknown => 02_Nachname +07_unknown => 03_Vorname +11_unknown => 04_Zusaetze + 13_unknown => 05_Zusaetze (sw) + 14_unknown => 05_Zusaetze (no) +12_unknown => 06_Ortszusatz +08_unknown => 07_Strasse +10_unknown => 08_Hausnummer + 14_unknown => 09_Verweise (sw) + 13_unknown => 09_Verweise (no) +03_unknown => 10_Postleitzahl +09_unknown => 11_Ort + 05_unknown => 12_Vorwahl (sw) + 06_unknown => 12_Vorwahl (no) + 06_unknown => 13_Rufnummer (sw) + 05_unknown => 13_Rufnummer (no) no s w 4003 01 01 01 @@ -32,29 +32,29 @@ 4009 - *:"0" - 400B - - 6:"0" 400C - !!! - => in 1996_Q1: 04_Namenszusatz -400E 12 07 - -400F 06 06 14 -4010 - - 07 -4011 17 - 17 -4012 07 17 06 -4013 14 09 09 -4014 13 11 11 -4015 09 12 04 -4016 11 04 10 -4017 04 10 13 -4018 10 14 - -401A - 13 12 -401B 08 08 08 -401C 15 15 15 +400E 11 06 - +400F 05 05 13 +4010 - - 06 +4011 16 - 16 +4012 06 16 05 +4013 13 08 08 +4014 12 10 10 +4015 08 11 03 +4016 10 03 09 +4017 03 09 12 +4018 09 13 - +401A - 12 11 +401B 07 07 07 +401C 14 14 14 */ -enum { g_outfiles = 17 }; +enum { g_outfiles = 16 }; static enum { CD_NO = 0, CD_S = 1, CD_W = 2 } g_cd; static int g_outfilemap[3][29] = { - {-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 }, - {-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 }, - {-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 } + {-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 }, + {-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 }, + {-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 } }; static struct { @@ -131,31 +131,31 @@ static void dump_primary( uint8_t *end, uint32_t flags ) { if( flags & 0x0080 ) dump_string( end -= 5, 5, 1 ); /* There is an unclear X present, if this bit is set */ - if( flags & 0x0040 ) dump_string( end -= 1, 1, 4 ); + if( flags & 0x0040 ) dump_string( end -= 1, 1, 3 ); if( flags & 0x0020 ) { if( g_cd != CD_NO ) - dump_string( end -= 5, 5, 5 ); + dump_string( end -= 5, 5, 4 ); else - dump_field( &end, 6 ); + dump_field( &end, 5 ); } - if( flags & 0x0010 ) dump_field( &end, g_cd == CD_NO ? 5 : 6 ); - if( flags & 0x0008 ) dump_field( &end, 7 ); - if( flags & 0x0004 ) dump_field( &end, 8 ); - if( flags & 0x0002 ) dump_field( &end, 9 ); - if( flags & 0x0001 ) dump_field( &end, 10 ); - if( flags & 0x8000 ) dump_field( &end, 11 ); - if( flags & 0x4000 ) dump_field( &end, 12 ); - if( flags & 0x2000 ) dump_field( &end, g_cd == CD_NO ? 13 : 14 ); - if( flags & 0x1000 ) dump_field( &end, g_cd == CD_NO ? 14 : 13 ); + if( flags & 0x0010 ) dump_field( &end, g_cd == CD_NO ? 4 : 5 ); + if( flags & 0x0008 ) dump_field( &end, 6 ); + if( flags & 0x0004 ) dump_field( &end, 7 ); + if( flags & 0x0002 ) dump_field( &end, 8 ); + if( flags & 0x0001 ) dump_field( &end, 9 ); + if( flags & 0x8000 ) dump_field( &end, 10 ); + if( flags & 0x4000 ) dump_field( &end, 11 ); + if( flags & 0x2000 ) dump_field( &end, g_cd == CD_NO ? 12 : 13 ); + if( flags & 0x1000 ) dump_field( &end, g_cd == CD_NO ? 13 : 12 ); - dump_field( &end, 15 ); + dump_field( &end, 14 ); - /* Dump first 5 chars of prefix, they're always here in no */ + /* Dump static prefix, it's always here in no */ if( g_cd == CD_NO ) dump_field( &end, 2 ); - dump_field( &end, 16 ); + dump_field( &end, 15 ); } static void act_on_record( uint8_t * end, uint16_t base ) { -- cgit v1.2.3