diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-09 11:44:11 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-09 11:44:11 +0200 |
commit | f1b71c9fe7dbb4886588a036399cf5ebe16b7c47 (patch) | |
tree | e07786aa479c9fb6ee3e537078470aaab5454f80 /sqmail-4.3.07/src/commands.c | |
parent | a293489ee83c8b05d845a162dc2a4de026f3775d (diff) |
removed top level directory
Diffstat (limited to 'sqmail-4.3.07/src/commands.c')
-rw-r--r-- | sqmail-4.3.07/src/commands.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/sqmail-4.3.07/src/commands.c b/sqmail-4.3.07/src/commands.c deleted file mode 100644 index 8602f7c..0000000 --- a/sqmail-4.3.07/src/commands.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "commands.h" -#include "buffer.h" -#include "stralloc.h" -#include "str.h" -#include "case.h" - -static stralloc cmd = {0}; - -int commands(buffer *b,struct commands *c) -{ - int i; - char *arg; - - for (;;) { - if (!stralloc_copys(&cmd,"")) return -1; - - for (;;) { - if (!stralloc_readyplus(&cmd,1)) return -1; - i = buffer_get(b,cmd.s + cmd.len,1); - if (i != 1) return i; - if (cmd.s[cmd.len] == '\n') break; - ++cmd.len; - } - - if (cmd.len > 0) if (cmd.s[cmd.len - 1] == '\r') --cmd.len; - - cmd.s[cmd.len] = 0; - - i = str_chr(cmd.s,' '); - arg = cmd.s + i; - while (*arg == ' ') ++arg; - cmd.s[i] = 0; - - for (i = 0; c[i].text; ++i) - if (case_equals(c[i].text,cmd.s)) break; - - c[i].fun(arg); - if (c[i].flush) c[i].flush(); - } -} |