X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;ds=sidebyside;f=gedcom%2Fxref.c;fp=gedcom%2Fxref.c;h=a9979181653d14d513ceca7ea379042c9ca613a0;hb=5fe34c1f751845fb0912834069c8e357a4cc0d6d;hp=d07f387b3ad843a3f42e83faef808cb4d8a82eb4;hpb=fffe9618ff8a5cfcac207f231b531615dfb0e38f;p=gedcom-parse.git diff --git a/gedcom/xref.c b/gedcom/xref.c index d07f387..a997918 100644 --- a/gedcom/xref.c +++ b/gedcom/xref.c @@ -28,17 +28,17 @@ struct xref_value def_xref_val = { XREF_NONE, "", NULL }; static hash_t *xrefs = NULL; -char* xref_type_str[] = { N_("nothing"), - N_("a family"), - N_("an individual"), - N_("a note"), - N_("a multimedia object"), - N_("a source repository"), - N_("a source"), - N_("a submitter"), - N_("a submission record"), - N_("an application-specific record"), - }; +const char* xref_type_str[] = { N_("nothing"), + N_("a family"), + N_("an individual"), + N_("a note"), + N_("a multimedia object"), + N_("a source repository"), + N_("a source"), + N_("a submitter"), + N_("a submission record"), + N_("an application-specific record"), + }; struct xref_node { struct xref_value xref; @@ -144,7 +144,7 @@ struct xref_value *gedcom_get_by_xref(const char *key) return NULL; } -struct xref_value *gedcom_parse_xref(char *raw_value, +struct xref_value *gedcom_parse_xref(const char *raw_value, Xref_ctxt ctxt, Xref_type xref_type) { struct xref_node *xr = NULL; @@ -154,7 +154,7 @@ struct xref_value *gedcom_parse_xref(char *raw_value, xr = (struct xref_node *)hnode_get(node); } else { - char *key = strdup(raw_value); + const char *key = strdup(raw_value); if (key) { xr = make_xref_node(); xr->xref.type = xref_type;