Closes #18. Change to char32_t everywhere; builds fine, behaviour as before.
This commit is contained in:
parent
812a1be7d9
commit
c59825d7fe
33 changed files with 116 additions and 76 deletions
|
|
@ -20,6 +20,7 @@
|
|||
/*
|
||||
* wide characters
|
||||
*/
|
||||
#include <uchar.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
/* libcurl, used for io */
|
||||
|
|
@ -54,7 +55,7 @@ struct pso_pointer in_write(struct pso_pointer p, URL_FILE *output,
|
|||
* TODO: this does not yet even nearly cope with all the possible special
|
||||
* cases.
|
||||
*/
|
||||
void write_char( wchar_t wc, URL_FILE * output, bool escape) {
|
||||
void write_char( char32_t wc, URL_FILE * output, bool escape) {
|
||||
if (escape && !iswprint(wc)) {
|
||||
url_fwprintf(output, L"\\%04x", wc);
|
||||
// url_fputwc(L'\\', output);
|
||||
|
|
@ -79,7 +80,7 @@ struct pso_pointer print_string_like_thing(struct pso_pointer p,
|
|||
if (keywordp(p) || stringp(p) || symbolp(p)) {
|
||||
for (struct pso_pointer cursor = p; !nilp(cursor);
|
||||
cursor = pointer_to_object(cursor)->payload.string.cdr) {
|
||||
wchar_t wc = pointer_to_object(cursor)->payload.string.character;
|
||||
char32_t wc = pointer_to_object(cursor)->payload.string.character;
|
||||
|
||||
write_char( wc, output, escape);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue