1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

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.
This commit is contained in:
Tomas Hlavacek
2013-01-23 17:14:53 +01:00
parent 5c2c4ea8b1
commit e454916149
4 changed files with 252 additions and 207 deletions

View File

@@ -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);