aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common
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/etc/common
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/etc/common')
-rw-r--r--erts/etc/common/erlexec.c17
1 files changed, 17 insertions, 0 deletions
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;