scripts: move mega-sena in
[lcapit-junk-code.git] / CEP / C / db.h
blob1e304e0542a29adb8547c29e0c96d77e3a787d2d
1 #ifndef __DB_H
2 #define __DB_H
4 #include <stdio.h>
6 /* exported values */
7 #define DB_UF_LEN 3
8 #define DB_CEP_LEN 8 /* defined by the Correios */
10 /* each line of db file */
11 struct db_entry {
12 unsigned int cep;
13 char uf[DB_UF_LEN];
14 char *cidade;
15 char *bairro;
16 char *desc;
19 /* exported functions */
20 struct db_entry *db_next_entry(FILE *db);
21 void db_free_entry(struct db_entry **entry);
22 void db_dump_entry(const struct db_entry *entry);
23 void db_print_entry(const struct db_entry *entry);
24 void db_dump_csv(FILE *db);
25 int db_entries_match(const struct db_entry *ent1,
26 const struct db_entry *ent2);
28 #endif /* __DB_H */