diff --git a/modules/unicharutil/public/MANIFEST b/modules/unicharutil/public/MANIFEST deleted file mode 100644 index 448ee914c1f0..000000000000 --- a/modules/unicharutil/public/MANIFEST +++ /dev/null @@ -1,6 +0,0 @@ -# -# -# - -nsICaseConversion.h -nsUnicharUtilCIID.h diff --git a/modules/unicharutil/public/Makefile.in b/modules/unicharutil/public/Makefile.in deleted file mode 100644 index bd4b023bd3f8..000000000000 --- a/modules/unicharutil/public/Makefile.in +++ /dev/null @@ -1,32 +0,0 @@ -#!gmake -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -MODULE = unicharutil - -EXPORTS = nsICaseConversion.h \ - nsUnicharUtilCIID.h \ - $(NULL) - -EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) - -include $(topsrcdir)/config/rules.mk diff --git a/modules/unicharutil/public/makefile.win b/modules/unicharutil/public/makefile.win deleted file mode 100644 index e3100ea91592..000000000000 --- a/modules/unicharutil/public/makefile.win +++ /dev/null @@ -1,28 +0,0 @@ -#!nmake -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH=..\..\.. -IGNORE_MANIFEST=1 - -EXPORTS = \ - nsICaseConversion.h \ - nsUnicharUtilCIID.h \ - $(NULL) - -MODULE=unicharutil - -include <$(DEPTH)\config\rules.mak> diff --git a/modules/unicharutil/public/nsICaseConversion.h b/modules/unicharutil/public/nsICaseConversion.h deleted file mode 100644 index 776bc1db99e1..000000000000 --- a/modules/unicharutil/public/nsICaseConversion.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#ifndef nsICaseConversion_h__ -#define nsICaseConversion_h__ - - -#include "nsISupports.h" -#include "nscore.h" - -// {07D3D8E0-9614-11d2-B3AD-00805F8A6670} -#define NS_ICASECONVERSION_IID \ -{ 0x7d3d8e0, 0x9614, 0x11d2, \ - { 0xb3, 0xad, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } } - -class nsICaseConversion : public nsISupports { - -public: - - // Convert one Unicode character into upper case - NS_IMETHOD ToUpper( PRUnichar aChar, PRUnichar* aReturn) = 0; - - // Convert one Unicode character into lower case - NS_IMETHOD ToLower( PRUnichar aChar, PRUnichar* aReturn) = 0; - - // Convert one Unicode character into title case - NS_IMETHOD ToTitle( PRUnichar aChar, PRUnichar* aReturn) = 0; - - // Convert an array of Unicode characters into upper case - NS_IMETHOD ToUpper( const PRUnichar* anArray, PRUnichar* aReturn, PRUint32 aLen) = 0; - - // Convert an array of Unicode characters into lower case - NS_IMETHOD ToLower( const PRUnichar* anArray, PRUnichar* aReturn, PRUint32 aLen) = 0; - - // Convert an array of Unicode characters into title case - NS_IMETHOD ToTitle( const PRUnichar* anArray, PRUnichar* aReturn, PRUint32 aLen) = 0; - -}; - -#endif /* nsICaseConversion_h__ */ diff --git a/modules/unicharutil/public/nsUnicharUtilCIID.h b/modules/unicharutil/public/nsUnicharUtilCIID.h deleted file mode 100644 index 4c6b67c9b5c7..000000000000 --- a/modules/unicharutil/public/nsUnicharUtilCIID.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#ifndef nsUnicharUtilCIID_h__ -#define nsUnicharUtilCIID_h__ - - -#include "nsISupports.h" -#include "nscore.h" - -#define NS_UNICHARUTIL_CID \ -{ 0xcc10c750, 0x9ec3, 0x11d2, \ - { 0xb3, 0xae, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } } - -#endif diff --git a/modules/unicharutil/tests/Makefile.in b/modules/unicharutil/tests/Makefile.in deleted file mode 100644 index 4d18ffb23dc3..000000000000 --- a/modules/unicharutil/tests/Makefile.in +++ /dev/null @@ -1,49 +0,0 @@ -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. - -DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -CPPSRCS = UnicharSelfTest.cpp - -include $(topsrcdir)/config/rules.mk - -#DEFINES += -DUSE_NSREG -INCLUDES += -I$(srcdir)/../public -I$(DIST)/include - -EX_LIBS = $(DIST)/lib/libxpcom.$(LIB_SUFFIX) \ - $(NULL) - -PROGS = $(addprefix $(OBJDIR)/, $(CPPSRCS:.cpp=)) - -TARGETS = $(PROGS) - -ifeq ($(OS_ARCH),Rhapsody) -$(PROGS):$(OBJDIR)/%: $(OBJDIR)/%.o $(EX_LIBS) - @$(MAKE_OBJDIR) - $(CC) -o $@ $@.o $(LDFLAGS) $(EX_LIBS) $(NSPR_LIBS) $(OS_LIBS) -else -$(PROGS):$(OBJDIR)/%: $(OBJDIR)/%.o $(EX_LIBS) - @$(MAKE_OBJDIR) - $(CCC) -o $@ $@.o $(LDFLAGS) $(EX_LIBS) $(NSPR_LIBS) $(OS_LIBS) -endif - -install:: $(PROGS) - $(INSTALL) $(PROGS) $(DIST)/bin diff --git a/modules/unicharutil/tests/UnicharSelfTest.cpp b/modules/unicharutil/tests/UnicharSelfTest.cpp deleted file mode 100644 index 62e269ae5c71..000000000000 --- a/modules/unicharutil/tests/UnicharSelfTest.cpp +++ /dev/null @@ -1,380 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ -#include -#include "nsISupports.h" -#include "nsRepository.h" -#include "nsICaseConversion.h" -#include "nsUnicharUtilCIID.h" - -NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID); -NS_DEFINE_IID(kCaseConversionIID, NS_ICASECONVERSION_IID); - -#ifdef XP_UNIX -#define UNICHARUTIL_DLL_NAME "libunicharutil.so" -#else -#define UNICHARUTIL_DLL_NAME "UNICHARUTIL_DLL" -#endif - -#define TESTLEN 29 -#define T2LEN TESTLEN -#define T3LEN TESTLEN -#define T4LEN TESTLEN - -// test data for ToUpper -static PRUnichar t2data [T2LEN+1] = { - 0x0031 , // 0 - 0x0019 , // 1 - 0x0043 , // 2 - 0x0067 , // 3 - 0x00C8 , // 4 - 0x00E9 , // 5 - 0x0147 , // 6 - 0x01C4 , // 7 - 0x01C6 , // 8 - 0x01C5 , // 9 - 0x03C0 , // 10 - 0x03B2 , // 11 - 0x0438 , // 12 - 0x04A5 , // 13 - 0x05D0 , // 14 - 0x0A20 , // 15 - 0x30B0 , // 16 - 0x5185 , // 17 - 0xC021 , // 18 - 0xFF48 , // 19 - 0x01C7 , // 20 - 0x01C8 , // 21 - 0x01C9 , // 22 - 0x01CA , // 23 - 0x01CB , // 24 - 0x01CC , // 25 - 0x01F1 , // 26 - 0x01F2 , // 27 - 0x01F3 , // 28 - 0x00 -}; -// expected result for ToUpper -static PRUnichar t2result[T2LEN+1] = { - 0x0031 , // 0 - 0x0019 , // 1 - 0x0043 , // 2 - 0x0047 , // 3 - 0x00C8 , // 4 - 0x00C9 , // 5 - 0x0147 , // 6 - 0x01C4 , // 7 - 0x01C4 , // 8 - 0x01C4 , // 9 - 0x03A0 , // 10 - 0x0392 , // 11 - 0x0418 , // 12 - 0x04A4 , // 13 - 0x05D0 , // 14 - 0x0A20 , // 15 - 0x30B0 , // 16 - 0x5185 , // 17 - 0xC021 , // 18 - 0xFF28 , // 19 - 0x01C7 , // 20 - 0x01C7 , // 21 - 0x01C7 , // 22 - 0x01CA , // 23 - 0x01CA , // 24 - 0x01CA , // 25 - 0x01F1 , // 26 - 0x01F1 , // 27 - 0x01F1 , // 28 - 0x00 -}; -// test data for ToLower -static PRUnichar t3data [T3LEN+1] = { - 0x0031 , // 0 - 0x0019 , // 1 - 0x0043 , // 2 - 0x0067 , // 3 - 0x00C8 , // 4 - 0x00E9 , // 5 - 0x0147 , // 6 - 0x01C4 , // 7 - 0x01C6 , // 8 - 0x01C5 , // 9 - 0x03A0 , // 10 - 0x0392 , // 11 - 0x0418 , // 12 - 0x04A4 , // 13 - 0x05D0 , // 14 - 0x0A20 , // 15 - 0x30B0 , // 16 - 0x5187 , // 17 - 0xC023 , // 18 - 0xFF28 , // 19 - 0x01C7 , // 20 - 0x01C8 , // 21 - 0x01C9 , // 22 - 0x01CA , // 23 - 0x01CB , // 24 - 0x01CC , // 25 - 0x01F1 , // 26 - 0x01F2 , // 27 - 0x01F3 , // 28 - 0x00 -}; -// expected result for ToLower -static PRUnichar t3result[T3LEN+1] = { - 0x0031 , // 0 - 0x0019 , // 1 - 0x0063 , // 2 - 0x0067 , // 3 - 0x00E8 , // 4 - 0x00E9 , // 5 - 0x0148 , // 6 - 0x01C6 , // 7 - 0x01C6 , // 8 - 0x01C6 , // 9 - 0x03C0 , // 10 - 0x03B2 , // 11 - 0x0438 , // 12 - 0x04A5 , // 13 - 0x05D0 , // 14 - 0x0A20 , // 15 - 0x30B0 , // 16 - 0x5187 , // 17 - 0xC023 , // 18 - 0xFF48 , // 19 - 0x01C9 , // 20 - 0x01C9 , // 21 - 0x01C9 , // 22 - 0x01CC , // 23 - 0x01CC , // 24 - 0x01CC , // 25 - 0x01F3 , // 26 - 0x01F3 , // 27 - 0x01F3 , // 28 - 0x00 -}; -// test data for ToTitle -static PRUnichar t4data [T4LEN+1] = { - 0x0031 , // 0 - 0x0019 , // 1 - 0x0043 , // 2 - 0x0067 , // 3 - 0x00C8 , // 4 - 0x00E9 , // 5 - 0x0147 , // 6 - 0x01C4 , // 7 - 0x01C6 , // 8 - 0x01C5 , // 9 - 0x03C0 , // 10 - 0x03B2 , // 11 - 0x0438 , // 12 - 0x04A5 , // 13 - 0x05D0 , // 14 - 0x0A20 , // 15 - 0x30B0 , // 16 - 0x5189 , // 17 - 0xC013 , // 18 - 0xFF52 , // 19 - 0x01C7 , // 20 - 0x01C8 , // 21 - 0x01C9 , // 22 - 0x01CA , // 23 - 0x01CB , // 24 - 0x01CC , // 25 - 0x01F1 , // 26 - 0x01F2 , // 27 - 0x01F3 , // 28 - 0x00 -}; -// expected result for ToTitle -static PRUnichar t4result[T4LEN+1] = { - 0x0031 , // 0 - 0x0019 , // 1 - 0x0043 , // 2 - 0x0047 , // 3 - 0x00C8 , // 4 - 0x00C9 , // 5 - 0x0147 , // 6 - 0x01C5 , // 7 - 0x01C5 , // 8 - 0x01C5 , // 9 - 0x03A0 , // 10 - 0x0392 , // 11 - 0x0418 , // 12 - 0x04A4 , // 13 - 0x05D0 , // 14 - 0x0A20 , // 15 - 0x30B0 , // 16 - 0x5189 , // 17 - 0xC013 , // 18 - 0xFF32 , // 19 - 0x01C8 , // 20 - 0x01C8 , // 21 - 0x01C8 , // 22 - 0x01CB , // 23 - 0x01CB , // 24 - 0x01CB , // 25 - 0x01F2 , // 26 - 0x01F2 , // 27 - 0x01F2 , // 28 - 0x00 -}; - -void TestCaseConversion() -{ - cout << "==============================\n"; - cout << "Start nsICaseConversion Test \n"; - cout << "==============================\n"; - nsICaseConversion *t = NULL; - nsresult res; - res = nsRepository::CreateInstance(kUnicharUtilCID, - NULL, - kCaseConversionIID, - (void**) &t); - - cout << "Test 1 - CreateInstance():\n"; - if(NS_FAILED(res) || ( t == NULL ) ) { - cout << "\t1st CreateInstance failed\n"; - } else { - t->Release(); - } - - res = nsRepository::CreateInstance(kUnicharUtilCID, - NULL, - kCaseConversionIID, - (void**) &t); - - if(NS_FAILED(res) || ( t == NULL ) ) { - cout << "\t2nd CreateInstance failed\n"; - } else { - int i; - PRUnichar ch; - PRUnichar buf[256]; - nsresult res; - - cout << "Test 2 - ToUpper(PRUnichar, PRUnichar*):\n"; - for(i=0;i < T2LEN ; i++) - { - res = t->ToUpper(t2data[i], &ch); - if(NS_FAILED(res)) { - cout << "\tFailed!! return value != NS_OK\n"; - break; - } - if(ch != t2result[i]) - cout << "\tFailed!! result unexpected " << i << "\n"; - } - - - cout << "Test 3 - ToLower(PRUnichar, PRUnichar*):\n"; - for(i=0;i < T3LEN; i++) - { - res = t->ToLower(t3data[i], &ch); - if(NS_FAILED(res)) { - cout << "\tFailed!! return value != NS_OK\n"; - break; - } - if(ch != t3result[i]) - cout << "\tFailed!! result unexpected " << i << "\n"; - } - - - cout << "Test 4 - ToTitle(PRUnichar, PRUnichar*):\n"; - for(i=0;i < T4LEN; i++) - { - res = t->ToTitle(t4data[i], &ch); - if(NS_FAILED(res)) { - cout << "\tFailed!! return value != NS_OK\n"; - break; - } - if(ch != t4result[i]) - cout << "\tFailed!! result unexpected " << i << "\n"; - } - - - cout << "Test 5 - ToUpper(PRUnichar*, PRUnichar*, PRUint32):\n"; - res = t->ToUpper(t2data, buf, T2LEN); - if(NS_FAILED(res)) { - cout << "\tFailed!! return value != NS_OK\n"; - } else { - for(i = 0; i < T2LEN; i++) - { - if(buf[i] != t2result[i]) - { - cout << "\tFailed!! result unexpected " << i << "\n"; - break; - } - } - } - - cout << "Test 6 - ToLower(PRUnichar*, PRUnichar*, PRUint32):\n"; - res = t->ToLower(t3data, buf, T3LEN); - if(NS_FAILED(res)) { - cout << "\tFailed!! return value != NS_OK\n"; - } else { - for(i = 0; i < T3LEN; i++) - { - if(buf[i] != t3result[i]) - { - cout << "\tFailed!! result unexpected " << i << "\n"; - break; - } - } - } - - cout << "Test 7 - ToTitle(PRUnichar*, PRUnichar*, PRUint32):\n"; - cout << "!!! To Be Implemented !!!\n"; - - t->Release(); - } - cout << "==============================\n"; - cout << "Finish nsICaseConversion Test \n"; - cout << "==============================\n"; - -} - -void RegisterFactories() -{ - nsresult res; - res = nsRepository::RegisterFactory(kUnicharUtilCID, - UNICHARUTIL_DLL_NAME, - PR_FALSE, - PR_TRUE); - if(NS_FAILED(res)) - cout << "RegisterFactory failed\n"; -} - -int main(int argc, char** argv) { - -#ifndef USE_NSREG - RegisterFactories(); -#endif - - // -------------------------------------------- - - TestCaseConversion(); - - // -------------------------------------------- - cout << "Finish All The Test Cases\n"; - nsresult res = NS_OK; - res = nsRepository::FreeLibraries(); - - if(NS_FAILED(res)) - cout << "nsRepository failed\n"; - else - cout << "nsRepository FreeLibraries Done\n"; - return 0; -} diff --git a/modules/unicharutil/tests/macbuild/UnicharUtilSelfTest.mcp b/modules/unicharutil/tests/macbuild/UnicharUtilSelfTest.mcp deleted file mode 100644 index 2a14df5921f8..000000000000 Binary files a/modules/unicharutil/tests/macbuild/UnicharUtilSelfTest.mcp and /dev/null differ diff --git a/modules/unicharutil/tests/makefile.win b/modules/unicharutil/tests/makefile.win deleted file mode 100644 index 40441a52b783..000000000000 --- a/modules/unicharutil/tests/makefile.win +++ /dev/null @@ -1,61 +0,0 @@ -#!nmake -# -# The contents of this file are subject to the Netscape Public License -# Version 1.0 (the "NPL"); you may not use this file except in -# compliance with the NPL. You may obtain a copy of the NPL at -# http://www.mozilla.org/NPL/ -# -# Software distributed under the NPL is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL -# for the specific language governing rights and limitations under the -# NPL. -# -# The Initial Developer of this code under the NPL is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998 Netscape Communications Corporation. All Rights -# Reserved. -DEPTH = ..\..\.. - -IGNORE_MANIFEST=1 - - -MAKE_OBJ_TYPE = EXE -PROG1 = .\$(OBJDIR)\UnicharSelfTest.exe -PROGRAMS = $(PROG1) - -LCFLAGS=-DUSE_NSREG - -REQUIRES=libreg - -LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\unicharutil -I$(PUBLIC)\raptor - -LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(LIBNSPR) \ - $(DIST)\lib\libplc21.lib - -include <$(DEPTH)\config\rules.mak> - -install:: $(PROGRAMS) - -for %p in ($(PROGRAMS)) do $(MAKE_INSTALL) %p $(DIST)\bin - -clobber:: - -for %p in ($(PROGRAMS)) do $(RM) %p $(DIST)\bin\%p - -# Move this into config/obj.inc when it's allowed -.cpp{.\$(OBJDIR)\}.exe: - $(CC) @<<$(CFGFILE) - $(CFLAGS) - $(LCFLAGS) - $(LINCS) - $(LINCS_1) - $(INCS) - $(LLIBS) - $(OS_LIBS) - -Fd$(PBDFILE) - -Fe.\$(OBJDIR)\ - -Fo.\$(OBJDIR)\ - $(CURDIR)$(*B).cpp -<