From 19c1913f344c4ce5a0767d5529620cd6083f892b Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Fri, 1 Nov 2002 20:26:40 +0000 Subject: [PATCH] Little updates. --- doc/make_gom_xref | 23 ++++++++++------------- gom/gom_modify.c | 10 +++++----- include/gom.h | 6 +++--- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/doc/make_gom_xref b/doc/make_gom_xref index e918a59..5a380d1 100755 --- a/doc/make_gom_xref +++ b/doc/make_gom_xref @@ -16,11 +16,16 @@ my $index = ""; my $section = ""; open INPUT, $inputfile or die "Can't read $inputfile\n"; -open OUTPUT, ">$outputfile" or die "Can't read $outputfile\n"; +open OUTPUT, ">$outputfile" or die "Can't write $outputfile\n"; sub gedcom_link { my ($sublink) = @_; - return "(?)"; + if ($sublink) { + return "(?)"; + } + else { + return ""; + } } while () @@ -53,18 +58,10 @@ while () } if ($section eq "sub") { - $sub_structs .= "$_"; - if ($gedc_ref) { - $sub_structs .= " " . gedcom_link($gedc_ref); - } - $sub_structs .= "\n"; + $sub_structs .= "$_ " . gedcom_link($gedc_ref) . "\n"; } else { - $main_structs .= "$_"; - if ($gedc_ref) { - $main_structs .= " " . gedcom_link($gedc_ref); - } - $main_structs .= "\n"; + $main_structs .= "$_ " . gedcom_link($gedc_ref) . "\n"; } } } @@ -86,7 +83,7 @@ print OUTPUT <<"END_OF_HTML"; -

Gedcom object model in C

+

Gedcom object model in C: Structures

This page provides a cross-reference of all objects in the Gedcom object model for C. The '(?)' links are links to the Gedcom standard diff --git a/gom/gom_modify.c b/gom/gom_modify.c index 95bd926..f628256 100644 --- a/gom/gom_modify.c +++ b/gom/gom_modify.c @@ -37,15 +37,15 @@ char* gom_get_string(char* data) return data; } -char* gom_get_string_locale(char* data, int* conversion_failures) +char* gom_get_string_for_locale(char* data, int* conversion_failures) { return convert_utf8_to_locale(gom_get_string(data), conversion_failures); } -char* gom_set_string(char** data, const char* utf8_value) +char* gom_set_string(char** data, const char* utf8_str) { char* result = NULL; - char* newptr = strdup(utf8_value); + char* newptr = strdup(utf8_str); if (!newptr) MEMORY_ERROR; @@ -58,7 +58,7 @@ char* gom_set_string(char** data, const char* utf8_value) return result; } -char* gom_set_string_locale(char** data, const char* locale_value) +char* gom_set_string_for_locale(char** data, const char* locale_str) { - return gom_set_string(data, convert_locale_to_utf8(locale_value)); + return gom_set_string(data, convert_locale_to_utf8(locale_str)); } diff --git a/include/gom.h b/include/gom.h index a27bab4..46ce4a6 100644 --- a/include/gom.h +++ b/include/gom.h @@ -446,10 +446,10 @@ struct user_rec* gom_get_first_user_rec(); struct user_rec* gom_get_user_rec_by_xref(const char *xref); char* gom_get_string(char* data); -char* gom_set_string(char** data, const char* utf8_value); +char* gom_set_string(char** data, const char* utf8_str); -char* gom_get_string_locale(char* data, int* conversion_failures); -char* gom_set_string_locale(char** data, const char* locale_value); +char* gom_get_string_for_locale(char* data, int* conversion_failures); +char* gom_set_string_for_locale(char** data, const char* locale_str); void gom_set_unknown(const char* unknown); #ifdef __cplusplus -- 2.30.2