From: Peter Verthez Date: Sat, 21 Dec 2002 15:42:50 +0000 (+0000) Subject: Small extra function. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=142cae619a6337562fa40e8b566d426ee231deca;p=gedcom-parse.git Small extra function. --- diff --git a/t/src/dump_gom.c b/t/src/dump_gom.c index 358c27f..75487c8 100644 --- a/t/src/dump_gom.c +++ b/t/src/dump_gom.c @@ -85,17 +85,25 @@ void dump_date(int st, int prefix_depth, struct date_value* dv) output(st, "%stype: %d\n", prefix, dv->type); output(st, "%sdate1:\n", prefix); output(st, "%s calendar type: %d\n", prefix, dv->date1.cal); - output(st, "%s day: '%s'\n", prefix, str_val(dv->date1.day_str)); - output(st, "%s month: '%s'\n", prefix, str_val(dv->date1.month_str)); - output(st, "%s year: '%s'\n", prefix, str_val(dv->date1.year_str)); + output(st, "%s day: '%s', %d\n", prefix, + str_val(dv->date1.day_str), dv->date1.day); + output(st, "%s month: '%s', %d\n", prefix, + str_val(dv->date1.month_str), dv->date1.month); + output(st, "%s year: '%s', %d\n", prefix, + str_val(dv->date1.year_str), dv->date1.year); + output(st, "%s year type: %d\n", prefix, dv->date1.year_type); output(st, "%s date type: %d\n", prefix, dv->date1.type); output(st, "%s sdn1: %ld\n", prefix, dv->date1.sdn1); output(st, "%s sdn2: %ld\n", prefix, dv->date1.sdn2); output(st, "%sdate2:\n", prefix); output(st, "%s calendar type: %d\n", prefix, dv->date2.cal); - output(st, "%s day: '%s'\n", prefix, str_val(dv->date2.day_str)); - output(st, "%s month: '%s'\n", prefix, str_val(dv->date2.month_str)); - output(st, "%s year: '%s'\n", prefix, str_val(dv->date2.year_str)); + output(st, "%s day: '%s', %d\n", prefix, + str_val(dv->date2.day_str), dv->date2.day); + output(st, "%s month: '%s', %d\n", prefix, + str_val(dv->date2.month_str), dv->date2.month); + output(st, "%s year: '%s', %d\n", prefix, + str_val(dv->date2.year_str), dv->date2.year); + output(st, "%s year type: %d\n", prefix, dv->date2.year_type); output(st, "%s date type: %d\n", prefix, dv->date2.type); output(st, "%s sdn1: %ld\n", prefix, dv->date2.sdn1); output(st, "%s sdn2: %ld\n", prefix, dv->date2.sdn2); @@ -107,6 +115,11 @@ void dump_date(int st, int prefix_depth, struct date_value* dv) free(prefix); } +void show_date(struct date_value* dv) +{ + dump_date(0, 2, dv); +} + void dump_age(int st, int prefix_depth, struct age_value* age) { char* prefix = make_prefix(prefix_depth); diff --git a/t/src/dump_gom.h b/t/src/dump_gom.h index 645819b..d5acfaf 100644 --- a/t/src/dump_gom.h +++ b/t/src/dump_gom.h @@ -24,6 +24,9 @@ #ifndef __DUMP_GOM_H #define __DUMP_GOM_H +#include "gedcom.h" + void show_data(); +void show_date(struct date_value* dv); #endif /* __DUMP_GOM_H */