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
Eliminated code duplication.
[gedcom-parse.git]
/
gedcom
/
gedcom.y
diff --git
a/gedcom/gedcom.y
b/gedcom/gedcom.y
index 7cab98ec52b3332213a28063a8d51f19003d94d4..b04db39dbe5a239d79dce5e839ffcc60f59bf3a8 100644
(file)
--- a/
gedcom/gedcom.y
+++ b/
gedcom/gedcom.y
@@
-2783,9
+2783,11
@@
line_item : anychar { size_t i;
*line_item_buf_ptr++ = $1[i];
$$ = line_item_buf;
}
*line_item_buf_ptr++ = $1[i];
$$ = line_item_buf;
}
- | ESCAPE { CLEAR_BUFFER(line_item_buf);
+ | ESCAPE { size_t i;
+ CLEAR_BUFFER(line_item_buf);
line_item_buf_ptr = line_item_buf;
line_item_buf_ptr = line_item_buf;
- /* For now, ignore escapes */
+ for (i=0; i < strlen($1); i++)
+ *line_item_buf_ptr++ = $1[i];
$$ = line_item_buf;
}
| line_item anychar
$$ = line_item_buf;
}
| line_item anychar
@@
-2799,7
+2801,9
@@
line_item : anychar { size_t i;
$$ = line_item_buf;
}
| line_item ESCAPE
$$ = line_item_buf;
}
| line_item ESCAPE
- { /* For now, ignore escapes */
+ { size_t i;
+ for (i=0; i < strlen($2); i++)
+ *line_item_buf_ptr++ = $2[i];
$$ = line_item_buf;
}
;
$$ = line_item_buf;
}
;