FreeCalypso > hg > fc-sim-tools
comparison utils/sws-card-lookup.c @ 28:fa81221ac9b6
retrieval of required db fields moved into libutil
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Tue, 16 Mar 2021 23:37:36 +0000 |
| parents | ca8a6f95826a |
| children |
comparison
equal
deleted
inserted
replaced
| 27:ca8a6f95826a | 28:fa81221ac9b6 |
|---|---|
| 46 lookup_one_key(key) | 46 lookup_one_key(key) |
| 47 char *key; | 47 char *key; |
| 48 { | 48 { |
| 49 char *val; | 49 char *val; |
| 50 | 50 |
| 51 val = dbread_find_key(&dbs, key); | 51 val = dbread_find_key_req(&dbs, key); |
| 52 if (!val) { | 52 if (!val) |
| 53 fprintf(stderr, "error: card record has no %s field\n", key); | 53 exit(1); /* error msg already printed */ |
| 54 exit(1); | |
| 55 } | |
| 56 puts(val); | 54 puts(val); |
| 57 } | 55 } |
| 58 | 56 |
| 59 static void | 57 static void |
| 60 lookup_mult_keys(keys) | 58 lookup_mult_keys(keys) |
