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:
3d1822c
)
Convert spaces to underscores in GEDCOM name for encoding (to search
author
Peter Verthez
<Peter.Verthez@advalvas.be>
Sun, 26 Jan 2003 20:18:58 +0000
(20:18 +0000)
committer
Peter Verthez
<Peter.Verthez@advalvas.be>
Sun, 26 Jan 2003 20:18:58 +0000
(20:18 +0000)
in configuration file).
gedcom/encoding.c
patch
|
blob
|
history
diff --git
a/gedcom/encoding.c
b/gedcom/encoding.c
index 1cae728808f5c8dfd9f9cf6556f4c575a20e78dd..c2c3e8980686ae72d30f79d29057f988de278bb1 100644
(file)
--- a/
gedcom/encoding.c
+++ b/
gedcom/encoding.c
@@
-89,6
+89,10
@@
char* get_encoding(const char* gedcom_n, Encoding enc)
key = (char*)malloc(strlen(gedcom_n) + strlen(charwidth_string[enc]) + 3);
if (key) {
+ char* sp_pos = NULL;
+ while ((sp_pos = strchr(gedcom_n, ' ')) != NULL) {
+ *sp_pos = '_';
+ }
/* sprintf is safe here (malloc'ed before) */
sprintf(key, "%s(%s)", gedcom_n, charwidth_string[enc]);