diff options
author | Patrik Nyblom <[email protected]> | 2013-02-13 12:24:34 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2013-02-18 11:49:11 +0100 |
commit | bfe9aeb47b494ec4243549340f9abf2a246e35a0 (patch) | |
tree | 540315e37599a07e4f52aceeadd8d1d0c0856e83 /erts/emulator/beam/erl_unicode.c | |
parent | 1eb56b8359fdc2f695f7439d5343330f3d5a5692 (diff) | |
download | otp-bfe9aeb47b494ec4243549340f9abf2a246e35a0.tar.gz otp-bfe9aeb47b494ec4243549340f9abf2a246e35a0.tar.bz2 otp-bfe9aeb47b494ec4243549340f9abf2a246e35a0.zip |
Add +pc {latin1|unicode} switch and io:printable_range/0
This is the base for implementing configurable
~tp printouts, so that the user can define which
characters to view as actually printable in the shell and
by io_lib:format.
The functionality is neither documented nor used in this commit
Diffstat (limited to 'erts/emulator/beam/erl_unicode.c')
-rw-r--r-- | erts/emulator/beam/erl_unicode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c index 80982f3760..fa53fd0937 100644 --- a/erts/emulator/beam/erl_unicode.c +++ b/erts/emulator/beam/erl_unicode.c @@ -2747,3 +2747,11 @@ int erts_utf8_to_latin1(byte* dest, const byte* source, int slen) return dp - dest; } +BIF_RETTYPE io_printable_range_0(BIF_ALIST_0) +{ + if (erts_get_printable_characters() == ERL_PRINTABLE_CHARACTERS_UNICODE) { + BIF_RET(am_unicode); + } else { + BIF_RET(am_latin1); + } +} |