File:  [ELWIX - Embedded LightWeight unIX -] / libaitcli / inc / defs.h
Revision 1.2.2.4: download - view: text, annotated - select for diffs - revision graph
Tue Jun 8 08:43:47 2010 UTC (14 years, 1 month ago) by misho
Branches: cli2_0
Diff to: branchpoint 1.2: preferred, unified
add separator ability

/*************************************************************************
* (C) 2010 AITNET ltd - Sofia/Bulgaria - <misho@aitbg.com>
*  by Michael Pounov <misho@openbsd-bg.org>
*
* $Author: misho $
* $Id: defs.h,v 1.2.2.4 2010/06/08 08:43:47 misho Exp $
*
*************************************************************************/
#ifndef __DEFS_H
#define __DEFS_H


#define MAX_BINDKEY		559

#define HISTORY_LINES		100
#define HISTORY_FILE		"/tmp/.aitcli.history"

#define CLI_PROMPT		"aitCLI> "
#define CLI_CMD_SEP		"---"

#define LINEMODE_RAW		-1
#define LINEMODE_INS		0
#define LINEMODE_OVER		1

#define RETCODE_ERR		-1
#define RETCODE_OK		0
#define RETCODE_EOL		1
#define RETCODE_EOF		2

#define DEFAULT_SOCK_TIMEOUT	60

#define MAX_PROMPT_ITEMS	21

#define LOGERR	{ \
			cli_Errno = errno; \
			strlcpy(cli_Error, strerror(errno), STRSIZ); \
		}


extern int cli_Errno;
extern char cli_Error[];

inline void cli_SetErr(int eno, char *estr, ...);


#endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>