From 521d01e8ad87e931af3e9a763cc84a6cf7fe5ee3 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 5 Dec 2021 09:47:21 -0800 Subject: 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. --- src/libbio/newick.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libbio') 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); } -- cgit v1.2.1