From aae7ac8a660b1ca2f8427b4efd028681491d3a37 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Thu, 21 Feb 2002 04:42:32 +0000 Subject: [PATCH] ICU-1126 move break iterator code to common library so that titlecasing can use it X-SVN-Rev: 7728 --- icu4c/source/common/Makefile.in | 3 +- icu4c/source/{i18n => common}/brkdict.cpp | 0 icu4c/source/{i18n => common}/brkdict.h | 0 icu4c/source/{i18n => common}/brkiter.cpp | 0 icu4c/source/common/common.dsp | 152 ++++++++++++++++++ icu4c/source/{i18n => common}/dbbi.cpp | 0 icu4c/source/{i18n => common}/dbbi_tbl.cpp | 0 icu4c/source/{i18n => common}/dbbi_tbl.h | 0 icu4c/source/{i18n => common}/rbbi.cpp | 0 icu4c/source/{i18n => common}/rbbi_tbl.cpp | 0 icu4c/source/{i18n => common}/rbbi_tbl.h | 0 icu4c/source/{i18n => common}/ubrk.cpp | 0 .../source/{i18n => common}/unicode/brkiter.h | 2 +- icu4c/source/{i18n => common}/unicode/dbbi.h | 2 +- icu4c/source/{i18n => common}/unicode/rbbi.h | 2 +- icu4c/source/{i18n => common}/unicode/ubrk.h | 0 icu4c/source/i18n/Makefile.in | 4 +- icu4c/source/i18n/i18n.dsp | 148 ----------------- 18 files changed, 159 insertions(+), 154 deletions(-) rename icu4c/source/{i18n => common}/brkdict.cpp (100%) rename icu4c/source/{i18n => common}/brkdict.h (100%) rename icu4c/source/{i18n => common}/brkiter.cpp (100%) rename icu4c/source/{i18n => common}/dbbi.cpp (100%) rename icu4c/source/{i18n => common}/dbbi_tbl.cpp (100%) rename icu4c/source/{i18n => common}/dbbi_tbl.h (100%) rename icu4c/source/{i18n => common}/rbbi.cpp (100%) rename icu4c/source/{i18n => common}/rbbi_tbl.cpp (100%) rename icu4c/source/{i18n => common}/rbbi_tbl.h (100%) rename icu4c/source/{i18n => common}/ubrk.cpp (100%) rename icu4c/source/{i18n => common}/unicode/brkiter.h (99%) rename icu4c/source/{i18n => common}/unicode/dbbi.h (99%) rename icu4c/source/{i18n => common}/unicode/rbbi.h (99%) rename icu4c/source/{i18n => common}/unicode/ubrk.h (100%) diff --git a/icu4c/source/common/Makefile.in b/icu4c/source/common/Makefile.in index 080419fb402..409f85cdfa4 100644 --- a/icu4c/source/common/Makefile.in +++ b/icu4c/source/common/Makefile.in @@ -72,10 +72,11 @@ udata.o ucmndata.o udatamem.o umapfile.o filestrm.o \ uresbund.o uresdata.o resbund.o cwchar.o uloc.o locid.o uhash.o uhash_us.o \ ucnv.o ucnv_bld.o ucnv_cb.o ucnv_cnv.o ucnv_err.o ucnv_io.o ucnvlat1.o \ ucnv_utf.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvscsu.o ucnvisci.o \ -unistr.o utf_impl.o ustring.o cstring.o ustrfmt.o ustrtrns.o \ +unistr.o utf_impl.o ustring.o ustrcase.o cstring.o ustrfmt.o ustrtrns.o \ normlzr.o unorm.o chariter.o schriter.o uchriter.o uiter.o \ uchar.o bidi.o ubidi.o ubidiwrt.o ubidiln.o ushape.o unames.o ucln_cmn.o \ uscript.o umemstrm.o ucmp8.o ucmpe32.o uvector.o digitlst.o \ +brkiter.o brkdict.o ubrk.o dbbi.o dbbi_tbl.o rbbi.o rbbi_tbl.o \ unicode.o scsu.o convert.o utrie.o STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) diff --git a/icu4c/source/i18n/brkdict.cpp b/icu4c/source/common/brkdict.cpp similarity index 100% rename from icu4c/source/i18n/brkdict.cpp rename to icu4c/source/common/brkdict.cpp diff --git a/icu4c/source/i18n/brkdict.h b/icu4c/source/common/brkdict.h similarity index 100% rename from icu4c/source/i18n/brkdict.h rename to icu4c/source/common/brkdict.h diff --git a/icu4c/source/i18n/brkiter.cpp b/icu4c/source/common/brkiter.cpp similarity index 100% rename from icu4c/source/i18n/brkiter.cpp rename to icu4c/source/common/brkiter.cpp diff --git a/icu4c/source/common/common.dsp b/icu4c/source/common/common.dsp index eb052fee691..c409c2dd224 100644 --- a/icu4c/source/common/common.dsp +++ b/icu4c/source/common/common.dsp @@ -98,6 +98,14 @@ SOURCE=.\bidi.cpp # End Source File # Begin Source File +SOURCE=.\brkdict.cpp +# End Source File +# Begin Source File + +SOURCE=.\brkiter.cpp +# End Source File +# Begin Source File + SOURCE=.\chariter.cpp # End Source File # Begin Source File @@ -114,6 +122,14 @@ SOURCE=.\cwchar.c # End Source File # Begin Source File +SOURCE=.\dbbi.cpp +# End Source File +# Begin Source File + +SOURCE=.\dbbi_tbl.cpp +# End Source File +# Begin Source File + SOURCE=.\digitlst.cpp # End Source File # Begin Source File @@ -143,6 +159,14 @@ SOURCE=.\putil.c # End Source File # Begin Source File +SOURCE=.\rbbi.cpp +# End Source File +# Begin Source File + +SOURCE=.\rbbi_tbl.cpp +# End Source File +# Begin Source File + SOURCE=.\resbund.cpp # End Source File # Begin Source File @@ -167,6 +191,10 @@ SOURCE=.\ubidiwrt.c # End Source File # Begin Source File +SOURCE=.\ubrk.cpp +# End Source File +# Begin Source File + SOURCE=.\uchar.c # End Source File # Begin Source File @@ -318,6 +346,10 @@ SOURCE=.\ushape.c # End Source File # Begin Source File +SOURCE=.\ustrcase.c +# End Source File +# Begin Source File + SOURCE=.\ustrfmt.c # End Source File # Begin Source File @@ -373,6 +405,37 @@ InputPath=.\unicode\bidi.h # End Source File # Begin Source File +SOURCE=.\brkdict.h +# End Source File +# Begin Source File + +SOURCE=.\unicode\brkiter.h + +!IF "$(CFG)" == "common - Win32 Release" + +# Begin Custom Build +InputPath=.\unicode\brkiter.h + +"..\..\include\unicode\brkiter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy unicode\brkiter.h ..\..\include\unicode + +# End Custom Build + +!ELSEIF "$(CFG)" == "common - Win32 Debug" + +# Begin Custom Build +InputPath=.\unicode\brkiter.h + +"..\..\include\unicode\brkiter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy unicode\brkiter.h ..\..\include\unicode + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + SOURCE=.\unicode\chariter.h !IF "$(CFG)" == "common - Win32 Release" @@ -443,6 +506,37 @@ SOURCE=.\cwchar.h # End Source File # Begin Source File +SOURCE=.\unicode\dbbi.h + +!IF "$(CFG)" == "common - Win32 Release" + +# Begin Custom Build +InputPath=.\unicode\dbbi.h + +"..\..\include\unicode\dbbi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy unicode\dbbi.h ..\..\include\unicode + +# End Custom Build + +!ELSEIF "$(CFG)" == "common - Win32 Debug" + +# Begin Custom Build +InputPath=.\unicode\dbbi.h + +"..\..\include\unicode\dbbi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy unicode\dbbi.h ..\..\include\unicode + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\dbbi_tbl.h +# End Source File +# Begin Source File + SOURCE=.\digitlst.h # End Source File # Begin Source File @@ -571,6 +665,37 @@ InputPath=.\unicode\pwin32.h # End Source File # Begin Source File +SOURCE=.\unicode\rbbi.h + +!IF "$(CFG)" == "common - Win32 Release" + +# Begin Custom Build +InputPath=.\unicode\rbbi.h + +"..\..\include\unicode\rbbi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy unicode\rbbi.h ..\..\include\unicode + +# End Custom Build + +!ELSEIF "$(CFG)" == "common - Win32 Debug" + +# Begin Custom Build +InputPath=.\unicode\rbbi.h + +"..\..\include\unicode\rbbi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy unicode\rbbi.h ..\..\include\unicode + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\rbbi_tbl.h +# End Source File +# Begin Source File + SOURCE=.\unicode\rep.h !IF "$(CFG)" == "common - Win32 Release" @@ -710,6 +835,33 @@ SOURCE=.\ubidiimp.h # End Source File # Begin Source File +SOURCE=.\unicode\ubrk.h + +!IF "$(CFG)" == "common - Win32 Release" + +# Begin Custom Build +InputPath=.\unicode\ubrk.h + +"..\..\include\unicode\ubrk.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy unicode\ubrk.h ..\..\include\unicode + +# End Custom Build + +!ELSEIF "$(CFG)" == "common - Win32 Debug" + +# Begin Custom Build +InputPath=.\unicode\ubrk.h + +"..\..\include\unicode\ubrk.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy unicode\ubrk.h ..\..\include\unicode + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + SOURCE=.\unicode\uchar.h !IF "$(CFG)" == "common - Win32 Release" diff --git a/icu4c/source/i18n/dbbi.cpp b/icu4c/source/common/dbbi.cpp similarity index 100% rename from icu4c/source/i18n/dbbi.cpp rename to icu4c/source/common/dbbi.cpp diff --git a/icu4c/source/i18n/dbbi_tbl.cpp b/icu4c/source/common/dbbi_tbl.cpp similarity index 100% rename from icu4c/source/i18n/dbbi_tbl.cpp rename to icu4c/source/common/dbbi_tbl.cpp diff --git a/icu4c/source/i18n/dbbi_tbl.h b/icu4c/source/common/dbbi_tbl.h similarity index 100% rename from icu4c/source/i18n/dbbi_tbl.h rename to icu4c/source/common/dbbi_tbl.h diff --git a/icu4c/source/i18n/rbbi.cpp b/icu4c/source/common/rbbi.cpp similarity index 100% rename from icu4c/source/i18n/rbbi.cpp rename to icu4c/source/common/rbbi.cpp diff --git a/icu4c/source/i18n/rbbi_tbl.cpp b/icu4c/source/common/rbbi_tbl.cpp similarity index 100% rename from icu4c/source/i18n/rbbi_tbl.cpp rename to icu4c/source/common/rbbi_tbl.cpp diff --git a/icu4c/source/i18n/rbbi_tbl.h b/icu4c/source/common/rbbi_tbl.h similarity index 100% rename from icu4c/source/i18n/rbbi_tbl.h rename to icu4c/source/common/rbbi_tbl.h diff --git a/icu4c/source/i18n/ubrk.cpp b/icu4c/source/common/ubrk.cpp similarity index 100% rename from icu4c/source/i18n/ubrk.cpp rename to icu4c/source/common/ubrk.cpp diff --git a/icu4c/source/i18n/unicode/brkiter.h b/icu4c/source/common/unicode/brkiter.h similarity index 99% rename from icu4c/source/i18n/unicode/brkiter.h rename to icu4c/source/common/unicode/brkiter.h index 335ef7b1beb..22a56804796 100644 --- a/icu4c/source/i18n/unicode/brkiter.h +++ b/icu4c/source/common/unicode/brkiter.h @@ -177,7 +177,7 @@ U_NAMESPACE_BEGIN * \endcode * */ -class U_I18N_API BreakIterator { +class U_COMMON_API BreakIterator { public: virtual ~BreakIterator(); diff --git a/icu4c/source/i18n/unicode/dbbi.h b/icu4c/source/common/unicode/dbbi.h similarity index 99% rename from icu4c/source/i18n/unicode/dbbi.h rename to icu4c/source/common/unicode/dbbi.h index 293b0f524cd..be0edab4c8f 100644 --- a/icu4c/source/i18n/unicode/dbbi.h +++ b/icu4c/source/common/unicode/dbbi.h @@ -46,7 +46,7 @@ class DictionaryBasedBreakIteratorTables; * NOTE The DictionaryBasedIterator class is still under development. The * APIs are not in stable condition yet. */ -class U_I18N_API DictionaryBasedBreakIterator : public RuleBasedBreakIterator { +class U_COMMON_API DictionaryBasedBreakIterator : public RuleBasedBreakIterator { private: /** diff --git a/icu4c/source/i18n/unicode/rbbi.h b/icu4c/source/common/unicode/rbbi.h similarity index 99% rename from icu4c/source/i18n/unicode/rbbi.h rename to icu4c/source/common/unicode/rbbi.h index 06d53049eda..02a21ca54a5 100644 --- a/icu4c/source/i18n/unicode/rbbi.h +++ b/icu4c/source/common/unicode/rbbi.h @@ -183,7 +183,7 @@ class BreakIterator; * * @author Richard Gillam */ -class U_I18N_API RuleBasedBreakIterator : public BreakIterator { +class U_COMMON_API RuleBasedBreakIterator : public BreakIterator { public: /** diff --git a/icu4c/source/i18n/unicode/ubrk.h b/icu4c/source/common/unicode/ubrk.h similarity index 100% rename from icu4c/source/i18n/unicode/ubrk.h rename to icu4c/source/common/unicode/ubrk.h diff --git a/icu4c/source/i18n/Makefile.in b/icu4c/source/i18n/Makefile.in index 34fa7f32dcc..b96bfd49079 100644 --- a/icu4c/source/i18n/Makefile.in +++ b/icu4c/source/i18n/Makefile.in @@ -59,7 +59,7 @@ endif LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) LIBS = $(LIBICUUC) @LIBS@ -OBJECTS = ucln_in.o brkiter.o brkdict.o ubrk.o \ +OBJECTS = ucln_in.o \ fmtable.o format.o msgfmt.o umsg.o numfmt.o unum.o decimfmt.o dcfmtsym.o \ choicfmt.o datefmt.o smpdtfmt.o dtfmtsym.o udat.o \ ucal.o calendar.o gregocal.o timezone.o simpletz.o \ @@ -68,7 +68,7 @@ ucol.o ucol_bld.o ucol_cnt.o ucol_elm.o ucol_tok.o ucol_wgt.o tblcoll.o \ strmatch.o usearch.o search.o stsearch.o \ uniset.o unifltlg.o translit.o utrans.o \ cpdtrans.o hextouni.o rbt.o rbt_data.o rbt_pars.o rbt_rule.o rbt_set.o \ -dbbi.o dbbi_tbl.o rbbi.o rbbi_tbl.o nultrans.o \ +nultrans.o \ remtrans.o titletrn.o tolowtrn.o toupptrn.o xformtrn.o \ name2uni.o uni2name.o unitohex.o nortrans.o unifilt.o quant.o transreg.o \ llong.o nfrs.o nfrule.o nfsubs.o rbnf.o upropset.o util.o esctrn.o unesctrn.o \ diff --git a/icu4c/source/i18n/i18n.dsp b/icu4c/source/i18n/i18n.dsp index 5164408f195..5ee9c5aabd2 100644 --- a/icu4c/source/i18n/i18n.dsp +++ b/icu4c/source/i18n/i18n.dsp @@ -98,14 +98,6 @@ SOURCE=.\bocsu.c # End Source File # Begin Source File -SOURCE=.\brkdict.cpp -# End Source File -# Begin Source File - -SOURCE=.\brkiter.cpp -# End Source File -# Begin Source File - SOURCE=.\calendar.cpp # End Source File # Begin Source File @@ -134,14 +126,6 @@ SOURCE=.\datefmt.cpp # End Source File # Begin Source File -SOURCE=.\dbbi.cpp -# End Source File -# Begin Source File - -SOURCE=.\dbbi_tbl.cpp -# End Source File -# Begin Source File - SOURCE=.\dcfmtsym.cpp # End Source File # Begin Source File @@ -218,14 +202,6 @@ SOURCE=.\quant.cpp # End Source File # Begin Source File -SOURCE=.\rbbi.cpp -# End Source File -# Begin Source File - -SOURCE=.\rbbi_tbl.cpp -# End Source File -# Begin Source File - SOURCE=.\rbnf.cpp # End Source File # Begin Source File @@ -314,10 +290,6 @@ SOURCE=.\tridpars.cpp # End Source File # Begin Source File -SOURCE=.\ubrk.cpp -# End Source File -# Begin Source File - SOURCE=.\ucal.cpp # End Source File # Begin Source File @@ -422,37 +394,6 @@ SOURCE=.\bocsu.h # End Source File # Begin Source File -SOURCE=.\brkdict.h -# End Source File -# Begin Source File - -SOURCE=.\unicode\brkiter.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\brkiter.h - -"..\..\include\unicode\brkiter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy unicode\brkiter.h ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\brkiter.h - -"..\..\include\unicode\brkiter.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy unicode\brkiter.h ..\..\include\unicode - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - SOURCE=.\unicode\calendar.h !IF "$(CFG)" == "i18n - Win32 Release" @@ -646,37 +587,6 @@ InputPath=.\unicode\datefmt.h # End Source File # Begin Source File -SOURCE=.\unicode\dbbi.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\dbbi.h - -"..\..\include\unicode\dbbi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy unicode\dbbi.h ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\dbbi.h - -"..\..\include\unicode\dbbi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy unicode\dbbi.h ..\..\include\unicode - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\dbbi_tbl.h -# End Source File -# Begin Source File - SOURCE=.\unicode\dcfmtsym.h !IF "$(CFG)" == "i18n - Win32 Release" @@ -1060,37 +970,6 @@ SOURCE=.\quant.h # End Source File # Begin Source File -SOURCE=.\unicode\rbbi.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\rbbi.h - -"..\..\include\unicode\rbbi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy unicode\rbbi.h ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\rbbi.h - -"..\..\include\unicode\rbbi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy unicode\rbbi.h ..\..\include\unicode - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\rbbi_tbl.h -# End Source File -# Begin Source File - SOURCE=.\unicode\rbnf.h !IF "$(CFG)" == "i18n - Win32 Release" @@ -1405,33 +1284,6 @@ SOURCE=.\tzdat.h # End Source File # Begin Source File -SOURCE=.\unicode\ubrk.h - -!IF "$(CFG)" == "i18n - Win32 Release" - -# Begin Custom Build -InputPath=.\unicode\ubrk.h - -"..\..\include\unicode\ubrk.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy unicode\ubrk.h ..\..\include\unicode - -# End Custom Build - -!ELSEIF "$(CFG)" == "i18n - Win32 Debug" - -# Begin Custom Build -InputPath=.\unicode\ubrk.h - -"..\..\include\unicode\ubrk.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy unicode\ubrk.h ..\..\include\unicode - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - SOURCE=.\unicode\ucal.h !IF "$(CFG)" == "i18n - Win32 Release"