use char buffers instead of unsigned char to make use of API less of a pain in the butt
diff --git a/telnet-client.c b/telnet-client.c
index e801611..d58f76b 100644
--- a/telnet-client.c
+++ b/telnet-client.c
@@ -36,8 +36,8 @@
tcsetattr(STDOUT_FILENO, TCSADRAIN, &orig_tios);
}
-static void _input(unsigned char *buffer, int size) {
- static unsigned char crlf[] = { '\r', '\n' };
+static void _input(char *buffer, int size) {
+ static char crlf[] = { '\r', '\n' };
int i;
for (i = 0; i != size; ++i) {
@@ -57,7 +57,7 @@
}
}
-static void _send(int sock, const unsigned char *buffer, unsigned int size) {
+static void _send(int sock, const char *buffer, unsigned int size) {
int rs;
/* send data */
@@ -127,7 +127,7 @@
buffer[0] = 0; /* IS code for RFC 1091 */
snprintf(buffer + 1, sizeof(buffer) - 1, "%s", getenv("TERM"));
libtelnet_send_subnegotiation(telnet, LIBTELNET_TELOPT_TTYPE,
- (unsigned char *)buffer, 1 + strlen(buffer + 1));
+ (char *)buffer, 1 + strlen(buffer + 1));
}
break;
/* error */
@@ -141,7 +141,7 @@
}
int main(int argc, char **argv) {
- unsigned char buffer[512];
+ char buffer[512];
int rs;
int sock;
struct sockaddr_in addr;