diff options
Diffstat (limited to 'src/naming.c')
| -rw-r--r-- | src/naming.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/naming.c b/src/naming.c index 484e1998..d7bb0fb9 100644 --- a/src/naming.c +++ b/src/naming.c @@ -96,8 +96,9 @@ Text_t valid_c_name(const char *name) { public Text_t CONSTFUNC namespace_name(env_t *env, namespace_t *ns, Text_t name) { - for (; ns; ns = ns->parent) + for (; ns; ns = ns->parent) { name = Texts(ns->name, "$", name); + } if (env->id_suffix.length > 0) name = Texts(name, env->id_suffix); return name; } @@ -113,5 +114,6 @@ Text_t get_id_suffix(const char *filename) { Path_t id_file = Path$child(build_dir, Texts(Path$base_name(path), Text$from_str(".id"))); OptionalText_t id = Path$read(id_file); if (id.tag == TEXT_NONE) err(1, "Could not read ID file: %s", Path$as_c_string(id_file)); + id = Text$trim(id, Text(" \r\n"), true, true); return Texts("$", id); } |
