dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15c373d
)
New function for handling age values.
author
Peter Verthez
<Peter.Verthez@advalvas.be>
Sat, 21 Dec 2002 15:37:26 +0000
(15:37 +0000)
committer
Peter Verthez
<Peter.Verthez@advalvas.be>
Sat, 21 Dec 2002 15:37:26 +0000
(15:37 +0000)
gedcom/age.c
patch
|
blob
|
history
diff --git
a/gedcom/age.c
b/gedcom/age.c
index 1de1d53205495398126aa2c0e62a6f6f61922edb..37a49fe6a5678f790bae53f8f0b81c706c097d1f 100644
(file)
--- a/
gedcom/age.c
+++ b/
gedcom/age.c
@@
-103,6
+103,21
@@
int parse_numeric_age(struct age_value *age, const char *ptr)
return 0;
}
+struct age_value* gedcom_new_age_value(struct age_value* copy_from)
+{
+ struct age_value* age_ptr;
+ age_ptr = (struct age_value*) malloc(sizeof(struct age_value));
+ if (! age_ptr)
+ MEMORY_ERROR;
+ else {
+ if (copy_from)
+ memcpy(age_ptr, copy_from, sizeof(struct age_value));
+ else
+ init_age(age_ptr);
+ }
+ return age_ptr;
+}
+
struct age_value gedcom_parse_age(const char* line_value)
{
const char *ptr = line_value;