sfputr.c sfraise.c sfrd.c sfread.c \
sfresize.c sfscanf.c sfseek.c sfsetbuf.c sfsetfd.c \
sfsk.c sfstack.c sfswap.c sfsync.c \
- sftable.c sftell.c sftmp.c sfungetc.c sfvprintf.c \
+ sftable.c sftmp.c sfungetc.c sfvprintf.c \
sfvscanf.c sfwr.c sfwrite.c
libsfio_C_la_DEPENDENCIES = \
extern ssize_t sfread(Sfio_t *, void *, size_t);
extern ssize_t sfwrite(Sfio_t *, const void *, size_t);
extern int sfclose(Sfio_t *);
- extern Sfoff_t sftell(Sfio_t *);
extern Sfoff_t sfseek(Sfio_t *, Sfoff_t, int);
extern ssize_t sfputr(Sfio_t *, const char *, int);
extern ssize_t sfnputc(Sfio_t *, int, size_t);
<ClCompile Include="sfswap.c" />
<ClCompile Include="sfsync.c" />
<ClCompile Include="sftable.c" />
- <ClCompile Include="sftell.c" />
<ClCompile Include="sftmp.c" />
<ClCompile Include="sfungetc.c" />
<ClCompile Include="sfvprintf.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>
-
-/* Tell the current location in a given stream
-**
-** Written by Kiem-Phong Vo.
-*/
-
-Sfoff_t sftell(Sfio_t * f)
-{
- int mode;
- Sfoff_t p;
-
- SFMTXSTART(f, (Sfoff_t) (-1));
-
- /* set the stream to the right mode */
- if ((mode = f->mode & SF_RDWR) != (int) f->mode
- && _sfmode(f, mode, 0) < 0)
- SFMTXRETURN(f, (Sfoff_t) (-1));
-
- /* throw away ungetc data */
- if (f->disc == _Sfudisc)
- (void) sfclose((*_Sfstack) (f, NIL(Sfio_t *)));
-
- if (f->flags & SF_STRING)
- SFMTXRETURN(f, (Sfoff_t) (f->next - f->data));
-
- /* let sfseek() handle the hard case */
- if (f->extent >= 0 && (f->flags & (SF_SHARE | SF_APPENDWR)))
- p = sfseek(f, (Sfoff_t) 0, 1);
- else
- p = f->here + ((f->mode & SF_WRITE) ? f->next - f->data : f->next -
- f->endb);
-
- SFMTXRETURN(f, p);
-}