From 16ac11f54617dabb53e4810cb88d5bdc4d348afd Mon Sep 17 00:00:00 2001 From: Helena Chapman Date: Wed, 22 Dec 1999 22:57:04 +0000 Subject: [PATCH] ICU-200 Updated with OS/400 specific port changes. X-SVN-Rev: 459 --- icu4c/source/common/putil.c | 3 +- icu4c/source/common/ubidi.c | 3 +- icu4c/source/common/ubidi.h | 2 +- icu4c/source/common/ucnv_io.h | 2 +- icu4c/source/common/utypes.h | 2 + icu4c/source/common/uvector.cpp | 6 +- icu4c/source/common/uvector.h | 28 +++--- icu4c/source/extra/ustdio/locbund.c | 2 +- icu4c/source/extra/ustdio/uprintf.c | 2 +- icu4c/source/extra/ustdio/uscanf.c | 2 +- icu4c/source/i18n/cpdtrans.cpp | 8 +- icu4c/source/i18n/cpdtrans.h | 10 +- icu4c/source/i18n/decimfmt.cpp | 2 +- icu4c/source/i18n/decimfmt.h | 2 +- icu4c/source/i18n/hextouni.cpp | 4 +- icu4c/source/i18n/hextouni.h | 6 +- icu4c/source/i18n/rbbi.cpp | 22 ++--- icu4c/source/i18n/rbbi.h | 22 ++--- icu4c/source/i18n/rbbi_bld.cpp | 4 +- icu4c/source/i18n/rbbi_bld.h | 4 +- icu4c/source/i18n/rbt.cpp | 4 +- icu4c/source/i18n/rbt.h | 4 +- icu4c/source/i18n/rbt_pars.cpp | 4 +- icu4c/source/i18n/rbt_pars.h | 4 +- icu4c/source/i18n/rbt_rule.cpp | 12 +-- icu4c/source/i18n/rbt_rule.h | 12 +-- icu4c/source/i18n/rbt_set.cpp | 4 +- icu4c/source/i18n/rbt_set.h | 4 +- icu4c/source/i18n/translit.cpp | 14 +-- icu4c/source/i18n/translit.h | 14 +-- icu4c/source/i18n/uniset.cpp | 12 +-- icu4c/source/i18n/uniset.h | 12 +-- icu4c/source/i18n/unitohex.cpp | 8 +- icu4c/source/i18n/unitohex.h | 8 +- icu4c/source/test/cintltst/callcoll.c | 2 +- icu4c/source/test/cintltst/capitst.c | 1 - icu4c/source/test/cintltst/cbiditst.c | 5 +- icu4c/source/test/cintltst/ccurrtst.c | 1 - icu4c/source/test/cintltst/cdantst.c | 2 +- icu4c/source/test/cintltst/cdetst.c | 2 +- icu4c/source/test/cintltst/cestst.c | 2 +- icu4c/source/test/cintltst/cfintst.c | 2 +- icu4c/source/test/cintltst/cfrtst.c | 2 +- icu4c/source/test/cintltst/cg7coll.c | 1 - icu4c/source/test/cintltst/citertst.c | 2 - icu4c/source/test/cintltst/cjaptst.c | 2 +- icu4c/source/test/cintltst/cnormtst.c | 1 - icu4c/source/test/cintltst/crestst.c | 2 +- icu4c/source/test/cintltst/cturtst.c | 1 - icu4c/source/test/cintltst/encoll.c | 2 +- icu4c/source/test/cintltst/eurocreg.c | 2 +- icu4c/source/test/cintltst/nucnvtst.c | 6 +- icu4c/source/test/cintltst/susctest.c | 6 +- icu4c/source/test/ieeetest/ieeetest.cpp | 28 +++--- icu4c/source/test/ieeetest/ieeetest.h | 40 ++++---- icu4c/source/test/intltest/dtfmapts.cpp | 4 +- icu4c/source/test/intltest/dtfmapts.h | 4 +- icu4c/source/test/intltest/dtfmrgts.cpp | 48 +++++----- icu4c/source/test/intltest/dtfmrgts.h | 4 +- icu4c/source/test/intltest/dtfmttst.cpp | 2 +- icu4c/source/test/intltest/dtfmttst.h | 2 +- icu4c/source/test/intltest/numfmtst.cpp | 22 ++--- icu4c/source/test/intltest/numfmtst.h | 22 ++--- icu4c/source/test/intltest/numrgts.cpp | 118 +++++++++++------------ icu4c/source/test/intltest/numrgts.h | 120 ++++++++++++------------ icu4c/source/test/intltest/strtest.cpp | 6 +- icu4c/source/test/intltest/strtest.h | 6 +- icu4c/source/test/intltest/thcoll.cpp | 4 +- icu4c/source/test/intltest/thcoll.h | 4 +- icu4c/source/test/intltest/transtst.cpp | 18 ++-- icu4c/source/test/intltest/transtst.h | 22 ++--- icu4c/source/test/intltest/usettest.cpp | 4 +- icu4c/source/test/intltest/usettest.h | 4 +- icu4c/source/tools/chartype/chartbld.h | 2 +- icu4c/source/tools/gencol/gencol.c | 6 +- icu4c/source/tools/genprops/genprops.c | 4 +- icu4c/source/tools/genprops/genprops.h | 12 +-- icu4c/source/tools/genprops/store.c | 18 ++-- icu4c/source/tools/genrb/error.h | 2 +- icu4c/source/tools/genrb/genrb.c | 6 +- icu4c/source/tools/rbdump/read.c | 2 +- 81 files changed, 412 insertions(+), 418 deletions(-) diff --git a/icu4c/source/common/putil.c b/icu4c/source/common/putil.c index 6d4fb964ce..17ecb2e7d9 100644 --- a/icu4c/source/common/putil.c +++ b/icu4c/source/common/putil.c @@ -622,6 +622,7 @@ icu_timezone() time_t t, t1, t2; struct tm tmrec; bool_t dst_checked; + int32_t tdiff = 0; time(&t); memcpy( &tmrec, localtime(&t), sizeof(tmrec) ); @@ -629,7 +630,7 @@ icu_timezone() t1 = mktime(&tmrec); /* local time in seconds*/ memcpy( &tmrec, gmtime(&t), sizeof(tmrec) ); t2 = mktime(&tmrec); /* GMT (or UTC) in seconds*/ - int32_t tdiff = t2 - t1; + tdiff = t2 - t1; /* imitate NT behaviour, which returns same timezone offset to GMT for winter and summer*/ if (dst_checked) tdiff += 3600; diff --git a/icu4c/source/common/ubidi.c b/icu4c/source/common/ubidi.c index d7a86cb480..4155baceca 100644 --- a/icu4c/source/common/ubidi.c +++ b/icu4c/source/common/ubidi.c @@ -135,7 +135,8 @@ adjustWSLevels(UBiDi *pBiDi); /* UBiDi object management -------------------------------------------------- */ U_CAPI UBiDi * U_EXPORT2 -ubidi_open() { +ubidi_open(void) +{ UErrorCode errorCode=U_ZERO_ERROR; return ubidi_openSized(0, 0, &errorCode); } diff --git a/icu4c/source/common/ubidi.h b/icu4c/source/common/ubidi.h index b6c3334adb..f9a3086a27 100644 --- a/icu4c/source/common/ubidi.h +++ b/icu4c/source/common/ubidi.h @@ -169,7 +169,7 @@ typedef struct UBiDi UBiDi; * @return An empty UBiDi object. */ U_CAPI UBiDi * U_EXPORT2 -ubidi_open(); +ubidi_open(void); /** * Allocate a UBiDi structure with preallocated memory diff --git a/icu4c/source/common/ucnv_io.h b/icu4c/source/common/ucnv_io.h index 5ca4e5664c..cba15fe01a 100644 --- a/icu4c/source/common/ucnv_io.h +++ b/icu4c/source/common/ucnv_io.h @@ -91,7 +91,7 @@ ucnv_io_fillAvailableAliases(const char **aliases, UErrorCode *pErrorCode); * This name is already resolved by ucnv_io_getConverterName(). */ U_CFUNC const char * -ucnv_io_getDefaultConverterName(); +ucnv_io_getDefaultConverterName(void); /** * Set the name of the default converter. diff --git a/icu4c/source/common/utypes.h b/icu4c/source/common/utypes.h index 94b3b91979..d1e41b622d 100644 --- a/icu4c/source/common/utypes.h +++ b/icu4c/source/common/utypes.h @@ -32,7 +32,9 @@ #ifndef UTYPES_H #define UTYPES_H +#ifndef __OS400__ #include +#endif #include #include diff --git a/icu4c/source/common/uvector.cpp b/icu4c/source/common/uvector.cpp index 9c1e0cb47a..df7c29699d 100644 --- a/icu4c/source/common/uvector.cpp +++ b/icu4c/source/common/uvector.cpp @@ -95,7 +95,7 @@ bool_t UVector::removeElement(void* obj) { return FALSE; } -void UVector::removeAllElements() { +void UVector::removeAllElements(void) { if (deleter != 0) { for (int32_t i=0; i= 0; } -inline void* UVector::firstElement() const { +inline void* UVector::firstElement(void) const { return elementAt(0); } -inline void* UVector::lastElement() const { +inline void* UVector::lastElement(void) const { return elementAt(count-1); } @@ -238,11 +238,11 @@ inline UVector& UVector::operator=(const UVector&) { // UStack inlines -inline bool_t UStack::empty() const { +inline bool_t UStack::empty(void) const { return isEmpty(); } -inline void* UStack::peek() const { +inline void* UStack::peek(void) const { return lastElement(); } diff --git a/icu4c/source/extra/ustdio/locbund.c b/icu4c/source/extra/ustdio/locbund.c index edab997b27..c8e7ca9ec2 100644 --- a/icu4c/source/extra/ustdio/locbund.c +++ b/icu4c/source/extra/ustdio/locbund.c @@ -20,7 +20,7 @@ */ #include "locbund.h" - +#include "string.h" #include "ustring.h" #include "uloc.h" diff --git a/icu4c/source/extra/ustdio/uprintf.c b/icu4c/source/extra/ustdio/uprintf.c index d51396e1a4..571f1770a4 100644 --- a/icu4c/source/extra/ustdio/uprintf.c +++ b/icu4c/source/extra/ustdio/uprintf.c @@ -1434,7 +1434,7 @@ u_printf_spellout_handler(UFILE *stream, } void -u_printf_init() +u_printf_init(void) { int32_t i; /*Mutex *lock;*/ diff --git a/icu4c/source/extra/ustdio/uscanf.c b/icu4c/source/extra/ustdio/uscanf.c index 35530fabc6..7e7131c174 100644 --- a/icu4c/source/extra/ustdio/uscanf.c +++ b/icu4c/source/extra/ustdio/uscanf.c @@ -1237,7 +1237,7 @@ u_scanf_scanset_handler(UFILE *stream, } void -u_scanf_init() +u_scanf_init(void) { int32_t i; /*Mutex *lock;*/ diff --git a/icu4c/source/i18n/cpdtrans.cpp b/icu4c/source/i18n/cpdtrans.cpp index 31e3a21bdc..ac37f32258 100644 --- a/icu4c/source/i18n/cpdtrans.cpp +++ b/icu4c/source/i18n/cpdtrans.cpp @@ -53,7 +53,7 @@ CompoundTransliterator::~CompoundTransliterator() { freeTransliterators(); } -void CompoundTransliterator::freeTransliterators() { +void CompoundTransliterator::freeTransliterators(void) { for (int32_t i=0; igetMaximumContextLength(); diff --git a/icu4c/source/i18n/cpdtrans.h b/icu4c/source/i18n/cpdtrans.h index ed879774d4..4886463e0b 100644 --- a/icu4c/source/i18n/cpdtrans.h +++ b/icu4c/source/i18n/cpdtrans.h @@ -32,7 +32,7 @@ *

Copyright © IBM Corporation 1999. All rights reserved. * * @author Alan Liu - * @version $RCSfile: cpdtrans.h,v $ $Revision: 1.1 $ $Date: 1999/11/20 00:36:43 $ + * @version $RCSfile: cpdtrans.h,v $ $Revision: 1.2 $ $Date: 1999/12/22 22:52:18 $ */ class U_I18N_API CompoundTransliterator : public Transliterator { @@ -80,13 +80,13 @@ public: /** * Transliterator API. */ - Transliterator* clone() const; + Transliterator* clone(void) const; /** * Returns the number of transliterators in this chain. * @return number of transliterators in this chain. */ - virtual int32_t getCount() const; + virtual int32_t getCount(void) const; /** * Returns the transliterator at the given index in this chain. @@ -124,10 +124,10 @@ public: * @return maximum number of preceding context characters this * transliterator needs to examine */ - virtual int32_t getMaximumContextLength() const; + virtual int32_t getMaximumContextLength(void) const; private: - void freeTransliterators(); + void freeTransliterators(void); }; #endif diff --git a/icu4c/source/i18n/decimfmt.cpp b/icu4c/source/i18n/decimfmt.cpp index 408f980547..ba2f5dda7a 100644 --- a/icu4c/source/i18n/decimfmt.cpp +++ b/icu4c/source/i18n/decimfmt.cpp @@ -1739,7 +1739,7 @@ DecimalFormat::toLocalizedPattern(UnicodeString& result) const * called any time the symbols or the affix patterns change in order to keep * the expanded affix strings up to date. */ -void DecimalFormat::expandAffixes() { +void DecimalFormat::expandAffixes(void) { if (fPosPrefixPattern != 0) { expandAffix(*fPosPrefixPattern, fPositivePrefix); } diff --git a/icu4c/source/i18n/decimfmt.h b/icu4c/source/i18n/decimfmt.h index 1049f57f70..1e0b0a511a 100644 --- a/icu4c/source/i18n/decimfmt.h +++ b/icu4c/source/i18n/decimfmt.h @@ -882,7 +882,7 @@ private: void expandAffix(const UnicodeString& pattern, UnicodeString& affix) const; - void expandAffixes(); + void expandAffixes(void); static double round(double a, ERoundingMode mode, bool_t isNegative); diff --git a/icu4c/source/i18n/hextouni.cpp b/icu4c/source/i18n/hextouni.cpp index 598d777da6..536d34922f 100644 --- a/icu4c/source/i18n/hextouni.cpp +++ b/icu4c/source/i18n/hextouni.cpp @@ -43,7 +43,7 @@ HexToUnicodeTransliterator& HexToUnicodeTransliterator::operator=( /** * Transliterator API. */ -Transliterator* HexToUnicodeTransliterator::clone() const { +Transliterator* HexToUnicodeTransliterator::clone(void) const { return new HexToUnicodeTransliterator(*this); } @@ -150,6 +150,6 @@ UChar HexToUnicodeTransliterator::filteredCharAt(Replaceable& text, int32_t i) c * @return maximum number of preceding context characters this * transliterator needs to examine */ -int32_t HexToUnicodeTransliterator::getMaximumContextLength() const { +int32_t HexToUnicodeTransliterator::getMaximumContextLength(void) const { return 0; } diff --git a/icu4c/source/i18n/hextouni.h b/icu4c/source/i18n/hextouni.h index da90ce9592..460d270cfe 100644 --- a/icu4c/source/i18n/hextouni.h +++ b/icu4c/source/i18n/hextouni.h @@ -20,7 +20,7 @@ *

Copyright © IBM Corporation 1999. All rights reserved. * * @author Alan Liu - * @version $RCSfile: hextouni.h,v $ $Revision: 1.2 $ $Date: 1999/11/22 21:47:26 $ + * @version $RCSfile: hextouni.h,v $ $Revision: 1.3 $ $Date: 1999/12/22 22:52:18 $ */ class U_I18N_API HexToUnicodeTransliterator : public Transliterator { @@ -54,7 +54,7 @@ public: /** * Transliterator API. */ - Transliterator* clone() const; + Transliterator* clone(void) const; /** * Transliterates a segment of a string. Transliterator API. @@ -81,7 +81,7 @@ public: * @return maximum number of preceding context characters this * transliterator needs to examine */ - virtual int32_t getMaximumContextLength() const; + virtual int32_t getMaximumContextLength(void) const; private: diff --git a/icu4c/source/i18n/rbbi.cpp b/icu4c/source/i18n/rbbi.cpp index 2c748089d3..05ea65b863 100644 --- a/icu4c/source/i18n/rbbi.cpp +++ b/icu4c/source/i18n/rbbi.cpp @@ -55,7 +55,7 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(const UnicodeString& description) * @return A newly-constructed RuleBasedBreakIterator with the same * behavior as this one. */ -RuleBasedBreakIterator* RuleBasedBreakIterator::clone() const { +RuleBasedBreakIterator* RuleBasedBreakIterator::clone(void) const { return new RuleBasedBreakIterator(*this); } @@ -71,7 +71,7 @@ bool_t RuleBasedBreakIterator::operator==(const RuleBasedBreakIterator& that) { /** * Returns the description used to create this iterator */ -UnicodeString RuleBasedBreakIterator::toString() { +UnicodeString RuleBasedBreakIterator::toString(void) { return description; } @@ -79,7 +79,7 @@ UnicodeString RuleBasedBreakIterator::toString() { * Compute a hashcode for this BreakIterator * @return A hash code */ -int32_t RuleBasedBreakIterator::hashCode() { +int32_t RuleBasedBreakIterator::hashCode(void) { return description.hashCode(); } @@ -91,7 +91,7 @@ int32_t RuleBasedBreakIterator::hashCode() { * (i.e., the CharacterIterator's starting offset). * @return The offset of the beginning of the text. */ -int32_t RuleBasedBreakIterator::first() { +int32_t RuleBasedBreakIterator::first(void) { CharacterIterator t = getText(); t.first(); @@ -103,7 +103,7 @@ int32_t RuleBasedBreakIterator::first() { * (i.e., the CharacterIterator's ending offset). * @return The text's past-the-end offset. */ -int32_t RuleBasedBreakIterator::last() { +int32_t RuleBasedBreakIterator::last(void) { CharacterIterator t = getText(); // I'm not sure why, but t.last() returns the offset of the last character, @@ -138,7 +138,7 @@ int32_t RuleBasedBreakIterator::next(int32_t n) { * Advances the iterator to the next boundary position. * @return The position of the first boundary after this one. */ -int32_t RuleBasedBreakIterator::next() { +int32_t RuleBasedBreakIterator::next(void) { return handleNext(); } @@ -146,7 +146,7 @@ int32_t RuleBasedBreakIterator::next() { * Advances the iterator backwards, to the last boundary preceding this one. * @return The position of the last boundary position preceding this one. */ -int32_t RuleBasedBreakIterator::previous() { +int32_t RuleBasedBreakIterator::previous(void) { // if we're already sitting at the beginning of the text, return DONE CharacterIterator text = getText(); if (current() == text.getBeginIndex()) @@ -248,7 +248,7 @@ bool_t RuleBasedBreakIterator::isBoundary(int32_t offset) { * Returns the current iteration position. * @return The current iteration position. */ -int32_t RuleBasedBreakIterator::current() { +int32_t RuleBasedBreakIterator::current(void) { return getText().getIndex(); } @@ -259,7 +259,7 @@ int32_t RuleBasedBreakIterator::current() { * you need to change it, clone it first. * @return An iterator over the text being analyzed. */ -CharacterIterator RuleBasedBreakIterator::getText() { +CharacterIterator RuleBasedBreakIterator::getText(void) { // The iterator is initialized pointing to no text at all, so if this // function is called while we're in that state, we have to fudge an // an iterator to return. @@ -287,7 +287,7 @@ void RuleBasedBreakIterator::setText(CharacterIterator newText) { * of the text or the state machine transitions to state 0. We update our return * value every time the state machine passes through a possible end state. */ -int32_t RuleBasedBreakIterator::handleNext() { +int32_t RuleBasedBreakIterator::handleNext(void) { // if we're already at the end of the text, return DONE. CharacterIterator text = getText(); if (text.getIndex() == text.getEndIndex()) @@ -331,7 +331,7 @@ int32_t RuleBasedBreakIterator::handleNext() { * the appropriate position to return. (For more information, see the description * of buildBackwardsStateTable() in RuleBasedBreakIterator.Builder.) */ -int32_t RuleBasedBreakIterator::handlePrevious() { +int32_t RuleBasedBreakIterator::handlePrevious(void) { CharacterIterator text = getText(); int32_t state = START_STATE; int32_t category = 0; diff --git a/icu4c/source/i18n/rbbi.h b/icu4c/source/i18n/rbbi.h index 13387573e0..50113f7b99 100644 --- a/icu4c/source/i18n/rbbi.h +++ b/icu4c/source/i18n/rbbi.h @@ -259,7 +259,7 @@ public: * @return A newly-constructed RuleBasedBreakIterator with the same * behavior as this one. */ - virtual Object clone(); + virtual Object clone(void); /** * Returns true if both BreakIterators are of the same class, have the same @@ -270,13 +270,13 @@ public: /** * Returns the description used to create this iterator */ - virtual UnicodeString toString(); + virtual UnicodeString toString(void); /** * Compute a hashcode for this BreakIterator * @return A hash code */ - virtual int32_t hashCode(); + virtual int32_t hashCode(void); //======================================================================= // BreakIterator overrides //======================================================================= @@ -285,14 +285,14 @@ public: * (i.e., the CharacterIterator's starting offset). * @return The offset of the beginning of the text. */ - virtual int32_t first(); + virtual int32_t first(void); /** * Sets the current iteration position to the end of the text. * (i.e., the CharacterIterator's ending offset). * @return The text's past-the-end offset. */ - virtual int32_t last(); + virtual int32_t last(void); /** * Advances the iterator either forward or backward the specified number of steps. @@ -309,13 +309,13 @@ public: * Advances the iterator to the next boundary position. * @return The position of the first boundary after this one. */ - virtual int32_t next(); + virtual int32_t next(void); /** * Advances the iterator backwards, to the last boundary preceding this one. * @return The position of the last boundary position preceding this one. */ - virtual int32_t previous(); + virtual int32_t previous(void); /** * Sets the iterator to refer to the first boundary position following @@ -346,7 +346,7 @@ public: * Returns the current iteration position. * @return The current iteration position. */ - virtual int32_t current(); + virtual int32_t current(void); /** * Return a CharacterIterator over the text being analyzed. This version @@ -355,7 +355,7 @@ public: * you need to change it, clone it first. * @return An iterator over the text being analyzed. */ - virtual CharacterIterator getText(); + virtual CharacterIterator getText(void); /** * Set the iterator to analyze a new piece of text. This function resets @@ -375,7 +375,7 @@ protected: * of the text or the state machine transitions to state 0. We update our return * value every time the state machine passes through a possible end state. */ - virtual int32_t handleNext(); + virtual int32_t handleNext(void); /** * This method backs the iterator back up to a "safe position" in the text. @@ -384,7 +384,7 @@ protected: * the appropriate position to return. (For more information, see the description * of buildBackwardsStateTable() in RuleBasedBreakIterator.Builder.) */ - virtual int32_t handlePrevious(); + virtual int32_t handlePrevious(void); /** * Looks up a character's category (i.e., its category for breaking purposes, diff --git a/icu4c/source/i18n/rbbi_bld.cpp b/icu4c/source/i18n/rbbi_bld.cpp index 1b82f6e172..2d4c67e2bf 100644 --- a/icu4c/source/i18n/rbbi_bld.cpp +++ b/icu4c/source/i18n/rbbi_bld.cpp @@ -47,7 +47,7 @@ RuleBasedBreakIteratorBuilder::RuleBasedBreakIteratorBuilder() { * This is the main function for setting up the BreakIterator's tables. It * just vectors different parts of the job off to other functions. */ -void RuleBasedBreakIteratorBuilder::buildBreakIterator() { +void RuleBasedBreakIteratorBuilder::buildBreakIterator(void) { Vector tempRuleList = buildRuleList(description); buildCharCategories(tempRuleList); buildStateTable(tempRuleList); @@ -1274,7 +1274,7 @@ void RuleBasedBreakIteratorBuilder::eliminateBackfillStates(int32_t baseState) { * This function completes the backfilling process by actually doing the * backfilling on the states that are marked for it */ -void RuleBasedBreakIteratorBuilder::backfillLoopingStates() { +void RuleBasedBreakIteratorBuilder::backfillLoopingStates(void) { int16_t* state; int16_t* loopingState = 0; int32_t loopingStateRowNum = 0; diff --git a/icu4c/source/i18n/rbbi_bld.h b/icu4c/source/i18n/rbbi_bld.h index 44ebc6f244..9c2f8d6308 100644 --- a/icu4c/source/i18n/rbbi_bld.h +++ b/icu4c/source/i18n/rbbi_bld.h @@ -115,7 +115,7 @@ public: * This is the main function for setting up the BreakIterator's tables. It * just UVectors different parts of the job off to other functions. */ - virtual void buildBreakIterator(); + virtual void buildBreakIterator(void); private: @@ -249,7 +249,7 @@ private: * This function completes the backfilling process by actually doing the * backfilling on the states that are marked for it */ - virtual void backfillLoopingStates(); + virtual void backfillLoopingStates(void); /** * This function completes the state-table-building process by doing several diff --git a/icu4c/source/i18n/rbt.cpp b/icu4c/source/i18n/rbt.cpp index 82b0002a69..bff653efe2 100644 --- a/icu4c/source/i18n/rbt.cpp +++ b/icu4c/source/i18n/rbt.cpp @@ -53,7 +53,7 @@ RuleBasedTransliterator::~RuleBasedTransliterator() { } Transliterator* // Covariant return NOT ALLOWED (for portability) -RuleBasedTransliterator::clone() const { +RuleBasedTransliterator::clone(void) const { return new RuleBasedTransliterator(*this); } @@ -229,6 +229,6 @@ RuleBasedTransliterator::handleKeyboardTransliterate(Replaceable& text, * @return Maximum number of preceding context characters this * transliterator needs to examine */ -int32_t RuleBasedTransliterator::getMaximumContextLength() const { +int32_t RuleBasedTransliterator::getMaximumContextLength(void) const { return data->ruleSet.getMaximumContextLength(); } diff --git a/icu4c/source/i18n/rbt.h b/icu4c/source/i18n/rbt.h index 616bf0f8ce..98212f994b 100644 --- a/icu4c/source/i18n/rbt.h +++ b/icu4c/source/i18n/rbt.h @@ -272,7 +272,7 @@ public: /** * Implement Transliterator API. */ - Transliterator* clone() const; + Transliterator* clone(void) const; /** * Transliterates a segment of a string. Transliterator API. @@ -312,7 +312,7 @@ public: * @return Maximum number of preceding context characters this * transliterator needs to examine */ - virtual int32_t getMaximumContextLength() const; + virtual int32_t getMaximumContextLength(void) const; private: diff --git a/icu4c/source/i18n/rbt_pars.cpp b/icu4c/source/i18n/rbt_pars.cpp index b38f011fc2..088a3c969a 100644 --- a/icu4c/source/i18n/rbt_pars.cpp +++ b/icu4c/source/i18n/rbt_pars.cpp @@ -73,7 +73,7 @@ TransliterationRuleParser::TransliterationRuleParser( * @exception IllegalArgumentException if there is a syntax error in the * rules */ -void TransliterationRuleParser::parseRules() { +void TransliterationRuleParser::parseRules(void) { status = U_ZERO_ERROR; delete data; @@ -551,7 +551,7 @@ void TransliterationRuleParser::validateVariableName(const UnicodeString& name) * When done, everything not in the hash is available for use. In practice, * this method may employ some other algorithm for improved speed. */ -void TransliterationRuleParser::determineVariableRange() { +void TransliterationRuleParser::determineVariableRange(void) { UnicodeRange privateUse(0xE000, 0x1900); // Private use area UnicodeRange* r = privateUse.largestUnusedSubrange(rules); diff --git a/icu4c/source/i18n/rbt_pars.h b/icu4c/source/i18n/rbt_pars.h index bbbe4cfa77..1f0c04b5eb 100644 --- a/icu4c/source/i18n/rbt_pars.h +++ b/icu4c/source/i18n/rbt_pars.h @@ -97,7 +97,7 @@ private: * @exception IllegalArgumentException if there is a syntax error in the * rules */ - void parseRules(); + void parseRules(void); /** * Parse the given substring as a rule, and append it to the rules currently @@ -242,7 +242,7 @@ private: * When done, everything not in the hash is available for use. In practice, * this method may employ some other algorithm for improved speed. */ - void determineVariableRange(); + void determineVariableRange(void); /** * Returns the index of the first character in a set, ignoring quoted text. diff --git a/icu4c/source/i18n/rbt_rule.cpp b/icu4c/source/i18n/rbt_rule.cpp index c4b7565a47..311fb8a059 100644 --- a/icu4c/source/i18n/rbt_rule.cpp +++ b/icu4c/source/i18n/rbt_rule.cpp @@ -76,7 +76,7 @@ TransliterationRule::~TransliterationRule() { * Return the length of the key. Equivalent to getKey().length(). * @return the length of the match key. */ -int32_t TransliterationRule::getKeyLength() const { +int32_t TransliterationRule::getKeyLength(void) const { return key.length(); } @@ -84,7 +84,7 @@ int32_t TransliterationRule::getKeyLength() const { * Return the key. * @return the match key. */ -const UnicodeString& TransliterationRule::getKey() const { +const UnicodeString& TransliterationRule::getKey(void) const { return key; } @@ -92,7 +92,7 @@ const UnicodeString& TransliterationRule::getKey() const { * Return the output string. * @return the output string. */ -const UnicodeString& TransliterationRule::getOutput() const { +const UnicodeString& TransliterationRule::getOutput(void) const { return output; } @@ -100,7 +100,7 @@ const UnicodeString& TransliterationRule::getOutput() const { * Return the position of the cursor within the output string. * @return a value from 0 to getOutput().length(), inclusive. */ -int32_t TransliterationRule::getCursorPos() const { +int32_t TransliterationRule::getCursorPos(void) const { return cursorPos; } @@ -109,7 +109,7 @@ int32_t TransliterationRule::getCursorPos() const { * support the Transliterator method * getMaximumContextLength(). */ -int32_t TransliterationRule::getAnteContextLength() const { +int32_t TransliterationRule::getAnteContextLength(void) const { return anteContext.length(); } @@ -152,7 +152,7 @@ bool_t TransliterationRule::masks(const TransliterationRule& r2) const { * Free up space. Once this method is called, masks() must NOT be called. * If it is called, an exception will be thrown. */ -void TransliterationRule::freeze() { +void TransliterationRule::freeze(void) { delete maskKey; maskKey = 0; } diff --git a/icu4c/source/i18n/rbt_rule.h b/icu4c/source/i18n/rbt_rule.h index 8b5f58e0a0..26d5d9b70b 100644 --- a/icu4c/source/i18n/rbt_rule.h +++ b/icu4c/source/i18n/rbt_rule.h @@ -143,32 +143,32 @@ public: * Return the length of the key. Equivalent to getKey().length(). * @return the length of the match key. */ - virtual int32_t getKeyLength() const; + virtual int32_t getKeyLength(void) const; /** * Return the key. * @return the match key. */ - virtual const UnicodeString& getKey() const; + virtual const UnicodeString& getKey(void) const; /** * Return the output string. * @return the output string. */ - virtual const UnicodeString& getOutput() const; + virtual const UnicodeString& getOutput(void) const; /** * Return the position of the cursor within the output string. * @return a value from 0 to getOutput().length(), inclusive. */ - virtual int32_t getCursorPos() const; + virtual int32_t getCursorPos(void) const; /** * Return the preceding context length. This method is needed to * support the Transliterator method * getMaximumContextLength(). */ - virtual int32_t getAnteContextLength() const; + virtual int32_t getAnteContextLength(void) const; /** * Return true if this rule masks another rule. If r1 masks r2 then @@ -184,7 +184,7 @@ public: * Free up space. Once this method is called, masks() must NOT be called. * If it is called, an exception will be thrown. */ - virtual void freeze(); + virtual void freeze(void); /** * Return true if this rule matches the given text. The text being matched diff --git a/icu4c/source/i18n/rbt_set.cpp b/icu4c/source/i18n/rbt_set.cpp index e3cc82610e..47a82207a3 100644 --- a/icu4c/source/i18n/rbt_set.cpp +++ b/icu4c/source/i18n/rbt_set.cpp @@ -36,7 +36,7 @@ TransliterationRuleSet::TransliterationRuleSet() { * Return the maximum context length. * @return the length of the longest preceding context. */ -int32_t TransliterationRuleSet::getMaximumContextLength() const { +int32_t TransliterationRuleSet::getMaximumContextLength(void) const { return maxContextLength; } @@ -80,7 +80,7 @@ void TransliterationRuleSet::addRule(TransliterationRule* adoptedRule, * Free up space. Once this method is called, addRule() must NOT * be called again. */ -void TransliterationRuleSet::freeze() { +void TransliterationRuleSet::freeze(void) { for (int32_t i=0; ifreeze(); } diff --git a/icu4c/source/i18n/rbt_set.h b/icu4c/source/i18n/rbt_set.h index b406164bf4..d6602bc4ba 100644 --- a/icu4c/source/i18n/rbt_set.h +++ b/icu4c/source/i18n/rbt_set.h @@ -50,7 +50,7 @@ public: * Return the maximum context length. * @return the length of the longest preceding context. */ - virtual int32_t getMaximumContextLength() const; + virtual int32_t getMaximumContextLength(void) const; /** * Add a rule to this set. Rules are added in order, and order is @@ -66,7 +66,7 @@ public: * Free up space. Once this method is called, addRule() must NOT * be called again. */ - virtual void freeze(); + virtual void freeze(void); /** * Attempt to find a matching rule at the specified point in the text. The diff --git a/icu4c/source/i18n/translit.cpp b/icu4c/source/i18n/translit.cpp index 12268635a7..99e83845d5 100644 --- a/icu4c/source/i18n/translit.cpp +++ b/icu4c/source/i18n/translit.cpp @@ -344,7 +344,7 @@ void Transliterator::_keyboardTransliterate(Replaceable& text, * @return The maximum number of preceding context characters this * transliterator needs to examine */ -int32_t Transliterator::getMaximumContextLength() const { +int32_t Transliterator::getMaximumContextLength(void) const { return 0; } @@ -355,7 +355,7 @@ int32_t Transliterator::getMaximumContextLength() const { * @see #registerInstance * @see #getAvailableIDs */ -const UnicodeString& Transliterator::getID() const { +const UnicodeString& Transliterator::getID(void) const { return ID; } @@ -455,7 +455,7 @@ UnicodeString& Transliterator::getDisplayName(const Locale& inLocale, * if this transliterator uses no filter. Caller musn't delete * the result! */ -const UnicodeFilter* Transliterator::getFilter() const { +const UnicodeFilter* Transliterator::getFilter(void) const { return filter; } @@ -492,7 +492,7 @@ void Transliterator::adoptFilter(UnicodeFilter* filterToAdopt) { * transliterator is registered. * @see #registerInstance */ -Transliterator* Transliterator::createInverse() const { +Transliterator* Transliterator::createInverse(void) const { int32_t i = ID.indexOf((UChar)'-'); if (i >= 0) { UnicodeString inverseID, right; @@ -540,7 +540,7 @@ const char* Transliterator::RESOURCE_SUB_DIR = "translit"; * files are located. This is a subdirectory, named RESOURCE_SUB_DIR, * under Locale::getDataDirectory(). It ends in a path separator. */ -const char* Transliterator::getDataDirectory() { +const char* Transliterator::getDataDirectory(void) { if (DATA_DIR == 0) { Mutex lock; // Okay to use the global mutex here if (DATA_DIR == 0) { @@ -759,7 +759,7 @@ UVector Transliterator::cacheIDs; * To retrieve the actual IDs, call getAvailableID(i) with * i from 0 to countAvailableIDs() - 1. */ -int32_t Transliterator::countAvailableIDs() { +int32_t Transliterator::countAvailableIDs(void) { if (!cacheInitialized) { initializeCache(); } @@ -793,7 +793,7 @@ bool_t Transliterator::compareIDs(void* a, void* b) { return *aa == *bb; } -void Transliterator::initializeCache() { +void Transliterator::initializeCache(void) { // Lock first, check init boolean second Mutex lock(&cacheMutex); if (cacheInitialized) { diff --git a/icu4c/source/i18n/translit.h b/icu4c/source/i18n/translit.h index 24aa5bad11..749fa0b264 100644 --- a/icu4c/source/i18n/translit.h +++ b/icu4c/source/i18n/translit.h @@ -634,7 +634,7 @@ public: * @return The maximum number of preceding context characters this * transliterator needs to examine */ - virtual int32_t getMaximumContextLength() const; + virtual int32_t getMaximumContextLength(void) const; /** * Returns a programmatic identifier for this transliterator. @@ -644,7 +644,7 @@ public: * @see #registerClass * @see #getAvailableIDs */ - virtual const UnicodeString& getID() const; + virtual const UnicodeString& getID(void) const; /** * Returns a name for this transliterator that is appropriate for @@ -678,7 +678,7 @@ public: * Returns the filter used by this transliterator, or null * if this transliterator uses no filter. */ - virtual const UnicodeFilter* getFilter() const; + virtual const UnicodeFilter* getFilter(void) const; /** * Changes the filter used by this transliterator. If the filter @@ -710,7 +710,7 @@ public: * transliterator is registered. * @see #registerInstance */ - virtual Transliterator* createInverse() const; + virtual Transliterator* createInverse(void) const; /** * Returns a Transliterator object given its ID. @@ -747,7 +747,7 @@ private: * files are located. This is a subdirectory, named RESOURCE_SUB_DIR, * under Locale::getDataDirectory(). It ends in a path separator. */ - static const char* getDataDirectory(); + static const char* getDataDirectory(void); static int32_t hash(const UnicodeString& str); @@ -835,7 +835,7 @@ public: * To retrieve the actual IDs, call getAvailableID(i) with * i from 0 to countAvailableIDs() - 1. */ - static int32_t countAvailableIDs(); + static int32_t countAvailableIDs(void); /** * Return the index-th available ID. index must be between 0 @@ -851,7 +851,7 @@ private: */ static bool_t compareIDs(void* a, void* b); - static void initializeCache(); + static void initializeCache(void); }; #endif diff --git a/icu4c/source/i18n/uniset.cpp b/icu4c/source/i18n/uniset.cpp index 4422f9bd44..799599ce43 100644 --- a/icu4c/source/i18n/uniset.cpp +++ b/icu4c/source/i18n/uniset.cpp @@ -32,7 +32,7 @@ UnicodeString* UnicodeSet::CATEGORY_PAIRS_CACHE = * ranges. Ranges are listed in ascending Unicode order. For * example, the set [a-zA-M3] is represented as "33AMaz". */ -const UnicodeString& UnicodeSet::getPairs() const { +const UnicodeString& UnicodeSet::getPairs(void) const { return pairs; } @@ -122,7 +122,7 @@ bool_t UnicodeSet::operator==(const UnicodeSet& o) const { * @return the hash code value for this set. * @see Object#hashCode() */ -int32_t UnicodeSet::hashCode() const { +int32_t UnicodeSet::hashCode(void) const { return pairs.hashCode(); } @@ -212,7 +212,7 @@ UnicodeString& UnicodeSet::toPattern(UnicodeString& result) const { * * @return the number of elements in this set (its cardinality). */ -int32_t UnicodeSet::size() const { +int32_t UnicodeSet::size(void) const { int32_t n = 0; for (int32_t i=0; itrue if this set contains no elements. */ -bool_t UnicodeSet::isEmpty() const { +bool_t UnicodeSet::isEmpty(void) const { return pairs.length() == 0; } @@ -375,7 +375,7 @@ void UnicodeSet::removeAll(const UnicodeSet& c) { * its value is its complement. This is equivalent to the pseudo code: * this = new UnicodeSet("[\u0000-\uFFFF]").removeAll(this). */ -void UnicodeSet::complement() { +void UnicodeSet::complement(void) { doComplement(pairs); } @@ -383,7 +383,7 @@ void UnicodeSet::complement() { * Removes all of the elements from this set. This set will be * empty after this call returns. */ -void UnicodeSet::clear() { +void UnicodeSet::clear(void) { pairs.remove(); } diff --git a/icu4c/source/i18n/uniset.h b/icu4c/source/i18n/uniset.h index d1f445f6c1..628736b794 100644 --- a/icu4c/source/i18n/uniset.h +++ b/icu4c/source/i18n/uniset.h @@ -214,7 +214,7 @@ public: * ranges. Ranges are listed in ascending Unicode order. For * example, the set [a-zA-M3] is represented as "33AMaz". */ - const UnicodeString& getPairs() const; + const UnicodeString& getPairs(void) const; //---------------------------------------------------------------- // Constructors &c @@ -300,7 +300,7 @@ public: * @return the hash code value for this set. * @see Object#hashCode() */ - virtual int32_t hashCode() const; + virtual int32_t hashCode(void) const; //---------------------------------------------------------------- // Public API @@ -348,14 +348,14 @@ public: * * @return the number of elements in this set (its cardinality). */ - virtual int32_t size() const; + virtual int32_t size(void) const; /** * Returns true if this set contains no elements. * * @return true if this set contains no elements. */ - virtual bool_t isEmpty() const; + virtual bool_t isEmpty(void) const; /** * Returns true if this set contains the specified range @@ -462,13 +462,13 @@ public: * its value is its complement. This is equivalent to the pseudo code: * this = new CharSet("[\u0000-\uFFFF]").removeAll(this). */ - virtual void complement(); + virtual void complement(void); /** * Removes all of the elements from this set. This set will be * empty after this call returns. */ - virtual void clear(); + virtual void clear(void); //---------------------------------------------------------------- // Implementation: Pattern parsing diff --git a/icu4c/source/i18n/unitohex.cpp b/icu4c/source/i18n/unitohex.cpp index d1915c32b9..73cffafdb7 100644 --- a/icu4c/source/i18n/unitohex.cpp +++ b/icu4c/source/i18n/unitohex.cpp @@ -68,7 +68,7 @@ UnicodeToHexTransliterator::operator=(const UnicodeToHexTransliterator& other) { } Transliterator* -UnicodeToHexTransliterator::clone() const { +UnicodeToHexTransliterator::clone(void) const { return new UnicodeToHexTransliterator(*this); } @@ -76,7 +76,7 @@ UnicodeToHexTransliterator::clone() const { * Returns the string that precedes the four hex digits. * @return prefix string */ -const UnicodeString& UnicodeToHexTransliterator::getPrefix() const { +const UnicodeString& UnicodeToHexTransliterator::getPrefix(void) const { return prefix; } @@ -95,7 +95,7 @@ void UnicodeToHexTransliterator::setPrefix(const UnicodeString& hexPrefix) { /** * Returns true if this transliterator outputs uppercase hex digits. */ -bool_t UnicodeToHexTransliterator::isUppercase() const { +bool_t UnicodeToHexTransliterator::isUppercase(void) const { return uppercase; } @@ -170,7 +170,7 @@ void UnicodeToHexTransliterator::handleKeyboardTransliterate(Replaceable& text, * @return maximum number of preceding context characters this * transliterator needs to examine */ -int32_t UnicodeToHexTransliterator::getMaximumContextLength() { +int32_t UnicodeToHexTransliterator::getMaximumContextLength(void) { return 0; } diff --git a/icu4c/source/i18n/unitohex.h b/icu4c/source/i18n/unitohex.h index 6084a13d80..64a60e39f4 100644 --- a/icu4c/source/i18n/unitohex.h +++ b/icu4c/source/i18n/unitohex.h @@ -76,13 +76,13 @@ public: /** * Transliterator API. */ - virtual Transliterator* clone() const; + virtual Transliterator* clone(void) const; /** * Returns the string that precedes the four hex digits. * @return prefix string */ - virtual const UnicodeString& getPrefix() const; + virtual const UnicodeString& getPrefix(void) const; /** * Sets the string that precedes the four hex digits. @@ -97,7 +97,7 @@ public: /** * Returns true if this transliterator outputs uppercase hex digits. */ - virtual bool_t isUppercase() const; + virtual bool_t isUppercase(void) const; /** * Sets if this transliterator outputs uppercase hex digits. @@ -134,7 +134,7 @@ public: * @return maximum number of preceding context characters this * transliterator needs to examine */ - virtual int32_t getMaximumContextLength(); + virtual int32_t getMaximumContextLength(void); private: diff --git a/icu4c/source/test/cintltst/callcoll.c b/icu4c/source/test/cintltst/callcoll.c index 60768d4411..4084874fa8 100644 --- a/icu4c/source/test/cintltst/callcoll.c +++ b/icu4c/source/test/cintltst/callcoll.c @@ -31,7 +31,7 @@ #include "callcoll.h" #include "ustring.h" #include -#include + static UCollator *myCollation; static const UChar DEFAULTRULEARRAY[] = { diff --git a/icu4c/source/test/cintltst/capitst.c b/icu4c/source/test/cintltst/capitst.c index 286265b1bb..ea4681da6c 100644 --- a/icu4c/source/test/cintltst/capitst.c +++ b/icu4c/source/test/cintltst/capitst.c @@ -24,7 +24,6 @@ #include "cintltst.h" #include "capitst.h" #include "ustring.h" -#include #include void addCollAPITest(TestNode** root) diff --git a/icu4c/source/test/cintltst/cbiditst.c b/icu4c/source/test/cintltst/cbiditst.c index e19c71a6a7..8f13075078 100644 --- a/icu4c/source/test/cintltst/cbiditst.c +++ b/icu4c/source/test/cintltst/cbiditst.c @@ -19,7 +19,6 @@ #include "cintltst.h" #include "utypes.h" -#include "cmemory.h" #include "uchar.h" #include "ubidi.h" #include "cbiditst.h" @@ -27,7 +26,7 @@ /* prototypes ---------------------------------------------------------------*/ extern void -doBiDiTest(); +doBiDiTest(void); static void doTests(UBiDi *pBiDi, UBiDi *pLine); @@ -238,7 +237,7 @@ testReordering(UBiDi *pBiDi, int testNumber) { ubidi_invertMap(visualMap1, logicalMap2, length); /* get them from the levels array, too */ - icu_memcpy(levels, ubidi_getLevels(pBiDi, &errorCode), length); + memcpy(levels, ubidi_getLevels(pBiDi, &errorCode), length); if(U_FAILURE(errorCode)) { log_err("ubidi_getLevels(tests[%d]): error %s\n", testNumber, myErrorName(errorCode)); return; diff --git a/icu4c/source/test/cintltst/ccurrtst.c b/icu4c/source/test/cintltst/ccurrtst.c index 136237761c..ac9c8fa68d 100644 --- a/icu4c/source/test/cintltst/ccurrtst.c +++ b/icu4c/source/test/cintltst/ccurrtst.c @@ -26,7 +26,6 @@ #include "ccurrtst.h" #include "ccolltst.h" #include "ustring.h" -#include #define ARRAY_LENGTH(array) (sizeof array / sizeof array[0]) diff --git a/icu4c/source/test/cintltst/cdantst.c b/icu4c/source/test/cintltst/cdantst.c index ad9acc3fdf..0918e43076 100644 --- a/icu4c/source/test/cintltst/cdantst.c +++ b/icu4c/source/test/cintltst/cdantst.c @@ -32,7 +32,7 @@ #include "cdantst.h" #include "ustring.h" #include -#include + static UCollator *myCollation; const static UChar testSourceCases[][MAX_TOKEN_LEN] = { {(UChar)0x004C /* 'L' */, (UChar)0x0075 /* 'u' */, (UChar)0x0063 /* 'c' */, (UChar)0x0000 /* '\0' */}, diff --git a/icu4c/source/test/cintltst/cdetst.c b/icu4c/source/test/cintltst/cdetst.c index 707305c620..b55ec79771 100644 --- a/icu4c/source/test/cintltst/cdetst.c +++ b/icu4c/source/test/cintltst/cdetst.c @@ -32,7 +32,7 @@ #include "ccolltst.h" #include "ustring.h" #include "string.h" -#include + static UCollator *myCollation; const static UChar testSourceCases[][MAX_TOKEN_LEN] = { diff --git a/icu4c/source/test/cintltst/cestst.c b/icu4c/source/test/cintltst/cestst.c index ff990a87c2..8ee38091c2 100644 --- a/icu4c/source/test/cintltst/cestst.c +++ b/icu4c/source/test/cintltst/cestst.c @@ -32,7 +32,7 @@ #include "ccolltst.h" #include "ustring.h" #include "string.h" -#include + static UCollator *myCollation; const static UChar testSourceCases[][MAX_TOKEN_LEN] = { {0x0062/*'a'*/, 0x006c/*'l'*/, 0x0069/*'i'*/, 0x0061/*'a'*/, 0x0073/*'s'*/, 0x0000}, diff --git a/icu4c/source/test/cintltst/cfintst.c b/icu4c/source/test/cintltst/cfintst.c index fe3c018ea1..50a53749b5 100644 --- a/icu4c/source/test/cintltst/cfintst.c +++ b/icu4c/source/test/cintltst/cfintst.c @@ -32,7 +32,7 @@ #include "cfintst.h" #include "ustring.h" #include "string.h" -#include + static UCollator *myCollation; const static UChar testSourceCases[][MAX_TOKEN_LEN] = { {0x0077/*'w'*/, 0x0061/*'a'*/, 0x0074/*'t'*/, 0x0000}, diff --git a/icu4c/source/test/cintltst/cfrtst.c b/icu4c/source/test/cintltst/cfrtst.c index 28e7b1ba93..64bf0fcc7f 100644 --- a/icu4c/source/test/cintltst/cfrtst.c +++ b/icu4c/source/test/cintltst/cfrtst.c @@ -32,7 +32,7 @@ #include "cfrtst.h" #include "ustring.h" #include "string.h" -#include + static UCollator *myCollation; const static UChar testSourceCases[][MAX_TOKEN_LEN] = { diff --git a/icu4c/source/test/cintltst/cg7coll.c b/icu4c/source/test/cintltst/cg7coll.c index 1b91c9eb09..a942782f41 100644 --- a/icu4c/source/test/cintltst/cg7coll.c +++ b/icu4c/source/test/cintltst/cg7coll.c @@ -49,7 +49,6 @@ #include "ustring.h" #include #include -#include const char* locales[8] = { diff --git a/icu4c/source/test/cintltst/citertst.c b/icu4c/source/test/cintltst/citertst.c index f73a8974f0..f2d0cf8660 100644 --- a/icu4c/source/test/cintltst/citertst.c +++ b/icu4c/source/test/cintltst/citertst.c @@ -29,8 +29,6 @@ #include "citertst.h" #include "ustring.h" -#include - #define ARRAY_LENGTH(array) (sizeof array / sizeof array[0]) static UErrorCode status = U_ZERO_ERROR; diff --git a/icu4c/source/test/cintltst/cjaptst.c b/icu4c/source/test/cintltst/cjaptst.c index 5c355c0783..4eda7910fa 100644 --- a/icu4c/source/test/cintltst/cjaptst.c +++ b/icu4c/source/test/cintltst/cjaptst.c @@ -32,7 +32,7 @@ #include "cjaptst.h" #include "ustring.h" #include "string.h" -#include + static UCollator *myCollation; const static UChar testSourceCases[][MAX_TOKEN_LEN] = { {0x0041/*'A'*/, 0x0300, 0x0301, 0x0000}, diff --git a/icu4c/source/test/cintltst/cnormtst.c b/icu4c/source/test/cintltst/cnormtst.c index bc883eae92..b7f1be7f5d 100644 --- a/icu4c/source/test/cintltst/cnormtst.c +++ b/icu4c/source/test/cintltst/cnormtst.c @@ -25,7 +25,6 @@ #include "cnormtst.h" #include "ccolltst.h" #include "ustring.h" -#include #define ARRAY_LENGTH(array) (sizeof (array) / sizeof (*array)) diff --git a/icu4c/source/test/cintltst/crestst.c b/icu4c/source/test/cintltst/crestst.c index e1c07fbad5..6f8135878d 100644 --- a/icu4c/source/test/cintltst/crestst.c +++ b/icu4c/source/test/cintltst/crestst.c @@ -35,7 +35,7 @@ #include "crestst.h" #include "ctest.h" -void TestFallback(); +void TestFallback(void); /*****************************************************************************/ diff --git a/icu4c/source/test/cintltst/cturtst.c b/icu4c/source/test/cintltst/cturtst.c index 46fccb4daa..2f1d86ef11 100644 --- a/icu4c/source/test/cintltst/cturtst.c +++ b/icu4c/source/test/cintltst/cturtst.c @@ -32,7 +32,6 @@ #include "cturtst.h" #include "ustring.h" #include "string.h" -#include static UCollator *myCollation; const static UChar testSourceCases[][MAX_TOKEN_LEN] = { diff --git a/icu4c/source/test/cintltst/encoll.c b/icu4c/source/test/cintltst/encoll.c index 8aa036e096..f89650e5ff 100644 --- a/icu4c/source/test/cintltst/encoll.c +++ b/icu4c/source/test/cintltst/encoll.c @@ -32,7 +32,7 @@ #include "ccolltst.h" #include "ustring.h" #include -#include + static UCollator *myCollation = NULL; const static UChar testSourceCases[][MAX_TOKEN_LEN] = { {(UChar)0x0061 /* 'a' */, (UChar)0x0062 /* 'b' */, 0}, diff --git a/icu4c/source/test/cintltst/eurocreg.c b/icu4c/source/test/cintltst/eurocreg.c index fda8d4f5ae..f1f0b4b1f6 100644 --- a/icu4c/source/test/cintltst/eurocreg.c +++ b/icu4c/source/test/cintltst/eurocreg.c @@ -4,7 +4,7 @@ #include "ucnv.h" #include -void TestEuroRegression(); +void TestEuroRegression(void); void addTestEuroRegression(TestNode** root) { addTest(root, &TestEuroRegression, "tsconv/eurocreg/TestEuroRegression"); diff --git a/icu4c/source/test/cintltst/nucnvtst.c b/icu4c/source/test/cintltst/nucnvtst.c index 3e73502d55..0e71ad9bb0 100644 --- a/icu4c/source/test/cintltst/nucnvtst.c +++ b/icu4c/source/test/cintltst/nucnvtst.c @@ -33,7 +33,7 @@ static void printSeq(const unsigned char* a, int len); static void printUSeq(const UChar* a, int len); void TestNewConvertWithBufferSizes(int32_t osize, int32_t isize) ; -void TestConverterTypesAndStarters(); +void TestConverterTypesAndStarters(void); #define NEW_MAX_BUFFER 999 @@ -73,7 +73,7 @@ void printUSeqErr(const UChar* a, int len) fprintf(stderr,"}\n"); } -void TestInBufSizes() +void TestInBufSizes(void) { TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,1); #if 0 @@ -88,7 +88,7 @@ void TestInBufSizes() #endif } -void TestOutBufSizes() +void TestOutBufSizes(void) { #if 0 TestNewConvertWithBufferSizes(NEW_MAX_BUFFER,NEW_MAX_BUFFER); diff --git a/icu4c/source/test/cintltst/susctest.c b/icu4c/source/test/cintltst/susctest.c index d5b90b5ff0..93fad95a09 100644 --- a/icu4c/source/test/cintltst/susctest.c +++ b/icu4c/source/test/cintltst/susctest.c @@ -732,8 +732,8 @@ segment_test(uint8_t *segment1, } -int -TestSCSU() +void +TestSCSU(void) { UChar *chars = 0; int32_t len = 0; @@ -826,8 +826,6 @@ TestSCSU() gTotalChars += len; i++; } - - return 0; } void diff --git a/icu4c/source/test/ieeetest/ieeetest.cpp b/icu4c/source/test/ieeetest/ieeetest.cpp index caa5433d77..e29ce45427 100644 --- a/icu4c/source/test/ieeetest/ieeetest.cpp +++ b/icu4c/source/test/ieeetest/ieeetest.cpp @@ -86,7 +86,7 @@ IEEETest::~IEEETest() //============================== int -IEEETest::run() +IEEETest::run(void) { int errCount = 0; @@ -143,7 +143,7 @@ IEEETest::runTest(const char *testName, // NaN is weird- comparisons with NaN _always_ return false, with the // exception of !=, which _always_ returns true int -IEEETest::testNaN() +IEEETest::testNaN(void) { int errCount = 0; @@ -161,7 +161,7 @@ IEEETest::testNaN() //============================== int -IEEETest::testPositiveInfinity() +IEEETest::testPositiveInfinity(void) { int errCount = 0; double pinf = icu_getInfinity(); @@ -209,7 +209,7 @@ IEEETest::testPositiveInfinity() //============================== int -IEEETest::testNegativeInfinity() +IEEETest::testNegativeInfinity(void) { int errCount = 0; double pinf = icu_getInfinity(); @@ -261,7 +261,7 @@ IEEETest::testNegativeInfinity() // -0.0 < 0.0 == FALSE // generating -0.0 must be done at runtime. compiler apparently ignores sign? int -IEEETest::testZero() +IEEETest::testZero(void) { int errCount = 0; double ten = 10.0; @@ -321,7 +321,7 @@ IEEETest::testZero() //============================== int -IEEETest::testIsNaN() +IEEETest::testIsNaN(void) { int numErrors = 0; double pinf = icu_getInfinity(); @@ -355,7 +355,7 @@ IEEETest::testIsNaN() //============================== int -IEEETest::NaNGT() +IEEETest::NaNGT(void) { double pinf = icu_getInfinity(); double ninf = -icu_getInfinity(); @@ -389,7 +389,7 @@ IEEETest::NaNGT() //============================== int -IEEETest::NaNLT() +IEEETest::NaNLT(void) { double pinf = icu_getInfinity(); double ninf = -icu_getInfinity(); @@ -423,7 +423,7 @@ IEEETest::NaNLT() //============================== int -IEEETest::NaNGTE() +IEEETest::NaNGTE(void) { double pinf = icu_getInfinity(); double ninf = -icu_getInfinity(); @@ -457,7 +457,7 @@ IEEETest::NaNGTE() //============================== int -IEEETest::NaNLTE() +IEEETest::NaNLTE(void) { double pinf = icu_getInfinity(); double ninf = -icu_getInfinity(); @@ -491,7 +491,7 @@ IEEETest::NaNLTE() //============================== int -IEEETest::NaNE() +IEEETest::NaNE(void) { double pinf = icu_getInfinity(); double ninf = -icu_getInfinity(); @@ -525,7 +525,7 @@ IEEETest::NaNE() //============================== int -IEEETest::NaNNE() +IEEETest::NaNNE(void) { double pinf = icu_getInfinity(); double ninf = -icu_getInfinity(); @@ -639,7 +639,7 @@ IEEETest::log(double d) //============================== IEEETest& -IEEETest::logln() +IEEETest::logln(void) { if(mFlags & kVerboseMode) cout << endl; @@ -720,7 +720,7 @@ IEEETest::err(double d) //============================== IEEETest& -IEEETest::errln() +IEEETest::errln(void) { cerr << endl; mNeedErrIndent = TRUE; diff --git a/icu4c/source/test/ieeetest/ieeetest.h b/icu4c/source/test/ieeetest/ieeetest.h index bb0cb7de52..4928e9722b 100644 --- a/icu4c/source/test/ieeetest/ieeetest.h +++ b/icu4c/source/test/ieeetest/ieeetest.h @@ -40,7 +40,7 @@ class IEEETest ~IEEETest(); // method returns the number of errors - int run(); + int run(void); private: // utility function for running a test function @@ -48,39 +48,39 @@ class IEEETest int (IEEETest::*testFunc)(void)); // the actual tests; methods return the number of errors - int testNaN(); - int testPositiveInfinity(); - int testNegativeInfinity(); - int testZero(); + int testNaN(void); + int testPositiveInfinity(void); + int testNegativeInfinity(void); + int testZero(void); // subtests of testNaN - int testIsNaN(); - int NaNGT(); - int NaNLT(); - int NaNGTE(); - int NaNLTE(); - int NaNE(); - int NaNNE(); + int testIsNaN(void); + int NaNGT(void); + int NaNLT(void); + int NaNGTE(void); + int NaNLTE(void); + int NaNE(void); + int NaNNE(void); // logging utilities - int getTestLevel() const; - void increaseTestLevel(); - void decreaseTestLevel(); + int getTestLevel(void) const; + void increaseTestLevel(void); + void decreaseTestLevel(void); IEEETest& log(char c); IEEETest& log(const char *s); IEEETest& log(int i); IEEETest& log(long l); IEEETest& log(double d); - IEEETest& logln(); + IEEETest& logln(void); IEEETest& err(char c); IEEETest& err(const char *s); IEEETest& err(int i); IEEETest& err(long l); IEEETest& err(double d); - IEEETest& errln(); + IEEETest& errln(void); // data members int mFlags; // flags - only verbose for now @@ -91,15 +91,15 @@ class IEEETest }; inline int -IEEETest::getTestLevel() const +IEEETest::getTestLevel(void) const { return mTestLevel; } inline void -IEEETest::increaseTestLevel() +IEEETest::increaseTestLevel(void) { mTestLevel++; } inline void -IEEETest::decreaseTestLevel() +IEEETest::decreaseTestLevel(void) { mTestLevel--; } #endif diff --git a/icu4c/source/test/intltest/dtfmapts.cpp b/icu4c/source/test/intltest/dtfmapts.cpp index ededd57d08..e35a3f5ad5 100644 --- a/icu4c/source/test/intltest/dtfmapts.cpp +++ b/icu4c/source/test/intltest/dtfmapts.cpp @@ -63,7 +63,7 @@ void IntlTestDateFormatAPI::runIndexedTest( int32_t index, bool_t exec, char* &n /** * Test that the equals method works correctly. */ -void IntlTestDateFormatAPI::TestEquals() +void IntlTestDateFormatAPI::TestEquals(void) { UErrorCode status = U_ZERO_ERROR; // Create two objects at different system times @@ -230,7 +230,7 @@ void IntlTestDateFormatAPI::testAPI(char *par) * the DateFormat API test. */ void -IntlTestDateFormatAPI::TestNameHiding() { +IntlTestDateFormatAPI::TestNameHiding(void) { // N.B.: This test passes if it COMPILES, since it's a test of // compile-time name hiding. diff --git a/icu4c/source/test/intltest/dtfmapts.h b/icu4c/source/test/intltest/dtfmapts.h index 97547e079f..3ce0422920 100644 --- a/icu4c/source/test/intltest/dtfmapts.h +++ b/icu4c/source/test/intltest/dtfmapts.h @@ -36,12 +36,12 @@ private: /** * Test that the equals method works correctly. */ - void TestEquals(); + void TestEquals(void); /** * Test that no parse or format methods are hidden. */ - void TestNameHiding(); + void TestNameHiding(void); }; #endif diff --git a/icu4c/source/test/intltest/dtfmrgts.cpp b/icu4c/source/test/intltest/dtfmrgts.cpp index 8ba2be1f0d..574fac8f20 100644 --- a/icu4c/source/test/intltest/dtfmrgts.cpp +++ b/icu4c/source/test/intltest/dtfmrgts.cpp @@ -63,7 +63,7 @@ DateFormatRegressionTest::runIndexedTest( int32_t index, bool_t exec, char* &nam /** * @bug 4029195 */ -void DateFormatRegressionTest::Test4029195() +void DateFormatRegressionTest::Test4029195(void) { UErrorCode status = U_ZERO_ERROR; @@ -111,7 +111,7 @@ void DateFormatRegressionTest::Test4029195() /** * @bug 4052408 */ -void DateFormatRegressionTest::Test4052408() +void DateFormatRegressionTest::Test4052408(void) { DateFormat *fmt = DateFormat::createDateTimeInstance(DateFormat::SHORT, @@ -207,7 +207,7 @@ void DateFormatRegressionTest::Test4052408() * @bug 4056591 * Verify the function of the [s|g]et2DigitYearStart() API. */ -void DateFormatRegressionTest::Test4056591() +void DateFormatRegressionTest::Test4056591(void) { UErrorCode status = U_ZERO_ERROR; @@ -261,7 +261,7 @@ void DateFormatRegressionTest::Test4056591() /** * @bug 4059917 */ -void DateFormatRegressionTest::Test4059917() +void DateFormatRegressionTest::Test4059917(void) { UErrorCode status = U_ZERO_ERROR; @@ -317,7 +317,7 @@ void DateFormatRegressionTest::aux917( SimpleDateFormat *fmt, UnicodeString& str /** * @bug 4060212 */ -void DateFormatRegressionTest::Test4060212() +void DateFormatRegressionTest::Test4060212(void) { UnicodeString dateString = "1995-040.05:01:29"; @@ -365,7 +365,7 @@ void DateFormatRegressionTest::Test4060212() /** * @bug 4061287 */ -void DateFormatRegressionTest::Test4061287() +void DateFormatRegressionTest::Test4061287(void) { UErrorCode status = U_ZERO_ERROR; @@ -395,7 +395,7 @@ void DateFormatRegressionTest::Test4061287() /** * @bug 4065240 */ -void DateFormatRegressionTest::Test4065240() +void DateFormatRegressionTest::Test4065240(void) { UDate curDate; DateFormat *shortdate, *fulldate; @@ -466,7 +466,7 @@ void DateFormatRegressionTest::Test4065240() /** * @bug 4071441 */ -void DateFormatRegressionTest::Test4071441() +void DateFormatRegressionTest::Test4071441(void) { DateFormat *fmtA = DateFormat::createInstance(); DateFormat *fmtB = DateFormat::createInstance(); @@ -511,7 +511,7 @@ void DateFormatRegressionTest::Test4071441() /** * @bug 4073003 */ -void DateFormatRegressionTest::Test4073003() +void DateFormatRegressionTest::Test4073003(void) { //try { DateFormat *fmt = DateFormat::createDateInstance(DateFormat::SHORT, Locale::US); @@ -547,7 +547,7 @@ void DateFormatRegressionTest::Test4073003() /** * @bug 4089106 */ -void DateFormatRegressionTest::Test4089106() +void DateFormatRegressionTest::Test4089106(void) { TimeZone *def = TimeZone::createDefault(); //try { @@ -575,7 +575,7 @@ void DateFormatRegressionTest::Test4089106() // {sfb} not applicable in C++?? -void DateFormatRegressionTest::Test4100302() +void DateFormatRegressionTest::Test4100302(void) { /* Locale locales [] = { Locale::CANADA, @@ -644,7 +644,7 @@ void DateFormatRegressionTest::Test4100302() /** * @bug 4101483 */ -void DateFormatRegressionTest::Test4101483() +void DateFormatRegressionTest::Test4101483(void) { UErrorCode status = U_ZERO_ERROR; SimpleDateFormat *sdf = new SimpleDateFormat("z", Locale::US, status); @@ -673,7 +673,7 @@ void DateFormatRegressionTest::Test4101483() * NT; it would actually have failed on any non-US locale. Now it should * work on all locales. */ -void DateFormatRegressionTest::Test4103340() +void DateFormatRegressionTest::Test4103340(void) { UErrorCode status = U_ZERO_ERROR; @@ -701,7 +701,7 @@ void DateFormatRegressionTest::Test4103340() /** * @bug 4103341 */ -void DateFormatRegressionTest::Test4103341() +void DateFormatRegressionTest::Test4103341(void) { TimeZone *saveZone =TimeZone::createDefault(); //try { @@ -726,7 +726,7 @@ void DateFormatRegressionTest::Test4103341() /** * @bug 4104136 */ -void DateFormatRegressionTest::Test4104136() +void DateFormatRegressionTest::Test4104136(void) { UErrorCode status = U_ZERO_ERROR; SimpleDateFormat *sdf = new SimpleDateFormat(status); @@ -785,7 +785,7 @@ void DateFormatRegressionTest::Test4104136() * StringIndexOutOfBoundsException during the second parse. However, * this is not seen. */ -void DateFormatRegressionTest::Test4104522() +void DateFormatRegressionTest::Test4104522(void) { UErrorCode status = U_ZERO_ERROR; @@ -813,7 +813,7 @@ void DateFormatRegressionTest::Test4104522() /** * @bug 4106807 */ -void DateFormatRegressionTest::Test4106807() +void DateFormatRegressionTest::Test4106807(void) { UDate dt; DateFormat *df = DateFormat::createDateTimeInstance(); @@ -896,7 +896,7 @@ void DateFormatRegressionTest::Test4106807() */ // {sfb} what to do with this one ?? -void DateFormatRegressionTest::Test4108407() +void DateFormatRegressionTest::Test4108407(void) { /*long l = System.currentTimeMillis(); logln("user.timezone = " + System.getProperty("user.timezone", "?")); @@ -915,7 +915,7 @@ void DateFormatRegressionTest::Test4108407() * @bug 4134203 * SimpleDateFormat won't parse "GMT" */ -void DateFormatRegressionTest::Test4134203() +void DateFormatRegressionTest::Test4134203(void) { UErrorCode status = U_ZERO_ERROR; UnicodeString dateFormat = "MM/dd/yy HH:mm:ss zzz"; @@ -936,7 +936,7 @@ void DateFormatRegressionTest::Test4134203() * @bug 4151631 * SimpleDateFormat incorrect handling of 2 single quotes in format() */ -void DateFormatRegressionTest::Test4151631() +void DateFormatRegressionTest::Test4151631(void) { UnicodeString pattern = "'TO_DATE('''dd'-'MM'-'yyyy HH:mm:ss''' , ''DD-MM-YYYY HH:MI:SS'')'"; logln("pattern=" + pattern); @@ -961,7 +961,7 @@ void DateFormatRegressionTest::Test4151631() * 'z' at end of date format throws index exception in SimpleDateFormat * CANNOT REPRODUCE THIS BUG ON 1.2FCS */ -void DateFormatRegressionTest::Test4151706() +void DateFormatRegressionTest::Test4151706(void) { UErrorCode status = U_ZERO_ERROR; SimpleDateFormat *fmt = @@ -984,7 +984,7 @@ void DateFormatRegressionTest::Test4151706() * of some other bug that has been fixed. */ void -DateFormatRegressionTest::Test4162071() +DateFormatRegressionTest::Test4162071(void) { UnicodeString dateString("Thu, 30-Jul-1999 11:51:14 GMT"); UnicodeString format("EEE', 'dd-MMM-yyyy HH:mm:ss z"); // RFC 822/1123 @@ -1010,7 +1010,7 @@ DateFormatRegressionTest::Test4162071() /** * DateFormat shouldn't parse year "-1" as a two-digit year (e.g., "-1" -> 1999). */ -void DateFormatRegressionTest::Test4182066() { +void DateFormatRegressionTest::Test4182066(void) { UErrorCode status = U_ZERO_ERROR; SimpleDateFormat fmt("MM/dd/yy", Locale::US, status); SimpleDateFormat dispFmt("MMM dd yyyy GG", Locale::US, status); @@ -1092,7 +1092,7 @@ void DateFormatRegressionTest::Test4182066() { * DateFormat cannot parse Feb 29 2000 when setLenient(false) */ void -DateFormatRegressionTest::Test4210209() { +DateFormatRegressionTest::Test4210209(void) { UErrorCode status = U_ZERO_ERROR; UnicodeString pattern("MMM d, yyyy"); SimpleDateFormat sfmt(pattern, Locale::US, status); diff --git a/icu4c/source/test/intltest/dtfmrgts.h b/icu4c/source/test/intltest/dtfmrgts.h index d5a5e70f80..df14c4b879 100644 --- a/icu4c/source/test/intltest/dtfmrgts.h +++ b/icu4c/source/test/intltest/dtfmrgts.h @@ -50,8 +50,8 @@ public: void Test4151631(void); void Test4151706(void); void Test4162071(void); - void Test4182066(); - void Test4210209(); + void Test4182066(void); + void Test4210209(void); }; #endif // _DATEFORMATREGRESSIONTEST_ diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp index f30cbc1afe..3a94d14571 100644 --- a/icu4c/source/test/intltest/dtfmttst.cpp +++ b/icu4c/source/test/intltest/dtfmttst.cpp @@ -161,7 +161,7 @@ DateFormatTest::TestEquals() * Test the parsing of 2-digit years. */ void -DateFormatTest::TestTwoDigitYearDSTParse() +DateFormatTest::TestTwoDigitYearDSTParse(void) { UErrorCode status = U_ZERO_ERROR; SimpleDateFormat* fullFmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss.SSS zzz yyyy G", status); diff --git a/icu4c/source/test/intltest/dtfmttst.h b/icu4c/source/test/intltest/dtfmttst.h index 35711d0ff1..3da2349ed5 100644 --- a/icu4c/source/test/intltest/dtfmttst.h +++ b/icu4c/source/test/intltest/dtfmttst.h @@ -37,7 +37,7 @@ public: /** * Test the parsing of 2-digit years. */ - virtual void TestTwoDigitYearDSTParse(); + virtual void TestTwoDigitYearDSTParse(void); public: // package // internal utility routine (genrates escape sequences for characters) diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 9782d0405c..022753fab3 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -53,7 +53,7 @@ void NumberFormatTest::runIndexedTest( int32_t index, bool_t exec, char* &name, // Test various patterns void -NumberFormatTest::TestPatterns() +NumberFormatTest::TestPatterns(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols sym(Locale::US, status); @@ -87,7 +87,7 @@ NumberFormatTest::TestPatterns() // Test exponential pattern void -NumberFormatTest::TestExponential() +NumberFormatTest::TestExponential(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols sym(Locale::US, status); @@ -197,7 +197,7 @@ NumberFormatTest::TestExponential() // Test the handling of quotes void -NumberFormatTest::TestQuotes() +NumberFormatTest::TestQuotes(void) { UErrorCode status = U_ZERO_ERROR; UnicodeString *pat; @@ -231,7 +231,7 @@ NumberFormatTest::TestQuotes() * Test the handling of the currency symbol in patterns. */ void -NumberFormatTest::TestCurrencySign() +NumberFormatTest::TestCurrencySign(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols* sym = new DecimalFormatSymbols(Locale::US, status); @@ -291,7 +291,7 @@ NumberFormatTest::escape(UnicodeString& s) * Test localized currency patterns. */ void -NumberFormatTest::TestCurrency() +NumberFormatTest::TestCurrency(void) { UErrorCode status = U_ZERO_ERROR; NumberFormat* currencyFmt = NumberFormat::createCurrencyInstance(Locale::CANADA_FRENCH, status); @@ -320,7 +320,7 @@ NumberFormatTest::TestCurrency() * Do rudimentary testing of parsing. */ void -NumberFormatTest::TestParse() +NumberFormatTest::TestParse(void) { UErrorCode status = U_ZERO_ERROR; UnicodeString arg("0"); @@ -344,7 +344,7 @@ NumberFormatTest::TestParse() * Test proper rounding by the format method. */ void -NumberFormatTest::TestRounding487() +NumberFormatTest::TestRounding487(void) { UErrorCode status = U_ZERO_ERROR; NumberFormat *nf = NumberFormat::createInstance(status); @@ -426,7 +426,7 @@ void NumberFormatTest::expect(NumberFormat* fmt, const Formattable& n, /** * Upgrade to alphaWorks */ -void NumberFormatTest::TestExponent() { +void NumberFormatTest::TestExponent(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols US(Locale::US, status); CHECK(status, "DecimalFormatSymbols constructor"); @@ -445,7 +445,7 @@ void NumberFormatTest::TestExponent() { /** * Upgrade to alphaWorks */ -void NumberFormatTest::TestScientific() { +void NumberFormatTest::TestScientific(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols US(Locale::US, status); CHECK(status, "DecimalFormatSymbols constructor"); @@ -613,7 +613,7 @@ void NumberFormatTest::TestScientific() { /** * Upgrade to alphaWorks */ -void NumberFormatTest::TestPad() { +void NumberFormatTest::TestPad(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols US(Locale::US, status); CHECK(status, "DecimalFormatSymbols constructor"); @@ -635,7 +635,7 @@ void NumberFormatTest::TestPad() { /** * Upgrade to alphaWorks */ -void NumberFormatTest::TestPatterns2() { +void NumberFormatTest::TestPatterns2(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols US(Locale::US, status); CHECK(status, "DecimalFormatSymbols constructor"); diff --git a/icu4c/source/test/intltest/numfmtst.h b/icu4c/source/test/intltest/numfmtst.h index ff042ef6b9..8bfea11fb9 100644 --- a/icu4c/source/test/intltest/numfmtst.h +++ b/icu4c/source/test/intltest/numfmtst.h @@ -29,19 +29,19 @@ public: /* * Test the handling of quotes **/ - virtual void TestQuotes(); + virtual void TestQuotes(void); /** * Test patterns with exponential representation **/ - virtual void TestExponential(); + virtual void TestExponential(void); /** * Test handling of patterns with currency symbols **/ - virtual void TestCurrencySign(); + virtual void TestCurrencySign(void); /** * Test different format patterns **/ - virtual void TestPatterns(); + virtual void TestPatterns(void); public: // package // internal utility routine @@ -51,26 +51,26 @@ public: /** * Test localized currency patterns. */ - virtual void TestCurrency(); + virtual void TestCurrency(void); /** * Do rudimentary testing of parsing. */ - virtual void TestParse(); + virtual void TestParse(void); /** * Test proper rounding by the format method. */ - virtual void TestRounding487(); + virtual void TestRounding487(void); // New tests for alphaWorks upgrade - virtual void TestExponent(); - virtual void TestScientific(); + virtual void TestExponent(void); + virtual void TestScientific(void); void expect(NumberFormat& fmt, const UnicodeString& str, int32_t n); void expect(NumberFormat& fmt, const Formattable& n, const UnicodeString& exp); void expect(NumberFormat* fmt, const Formattable& n, const UnicodeString& exp, UErrorCode); - void TestPad(); - void TestPatterns2(); + void TestPad(void); + void TestPatterns2(void); void expectPad(DecimalFormat& fmt, const UnicodeString& pat, int32_t pos); void expectPad(DecimalFormat& fmt, const UnicodeString& pat, diff --git a/icu4c/source/test/intltest/numrgts.cpp b/icu4c/source/test/intltest/numrgts.cpp index 0079a468ab..78753f54b5 100644 --- a/icu4c/source/test/intltest/numrgts.cpp +++ b/icu4c/source/test/intltest/numrgts.cpp @@ -149,7 +149,7 @@ static UnicodeString str(const char *input) * NumberFormat.equals comparing with null should always return false. */ // {sfb} kind of silly in C++, just checking for new success -void NumberFormatRegressionTest::Test4075713() +void NumberFormatRegressionTest::Test4075713(void) { //try { MyNumberFormatTest *tmp = new MyNumberFormatTest(); @@ -166,7 +166,7 @@ void NumberFormatRegressionTest::Test4075713() * NumberFormat.equals comparing two obj equal even the setGroupingUsed * flag is different. */ -void NumberFormatRegressionTest::Test4074620() +void NumberFormatRegressionTest::Test4074620(void) { MyNumberFormatTest *nf1 = new MyNumberFormatTest(); @@ -189,7 +189,7 @@ void NumberFormatRegressionTest::Test4074620() * DecimalFormat.format() incorrectly uses maxFractionDigits setting. */ -void NumberFormatRegressionTest::Test4088161 () +void NumberFormatRegressionTest::Test4088161 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -218,7 +218,7 @@ void NumberFormatRegressionTest::Test4088161 () * DecimalFormatSymbols should be cloned in the ctor DecimalFormat. * DecimalFormat(String, DecimalFormatSymbols). */ -void NumberFormatRegressionTest::Test4087245 () +void NumberFormatRegressionTest::Test4087245 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols *symbols = new DecimalFormatSymbols(status); @@ -247,7 +247,7 @@ void NumberFormatRegressionTest::Test4087245 () /* @bug 4087535 * DecimalFormat.format() incorrectly formats 0.0 */ -void NumberFormatRegressionTest::Test4087535 () +void NumberFormatRegressionTest::Test4087535 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -272,7 +272,7 @@ void NumberFormatRegressionTest::Test4087535 () * DecimalFormat.format fails when groupingSize is set to 0. */ // {sfb} how do I tell if this worked? --> FieldPosition doesn't change ?? -void NumberFormatRegressionTest::Test4088503 () +void NumberFormatRegressionTest::Test4088503 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -292,7 +292,7 @@ void NumberFormatRegressionTest::Test4088503 () /* @bug 4066646 * NumberFormat.getCurrencyInstance is wrong. */ -void NumberFormatRegressionTest::Test4066646 () +void NumberFormatRegressionTest::Test4066646 (void) { assignFloatValue(2.04f); assignFloatValue(2.03f); @@ -329,7 +329,7 @@ NumberFormatRegressionTest::assignFloatValue(float returnfloat) /* @bug 4059870 * DecimalFormat throws exception when parsing "0" */ -void NumberFormatRegressionTest::Test4059870() +void NumberFormatRegressionTest::Test4059870(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *format = new DecimalFormat("00", status); @@ -352,7 +352,7 @@ void NumberFormatRegressionTest::Test4059870() * comparing with null. */ // {sfb} this is silly in C++ -void NumberFormatRegressionTest::Test4083018 () +void NumberFormatRegressionTest::Test4083018 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols *dfs = new DecimalFormatSymbols(status); @@ -372,7 +372,7 @@ void NumberFormatRegressionTest::Test4083018 () /* @bug 4071492 * DecimalFormat does not round up correctly. */ -void NumberFormatRegressionTest::Test4071492 () +void NumberFormatRegressionTest::Test4071492 (void) { double x = 0.00159999; UErrorCode status = U_ZERO_ERROR; @@ -394,7 +394,7 @@ void NumberFormatRegressionTest::Test4071492 () * A space as a group separator for localized pattern causes * wrong format. WorkAround : use non-breaking space. */ -void NumberFormatRegressionTest::Test4086575() +void NumberFormatRegressionTest::Test4086575(void) { UErrorCode status = U_ZERO_ERROR; NumberFormat *nf1 = NumberFormat::createInstance(Locale::FRANCE, status); @@ -467,7 +467,7 @@ void NumberFormatRegressionTest::Test4086575() */ // {sfb} slightly converted into a round-trip test, since in C++ // there is no Double.toString() -void NumberFormatRegressionTest::Test4068693() +void NumberFormatRegressionTest::Test4068693(void) { logln("----- Test Application -----"); ParsePosition pos(0); @@ -495,7 +495,7 @@ void NumberFormatRegressionTest::Test4068693() * object. */ // {sfb} doesn't apply in C++ -void NumberFormatRegressionTest::Test4069754() +void NumberFormatRegressionTest::Test4069754(void) { /* try { myformat it = new myformat(); @@ -520,7 +520,7 @@ void NumberFormatRegressionTest::Test4069754() /* @bug 4087251 * DecimalFormat.applyPattern(String) allows illegal patterns */ -void NumberFormatRegressionTest::Test4087251 () +void NumberFormatRegressionTest::Test4087251 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -552,7 +552,7 @@ void NumberFormatRegressionTest::Test4087251 () /* @bug 4090489 * DecimalFormat.format() loses precision */ -void NumberFormatRegressionTest::Test4090489 () +void NumberFormatRegressionTest::Test4090489 (void) { // {sfb} sprintf doesn't correctly handle the double, so there is nothing // that NumberFormat can do. For some reason, it does not format the last 1. @@ -579,7 +579,7 @@ void NumberFormatRegressionTest::Test4090489 () /* @bug 4090504 * DecimalFormat.format() loses precision */ -void NumberFormatRegressionTest::Test4090504 () +void NumberFormatRegressionTest::Test4090504 (void) { double d = 1; logln(UnicodeString("d = ") + d); @@ -605,7 +605,7 @@ void NumberFormatRegressionTest::Test4090504 () /* @bug 4095713 * DecimalFormat.parse(String str, ParsePosition pp) loses precision */ -void NumberFormatRegressionTest::Test4095713 () +void NumberFormatRegressionTest::Test4095713 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -626,7 +626,7 @@ void NumberFormatRegressionTest::Test4095713 () * DecimalFormat.parse() fails when multiplier is not set to 1 */ // {sfb} not sure what to do with this one -void NumberFormatRegressionTest::Test4092561 () +void NumberFormatRegressionTest::Test4092561 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -647,7 +647,7 @@ void NumberFormatRegressionTest::Test4092561 () /* @bug 4092480 * DecimalFormat: Negative format ignored. */ -void NumberFormatRegressionTest::Test4092480 () +void NumberFormatRegressionTest::Test4092480 (void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *dfFoo = new DecimalFormat(UnicodeString("000"), status); @@ -696,7 +696,7 @@ void NumberFormatRegressionTest::Test4092480 () * never contain the monetary separator! Decimal separator in pattern is * interpreted as monetary separator if currency symbol is seen! */ -void NumberFormatRegressionTest::Test4087244 () { +void NumberFormatRegressionTest::Test4087244 (void) { Locale *de = new Locale(UnicodeString("pt"), UnicodeString("PT")); UErrorCode status = U_ZERO_ERROR; NumberFormat *nf = NumberFormat::createCurrencyInstance(*de, status); @@ -734,7 +734,7 @@ void NumberFormatRegressionTest::Test4087244 () { /* @bug 4070798 * Number format data rounding errors for locale FR */ -void NumberFormatRegressionTest::Test4070798 () +void NumberFormatRegressionTest::Test4070798 (void) { NumberFormat *formatter; UnicodeString tempString; @@ -803,7 +803,7 @@ void NumberFormatRegressionTest::Test4070798 () /* @bug 4071005 * Data rounding errors for French (Canada) locale */ -void NumberFormatRegressionTest::Test4071005 () +void NumberFormatRegressionTest::Test4071005 (void) { NumberFormat *formatter; UnicodeString tempString; @@ -872,7 +872,7 @@ void NumberFormatRegressionTest::Test4071005 () /* @bug 4071014 * Data rounding errors for German (Germany) locale */ -void NumberFormatRegressionTest::Test4071014 () +void NumberFormatRegressionTest::Test4071014 (void) { NumberFormat *formatter; UnicodeString tempString; @@ -932,7 +932,7 @@ void NumberFormatRegressionTest::Test4071014 () /* @bug 4071859 * Data rounding errors for Italian locale number formats */ -void NumberFormatRegressionTest::Test4071859 () +void NumberFormatRegressionTest::Test4071859 (void) { NumberFormat *formatter; UnicodeString tempString; @@ -991,7 +991,7 @@ void NumberFormatRegressionTest::Test4071859 () /* @bug 4071859 * Test rounding for nearest even. */ -void NumberFormatRegressionTest::Test4093610() +void NumberFormatRegressionTest::Test4093610(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat("#0.#", status); @@ -1031,7 +1031,7 @@ void NumberFormatRegressionTest::roundingTest(DecimalFormat *df, double x, Unico /* @bug 4098741 * Tests the setMaximumFractionDigits limit. */ -void NumberFormatRegressionTest::Test4098741() +void NumberFormatRegressionTest::Test4098741(void) { //try { UErrorCode status = U_ZERO_ERROR; @@ -1049,7 +1049,7 @@ void NumberFormatRegressionTest::Test4098741() * Fix comment : HShih A31 Part1 will not be fixed and javadoc needs to be updated. * Part2 has been fixed. */ -void NumberFormatRegressionTest::Test4074454() +void NumberFormatRegressionTest::Test4074454(void) { //try { UErrorCode status = U_ZERO_ERROR; @@ -1089,7 +1089,7 @@ void NumberFormatRegressionTest::Test4074454() * Otherwise, an IllegalArgumentException will be thrown when formatting * "January 35". See GregorianCalendar class javadoc for more details. */ -void NumberFormatRegressionTest::Test4099404() +void NumberFormatRegressionTest::Test4099404(void) { //try { UErrorCode status = U_ZERO_ERROR; @@ -1114,7 +1114,7 @@ void NumberFormatRegressionTest::Test4099404() /* @bug 4101481 * DecimalFormat.applyPattern doesn't set minimum integer digits */ -void NumberFormatRegressionTest::Test4101481() +void NumberFormatRegressionTest::Test4101481(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *sdf = new DecimalFormat(UnicodeString("#,##0"), status); @@ -1125,7 +1125,7 @@ void NumberFormatRegressionTest::Test4101481() /* @bug 4052223 (API addition request A27) * Tests ParsePosition.setErrorPosition() and ParsePosition.getErrorPosition(). */ -void NumberFormatRegressionTest::Test4052223() +void NumberFormatRegressionTest::Test4052223(void) { //try { UErrorCode status = U_ZERO_ERROR; @@ -1143,7 +1143,7 @@ void NumberFormatRegressionTest::Test4052223() /* @bug 4061302 * API tests for API addition request A9. */ -void NumberFormatRegressionTest::Test4061302() +void NumberFormatRegressionTest::Test4061302(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols *fmt = new DecimalFormatSymbols(status); @@ -1178,7 +1178,7 @@ void NumberFormatRegressionTest::Test4061302() * API tests for API addition request A23. FieldPosition.getBeginIndex and * FieldPosition.getEndIndex. */ -void NumberFormatRegressionTest::Test4062486() +void NumberFormatRegressionTest::Test4062486(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *fmt = new DecimalFormat(UnicodeString("#,##0.00"), status); @@ -1200,7 +1200,7 @@ void NumberFormatRegressionTest::Test4062486() /* @bug 4108738 * DecimalFormat.parse incorrectly works with a group separator. */ -void NumberFormatRegressionTest::Test4108738() +void NumberFormatRegressionTest::Test4108738(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols *syms = new DecimalFormatSymbols(Locale::US, status); @@ -1236,7 +1236,7 @@ void NumberFormatRegressionTest::Test4108738() /* @bug 4106658 * DecimalFormat.format() incorrectly formats negative doubles. */ -void NumberFormatRegressionTest::Test4106658() +void NumberFormatRegressionTest::Test4106658(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); // Corrected; see 4147706 @@ -1265,7 +1265,7 @@ void NumberFormatRegressionTest::Test4106658() /* @bug 4106662 * DecimalFormat.parse returns 0 if string parameter is incorrect. */ -void NumberFormatRegressionTest::Test4106662() +void NumberFormatRegressionTest::Test4106662(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -1294,7 +1294,7 @@ void NumberFormatRegressionTest::Test4106662() /* @bug 4114639 (duplicate of 4106662) * NumberFormat.parse doesn't return null */ -void NumberFormatRegressionTest::Test4114639() +void NumberFormatRegressionTest::Test4114639(void) { UErrorCode status = U_ZERO_ERROR; NumberFormat *format = NumberFormat::createInstance(status); @@ -1312,7 +1312,7 @@ void NumberFormatRegressionTest::Test4114639() /* @bug 4106664 (FIX) * DecimalFormat.format(long n) fails if n * multiplier > MAX_LONG. */ -void NumberFormatRegressionTest::Test4106664() +void NumberFormatRegressionTest::Test4106664(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -1341,7 +1341,7 @@ void NumberFormatRegressionTest::Test4106664() /* @bug 4106667 (duplicate of 4106658) * DecimalFormat.format incorrectly formats -0.0. */ -void NumberFormatRegressionTest::Test4106667() +void NumberFormatRegressionTest::Test4106667(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat(status); @@ -1368,7 +1368,7 @@ void NumberFormatRegressionTest::Test4106667() /* @bug 4110936 * DecimalFormat.setMaximumIntegerDigits() works incorrectly. */ -void NumberFormatRegressionTest::Test4110936() +void NumberFormatRegressionTest::Test4110936(void) { UErrorCode status = U_ZERO_ERROR; NumberFormat *nf = NumberFormat::createInstance(status); @@ -1389,7 +1389,7 @@ void NumberFormatRegressionTest::Test4110936() * 2) Make sure we get the same results using the generic symbol or a * hard-coded one. */ -void NumberFormatRegressionTest::Test4122840() +void NumberFormatRegressionTest::Test4122840(void) { int32_t count = 0; const Locale *locales = Locale::getAvailableLocales(count); @@ -1482,7 +1482,7 @@ void NumberFormatRegressionTest::Test4122840() /* @bug 4125885 * DecimalFormat.format() delivers wrong string. */ -void NumberFormatRegressionTest::Test4125885() +void NumberFormatRegressionTest::Test4125885(void) { UErrorCode status = U_ZERO_ERROR; double rate = 12.34; @@ -1512,7 +1512,7 @@ void NumberFormatRegressionTest::Test4125885() * @bug 4134034 * DecimalFormat produces extra zeros when formatting numbers. */ -void NumberFormatRegressionTest::Test4134034() +void NumberFormatRegressionTest::Test4134034(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *nf = new DecimalFormat("##,###,###.00", status); @@ -1561,7 +1561,7 @@ void NumberFormatRegressionTest::Test4134034() * Value 1.2 Format #0.0# Result '1.2' * Value 1.2 Format #0.00 Result '1.20' */ -void NumberFormatRegressionTest::Test4134300() { +void NumberFormatRegressionTest::Test4134300(void) { UnicodeString DATA [] = { // Pattern Expected string UnicodeString("#.00"), UnicodeString("1.20"), @@ -1594,7 +1594,7 @@ void NumberFormatRegressionTest::Test4134300() { * @bug 4140009 * Empty pattern produces double negative prefix. */ -void NumberFormatRegressionTest::Test4140009() +void NumberFormatRegressionTest::Test4140009(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols *syms = new DecimalFormatSymbols(Locale::ENGLISH, status); @@ -1617,7 +1617,7 @@ void NumberFormatRegressionTest::Test4140009() * BigDecimal numbers get their fractions truncated by NumberFormat. */ // {sfb} not pertinent in C++ ?? -void NumberFormatRegressionTest::Test4141750() { +void NumberFormatRegressionTest::Test4141750(void) { /*try { UnicodeString str("12345.67"); BigDecimal bd = new BigDecimal(str); @@ -1709,7 +1709,7 @@ void NumberFormatRegressionTest::Test4145457() { * CANNOT REPRODUCE * This bug is a duplicate of 4139344, which is a duplicate of 4134300 */ -void NumberFormatRegressionTest::Test4147295() +void NumberFormatRegressionTest::Test4147295(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *sdf = new DecimalFormat(status); @@ -1735,7 +1735,7 @@ void NumberFormatRegressionTest::Test4147295() * DecimalFormat formats -0.0 as +0.0 * See also older related bug 4106658, 4106667 */ -void NumberFormatRegressionTest::Test4147706() +void NumberFormatRegressionTest::Test4147706(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *df = new DecimalFormat("#,##0.0##", status); @@ -1785,7 +1785,7 @@ public String Now() */ // TODO: make this test actually test something void -NumberFormatRegressionTest::Test4162198() +NumberFormatRegressionTest::Test4162198(void) { // for some reason, DBL_MAX will not round trip. (bug in sprintf/atof) double dbl = LONG_MAX * 1000.0; @@ -1823,7 +1823,7 @@ NumberFormatRegressionTest::Test4162198() * NumberFormat does not parse negative zero. */ void -NumberFormatRegressionTest::Test4162852() +NumberFormatRegressionTest::Test4162852(void) { UErrorCode status = U_ZERO_ERROR; for(int32_t i=0; i < 2; ++i) { @@ -1859,7 +1859,7 @@ static double _u_abs(double a) { return a<0?-a:a; } * @bug 4167494 * NumberFormat truncates data */ -void NumberFormatRegressionTest::Test4167494() { +void NumberFormatRegressionTest::Test4167494(void) { UErrorCode status = U_ZERO_ERROR; NumberFormat *fmt = NumberFormat::createInstance(Locale::US, status); failure(status, "NumberFormat::createInstance"); @@ -1892,7 +1892,7 @@ void NumberFormatRegressionTest::Test4167494() { * @bug 4170798 * DecimalFormat.parse() fails when ParseIntegerOnly set to true */ -void NumberFormatRegressionTest::Test4170798() { +void NumberFormatRegressionTest::Test4170798(void) { UErrorCode status = U_ZERO_ERROR; NumberFormat *nf = NumberFormat::createInstance(Locale::US, status); failure(status, "NumberFormat::createInstance"); @@ -1915,7 +1915,7 @@ void NumberFormatRegressionTest::Test4170798() { * May 17 1999 sync up - liu * toPattern only puts the first grouping separator in. */ -void NumberFormatRegressionTest::Test4176114() { +void NumberFormatRegressionTest::Test4176114(void) { char* DATA[] = { "00", "#00", "000", "#000", // No grouping @@ -1947,7 +1947,7 @@ void NumberFormatRegressionTest::Test4176114() { * @bug 4179818 * DecimalFormat is incorrectly rounding numbers like 1.2501 to 1.2 */ -void NumberFormatRegressionTest::Test4179818() { +void NumberFormatRegressionTest::Test4179818(void) { char* DATA[] = { // Input Pattern Expected output "1.2511", "#.#", "1.3", @@ -1990,7 +1990,7 @@ void NumberFormatRegressionTest::Test4179818() { * symbol, percent, and permille. This is filed as bugs 4212072 and * 4212073. */ -void NumberFormatRegressionTest::Test4212072() { +void NumberFormatRegressionTest::Test4212072(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols sym(Locale::US, status); failure(status, "DecimalFormatSymbols ct"); @@ -2154,7 +2154,7 @@ void NumberFormatRegressionTest::Test4212072() { * May 17 1999 sync up - liu * DecimalFormat.parse() fails for mulipliers 2^n. */ -void NumberFormatRegressionTest::Test4216742() { +void NumberFormatRegressionTest::Test4216742(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *fmt = (DecimalFormat*) NumberFormat::createInstance(Locale::US, status); failure(status, "createInstance"); @@ -2192,7 +2192,7 @@ void NumberFormatRegressionTest::Test4216742() { * DecimalFormat formats 1.001 to "1.00" instead of "1" with 2 fraction * digits. */ -void NumberFormatRegressionTest::Test4217661() { +void NumberFormatRegressionTest::Test4217661(void) { double D[] = { 0.001, 1.001, 0.006, 1.006 }; char* S[] = { "0", "1", "0.01", "1.01" }; int D_length = sizeof(D) / sizeof(D[0]); @@ -2213,7 +2213,7 @@ void NumberFormatRegressionTest::Test4217661() { /** * alphaWorks upgrade */ -void NumberFormatRegressionTest::Test4161100() { +void NumberFormatRegressionTest::Test4161100(void) { UErrorCode status = U_ZERO_ERROR; NumberFormat *nf = NumberFormat::createInstance(Locale::US, status); failure(status, "createInstance"); @@ -2235,7 +2235,7 @@ void NumberFormatRegressionTest::Test4161100() { * June 16 1999 sync up - liu * Formatting .5 rounds to "1" instead of "0". (Regression in 1.2.2 RC1) */ -void NumberFormatRegressionTest::Test4243011() { +void NumberFormatRegressionTest::Test4243011(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols sym(Locale::US, status); failure(status, "DecimalFormatSymbols ct"); @@ -2265,7 +2265,7 @@ void NumberFormatRegressionTest::Test4243011() { * format(0.0) gives "0.1" if preceded by parse("99.99"). * (Regression in 1.2.2 RC1) */ -void NumberFormatRegressionTest::Test4243108() { +void NumberFormatRegressionTest::Test4243108(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormatSymbols sym(Locale::US, status); failure(status, "DecimalFormatSymbols ct"); diff --git a/icu4c/source/test/intltest/numrgts.h b/icu4c/source/test/intltest/numrgts.h index f0db5473eb..42c806994e 100644 --- a/icu4c/source/test/intltest/numrgts.h +++ b/icu4c/source/test/intltest/numrgts.h @@ -30,70 +30,70 @@ class NumberFormatRegressionTest: public IntlTest { void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par ); public: - void Test4075713(); - void Test4074620() ; - void Test4088161 (); - void Test4087245 (); - void Test4087535 (); - void Test4088503 (); - void Test4066646 () ; + void Test4075713(void); + void Test4074620(void) ; + void Test4088161 (void); + void Test4087245 (void); + void Test4087535 (void); + void Test4088503 (void); + void Test4066646 (void); float assignFloatValue(float returnfloat); - void Test4059870() ; - void Test4083018 (); - void Test4071492 (); - void Test4086575() ; - void Test4068693(); - void Test4069754(); - void Test4087251 (); - void Test4090489 (); - void Test4090504 (); - void Test4095713 (); - void Test4092561 (); - void Test4092480 (); - void Test4087244 () ; - void Test4070798 () ; - void Test4071005 () ; - void Test4071014 () ; - void Test4071859 () ; - void Test4093610(); + void Test4059870(void); + void Test4083018 (void); + void Test4071492 (void); + void Test4086575(void); + void Test4068693(void); + void Test4069754(void); + void Test4087251 (void); + void Test4090489 (void); + void Test4090504 (void); + void Test4095713 (void); + void Test4092561 (void); + void Test4092480 (void); + void Test4087244 (void); + void Test4070798 (void); + void Test4071005 (void); + void Test4071014 (void); + void Test4071859 (void); + void Test4093610(void); void roundingTest(DecimalFormat *df, double x, UnicodeString& expected); - void Test4098741(); - void Test4074454(); - void Test4099404(); - void Test4101481(); - void Test4052223(); - void Test4061302(); - void Test4062486(); - void Test4108738(); - void Test4106658(); - void Test4106662(); - void Test4114639(); - void Test4106664(); - void Test4106667(); - void Test4110936(); - void Test4122840(); - void Test4125885(); - void Test4134034() ; - void Test4134300() ; - void Test4140009() ; - void Test4141750() ; - void Test4145457() ; - void Test4147295() ; - void Test4147706() ; + void Test4098741(void); + void Test4074454(void); + void Test4099404(void); + void Test4101481(void); + void Test4052223(void); + void Test4061302(void); + void Test4062486(void); + void Test4108738(void); + void Test4106658(void); + void Test4106662(void); + void Test4114639(void); + void Test4106664(void); + void Test4106667(void); + void Test4110936(void); + void Test4122840(void); + void Test4125885(void); + void Test4134034(void); + void Test4134300(void); + void Test4140009(void); + void Test4141750(void); + void Test4145457(void); + void Test4147295(void); + void Test4147706(void); - void Test4162198() ; - void Test4162852() ; + void Test4162198(void); + void Test4162852(void); - void Test4167494(); - void Test4170798(); - void Test4176114(); - void Test4179818(); - void Test4212072(); - void Test4216742(); - void Test4217661(); - void Test4161100(); - void Test4243011(); - void Test4243108(); + void Test4167494(void); + void Test4170798(void); + void Test4176114(void); + void Test4179818(void); + void Test4212072(void); + void Test4216742(void); + void Test4217661(void); + void Test4161100(void); + void Test4243011(void); + void Test4243108(void); protected: bool_t failure(UErrorCode status, const UnicodeString& msg); diff --git a/icu4c/source/test/intltest/strtest.cpp b/icu4c/source/test/intltest/strtest.cpp index 90e1cc26a6..0cbe1380db 100644 --- a/icu4c/source/test/intltest/strtest.cpp +++ b/icu4c/source/test/intltest/strtest.cpp @@ -24,7 +24,7 @@ #include "strtest.h" #include "ustring.h" -void StringTest::TestEndian() { +void StringTest::TestEndian(void) { union { uint8_t byte; uint16_t word; @@ -35,13 +35,13 @@ void StringTest::TestEndian() { } } -void StringTest::TestSizeofWCharT() { +void StringTest::TestSizeofWCharT(void) { if(U_SIZEOF_WCHAR_T!=sizeof(wchar_t)) { errln("TestSizeofWCharT: U_SIZEOF_WCHAR_T!=sizeof(wchar_t) - U_SIZEOF_WCHAR_T needs to be fixed in platform.h"); } } -void StringTest::TestCharsetFamily() { +void StringTest::TestCharsetFamily(void) { unsigned char c='A'; if( U_CHARSET_FAMILY==U_ASCII_FAMILY && c!=0x41 || U_CHARSET_FAMILY==U_EBCDIC_FAMILY && c!=0xc1 diff --git a/icu4c/source/test/intltest/strtest.h b/icu4c/source/test/intltest/strtest.h index 7c50e80b7f..952f5a81fa 100644 --- a/icu4c/source/test/intltest/strtest.h +++ b/icu4c/source/test/intltest/strtest.h @@ -36,9 +36,9 @@ public: void runIndexedTest(int32_t index, bool_t exec, char *&name, char *par=NULL); private: - void TestEndian(); - void TestSizeofWCharT(); - void TestCharsetFamily(); + void TestEndian(void); + void TestSizeofWCharT(void); + void TestCharsetFamily(void); }; #endif diff --git a/icu4c/source/test/intltest/thcoll.cpp b/icu4c/source/test/intltest/thcoll.cpp index 60881be626..ca33c1624e 100644 --- a/icu4c/source/test/intltest/thcoll.cpp +++ b/icu4c/source/test/intltest/thcoll.cpp @@ -66,7 +66,7 @@ void CollationThaiTest::runIndexedTest(int32_t index, bool_t exec, char* &name, * sorted order, and confirm that the collator compares each line as * preceding the following line. */ -void CollationThaiTest::TestDictionary() { +void CollationThaiTest::TestDictionary(void) { if (coll == 0) { errln("Error: could not construct Thai collator"); return; @@ -158,7 +158,7 @@ void CollationThaiTest::TestDictionary() { * Odd corner conditions taken from "How to Sort Thai Without Rewriting Sort", * by Doug Cooper, http://seasrc.th.net/paper/thaisort.zip */ -void CollationThaiTest::TestCornerCases() { +void CollationThaiTest::TestCornerCases(void) { const char* TESTS[] = { // Shorter words precede longer "\\u0e01", "<", "\\u0e01\\u0e01", diff --git a/icu4c/source/test/intltest/thcoll.h b/icu4c/source/test/intltest/thcoll.h index 3696211c44..6032fc44ae 100644 --- a/icu4c/source/test/intltest/thcoll.h +++ b/icu4c/source/test/intltest/thcoll.h @@ -31,13 +31,13 @@ private: * sorted order, and confirm that the collator compares each line as * preceding the following line. */ - void TestDictionary(); + void TestDictionary(void); /** * Odd corner conditions taken from "How to Sort Thai Without Rewriting Sort", * by Doug Cooper, http://seasrc.th.net/paper/thaisort.zip */ - void TestCornerCases(); + void TestCornerCases(void); private: diff --git a/icu4c/source/test/intltest/transtst.cpp b/icu4c/source/test/intltest/transtst.cpp index 4c268ac1ed..00b61950cf 100644 --- a/icu4c/source/test/intltest/transtst.cpp +++ b/icu4c/source/test/intltest/transtst.cpp @@ -78,7 +78,7 @@ void TransliteratorTest::TestInstantiation() { } } -void TransliteratorTest::TestSimpleRules() { +void TransliteratorTest::TestSimpleRules(void) { /* Example: rules 1. ab>x|y * 2. yc>z * @@ -137,7 +137,7 @@ void TransliteratorTest::TestSimpleRules() { * F' != I. However, if we are careful about the input, we will * get the expected results. */ -void TransliteratorTest::TestRuleBasedInverse() { +void TransliteratorTest::TestRuleBasedInverse(void) { UnicodeString RULES = UnicodeString("abc>zyx\n") + "ab>yz\n" + @@ -185,7 +185,7 @@ void TransliteratorTest::TestRuleBasedInverse() { /** * Basic test of keyboard. */ -void TransliteratorTest::TestKeyboard() { +void TransliteratorTest::TestKeyboard(void) { UErrorCode status = U_ZERO_ERROR; RuleBasedTransliterator t("", UnicodeString("psch>Y\n") @@ -214,7 +214,7 @@ void TransliteratorTest::TestKeyboard() { /** * Basic test of keyboard with cursor. */ -void TransliteratorTest::TestKeyboard2() { +void TransliteratorTest::TestKeyboard2(void) { UErrorCode status = U_ZERO_ERROR; RuleBasedTransliterator t("", UnicodeString("ych>Y\n") @@ -246,7 +246,7 @@ void TransliteratorTest::TestKeyboard2() { /** * Test keyboard transliteration with back-replacement. */ -void TransliteratorTest::TestKeyboard3() { +void TransliteratorTest::TestKeyboard3(void) { // We want th>z but t>y. Furthermore, during keyboard // transliteration we want t>y then yh>z if t, then h are // typed. @@ -311,7 +311,7 @@ void TransliteratorTest::keyboardAux(const Transliterator& t, } } -void TransliteratorTest::TestArabic() { +void TransliteratorTest::TestArabic(void) { /* const char* DATA[] = { "Arabic", "\u062a\u062a\u0645\u062a\u0639\u0020"+ @@ -346,7 +346,7 @@ void TransliteratorTest::TestArabic() { * Compose the Kana transliterator forward and reverse and try * some strings that should come out unchanged. */ -void TransliteratorTest::TestCompoundKana() { +void TransliteratorTest::TestCompoundKana(void) { Transliterator* kana = Transliterator::createInstance("Latin-Kana"); Transliterator* rkana = Transliterator::createInstance("Kana-Latin"); Transliterator* trans[] = { kana, rkana }; @@ -367,7 +367,7 @@ void TransliteratorTest::TestCompoundKana() { /** * Compose the hex transliterators forward and reverse. */ -void TransliteratorTest::TestCompoundHex() { +void TransliteratorTest::TestCompoundHex(void) { Transliterator* a = Transliterator::createInstance("Unicode-Hex"); Transliterator* b = Transliterator::createInstance("Hex-Unicode"); Transliterator* transab[] = { a, b }; @@ -412,7 +412,7 @@ class TestFilter : public UnicodeFilter { /** * Do some basic tests of filtering. */ -void TransliteratorTest::TestFiltering() { +void TransliteratorTest::TestFiltering(void) { Transliterator* hex = Transliterator::createInstance("Unicode-Hex"); if (hex == 0) { errln("FAIL: createInstance(Unicode-Hex) failed"); diff --git a/icu4c/source/test/intltest/transtst.h b/icu4c/source/test/intltest/transtst.h index 8bec4e6f23..8267be4164 100644 --- a/icu4c/source/test/intltest/transtst.h +++ b/icu4c/source/test/intltest/transtst.h @@ -24,12 +24,12 @@ class TransliteratorTest : public IntlTest { void runIndexedTest(int32_t index, bool_t exec, char* &name, char* par=NULL); #if 0 - void TestHashtable(); + void TestHashtable(void); #endif - void TestInstantiation(); + void TestInstantiation(void); - void TestSimpleRules(); + void TestSimpleRules(void); /** * Create some inverses and confirm that they work. We have to be @@ -39,43 +39,43 @@ class TransliteratorTest : public IntlTest { * F' != I. However, if we are careful about the input, we will * get the expected results. */ - void TestRuleBasedInverse(); + void TestRuleBasedInverse(void); /** * Basic test of keyboard. */ - void TestKeyboard(); + void TestKeyboard(void); /** * Basic test of keyboard with cursor. */ - void TestKeyboard2(); + void TestKeyboard2(void); /** * Test keyboard transliteration with back-replacement. */ - void TestKeyboard3(); + void TestKeyboard3(void); void keyboardAux(const Transliterator& t, const char* DATA[], int32_t DATA_length); - void TestArabic(); + void TestArabic(void); /** * Compose the Kana transliterator forward and reverse and try * some strings that should come out unchanged. */ - void TestCompoundKana(); + void TestCompoundKana(void); /** * Compose the hex transliterators forward and reverse. */ - void TestCompoundHex(); + void TestCompoundHex(void); /** * Do some basic tests of filtering. */ - void TestFiltering(); + void TestFiltering(void); //====================================================================== // Support methods diff --git a/icu4c/source/test/intltest/usettest.cpp b/icu4c/source/test/intltest/usettest.cpp index 67caf3c558..bc321df98c 100644 --- a/icu4c/source/test/intltest/usettest.cpp +++ b/icu4c/source/test/intltest/usettest.cpp @@ -33,7 +33,7 @@ UnicodeSetTest::runIndexedTest(int32_t index, bool_t exec, } void -UnicodeSetTest::TestPatterns() { +UnicodeSetTest::TestPatterns(void) { UnicodeSet set; expectPattern(set, "[[a-m]&[d-z]&[k-y]]", "km"); expectPattern(set, "[[a-z]-[m-y]-[d-r]]", "aczz"); @@ -50,7 +50,7 @@ UnicodeSetTest::TestPatterns() { } void -UnicodeSetTest::TestAddRemove() { +UnicodeSetTest::TestAddRemove(void) { UErrorCode status = U_ZERO_ERROR; UnicodeSet set; // Construct empty set diff --git a/icu4c/source/test/intltest/usettest.h b/icu4c/source/test/intltest/usettest.h index dc2f528c35..12d2b5b904 100644 --- a/icu4c/source/test/intltest/usettest.h +++ b/icu4c/source/test/intltest/usettest.h @@ -25,8 +25,8 @@ class UnicodeSetTest: public IntlTest { private: - void TestPatterns(); - void TestAddRemove(); + void TestPatterns(void); + void TestAddRemove(void); void expectPattern(UnicodeSet& set, const UnicodeString& pattern, diff --git a/icu4c/source/tools/chartype/chartbld.h b/icu4c/source/tools/chartype/chartbld.h index 323f628e8f..dae0b38b8a 100644 --- a/icu4c/source/tools/chartype/chartbld.h +++ b/icu4c/source/tools/chartype/chartbld.h @@ -73,7 +73,7 @@ public : }; static CompactByteArray* getByteArray(FILE*); - static void writeByteArrays(); + static void writeByteArrays(void); private : static int MakeProp(char* str); diff --git a/icu4c/source/tools/gencol/gencol.c b/icu4c/source/tools/gencol/gencol.c index b1aea82859..7074ae458c 100644 --- a/icu4c/source/tools/gencol/gencol.c +++ b/icu4c/source/tools/gencol/gencol.c @@ -26,8 +26,8 @@ /* Protos */ -static void usage(); -static void version(); +static void usage(void); +static void version(void); int main(int argc, char **argv); @@ -123,7 +123,7 @@ usage() static void version() { - printf("gencol version %s (ICU version %s), by Stephen F. Booth.\n", + printf("gencol version %s (ICU version %s).\n", GENCOL_VERSION, ICU_VERSION); puts(U_COPYRIGHT_STRING); } diff --git a/icu4c/source/tools/genprops/genprops.c b/icu4c/source/tools/genprops/genprops.c index f4c175324d..f8d34a14d5 100644 --- a/icu4c/source/tools/genprops/genprops.c +++ b/icu4c/source/tools/genprops/genprops.c @@ -57,7 +57,7 @@ bidiNames[U_CHAR_DIRECTION_COUNT]={ /* prototypes --------------------------------------------------------------- */ static void -init(); +init(void); static void parseDB(FileStream *in); @@ -134,7 +134,7 @@ main(int argc, char *argv[]) { } static void -init() { +init(void) { } /* parsing ------------------------------------------------------------------ */ diff --git a/icu4c/source/tools/genprops/genprops.h b/icu4c/source/tools/genprops/genprops.h index f7f6618207..fada83ea7f 100644 --- a/icu4c/source/tools/genprops/genprops.h +++ b/icu4c/source/tools/genprops/genprops.h @@ -43,24 +43,24 @@ genCategoryNames[]; /* prototypes */ extern void -initStore(); +initStore(void); extern void addProps(Props *p); extern void -repeatProps(); +repeatProps(void); extern void -compactStage2(); +compactStage2(void); extern void -compactStage3(); +compactStage3(void); extern void -compactProps(); +compactProps(void); extern void -generateData(); +generateData(void); #endif diff --git a/icu4c/source/tools/genprops/store.c b/icu4c/source/tools/genprops/store.c index 985e38115c..dfebbb6efa 100644 --- a/icu4c/source/tools/genprops/store.c +++ b/icu4c/source/tools/genprops/store.c @@ -310,10 +310,10 @@ static void setProps(uint32_t c, uint32_t x, uint16_t *pI1, uint16_t *pI2, uint16_t *pI3); static uint16_t -allocStage2(); +allocStage2(void); static uint16_t -allocProps(); +allocProps(void); static uint16_t addUChars(const UChar *s, uint16_t length); @@ -489,7 +489,7 @@ addProps(Props *p) { /* areas of same properties ------------------------------------------------- */ extern void -repeatProps() { +repeatProps(void) { /* first and last code points in repetitive areas */ static const uint32_t areas[][2]={ { 0x3400, 0x4db5 }, /* CJK ext. A */ @@ -696,7 +696,7 @@ repeatFromStage3(uint16_t i2, uint16_t j3, uint32_t x) { /* compacting --------------------------------------------------------------- */ extern void -compactStage2() { +compactStage2(void) { uint16_t newTop=compactStage(stage2, stage2Top, STAGE_2_BLOCK, stage1, STAGE_1_BLOCK); /* we saved some space */ @@ -716,7 +716,7 @@ compactStage2() { } extern void -compactStage3() { +compactStage3(void) { uint16_t newTop=compactStage(stage3, stage3Top, STAGE_3_BLOCK, stage2, stage2Top); /* we saved some space */ @@ -795,7 +795,7 @@ compactStage(uint16_t *stage, uint16_t stageTop, uint16_t blockSize, } extern void -compactProps() { +compactProps(void) { /* * At this point, all the propsTop properties are in props[], but they * are not all unique. @@ -881,7 +881,7 @@ compareProps(const void *l, const void *r) { /* generate output data ----------------------------------------------------- */ extern void -generateData() { +generateData(void) { static uint16_t indexes[8]={ STAGE_2_BITS, STAGE_3_BITS, 0, 0, @@ -1004,7 +1004,7 @@ setProps(uint32_t c, uint32_t x, uint16_t *pI1, uint16_t *pI2, uint16_t *pI3) { } static uint16_t -allocStage2() { +allocStage2(void) { uint16_t i=stage2Top; stage2Top+=STAGE_2_BLOCK; if(stage2Top>=MAX_STAGE_2_COUNT) { @@ -1015,7 +1015,7 @@ allocStage2() { } static uint16_t -allocProps() { +allocProps(void) { uint16_t i=propsTop; propsTop+=STAGE_3_BLOCK; if(propsTop>=MAX_PROPS_COUNT) { diff --git a/icu4c/source/tools/genrb/error.h b/icu4c/source/tools/genrb/error.h index 7ce4be8a1a..8a58c8b2c4 100644 --- a/icu4c/source/tools/genrb/error.h +++ b/icu4c/source/tools/genrb/error.h @@ -19,6 +19,6 @@ #define ERROR_H 1 void setErrorText(const char *s); -const char* getErrorText(); +const char* getErrorText(void); #endif diff --git a/icu4c/source/tools/genrb/genrb.c b/icu4c/source/tools/genrb/genrb.c index bd73e51ccd..5d77ad479d 100644 --- a/icu4c/source/tools/genrb/genrb.c +++ b/icu4c/source/tools/genrb/genrb.c @@ -36,8 +36,8 @@ U_CDECL_END #include "uloc.h" /* Protos */ -static void usage(); -static void version(); +static void usage(void); +static void version(void); static void processFile(const char *filename, const char* cp, UErrorCode *status); static char* make_res_filename(const char *filename, UErrorCode *status); static char* make_col_filename(const char *filename, UErrorCode *status); @@ -155,7 +155,7 @@ usage() static void version() { - printf("genrb version %s (ICU version %s), by Stephen F. Booth.\n", + printf("genrb version %s (ICU version %s).\n", GENRB_VERSION, ICU_VERSION); puts(U_COPYRIGHT_STRING); } diff --git a/icu4c/source/tools/rbdump/read.c b/icu4c/source/tools/rbdump/read.c index 9ab67a2e5e..9e41c80f44 100644 --- a/icu4c/source/tools/rbdump/read.c +++ b/icu4c/source/tools/rbdump/read.c @@ -113,7 +113,7 @@ usage() static void version() { - printf("rbdump version %s (ICU version %s), by Stephen F. Booth.\n", + printf("rbdump version %s (ICU version %s).\n", RBDUMP_VERSION, ICU_VERSION); puts(U_COPYRIGHT_STRING); }