ref: 25bdeed20e3d0915bca71d488b9d7bcda07c4109
parent: 6109f4b305d077fa88ab65fbdc728527ef4478d9
author: Ori Bernstein <ori@foo.hsd1.ca.comcast.net>
date: Fri Sep 23 12:07:15 EDT 2016
Use the first dot as the suffix. Support for .glue.c; maybe we can do better.
--- a/mbld/util.myr
+++ b/mbld/util.myr
@@ -53,7 +53,7 @@
platf = ""
suff = ""
- match std.strrfind(src, ".")
+ match std.strfind(src, ".")
| `std.Some i:
suff = src[i:]
src = src[:i]
@@ -86,7 +86,7 @@
-> std.strcat(base, new)
elif std.hassuffix(suff, ".s")
-> std.strcat(base, new)
- elif std.hassuffix(suff, ".glue.c")
+ elif std.hassuffix(base, ".glue.c")
-> std.strjoin([base, ".glue", new][:], "")
else
std.fatal("unrecognized source {}\n", src)
--- a/test/fmtalign.myr
+++ b/test/fmtalign.myr
@@ -12,6 +12,6 @@
const main = {
var msg=`Tversion [.tag=45, .version="9P2000"]
- std.fmt("{}\n", msg)
+ std.put("{}\n", msg)
}