shithub: mc

Download patch

ref: 09779def11c5ab98e12c15a8beee7cd1ce2fc70b
parent: 4874371bb240c4cfe5ba45daa190810814e067dc
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Sep 29 21:40:45 EDT 2014

Use path manipulation funcs for building paths.

    This makes the output of our code prettier. Ooh, shiny.

--- a/deps.myr
+++ b/deps.myr
@@ -183,13 +183,13 @@
 	var path
 
 	for p in opt_incpaths
-		path = std.fmt("%s/%s/%s", p, "/lib/myr", lib)
+		path = std.pathjoin([p, "/lib/myr", lib][:])
 		match  bio.open(path, bio.Rd)
 		| `std.Some file:
 			-> file
 		;;
 	;;
-	path = std.fmt("%s/%s/%s", opt_instroot, "/lib/myr", lib)
+	path = std.pathjoin([opt_instroot, "/lib/myr", lib][:])
 	match  bio.open(path, bio.Rd)
 	| `std.Some file:
 		-> file
--- a/opts.myr
+++ b/opts.myr
@@ -68,7 +68,7 @@
 	opt_ld = std.getenvv("MYR_LD", "ld")
 	opt_ar = std.getenvv("MYR_AR", "ar")
 	opt_muse = std.getenvv("MYR_MUSE", "muse")
-	opt_runtime = std.strcat(config.Instroot, "/lib/myr/_myrrt.o")
+	opt_runtime = std.pathcat(config.Instroot, "/lib/myr/_myrrt.o")
 }
 
 const cstr2myr = {cstr