/*
*******************************************************************************
*
-* Copyright (C) 2003-2010, International Business Machines
+* Copyright (C) 2003-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
const void *inData, int32_t length) {
const uint8_t *inBytes;
const UCATableHeader *inHeader;
- UCATableHeader header={ 0 };
+ UCATableHeader header;
if(ds==NULL || inData==NULL || length<-1) {
return FALSE;
* sizeof(UCATableHeader)==42*4 in ICU 2.8
* check the length against the header size before reading the size field
*/
+ uprv_memset(&header, 0, sizeof(header));
if(length<0) {
header.size=udata_readInt32(ds, inHeader->size);
} else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) {
const UCATableHeader *inHeader;
UCATableHeader *outHeader;
- UCATableHeader header={ 0 };
+ UCATableHeader header;
uint32_t count;
* sizeof(UCATableHeader)==42*4 in ICU 2.8
* check the length against the header size before reading the size field
*/
+ uprv_memset(&header, 0, sizeof(header));
if(length<0) {
header.size=udata_readInt32(ds, inHeader->size);
} else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) {
const InverseUCATableHeader *inHeader;
InverseUCATableHeader *outHeader;
- InverseUCATableHeader header={ 0 };
+ InverseUCATableHeader header={ 0,0,0,0,0,{0,0,0,0},{0,0,0,0,0,0,0,0} };
/* udata_swapDataHeader checks the arguments */
headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
-// Copyright (C) 2010, International Business Machines
+// Copyright (C) 2010-2012, International Business Machines
// Corporation and others. All Rights Reserved.
//
// Copyright 2001 and onwards Google Inc.
* Constructs from a std::string.
* @stable ICU 4.2
*/
- StringPiece(const U_STD_NSQ string& str)
+ StringPiece(const std::string& str)
: ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { }
#endif
/**
## -*-makefile-*-
-## Copyright (c) 2003-2009 IBM, Ken Foskey, and others. All rights reserved.
+## Copyright (c) 2003-2012 IBM, Ken Foskey, and others. All rights reserved.
##
## Aix-specific setup (for gcc)
##
SHARED_OBJECT_NO_VERSION = $(basename $(SO_TARGET)).$(SOBJ)
# The following is for Makefile.inc's use.
-ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
+#ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
# this one is for icudefs.mk's use
ifeq ($(ENABLE_SHARED),YES)
## -*-makefile-*-
## Aix-specific setup (for Visual Age 5+)
-## Copyright (c) 1999-2009, International Business Machines Corporation and
+## Copyright (c) 1999-2012, International Business Machines Corporation and
## others. All Rights Reserved.
## Commands to generate dependency files
LDLIBRARYPATH_ENVVAR = LIBPATH
# The following is for Makefile.inc's use.
-ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
+#ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
# this one is for icudefs.mk's use
ifeq ($(ENABLE_SHARED),YES)
## -*-makefile-*-
## HPUX/gcc specific setup
-## Copyright (c) 1999-2009, International Business Machines Corporation and
+## Copyright (c) 1999-2012, International Business Machines Corporation and
## others. All Rights Reserved.
## Commands to generate dependency files
## directory, at least.
LD_DEFAULTPATH= -Wl,+b,.:'$$'ORIGIN/
+GENCCODE_ASSEMBLY=-a gcc
+
# Get some handy functions defined properly
DEFS += -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L
## pkgdataMakefile.in for ICU data
-## Copyright (c) 2008, International Business Machines Corporation and
+## Copyright (c) 2008-2012, International Business Machines Corporation and
## others. All Rights Reserved.
## Source directory information
@echo SO=$(SO) >> $(OUTPUTFILE)
@echo SOBJ=$(SOBJ) >> $(OUTPUTFILE)
@echo A=$(A) >> $(OUTPUTFILE)
- @echo LIBPREFIX=$(LIBPREFIX) >> $(OUTPUTFILE)
+ @echo LIBPREFIX=$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED) >> $(OUTPUTFILE)
@echo LIB_EXT_ORDER=$(FINAL_SO_TARGET) >> $(OUTPUTFILE)
@echo COMPILE="$(COMPILE.c)" >> $(OUTPUTFILE)
@echo LIBFLAGS="-I$(prefix)/include $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)" >> $(OUTPUTFILE)
## pkgdataMakefile.in for ICU data
-## Copyright (c) 2008-2009, International Business Machines Corporation and
+## Copyright (c) 2008-2012, International Business Machines Corporation and
## others. All Rights Reserved.
## Source directory information
@echo SO=$(SO) >> $(OUTPUTFILE)
@echo SOBJ=$(SOBJ) >> $(OUTPUTFILE)
@echo A=$(A) >> $(OUTPUTFILE)
- @echo LIBPREFIX=$(LIBPREFIX) >> $(OUTPUTFILE)
+ @echo LIBPREFIX=$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED) >> $(OUTPUTFILE)
@echo LIB_EXT_ORDER=$(FINAL_SO_TARGET) >> $(OUTPUTFILE)
@echo COMPILE="$(COMPILE.c)" >> $(OUTPUTFILE)
@echo LIBFLAGS="-I$(top_srcdir)/common -I$(top_builddir)/common $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)" >> $(OUTPUTFILE)
## ******************************************************************************
## *
-## * Copyright (C) 1999-2009, International Business Machines
+## * Copyright (C) 1999-2012, International Business Machines
## * Corporation and others. All Rights Reserved.
## *
## *******************************************************************************
## Static mode
ifeq ($(UCONVMSG_MODE),static)
DEFS += -DUCONVMSG_LINK=$(MSGNAME)
-UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(MSGNAME).$(A)
+UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(MSGNAME).$(A)
LIBS += $(UCONVMSG_LIB)
PKGMODE=static
INSTALLTO=$(libdir)
## pkgdataMakefile.in for ICU data
-## Copyright (c) 2008-2009, International Business Machines Corporation and
+## Copyright (c) 2008-2012, International Business Machines Corporation and
## others. All Rights Reserved.
## Source directory information
@echo SO=$(SO) >> $(OUTPUTFILE)
@echo SOBJ=$(SOBJ) >> $(OUTPUTFILE)
@echo A=$(A) >> $(OUTPUTFILE)
- @echo LIBPREFIX=$(LIBPREFIX) >> $(OUTPUTFILE)
+ @echo LIBPREFIX=$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED) >> $(OUTPUTFILE)
@echo LIB_EXT_ORDER=$(FINAL_SO_TARGET) >> $(OUTPUTFILE)
@echo COMPILE="$(COMPILE.c)" >> $(OUTPUTFILE)
@echo LIBFLAGS="-I$(top_srcdir)/common -I$(top_builddir)/common $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)" >> $(OUTPUTFILE)
## pkgdataMakefile.in for ICU data
-## Copyright (c) 2008-2009, International Business Machines Corporation and
+## Copyright (c) 2008-2012, International Business Machines Corporation and
## others. All Rights Reserved.
## Source directory information
@echo SO=$(SO) >> $(OUTPUTFILE)
@echo SOBJ=$(SOBJ) >> $(OUTPUTFILE)
@echo A=$(A) >> $(OUTPUTFILE)
- @echo LIBPREFIX=$(LIBPREFIX) >> $(OUTPUTFILE)
+ @echo LIBPREFIX=$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED) >> $(OUTPUTFILE)
@echo LIB_EXT_ORDER=$(FINAL_SO_TARGET) >> $(OUTPUTFILE)
@echo COMPILE="$(COMPILE.c)" >> $(OUTPUTFILE)
@echo LIBFLAGS="-I$(top_srcdir)/common -I$(top_builddir)/common $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)" >> $(OUTPUTFILE)
/*
*******************************************************************************
*
-* Copyright (C) 2009-2010, International Business Machines
+* Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
}
// prepare the filename beginning with the source dir
- U_STD_NSQ string filename(options[SOURCEDIR].value);
+ std::string filename(options[SOURCEDIR].value);
int32_t pathLength=filename.length();
if( pathLength>0 &&
filename[pathLength-1]!=U_FILE_SEP_CHAR &&
/*
*******************************************************************************
*
-* Copyright (C) 2009-2010, International Business Machines
+* Copyright (C) 2009-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
int32_t mappingPhase;
MappingType mappingType;
- U_STD_NSQ vector<CompositionPair> *compositions;
+ std::vector<CompositionPair> *compositions;
uint8_t cc;
UBool combinesBack;
UBool hasNoCompBoundaryAfter;
// Insert (trail, composite) pair into compositions list for the lead character.
CompositionPair pair(trail, start);
Norm *leadNorm=createNorm(lead);
- U_STD_NSQ vector<CompositionPair> *compositions=leadNorm->compositions;
+ std::vector<CompositionPair> *compositions=leadNorm->compositions;
if(compositions==NULL) {
- compositions=leadNorm->compositions=new U_STD_NSQ vector<CompositionPair>;
+ compositions=leadNorm->compositions=new std::vector<CompositionPair>;
compositions->push_back(pair);
} else {
// Insertion sort, and check for duplicate trail characters.
- U_STD_NSQ vector<CompositionPair>::iterator it;
+ std::vector<CompositionPair>::iterator it;
for(it=compositions->begin(); it!=compositions->end(); ++it) {
if(trail==it->trail) {
fprintf(stderr,
UBool Normalizer2DataBuilder::combinesWithCCBetween(const Norm &norm,
uint8_t lowCC, uint8_t highCC) const {
- const U_STD_NSQ vector<CompositionPair> *compositions=norm.compositions;
+ const std::vector<CompositionPair> *compositions=norm.compositions;
if(compositions!=NULL && (highCC-lowCC)>=2) {
- U_STD_NSQ vector<CompositionPair>::const_iterator it;
+ std::vector<CompositionPair>::const_iterator it;
for(it=compositions->begin(); it!=compositions->end(); ++it) {
uint8_t trailCC=getCC(it->trail);
if(lowCC<trailCC && trailCC<highCC) {
}
UChar32 Normalizer2DataBuilder::combine(const Norm &norm, UChar32 trail) const {
- const U_STD_NSQ vector<CompositionPair> *compositions=norm.compositions;
+ const std::vector<CompositionPair> *compositions=norm.compositions;
if(compositions!=NULL) {
- U_STD_NSQ vector<CompositionPair>::const_iterator it;
+ std::vector<CompositionPair>::const_iterator it;
for(it=compositions->begin(); it!=compositions->end(); ++it) {
if(trail==it->trail) {
return it->composite;