shithub: mc

Download patch

ref: b0a47993a1361f133ca52302eae06b223c36c2ca
parent: e2f62755339d913f59d08ceafaa24849cf9da803
author: Ori Bernstein <[email protected]>
date: Mon May 27 21:11:51 EDT 2013

Edit quotes in error message.

    This makes it clearer to see what the label is, vs where the error
    message sis.

--- /dev/null
+++ b/libstd/sleq.myr
@@ -1,0 +1,18 @@
+pkg std =
+	generic sleq	: (a : @a[:], b : @a[:] -> bool)
+;;
+
+generic sleq = {
+	var i
+
+	if a.len != b.len
+		-> false
+	;;
+
+	for i = 0; i < a.len; i++
+		if a[i] != b[i]
+			-> false
+		;;
+	;;
+	-> true
+}
--- a/mi/cfg.c
+++ b/mi/cfg.c
@@ -135,7 +135,7 @@
         if (a) {
             targ = htget(cfg->lblmap, lblstr(a));
             if (!targ)
-                die("No bb with label %s", lblstr(a));
+                die("No bb with label \"%s\"", lblstr(a));
             bsput(bb->succ, targ->id);
             bsput(targ->pred, bb->id);
         }
@@ -142,7 +142,7 @@
         if (b) {
             targ = htget(cfg->lblmap, lblstr(b));
             if (!targ)
-                die("No bb with label %s", lblstr(b));
+                die("No bb with label \"%s\"", lblstr(b));
             bsput(bb->succ, targ->id);
             bsput(targ->pred, bb->id);
         }