From fb3616e06ca20ffe78dfb00b962a2599a46b2a5f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 29 Jun 2019 18:51:00 +0200 Subject: Clean up 1992 post processing --- src/postprocess/merge_entries.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/postprocess/merge_entries.c') diff --git a/src/postprocess/merge_entries.c b/src/postprocess/merge_entries.c index f9ee67d..1dd7d50 100644 --- a/src/postprocess/merge_entries.c +++ b/src/postprocess/merge_entries.c @@ -148,9 +148,10 @@ static int sort_me(const void *f_a, const void *f_b) { outvec_t *oa_row = oa + row * COLUMNS; outvec_t *ob_row = ob + row * COLUMNS; + if ((res = STRCMP_n(oa_row[ 2].ptr, ob_row[ 2].ptr))) return res; /* PLZ */ + if ((res = STRCMP_n(oa_row[ 9].ptr, ob_row[ 9].ptr))) return res; /* Ort */ if ((res = STRCMP_n(oa_row[10].ptr, ob_row[10].ptr))) return res; /* Vorwahl */ if ((res = STRCMP_n(oa_row[11].ptr, ob_row[11].ptr))) return res; /* Rufnummer */ - if ((res = STRCMP_n(oa_row[ 2].ptr, ob_row[ 2].ptr))) return res; /* PLZ */ if ((res = STRCMP_n(oa_row[ 6].ptr, ob_row[ 6].ptr))) return res; /* Strasse */ if ((res = STRCMP_n(oa_row[ 7].ptr, ob_row[ 7].ptr))) return res; /* Hausnummer */ if ((res = STRCMP_n(oa_row[ 3].ptr, ob_row[ 3].ptr))) return res; /* Nachname */ @@ -200,7 +201,7 @@ int main(int argc, char **args) { unsigned long current = 0, i, flag; uint64_t year_list = 0, revflag_list = 0, bizflag_list = 0; - if (argc != 1) exit(1); + if (argc != 2) exit(1); tbuch = map_file(args[1], 1); /* Estimate upper bound for amount of lines */ -- cgit v1.2.3