summaryrefslogtreecommitdiffstats
path: root/linux/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/main.c')
-rw-r--r--linux/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/main.c b/linux/main.c
index bd208f2..325a35e 100644
--- a/linux/main.c
+++ b/linux/main.c
@@ -6,6 +6,7 @@
#include <errno.h>
#include <string.h>
#include <poll.h>
+#include <stdbool.h>
#ifdef DEBUG_MESSAGE
#define DEBUG(_s, ...) fprintf(stderr, _s, ## __VA_ARGS__)
@@ -52,7 +53,12 @@ static void handle_command(const char *cmd) {
}
+int test_main(void);
int main(int argc, char **argv) {
+ return test_main();
+}
+
+int main_(int argc, char **argv) {
struct termios tio;
int tfd;
unsigned char buf[1024];
@@ -101,6 +107,8 @@ int main(int argc, char **argv) {
/* command */
for (ssize_t cidx = 0; cidx < nread; ++i) {
/* TODO: split command by lines */
+ if (buf[cidx] <= ' ') continue; /* skip initial whitespace */
+
}
} else {
/* gecko */