noinst_LTLIBRARIES = libsfio_C.la
libsfio_C_la_SOURCES = sfclose.c sfclrlock.c sfcvt.c sfdisc.c \
- sfdlen.c sfexcept.c sfexit.c sfextern.c sffilbuf.c \
+ sfexcept.c sfexit.c sfextern.c sffilbuf.c \
sfflsbuf.c sfgetd.c sfgetl.c sfgetm.c sfgetr.c sfgetu.c \
sfllen.c sfmode.c sfnew.c sfnotify.c \
sfnputc.c sfopen.c sfpkrd.c sfpoll.c sfpool.c \
noinst_LTLIBRARIES = libsfiof_C.la
-libsfiof_C_la_SOURCES = _sfdlen.c _sfeof.c _sferror.c \
+libsfiof_C_la_SOURCES = _sfeof.c _sferror.c \
_sffileno.c _sfgetc.c _sfllen.c _sfputc.c _sfputd.c \
_sfputl.c _sfputm.c _sfputu.c _sfslen.c _sfstacked.c \
_sfulen.c _sfvalue.c
+++ /dev/null
-/* $Id$ $Revision$ */
-/* vim:set shiftwidth=4 ts=8: */
-
-/*************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************/
-
-#include <sfio/sfhdr.h>
-
-#undef sfdlen
-
-int sfdlen(Sfdouble_t v)
-{
- return __sf_dlen(v);
-}
+++ /dev/null
-/* $Id$ $Revision$ */
-/* vim:set shiftwidth=4 ts=8: */
-
-/*************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************/
-
-#include <sfio/sfhdr.h>
-
-#include <math.h>
-
-/* Return the length of a double value if coded in a portable format
-**
-** Written by Kiem-Phong Vo
-*/
-
-int _sfdlen(Sfdouble_t v)
-{
-#define N_ARRAY (16*sizeof(Sfdouble_t))
- int n, w;
- Sfdouble_t x;
- int exp;
-
- if (v < 0)
- v = -v;
-
- /* make the magnitude of v < 1 */
- if (v != 0.)
- v = frexp(v, &exp);
- else
- exp = 0;
-
- for (w = 1; w <= N_ARRAY; ++w) { /* get 2^SF_PRECIS precision at a time */
- n = (int) (x = ldexp(v, SF_PRECIS));
- v = x - n;
- if (v <= 0.)
- break;
- }
-
- return 1 + sfulen(exp) + w;
-}
extern ssize_t sfpkrd(int, void *, size_t, int, long, int);
/* portable handling of primitive types */
- extern int sfdlen(Sfdouble_t);
extern int sfllen(Sflong_t);
extern int sfulen(Sfulong_t);
extern int _sffilbuf(Sfio_t *, int);
- extern int _sfdlen(Sfdouble_t);
extern int _sfllen(Sflong_t);
extern int _sfulen(Sfulong_t);
(int)(*_SF_(f)->next++ = (unsigned char)(c)) )
#define __sf_getc(f) (_SF_(f)->next >= _SF_(f)->endr ? _sffilbuf(_SF_(f),0) : \
(int)(*_SF_(f)->next++) )
-#define __sf_dlen(v) (_sfdlen((Sfdouble_t)(v)) )
#define __sf_llen(v) (_sfllen((Sflong_t)(v)) )
#define __sf_ulen(v) ((Sfulong_t)(v) < SF_U1 ? 1 : (Sfulong_t)(v) < SF_U2 ? 2 : \
(Sfulong_t)(v) < SF_U3 ? 3 : (Sfulong_t)(v) < SF_U4 ? 4 : 5)
#define sfputm(f,v,m) ( __sf_putm((f),(v),(m)) )
#define sfputc(f,c) ( __sf_putc((f),(c)) )
#define sfgetc(f) ( __sf_getc(f) )
-#define sfdlen(v) ( __sf_dlen(v) )
#define sfllen(v) ( __sf_llen(v) )
#define sfulen(v) ( __sf_ulen(v) )
#define sffileno(f) ( __sf_fileno(f) )
<ClCompile Include="sfclrlock.c" />
<ClCompile Include="sfcvt.c" />
<ClCompile Include="sfdisc.c" />
- <ClCompile Include="sfdlen.c" />
<ClCompile Include="sfexcept.c" />
<ClCompile Include="sfexit.c" />
<ClCompile Include="sfextern.c" />
<ClCompile Include="sfgetm.c" />
<ClCompile Include="sfgetr.c" />
<ClCompile Include="sfgetu.c" />
- <ClCompile Include="sfio_f\_sfdlen.c" />
<ClCompile Include="sfio_f\_sfeof.c" />
<ClCompile Include="sfio_f\_sferror.c" />
<ClCompile Include="sfio_f\_sffileno.c" />
</ClInclude>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="sfio_f\_sfdlen.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="sfio_f\_sfeof.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sfdisc.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="sfdlen.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="sfexcept.c">
<Filter>Source Files</Filter>
</ClCompile>