From: Peter Verthez Date: Mon, 30 Dec 2002 10:22:37 +0000 (+0000) Subject: Force warning for some character sets. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=0e287933599f8a637515c263526b0c0059922497;p=gedcom-parse.git Force warning for some character sets. --- diff --git a/t/output/write_gom_ansel.ged b/t/output/write_gom_ansel.ged index d5fc983..b3ee385 100644 --- a/t/output/write_gom_ansel.ged +++ b/t/output/write_gom_ansel.ged @@ -1,5 +1,5 @@ 0 HEAD -1 CHAR ASCII +1 CHAR ANSEL 1 SOUR GEDCOM_PARSE 2 VERS 0.20.0 1 DATE 9 SEP 2001 diff --git a/t/output/write_gom_ansel.ref b/t/output/write_gom_ansel.ref index 2fc8ba6..196fe32 100644 --- a/t/output/write_gom_ansel.ref +++ b/t/output/write_gom_ansel.ref @@ -1 +1,2 @@ +WARNING: Warning on line 1: Forcing HEAD.CHAR value to 'ANSEL' Test succeeded diff --git a/t/output/write_gom_uhlbomcl.ged b/t/output/write_gom_uhlbomcl.ged index cc85a3a..3daf6a8 100644 Binary files a/t/output/write_gom_uhlbomcl.ged and b/t/output/write_gom_uhlbomcl.ged differ diff --git a/t/output/write_gom_uhlcl.ged b/t/output/write_gom_uhlcl.ged index c47022d..b4368e8 100644 Binary files a/t/output/write_gom_uhlcl.ged and b/t/output/write_gom_uhlcl.ged differ diff --git a/t/output/write_gom_ulhbomcl.ged b/t/output/write_gom_ulhbomcl.ged index f6df52f..06d9c3b 100644 Binary files a/t/output/write_gom_ulhbomcl.ged and b/t/output/write_gom_ulhbomcl.ged differ diff --git a/t/output/write_gom_ulhc.ged b/t/output/write_gom_ulhc.ged index 156c3dc..81a48e6 100644 Binary files a/t/output/write_gom_ulhc.ged and b/t/output/write_gom_ulhc.ged differ diff --git a/t/output/write_gom_ulhcl.ged b/t/output/write_gom_ulhcl.ged index 6a49e23..9010de8 100644 Binary files a/t/output/write_gom_ulhcl.ged and b/t/output/write_gom_ulhcl.ged differ diff --git a/t/output/write_gom_ulhl.ged b/t/output/write_gom_ulhl.ged index 4f190de..eef76fc 100644 Binary files a/t/output/write_gom_ulhl.ged and b/t/output/write_gom_ulhl.ged differ diff --git a/t/output/write_gom_ulhlc.ged b/t/output/write_gom_ulhlc.ged index 06493c9..8a8e0fa 100644 Binary files a/t/output/write_gom_ulhlc.ged and b/t/output/write_gom_ulhlc.ged differ diff --git a/t/src/gom_write.c b/t/src/gom_write.c index 65aef2e..4bfeac5 100644 --- a/t/src/gom_write.c +++ b/t/src/gom_write.c @@ -73,13 +73,12 @@ int update_header(char* encoding) if (head == NULL) return 1; else { - /* - value = gom_set_string(&head->charset.name, encoding); - if (value == NULL || strcmp(value, encoding)) - return 1; - else - return 0; - */ + /* force warning for anything except UNICODE */ + if (!strcmp(encoding, "UNICODE")) { + value = gom_set_string(&head->charset.name, encoding); + if (value == NULL || strcmp(value, encoding)) + return 1; + } value = gom_set_string(&head->note, long_note); if (value == NULL || strcmp(value, long_note)) return 1;