summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-12 22:48:15 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-12 22:48:15 -0800
commit673d5f3b84d276fb29233d6a3f485ccfe330be13 (patch)
treeb1447ce861394a8b5873589ecb03659f2c5506fe /lib.c
parent8367c03ef07473cff4f1b6f0645e1ce9ae17c94c (diff)
downloadtxr-673d5f3b84d276fb29233d6a3f485ccfe330be13.tar.gz
txr-673d5f3b84d276fb29233d6a3f485ccfe330be13.tar.bz2
txr-673d5f3b84d276fb29233d6a3f485ccfe330be13.zip
Continuing wchar_t conversion. Making sure all stdio calls
use wide character functions so that there is no illicit mixing. (But the goal is to replace this usage with txr streams).
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib.c b/lib.c
index 110a94d1..280f6284 100644
--- a/lib.c
+++ b/lib.c
@@ -542,7 +542,7 @@ obj_t *list(obj_t *first, ...)
do {
*ptr++ = next;
if (ptr == array + 32)
- internal_error("runaway arguments in list function");
+ internal_error(L"runaway arguments in list function");
next = va_arg(vl, obj_t *);
} while (next != nao);
@@ -1533,7 +1533,7 @@ void cobj_print_op(obj_t *obj, obj_t *out)
{
put_cstring(out, L"#<");
obj_print(obj->co.cls, out);
- cformat(out, ": %p>", obj->co.handle);
+ cformat(out, L": %p>", obj->co.handle);
}
obj_t *assoc(obj_t *list, obj_t *key)
@@ -1856,7 +1856,7 @@ void obj_print(obj_t *obj, obj_t *out)
if (iswprint(*ptr))
put_cchar(out, *ptr);
else
- cformat(out, "\\%03o", (int) *ptr);
+ cformat(out, L"\\%03o", (int) *ptr);
}
}
put_cchar(out, '"');
@@ -1882,19 +1882,19 @@ void obj_print(obj_t *obj, obj_t *out)
if (iswprint(ch))
put_cchar(out, ch);
else
- cformat(out, "\\%03o", ch);
+ cformat(out, L"\\%03o", ch);
}
put_cchar(out, '\'');
}
return;
case NUM:
- cformat(out, "%ld", c_num(obj));
+ cformat(out, L"%ld", c_num(obj));
return;
case SYM:
put_string(out, symbol_name(obj));
return;
case FUN:
- cformat(out, "#<function: f%d>", (int) obj->f.functype);
+ cformat(out, L"#<function: f%d>", (int) obj->f.functype);
return;
case VEC:
{
@@ -1917,7 +1917,7 @@ void obj_print(obj_t *obj, obj_t *out)
return;
}
- cformat(out, "#<garbage: %p>", (void *) obj);
+ cformat(out, L"#<garbage: %p>", (void *) obj);
}
void obj_pprint(obj_t *obj, obj_t *out)
@@ -1954,13 +1954,13 @@ void obj_pprint(obj_t *obj, obj_t *out)
put_char(out, obj);
return;
case NUM:
- cformat(out, "%ld", c_num(obj));
+ cformat(out, L"%ld", c_num(obj));
return;
case SYM:
put_string(out, symbol_name(obj));
return;
case FUN:
- cformat(out, "#<function: f%d>", (int) obj->f.functype);
+ cformat(out, L"#<function: f%d>", (int) obj->f.functype);
return;
case VEC:
{
@@ -1983,7 +1983,7 @@ void obj_pprint(obj_t *obj, obj_t *out)
return;
}
- cformat(out, "#<garbage: %p>", (void *) obj);
+ cformat(out, L"#<garbage: %p>", (void *) obj);
}
void init(const wchar_t *pn, void *(*oom)(void *, size_t),