michael@0: /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef editline_editline_h michael@0: #define editline_editline_h michael@0: michael@0: /* michael@0: * Copyright 1992,1993 Simmule Turner and Rich Salz. All rights reserved. michael@0: * michael@0: * This software is not subject to any license of the American Telephone michael@0: * and Telegraph Company or of the Regents of the University of California. michael@0: * michael@0: * Permission is granted to anyone to use this software for any purpose on michael@0: * any computer system, and to alter it and redistribute it freely, subject michael@0: * to the following restrictions: michael@0: * 1. The authors are not responsible for the consequences of use of this michael@0: * software, no matter how awful, even if they arise from flaws in it. michael@0: * 2. The origin of this software must not be misrepresented, either by michael@0: * explicit claim or by omission. Since few users ever read sources, michael@0: * credits must appear in the documentation. michael@0: * 3. Altered versions must be plainly marked as such, and must not be michael@0: * misrepresented as being the original software. Since few users michael@0: * ever read sources, credits must appear in the documentation. michael@0: * 4. This notice may not be removed or altered. michael@0: */ michael@0: michael@0: /* michael@0: ** Internal header file for editline library. michael@0: */ michael@0: #include michael@0: #if defined(HAVE_STDLIB) michael@0: #include michael@0: #include michael@0: #endif /* defined(HAVE_STDLIB) */ michael@0: #if defined(SYS_UNIX) michael@0: #include "unix.h" michael@0: #endif /* defined(SYS_UNIX) */ michael@0: #if defined(SYS_OS9) michael@0: #include "os9.h" michael@0: #endif /* defined(SYS_OS9) */ michael@0: michael@0: #if !defined(SIZE_T) michael@0: #define SIZE_T unsigned int michael@0: #endif /* !defined(SIZE_T) */ michael@0: michael@0: typedef unsigned char CHAR; michael@0: michael@0: #if defined(HIDE) michael@0: #define STATIC static michael@0: #else michael@0: #define STATIC /* NULL */ michael@0: #endif /* !defined(HIDE) */ michael@0: michael@0: #define CONST const michael@0: michael@0: #define MEM_INC 64 michael@0: #define SCREEN_INC 256 michael@0: michael@0: #define DISPOSE(p) free((char *)(p)) michael@0: #define NEW(T, c) \ michael@0: ((T *)malloc((unsigned int)(sizeof (T) * (c)))) michael@0: #define RENEW(p, T, c) \ michael@0: (p = (T *)realloc((char *)(p), (unsigned int)(sizeof (T) * (c)))) michael@0: #define COPYFROMTO(new, p, len) \ michael@0: (void)memcpy((char *)(new), (char *)(p), (int)(len)) michael@0: michael@0: michael@0: /* michael@0: ** Variables and routines internal to this package. michael@0: */ michael@0: extern unsigned rl_eof; michael@0: extern unsigned rl_erase; michael@0: extern unsigned rl_intr; michael@0: extern unsigned rl_kill; michael@0: extern unsigned rl_quit; michael@0: extern char *rl_complete(); michael@0: extern int rl_list_possib(); michael@0: extern void rl_ttyset(int); michael@0: extern void rl_add_slash(); michael@0: michael@0: #if !defined(HAVE_STDLIB) michael@0: extern char *getenv(); michael@0: extern char *malloc(); michael@0: extern char *realloc(); michael@0: extern char *memcpy(); michael@0: extern char *strcat(); michael@0: extern char *strchr(); michael@0: extern char *strrchr(); michael@0: extern char *strcpy(); michael@0: extern char *strdup(); michael@0: extern int strcmp(); michael@0: extern int strlen(); michael@0: extern int strncmp(); michael@0: #endif /* !defined(HAVE_STDLIB) */ michael@0: michael@0: #endif /* editline_editline_h */