~ubuntu-branches/ubuntu/gutsy/icu/gutsy-updates

« back to all changes in this revision

Viewing changes to source/common/cwchar.c

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2005-11-19 11:29:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20051119112931-vcizkrp10tli4enw
Tags: 3.4-3
Explicitly build with g++ 3.4.  The current ICU fails its test suite
with 4.0 but not with 3.4.  Future versions should work properly with
4.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
*/
16
 
 
17
 
#include "unicode/utypes.h"
18
 
 
19
 
#if !U_HAVE_WCSCPY
20
 
 
21
 
#include "cwchar.h"
22
 
 
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
 
}
34
 
 
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
 
}
43
 
 
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
 
}
51
 
 
52
 
#endif
53