1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/editline/editline.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,98 @@ 1.4 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1.5 + * This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef editline_editline_h 1.10 +#define editline_editline_h 1.11 + 1.12 +/* 1.13 + * Copyright 1992,1993 Simmule Turner and Rich Salz. All rights reserved. 1.14 + * 1.15 + * This software is not subject to any license of the American Telephone 1.16 + * and Telegraph Company or of the Regents of the University of California. 1.17 + * 1.18 + * Permission is granted to anyone to use this software for any purpose on 1.19 + * any computer system, and to alter it and redistribute it freely, subject 1.20 + * to the following restrictions: 1.21 + * 1. The authors are not responsible for the consequences of use of this 1.22 + * software, no matter how awful, even if they arise from flaws in it. 1.23 + * 2. The origin of this software must not be misrepresented, either by 1.24 + * explicit claim or by omission. Since few users ever read sources, 1.25 + * credits must appear in the documentation. 1.26 + * 3. Altered versions must be plainly marked as such, and must not be 1.27 + * misrepresented as being the original software. Since few users 1.28 + * ever read sources, credits must appear in the documentation. 1.29 + * 4. This notice may not be removed or altered. 1.30 + */ 1.31 + 1.32 +/* 1.33 +** Internal header file for editline library. 1.34 +*/ 1.35 +#include <stdio.h> 1.36 +#if defined(HAVE_STDLIB) 1.37 +#include <stdlib.h> 1.38 +#include <string.h> 1.39 +#endif /* defined(HAVE_STDLIB) */ 1.40 +#if defined(SYS_UNIX) 1.41 +#include "unix.h" 1.42 +#endif /* defined(SYS_UNIX) */ 1.43 +#if defined(SYS_OS9) 1.44 +#include "os9.h" 1.45 +#endif /* defined(SYS_OS9) */ 1.46 + 1.47 +#if !defined(SIZE_T) 1.48 +#define SIZE_T unsigned int 1.49 +#endif /* !defined(SIZE_T) */ 1.50 + 1.51 +typedef unsigned char CHAR; 1.52 + 1.53 +#if defined(HIDE) 1.54 +#define STATIC static 1.55 +#else 1.56 +#define STATIC /* NULL */ 1.57 +#endif /* !defined(HIDE) */ 1.58 + 1.59 +#define CONST const 1.60 + 1.61 +#define MEM_INC 64 1.62 +#define SCREEN_INC 256 1.63 + 1.64 +#define DISPOSE(p) free((char *)(p)) 1.65 +#define NEW(T, c) \ 1.66 + ((T *)malloc((unsigned int)(sizeof (T) * (c)))) 1.67 +#define RENEW(p, T, c) \ 1.68 + (p = (T *)realloc((char *)(p), (unsigned int)(sizeof (T) * (c)))) 1.69 +#define COPYFROMTO(new, p, len) \ 1.70 + (void)memcpy((char *)(new), (char *)(p), (int)(len)) 1.71 + 1.72 + 1.73 +/* 1.74 +** Variables and routines internal to this package. 1.75 +*/ 1.76 +extern unsigned rl_eof; 1.77 +extern unsigned rl_erase; 1.78 +extern unsigned rl_intr; 1.79 +extern unsigned rl_kill; 1.80 +extern unsigned rl_quit; 1.81 +extern char *rl_complete(); 1.82 +extern int rl_list_possib(); 1.83 +extern void rl_ttyset(int); 1.84 +extern void rl_add_slash(); 1.85 + 1.86 +#if !defined(HAVE_STDLIB) 1.87 +extern char *getenv(); 1.88 +extern char *malloc(); 1.89 +extern char *realloc(); 1.90 +extern char *memcpy(); 1.91 +extern char *strcat(); 1.92 +extern char *strchr(); 1.93 +extern char *strrchr(); 1.94 +extern char *strcpy(); 1.95 +extern char *strdup(); 1.96 +extern int strcmp(); 1.97 +extern int strlen(); 1.98 +extern int strncmp(); 1.99 +#endif /* !defined(HAVE_STDLIB) */ 1.100 + 1.101 +#endif /* editline_editline_h */