ICU-5138 Separate the platform independent math from putil.c

X-SVN-Rev: 19501
This commit is contained in:
George Rhoten 2006-03-31 06:40:46 +00:00
parent ac1228488e
commit 9b0162b829
4 changed files with 28 additions and 13 deletions

View File

@ -61,7 +61,7 @@ LDFLAGS += $(LDFLAGSICUUC)
# $(LIBICUDT) is either stub data or the real DLL common data. # $(LIBICUDT) is either stub data or the real DLL common data.
LIBS = $(LIBICUDT) $(DEFAULT_LIBS) 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 \ 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 \ 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 \ ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o ucnv_cb.o ucnv_err.o ucnvlat1.o \

View File

@ -648,6 +648,9 @@
Outputs="..\..\include\unicode\$(InputFileName)"/> Outputs="..\..\include\unicode\$(InputFileName)"/>
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath=".\umath.c">
</File>
<File <File
RelativePath=".\umutex.c"> RelativePath=".\umutex.c">
<FileConfiguration <FileConfiguration

View File

@ -424,12 +424,6 @@ uprv_fmax(double x, double y)
return (x > y ? x : 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 U_CAPI double U_EXPORT2
uprv_fmin(double x, double y) uprv_fmin(double x, double y)
{ {
@ -451,12 +445,6 @@ uprv_fmin(double x, double y)
return (x > y ? y : x); 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. * Truncates the given double.
* trunc(3.3) = 3.0, trunc (-3.3) = -3.0 * trunc(3.3) = 3.0, trunc (-3.3) = -3.0

View 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);
}