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 "(<A href=\"javascript:popup_gedcom('$sublink')\">?</A>)";
+ if ($sublink) {
+ return "(<A href=\"javascript:popup_gedcom('$sublink')\">?</A>)";
+ }
+ else {
+ return "";
+ }
}
while (<INPUT>)
}
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";
}
}
}
</head>
<body bgcolor="White">
-<h1 align="center">Gedcom object model in C</h1>
+<h1 align="center">Gedcom object model in C: Structures</h1>
This page provides a cross-reference of all objects in the Gedcom object
model for C. The '(?)' links are links to the
<a href="http://www.gendex.com/gedcom55/55gctoc.htm">Gedcom standard</a>
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;
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));
}
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