js/src/editline/editline.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
michael@0 2 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef editline_editline_h
michael@0 7 #define editline_editline_h
michael@0 8
michael@0 9 /*
michael@0 10 * Copyright 1992,1993 Simmule Turner and Rich Salz. All rights reserved.
michael@0 11 *
michael@0 12 * This software is not subject to any license of the American Telephone
michael@0 13 * and Telegraph Company or of the Regents of the University of California.
michael@0 14 *
michael@0 15 * Permission is granted to anyone to use this software for any purpose on
michael@0 16 * any computer system, and to alter it and redistribute it freely, subject
michael@0 17 * to the following restrictions:
michael@0 18 * 1. The authors are not responsible for the consequences of use of this
michael@0 19 * software, no matter how awful, even if they arise from flaws in it.
michael@0 20 * 2. The origin of this software must not be misrepresented, either by
michael@0 21 * explicit claim or by omission. Since few users ever read sources,
michael@0 22 * credits must appear in the documentation.
michael@0 23 * 3. Altered versions must be plainly marked as such, and must not be
michael@0 24 * misrepresented as being the original software. Since few users
michael@0 25 * ever read sources, credits must appear in the documentation.
michael@0 26 * 4. This notice may not be removed or altered.
michael@0 27 */
michael@0 28
michael@0 29 /*
michael@0 30 ** Internal header file for editline library.
michael@0 31 */
michael@0 32 #include <stdio.h>
michael@0 33 #if defined(HAVE_STDLIB)
michael@0 34 #include <stdlib.h>
michael@0 35 #include <string.h>
michael@0 36 #endif /* defined(HAVE_STDLIB) */
michael@0 37 #if defined(SYS_UNIX)
michael@0 38 #include "unix.h"
michael@0 39 #endif /* defined(SYS_UNIX) */
michael@0 40 #if defined(SYS_OS9)
michael@0 41 #include "os9.h"
michael@0 42 #endif /* defined(SYS_OS9) */
michael@0 43
michael@0 44 #if !defined(SIZE_T)
michael@0 45 #define SIZE_T unsigned int
michael@0 46 #endif /* !defined(SIZE_T) */
michael@0 47
michael@0 48 typedef unsigned char CHAR;
michael@0 49
michael@0 50 #if defined(HIDE)
michael@0 51 #define STATIC static
michael@0 52 #else
michael@0 53 #define STATIC /* NULL */
michael@0 54 #endif /* !defined(HIDE) */
michael@0 55
michael@0 56 #define CONST const
michael@0 57
michael@0 58 #define MEM_INC 64
michael@0 59 #define SCREEN_INC 256
michael@0 60
michael@0 61 #define DISPOSE(p) free((char *)(p))
michael@0 62 #define NEW(T, c) \
michael@0 63 ((T *)malloc((unsigned int)(sizeof (T) * (c))))
michael@0 64 #define RENEW(p, T, c) \
michael@0 65 (p = (T *)realloc((char *)(p), (unsigned int)(sizeof (T) * (c))))
michael@0 66 #define COPYFROMTO(new, p, len) \
michael@0 67 (void)memcpy((char *)(new), (char *)(p), (int)(len))
michael@0 68
michael@0 69
michael@0 70 /*
michael@0 71 ** Variables and routines internal to this package.
michael@0 72 */
michael@0 73 extern unsigned rl_eof;
michael@0 74 extern unsigned rl_erase;
michael@0 75 extern unsigned rl_intr;
michael@0 76 extern unsigned rl_kill;
michael@0 77 extern unsigned rl_quit;
michael@0 78 extern char *rl_complete();
michael@0 79 extern int rl_list_possib();
michael@0 80 extern void rl_ttyset(int);
michael@0 81 extern void rl_add_slash();
michael@0 82
michael@0 83 #if !defined(HAVE_STDLIB)
michael@0 84 extern char *getenv();
michael@0 85 extern char *malloc();
michael@0 86 extern char *realloc();
michael@0 87 extern char *memcpy();
michael@0 88 extern char *strcat();
michael@0 89 extern char *strchr();
michael@0 90 extern char *strrchr();
michael@0 91 extern char *strcpy();
michael@0 92 extern char *strdup();
michael@0 93 extern int strcmp();
michael@0 94 extern int strlen();
michael@0 95 extern int strncmp();
michael@0 96 #endif /* !defined(HAVE_STDLIB) */
michael@0 97
michael@0 98 #endif /* editline_editline_h */

mercurial