From: Peter Verthez Date: Tue, 25 Dec 2001 09:22:47 +0000 (+0000) Subject: Added some explanatory comment to the last item of the enums (and X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=f6faf6cb1f47727f8693a0bc4e8b9c6b7aff3817;p=gedcom-parse.git Added some explanatory comment to the last item of the enums (and changed name). --- diff --git a/gedcom/interface.c b/gedcom/interface.c index 265c28f..ec156bd 100644 --- a/gedcom/interface.c +++ b/gedcom/interface.c @@ -24,11 +24,11 @@ #include "gedcom_internal.h" #include "interface.h" -static Gedcom_rec_start_cb record_start_callback [LAST_REC] = { NULL }; -static Gedcom_rec_end_cb record_end_callback [LAST_REC] = { NULL }; -static Gedcom_elt_start_cb element_start_callback[LAST_ELT] = { NULL }; -static Gedcom_elt_end_cb element_end_callback [LAST_ELT] = { NULL }; -static Gedcom_def_cb default_cb = NULL; +static Gedcom_rec_start_cb record_start_callback [NR_OF_RECS] = { NULL }; +static Gedcom_rec_end_cb record_end_callback [NR_OF_RECS] = { NULL }; +static Gedcom_elt_start_cb element_start_callback[NR_OF_ELTS] = { NULL }; +static Gedcom_elt_end_cb element_end_callback [NR_OF_ELTS] = { NULL }; +static Gedcom_def_cb default_cb = NULL; void gedcom_set_default_callback(Gedcom_def_cb func) { diff --git a/include/gedcom.h b/include/gedcom.h index e985cce..819d23a 100644 --- a/include/gedcom.h +++ b/include/gedcom.h @@ -39,7 +39,7 @@ typedef enum _REC { REC_SUBN, REC_SUBM, REC_USER, - LAST_REC + NR_OF_RECS /* Just a final value to be used in array boundaries */ } Gedcom_rec; typedef enum _ELT { @@ -67,7 +67,7 @@ typedef enum _ELT { ELT_HEAD_PLAC_FORM, ELT_HEAD_NOTE, ELT_USER, - LAST_ELT + NR_OF_ELTS /* Just a final value to be used in array boundaries */ } Gedcom_elt; typedef enum _MECH {