diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/editline/unix.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/js/src/editline/unix.h b/js/src/editline/unix.h new file mode 100644 index 0000000000..7a58f19e4b --- /dev/null +++ b/js/src/editline/unix.h @@ -0,0 +1,52 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef editline_unix_h +#define editline_unix_h + +/* + * Copyright 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. + */ + + +/* +** Editline system header file for Unix. +*/ + +#define CRLF "\r\n" +#define FORWARD STATIC + +#include <sys/types.h> +#include <sys/stat.h> + +#if defined(USE_DIRENT) +#include <dirent.h> +typedef struct dirent DIRENTRY; +#else +#include <sys/dir.h> +typedef struct direct DIRENTRY; +#endif /* defined(USE_DIRENT) */ + +#if !defined(S_ISDIR) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif /* !defined(S_ISDIR) */ + +#endif /* editline_unix_h */ |