From: Sebastian Hammer Date: Mon, 15 Jan 2007 19:17:27 +0000 (+0000) Subject: Eliminates punctuation at the end of fields. X-Git-Tag: stable.27032007~101 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=7dd217c5530b60f6533fff8e3420d755c5db5e25;p=pazpar2-moved-to-github.git Eliminates punctuation at the end of fields. --- diff --git a/src/pazpar2.c b/src/pazpar2.c index 2222679..7e63f47 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.32 2007-01-15 16:56:51 quinn Exp $ */ +/* $Id: pazpar2.c,v 1.33 2007-01-15 19:17:27 quinn Exp $ */ #include #include @@ -569,7 +569,12 @@ static struct record *ingest_record(struct client *cl, Z_External *rec) newm->next = 0; if (md->type == Metadata_type_generic) { + char *p; newm->data.text = nmem_strdup(se->nmem, value); + for (p = newm->data.text + strlen(newm->data.text) - 1; + p > newm->data.text && strchr(" ,/.", *p); p--) + *p = '\0'; + } else if (md->type == Metadata_type_year) {