shithub: mc

Download patch

ref: cd9755da503c8e8713171c59f840f1b08820495a
parent: 8a7f47695be3621942b0b951913814185617fbf0
author: Ori Bernstein <ori@eigenstate.org>
date: Sun May 17 12:42:27 EDT 2015

Fix libdate for new Myrddin changes.

--- a/lib/date/fmt.myr
+++ b/lib/date/fmt.myr
@@ -71,7 +71,7 @@
 			| 'z':	s = timezone(buf[o:], d.tzoff)
 			| 'Z':	s = std.bfmt(buf[o:], "%s", d.tzname)
 			| '%':	s = std.bfmt(buf[o:], "%%")
-			| _:	std.fatal(1, "unknown format character %c\n", c)
+			| _:	std.fatal("unknown format character %c\n", c)
 			;;
 		else
 			s = std.bfmt(buf[o:], "%c", c)
--- a/lib/date/parse.myr
+++ b/lib/date/parse.myr
@@ -85,13 +85,13 @@
 			| 'h':	s = indexof(&d.day, s, _names.abbrevmon, err)
 			| 'H':	s = intval(&d.h, s, 2, 2, err)
 			| 'I':	s = intval(&d.h, s, 2, 2, err)
-			| 'j':	std.fatal(1, "year day... unimplemented.")
+			| 'j':	std.fatal("unsupported '%j'\n")
 			| 'k':	s = intval(&d.h, s, 1, 2, err)
 			| 'l':	s = intval(&d.h, s, 1, 2, err)
 			| 'm':	s = intval(&d.mon, s, 1, 2, err)
 			| 'M':	s = intval(&d.m, s, 1, 2, err)
 			| 'n':	s = matchstr(s, "\n", err)
-			| 'O':	std.fatal(1, "unsupported %O")
+			| 'O':	std.fatal("unsupported %O\n")
 			| 'p':	s = matchampm(d, s, err)
 			| 'P':	s = matchampm(d, s, err)
 			| 'r':	s = filldate(d, "%H:%M:%S %P", s, tz, err) 
@@ -100,7 +100,7 @@
 			| 'S':	s = intval(&d.s, s, 1, 2, err)
 			| 't':	s = eatspace(s)
 			| 'u':	s = intval(&d.wday, s, 1, 1, err)
-			| 'U':	std.fatal(1, "week number... unimplemented.")
+			| 'U':	std.fatal("unsupported '%U'\n")
 				/*
 			| 'x':	o += bftime(buf[o:], Datefmt, d)
 			| 'X':	o += bftime(buf[o:], Timefmt, d)
@@ -114,7 +114,7 @@
 			| 'Z':	o += std.bfmt(buf[o:], "%s", d.tzname)
 				*/
 			| '%':	s = matchstr(s, "%", err)
-			| _:	std.fatal(1, "unknown format character %c\n", fc)
+			| _:	std.fatal("unknown format character %c\n", fc)
 			;;
 		else
 			(sc, s) = std.striter(s)