*
-* To make things even trickier, secondary differences (accent marks) are
-* compared starting at the *end* of the string in languages with French
-* secondary ordering. But when comparing the accent marks on a single base
-* character, they are compared from the beginning. To handle this, we reverse
-* all of the accents that belong to each base character, then we reverse the
+* To make things even trickier, secondary differences (accent marks) are
+* compared starting at the *end* of the string in languages with French
+* secondary ordering. But when comparing the accent marks on a single base
+* character, they are compared from the beginning. To handle this, we reverse
+* all of the accents that belong to each base character, then we reverse the
* entire string of secondary orderings at the end.
*/
CollationKey& RuleBasedCollator::getCollationKey(
@@ -463,7 +463,7 @@ CollationKey& RuleBasedCollator::getCollationKey(
if(sourceLen >= STACK_BUFFER_LENGTH_)
uSource = new UChar[sourceLen+1];
-
+
source.extract(0, sourceLen, uSource);
uSource[sourceLen] = 0;
CollationKey& result = getCollationKey(uSource, sourceLen, sortkey, status);
@@ -483,28 +483,28 @@ CollationKey& RuleBasedCollator::getCollationKey(const UChar* source,
status = U_ILLEGAL_ARGUMENT_ERROR;
return sortkey.setToBogus();
}
-
+
if ((!source) || (sourceLen == 0))
return sortkey.reset();
- /*
- * have to use malloc, lowest denomination, since adopt can be used by
+ /*
+ * have to use malloc, lowest denomination, since adopt can be used by
* a c return value.
*/
uint8_t *result = (uint8_t *)uprv_malloc(UCOL_MAX_BUFFER * sizeof(uint8_t));
uint8_t resLen = ucol_getSortKey(ucollator, source, sourceLen, result,
UCOL_MAX_BUFFER);
sortkey.adopt(result, resLen);
-
+
return sortkey;
}
/**
- * Return the maximum length of any expansion sequences that end with the
+ * Return the maximum length of any expansion sequences that end with the
* specified comparison order.
* @param order a collation order returned by previous or next.
- * @return the maximum length of any expansion seuences ending with the
- * specified order or 1 if collation order does not occur at the end of any
+ * @return the maximum length of any expansion seuences ending with the
+ * specified order or 1 if collation order does not occur at the end of any
* expansion sequence.
* @see CollationElementIterator#getMaxExpansion
*/
@@ -515,37 +515,37 @@ int32_t RuleBasedCollator::getMaxExpansion(int32_t order) const
return result;
}
-uint8_t* RuleBasedCollator::cloneRuleData(int32_t &length,
+uint8_t* RuleBasedCollator::cloneRuleData(int32_t &length,
UErrorCode &status)
{
return ucol_cloneRuleData(ucollator, &length, &status);
}
-void RuleBasedCollator::setAttribute(UColAttribute attr,
- UColAttributeValue value,
- UErrorCode &status)
+void RuleBasedCollator::setAttribute(UColAttribute attr,
+ UColAttributeValue value,
+ UErrorCode &status)
{
if (U_FAILURE(status))
return;
ucol_setAttribute(ucollator, attr, value, &status);
}
-UColAttributeValue RuleBasedCollator::getAttribute(UColAttribute attr,
- UErrorCode &status)
+UColAttributeValue RuleBasedCollator::getAttribute(UColAttribute attr,
+ UErrorCode &status)
{
if (U_FAILURE(status))
return UCOL_DEFAULT;
return ucol_getAttribute(ucollator, attr, &status);
}
-Collator* RuleBasedCollator::safeClone(void)
+Collator* RuleBasedCollator::safeClone(void)
{
UErrorCode intStatus = U_ZERO_ERROR;
UCollator *ucol = ucol_safeClone(ucollator, NULL, 0, &intStatus);
if (U_FAILURE(intStatus))
return NULL;
int32_t length = 0;
- UnicodeString *r = new UnicodeString(ucol_getRules(ucollator, &length),
+ UnicodeString *r = new UnicodeString(ucol_getRules(ucollator, &length),
length);
RuleBasedCollator *result = new RuleBasedCollator(ucol, r);
result->dataIsOwned = TRUE;
@@ -554,23 +554,23 @@ Collator* RuleBasedCollator::safeClone(void)
Collator::EComparisonResult RuleBasedCollator::compare(
ForwardCharacterIterator &source,
- ForwardCharacterIterator &target)
+ ForwardCharacterIterator &target)
{
return getEComparisonResult(
- ucol_strcollinc(ucollator, forwardCharIteratorGlue, &source,
+ ucol_strcollinc(ucollator, forwardCharIteratorGlue, &source,
forwardCharIteratorGlue, &target));
}
-int32_t RuleBasedCollator::getSortKey(const UnicodeString& source,
- uint8_t *result, int32_t resultLength)
- const
+int32_t RuleBasedCollator::getSortKey(const UnicodeString& source,
+ uint8_t *result, int32_t resultLength)
+ const
{
UChar sStart[STACK_BUFFER_LENGTH_];
UChar *uSource = sStart;
uint32_t sourceLen = source.length();
if(sourceLen >= STACK_BUFFER_LENGTH_)
uSource = new UChar[sourceLen+1];
-
+
source.extract(0, sourceLen, uSource);
uSource[sourceLen] = 0;
@@ -582,9 +582,9 @@ int32_t RuleBasedCollator::getSortKey(const UnicodeString& source,
return resLen;
}
-int32_t RuleBasedCollator::getSortKey(const UChar *source,
+int32_t RuleBasedCollator::getSortKey(const UChar *source,
int32_t sourceLength, uint8_t *result,
- int32_t resultLength) const
+ int32_t resultLength) const
{
return ucol_getSortKey(ucollator, source, sourceLength, result, resultLength);
}
@@ -592,7 +592,7 @@ int32_t RuleBasedCollator::getSortKey(const UChar *source,
Collator::ECollationStrength RuleBasedCollator::getStrength(void) const
{
UErrorCode intStatus = U_ZERO_ERROR;
- return getECollationStrength(ucol_getAttribute(ucollator, UCOL_STRENGTH,
+ return getECollationStrength(ucol_getAttribute(ucollator, UCOL_STRENGTH,
&intStatus));
}
@@ -603,8 +603,8 @@ void RuleBasedCollator::setStrength(ECollationStrength newStrength)
ucol_setAttribute(ucollator, UCOL_STRENGTH, strength, &intStatus);
}
-/**
-* Create a hash code for this collation. Just hash the main rule table -- that
+/**
+* Create a hash code for this collation. Just hash the main rule table -- that
* should be good enough for almost any use.
*/
int32_t RuleBasedCollator::hashCode() const
@@ -615,7 +615,7 @@ int32_t RuleBasedCollator::hashCode() const
}
/**
-* Set the decomposition mode of the Collator object. success is equal to
+* Set the decomposition mode of the Collator object. success is equal to
* U_ILLEGAL_ARGUMENT_ERROR if error occurs.
* @param the new decomposition mode
* @see Collator#getDecomposition
@@ -635,7 +635,7 @@ void RuleBasedCollator::setDecomposition(Normalizer::EMode mode)
Normalizer::EMode RuleBasedCollator::getDecomposition(void) const
{
UErrorCode status = U_ZERO_ERROR;
- return Normalizer::getNormalizerEMode(ucol_getNormalization(ucollator),
+ return Normalizer::getNormalizerEMode(ucol_getNormalization(ucollator),
status);
}
@@ -645,7 +645,7 @@ RuleBasedCollator::RuleBasedCollator() : dataIsOwned(FALSE), ucollator(0)
{
}
-RuleBasedCollator::RuleBasedCollator(UCollator *collator,
+RuleBasedCollator::RuleBasedCollator(UCollator *collator,
UnicodeString *rule) : dataIsOwned(FALSE)
{
ucollator = collator;
@@ -653,13 +653,13 @@ RuleBasedCollator::RuleBasedCollator(UCollator *collator,
}
RuleBasedCollator::RuleBasedCollator(const Locale& desiredLocale,
- UErrorCode& status) :
+ UErrorCode& status) :
dataIsOwned(FALSE), ucollator(0)
{
if (U_FAILURE(status))
return;
- /*
+ /*
Try to load, in order:
1. The desired locale's collation.
2. A fallback of the desired locale.
@@ -677,25 +677,25 @@ RuleBasedCollator::RuleBasedCollator(const Locale& desiredLocale,
language+country
language
Root: (aka DEFAULTRULES)
- steps 1-5 are handled by resource bundle fallback mechanism.
+ steps 1-5 are handled by resource bundle fallback mechanism.
however, in a very unprobable situation that no resource bundle
data exists, step 5 is repeated with hardcoded default rules.
*/
setUCollator(desiredLocale, status);
- if (U_FAILURE(status))
+ if (U_FAILURE(status))
{
status = U_ZERO_ERROR;
-
+
setUCollator(ResourceBundle::kDefaultFilename, status);
- if (U_FAILURE(status))
+ if (U_FAILURE(status))
{
status = U_ZERO_ERROR;
if (status == U_ZERO_ERROR)
status = U_USING_DEFAULT_ERROR;
-
+
if (status == U_MEMORY_ALLOCATION_ERROR)
return;
}
@@ -708,63 +708,63 @@ RuleBasedCollator::RuleBasedCollator(const Locale& desiredLocale,
urulestring = new UnicodeString(r, length);
dataIsOwned = TRUE;
}
-
+
return;
}
/* RuleBasedCollator private data members -------------------------------- */
/* need look up in .commit() */
-const int32_t RuleBasedCollator::CHARINDEX = 0x70000000;
+const int32_t RuleBasedCollator::CHARINDEX = 0x70000000;
/* Expand index follows */
-const int32_t RuleBasedCollator::EXPANDCHARINDEX = 0x7E000000;
+const int32_t RuleBasedCollator::EXPANDCHARINDEX = 0x7E000000;
/* contract indexes follows */
-const int32_t RuleBasedCollator::CONTRACTCHARINDEX = 0x7F000000;
+const int32_t RuleBasedCollator::CONTRACTCHARINDEX = 0x7F000000;
/* unmapped character values */
-const int32_t RuleBasedCollator::UNMAPPED = 0xFFFFFFFF;
+const int32_t RuleBasedCollator::UNMAPPED = 0xFFFFFFFF;
/* primary strength increment */
-const int32_t RuleBasedCollator::PRIMARYORDERINCREMENT = 0x00010000;
+const int32_t RuleBasedCollator::PRIMARYORDERINCREMENT = 0x00010000;
/* secondary strength increment */
const int32_t RuleBasedCollator::SECONDARYORDERINCREMENT = 0x00000100;
/* tertiary strength increment */
const int32_t RuleBasedCollator::TERTIARYORDERINCREMENT = 0x00000001;
/* mask off anything but primary order */
-const int32_t RuleBasedCollator::PRIMARYORDERMASK = 0xffff0000;
+const int32_t RuleBasedCollator::PRIMARYORDERMASK = 0xffff0000;
/* mask off anything but secondary order */
-const int32_t RuleBasedCollator::SECONDARYORDERMASK = 0x0000ff00;
+const int32_t RuleBasedCollator::SECONDARYORDERMASK = 0x0000ff00;
/* mask off anything but tertiary order */
-const int32_t RuleBasedCollator::TERTIARYORDERMASK = 0x000000ff;
+const int32_t RuleBasedCollator::TERTIARYORDERMASK = 0x000000ff;
/* mask off ignorable char order */
-const int32_t RuleBasedCollator::IGNORABLEMASK = 0x0000ffff;
+const int32_t RuleBasedCollator::IGNORABLEMASK = 0x0000ffff;
/* use only the primary difference */
-const int32_t RuleBasedCollator::PRIMARYDIFFERENCEONLY = 0xffff0000;
+const int32_t RuleBasedCollator::PRIMARYDIFFERENCEONLY = 0xffff0000;
/* use only the primary and secondary difference */
-const int32_t RuleBasedCollator::SECONDARYDIFFERENCEONLY = 0xffffff00;
+const int32_t RuleBasedCollator::SECONDARYDIFFERENCEONLY = 0xffffff00;
/* primary order shift */
-const int32_t RuleBasedCollator::PRIMARYORDERSHIFT = 16;
+const int32_t RuleBasedCollator::PRIMARYORDERSHIFT = 16;
/* secondary order shift */
-const int32_t RuleBasedCollator::SECONDARYORDERSHIFT = 8;
+const int32_t RuleBasedCollator::SECONDARYORDERSHIFT = 8;
/* starting value for collation elements */
-const int32_t RuleBasedCollator::COLELEMENTSTART = 0x02020202;
+const int32_t RuleBasedCollator::COLELEMENTSTART = 0x02020202;
/* testing mask for primary low element */
-const int32_t RuleBasedCollator::PRIMARYLOWZEROMASK = 0x00FF0000;
+const int32_t RuleBasedCollator::PRIMARYLOWZEROMASK = 0x00FF0000;
/* reseting value for secondaries and tertiaries */
const int32_t RuleBasedCollator::RESETSECONDARYTERTIARY = 0x00000202;
/* reseting value for tertiaries */
-const int32_t RuleBasedCollator::RESETTERTIARY = 0x00000002;
+const int32_t RuleBasedCollator::RESETTERTIARY = 0x00000002;
const int32_t RuleBasedCollator::PRIMIGNORABLE = 0x0202;
/* unique file id for parity check */
-const int16_t RuleBasedCollator::FILEID = 0x5443;
+const int16_t RuleBasedCollator::FILEID = 0x5443;
/* binary collation file extension */
-const char* RuleBasedCollator::kFilenameSuffix = ".col";
-/* class id ? Value is irrelevant */
-char RuleBasedCollator::fgClassID = 0;
+const char* RuleBasedCollator::kFilenameSuffix = ".col";
+/* class id ? Value is irrelevant */
+char RuleBasedCollator::fgClassID = 0;
/* other methods not belonging to any classes ------------------------------- */
-U_CAPI UChar forwardCharIteratorGlue(void *iterator)
+U_CAPI UChar forwardCharIteratorGlue(void *iterator)
{
ForwardCharacterIterator *iter = ((ForwardCharacterIterator *)iterator);
UChar result = iter->nextPostInc();
diff --git a/icu4c/source/i18n/unicode/format.h b/icu4c/source/i18n/unicode/format.h
index 87a90dacd04..f2939a5f76a 100644
--- a/icu4c/source/i18n/unicode/format.h
+++ b/icu4c/source/i18n/unicode/format.h
@@ -1,6 +1,6 @@
/*
********************************************************************************
-* Copyright © {1997-1999}, International Business Machines Corporation and others. All Rights Reserved.
+* Copyright (C) {1997-1999}, International Business Machines Corporation and others. All Rights Reserved.
********************************************************************************
*
* File FORMAT.H
@@ -16,10 +16,10 @@
// *****************************************************************************
// This file was generated from the java source file Format.java
// *****************************************************************************
-
+
#ifndef FORMAT_H
#define FORMAT_H
-
+
#include "unicode/utypes.h"
#include "unicode/unistr.h"
@@ -27,7 +27,7 @@
#include "unicode/fieldpos.h"
#include "unicode/parsepos.h"
-/**
+/**
* Base class for all formats. This is an abstract base class which
* specifies the protocol for classes which convert other objects or
* values, such as numeric values and dates, and their string
diff --git a/icu4c/source/i18n/unicode/gregocal.h b/icu4c/source/i18n/unicode/gregocal.h
index 8b8a1d81898..a1d334465a3 100644
--- a/icu4c/source/i18n/unicode/gregocal.h
+++ b/icu4c/source/i18n/unicode/gregocal.h
@@ -1,5 +1,5 @@
/*
-* Copyright © {1997-1999}, International Business Machines Corporation and others. All Rights Reserved.
+* Copyright (C) {1997-1999}, International Business Machines Corporation and others. All Rights Reserved.
********************************************************************************
*
* File GREGOCAL.H
@@ -11,7 +11,7 @@
* 07/28/98 stephen Sync with JDK 1.2
* 09/04/98 stephen Re-sync with JDK 8/31 putback
* 09/14/98 stephen Changed type of kOneDay, kOneWeek to double.
-* Fixed bug in roll()
+* Fixed bug in roll()
* 10/15/99 aliu Fixed j31, incorrect WEEK_OF_YEAR computation.
* Added documentation of WEEK_OF_YEAR computation.
* 10/15/99 aliu Fixed j32, cannot set date to Feb 29 2000 AD.
@@ -67,22 +67,22 @@
* if (idsCount == 0) {
* return;
* }
- *
+ *
* // begin output
* cout << "Current Time" << endl;
- *
+ *
* // create a Pacific Standard Time time zone
* SimpleTimeZone* pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, *(ids[0]));
- *
+ *
* // set up rules for daylight savings time
* pdt->setStartRule(Calendar::APRIL, 1, Calendar::SUNDAY, 2 * 60 * 60 * 1000);
* pdt->setEndRule(Calendar::OCTOBER, -1, Calendar::SUNDAY, 2 * 60 * 60 * 1000);
- *
+ *
* // create a GregorianCalendar with the Pacific Daylight time zone
* // and the current date and time
* UErrorCode success = U_ZERO_ERROR;
* Calendar* calendar = new GregorianCalendar( pdt, success );
- *
+ *
* // print out a bunch of interesting things
* cout << "ERA: " << calendar->get( Calendar::ERA, success ) << endl;
* cout << "YEAR: " << calendar->get( Calendar::YEAR, success ) << endl;
@@ -102,7 +102,7 @@
* cout << "MILLISECOND: " << calendar->get( Calendar::MILLISECOND, success ) << endl;
* cout << "ZONE_OFFSET: " << (calendar->get( Calendar::ZONE_OFFSET, success )/(60*60*1000)) << endl;
* cout << "DST_OFFSET: " << (calendar->get( Calendar::DST_OFFSET, success )/(60*60*1000)) << endl;
- *
+ *
* cout << "Current Time, with hour reset to 3" << endl;
* calendar->clear(Calendar::HOUR_OF_DAY); // so doesn't override
* calendar->set(Calendar::HOUR, 3);
@@ -124,7 +124,7 @@
* cout << "MILLISECOND: " << calendar->get( Calendar::MILLISECOND, success ) << endl;
* cout << "ZONE_OFFSET: " << (calendar->get( Calendar::ZONE_OFFSET, success )/(60*60*1000)) << endl; // in hours
* cout << "DST_OFFSET: " << (calendar->get( Calendar::DST_OFFSET, success )/(60*60*1000)) << endl; // in hours
- *
+ *
* delete[] ids;
* delete calendar; // also deletes pdt
* \endcode
@@ -467,7 +467,7 @@ protected:
*/
virtual void computeTime(UErrorCode& status);
-private:
+private:
/**
* Return the ERA. We need a special method for this because the
@@ -703,7 +703,7 @@ inline uint8_t GregorianCalendar::julianDayToDayOfWeek(double julian)
// If julian is negative, then julian%7 will be negative, so we adjust
// accordingly. We add 1 because Julian day 0 is Monday.
int8_t dayOfWeek = (int8_t) uprv_fmod(julian + 1, 7);
-
+
uint8_t result = (uint8_t)(dayOfWeek + ((dayOfWeek < 0) ? (7 + SUNDAY) : SUNDAY));
return result;
}
diff --git a/icu4c/source/i18n/unicode/hextouni.h b/icu4c/source/i18n/unicode/hextouni.h
index f28c692dac4..05fb4053bb6 100644
--- a/icu4c/source/i18n/unicode/hextouni.h
+++ b/icu4c/source/i18n/unicode/hextouni.h
@@ -1,5 +1,5 @@
/*
-* Copyright © {1999}, International Business Machines Corporation and others. All Rights Reserved.
+* Copyright (C) {1999}, International Business Machines Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
* 11/17/99 aliu Creation.
@@ -22,7 +22,7 @@
* Copyright © IBM Corporation 1999. All rights reserved.
*
* @author Alan Liu
- * @version $RCSfile: hextouni.h,v $ $Revision: 1.7 $ $Date: 2000/06/27 19:00:38 $
+ * @version $RCSfile: hextouni.h,v $ $Revision: 1.8 $ $Date: 2001/03/22 00:09:10 $
* @draft
*/
class U_I18N_API HexToUnicodeTransliterator : public Transliterator {
diff --git a/icu4c/source/i18n/unicode/msgfmt.h b/icu4c/source/i18n/unicode/msgfmt.h
index f3d31bf7a13..526bcbd0338 100644
--- a/icu4c/source/i18n/unicode/msgfmt.h
+++ b/icu4c/source/i18n/unicode/msgfmt.h
@@ -1,5 +1,5 @@
/*
-* Copyright © {1997-2001}, International Business Machines Corporation and others. All Rights Reserved.
+* Copyright (C) {1997-2001}, International Business Machines Corporation and others. All Rights Reserved.
********************************************************************************
*
* File MSGFMT.H
@@ -15,10 +15,10 @@
// *****************************************************************************
// This file was generated from the java source file MessageFormat.java
// *****************************************************************************
-
+
#ifndef MSGFMT_H
#define MSGFMT_H
-
+
#include "unicode/utypes.h"
#include "unicode/format.h"
#include "unicode/locid.h"
@@ -42,17 +42,17 @@ class NumberFormat;
* Formattable( (Date) cal.getTime(success), Formattable::kIsDate),
* "a disturbance in the Force"
* };
- *
+ *
* UnicodeString result;
* MessageFormat::format(
* "At {1,time} on {1,date}, there was {2} on planet {0,number}.",
* arguments, 3, result, success );
- *
+ *
* cout << "result: " << result << endl;
* //