diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-12-05 09:47:21 -0800 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-12-05 10:54:20 -0800 |
commit | 521d01e8ad87e931af3e9a763cc84a6cf7fe5ee3 (patch) | |
tree | f544119060c3eefc7b0fec6cff1740a362541213 /src/libbio/newick.c | |
parent | 158d9b84f14457136379f42e7c071eb79d87ee6b (diff) |
Feat: basic string and memory functions
Continue filling out the basic standard lib functions.
Included prototypes of the str* and mem* families.
Plan to add e(str|mem) and n(str|mem) variants as well.
Diffstat (limited to 'src/libbio/newick.c')
-rw-r--r-- | src/libbio/newick.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libbio/newick.c b/src/libbio/newick.c index bc768fd..a855cea 100644 --- a/src/libbio/newick.c +++ b/src/libbio/newick.c @@ -229,14 +229,14 @@ parse(struct Parser *p) errorf("incorrect format: comment found in disallowed region"); goto ERROR; } - node->comment = str·make(""); + node->comment = string·make(""); while (tok.kind != tok·rbrak) { tok = lex_nospace(p->file, p->io); if (tok.kind == tok·eof || tok.kind == tok·nil) { errorf("incorrect format: unmatched comment bracket '['"); goto ERROR; } - str·append(&node->comment, tokstr(tok)); + string·append(&node->comment, tokstr(tok)); } break; @@ -268,7 +268,7 @@ parse(struct Parser *p) errorf("parse error: attempting to set name of nil node"); goto ERROR; } - node->name = str·make(tok.lit.s); + node->name = string·make(tok.lit.s); } else { if (p->tok.kind != tok·lparen && p->tok.kind != tok·comma) { errorf("format error: misplaced identifier for leaf found"); @@ -283,7 +283,7 @@ parse(struct Parser *p) node = p->mem.alloc(p->heap, 1, sizeof(*node)); memset(node, 0, sizeof(*node)); - node->name = str·make(tok.lit.s); + node->name = string·make(tok.lit.s); phylo·addchild(p->root, node); } |