diff options
author | Tomas Hlavacek <tmshlvck@gmail.com> | 2013-01-23 17:14:53 +0100 |
---|---|---|
committer | Tomas Hlavacek <tmshlvck@gmail.com> | 2013-03-19 18:03:49 +0100 |
commit | e454916149d4efe66732fdd0388181813cab6ed0 (patch) | |
tree | d5dafbd2a67fca6d281b150e4108ba8de28520c3 /client/client.h | |
parent | 5c2c4ea8b1e924fce433094e744c0467da55aaab (diff) |
Pull out independent routines from client_full.c
Pull out routines for interacting with the server and interpreting
internal commands which are not dependent on libreadline and
ncurses libraries.
This is a preparation step for a new lightweight birdc client.
Diffstat (limited to 'client/client.h')
-rw-r--r-- | client/client.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/client/client.h b/client/client.h index 64de97ec..373b1c6f 100644 --- a/client/client.h +++ b/client/client.h @@ -18,3 +18,17 @@ void cmd_build_tree(void); void cmd_help(char *cmd, int len); int cmd_complete(char *cmd, int len, char *buf, int again); char *cmd_expand(char *cmd); + +/* client_common.c */ + +#define STATE_PROMPT 0 +#define STATE_CMD_SERVER 1 +#define STATE_CMD_USER 2 + +#define SERVER_READ_BUF_LEN 4096 + +int handle_internal_command(char *cmd); +void submit_server_command(char *cmd); +void server_connect(void); +void server_read(void); +void server_send(char *cmd); |