dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved context handling, to allow elements out of context.
[gedcom-parse.git]
/
gedcom
/
age.c
diff --git
a/gedcom/age.c
b/gedcom/age.c
index 37a49fe6a5678f790bae53f8f0b81c706c097d1f..705a237ef05730ff99486581e8ff2671eb921043 100644
(file)
--- a/
gedcom/age.c
+++ b/
gedcom/age.c
@@
-103,7
+103,7
@@
int parse_numeric_age(struct age_value *age, const char *ptr)
return 0;
}
return 0;
}
-struct age_value* gedcom_new_age_value(struct age_value* copy_from)
+struct age_value* gedcom_new_age_value(
const
struct age_value* copy_from)
{
struct age_value* age_ptr;
age_ptr = (struct age_value*) malloc(sizeof(struct age_value));
{
struct age_value* age_ptr;
age_ptr = (struct age_value*) malloc(sizeof(struct age_value));
@@
-154,7
+154,7
@@
struct age_value gedcom_parse_age(const char* line_value)
return age_s;
}
return age_s;
}
-char* gedcom_age_to_string(struct age_value* val)
+char* gedcom_age_to_string(
const
struct age_value* val)
{
int num = 0;
reset_buffer(&age_buffer);
{
int num = 0;
reset_buffer(&age_buffer);
@@
-170,7
+170,8
@@
char* gedcom_age_to_string(struct age_value* val)
switch (val->type) {
case AGE_UNRECOGNIZED:
switch (val->type) {
case AGE_UNRECOGNIZED:
- return val->phrase; break;
+ reset_buffer(&age_buffer);
+ safe_buf_append(&age_buffer, val->phrase); break;
case AGE_CHILD:
safe_buf_append(&age_buffer, "CHILD"); break;
case AGE_INFANT:
case AGE_CHILD:
safe_buf_append(&age_buffer, "CHILD"); break;
case AGE_INFANT: