some coverity fixes.
[minix.git] / lib / libedit / editline.h
blobb63b69d903370d153724fa43b82925c9030754e8
1 /*
2 ** Internal header file for editline library.
3 */
4 #include <stdio.h>
5 #if defined(HAVE_STDLIB)
6 #include <stdlib.h>
7 #include <string.h>
8 #endif /* defined(HAVE_STDLIB) */
9 #if defined(SYS_UNIX)
10 #include "unix.h"
11 #endif /* defined(SYS_UNIX) */
12 #if defined(SYS_OS9)
13 #include "os9.h"
14 #endif /* defined(SYS_OS9) */
16 #if !defined(SIZE_T)
17 #define SIZE_T unsigned int
18 #endif /* !defined(SIZE_T) */
20 typedef unsigned char CHAR;
22 #if defined(HIDE)
23 #define STATIC static
24 #else
25 #define STATIC /* NULL */
26 #endif /* !defined(HIDE) */
28 #if !defined(CONST)
29 #if defined(__STDC__)
30 #define CONST const
31 #else
32 #define CONST
33 #endif /* defined(__STDC__) */
34 #endif /* !defined(CONST) */
37 #define MEM_INC 64
38 #define SCREEN_INC 256
40 #define DISPOSE(p) free((char *)(p))
41 #define NEW(T, c) \
42 ((T *)malloc((unsigned int)(sizeof (T) * (c))))
43 #define RENEW(p, T, c) \
44 (p = (T *)realloc((char *)(p), (unsigned int)(sizeof (T) * (c))))
45 #define COPYFROMTO(new, p, len) \
46 (void)memcpy((char *)(new), (char *)(p), (int)(len))
50 ** Variables and routines internal to this package.
52 extern int rl_eof;
53 extern int rl_erase;
54 extern int rl_intr;
55 extern int rl_kill;
56 extern int rl_quit;
57 extern char *rl_complete();
58 extern int rl_list_possib();
59 extern void rl_ttyset();
60 extern void rl_add_slash();
62 #if !defined(HAVE_STDLIB)
63 extern char *getenv();
64 extern char *malloc();
65 extern char *realloc();
66 extern char *memcpy();
67 extern char *strcat();
68 extern char *strchr();
69 extern char *strrchr();
70 extern char *strcpy();
71 extern int strcmp();
72 extern int strlen();
73 extern int strncmp();
74 #endif /* !defined(HAVE_STDLIB) */
76 #if defined(NEED_STRDUP)
77 extern char *strdup();
78 #endif