ICU-5138 Separate the platform independent math from putil.c
X-SVN-Rev: 19501
This commit is contained in:
parent
ac1228488e
commit
9b0162b829
@ -61,7 +61,7 @@ LDFLAGS += $(LDFLAGSICUUC)
|
||||
# $(LIBICUDT) is either stub data or the real DLL common data.
|
||||
LIBS = $(LIBICUDT) $(DEFAULT_LIBS)
|
||||
|
||||
OBJECTS = putil.o utypes.o uinvchar.o umutex.o ucln_cmn.o uinit.o uobject.o cmemory.o \
|
||||
OBJECTS = putil.o umath.o utypes.o uinvchar.o umutex.o ucln_cmn.o uinit.o uobject.o cmemory.o \
|
||||
udata.o ucmndata.o udatamem.o umapfile.o udataswp.o ucol_swp.o utrace.o \
|
||||
uhash.o uhash_us.o uenum.o ustrenum.o uvector.o ustack.o uvectr32.o \
|
||||
ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o ucnv_cb.o ucnv_err.o ucnvlat1.o \
|
||||
|
@ -648,6 +648,9 @@
|
||||
Outputs="..\..\include\unicode\$(InputFileName)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\umath.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\umutex.c">
|
||||
<FileConfiguration
|
||||
|
@ -424,12 +424,6 @@ uprv_fmax(double x, double y)
|
||||
return (x > y ? x : y);
|
||||
}
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uprv_max(int32_t x, int32_t y)
|
||||
{
|
||||
return (x > y ? x : y);
|
||||
}
|
||||
|
||||
U_CAPI double U_EXPORT2
|
||||
uprv_fmin(double x, double y)
|
||||
{
|
||||
@ -451,12 +445,6 @@ uprv_fmin(double x, double y)
|
||||
return (x > y ? y : x);
|
||||
}
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uprv_min(int32_t x, int32_t y)
|
||||
{
|
||||
return (x > y ? y : x);
|
||||
}
|
||||
|
||||
/**
|
||||
* Truncates the given double.
|
||||
* trunc(3.3) = 3.0, trunc (-3.3) = -3.0
|
||||
|
24
icu4c/source/common/umath.c
Normal file
24
icu4c/source/common/umath.c
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1997-2006, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
******************************************************************************
|
||||
* This file contains platform independent math.
|
||||
*/
|
||||
|
||||
#include "putilimp.h"
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uprv_max(int32_t x, int32_t y)
|
||||
{
|
||||
return (x > y ? x : y);
|
||||
}
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uprv_min(int32_t x, int32_t y)
|
||||
{
|
||||
return (x > y ? y : x);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user