shithub: mc

Download patch

ref: 4cde6d1902f33eb617fc9e45416c5482fd2f4a24
parent: 82532ed187c6041e7dff5505de21e95d7fd380d9
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Oct 6 13:48:17 EDT 2014

Update for the libsys/libstd split.

--- a/build.myr
+++ b/build.myr
@@ -1,4 +1,5 @@
 use std
+use sys
 
 use "config.use"
 use "deps.use"
@@ -265,10 +266,10 @@
 const isfresh = {src, dst
 	var srcsb, dstsb
 
-	if std.stat(src, &srcsb) != 0
+	if sys.stat(src, &srcsb) != 0
 		std.fatal(1, "could not stat %s\n", src)
 	;;
-	if std.stat(dst, &dstsb) != 0
+	if sys.stat(dst, &dstsb) != 0
 		-> false
 	;;
 	/*
@@ -290,11 +291,11 @@
 const pmtime = {src, dst
 	var srcsb, dstsb
 
-	if std.stat(src, &srcsb) != 0
+	if sys.stat(src, &srcsb) != 0
 		std.put("\tno %s\n", src)
 		->
 	;;
-	if std.stat(dst, &dstsb) != 0
+	if sys.stat(dst, &dstsb) != 0
 		std.put("\tno %s\n", dst)
 		->
 	;;
--- a/clean.myr
+++ b/clean.myr
@@ -1,4 +1,5 @@
 use std
+use sys
 
 use "config.use"
 use "deps.use"
@@ -62,7 +63,7 @@
 
 	keys = std.htkeys(dg.deps)
 	for k in keys
-		if !std.htgetv(mchammer_files, k, false) && std.stat(k, &sb) == 0
+		if !std.htgetv(mchammer_files, k, false) && sys.stat(k, &sb) == 0
 			std.put("\tclean %s\n", k)
 			std.unlink(k)
 		;;
--- a/opts.myr
+++ b/opts.myr
@@ -1,4 +1,5 @@
 use std
+use sys
 
 use "config.use"
 
@@ -54,7 +55,7 @@
 const initopts = {
 	var un
 
-	if std.uname(&un) < 0
+	if sys.uname(&un) < 0
 		std.fatal(1, "unable to determine host information (uname)\n")
 	;;
 	match cstr2myr(un.system[:])
--- a/util.myr
+++ b/util.myr
@@ -1,4 +1,5 @@
 use std
+use sys
 
 use "opts.use"
 
@@ -21,7 +22,7 @@
 		std.fatal(1, "could not fork command\n")
 	elif pid == 0
 		if dir.len > 0
-			if std.chdir(dir) < 0
+			if sys.chdir(dir) < 0
 				std.fatal(1, "unable to enter directory %s\n", dir)
 			;;
 		;;