Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | ****************************************************************************** |
michael@0 | 3 | * |
michael@0 | 4 | * Copyright (C) 2001, International Business Machines |
michael@0 | 5 | * Corporation and others. All Rights Reserved. |
michael@0 | 6 | * |
michael@0 | 7 | ****************************************************************************** |
michael@0 | 8 | * file name: cwchar.c |
michael@0 | 9 | * encoding: US-ASCII |
michael@0 | 10 | * tab size: 8 (not used) |
michael@0 | 11 | * indentation:4 |
michael@0 | 12 | * |
michael@0 | 13 | * created on: 2001may25 |
michael@0 | 14 | * created by: Markus W. Scherer |
michael@0 | 15 | */ |
michael@0 | 16 | |
michael@0 | 17 | #include "unicode/utypes.h" |
michael@0 | 18 | |
michael@0 | 19 | #if !U_HAVE_WCSCPY |
michael@0 | 20 | |
michael@0 | 21 | #include "cwchar.h" |
michael@0 | 22 | |
michael@0 | 23 | U_CAPI wchar_t *uprv_wcscat(wchar_t *dst, const wchar_t *src) { |
michael@0 | 24 | wchar_t *start=dst; |
michael@0 | 25 | while(*dst!=0) { |
michael@0 | 26 | ++dst; |
michael@0 | 27 | } |
michael@0 | 28 | while((*dst=*src)!=0) { |
michael@0 | 29 | ++dst; |
michael@0 | 30 | ++src; |
michael@0 | 31 | } |
michael@0 | 32 | return start; |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | U_CAPI wchar_t *uprv_wcscpy(wchar_t *dst, const wchar_t *src) { |
michael@0 | 36 | wchar_t *start=dst; |
michael@0 | 37 | while((*dst=*src)!=0) { |
michael@0 | 38 | ++dst; |
michael@0 | 39 | ++src; |
michael@0 | 40 | } |
michael@0 | 41 | return start; |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | U_CAPI size_t uprv_wcslen(const wchar_t *src) { |
michael@0 | 45 | const wchar_t *start=src; |
michael@0 | 46 | while(*src!=0) { |
michael@0 | 47 | ++src; |
michael@0 | 48 | } |
michael@0 | 49 | return src-start; |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | #endif |
michael@0 | 53 |