-
Notifications
You must be signed in to change notification settings - Fork 1
/
editline.h
57 lines (46 loc) · 1.16 KB
/
editline.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* $Revision: 1.4 $
**
** Internal header file for editline library.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#define CRLF "\r\n"
#define FORWARD STATIC
typedef struct dirent DIRENTRY;
#if !defined(S_ISDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif /* !defined(S_ISDIR) */
typedef unsigned char CHAR;
#if defined(HIDE)
#define STATIC static
#else
#define STATIC /* NULL */
#endif /* !defined(HIDE) */
#define MEM_INC 64
#define SCREEN_INC 256
#define DISPOSE(p) free((char *)(p))
#define NEW(T, c) \
((T *)malloc((unsigned int)(sizeof (T) * (c))))
#define RENEW(p, T, c) \
(p = (T *)realloc((char *)(p), (unsigned int)(sizeof (T) * (c))))
#define COPYFROMTO(new, p, len) \
(void)memcpy((char *)(new), (char *)(p), (int)(len))
/*
** Variables and routines internal to this package.
*/
extern int rl_eof;
extern int rl_erase;
extern int rl_intr;
extern int rl_kill;
extern int rl_quit;
#if defined(DO_SIGTSTP)
extern int rl_susp;
#endif /* defined(DO_SIGTSTP) */
extern char *rl_complete();
extern int rl_list_possib();
extern void rl_ttyset();
extern void rl_add_slash();