summaryrefslogtreecommitdiffstats
path: root/unwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'unwind.c')
-rw-r--r--unwind.c46
1 files changed, 10 insertions, 36 deletions
diff --git a/unwind.c b/unwind.c
index 43c93184..3e3083da 100644
--- a/unwind.c
+++ b/unwind.c
@@ -217,15 +217,15 @@ obj_t *uw_throw(obj_t *sym, obj_t *exception)
if (ex == 0) {
if (opt_loglevel >= 1) {
obj_t *s = stringp(exception);
- format(std_error, L"~a: unhandled exception of type ~a:\n",
+ format(std_error, lit("~a: unhandled exception of type ~a:\n"),
prog_string, sym, nao);
- format(std_error, s ? L"~a: ~a\n" : L"~a: ~s\n",
+ format(std_error, s ? lit("~a: ~a\n") : lit("~a: ~s\n"),
prog_string, exception, nao);
}
if (uw_exception_subtype_p(sym, query_error) ||
uw_exception_subtype_p(sym, file_error)) {
if (!output_produced)
- put_cstring(std_output, L"false\n");
+ put_line(std_output, lit("false"));
exit(EXIT_FAILURE);
}
abort();
@@ -238,7 +238,7 @@ obj_t *uw_throw(obj_t *sym, obj_t *exception)
abort();
}
-obj_t *uw_throwf(obj_t *sym, const wchar_t *fmt, ...)
+obj_t *uw_throwf(obj_t *sym, obj_t *fmt, ...)
{
va_list vl;
obj_t *stream = make_string_output_stream();
@@ -251,7 +251,7 @@ obj_t *uw_throwf(obj_t *sym, const wchar_t *fmt, ...)
abort();
}
-obj_t *uw_errorf(const wchar_t *fmt, ...)
+obj_t *uw_errorf(obj_t *fmt, ...)
{
va_list vl;
obj_t *stream = make_string_output_stream();
@@ -264,33 +264,7 @@ obj_t *uw_errorf(const wchar_t *fmt, ...)
abort();
}
-obj_t *uw_throwcf(obj_t *sym, const wchar_t *fmt, ...)
-{
- va_list vl;
- obj_t *stream = make_string_output_stream();
-
- va_start (vl, fmt);
- (void) vcformat(stream, fmt, vl);
- va_end (vl);
-
- uw_throw(sym, get_string_from_stream(stream));
- abort();
-}
-
-obj_t *uw_errorcf(const wchar_t *fmt, ...)
-{
- va_list vl;
- obj_t *stream = make_string_output_stream();
-
- va_start (vl, fmt);
- (void) vcformat(stream, fmt, vl);
- va_end (vl);
-
- uw_throw(error, get_string_from_stream(stream));
- abort();
-}
-
-obj_t *type_mismatch(const wchar_t *fmt, ...)
+obj_t *type_mismatch(obj_t *fmt, ...)
{
va_list vl;
obj_t *stream = make_string_output_stream();
@@ -317,21 +291,21 @@ obj_t *uw_register_subtype(obj_t *sub, obj_t *sup)
if (sub == t) {
if (sup == t)
return sup;
- uw_throwf(type_error, L"cannot define ~a as an exception subtype of ~a",
+ uw_throwf(type_error, lit("cannot define ~a as an exception subtype of ~a"),
sub, sup, nao);
}
if (sup == nil) {
- uw_throwf(type_error, L"cannot define ~a as an exception subtype of ~a",
+ uw_throwf(type_error, lit("cannot define ~a as an exception subtype of ~a"),
sub, sup, nao);
}
if (uw_exception_subtype_p(sub, sup))
- uw_throwf(type_error, L"~a is already an exception subtype of ~a",
+ uw_throwf(type_error, lit("~a is already an exception subtype of ~a"),
sub, sup, nao);
if (uw_exception_subtype_p(sup, sub))
- uw_throwf(type_error, L"~a is already an exception supertype of ~a",
+ uw_throwf(type_error, lit("~a is already an exception supertype of ~a"),
sub, sup, nao);
/* If sup symbol not registered, then we make it