aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2013-02-13 12:24:34 +0100
committerPatrik Nyblom <[email protected]>2013-02-18 11:49:11 +0100
commitbfe9aeb47b494ec4243549340f9abf2a246e35a0 (patch)
tree540315e37599a07e4f52aceeadd8d1d0c0856e83 /erts/emulator/beam/sys.h
parent1eb56b8359fdc2f695f7439d5343330f3d5a5692 (diff)
downloadotp-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/sys.h')
-rw-r--r--erts/emulator/beam/sys.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 9416a91480..05bff430e3 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -1040,11 +1040,24 @@ char* win32_errorstr(int);
#define ERL_FILENAME_WARNING_IGNORE (1)
#define ERL_FILENAME_WARNING_ERROR (2)
+/***********************************************************************
+ * The user can request a range of character that he/she consider
+ * printable. Currently this can be either latin1 or unicode, but
+ * in the future a set of ranges, or languages, could be specified.
+ ***********************************************************************/
+#define ERL_PRINTABLE_CHARACTERS_LATIN1 (0)
+#define ERL_PRINTABLE_CHARACTERS_UNICODE (1)
+
int erts_get_native_filename_encoding(void);
/* The set function is only to be used by erl_init! */
void erts_set_user_requested_filename_encoding(int encoding, int warning);
int erts_get_user_requested_filename_encoding(void);
int erts_get_filename_warning_type(void);
+/* This function is called from erl_init. The setting is read by BIF's
+ in io/io_lib. Setting is not atomic. */
+void erts_set_printable_characters(int range);
+/* Get the setting (ERL_PRINTABLE_CHARACTERS_{LATIN1|UNICODE} */
+int erts_get_printable_characters(void);
void erts_init_sys_common_misc(void);