intl/icu/source/common/cwchar.c

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.

     1 /*  
     2 ******************************************************************************
     3 *
     4 *   Copyright (C) 2001, International Business Machines
     5 *   Corporation and others.  All Rights Reserved.
     6 *
     7 ******************************************************************************
     8 *   file name:  cwchar.c
     9 *   encoding:   US-ASCII
    10 *   tab size:   8 (not used)
    11 *   indentation:4
    12 *
    13 *   created on: 2001may25
    14 *   created by: Markus W. Scherer
    15 */
    17 #include "unicode/utypes.h"
    19 #if !U_HAVE_WCSCPY
    21 #include "cwchar.h"
    23 U_CAPI wchar_t *uprv_wcscat(wchar_t *dst, const wchar_t *src) {
    24     wchar_t *start=dst;
    25     while(*dst!=0) {
    26         ++dst;
    27     }
    28     while((*dst=*src)!=0) {
    29         ++dst;
    30         ++src;
    31     }
    32     return start;
    33 }
    35 U_CAPI wchar_t *uprv_wcscpy(wchar_t *dst, const wchar_t *src) {
    36     wchar_t *start=dst;
    37     while((*dst=*src)!=0) {
    38         ++dst;
    39         ++src;
    40     }
    41     return start;
    42 }
    44 U_CAPI size_t uprv_wcslen(const wchar_t *src) {
    45     const wchar_t *start=src;
    46     while(*src!=0) {
    47         ++src;
    48     }
    49     return src-start;
    50 }
    52 #endif

mercurial