diff options
Diffstat (limited to 'erts/etc/unix/to_erl.c')
-rw-r--r-- | erts/etc/unix/to_erl.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/erts/etc/unix/to_erl.c b/erts/etc/unix/to_erl.c index f9ca5f6373..4de4ac4d64 100644 --- a/erts/etc/unix/to_erl.c +++ b/erts/etc/unix/to_erl.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1996-2021. All Rights Reserved. + * Copyright Ericsson AB 1996-2023. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,13 +82,13 @@ # define STRERROR(x) "" #endif -#define noDEBUG +#define noDEBUG_TOERL #define PIPE_DIR "/tmp/" #define PIPE_STUBNAME "erlang.pipe" #define PIPE_STUBLEN strlen(PIPE_STUBNAME) -#ifdef DEBUG +#ifdef DEBUG_TOERL #define STATUS(s) { fprintf(stderr, (s)); fflush(stderr); } #else #define STATUS(s) @@ -106,7 +106,7 @@ static int protocol_ver = RUN_ERL_LO_VER; /* assume lowest to begin with */ static int write_all(int fd, const char* buf, int len); static int window_size_seq(char* buf, size_t bufsz); static int version_handshake(char* buf, int len, int wfd); -#ifdef DEBUG +#ifdef DEBUG_TOERL static void show_terminal_settings(struct termios *); #endif @@ -155,7 +155,7 @@ int main(int argc, char **argv) pipeIx = 2; } -#ifdef DEBUG +#ifdef DEBUG_TOERL fprintf(stderr, "%s: pid is : %d\n", argv[0], (int)getpid()); #endif @@ -209,25 +209,25 @@ int main(int argc, char **argv) } if ((rfd = open (FIFO1, O_RDONLY|DONT_BLOCK_PLEASE, 0)) < 0) { -#ifdef DEBUG +#ifdef DEBUG_TOERL fprintf(stderr, "Could not open FIFO %s for reading.\n", FIFO1); #endif fprintf(stderr, "No running Erlang on pipe %s: %s\n", pipename, strerror(errno)); exit(1); } -#ifdef DEBUG +#ifdef DEBUG_TOERL fprintf(stderr, "to_erl: %s opened for reading\n", FIFO1); #endif if ((wfd = open (FIFO2, O_WRONLY|DONT_BLOCK_PLEASE, 0)) < 0) { -#ifdef DEBUG +#ifdef DEBUG_TOERL fprintf(stderr, "Could not open FIFO %s for writing.\n", FIFO2); #endif fprintf(stderr, "No running Erlang on pipe %s: %s\n", pipename, strerror(errno)); close(rfd); exit(1); } -#ifdef DEBUG +#ifdef DEBUG_TOERL fprintf(stderr, "to_erl: %s opened for writing\n", FIFO2); #endif @@ -245,7 +245,7 @@ int main(int argc, char **argv) } tty_smode = tty_rmode; tty_eof = '\004'; /* Ctrl+D to exit */ -#ifdef DEBUG +#ifdef DEBUG_TOERL show_terminal_settings(&tty_rmode); #endif tty_smode.c_iflag = @@ -347,7 +347,7 @@ int main(int argc, char **argv) tcsetattr(0, TCSADRAIN, &tty_smode); -#ifdef DEBUG +#ifdef DEBUG_TOERL show_terminal_settings(&tty_smode); #endif /* @@ -420,7 +420,7 @@ int main(int argc, char **argv) } if (len) { -#ifdef DEBUG +#ifdef DEBUG_TOERL write_all(1, buf, len); #endif if (write_all(wfd, buf, len) != len) { @@ -580,7 +580,7 @@ static int version_handshake(char* buf, int len, int wfd) } -#ifdef DEBUG +#ifdef DEBUG_TOERL #define S(x) ((x) > 0 ? 1 : 0) static void show_terminal_settings(struct termios *t) |