From bfe9aeb47b494ec4243549340f9abf2a246e35a0 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 13 Feb 2013 12:24:34 +0100 Subject: 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 --- erts/etc/common/erlexec.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'erts/etc') diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c index 577554c43d..02615f9ef1 100644 --- a/erts/etc/common/erlexec.c +++ b/erts/etc/common/erlexec.c @@ -145,6 +145,13 @@ static char *plusr_val_switches[] = { NULL }; +/* +pc arguments with values */ +static char *pluspc_val_switches[] = { + "latin1", + "unicode", + NULL +}; + /* +z arguments with values */ static char *plusz_val_switches[] = { "dbbl", @@ -912,6 +919,16 @@ int main(int argc, char **argv) i++; } break; + case 'p': + if (argv[i][2] != 'c' || argv[i][3] != '\0') + goto the_default; + if (i+1 >= argc) + usage(argv[i]); + argv[i][0] = '-'; + add_Eargs(argv[i]); + add_Eargs(argv[i+1]); + i++; + break; case 'z': if (!is_one_of_strings(&argv[i][2], plusz_val_switches)) { goto the_default; -- cgit v1.2.3