ICU-903 Updated the copyright notice

X-SVN-Rev: 4238
This commit is contained in:
George Rhoten 2001-03-21 20:44:20 +00:00
parent 8e6698de87
commit c4997713ef
122 changed files with 1031 additions and 1036 deletions

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: bidi.cpp

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File CMEMORY.H
*
@ -18,7 +18,7 @@
* 6/20/98 Bertrand Created.
* 05/03/99 stephen Changed from functions to macros.
*
*******************************************************************************
******************************************************************************
*/
#ifndef CMEMORY_H

View file

@ -557,6 +557,10 @@ SOURCE=.\filestrm.h
# End Source File
# Begin Source File
SOURCE=.\hash.h
# End Source File
# Begin Source File
SOURCE=.\unicode\locid.h
!IF "$(CFG)" == "common - Win32 Release"

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1996-1999, International Business Machines
* Copyright (C) 1996-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1996-1999, International Business Machines
* Copyright (C) 1996-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*/
#ifndef COMPITR_H

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
@ -38,11 +38,11 @@ UnicodeConverter::UnicodeConverter(const char* name, UErrorCode& err)
UnicodeConverter::UnicodeConverter(const UnicodeString& name, UErrorCode& err)
{
char myName[UCNV_MAX_CONVERTER_NAME_LENGTH];
int i;
name.extract(0, i = name.length(), myName);
myName[i]='\0';
myUnicodeConverter = ucnv_open(myName, &err);
char myName[UCNV_MAX_CONVERTER_NAME_LENGTH];
int i;
name.extract(0, i = name.length(), myName);
myName[i]='\0';
myUnicodeConverter = ucnv_open(myName, &err);
}
@ -61,13 +61,13 @@ UnicodeConverter& UnicodeConverter::operator=(const UnicodeConverter& that)
/*Decrements the overwritten converter's ref count
*Increments the assigner converter's ref count
*/
Mutex updateReferenceCounters;
if (myUnicodeConverter->sharedData->referenceCounter != 0 && myUnicodeConverter->sharedData->referenceCounter != (uint32_t) ~0) {
myUnicodeConverter->sharedData->referenceCounter--;
}
if (that.myUnicodeConverter->sharedData->referenceCounter != (uint32_t) ~0) {
that.myUnicodeConverter->sharedData->referenceCounter++;
}
Mutex updateReferenceCounters;
if (myUnicodeConverter->sharedData->referenceCounter != 0 && myUnicodeConverter->sharedData->referenceCounter != (uint32_t) ~0) {
myUnicodeConverter->sharedData->referenceCounter--;
}
if (that.myUnicodeConverter->sharedData->referenceCounter != (uint32_t) ~0) {
that.myUnicodeConverter->sharedData->referenceCounter++;
}
}
*myUnicodeConverter = *(that.myUnicodeConverter);
@ -94,20 +94,20 @@ UBool UnicodeConverter::operator==(const UnicodeConverter& that) const
UBool UnicodeConverter::operator!=(const UnicodeConverter& that) const
{
return !(*this == that);
return !(*this == that);
}
UnicodeConverter::UnicodeConverter(const UnicodeConverter& that)
{
/*increments the referenceCounter to let the static table know
*it has one more client
*/
/*increments the referenceCounter to let the static table know
*it has one more client
*/
myUnicodeConverter = (UConverter *)uprv_malloc(sizeof(UConverter)); //new UConverter;
{
Mutex updateReferenceCounter;
if (that.myUnicodeConverter->sharedData->referenceCounter != (uint32_t) ~0) {
that.myUnicodeConverter->sharedData->referenceCounter++;
}
Mutex updateReferenceCounter;
if (that.myUnicodeConverter->sharedData->referenceCounter != (uint32_t) ~0) {
that.myUnicodeConverter->sharedData->referenceCounter++;
}
}
*myUnicodeConverter = *(that.myUnicodeConverter);
}
@ -124,40 +124,39 @@ UnicodeConverter::fromUnicodeString(char* target,
const UnicodeString& source,
UErrorCode& err) const
{
const UChar* mySource = NULL;
int32_t mySourceLength = 0;
UConverter myConverter;
char *myTarget = NULL;
const UChar* mySource = NULL;
int32_t mySourceLength = 0;
UConverter myConverter;
char *myTarget = NULL;
if (U_FAILURE(err)) return;
if (U_FAILURE(err))
return;
if ((myUnicodeConverter == NULL) || source.isBogus() || (targetSize <= 0))
if ((myUnicodeConverter == NULL) || source.isBogus() || (targetSize <= 0))
{
err = U_ILLEGAL_ARGUMENT_ERROR;
return;
err = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
/*makes a local copy of the UnicodeConverter*/
myConverter = *myUnicodeConverter;
/*makes a local copy of the UnicodeConverter*/
myConverter = *myUnicodeConverter;
/*Removes all state info on the UnicodeConverter*/
ucnv_reset(&myConverter);
/*Removes all state info on the UnicodeConverter*/
ucnv_reset(&myConverter);
mySourceLength = source.length();
mySource = source.getArrayStart();
myTarget = target;
ucnv_fromUnicode(&myConverter,
mySourceLength = source.length();
mySource = source.getArrayStart();
myTarget = target;
ucnv_fromUnicode(&myConverter,
&myTarget,
target + targetSize,
&mySource,
mySource + mySourceLength,
NULL,
TRUE,
NULL,
TRUE,
&err);
targetSize = myTarget - target;
return;
targetSize = myTarget - target;
}
void
@ -166,89 +165,89 @@ UnicodeConverter::toUnicodeString(UnicodeString& target,
int32_t sourceSize,
UErrorCode& err) const
{
const char* mySource = source;
const char* mySourceLimit = source + sourceSize;
UChar* myTargetUChars = NULL;
UChar* myTargetUCharsAlias = NULL;
int32_t myTargetUCharsLength = 0;
UConverter myConverter;
const char* mySource = source;
const char* mySourceLimit = source + sourceSize;
UChar* myTargetUChars = NULL;
UChar* myTargetUCharsAlias = NULL;
int32_t myTargetUCharsLength = 0;
UConverter myConverter;
if (U_FAILURE(err)) return;
if ((myUnicodeConverter == NULL) || target.isBogus() || (sourceSize <= 0))
if (U_FAILURE(err))
return;
if ((myUnicodeConverter == NULL) || target.isBogus() || (sourceSize <= 0))
{
err = U_ILLEGAL_ARGUMENT_ERROR;
return;
err = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
/*makes a local bitwise copy of the UnicodeConverter*/
myConverter = *myUnicodeConverter;
/*makes a local bitwise copy of the UnicodeConverter*/
myConverter = *myUnicodeConverter;
/*Removes all state info on the UnicodeConverter*/
ucnv_reset(&myConverter);
/*Allocates the theoritically (Not counting added bytes from the error functions) max buffer
*on a "normal" call, only one iteration will be necessary.
*/
myTargetUChars =
(UChar*)uprv_malloc(sizeof(UChar)*(myTargetUCharsLength = (sourceSize/(int32_t)getMinBytesPerChar())));
/*Removes all state info on the UnicodeConverter*/
ucnv_reset(&myConverter);
/*Allocates the theoritically (Not counting added bytes from the error functions) max buffer
*on a "normal" call, only one iteration will be necessary.
*/
myTargetUChars =
(UChar*)uprv_malloc(sizeof(UChar)*(myTargetUCharsLength = (sourceSize/(int32_t)getMinBytesPerChar())));
if (myTargetUChars == NULL)
if (myTargetUChars == NULL)
{
err = U_MEMORY_ALLOCATION_ERROR;
return;
err = U_MEMORY_ALLOCATION_ERROR;
return;
}
/*renders the target clean*/
target.remove();
/*renders the target clean*/
target.remove();
/*Will loop until (re-use the same buffer) until no more memory is requested
*or an error (other than INDEX_OUTOF_BOUNDS) is encountered
*/
do
/*Will loop until (re-use the same buffer) until no more memory is requested
*or an error (other than INDEX_OUTOF_BOUNDS) is encountered
*/
do
{
err = U_ZERO_ERROR;
myTargetUCharsAlias = myTargetUChars;
ucnv_toUnicode(&myConverter,
&myTargetUCharsAlias,
myTargetUChars + myTargetUCharsLength,
&mySource,
mySourceLimit,
NULL,
TRUE,
&err);
err = U_ZERO_ERROR;
myTargetUCharsAlias = myTargetUChars;
ucnv_toUnicode(&myConverter,
&myTargetUCharsAlias,
myTargetUChars + myTargetUCharsLength,
&mySource,
mySourceLimit,
NULL,
TRUE,
&err);
/*appends what we got thus far to the UnicodeString*/
target.replace((UTextOffset)target.length(),
myTargetUCharsAlias - myTargetUChars,
myTargetUChars,
myTargetUCharsAlias - myTargetUChars);
/*Checks for the integrity of target (UnicodeString) as it adds data to it*/
if (target.isBogus()) err = U_MEMORY_ALLOCATION_ERROR;
/*appends what we got thus far to the UnicodeString*/
target.replace((UTextOffset)target.length(),
myTargetUCharsAlias - myTargetUChars,
myTargetUChars,
myTargetUCharsAlias - myTargetUChars);
/*Checks for the integrity of target (UnicodeString) as it adds data to it*/
if (target.isBogus())
err = U_MEMORY_ALLOCATION_ERROR;
} while (err == U_BUFFER_OVERFLOW_ERROR);
uprv_free(myTargetUChars);
return;
uprv_free(myTargetUChars);
}
void
UnicodeConverter::fromUnicode(char*& target,
const char* targetLimit,
const UChar*& source,
const UChar* sourceLimit,
int32_t *offsets,
UBool flush,
UErrorCode& err)
const char* targetLimit,
const UChar*& source,
const UChar* sourceLimit,
int32_t *offsets,
UBool flush,
UErrorCode& err)
{
ucnv_fromUnicode(myUnicodeConverter,
&target,
targetLimit,
&source,
sourceLimit,
offsets,
flush,
&err);
&target,
targetLimit,
&source,
sourceLimit,
offsets,
flush,
&err);
}
@ -258,7 +257,7 @@ UnicodeConverter::toUnicode(UChar*& target,
const UChar* targetLimit,
const char*& source,
const char* sourceLimit,
int32_t* offsets,
int32_t* offsets,
UBool flush,
UErrorCode& err)
{
@ -267,7 +266,7 @@ UnicodeConverter::toUnicode(UChar*& target,
targetLimit,
&source,
sourceLimit,
offsets,
offsets,
flush,
&err);
}
@ -275,7 +274,7 @@ UnicodeConverter::toUnicode(UChar*& target,
const char*
UnicodeConverter::getName(UErrorCode& err) const
{
return ucnv_getName(myUnicodeConverter, &err);
return ucnv_getName(myUnicodeConverter, &err);
}
int8_t
@ -366,25 +365,19 @@ void
UnicodeConverter::getDisplayName(const Locale& displayLocale,
UnicodeString& displayName) const
{
UErrorCode err = U_ZERO_ERROR;
UChar name[UCNV_MAX_CONVERTER_NAME_LENGTH];
int32_t length = ucnv_getDisplayName(myUnicodeConverter, displayLocale.getName(), name, sizeof(name), &err);
if (U_SUCCESS(err))
UErrorCode err = U_ZERO_ERROR;
UChar name[UCNV_MAX_CONVERTER_NAME_LENGTH];
int32_t length = ucnv_getDisplayName(myUnicodeConverter, displayLocale.getName(), name, sizeof(name), &err);
if (U_SUCCESS(err))
{
displayName.replace(0, 0x7fffffff, name, length);
displayName.replace(0, 0x7fffffff, name, length);
}
else
else
{
/*Error While creating the resource bundle use the internal name instead*/
displayName.remove();
displayName = getName(err); /*Get the raw ASCII name*/
/*Error While creating the resource bundle use the internal name instead*/
displayName.remove();
displayName = getName(err); /*Get the raw ASCII name*/
}
return;
}
@ -396,59 +389,58 @@ UnicodeConverter::getCodepagePlatform(UErrorCode &err) const
UConverterType UnicodeConverter::getType() const
{
return ucnv_getType(myUnicodeConverter);
return ucnv_getType(myUnicodeConverter);
}
void UnicodeConverter::getStarters(UBool starters[256],
UErrorCode& err) const
UErrorCode& err) const
{
ucnv_getStarters(myUnicodeConverter,
starters,
&err);
return;
ucnv_getStarters(myUnicodeConverter,
starters,
&err);
}
const char* const*
UnicodeConverter::getAvailableNames(int32_t& num, UErrorCode& err)
{
if(U_FAILURE(err)) {
num = 0;
return NULL;
}
if (availableConverterNames==NULL) {
int32_t count = ucnv_io_countAvailableConverters(&err);
if (count > 0) {
const char **names = new const char *[count];
if (names != NULL) {
ucnv_io_fillAvailableConverters(names, &err);
/* in the mutex block, set the data for this process */
umtx_lock(0);
if (availableConverterNames == NULL) {
availableConverterNamesCount = count;
availableConverterNames = names;
names = 0;
}
umtx_unlock(0);
/* if a different thread set it first, then delete the extra data */
if (names != 0) {
delete [] names;
}
} else {
if(U_FAILURE(err)) {
num = 0;
err = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
}
}
num = availableConverterNamesCount;
return availableConverterNames;
if (availableConverterNames==NULL) {
int32_t count = ucnv_io_countAvailableConverters(&err);
if (count > 0) {
const char **names = new const char *[count];
if (names != NULL) {
ucnv_io_fillAvailableConverters(names, &err);
/* in the mutex block, set the data for this process */
umtx_lock(0);
if (availableConverterNames == NULL) {
availableConverterNamesCount = count;
availableConverterNames = names;
names = 0;
}
umtx_unlock(0);
/* if a different thread set it first, then delete the extra data */
if (names != 0) {
delete [] names;
}
} else {
num = 0;
err = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
}
}
num = availableConverterNamesCount;
return availableConverterNames;
}
int32_t UnicodeConverter::flushCache()
{
return ucnv_flushCache();
return ucnv_flushCache();
}
/* HSYS: To be cleaned up. The usage of UChar* and UnicodeString in
@ -466,7 +458,3 @@ UBool UnicodeConverter::isAmbiguous(void) const
return ucnv_isAmbiguous(myUnicodeConverter);
}

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: cpputils.h
* encoding: US-ASCII
* tab size: 8 (not used)
@ -20,9 +20,9 @@
// forward declaration
class UnicodeString;
/*===========================================================================*/
/*==========================================================================*/
/* Array copy utility functions */
/*===========================================================================*/
/*==========================================================================*/
inline void uprv_arrayCopy(const double* src, double* dst, int32_t count)
{ uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File CSTRING.C
*
@ -16,7 +16,7 @@
* 6/18/98 hshih Created
* 09/08/98 stephen Added include for ctype, for Mac Port
* 11/15/99 helena Integrated S/390 IEEE changes.
*****************************************************************************************
******************************************************************************
*/

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File CSTRING.H
*
@ -19,7 +19,7 @@
* 05/03/99 stephen Changed from functions to macros.
* 06/14/99 stephen Added icu_strncat, icu_strncmp, icu_tolower
*
*******************************************************************************
******************************************************************************
*/
#ifndef CSTRING_H

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -14,14 +14,14 @@
* 03/27/97 helena Updated to pass the simple test after code review.
* 03/31/97 aliu Moved isLONG_MIN to here, and fixed it.
* 04/15/97 aliu Changed MAX_COUNT to DBL_DIG. Changed Digit to char.
* Reworked representation by replacing fDecimalAt with
* fExponent.
* Reworked representation by replacing fDecimalAt
* with fExponent.
* 04/16/97 aliu Rewrote set() and getDouble() to use sprintf/atof
* to do digit conversion.
* 09/09/97 aliu Modified for exponential notation support.
* 08/02/98 stephen Added nearest/even rounding
* 08/02/98 stephen Added nearest/even rounding
* Fixed bug in fitsIntoLong
********************************************************************************
******************************************************************************
*/
#include "digitlst.h"
@ -31,11 +31,11 @@
#include <stdio.h>
#include "unicode/putil.h"
// *****************************************************************************
// ***************************************************************************
// class DigitList
// This class handles the transcoding between numeric values and strings of
// characters. Only handles as non-negative numbers.
// *****************************************************************************
// ***************************************************************************
const char DigitList::kZero = '0';

View file

@ -1,10 +1,10 @@
/*
********************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
********************************************************************************
******************************************************************************
*
* File DIGITLST.H
*
@ -18,7 +18,7 @@
* 08/02/98 stephen Added nearest/even rounding
* 06/29/99 stephen Made LONG_DIGITS a macro to satisfy SUN compiler
* 07/09/99 stephen Removed kMaxCount (unused, for HP compiler)
*******************************************************************************
******************************************************************************
*/
#ifndef DIGITLST_H

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File FILESTRM.C
*
@ -18,7 +18,7 @@
* Added wopen
* 3/29/99 helena Merged Stephen and Bertrand's changes.
*
*******************************************************************************
******************************************************************************
*/
#include "filestrm.h"

View file

@ -1,10 +1,10 @@
/*
*****************************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*****************************************************************************************
******************************************************************************
*
* File FILESTRM.H
*
@ -19,7 +19,7 @@
* 03/02/99 stephen Reordered params in ungetc to match stdio
* Added wopen
*
*****************************************************************************************
******************************************************************************
*/
#ifndef FILESTRM_H

View file

@ -1,11 +1,11 @@
/*
*******************************************************************************
* Copyright (C) 1997-2000, International Business Machines
******************************************************************************
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
******************************************************************************
* Date Name Description
* 03/28/00 aliu Creation.
*******************************************************************************
******************************************************************************
*/
#ifndef HASH_H

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -25,7 +25,7 @@
* 07/21/99 stephen Added U_CFUNC setDefault
* 11/09/99 weiv Added const char * getName() const;
* 04/12/00 srl removing unicodestring api's and cached hash code
*******************************************************************************
******************************************************************************
*/

View file

@ -1,10 +1,10 @@
/*
**********************************************************************
* Copyright (C) 1996-1999, International Business Machines
* Copyright (C) 1996-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
// $Revision: 1.19 $
// $Revision: 1.20 $
//
// Provides functionality for mapping between
// LCID and Posix IDs.
@ -19,7 +19,7 @@
// Kathleen Wilson, 4/30/96
//
// Date Name Description
// 3/11/97 aliu Fixed off-by-one bug in assignment operator. Added
// 3/11/97 aliu Fixed off-by-one bug in assignment operator. Added
// setId() method and safety check against
// MAX_ID_LENGTH.
// 04/23/99 stephen Added C wrapper for convertToPosix.

View file

@ -1,13 +1,13 @@
/*
*****************************************************************************************
******************************************************************************
*
* Copyright (C) 1996-2000, International Business Machines
* Copyright (C) 1996-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*****************************************************************************************
******************************************************************************
*/
// $Revision: 1.11 $
//===============================================================================
// $Revision: 1.12 $
//============================================================================
//
// File locmap.hpp : Locale Mapping Classes
//
@ -21,7 +21,7 @@
// 3/11/97 aliu Added setId().
// 4/20/99 Madhu Added T_convertToPosix()
// 09/18/00 george Removed the memory leaks.
//===============================================================================
//============================================================================
/* include this first so that we are sure to get WIN32 defined */
#include "unicode/utypes.h"

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/

View file

@ -1,12 +1,12 @@
/*
*****************************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*****************************************************************************************
******************************************************************************
*/
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------
// File: mutex.h
//
// Lightweight C++ wrapper for umtx_ C mutex functions
@ -16,14 +16,14 @@
// 06/04/97 helena Updated setImplementation as per feedback from 5/21 drop.
// 04/07/1999 srl refocused as a thin wrapper
//
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------
#ifndef MUTEX_H
#define MUTEX_H
#include "unicode/utypes.h"
#include "umutex.h"
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Code within this library which accesses protected data
// should instantiate a Mutex object while doing so. You should make your own
// private mutex where possible.

View file

@ -1,9 +1,9 @@
/*
********************************************************************
*************************************************************************
* COPYRIGHT:
* Copyright (c) 1996-1999, International Business Machines Corporation and
* Copyright (c) 1996-2001, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************
*************************************************************************
*/
/*

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* FILE NAME : putil.c (previously putil.cpp and ptypes.cpp)
*
@ -31,7 +31,7 @@
* 06/28/99 stephen Removed mutex locking in u_isBigEndian().
* 08/04/99 jeffrey R. Added OS/2 changes
* 11/15/99 helena Integrated S/390 IEEE support.
*******************************************************************************
******************************************************************************
*/
#ifdef _AIX

View file

@ -1,8 +1,8 @@
/*
**********************************************************************
* Copyright (C) 1998-1999, International Business Machines
***************************************************************************
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
***************************************************************************
*
* File rbdata.cpp
*
@ -10,7 +10,7 @@
*
* Date Name Description
* 06/11/99 stephen Creation. (Moved here from resbund.cpp)
*******************************************************************************
******************************************************************************
*/
#include "rbdata.h"
@ -19,7 +19,7 @@ UClassID StringList::fgClassID = 0; // Value is irrelevant
UClassID String2dList::fgClassID = 0; // Value is irrelevant
UClassID TaggedList::fgClassID = 0; // Value is irrelevant
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------
StringList::StringList()
: fCount(0), fStrings(0)

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File rbdata.h
*
@ -12,7 +12,7 @@
*
* Date Name Description
* 06/11/99 stephen Creation. (Moved here from resbund.cpp)
*******************************************************************************
******************************************************************************
*/
#ifndef RBDATA_H

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -13,7 +13,7 @@
* based on code taken from scanForLocale. Added
* constructor which attempts to read resource bundle
* from a specific file, without searching other files.
* 02/11/97 aliu Added UErrorCode return values to constructors. Fixed
* 02/11/97 aliu Added UErrorCode return values to constructors. Fixed
* infinite loops in scanForFile and scanForLocale.
* Modified getRawResourceData to not delete storage in
* localeData and resourceData which it doesn't own.
@ -27,23 +27,23 @@
* Modified to load locale index out of new file distinct
* from default.txt.
* 03/25/97 aliu Modified to support 2-d arrays, needed for timezone data.
* Added support for custom file suffixes. Again, needed to
* support timezone data. Improved error handling to detect
* duplicate tags and subtags.
* 04/07/97 aliu Fixed bug in getHashtableForLocale(). Fixed handling of
* failing UErrorCode values on entry to API methods.
* Added support for custom file suffixes. Again, needed
* to support timezone data. Improved error handling to
* detect duplicate tags and subtags.
* 04/07/97 aliu Fixed bug in getHashtableForLocale(). Fixed handling
* of failing UErrorCode values on entry to API methods.
* Fixed bugs in getArrayItem() for negative indices.
* 04/29/97 aliu Update to use new Hashtable deletion protocol.
* 05/06/97 aliu Flattened kTransitionTable for HP compiler. Fixed usage of
* CharString.
* 05/06/97 aliu Flattened kTransitionTable for HP compiler.
* Fixed usage of CharString.
* 06/11/99 stephen Removed parsing of .txt files.
* Reworked to use new binary format.
* Cleaned up.
* 06/14/99 stephen Removed methods taking a filename suffix.
* 06/22/99 stephen Added missing T_FileStream_close in parse()
* 11/09/99 weiv Added getLocale(), rewritten constructForLocale()
* 11/09/99 weiv Added getLocale(), rewritten constructForLocale()
* March 2000 weiv complete overhaul.
*******************************************************************************
******************************************************************************
*/
#include "unicode/utypes.h"
@ -523,7 +523,7 @@ ResourceBundle::getStringArray( const char *resourceTag,
if(sldata == 0) {
UResourceBundle array;
ures_setIsStackObject(&array, TRUE);
ures_setIsStackObject(&array, TRUE);
UErrorCode fallbackInfo = U_ZERO_ERROR;
ures_getByKey(resource, resourceTag, &array, &fallbackInfo);
if(U_SUCCESS(fallbackInfo)) {
@ -587,7 +587,7 @@ ResourceBundle::get2dArray(const char *resourceTag,
if(sldata == 0) {
UResourceBundle array;
ures_setIsStackObject(&array, TRUE);
ures_setIsStackObject(&array, TRUE);
UErrorCode fallbackInfo = U_ZERO_ERROR;
ures_getByKey(resource, resourceTag, &array, &fallbackInfo);
if(U_SUCCESS(fallbackInfo)) {
@ -595,7 +595,7 @@ ResourceBundle::get2dArray(const char *resourceTag,
if(rowCount > 0) {
result = new UnicodeString*[rowCount];
UResourceBundle row;
ures_setIsStackObject(&row, TRUE);
ures_setIsStackObject(&row, TRUE);
ures_getByIndex(&array, 0, &row, &err);
columnCount = ures_getSize(&row);
const UChar* string = 0;
@ -658,7 +658,7 @@ ResourceBundle::getTaggedArrayItem( const char *resourceTag,
if(U_FAILURE(err)) {
return 0;
}
char item[256];
char key[256];
int32_t taglen = itemTag.length();
@ -674,7 +674,7 @@ ResourceBundle::getTaggedArrayItem( const char *resourceTag,
if(sldata == 0) {
UResourceBundle table;
ures_setIsStackObject(&table, TRUE);
ures_setIsStackObject(&table, TRUE);
UErrorCode fallbackInfo = U_ZERO_ERROR;
ures_getByKey(resource, resourceTag, &table, &fallbackInfo);
if(U_SUCCESS(fallbackInfo)) {
@ -712,7 +712,7 @@ ResourceBundle::getTaggedArray( const char *resourceTag,
return;
}
UResourceBundle table;
ures_setIsStackObject(&table, TRUE);
ures_setIsStackObject(&table, TRUE);
ures_getByKey(resource, resourceTag, &table, &err);
if(U_SUCCESS(err)) {
numItems = ures_getSize(&table);

View file

@ -1,8 +1,8 @@
/*
*******************************************************************************
* Copyright (C) 1998-1999, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
******************************************************************************
* Copyright (C) 1998-2001, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*
* File schriter.cpp
*
@ -10,7 +10,7 @@
*
* Date Name Description
* 05/05/99 stephen Cleaned up.
*******************************************************************************
******************************************************************************
*/
#include "unicode/chariter.h"

View file

@ -1,19 +1,19 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File scsu.c
*
* Modification History:
*
* Date Name Description
* 05/17/99 stephen Creation (ported from java UnicodeCompressor.java)
* 05/17/99 stephen Creation (ported from java UnicodeCompressor.java)
* 09/21/99 stephen Updated to handle data splits on decompression.
*******************************************************************************
******************************************************************************
*/
#include "unicode/scsu.h"
@ -106,13 +106,13 @@
/* Local function prototypes */
static int32_t scsu_makeIndex(int32_t c);
static UBool scsu_inDynamicWindow(const UnicodeCompressor *comp,
int32_t c,
int32_t whichWindow);
int32_t c,
int32_t whichWindow);
static UBool scsu_inStaticWindow(int32_t c,
int32_t whichWindow);
int32_t whichWindow);
static UBool scsu_isCompressible(int32_t c);
static int32_t scsu_findDynamicWindow(const UnicodeCompressor *comp,
int32_t c);
int32_t c);
static int32_t scsu_findStaticWindow(int32_t c);
static int32_t scsu_getLRDefinedWindow(const UnicodeCompressor *comp);
@ -237,11 +237,11 @@ scsu_init(UnicodeCompressor *comp)
void
scsu_compress(UnicodeCompressor *comp,
uint8_t **target,
const uint8_t *targetLimit,
const UChar **source,
const UChar *sourceLimit,
UErrorCode *status)
uint8_t **target,
const uint8_t *targetLimit,
const UChar **source,
const UChar *sourceLimit,
UErrorCode *status)
{
/* the current position in the source unichar buffer*/
const UChar *unicharBuffer = *source;
@ -280,25 +280,25 @@ scsu_compress(UnicodeCompressor *comp,
mainLoop:
while( unicharBuffer < sourceLimit && byteBuffer < targetLimit) {
switch( comp->fMode ) {
/* main single byte mode compression loop*/
case SINGLEBYTEMODE:
while( unicharBuffer < sourceLimit && byteBuffer < targetLimit ) {
/* get current char*/
curUC = *unicharBuffer++;
/* get next char*/
if( unicharBuffer < sourceLimit )
nextUC = *unicharBuffer;
else
nextUC = INVALIDCHAR;
/* chars less than 0x0080 (excluding tags) go straight in
stream */
if( curUC < 0x0080 ) {
loByte = curUC;
/* we need to check and make sure we don't
accidentally write a single byte mode tag to
the stream unless it's quoted */
@ -310,15 +310,15 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
/* since we know the byte is less than 0x80, SQUOTE0
will use static window 0, or Latin-1*/
*byteBuffer++ = (uint8_t) SQUOTE0;
}
*byteBuffer++ = (uint8_t) loByte;
}
/* if the char belongs to current window, convert it
to a byte by adding the generic compression offset
and subtracting the window's offset*/
@ -328,7 +328,7 @@ scsu_compress(UnicodeCompressor *comp,
(curUC - comp->fOffsets[ comp->fCurrentWindow ]
+ COMPRESSIONOFFSET);
}
/* if char is not in compressible range, either switch
to or quote from unicode*/
else if( ! scsu_isCompressible(curUC) ) {
@ -341,7 +341,7 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
*byteBuffer++ = (uint8_t) SQUOTEU;
*byteBuffer++ = (uint8_t) (curUC >> 8);
*byteBuffer++ = (uint8_t) curUC;
@ -354,19 +354,19 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
*byteBuffer++ = (uint8_t) SCHANGEU;
hiByte = curUC >> 8;
loByte = curUC;
/* add quote Unicode tag */
if( sUnicodeTagTable[hiByte] )
*byteBuffer++ = (uint8_t) UQUOTEU;
*byteBuffer++ = (uint8_t) hiByte;
*byteBuffer++ = (uint8_t) loByte;
comp->fMode = UNICODEMODE;
/* use a goto here for speed, to avoid having
@ -375,7 +375,7 @@ scsu_compress(UnicodeCompressor *comp,
goto mainLoop;
}
}
/* if the char is in a currently defined dynamic
window, figure out which one, and either switch to
it or quote from it*/
@ -386,7 +386,7 @@ scsu_compress(UnicodeCompressor *comp,
forwardUC = *(unicharBuffer + 1);
else
forwardUC = INVALIDCHAR;
/* all three chars in same window, switch to that
window- inDynamicWindow will return FALSE for
INVALIDCHAR*/
@ -399,7 +399,7 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
*byteBuffer++ = (uint8_t) (SCHANGE0 + whichWindow);
*byteBuffer++ = (uint8_t)
(curUC - comp->fOffsets[whichWindow]
@ -407,7 +407,7 @@ scsu_compress(UnicodeCompressor *comp,
comp->fTimeStamps [ whichWindow ] = ++(comp->fTimeStamp);
comp->fCurrentWindow = whichWindow;
}
/* either only next char or neither in same
window, so quote*/
else {
@ -418,14 +418,14 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
*byteBuffer++ = (uint8_t) (SQUOTE0 + whichWindow);
*byteBuffer++ = (uint8_t)
(curUC - comp->fOffsets[whichWindow]
+ COMPRESSIONOFFSET);
}
}
/* if a static window is defined, and the following
character is not in that static window, quote from
the static window Note: to quote from a static
@ -440,11 +440,11 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
*byteBuffer++ = (uint8_t) (SQUOTE0 + whichWindow);
*byteBuffer++ = (uint8_t) (curUC - sOffsets[whichWindow]);
}
/* if a window is not defined, decide if we want to
define a new one or switch to unicode mode*/
else {
@ -452,13 +452,13 @@ scsu_compress(UnicodeCompressor *comp,
compressible)*/
curIndex = scsu_makeIndex(curUC);
comp->fIndexCount[curIndex]++;
/* look ahead*/
if( (unicharBuffer + 1) < sourceLimit )
forwardUC = *(unicharBuffer + 1);
else
forwardUC = INVALIDCHAR;
/* if we have encountered this index at least once
before, define a new window*/
if( comp->fIndexCount[curIndex] > 1 ) {
@ -472,18 +472,18 @@ scsu_compress(UnicodeCompressor *comp,
/* get least recently defined window*/
whichWindow = scsu_getLRDefinedWindow(comp);
*byteBuffer++ = (uint8_t) (SDEFINE0 + whichWindow);
*byteBuffer++ = (uint8_t) curIndex;
*byteBuffer++ = (uint8_t)
(curUC - sOffsetTable[curIndex]
+ COMPRESSIONOFFSET);
comp->fOffsets[whichWindow] = sOffsetTable[curIndex];
comp->fCurrentWindow = whichWindow;
comp->fTimeStamps [whichWindow] = ++(comp->fTimeStamp);
}
/* three chars in a row with same index, define a
new window- makeIndex will return RESERVEDINDEX
for INVALIDCHAR*/
@ -498,18 +498,18 @@ scsu_compress(UnicodeCompressor *comp,
}
whichWindow = scsu_getLRDefinedWindow(comp);
*byteBuffer++ = (uint8_t) (SDEFINE0 + whichWindow);
*byteBuffer++ = (uint8_t) curIndex;
*byteBuffer++ = (uint8_t)
(curUC - sOffsetTable[curIndex]
+ COMPRESSIONOFFSET);
comp->fOffsets[whichWindow] = sOffsetTable[curIndex];
comp->fCurrentWindow = whichWindow;
comp->fTimeStamps [whichWindow] = ++(comp->fTimeStamp);
}
/* only two chars in a row with same index, so
switch to unicode mode makeIndex will return
RESERVEDINDEX for INVALIDCHAR*/
@ -522,19 +522,19 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
*byteBuffer++ = (uint8_t) SCHANGEU;
hiByte = curUC >> 8;
loByte = curUC;
/* add quote Unicode tag */
if( sUnicodeTagTable[hiByte] )
*byteBuffer++ = (uint8_t) UQUOTEU;
*byteBuffer++ = (uint8_t) hiByte;
*byteBuffer++ = (uint8_t) loByte;
comp->fMode = UNICODEMODE;
/* use a goto here for speed, to avoid having
@ -542,7 +542,7 @@ scsu_compress(UnicodeCompressor *comp,
of the case */
goto mainLoop;
}
/* three chars have different indices, so switch
to unicode mode*/
else {
@ -553,19 +553,19 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
*byteBuffer++ = (uint8_t) SCHANGEU;
hiByte = curUC >> 8;
loByte = curUC;
/* add quote Unicode tag*/
if( sUnicodeTagTable[ hiByte ] )
*byteBuffer++ = (uint8_t) UQUOTEU;
*byteBuffer++ = (uint8_t) hiByte;
*byteBuffer++ = (uint8_t) loByte;
comp->fMode = UNICODEMODE;
/* use a goto here for speed, to avoid having
@ -576,20 +576,20 @@ scsu_compress(UnicodeCompressor *comp,
}
}
break;
/* main unicode mode compression loop*/
case UNICODEMODE:
while(unicharBuffer < sourceLimit && byteBuffer < targetLimit) {
/* get current char*/
curUC = *unicharBuffer++;
/* get next char*/
if( unicharBuffer < sourceLimit )
nextUC = *unicharBuffer;
else
nextUC = INVALIDCHAR;
/* if we have two uncompressible unichars in a row,
put the current char's bytes in the stream*/
if( ! scsu_isCompressible(curUC)
@ -602,23 +602,23 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
hiByte = curUC >> 8;
loByte = curUC;
/* add quote Unicode tag*/
if( sUnicodeTagTable[ hiByte ] )
*byteBuffer++ = (uint8_t) UQUOTEU;
*byteBuffer++ = (uint8_t) hiByte;
*byteBuffer++ = (uint8_t) loByte;
}
/* bytes less than 0x80 can go straight in the stream,
but in single-byte mode*/
else if( curUC < 0x0080 ) {
loByte = curUC;
/* if two chars in a row below 0x80 and the
current char is not a single-byte mode tag,
switch to single-byte mode*/
@ -631,11 +631,11 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
/* use window 0, but any would work*/
*byteBuffer++ = (uint8_t) UCHANGE0;
*byteBuffer++ = (uint8_t) loByte;
comp->fCurrentWindow = 0;
comp->fTimeStamps [0] = ++(comp->fTimeStamp);
comp->fMode = SINGLEBYTEMODE;
@ -645,7 +645,7 @@ scsu_compress(UnicodeCompressor *comp,
of the case */
goto mainLoop;
}
/* otherwise, just write the bytes to the stream
(this will cover the case of only 1 char less
than 0x80 and single-byte mode tags)*/
@ -657,7 +657,7 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
/* since the character is less than 0x80, the
high byte is always 0x00 - no need for
(curUC >> 8)*/
@ -665,7 +665,7 @@ scsu_compress(UnicodeCompressor *comp,
*byteBuffer++ = (uint8_t) loByte;
}
}
/* figure out if the current unichar is in a defined
window*/
else if( (whichWindow = scsu_findDynamicWindow(comp, curUC))
@ -682,12 +682,12 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
*byteBuffer++ = (uint8_t) (UCHANGE0 + whichWindow);
*byteBuffer++ = (uint8_t)
(curUC - comp->fOffsets[whichWindow]
+ COMPRESSIONOFFSET);
comp->fTimeStamps[whichWindow] = ++(comp->fTimeStamp);
comp->fCurrentWindow = whichWindow;
comp->fMode = SINGLEBYTEMODE;
@ -708,32 +708,32 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
hiByte = curUC >> 8;
loByte = curUC;
/* add quote Unicode tag*/
if( sUnicodeTagTable[ hiByte ] )
*byteBuffer++ = (uint8_t) UQUOTEU;
*byteBuffer++ = (uint8_t) hiByte;
*byteBuffer++ = (uint8_t) loByte;
}
}
/* char is not in a defined window*/
else {
/* determine index for current char (char is
compressible)*/
curIndex = scsu_makeIndex(curUC);
comp->fIndexCount[curIndex]++;
/* look ahead*/
if( (unicharBuffer + 1) < sourceLimit )
forwardUC = *unicharBuffer;
else
forwardUC = INVALIDCHAR;
/* if we have encountered this index at least once
before, define a new window for it that hasn't
previously been redefined*/
@ -745,16 +745,16 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
/* get least recently defined window*/
whichWindow = scsu_getLRDefinedWindow(comp);
*byteBuffer++ = (uint8_t) (UDEFINE0 + whichWindow);
*byteBuffer++ = (uint8_t) curIndex;
*byteBuffer++ = (uint8_t)
(curUC - sOffsetTable[curIndex]
+ COMPRESSIONOFFSET);
comp->fOffsets[whichWindow] = sOffsetTable[curIndex];
comp->fCurrentWindow = whichWindow;
comp->fTimeStamps[whichWindow] = ++(comp->fTimeStamp);
@ -765,7 +765,7 @@ scsu_compress(UnicodeCompressor *comp,
of the case */
goto mainLoop;
}
/* if three chars in a row with the same index,
define a new window makeIndex will return
RESERVEDINDEX for INVALIDCHAR*/
@ -778,15 +778,15 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
whichWindow = scsu_getLRDefinedWindow(comp);
*byteBuffer++ = (uint8_t) (UDEFINE0 + whichWindow);
*byteBuffer++ = (uint8_t) curIndex;
*byteBuffer++ = (uint8_t)
(curUC - sOffsetTable[curIndex]
+ COMPRESSIONOFFSET);
comp->fOffsets[whichWindow] = sOffsetTable[curIndex];
comp->fCurrentWindow = whichWindow;
comp->fTimeStamps[whichWindow] = ++(comp->fTimeStamp);
@ -797,7 +797,7 @@ scsu_compress(UnicodeCompressor *comp,
of the case */
goto mainLoop;
}
/* otherwise just quote the unicode, and save our
windows for longer runs*/
else {
@ -808,14 +808,14 @@ scsu_compress(UnicodeCompressor *comp,
--unicharBuffer;
goto finish;
}
hiByte = curUC >> 8;
loByte = curUC;
/* add quote Unicode tag*/
if( sUnicodeTagTable[ hiByte ] )
*byteBuffer++ = (uint8_t) UQUOTEU;
*byteBuffer++ = (uint8_t) hiByte;
*byteBuffer++ = (uint8_t) loByte;
}
@ -836,11 +836,11 @@ scsu_compress(UnicodeCompressor *comp,
void
scsu_decompress(UnicodeCompressor *comp,
UChar **target,
const UChar *targetLimit,
const uint8_t **source,
const uint8_t *sourceLimit,
UErrorCode *status)
UChar **target,
const UChar *targetLimit,
const uint8_t **source,
const uint8_t *sourceLimit,
UErrorCode *status)
{
/* the current position in the source byte buffer*/
const uint8_t *byteBuffer = *source;
@ -882,7 +882,7 @@ scsu_decompress(UnicodeCompressor *comp,
/* verify there are newBytes bytes in byteBuffer */
if(sourceLimit - byteBuffer < newBytes)
newBytes = sourceLimit - byteBuffer;
newBytes = sourceLimit - byteBuffer;
uprv_memcpy(comp->fBuffer + comp->fBufferLength, byteBuffer, newBytes);
}
@ -892,7 +892,7 @@ scsu_decompress(UnicodeCompressor *comp,
/* call self recursively to decompress the buffer */
scsu_decompress(comp, &unicharBuffer, targetLimit,
&newSource, newSourceLimit, status);
&newSource, newSourceLimit, status);
/* update the positions into the arrays */
/* unicharBuffer was updated by the call to decompress above */
@ -908,10 +908,10 @@ scsu_decompress(UnicodeCompressor *comp,
/* single-byte mode decompression loop*/
case SINGLEBYTEMODE:
while(byteBuffer < sourceLimit && unicharBuffer < targetLimit) {
/* get the next byte */
aByte = *byteBuffer++;
switch(aByte) {
/* All bytes from 0x80 through 0xFF are remapped to
chars or surrogate pairs according to the currently
@ -942,7 +942,7 @@ scsu_decompress(UnicodeCompressor *comp,
case 0xF3: case 0xF4: case 0xF5: case 0xF6: case 0xF7:
case 0xF8: case 0xF9: case 0xFA: case 0xFB: case 0xFC:
case 0xFD: case 0xFE: case 0xFF:
/* For offsets <= 0xFFFF, convert to a single char by
adding the window's offset and subtracting the
generic compression offset*/
@ -968,7 +968,7 @@ scsu_decompress(UnicodeCompressor *comp,
byteBuffer += comp->fBufferLength;
goto finish;
}
normalizedBase = comp->fOffsets[comp->fCurrentWindow]
- 0x10000;
*unicharBuffer++ =
@ -978,7 +978,7 @@ scsu_decompress(UnicodeCompressor *comp,
+ (aByte & 0x7F));
}
break;
/* bytes from 0x20 through 0x7F are treated as ASCII
and are remapped to chars by padding the high byte
(this is the same as quoting from static window 0)
@ -1007,7 +1007,7 @@ scsu_decompress(UnicodeCompressor *comp,
case 0x7F:
*unicharBuffer++ = (UChar) aByte;
break;
/* quote unicode*/
case SQUOTEU:
/* verify we have two bytes following tag and if not,
@ -1020,12 +1020,12 @@ scsu_decompress(UnicodeCompressor *comp,
byteBuffer += comp->fBufferLength;
goto finish;
}
aByte = *byteBuffer++;
*unicharBuffer++ =
(UChar) (aByte << 8 | *byteBuffer++);
break;
/* switch to Unicode mode*/
case SCHANGEU:
comp->fMode = UNICODEMODE;
@ -1033,7 +1033,7 @@ scsu_decompress(UnicodeCompressor *comp,
fMode in the while loop at the top of the case */
goto mainLoop;
break;
/* handle all quote tags*/
case SQUOTE0: case SQUOTE1: case SQUOTE2: case SQUOTE3:
case SQUOTE4: case SQUOTE5: case SQUOTE6: case SQUOTE7:
@ -1047,7 +1047,7 @@ scsu_decompress(UnicodeCompressor *comp,
byteBuffer += comp->fBufferLength;
goto finish;
}
/* if the byte is in the range 0x00 - 0x7F, use static
window n- otherwise, use dynamic window n */
dByte = *byteBuffer++;
@ -1057,13 +1057,13 @@ scsu_decompress(UnicodeCompressor *comp,
: (comp->fOffsets[aByte - SQUOTE0]
- COMPRESSIONOFFSET)));
break;
/* handle all change tags*/
case SCHANGE0: case SCHANGE1: case SCHANGE2: case SCHANGE3:
case SCHANGE4: case SCHANGE5: case SCHANGE6: case SCHANGE7:
comp->fCurrentWindow = (aByte - SCHANGE0);
break;
/* handle all define tags*/
case SDEFINE0: case SDEFINE1: case SDEFINE2: case SDEFINE3:
case SDEFINE4: case SDEFINE5: case SDEFINE6: case SDEFINE7:
@ -1077,12 +1077,12 @@ scsu_decompress(UnicodeCompressor *comp,
byteBuffer += comp->fBufferLength;
goto finish;
}
comp->fCurrentWindow = (aByte - SDEFINE0);
comp->fOffsets[comp->fCurrentWindow] =
sOffsetTable[*byteBuffer++];
break;
/* handle define extended tag*/
case SDEFINEX:
/* verify we have two bytes following tag and if not,
@ -1095,29 +1095,29 @@ scsu_decompress(UnicodeCompressor *comp,
byteBuffer += comp->fBufferLength;
goto finish;
}
aByte = *byteBuffer++;
comp->fCurrentWindow = (aByte & 0xE0) >> 5;
comp->fOffsets[comp->fCurrentWindow] = 0x10000
+ (0x80
* (((aByte & 0x1F) << 8) | *byteBuffer++));
break;
/* reserved, shouldn't happen*/
case SRESERVED:
break;
} /* end switch*/
} /* end while*/
break;
/* unicode mode decompression loop*/
case UNICODEMODE:
while( byteBuffer < sourceLimit && unicharBuffer < targetLimit ) {
/* get the next byte */
aByte = *byteBuffer++;
switch( aByte ) {
/* handle all define tags*/
case UDEFINE0: case UDEFINE1: case UDEFINE2: case UDEFINE3:
@ -1132,7 +1132,7 @@ scsu_decompress(UnicodeCompressor *comp,
byteBuffer += comp->fBufferLength;
goto finish;
}
comp->fCurrentWindow = (aByte - UDEFINE0);
comp->fOffsets[comp->fCurrentWindow] =
sOffsetTable[*byteBuffer++];
@ -1141,7 +1141,7 @@ scsu_decompress(UnicodeCompressor *comp,
fMode in the while loop at the top of the case */
goto mainLoop;
break;
/* handle define extended tag*/
case UDEFINEX:
/* verify we have two bytes following tag if not,
@ -1154,7 +1154,7 @@ scsu_decompress(UnicodeCompressor *comp,
byteBuffer += comp->fBufferLength;
goto finish;
}
aByte = *byteBuffer++;
comp->fCurrentWindow = (aByte & 0xE0) >> 5;
comp->fOffsets[comp->fCurrentWindow] = 0x10000
@ -1165,7 +1165,7 @@ scsu_decompress(UnicodeCompressor *comp,
fMode in the while loop at the top of the case */
goto mainLoop;
break;
/* handle all change tags*/
case UCHANGE0: case UCHANGE1: case UCHANGE2: case UCHANGE3:
case UCHANGE4: case UCHANGE5: case UCHANGE6: case UCHANGE7:
@ -1175,7 +1175,7 @@ scsu_decompress(UnicodeCompressor *comp,
fMode in the while loop at the top of the case */
goto mainLoop;
break;
/* quote unicode*/
case UQUOTEU:
/* verify we have two bytes following tag if not,
@ -1188,7 +1188,7 @@ scsu_decompress(UnicodeCompressor *comp,
byteBuffer += comp->fBufferLength;
goto finish;
}
aByte = *byteBuffer++;
*unicharBuffer++ = (UChar)
(aByte << 8 | *byteBuffer++);
@ -1208,7 +1208,7 @@ scsu_decompress(UnicodeCompressor *comp,
*unicharBuffer++ = (UChar) (aByte << 8 | *byteBuffer++);
break;
} /* end switch*/
} /* end while*/
break;
@ -1247,7 +1247,7 @@ scsu_reset(UnicodeCompressor *comp)
for(i = 0; i < USCSU_NUM_WINDOWS; i++) {
comp->fTimeStamps[i] = 0;
}
/* reset count of seen indices*/
for( i = 0; i <= USCSU_MAX_INDEX; i++ ) {
comp->fIndexCount[i] = 0;
@ -1306,11 +1306,11 @@ scsu_makeIndex(int32_t c)
*/
static UBool
scsu_inDynamicWindow(const UnicodeCompressor *comp,
int32_t c,
int32_t whichWindow)
int32_t c,
int32_t whichWindow)
{
return (UBool)(c >= comp->fOffsets[whichWindow]
&& c < (comp->fOffsets[whichWindow] + 0x80));
&& c < (comp->fOffsets[whichWindow] + 0x80));
}
/**
@ -1322,7 +1322,7 @@ scsu_inDynamicWindow(const UnicodeCompressor *comp,
*/
static UBool
scsu_inStaticWindow(int32_t c,
int32_t whichWindow)
int32_t whichWindow)
{
return (UBool)(c >= sOffsets[whichWindow] && c < (sOffsets[whichWindow] + 0x80));
}
@ -1346,7 +1346,7 @@ scsu_isCompressible(int32_t c)
*/
static int32_t
scsu_findDynamicWindow(const UnicodeCompressor *comp,
int32_t c)
int32_t c)
{
int32_t i;
@ -1369,13 +1369,13 @@ static int32_t
scsu_findStaticWindow(int32_t c)
{
int32_t i;
for(i = 0; i < USCSU_NUM_STATIC_WINDOWS; i++) {
if(scsu_inStaticWindow(c, i)) {
return i;
}
}
return INVALIDWINDOW;
}
@ -1386,7 +1386,7 @@ scsu_getLRDefinedWindow(const UnicodeCompressor *comp)
int32_t leastRU = INT32_MAX;
int32_t whichWindow = INVALIDWINDOW;
int32_t i;
/* find least recently used window*/
for(i = 0; i < USCSU_NUM_WINDOWS; i++ ) {
if(comp->fTimeStamps[i] < leastRU) {
@ -1394,6 +1394,6 @@ scsu_getLRDefinedWindow(const UnicodeCompressor *comp)
whichWindow = i;
}
}
return whichWindow;
}

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ubidi.c
* encoding: US-ASCII
* tab size: 8 (not used)

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ubidiimp.h
* encoding: US-ASCII
* tab size: 8 (not used)
@ -23,7 +23,7 @@
#include "unicode/utypes.h"
#include "unicode/uchar.h"
/* miscellaneous definitions ------------------------------------------------ */
/* miscellaneous definitions ---------------------------------------------- */
typedef uint8_t DirProp;
typedef uint32_t Flags;

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ubidiln.c
* encoding: US-ASCII
* tab size: 8 (not used)
@ -551,7 +551,7 @@ reorderLine(UBiDi *pBiDi, UBiDiLevel minLevel, UBiDiLevel maxLevel) {
Run *runs;
UBiDiLevel *levels;
UTextOffset firstRun, endRun, limitRun, runCount,
temp;
temp;
/* nothing to do? */
if(maxLevel<=(minLevel|1)) {

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ubidiwrt.c
* encoding: US-ASCII
* tab size: 8 (not used)

View file

@ -1,6 +1,6 @@
/*
********************************************************************************
* Copyright (C) 1996-2000, International Business Machines
* Copyright (C) 1996-2001, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
@ -10,14 +10,13 @@
*
* Date Name Description
* 04/02/97 aliu Creation.
*
* 4/15/99 Madhu Updated all the function definitions for C Implementation
* 5/20/99 Madhu Added the function u_getVersion()
* 5/20/99 Madhu Added the function u_getVersion()
* 8/19/1999 srl Upgraded scripts to Unicode3.0
* 11/11/1999 weiv added u_isalnum(), cleaned comments
* 01/11/2000 helena Renamed u_getVersion to u_getUnicodeVersion.
* 06/20/2000 helena OS/400 port changes; mostly typecast.
********************************************************************************************
******************************************************************************
*/
#include "unicode/utypes.h"
@ -910,8 +909,8 @@ u_charScript(UChar32 ch)
for( j = 0; i == -1 && fScriptIndex[j].fFirstCode != 0xFFFF; ++j )
if( fScriptIndex[j].fFirstCode <= ch && ch <= fScriptIndex[j].fLastCode ) {
i = j;
if(j == U_CHAR_SCRIPT_COUNT) /* "U_SPECIALS 2" */
i = U_SPECIALS;
if(j == U_CHAR_SCRIPT_COUNT) /* "U_SPECIALS 2" */
i = U_SPECIALS;
}
if(i >= U_CHAR_SCRIPT_COUNT) {
returnValue = U_NO_SCRIPT;

View file

@ -1,8 +1,8 @@
/*
*******************************************************************************
* Copyright (C) 1998-1999, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
******************************************************************************
* Copyright (C) 1998-2001, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*/
#include "unicode/uchriter.h"

View file

@ -1,12 +1,12 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*/
/*===============================================================================
/*============================================================================
*
* File cmpshrta.cpp
*
@ -20,7 +20,7 @@
* 07/15/98 erm Synched with Java 1.2 CompactShortArray.java.
* 07/30/98 erm Added changes from 07/29/98 code review.
* 11/01/99 weiv Added getArray, getIndex and getCount based on Jitterbug 4
*===============================================================================
*============================================================================
*/
#include "ucmp16.h"
#include "cmemory.h"

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1995-1999, International Business Machines
* Copyright (C) 1995-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* @version 1.0 23/10/96
@ -79,7 +79,7 @@
* @see CompactIntArray
* @see CompactCharArray
* @see CompactStringArray
* @version $Revision: 1.17 $ 8/25/98
* @version $Revision: 1.18 $ 8/25/98
* @author Helena Shih
*/

View file

@ -1,5 +1,5 @@
/*============================================================================
* Copyright (C) 1997-1999, International Business Machines Corporation
* Copyright (C) 1997-2001, International Business Machines Corporation
* and others. All Rights Reserved.
*
* File cmpshrta.cpp
@ -14,7 +14,7 @@
* 04/26/99 Madhu Ported to C for C Implementation
* 11/12/99 srl macroized ucmp32_get()
* 11/07/00 weiv aligned implementation with ucmp8
*===============================================================================
*============================================================================
*/
#include "ucmp32.h"
#include "cmemory.h"

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1995-1999, International Business Machines
* Copyright (C) 1995-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* and others. All Rights Reserved.
@ -77,7 +77,7 @@
* @see CompactIntArray
* @see CompactCharArray
* @see CompactStringArray
* @version $Revision: 1.16 $ 8/25/98
* @version $Revision: 1.17 $ 8/25/98
* @author Helena Shih
*/
/*====================================

View file

@ -1,7 +1,7 @@
/*
********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-1999, International Business Machines Corporation and
* Copyright (c) 1997-2001, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************
*/

View file

@ -1,7 +1,7 @@
/*
********************************************************************
* COPYRIGHT:
* Copyright (c) 1996-1999, International Business Machines Corporation and
* Copyright (c) 1996-2001, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************
*/

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* ucnv.c:
* Implements APIs for the ICU's codeset conversion library;
@ -155,42 +155,42 @@ UConverter *ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pB
return 0;
}
if (cnv->sharedData->impl->safeClone != NULL) {
/* call the custom safeClone function for sizing */
bufferSizeNeeded = 0;
cnv->sharedData->impl->safeClone(cnv, stackBuffer, &bufferSizeNeeded, status);
}
else
{
bufferSizeNeeded = sizeof(UConverter);
}
if (cnv->sharedData->impl->safeClone != NULL) {
/* call the custom safeClone function for sizing */
bufferSizeNeeded = 0;
cnv->sharedData->impl->safeClone(cnv, stackBuffer, &bufferSizeNeeded, status);
}
else
{
bufferSizeNeeded = sizeof(UConverter);
}
if (*pBufferSize == 0){ /* 'preflighting' request - set needed size into *pBufferSize */
*pBufferSize = bufferSizeNeeded;
return 0;
if (*pBufferSize == 0){ /* 'preflighting' request - set needed size into *pBufferSize */
*pBufferSize = bufferSizeNeeded;
return 0;
}
if (*pBufferSize < bufferSizeNeeded || stackBuffer == NULL)
{
/* allocate one here...*/
localConverter = createConverter (ucnv_getName (cnv, status), status);
if (U_SUCCESS(*status))
{
*status = U_SAFECLONE_ALLOCATED_ERROR;
}
/* allocate one here...*/
localConverter = createConverter (ucnv_getName (cnv, status), status);
if (U_SUCCESS(*status))
{
*status = U_SAFECLONE_ALLOCATED_ERROR;
}
} else {
if (cnv->sharedData->impl->safeClone != NULL) {
/* call the custom safeClone function */
localConverter = cnv->sharedData->impl->safeClone(cnv, stackBuffer, pBufferSize, status);
}
else
{
localConverter = (UConverter *)stackBuffer;
memcpy(localConverter, cnv, sizeof(UConverter));
localConverter->isCopyLocal = TRUE;
}
}
return localConverter;
if (cnv->sharedData->impl->safeClone != NULL) {
/* call the custom safeClone function */
localConverter = cnv->sharedData->impl->safeClone(cnv, stackBuffer, pBufferSize, status);
}
else
{
localConverter = (UConverter *)stackBuffer;
memcpy(localConverter, cnv, sizeof(UConverter));
localConverter->isCopyLocal = TRUE;
}
}
return localConverter;
}
@ -346,14 +346,14 @@ void ucnv_getSubstChars (const UConverter * converter,
if (U_FAILURE (*err))
return;
if (*len < converter->subCharLen) /*not enough space in subChars */
if (*len < converter->subCharLen) /*not enough space in subChars */
{
*err = U_INDEX_OUTOFBOUNDS_ERROR;
return;
}
uprv_memcpy (mySubChar, converter->subChar, converter->subCharLen); /*fills in the subchars */
*len = converter->subCharLen; /*store # of bytes copied to buffer */
uprv_memcpy (mySubChar, converter->subChar, converter->subCharLen); /*fills in the subchars */
*len = converter->subCharLen; /*store # of bytes copied to buffer */
return;
}
@ -374,8 +374,8 @@ void ucnv_setSubstChars (UConverter * converter,
return;
}
uprv_memcpy (converter->subChar, mySubChar, len); /*copies the subchars */
converter->subCharLen = len; /*sets the new len */
uprv_memcpy (converter->subChar, mySubChar, len); /*copies the subchars */
converter->subCharLen = len; /*sets the new len */
/*
* There is currently (2001Feb) no separate API to set/get subChar1.

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv2022.c

View file

@ -1,7 +1,7 @@
/*
********************************************************************
* COPYRIGHT:
* Copyright (c) 1996-1999, International Business Machines Corporation and
* Copyright (c) 1996-2001, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************
*

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -136,7 +136,7 @@ struct UConverter {
void *fromUContext;
void *toUContext;
UBool isCopyLocal; /* TRUE if created by safeClone with no allocation or ref count */
UBool isCopyLocal; /* TRUE if created by safeClone with no allocation or ref count */
UConverterSharedData *sharedData; /* Pointer to the shared immutable part of the converter object */
/*

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* ucnv_cb.c:

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* uconv_cnv.c:
* Implements all the low level conversion functions

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -88,10 +88,10 @@ typedef void (*UConverterWriteSub) (UConverterFromUnicodeArgs *pArgs, int32_t of
* If this function is not set, then ucnv_safeClone assumes that the converter has no private data that changes
* after the converter is done opening.
*/
typedef UConverter * (*UConverterSafeClone) ( const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
typedef UConverter * (*UConverterSafeClone) (const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
UBool CONVERSION_U_SUCCESS (UErrorCode err);
@ -144,7 +144,7 @@ struct UConverterImpl {
UConverterGetStarters getStarters;
UConverterGetName getName;
UConverterWriteSub writeSub;
UConverterSafeClone safeClone;
UConverterSafeClone safeClone;
};
extern const UConverterSharedData

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
*****************************************************************************
*
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
*****************************************************************************
*
* ucnv_err.c
* Implements error behaviour functions called by T_UConverter_{from,to}Unicode
@ -224,8 +224,8 @@ void UCNV_FROM_U_CALLBACK_ESCAPE (
{
while (i < length)
{
valueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
valueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
itou (valueString + valueStringLength, codeUnits[i++], 16, 4);
valueStringLength += 4;
}
@ -238,31 +238,31 @@ void UCNV_FROM_U_CALLBACK_ESCAPE (
while (i < length)
{
valueString[valueStringLength++] = (UChar) UNICODE_RS_CODEPOINT; /* adding \ */
valueString[valueStringLength++] = (UChar) UNICODE_U_LOW_CODEPOINT; /* adding u */
valueString[valueStringLength++] = (UChar) UNICODE_U_LOW_CODEPOINT; /* adding u */
itou (valueString + valueStringLength, codeUnits[i++], 16, 4);
valueStringLength += 4;
}
break;
case UCNV_PRV_ESCAPE_C:
valueString[valueStringLength++] = (UChar) UNICODE_RS_CODEPOINT; /* adding \ */
valueString[valueStringLength++] = (UChar) UNICODE_RS_CODEPOINT; /* adding \ */
if(length==2){
UChar32 temp = UTF16_GET_PAIR_VALUE(codeUnits[0],codeUnits[1]);
valueString[valueStringLength++] = (UChar) UNICODE_U_LOW_CODEPOINT; /* adding u */
valueString[valueStringLength++] = (UChar) UNICODE_U_LOW_CODEPOINT; /* adding u */
valueStringLength += itou (valueString + valueStringLength, temp, 16, 8);
}
else{
valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
valueStringLength += itou (valueString + valueStringLength, codeUnits[0], 16, 4);
}
break;
case UCNV_PRV_ESCAPE_XML_DEC:
valueString[valueStringLength++] = (UChar) UNICODE_AMP_CODEPOINT; /* adding & */
valueString[valueStringLength++] = (UChar) UNICODE_HASH_CODEPOINT; /* adding # */
valueString[valueStringLength++] = (UChar) UNICODE_AMP_CODEPOINT; /* adding & */
valueString[valueStringLength++] = (UChar) UNICODE_HASH_CODEPOINT; /* adding # */
if(length==2){
UChar32 temp = UTF16_GET_PAIR_VALUE(codeUnits[0],codeUnits[1]);
valueStringLength += itou (valueString + valueStringLength, temp, 10, 0);
@ -275,8 +275,8 @@ void UCNV_FROM_U_CALLBACK_ESCAPE (
case UCNV_PRV_ESCAPE_XML_HEX:
valueString[valueStringLength++] = (UChar) UNICODE_AMP_CODEPOINT; /* adding & */
valueString[valueStringLength++] = (UChar) UNICODE_HASH_CODEPOINT; /* adding # */
valueString[valueStringLength++] = (UChar) UNICODE_AMP_CODEPOINT; /* adding & */
valueString[valueStringLength++] = (UChar) UNICODE_HASH_CODEPOINT; /* adding # */
valueString[valueStringLength++] = (UChar) UNICODE_X_LOW_CODEPOINT; /* adding x */
if(length==2){
UChar32 temp = UTF16_GET_PAIR_VALUE(codeUnits[0],codeUnits[1]);
@ -290,8 +290,8 @@ void UCNV_FROM_U_CALLBACK_ESCAPE (
default:
while (i < length)
{
valueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
valueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
valueString[valueStringLength++] = (UChar) UNICODE_U_CODEPOINT; /* adding U */
itou (valueString + valueStringLength, codeUnits[i++], 16, 4);
valueStringLength += 4;
}
@ -405,34 +405,32 @@ void UCNV_TO_U_CALLBACK_ESCAPE (
UConverterCallbackReason reason,
UErrorCode * err)
{
UChar uniValueString[VALUE_STRING_LENGTH];
int32_t valueStringLength = 0;
int32_t i = 0;
if (reason > UCNV_IRREGULAR)
{
return;
}
UChar uniValueString[VALUE_STRING_LENGTH];
int32_t valueStringLength = 0;
int32_t i = 0;
/* ### TODO:
* This should use the new ucnv_cbWrite...() functions instead of doing
* "tricks" as before we had a good callback API!
* (Actually, this function is not all that bad.)
*/
while (i < length)
if (reason > UCNV_IRREGULAR)
{
uniValueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
uniValueString[valueStringLength++] = (UChar) UNICODE_X_CODEPOINT; /* adding X */
itou (uniValueString + valueStringLength, (uint8_t) codeUnits[i++], 16, 2);
valueStringLength += 2;
return;
}
/* ### TODO:
* This should use the new ucnv_cbWrite...() functions instead of doing
* "tricks" as before we had a good callback API!
* (Actually, this function is not all that bad.)
*/
while (i < length)
{
uniValueString[valueStringLength++] = (UChar) UNICODE_PERCENT_SIGN_CODEPOINT; /* adding % */
uniValueString[valueStringLength++] = (UChar) UNICODE_X_CODEPOINT; /* adding X */
itou (uniValueString + valueStringLength, (uint8_t) codeUnits[i++], 16, 2);
valueStringLength += 2;
}
/* reset the error */
*err = U_ZERO_ERROR;
ucnv_cbToUWriteUChars(toArgs, uniValueString, valueStringLength, 0, err);
/* reset the error */
*err = U_ZERO_ERROR;
return;
ucnv_cbToUWriteUChars(toArgs, uniValueString, valueStringLength, 0, err);
}

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
*
* ucnv_io.c:
@ -18,7 +18,7 @@
*
* Use the binary cnvalias.dat (created from convrtrs.txt) to work
* with aliases for converter names.
********************************************************************************
*******************************************************************************
*/
#include "unicode/utypes.h"

View file

@ -1,13 +1,13 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
*
* ucnv_io.h:
* defines variables and functions pertaining to file access, and name resolution
* aspect of the library
**********************************************************************
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
*
* ucnv_io.h:
* defines variables and functions pertaining to file access, and name resolution
* aspect of the library
*/
#ifndef UCNV_IO_H

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv_lmb.cpp

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv_utf.cpp

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnvhz.c
@ -56,7 +56,7 @@ static void _HZClose(UConverter *converter);
U_CFUNC void _HZReset(UConverter *converter, UConverterResetChoice choice);
U_CFUNC void _HZ_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *err);
U_CFUNC UConverter * _HZ_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status);
U_CFUNC UConverter * _HZ_SafeClone(const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status);
U_CFUNC void UConverter_toUnicode_HZ_OFFSETS_LOGIC (UConverterToUnicodeArgs *args,
UErrorCode *err);
@ -84,7 +84,7 @@ static UConverterImpl _HZImpl={
NULL,
NULL,
_HZ_WriteSub,
_HZ_SafeClone
_HZ_SafeClone
};
const UConverterStaticData _HZStaticData={
@ -287,8 +287,8 @@ U_CFUNC void UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args
continue;
}
else{
tempBuf[0] = (char) (args->converter->toUnicodeStatus+0x80) ;
tempBuf[1] = (char) (mySourceChar+0x80);
tempBuf[0] = (char) (args->converter->toUnicodeStatus+0x80) ;
tempBuf[1] = (char) (mySourceChar+0x80);
mySourceChar= (UChar)(((args->converter->toUnicodeStatus+0x80) << 8) | ((mySourceChar & 0x00ff)+0x80));
args->converter->toUnicodeStatus =0x00;
pBuf = &tempBuf[0];
@ -339,12 +339,12 @@ SAVE_STATE:
args->converter->invalidCharBuffer[args->converter->invalidCharLength++] = (char)(tempBuf[0]-0x80);
args->converter->invalidCharBuffer[args->converter->invalidCharLength++] = (char)(tempBuf[1]-0x80);
currentOffset= mySource - args->source -2;
currentOffset= mySource - args->source -2;
}
else{
args->converter->invalidCharBuffer[args->converter->invalidCharLength++] = (char)mySourceChar;
currentOffset= mySource - args->source -1;
currentOffset= mySource - args->source -1;
}
args->offsets = args->offsets?args->offsets+(myTarget - args->target):0;
args->target = myTarget;
@ -366,10 +366,10 @@ SAVE_STATE:
}
}
args->converter->invalidCharLength=0;
args->source = saveSource;
args->source = saveSource;
myTarget = args->target;
args->target = saveTarget;
args->offsets = saveOffsets;
args->target = saveTarget;
args->offsets = saveOffsets;
if(U_FAILURE(*err))
break;
}
@ -654,38 +654,37 @@ _HZ_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *e
/* structure for SafeClone calculations */
struct cloneStruct
{
UConverter cnv;
UConverterDataHZ mydata;
UConverter cnv;
UConverterDataHZ mydata;
};
U_CFUNC UConverter *
_HZ_SafeClone(
const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status)
_HZ_SafeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status)
{
struct cloneStruct * localClone;
int32_t bufferSizeNeeded = sizeof(struct cloneStruct);
struct cloneStruct * localClone;
int32_t bufferSizeNeeded = sizeof(struct cloneStruct);
if (U_FAILURE(*status)){
return 0;
}
if (*pBufferSize == 0){ /* 'preflighting' request - set needed size into *pBufferSize */
*pBufferSize = bufferSizeNeeded;
return 0;
if (*pBufferSize == 0){ /* 'preflighting' request - set needed size into *pBufferSize */
*pBufferSize = bufferSizeNeeded;
return 0;
}
localClone = (struct cloneStruct *)stackBuffer;
memcpy(&localClone->cnv, cnv, sizeof(UConverter));
localClone->cnv.isCopyLocal = TRUE;
memcpy(&localClone->mydata, cnv->extraInfo, sizeof(UConverterDataHZ));
localClone->cnv.extraInfo = &localClone->mydata;
localClone->cnv.isCopyLocal = TRUE;
return &localClone->cnv;
memcpy(&localClone->mydata, cnv->extraInfo, sizeof(UConverterDataHZ));
localClone->cnv.extraInfo = &localClone->mydata;
return &localClone->cnv;
}

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnvlat1.cpp

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ucnvmbcs.c
* encoding: US-ASCII
* tab size: 8 (not used)

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ucnvmbcs.h
* encoding: US-ASCII
* tab size: 8 (not used)

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ucnvscsu.c
* encoding: US-ASCII
* tab size: 8 (not used)
@ -15,8 +15,8 @@
*
* This is an implementation of the Standard Compression Scheme for Unicode
* as defined in http://www.unicode.org/unicode/reports/tr6/ .
* Reserved commands and window settings are treated as illegal sequences and will
* result in callback calls.
* Reserved commands and window settings are treated as illegal sequences and
* will result in callback calls.
*/
#include "unicode/utypes.h"
@ -26,7 +26,7 @@
#include "ucnv_cnv.h"
#include "cmemory.h"
/* Prototypes --------------------------------------------------------------- */
/* Prototypes ------------------------------------------------------------- */
/* Keep these here to make finicky compilers happy */
@ -56,10 +56,10 @@ _SCSUWriteSub(UConverterFromUnicodeArgs *pArgs,
int32_t offsetIndex,
UErrorCode *pErrorCode);
U_CFUNC UConverter *
_SCSUSafeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
_SCSUSafeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
/* SCSU definitions --------------------------------------------------------- */
@ -1370,37 +1370,36 @@ _SCSUWriteSub(UConverterFromUnicodeArgs *pArgs,
/* structure for SafeClone calculations */
struct cloneStruct
{
UConverter cnv;
SCSUData mydata;
UConverter cnv;
SCSUData mydata;
};
U_CFUNC UConverter *
_SCSUSafeClone(
const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status)
_SCSUSafeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status)
{
struct cloneStruct * localClone;
int32_t bufferSizeNeeded = sizeof(struct cloneStruct);
struct cloneStruct * localClone;
int32_t bufferSizeNeeded = sizeof(struct cloneStruct);
if (U_FAILURE(*status)){
return 0;
}
if (*pBufferSize == 0){ /* 'preflighting' request - set needed size into *pBufferSize */
*pBufferSize = bufferSizeNeeded;
return 0;
if (*pBufferSize == 0){ /* 'preflighting' request - set needed size into *pBufferSize */
*pBufferSize = bufferSizeNeeded;
return 0;
}
localClone = (struct cloneStruct *)stackBuffer;
memcpy(&localClone->cnv, cnv, sizeof(UConverter));
localClone->cnv.isCopyLocal = TRUE;
memcpy(&localClone->mydata, cnv->extraInfo, sizeof(SCSUData));
localClone->cnv.extraInfo = &localClone->mydata;
localClone->cnv.isCopyLocal = TRUE;
return &localClone->cnv;
memcpy(&localClone->mydata, cnv->extraInfo, sizeof(SCSUData));
localClone->cnv.extraInfo = &localClone->mydata;
return &localClone->cnv;
}
@ -1426,7 +1425,7 @@ static const UConverterImpl _SCSUImpl={
NULL,
_SCSUGetName,
_SCSUWriteSub,
_SCSUSafeClone
_SCSUSafeClone
};
static const UConverterStaticData _SCSUStaticData={

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: udata.c
* encoding: US-ASCII
* tab size: 8 (not used)
@ -25,7 +25,7 @@
#include <stdlib.h>
#endif
/* configuration ------------------------------------------------------------ */
/* configuration ---------------------------------------------------------- */
#if !defined(HAVE_DLOPEN)
# define HAVE_DLOPEN 0

View file

@ -1,11 +1,11 @@
/*
*******************************************************************************
* Copyright (C) 1997-2000, International Business Machines
******************************************************************************
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
******************************************************************************
* Date Name Description
* 03/22/00 aliu Adapted from original C++ ICU Hashtable.
*******************************************************************************
******************************************************************************
*/
#include "uhash.h"

View file

@ -1,11 +1,11 @@
/*
*******************************************************************************
* Copyright (C) 1997-2000, International Business Machines
******************************************************************************
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
******************************************************************************
* Date Name Description
* 03/22/00 aliu Adapted from original C++ ICU Hashtable.
*******************************************************************************
******************************************************************************
*/
#ifndef UHASH_H

View file

@ -1,11 +1,11 @@
/*
*******************************************************************************
* Copyright (C) 1997-2000, International Business Machines
******************************************************************************
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
******************************************************************************
* Date Name Description
* 03/22/00 aliu Creation.
*******************************************************************************
******************************************************************************
*/
#include "uhash.h"

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-2000, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -16,7 +16,7 @@
* 04/06/99 stephen changed setDefault() to realloc and copy
* 06/14/99 stephen Changed calls to ures_open for new params
* 07/21/99 stephen Modified setDefault() to propagate to C++
******************************************************************************/
*****************************************************************************/
/*
POSIX's locale format, from putil.c: [no spaces]
@ -40,7 +40,7 @@
/****************************************************************************
Global variable and type definitions
******************************************************************************/
*****************************************************************************/
/* UnicodeString stuff */
typedef struct UnicodeString UnicodeString;

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File UMEMSTRM.C
*
@ -14,7 +14,7 @@
*
* Date Name Description
* 5/17/00 weiv Created
*******************************************************************************
******************************************************************************
*/
#include "umemstrm.h"
@ -146,30 +146,30 @@ U_CAPI const uint8_t * U_EXPORT2 uprv_mstrm_getCurrentBuffer(UMemoryStream *MS,
U_CAPI int32_t U_EXPORT2 uprv_mstrm_skip(UMemoryStream *MS, int32_t len){
if(MS->fError == FALSE) {
MS->fReadPos+=len;
MS->fReadPos+=len;
} else {
return 0;
return 0;
}
if(MS->fReadPos>MS->fPos) {
MS->fError = TRUE;
return 0;
} else {
return len;
}
if(MS->fReadPos>MS->fPos) {
MS->fError = TRUE;
return 0;
} else {
return len;
}
}
U_CAPI int32_t U_EXPORT2 uprv_mstrm_jump(UMemoryStream *MS, const uint8_t *where){
if(MS->fError == FALSE) {
MS->fReadPos=(where-MS->fStart);
MS->fReadPos=(where-MS->fStart);
} else {
return 0;
return 0;
}
if(MS->fReadPos>MS->fPos) {
MS->fError = TRUE;
return 0;
} else {
return where-MS->fStart;
}
if(MS->fReadPos>MS->fPos) {
MS->fError = TRUE;
return 0;
} else {
return where-MS->fStart;
}
}
U_CAPI void U_EXPORT2

View file

@ -1,10 +1,10 @@
/*
*****************************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*****************************************************************************************
******************************************************************************
*
* File UMEMSTRM.H
*
@ -17,7 +17,7 @@
* Date Name Description
* 5/17/00 weiv Created.
*
*****************************************************************************************
******************************************************************************
*/
#ifndef UMEMSTRM_H

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-2000, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File CMUTEX.C
*
@ -15,7 +15,7 @@
* 04/07/99 srl updated
* 05/13/99 stephen Changed to umutex (from cmutex).
* 11/22/99 aliu Make non-global mutex autoinitialize [j151]
*******************************************************************************
******************************************************************************
*/
/* Assume POSIX, and modify as necessary below */

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -12,7 +12,7 @@
* 04/02/97 aliu Creation.
* 04/07/99 srl rewrite - C interface, multiple mutices
* 05/13/99 stephen Changed to umutex (from cmutex)
********************************************************************************
******************************************************************************
*/
#ifndef UMUTEX_H

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: unames.c
* encoding: US-ASCII
* tab size: 8 (not used)
@ -26,7 +26,7 @@
#include "unicode/uchar.h"
#include "unicode/udata.h"
/* prototypes --------------------------------------------------------------- */
/* prototypes ------------------------------------------------------------- */
#define DATA_NAME "unames"
#define DATA_TYPE "dat"

View file

@ -1,8 +1,8 @@
/*
*******************************************************************************
* Copyright (C) 1996-1999, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
******************************************************************************
* Copyright (C) 1996-2001, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*/
// FILE NAME : unicode.cpp
//
@ -28,10 +28,10 @@
// C++ Wrappers for Unicode
// CHANGES BY
// Madhu Katragadda
// 5/20/99 Madhu Added the function u_getVersion()
// 07/09/99 stephen Added definition for {MIN,MAX}_VALUE
// 5/20/99 Madhu Added the function u_getVersion()
// 07/09/99 stephen Added definition for {MIN,MAX}_VALUE
// 11/22/99 aliu Added MIN_RADIX, MAX_RADIX, digit, forDigit
//********************************************************************************************
//****************************************************************************
#include "unicode/utypes.h"
#include "unicode/uchar.h"

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ubidi.h
* encoding: US-ASCII
* tab size: 8 (not used)

View file

@ -1,7 +1,7 @@
/*
********************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
********************************************************************

View file

@ -1,13 +1,13 @@
/*******************************************************************************
/*****************************************************************************
*
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*
* Change history:
*
* 06/29/2000 helena Major rewrite of the callback APIs.
*******************************************************************************/
*****************************************************************************/
#ifndef CONVERT_H
#define CONVERT_H

View file

@ -1,12 +1,12 @@
/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-1999, International Business Machines Corporation and
* Copyright (c) 1997-2001, International Business Machines Corporation and
* others. All Rights Reserved.
*
* FILE NAME: DOCMAIN.h
*
* Date Name Description
* 12/11/2000 Ram Creation.
* 12/11/2000 Ram Creation.
*/
/* This file contains documentation for Doxygen and doesnot have
* any significance with respect to C or C++ API

View file

@ -1,10 +1,10 @@
/*
*****************************************************************************************
******************************************************************************
*
* Copyright (C) 1996-1999, International Business Machines
* Copyright (C) 1996-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*****************************************************************************************
******************************************************************************
*
* File locid.h
*
@ -20,9 +20,9 @@
* 04/24/97 aliu Numerous changes per code review.
* 08/18/98 stephen Added tokenizeString(),changed getDisplayName()
* 09/08/98 stephen Moved definition of kEmptyString for Mac Port
* 11/09/99 weiv Added const char * getName() const;
* 11/09/99 weiv Added const char * getName() const;
* 04/12/00 srl removing unicodestring api's and cached hash code
*****************************************************************************************
******************************************************************************
*/
#ifndef LOCID_H

View file

@ -1,7 +1,7 @@
/*
********************************************************************
* COPYRIGHT:
* Copyright (c) 1996-1999, International Business Machines Corporation and
* Copyright (c) 1996-2001, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************
*/

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -154,22 +154,22 @@ typedef unsigned short uint16_t;
/* Information about wchar support */
/*===========================================================================*/
#define U_HAVE_WCHAR_H @U_HAVE_WCHAR_H@
#define U_SIZEOF_WCHAR_T @U_SIZEOF_WCHAR_T@
#define U_HAVE_WCHAR_H @U_HAVE_WCHAR_H@
#define U_SIZEOF_WCHAR_T @U_SIZEOF_WCHAR_T@
#define U_HAVE_WCSCPY @U_HAVE_WCSCPY@
#define U_HAVE_WCSCPY @U_HAVE_WCSCPY@
/*===========================================================================*/
/* Information about POSIX support */
/*===========================================================================*/
#define U_HAVE_NL_LANGINFO @U_HAVE_NL_LANGINFO@
#define U_HAVE_NL_LANGINFO_CODESET @U_HAVE_NL_LANGINFO_CODESET@
#define U_NL_LANGINFO_CODESET @U_NL_LANGINFO_CODESET@
#define U_HAVE_NL_LANGINFO @U_HAVE_NL_LANGINFO@
#define U_HAVE_NL_LANGINFO_CODESET @U_HAVE_NL_LANGINFO_CODESET@
#define U_NL_LANGINFO_CODESET @U_NL_LANGINFO_CODESET@
#define U_TZSET @U_TZSET@
#define U_TIMEZONE @U_TIMEZONE@
#define U_TZNAME @U_TZNAME@
#define U_TZSET @U_TZSET@
#define U_TIMEZONE @U_TIMEZONE@
#define U_TZNAME @U_TZNAME@
/*===========================================================================*/
/* Symbol import-export control */
@ -183,5 +183,5 @@ typedef unsigned short uint16_t;
/* Programs used by ICU code */
/*===========================================================================*/
#define U_MAKE "@U_MAKE@"
#define U_MAKE "@U_MAKE@"

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* FILE NAME : pmacos.h
*
@ -14,7 +14,7 @@
* 03/30/99 stephen Added Linux support.
* 04/13/99 stephen Reworked for autoconf.
* 08/26/00 srl Moved to pmacos.h
*******************************************************************************
******************************************************************************
*/
/* Define the platform we're on. */
@ -49,7 +49,7 @@
*/
#ifndef U_IOSTREAM_SOURCE
#define U_IOSTREAM_SOURCE 198506 /* Wish we could use 199711 but that breaks while compiling chariter.cpp */
#define U_IOSTREAM_SOURCE 198506 /* Wish we could use 199711 but that breaks while compiling chariter.cpp */
#endif
/* Determines whether specific types are available */
@ -112,10 +112,10 @@ typedef unsigned short uint16_t;
/* Character data types */
/*===========================================================================*/
#define U_HAVE_WCHAR_H 0
#define U_SIZEOF_WCHAR_T 2
#define U_HAVE_WCHAR_H 0
#define U_SIZEOF_WCHAR_T 2
#define U_HAVE_WCSCPY 0
#define U_HAVE_WCSCPY 0
/*===========================================================================*/
/* Symbol import-export control */
@ -131,5 +131,5 @@ typedef unsigned short uint16_t;
/* Programs used by ICU code */
/*===========================================================================*/
#define U_MAKE "Make"
#define U_MAKE "Make"

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -100,9 +100,9 @@ typedef unsigned long uint32_t;
/* Information about POSIX support */
/*===========================================================================*/
#define U_TZSET _tzset
#define U_TIMEZONE _timezone
#define U_TZNAME _tzname
#define U_TZSET _tzset
#define U_TIMEZONE _timezone
#define U_TZNAME _tzname
/*===========================================================================*/
/* Symbol import-export control */
@ -116,4 +116,4 @@ typedef unsigned long uint32_t;
/* Programs used by ICU code */
/*===========================================================================*/
#define U_MAKE "gmake"
#define U_MAKE "gmake"

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -157,4 +157,4 @@ as/400 machines.
/* Programs used by ICU code */
/*===========================================================================*/
#define U_MAKE "gmake"
#define U_MAKE "gmake"

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-2000, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* FILE NAME : putil.h
*
@ -18,7 +18,7 @@
* 04/15/99 stephen Converted to C
* 11/15/99 helena Integrated S/390 changes for IEEE support.
* 01/11/00 helena Added u_getVersion.
*******************************************************************************
******************************************************************************
*/
#ifndef PUTIL_H
@ -32,9 +32,9 @@
# define IEEE_754 1
#endif
/*===========================================================================*/
/* Platform utilities */
/*===========================================================================*/
/*==========================================================================*/
/* Platform utilities */
/*==========================================================================*/
/**
* Platform utilities isolates the platform dependencies of the

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* FILE NAME : platform.h
*
@ -13,7 +13,7 @@
* 03/02/99 stephen Added AS400 support.
* 03/30/99 stephen Added Linux support.
* 04/13/99 stephen Reworked for autoconf.
*******************************************************************************
******************************************************************************
*/
/* Define the platform we're on. */
@ -114,9 +114,9 @@ typedef unsigned short uint16_t;
/* Information about POSIX support */
/*===========================================================================*/
#define U_TZSET _tzset
#define U_TIMEZONE _timezone
#define U_TZNAME _tzname
#define U_TZSET _tzset
#define U_TIMEZONE _timezone
#define U_TZNAME _tzname
/*===========================================================================*/
/* Symbol import-export control */
@ -130,4 +130,4 @@ typedef unsigned short uint16_t;
/* Programs used by ICU code */
/*===========================================================================*/
#define U_MAKE "nmake"
#define U_MAKE "nmake"

View file

@ -1,14 +1,14 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines Corporation and
**************************************************************************
* Copyright (C) 1999-2001, International Business Machines Corporation and
* others. All Rights Reserved.
**********************************************************************
**************************************************************************
* Date Name Description
* 11/17/99 aliu Creation. Ported from java. Modified to
* match current UnicodeString API. Forced
* to use name "handleReplaceBetween" because
* of existing methods in UnicodeString.
**********************************************************************
**************************************************************************
*/
#ifndef REP_H

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1996-1999, International Business Machines
* Copyright (C) 1996-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File resbund.h
*
@ -19,19 +19,19 @@
* from a specific file, without searching other files.
* 2/11/97 aliu Added UErrorCode return values to constructors. Fixed
* infinite loops in scanForFile and scanForLocale.
* Modified getRawResourceData to not delete storage in
* localeData and resourceData which it doesn't own.
* Modified getRawResourceData to not delete storage
* in localeData and resourceData which it doesn't own.
* Added Mac compatibility #ifdefs for tellp() and
* ios::nocreate.
* 2/18/97 helena Updated with 100% documentation coverage.
* 3/13/97 aliu Rewrote to load in entire resource bundle and store
* it as a Hashtable of ResourceBundleData objects.
* Added state table to govern parsing of files.
* Modified to load locale index out of new file distinct
* from default.txt.
* 3/25/97 aliu Modified to support 2-d arrays, needed for timezone data.
* Added support for custom file suffixes. Again, needed to
* support timezone data.
* Modified to load locale index out of new file
* distinct from default.txt.
* 3/25/97 aliu Modified to support 2-d arrays, needed for timezone
* data. Added support for custom file suffixes. Again,
* needed to support timezone data.
* 4/7/97 aliu Cleaned up.
* 03/02/99 stephen Removed dependency on FILE*.
* 03/29/99 helena Merged Bertrand and Stephen's changes.
@ -40,7 +40,7 @@
* Cleaned up.
* 06/14/99 stephen Removed methods taking a filename suffix.
* 11/09/99 weiv Added getLocale(), fRealLocale, removed fRealLocaleID
*******************************************************************************
******************************************************************************
*/
#ifndef RESBUND_H

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File schriter.h
*
@ -12,7 +12,7 @@
*
* Date Name Description
* 05/05/99 stephen Cleaned up.
*******************************************************************************
******************************************************************************
*/
#ifndef SCHRITER_H

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
*
* File scsu.h
*
@ -13,7 +13,7 @@
* Date Name Description
* 05/17/99 stephen Creation (ported from java UnicodeCompressor.java)
* 09/21/99 stephen Updated to handle data splits on decompression.
*******************************************************************************
******************************************************************************
*/
#ifndef SCSU_H

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ubidi.h
* encoding: US-ASCII
* tab size: 8 (not used)

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-2000, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -17,16 +17,16 @@
* 8/27/1999 schererm UCharDirection constants: U_...
* 11/11/1999 weiv added u_isalnum(), cleaned comments
* 01/11/2000 helena Renamed u_getVersion to u_getUnicodeVersion().
********************************************************************************
******************************************************************************
*/
#ifndef UCHAR_H
#define UCHAR_H
#include "unicode/utypes.h"
/*===========================================================================*/
/* Unicode version number */
/*===========================================================================*/
/*==========================================================================*/
/* Unicode version number */
/*==========================================================================*/
#define U_UNICODE_VERSION "3.0.0"
/**
@ -65,69 +65,69 @@
*/
enum UCharCategory
{
/** Non-category for unassigned and non-character code points. */
U_UNASSIGNED = 0,
/** Lu */
/** Non-category for unassigned and non-character code points. */
U_UNASSIGNED = 0,
/** Lu */
U_UPPERCASE_LETTER = 1,
/** Ll */
/** Ll */
U_LOWERCASE_LETTER = 2,
/** Lt */
/** Lt */
U_TITLECASE_LETTER = 3,
/** Lm */
/** Lm */
U_MODIFIER_LETTER = 4,
/** Lo */
/** Lo */
U_OTHER_LETTER = 5,
/** Mn */
/** Mn */
U_NON_SPACING_MARK = 6,
/** Me */
/** Me */
U_ENCLOSING_MARK = 7,
/** Mc */
/** Mc */
U_COMBINING_SPACING_MARK = 8,
/** Nd */
/** Nd */
U_DECIMAL_DIGIT_NUMBER = 9,
/** Nl */
/** Nl */
U_LETTER_NUMBER = 10,
/** No */
/** No */
U_OTHER_NUMBER = 11,
/** Zs */
/** Zs */
U_SPACE_SEPARATOR = 12,
/** Zl */
/** Zl */
U_LINE_SEPARATOR = 13,
/** Zp */
/** Zp */
U_PARAGRAPH_SEPARATOR = 14,
/** Cc */
/** Cc */
U_CONTROL_CHAR = 15,
/** Cf */
/** Cf */
U_FORMAT_CHAR = 16,
/** Co */
/** Co */
U_PRIVATE_USE_CHAR = 17,
/** Cs */
/** Cs */
U_SURROGATE = 18,
/** Pd */
/** Pd */
U_DASH_PUNCTUATION = 19,
/** Ps */
/** Ps */
U_START_PUNCTUATION = 20,
/** Pe */
/** Pe */
U_END_PUNCTUATION = 21,
/** Pc */
/** Pc */
U_CONNECTOR_PUNCTUATION = 22,
/** Po */
/** Po */
U_OTHER_PUNCTUATION = 23,
/** Sm */
/** Sm */
U_MATH_SYMBOL = 24,
/** Sc */
/** Sc */
U_CURRENCY_SYMBOL = 25,
/** Sk */
/** Sk */
U_MODIFIER_SYMBOL = 26,
/** So */
/** So */
U_OTHER_SYMBOL = 27,
/** Pi */
/** Pi */
U_INITIAL_PUNCTUATION = 28,
/** Pf */
/** Pf */
U_FINAL_PUNCTUATION = 29,
/** Cn */
/** Cn */
U_GENERAL_OTHER_TYPES = 30,
/** One higher than the last enum UCharCategory constant. */
/** One higher than the last enum UCharCategory constant. */
U_CHAR_CATEGORY_COUNT
};
@ -137,44 +137,44 @@ typedef enum UCharCategory UCharCategory;
*/
enum UCharDirection {
/** */
U_LEFT_TO_RIGHT = 0,
/** */
U_LEFT_TO_RIGHT = 0,
/** */
U_RIGHT_TO_LEFT = 1,
/** */
/** */
U_EUROPEAN_NUMBER = 2,
/** */
/** */
U_EUROPEAN_NUMBER_SEPARATOR = 3,
/** */
/** */
U_EUROPEAN_NUMBER_TERMINATOR = 4,
/** */
/** */
U_ARABIC_NUMBER = 5,
/** */
/** */
U_COMMON_NUMBER_SEPARATOR = 6,
/** */
/** */
U_BLOCK_SEPARATOR = 7,
/** */
/** */
U_SEGMENT_SEPARATOR = 8,
/** */
/** */
U_WHITE_SPACE_NEUTRAL = 9,
/** */
/** */
U_OTHER_NEUTRAL = 10,
/** */
/** */
U_LEFT_TO_RIGHT_EMBEDDING = 11,
/** */
/** */
U_LEFT_TO_RIGHT_OVERRIDE = 12,
/** */
/** */
U_RIGHT_TO_LEFT_ARABIC = 13,
/** */
/** */
U_RIGHT_TO_LEFT_EMBEDDING = 14,
/** */
/** */
U_RIGHT_TO_LEFT_OVERRIDE = 15,
/** */
/** */
U_POP_DIRECTIONAL_FORMAT = 16,
/** */
/** */
U_DIR_NON_SPACING_MARK = 17,
/** */
/** */
U_BOUNDARY_NEUTRAL = 18,
/** */
/** */
U_CHAR_DIRECTION_COUNT
};
@ -191,183 +191,183 @@ typedef enum UCharDirection UCharDirection;
*/
enum UCharScript {
/* Script names */
/** */
/** */
U_BASIC_LATIN,
/** */
/** */
U_LATIN_1_SUPPLEMENT,
/** */
/** */
U_LATIN_EXTENDED_A,
/** */
/** */
U_LATIN_EXTENDED_B,
/** */
/** */
U_IPA_EXTENSIONS,
/** */
/** */
U_SPACING_MODIFIER_LETTERS,
/** */
/** */
U_COMBINING_DIACRITICAL_MARKS,
/** */
/** */
U_GREEK,
/** */
/** */
U_CYRILLIC,
/** */
/** */
U_ARMENIAN,
/** */
/** */
U_HEBREW,
/** */
/** */
U_ARABIC,
/** */
/** */
U_SYRIAC,
/** */
/** */
U_THAANA,
/** */
/** */
U_DEVANAGARI,
/** */
/** */
U_BENGALI,
/** */
/** */
U_GURMUKHI,
/** */
/** */
U_GUJARATI,
/** */
/** */
U_ORIYA,
/** */
/** */
U_TAMIL,
/** */
/** */
U_TELUGU,
/** */
/** */
U_KANNADA,
/** */
/** */
U_MALAYALAM,
/** */
/** */
U_SINHALA,
/** */
/** */
U_THAI,
/** */
/** */
U_LAO,
/** */
/** */
U_TIBETAN,
/** */
/** */
U_MYANMAR,
/** */
/** */
U_GEORGIAN,
/** */
/** */
U_HANGUL_JAMO,
/** */
/** */
U_ETHIOPIC,
/** */
/** */
U_CHEROKEE,
/** */
/** */
U_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS,
/** */
/** */
U_OGHAM,
/** */
/** */
U_RUNIC,
/** */
/** */
U_KHMER,
/** */
/** */
U_MONGOLIAN,
/** */
/** */
U_LATIN_EXTENDED_ADDITIONAL,
/** */
/** */
U_GREEK_EXTENDED,
/** */
/** */
U_GENERAL_PUNCTUATION,
/** */
/** */
U_SUPERSCRIPTS_AND_SUBSCRIPTS,
/** */
/** */
U_CURRENCY_SYMBOLS,
/** */
/** */
U_COMBINING_MARKS_FOR_SYMBOLS,
/** */
/** */
U_LETTERLIKE_SYMBOLS,
/** */
/** */
U_NUMBER_FORMS,
/** */
/** */
U_ARROWS,
/** */
/** */
U_MATHEMATICAL_OPERATORS,
/** */
/** */
U_MISCELLANEOUS_TECHNICAL,
/** */
/** */
U_CONTROL_PICTURES,
/** */
/** */
U_OPTICAL_CHARACTER_RECOGNITION,
/** */
/** */
U_ENCLOSED_ALPHANUMERICS,
/** */
/** */
U_BOX_DRAWING,
/** */
/** */
U_BLOCK_ELEMENTS,
/** */
/** */
U_GEOMETRIC_SHAPES,
/** */
/** */
U_MISCELLANEOUS_SYMBOLS,
/** */
/** */
U_DINGBATS,
/** */
/** */
U_BRAILLE_PATTERNS,
/** */
/** */
U_CJK_RADICALS_SUPPLEMENT,
/** */
/** */
U_KANGXI_RADICALS,
/** */
/** */
U_IDEOGRAPHIC_DESCRIPTION_CHARACTERS,
/** */
/** */
U_CJK_SYMBOLS_AND_PUNCTUATION,
/** */
/** */
U_HIRAGANA,
/** */
/** */
U_KATAKANA,
/** */
/** */
U_BOPOMOFO,
/** */
/** */
U_HANGUL_COMPATIBILITY_JAMO,
/** */
/** */
U_KANBUN,
/** */
/** */
U_BOPOMOFO_EXTENDED,
/** */
/** */
U_ENCLOSED_CJK_LETTERS_AND_MONTHS,
/** */
/** */
U_CJK_COMPATIBILITY,
/** */
/** */
U_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A,
/** */
/** */
U_CJK_UNIFIED_IDEOGRAPHS,
/** */
/** */
U_YI_SYLLABLES,
/** */
/** */
U_YI_RADICALS,
/** */
/** */
U_HANGUL_SYLLABLES,
/** */
/** */
U_HIGH_SURROGATES,
/** */
/** */
U_HIGH_PRIVATE_USE_SURROGATES,
/** */
/** */
U_LOW_SURROGATES,
/** */
/** */
U_PRIVATE_USE_AREA,
/** */
/** */
U_CJK_COMPATIBILITY_IDEOGRAPHS,
/** */
/** */
U_ALPHABETIC_PRESENTATION_FORMS,
/** */
/** */
U_ARABIC_PRESENTATION_FORMS_A,
/** */
/** */
U_COMBINING_HALF_MARKS,
/** */
/** */
U_CJK_COMPATIBILITY_FORMS,
/** */
/** */
U_SMALL_FORM_VARIANTS,
/** */
/** */
U_ARABIC_PRESENTATION_FORMS_B,
/** */
/** */
U_SPECIALS,
/** */
/** */
U_HALFWIDTH_AND_FULLWIDTH_FORMS,
/** */
/** */
U_CHAR_SCRIPT_COUNT,
/** */
/** */
U_NO_SCRIPT=U_CHAR_SCRIPT_COUNT
};
typedef enum UCharScript UCharScript;
@ -378,16 +378,16 @@ typedef enum UCharScript UCharScript;
*/
enum UCellWidth
{
/** */
/** */
U_ZERO_WIDTH = 0,
/** */
U_HALF_WIDTH = 1,
U_HALF_WIDTH = 1,
/** */
U_FULL_WIDTH = 2,
U_FULL_WIDTH = 2,
/** */
U_NEUTRAL_WIDTH = 3,
U_NEUTRAL_WIDTH = 3,
/** */
U_CELL_WIDTH_COUNT
U_CELL_WIDTH_COUNT
};
typedef enum UCellWidth UCellWidth;
@ -542,7 +542,7 @@ u_isspace(UChar32 c);
* Note: This method corresponds to the Java method
* <tt>java.lang.Character.isWhitespace()</tt>.
*
* @param ch the character to be tested.
* @param ch the character to be tested.
* @return true if the character is an ICU whitespace character;
* false otherwise.
* @see #isspace

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* ucnv.h:
@ -64,7 +64,7 @@ typedef enum {
UCNV_LMBCS_1 = 11,
UCNV_LMBCS_2,
UCNV_LMBCS_3,
UCNV_LMBCS_3,
UCNV_LMBCS_4,
UCNV_LMBCS_5,
UCNV_LMBCS_6,
@ -117,7 +117,7 @@ typedef void (*UConverterToUCallback) (
const char *codePoints,
int32_t length,
UConverterCallbackReason reason,
UErrorCode *);
UErrorCode *);
/**
* Function pointer for error callback in the unicode to codepage direction.
@ -138,7 +138,7 @@ typedef void (*UConverterFromUCallback) (
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
UErrorCode *);
UErrorCode *);
U_CDECL_END
@ -316,25 +316,24 @@ ucnv_openCCSID (int32_t codepage,
* Thread safe cloning operation
* @param cnv converter to be cloned
* @param stackBuffer user allocated space for the new clone. If NULL new memory will be allocated.
If buffer is not large enough, new memory will be allocated.
Clients can use the U_CNV_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations.
* If buffer is not large enough, new memory will be allocated.
* Clients can use the U_CNV_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations.
* @param pBufferSize pointer to size of allocated space.
If *pBufferSize == 0, a sufficient size for use in cloning will
be returned ('pre-flighting')
If *pBufferSize is not enough for a stack-based safe clone,
new memory will be allocated.
* If *pBufferSize == 0, a sufficient size for use in cloning will
* be returned ('pre-flighting')
* If *pBufferSize is not enough for a stack-based safe clone,
* new memory will be allocated.
* @param status to indicate whether the operation went on smoothly or there were errors
An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were necessary.
* An informational status value, U_SAFECLONE_ALLOCATED_ERROR, is used if any allocations were necessary.
* @return pointer to the new clone
* @draft API 1.8 freeze
*/
U_CAPI UConverter *
ucnv_safeClone(
const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
ucnv_safeClone(const UConverter *cnv,
void *stackBuffer,
int32_t *pBufferSize,
UErrorCode *status);
#define U_CNV_SAFECLONE_BUFFERSIZE 512
@ -592,8 +591,8 @@ ucnv_getType (const UConverter * converter);
* @stable
*/
U_CAPI void U_EXPORT2 ucnv_getStarters(const UConverter* converter,
UBool starters[256],
UErrorCode* err);
UBool starters[256],
UErrorCode* err);
/**

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* ucnv_cb.h:

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -100,14 +100,14 @@ typedef enum {
* The structure for the fromUnicode callback function parameter.
*/
typedef struct {
uint16_t size;
UBool flush;
UConverter *converter;
const UChar *source;
const UChar *sourceLimit;
char *target;
const char *targetLimit;
int32_t *offsets; /* *offset = blah ; offset++; */
uint16_t size;
UBool flush;
UConverter *converter;
const UChar *source;
const UChar *sourceLimit;
char *target;
const char *targetLimit;
int32_t *offsets; /* *offset = blah ; offset++; */
} UConverterFromUnicodeArgs;
@ -115,14 +115,14 @@ typedef struct {
* The structure for the toUnicode callback function parameter.
*/
typedef struct {
uint16_t size;
UBool flush;
UConverter *converter;
const char *source;
const char *sourceLimit;
UChar *target;
const UChar *targetLimit;
int32_t *offsets;
uint16_t size;
UBool flush;
UConverter *converter;
const char *source;
const char *sourceLimit;
UChar *target;
const UChar *targetLimit;
int32_t *offsets;
} UConverterToUnicodeArgs;
@ -139,7 +139,7 @@ U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP (
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
UErrorCode * err);
UErrorCode * err);
@ -156,7 +156,7 @@ U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP (
const char* codeUnits,
int32_t length,
UConverterCallbackReason reason,
UErrorCode * err);
UErrorCode * err);
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
@ -177,7 +177,7 @@ U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SKIP (
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
UErrorCode * err);
UErrorCode * err);
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
@ -200,7 +200,7 @@ U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_SUBSTITUTE (
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
UErrorCode * err);
UErrorCode * err);
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
@ -249,7 +249,7 @@ U_CAPI void U_EXPORT2 UCNV_FROM_U_CALLBACK_ESCAPE (
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
UErrorCode * err);
UErrorCode * err);
/**
@ -270,7 +270,7 @@ U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SKIP (
const char* codeUnits,
int32_t length,
UConverterCallbackReason reason,
UErrorCode * err);
UErrorCode * err);
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
@ -289,7 +289,7 @@ U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_SUBSTITUTE (
const char* codeUnits,
int32_t length,
UConverterCallbackReason reason,
UErrorCode * err);
UErrorCode * err);
/**
* DO NOT CALL THIS FUNCTION DIRECTLY!
@ -305,7 +305,7 @@ U_CAPI void U_EXPORT2 UCNV_TO_U_CALLBACK_ESCAPE (
const char* codeUnits,
int32_t length,
UConverterCallbackReason reason,
UErrorCode * err);
UErrorCode * err);
#endif

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: udata.h
* encoding: US-ASCII
* tab size: 8 (not used)

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 1999-2000, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: umachine.h
* encoding: US-ASCII
* tab size: 8 (not used)
@ -35,10 +35,10 @@
* the UTF-handling macros made this unmaintainable.
*
*/
/*===========================================================================*/
/* Include platform-dependent definitions */
/* which are contained in the platform-specific file platform.h */
/*===========================================================================*/
/*==========================================================================*/
/* Include platform-dependent definitions */
/* which are contained in the platform-specific file platform.h */
/*==========================================================================*/
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
# include "unicode/pwin32.h"

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines
* Copyright (C) 1999-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: umisc.h

View file

@ -1,8 +1,8 @@
/*
*****************************************************************************************
* Copyright (C) 1996-1999, International Business Machines
******************************************************************************
* Copyright (C) 1996-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*****************************************************************************************
******************************************************************************
*/
// FILE NAME : unicode.h
//
@ -20,7 +20,7 @@
// Madhu Katragadda
// 5/20/99 Madhu Added the function getVersion()
// 11/22/99 aliu Added MIN_RADIX, MAX_RADIX, digit, forDigit
//********************************************************************************************
//*****************************************************************************

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1998-1999, International Business Machines
* Copyright (C) 1998-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -14,7 +14,7 @@
* 04/20/99 stephen Overhauled per 4/16 code review.
* 11/18/99 aliu Made to inherit from Replaceable. Added method
* handleReplaceBetween(); other methods unchanged.
*******************************************************************************
******************************************************************************
*/
#ifndef UNISTR_H

View file

@ -1,6 +1,7 @@
/*
*******************************************************************************
* Copyright (c) {1996-2001}, International Business Machines Corporation and others. All Rights Reserved.
* Copyright (c) 1996-2001, International Business Machines Corporation
* and others. All Rights Reserved.
*******************************************************************************
* File unorm.h
*

View file

@ -1,11 +1,11 @@
/*
*******************************************************************************
* Copyright (C) 1997-2000, International Business Machines
******************************************************************************
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
******************************************************************************
* Date Name Description
* 06/23/00 aliu Creation.
*******************************************************************************
******************************************************************************
*/
#ifndef __UREP_H

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1997-1999, International Business Machines
* Copyright (C) 1997-2001, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@ -16,7 +16,7 @@
* 06/14/99 stephen Removed functions taking a filename suffix.
* 07/20/99 stephen Language-independent ypedef to void*
* 11/09/99 weiv Added ures_getLocale()
*******************************************************************************
******************************************************************************
*/
#ifndef URES_H

View file

@ -1,10 +1,10 @@
/*
*******************************************************************************
******************************************************************************
*
* Copyright (C) 2000, International Business Machines
* Copyright (C) 2000-2001, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
******************************************************************************
* file name: ushape.h
* encoding: US-ASCII
* tab size: 8 (not used)

Some files were not shown because too many files have changed in this diff Show more