2008-06-07 18:28:36 +08:00
|
|
|
/* $Revision: 5 $
|
|
|
|
**
|
|
|
|
** Internal header file for editline library.
|
|
|
|
*/
|
2008-10-02 15:09:09 +08:00
|
|
|
#ifndef __PRIVATE_EDITLINE_H__
|
|
|
|
#define __PRIVATE_EDITLINE_H__
|
|
|
|
|
2008-06-08 03:03:48 +08:00
|
|
|
#include <config.h>
|
2008-06-07 18:28:36 +08:00
|
|
|
#include <stdio.h>
|
2008-06-09 05:49:32 +08:00
|
|
|
#ifdef HAVE_MALLOC_H
|
|
|
|
#include <malloc.h>
|
|
|
|
#endif
|
2008-06-08 03:03:48 +08:00
|
|
|
#ifdef HAVE_STDLIB_H
|
2008-06-07 18:28:36 +08:00
|
|
|
#include <stdlib.h>
|
2008-06-08 03:03:48 +08:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_STRING_H
|
2008-06-07 18:28:36 +08:00
|
|
|
#include <string.h>
|
2008-06-08 03:03:48 +08:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_DIRENT_H
|
|
|
|
#include <dirent.h>
|
|
|
|
#endif
|
2008-06-09 06:17:48 +08:00
|
|
|
#ifdef HAVE_SIGNAL_H
|
|
|
|
#include <signal.h>
|
|
|
|
#endif
|
2008-06-08 03:03:48 +08:00
|
|
|
#ifdef SYS_UNIX
|
2008-06-07 18:28:36 +08:00
|
|
|
#include "unix.h"
|
|
|
|
#endif /* defined(SYS_UNIX) */
|
|
|
|
#if defined(SYS_OS9)
|
|
|
|
#include "os9.h"
|
|
|
|
#endif /* defined(SYS_OS9) */
|
|
|
|
|
|
|
|
#if !defined(SIZE_T)
|
|
|
|
#define SIZE_T unsigned int
|
|
|
|
#endif /* !defined(SIZE_T) */
|
|
|
|
|
|
|
|
typedef unsigned char CHAR;
|
|
|
|
|
|
|
|
#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;
|
2008-06-10 03:37:01 +08:00
|
|
|
#if defined(DO_SIGTSTP)
|
|
|
|
extern int rl_susp;
|
|
|
|
#endif /* defined(DO_SIGTSTP) */
|
2008-10-02 15:09:09 +08:00
|
|
|
#ifdef COMPLETE
|
|
|
|
extern char *default_rl_complete();
|
|
|
|
extern int default_rl_list_possib(char *pathname, char ***avp);
|
|
|
|
#endif
|
2008-06-07 18:28:36 +08:00
|
|
|
extern void rl_ttyset();
|
|
|
|
extern void rl_add_slash();
|
|
|
|
|
2008-06-08 03:03:48 +08:00
|
|
|
#if !defined(HAVE_STDLIB_H)
|
2008-06-07 18:28:36 +08:00
|
|
|
extern char *getenv();
|
|
|
|
extern char *malloc();
|
|
|
|
extern char *realloc();
|
|
|
|
extern char *memcpy();
|
|
|
|
extern char *strcat();
|
|
|
|
extern char *strchr();
|
|
|
|
extern char *strrchr();
|
|
|
|
extern char *strcpy();
|
2008-06-10 03:37:01 +08:00
|
|
|
extern char *strdup();
|
2008-06-07 18:28:36 +08:00
|
|
|
extern int strcmp();
|
|
|
|
extern int strlen();
|
|
|
|
extern int strncmp();
|
|
|
|
#endif /* !defined(HAVE_STDLIB) */
|
|
|
|
|
|
|
|
#if defined(NEED_STRDUP)
|
|
|
|
extern char *strdup();
|
|
|
|
#endif
|
2008-10-02 15:09:09 +08:00
|
|
|
|
|
|
|
#include "../include/editline.h"
|
|
|
|
#endif /* __PRIVATE_EDITLINE_H__ */
|