1: /*************************************************************************
2: * (C) 2010 AITNET ltd - Sofia/Bulgaria - <misho@aitbg.com>
3: * by Michael Pounov <misho@openbsd-bg.org>
4: *
5: * $Author: misho $
6: * $Id: defs.h,v 1.3 2011/03/16 17:24:03 misho Exp $
7: *
8: *************************************************************************/
9: #ifndef __DEFS_H
10: #define __DEFS_H
11:
12:
13: #define MAX_BINDKEY 559
14:
15: #define HISTORY_LINES 100
16: #define HISTORY_FILE "/tmp/.aitcli.history"
17:
18: #define CLI_PROMPT "aitCLI> "
19: #define CLI_CMD_SEP "---"
20:
21: #define LINEMODE_RAW -1
22: #define LINEMODE_INS 0
23: #define LINEMODE_OVER 1
24:
25: #define RETCODE_ERR -1
26: #define RETCODE_OK 0
27: #define RETCODE_EOL 1
28: #define RETCODE_EOF 2
29:
30: #define DEFAULT_SOCK_TIMEOUT 60
31:
32: #define MAX_PROMPT_ITEMS 21
33:
34: #define LOGERR { \
35: cli_Errno = errno; \
36: strlcpy(cli_Error, strerror(errno), STRSIZ); \
37: }
38:
39:
40: extern int cli_Errno;
41: extern char cli_Error[];
42:
43: inline void cli_SetErr(int eno, char *estr, ...);
44:
45:
46: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>