summaryrefslogtreecommitdiff
path: root/networking/telnet.c
diff options
context:
space:
mode:
authorMark Whitley2001-01-23 22:30:04 +0000
committerMark Whitley2001-01-23 22:30:04 +0000
commit59ab025363d884deb2013dcaae6c968585a6ec72 (patch)
tree852d97bdc34c44dbcf29cc8b5cd9257a8c90f7b3 /networking/telnet.c
parent2b8d07c590249991fae975652aae86f5fca91f81 (diff)
downloadbusybox-59ab025363d884deb2013dcaae6c968585a6ec72.zip
busybox-59ab025363d884deb2013dcaae6c968585a6ec72.tar.gz
#define -> static const int. Also got rid of some big static buffers.
Diffstat (limited to 'networking/telnet.c')
-rw-r--r--networking/telnet.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/networking/telnet.c b/networking/telnet.c
index 76956e9..ac6813e 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -50,7 +50,7 @@
#include <netdb.h>
#if 0
-#define DOTRACE 1
+static const int DOTRACE = 1;
#endif
#ifdef DOTRACE
@@ -67,21 +67,23 @@
#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)