2010-07-18 07:41:18 +08:00
|
|
|
/* Internal header file for editline library.
|
|
|
|
*
|
|
|
|
* Copyright (c) 1992, 1993 Simmule Turner and Rich Salz. All rights reserved.
|
|
|
|
*
|
|
|
|
* This software is not subject to any license of the American Telephone
|
|
|
|
* and Telegraph Company or of the Regents of the University of California.
|
|
|
|
*
|
|
|
|
* Permission is granted to anyone to use this software for any purpose on
|
|
|
|
* any computer system, and to alter it and redistribute it freely, subject
|
|
|
|
* to the following restrictions:
|
|
|
|
* 1. The authors are not responsible for the consequences of use of this
|
|
|
|
* software, no matter how awful, even if they arise from flaws in it.
|
|
|
|
* 2. The origin of this software must not be misrepresented, either by
|
|
|
|
* explicit claim or by omission. Since few users ever read sources,
|
|
|
|
* credits must appear in the documentation.
|
|
|
|
* 3. Altered versions must be plainly marked as such, and must not be
|
|
|
|
* misrepresented as being the original software. Since few users
|
|
|
|
* ever read sources, credits must appear in the documentation.
|
|
|
|
* 4. This notice may not be removed or altered.
|
|
|
|
*/
|
|
|
|
|
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"
|
2010-07-18 04:38:05 +08:00
|
|
|
#endif
|
|
|
|
#ifdef SYS_OS9
|
2008-06-07 18:28:36 +08:00
|
|
|
#include "os9.h"
|
2010-07-18 04:38:05 +08:00
|
|
|
#endif
|
2008-06-07 18:28:36 +08:00
|
|
|
|
2010-07-18 04:38:05 +08:00
|
|
|
#ifndef SIZE_T
|
2008-06-07 18:28:36 +08:00
|
|
|
#define SIZE_T unsigned int
|
2010-07-18 04:38:05 +08:00
|
|
|
#endif
|
2008-06-07 18:28:36 +08:00
|
|
|
|
|
|
|
typedef unsigned char CHAR;
|
|
|
|
|
|
|
|
#define MEM_INC 64
|
|
|
|
#define SCREEN_INC 256
|
|
|
|
|
2010-07-18 04:38:05 +08:00
|
|
|
#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))
|
2008-06-07 18:28:36 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
** 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;
|
2010-07-18 07:41:18 +08:00
|
|
|
#ifdef CONFIG_SIGSTOP
|
2008-06-10 03:37:01 +08:00
|
|
|
extern int rl_susp;
|
2010-07-18 04:38:05 +08:00
|
|
|
#endif
|
2010-07-18 07:41:18 +08:00
|
|
|
#ifdef CONFIG_DEFAULT_COMPLETE
|
2010-07-18 08:42:05 +08:00
|
|
|
extern char *default_rl_complete(char *pathname, int *unique);
|
2008-10-02 15:09:09 +08:00
|
|
|
extern int default_rl_list_possib(char *pathname, char ***avp);
|
|
|
|
#endif
|
2010-07-18 04:38:05 +08:00
|
|
|
extern void rl_ttyset(int Reset);
|
|
|
|
extern void rl_add_slash(char *path, char *p);
|
2008-06-07 18:28:36 +08:00
|
|
|
|
2010-07-18 04:38:05 +08:00
|
|
|
#ifndef HAVE_STDLIB_H
|
2010-07-18 07:41:18 +08:00
|
|
|
extern char *getenv(const char *name);
|
|
|
|
extern char *malloc(size_t size);
|
|
|
|
extern char *realloc(void *ptr, size_t size);
|
|
|
|
extern char *memcpy(void *dest, const void *src, size_t n);
|
|
|
|
extern char *strcat(char *dest, const char *src);
|
|
|
|
extern char *strchr(const char *s, int c);
|
|
|
|
extern char *strrchr(const char *s, int c);
|
|
|
|
extern char *strcpy(char *dest, const char *src);
|
|
|
|
extern char *strdup(const char *s);
|
|
|
|
extern int strcmp(const char *s1, const char *s2);
|
|
|
|
extern int strlen(const char *s);
|
|
|
|
extern int strncmp(const char *s1, const char *s2, size_t n);
|
2010-07-18 04:38:05 +08:00
|
|
|
#endif/* !HAVE_STDLIB */
|
2008-06-07 18:28:36 +08:00
|
|
|
|
2010-07-18 09:36:05 +08:00
|
|
|
#ifndef HAVE_STRDUP
|
2010-07-18 04:38:05 +08:00
|
|
|
extern char *strdup(const char *s);
|
2008-06-07 18:28:36 +08:00
|
|
|
#endif
|
2008-10-02 15:09:09 +08:00
|
|
|
|
|
|
|
#include "../include/editline.h"
|
|
|
|
#endif /* __PRIVATE_EDITLINE_H__ */
|