Wrap a table (bg set to black, width=80%) around the screenshot
[oweals/busybox.git] / telnet.c
index fff8c06b54da3e274ab9c152f630850b0bdce460..8f7bbf29b8fac1f4571cecef86acc6447d9073ff 100644 (file)
--- a/telnet.c
+++ b/telnet.c
@@ -30,7 +30,6 @@
  *
  */
 
-
 #include "busybox.h"
 #include <termios.h>
 #include <unistd.h>
@@ -46,7 +45,7 @@
 #include <netdb.h>
 
 #if 0
-#define DOTRACE 1
+static const int DOTRACE = 1;
 #endif
 
 #ifdef DOTRACE
 #include <sys/time.h>
 #endif
 
-#define DATABUFSIZE 128
-#define IACBUFSIZE 128
+static const int DATABUFSIZE = 128;
+static const int IACBUFSIZE = 128;
 
-#define CHM_TRY 0
-#define CHM_ON 1
-#define CHM_OFF        2
+static const int CHM_TRY = 0;
+static const int CHM_ON = 1;
+static const int CHM_OFF = 2;
 
-#define UF_ECHO        0x01
-#define UF_SGA 0x02
+static const int UF_ECHO = 0x01;
+static const int UF_SGA = 0x02;
 
-#define TS_0   1
-#define TS_IAC 2
-#define TS_OPT 3
-#define TS_SUB1 4
-#define TS_SUB2        5
+enum {
+       TS_0 = 1,
+       TS_IAC = 2,
+       TS_OPT = 3,
+       TS_SUB1 = 4,
+       TS_SUB2 = 5,
+};
 
 #define WriteCS(fd, str) write(fd, str, sizeof str -1)
 
@@ -332,7 +333,7 @@ static void setConMode()
        {
                if (G.charmode == CHM_TRY) {
                        G.charmode = CHM_ON;
-                       fprintf(stdout, "\r\nEntering character mode%s'^]'.\r\n", escapecharis);
+                       printf("\r\nEntering character mode%s'^]'.\r\n", escapecharis);
                        rawmode();
                }
        }
@@ -340,7 +341,7 @@ static void setConMode()
        {
                if (G.charmode != CHM_OFF) {
                        G.charmode = CHM_OFF;
-                       fprintf(stdout, "\r\nEntering line mode%s'^C'.\r\n", escapecharis);
+                       printf("\r\nEntering line mode%s'^C'.\r\n", escapecharis);
                        cookmode();
                }
        }