diff options
Diffstat (limited to 'src/postprocess/map_plz.h')
| -rw-r--r-- | src/postprocess/map_plz.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/postprocess/map_plz.h b/src/postprocess/map_plz.h new file mode 100644 index 0000000..8839b5c --- /dev/null +++ b/src/postprocess/map_plz.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | typedef struct { | ||
| 4 | const char * vorwahl; | ||
| 5 | const char * ort; | ||
| 6 | const char * strasse; | ||
| 7 | const char * hnr; | ||
| 8 | const char * name; | ||
| 9 | const char * vorname; | ||
| 10 | const char * nummer; | ||
| 11 | const char * plz; | ||
| 12 | } entry_t; | ||
| 13 | |||
| 14 | typedef struct { | ||
| 15 | const char * vorwahl; | ||
| 16 | const char * ort; | ||
| 17 | const char * strasse_1992; | ||
| 18 | const char * strasse_1995; | ||
| 19 | int similarity; | ||
| 20 | int count; | ||
| 21 | } brute_t; | ||
| 22 | |||
| 23 | static void *bsearch_first( const void * const key, const void * base, const size_t nel, const size_t width, int (*compar) (const void *, const void *)); | ||
| 24 | static int sort_by_voshnvn(const void *a, const void *b); | ||
| 25 | static int sort_by_voshnv(const void *a, const void *b); | ||
| 26 | static int sort_by_vosh(const void *a, const void *b); | ||
| 27 | static int sort_by_vos(const void *a, const void *b); | ||
| 28 | static int sort_by_vonvh(const void *a, const void *b); | ||
| 29 | static int sort_by_vo(const void *a, const void *b); | ||
| 30 | static int sort_brutes(const void *a, const void *b); | ||
| 31 | static int search_brute(const void *a, const void *b); | ||
| 32 | static int test_dot(entry_t * iter, entry_t * found); | ||
| 33 | |||
| 34 | static int cc(const void *a, const void *b) { return strcmp(*(char**)a, *(char**)b); } | ||
| 35 | static int cc2(const void *a, const void *b) { return strcmp((char*)a, *(char**)b); } | ||
| 36 | static entry_t * verify_unique_zip(entry_t *found, entry_t *candidate, int (*compar) (const void *, const void *)); | ||
| 37 | static entry_t * verify_zip(entry_t *found, entry_t *candidate, int (*compar) (const void *, const void *)); | ||
| 38 | static int search_and_verify(entry_t *candidate, int (*compar) (const void *, const void *), int flag); | ||
| 39 | static char * advance_and_replace(char **p, char find, char replace); | ||
