aboutsummaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-10-03 23:56:59 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-10-03 23:56:59 +0200
commit60d51e5700a55bc3ae17e34f9f3da1d4653a3026 (patch)
tree7ae258360215ce63c591204f5ba8ec7080305f1e /src/parse.c
parentFix problem with no end date. (diff)
downloadcalp-60d51e5700a55bc3ae17e34f9f3da1d4653a3026.tar.gz
calp-60d51e5700a55bc3ae17e34f9f3da1d4653a3026.tar.xz
Everything seems to parse now.
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/parse.c b/src/parse.c
index 48b58b95..8c370958 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -69,7 +69,7 @@ int parse_file(char* filename, FILE* f, SCM root) {
SNEW(strbuf, str);
SCM component = root;
- SCM line = scm_make_vline();
+ SCM line = scm_make_vline(SCM_UNDEFINED);
SCM attr_key; /* string */
SCM line_key = scm_from_utf8_string(""); /* string */
@@ -98,9 +98,8 @@ int parse_file(char* filename, FILE* f, SCM root) {
/* TODO it should be possible to create this object once
at the top of this function
*/
- SCM templine = scm_make_vline();
- scm_struct_set_x(templine, vline_value,
- scm_from_utf8_stringn(filename, strlen(filename)));
+ SCM templine =
+ scm_make_vline(scm_from_utf8_stringn(filename, strlen(filename)));
scm_add_line_x(child, scm_from_utf8_string("X-HNH-FILENAME"),
templine);
@@ -120,7 +119,7 @@ int parse_file(char* filename, FILE* f, SCM root) {
INFO_F("Adding attribute [%s]", str.mem);
scm_struct_set_x(line, vline_value, scm_from_strbuf(&str));
scm_add_line_x(component, line_key, line);
- line = scm_make_vline();
+ line = scm_make_vline(SCM_UNDEFINED);
}
strbuf_soft_reset (&str);