From 0e287933599f8a637515c263526b0c0059922497 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Mon, 30 Dec 2002 10:22:37 +0000 Subject: [PATCH] Force warning for some character sets. --- t/output/write_gom_ansel.ged | 2 +- t/output/write_gom_ansel.ref | 1 + t/output/write_gom_uhlbomcl.ged | Bin 1274 -> 1278 bytes t/output/write_gom_uhlcl.ged | Bin 1272 -> 1276 bytes t/output/write_gom_ulhbomcl.ged | Bin 1274 -> 1278 bytes t/output/write_gom_ulhc.ged | Bin 1238 -> 1242 bytes t/output/write_gom_ulhcl.ged | Bin 1272 -> 1276 bytes t/output/write_gom_ulhl.ged | Bin 1238 -> 1242 bytes t/output/write_gom_ulhlc.ged | Bin 1272 -> 1276 bytes t/src/gom_write.c | 13 ++++++------- 10 files changed, 8 insertions(+), 8 deletions(-) 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 cc85a3ab79f3d374f569c0ec81d97f13a2cc5cee..3daf6a8070b321704175755307a618abb1faaeb0 100644 GIT binary patch delta 24 fcmeyx`HypgB5x>zAA=`@GlM^a3xn%MtqUvwSu_TJ delta 20 bcmeyz`HORcBBvumFoQFLCxhoky$dV=L&yc; diff --git a/t/output/write_gom_uhlcl.ged b/t/output/write_gom_uhlcl.ged index c47022d24046f54d3897d002c394b09746d46040..b4368e85e5bbda37a947b9ec62ada790d352c866 100644 GIT binary patch delta 24 fcmeyt`G<3YJZ~t2AA=`@GlM^a3xn%MjSDOQSgZzj delta 20 bcmeyv`Ga$UJf|Z=FoQFLCxhokoeL}gLs$jb diff --git a/t/output/write_gom_ulhbomcl.ged b/t/output/write_gom_ulhbomcl.ged index f6df52f90a136d5b73761ff3620e567bf0cf0c41..06d9c3b51a3559d47ae040fa408e25374aa108ec 100644 GIT binary patch delta 24 fcmeyx`Hypg0&ggTAA=`@GlM^a3xn%M&5JAmSs(^} delta 20 bcmeyz`HORc0;eNGFoQFLCxhok-HR*$L%0Rt diff --git a/t/output/write_gom_ulhc.ged b/t/output/write_gom_ulhc.ged index 156c3dc170503941a5a97c14aa16bf7dcf4ecee8..81a48e6df770e2c4ae4e7c72528513ad33fa79cc 100644 GIT binary patch delta 24 fcmcb{d5d#`3~wldAA=`@GlM^a3xn%M)r~9wQV<3X delta 20 bcmcb`d5v>|45uSQFoQFLCxhok&5bMoJ=g_s diff --git a/t/output/write_gom_ulhcl.ged b/t/output/write_gom_ulhcl.ged index 6a49e231989e4d41d3aa6b6b5930ae75cb442298..9010de8a904cacac39b5a1695eac9c6fa99a4af3 100644 GIT binary patch delta 24 fcmeyt`G<3Y9B(LtAA=`@GlM^a3xn%M^@}V3SeOQO delta 20 bcmeyv`Ga$U9H%2gFoQFLCxhok?Tah`Lr4YK diff --git a/t/output/write_gom_ulhl.ged b/t/output/write_gom_ulhl.ged index 4f190de68b44648c2bff21fdab7bac4379de60a9..eef76fc8c0c978715cfbadb04a20947e0ed5f54c 100644 GIT binary patch delta 24 fcmcb{d5d#`3~wldAA=`@GlM^a3xn%M)r~9wQV<3X delta 20 bcmcb`d5v>|45uSQFoQFLCxhok&5bMoJ=g_s diff --git a/t/output/write_gom_ulhlc.ged b/t/output/write_gom_ulhlc.ged index 06493c948e974f87dc1fdb9cf9f7c1d866428c86..8a8e0facda0496c1b7b553066244e35e026025f1 100644 GIT binary patch delta 24 fcmeyt`G<3Y9B(LtAA=`@GlM^a3xn%M^@}V3SeOQO delta 20 bcmeyv`Ga$U9H%2gFoQFLCxhok?Tah`Lr4YK 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; -- 2.30.2