From: Adam Dickmeiss Date: Wed, 20 Jun 2012 13:36:25 +0000 (+0200) Subject: record_render: allow ws after = in typespec X-Git-Tag: v4.2.35~5 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=a87b8b80bdeff5308d2c21a9f1dc004573f18dad record_render: allow ws after = in typespec For example, xml; charset= marc-8 --- diff --git a/src/record_render.c b/src/record_render.c index 69a208b..1c8c06a 100644 --- a/src/record_render.c +++ b/src/record_render.c @@ -367,6 +367,8 @@ const char *yaz_record_render(Z_NamePlusRecord *npr, const char *schema, { size_t j = 0; i = i + 8; /* skip charset= */ + while (cp[i] == ' ') + i++; for (j = 0; cp[i] && cp[i] != ';' && cp[i] != ' '; i++) { if (j < sizeof(charset)-1) @@ -378,6 +380,8 @@ const char *yaz_record_render(Z_NamePlusRecord *npr, const char *schema, { size_t j = 0; i = i + 7; + while (cp[i] == ' ') + i++; for (j = 0; cp[i] && cp[i] != ';' && cp[i] != ' '; i++) { if (j < sizeof(format)-1) @@ -389,7 +393,8 @@ const char *yaz_record_render(Z_NamePlusRecord *npr, const char *schema, { size_t i0; i = i + 7; - + while (cp[i] == ' ') + i++; i0 = i; while (cp[i] && cp[i] != ';') i++;