summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eval.c8
-rw-r--r--parser.c2
-rw-r--r--share/txr/stdlib/compiler.tl2
-rw-r--r--share/txr/stdlib/error.tl9
-rw-r--r--unwind.c5
5 files changed, 13 insertions, 13 deletions
diff --git a/eval.c b/eval.c
index 1b603ce1..8fb645fc 100644
--- a/eval.c
+++ b/eval.c
@@ -294,7 +294,7 @@ static void eval_exception(val sym, val ctx, val fmt, va_list vl)
source_loc_str(last_form_evaled, nil));
if (loc)
- format(stream, lit("(~a) "), loc, nao);
+ format(stream, lit("~a: "), loc, nao);
(void) vformat(stream, fmt, vl);
@@ -319,7 +319,7 @@ static val eval_warn(val ctx, val fmt, ...)
uw_catch_begin (cons(continue_s, nil), exsym, exvals);
va_start (vl, fmt);
- eval_exception(warning_s, ctx, fmt, vl);
+ eval_exception(warning_s, ctx, scat2(lit("warning: "), fmt), vl);
va_end (vl);
uw_catch(exsym, exvals) { (void) exsym; (void) exvals; }
@@ -347,9 +347,9 @@ static val eval_defr_warn(val ctx, val tag, val fmt, ...)
source_loc_str(last_form_evaled, nil));
if (loc)
- format(stream, lit("(~a) "), loc, nao);
+ format(stream, lit("~a: "), loc, nao);
- (void) vformat(stream, fmt, vl);
+ (void) vformat(stream, scat2(lit("warning: "), fmt), vl);
uw_rthrow(defr_warning_s,
cons(get_string_from_stream(stream), cons(tag, nil)));
diff --git a/parser.c b/parser.c
index 77797b19..0b88ec7b 100644
--- a/parser.c
+++ b/parser.c
@@ -1188,7 +1188,7 @@ static val repl_warning(val out_stream, val exc, struct args *rest)
if (cdr(args))
uw_defer_warning(args);
else
- format(out_stream, lit("** warning: ~!~a\n"), car(args), nao);
+ format(out_stream, lit("** ~!~a\n"), car(args), nao);
return uw_rthrow(continue_s, nil);
}
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index 39cda32d..1ab48537 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -2139,7 +2139,7 @@
(defun open-compile-streams (in-path out-path test-fn)
(let* ((parent (or *load-path* ""))
(sep [path-sep-chars 0])
- (in-path (if (pure-rel-path-p in-path)
+ (in-path (if (and (pure-rel-path-p in-path) (not (empty parent)))
`@(dir-name parent)@sep@{in-path}`
in-path))
(rsuff (r$ %file-suff-rx% in-path))
diff --git a/share/txr/stdlib/error.tl b/share/txr/stdlib/error.tl
index 8a0a93fa..42d5d6b9 100644
--- a/share/txr/stdlib/error.tl
+++ b/share/txr/stdlib/error.tl
@@ -32,22 +32,21 @@
ctx)
(defun sys:loc (ctx)
- (let ((form (sys:ctx-form ctx)))
- `(@(source-loc-str form)) `))
+ (source-loc-str (sys:ctx-form ctx)))
(defun compile-error (ctx fmt . args)
(let* ((nctx (sys:dig ctx))
(loc (sys:loc nctx))
(name (sys:ctx-name nctx)))
(dump-deferred-warnings *stderr*)
- (throwf 'eval-error `@loc~s: @fmt` name . args)))
+ (throwf 'eval-error `@loc: ~s: @fmt` name . args)))
(defun compile-warning (ctx fmt . args)
(let* ((nctx (sys:dig ctx))
(loc (sys:loc nctx))
(name (sys:ctx-name nctx)))
(usr:catch
- (throwf 'warning `@loc~s: @fmt` name . args)
+ (throwf 'warning `@loc: warning: ~s: @fmt` name . args)
(continue ()))))
(defun compile-defr-warning (ctx tag fmt . args)
@@ -55,7 +54,7 @@
(loc (sys:loc nctx))
(name (sys:ctx-name nctx)))
(usr:catch
- (throw 'defr-warning (fmt `@loc~s: @fmt` name . args) tag)
+ (throw 'defr-warning (fmt `@loc: warning: ~s: @fmt` name . args) tag)
(continue ()))))
(defun sys:bind-mac-error (ctx-form params obj too-few-p)
diff --git a/unwind.c b/unwind.c
index 75fb3bcc..3e88062a 100644
--- a/unwind.c
+++ b/unwind.c
@@ -713,7 +713,7 @@ val uw_rthrow(val sym, val args)
if (uw_exception_subtype_p(sym, defr_warning_s))
uw_defer_warning(args);
else if (std_error != 0)
- format(std_error, lit("warning: ~a\n"), car(args), nao);
+ format(std_error, lit("~a\n"), car(args), nao);
if (!opt_compat || opt_compat >= 234) {
uw_rthrow(continue_s, nil);
return nil;
@@ -818,6 +818,7 @@ val uw_warningf(val fmt, ...)
val stream = make_string_output_stream();
va_start (vl, fmt);
+ put_string(lit("warning: "), stream);
(void) vformat(stream, fmt, vl);
va_end (vl);
@@ -879,7 +880,7 @@ val uw_dump_deferred_warnings(val stream)
for (; wl; wl = cdr(wl)) {
val args = car(wl);
- format(stream, lit("warning: ~a\n"), car(args), nao);
+ format(stream, lit("~a\n"), car(args), nao);
}
return nil;