ftell.c (82736) | ftell.c (82807) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Chris Torek. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 25 unchanged lines hidden (view full) --- 34 * SUCH DAMAGE. 35 */ 36 37#if defined(LIBC_SCCS) && !defined(lint) 38#if 0 39static char sccsid[] = "@(#)ftell.c 8.2 (Berkeley) 5/4/95"; 40#endif 41static const char rcsid[] = | 1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Chris Torek. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 25 unchanged lines hidden (view full) --- 34 * SUCH DAMAGE. 35 */ 36 37#if defined(LIBC_SCCS) && !defined(lint) 38#if 0 39static char sccsid[] = "@(#)ftell.c 8.2 (Berkeley) 5/4/95"; 40#endif 41static const char rcsid[] = |
42 "$FreeBSD: head/lib/libc/stdio/ftell.c 82736 2001-09-01 12:13:33Z ache $"; | 42 "$FreeBSD: head/lib/libc/stdio/ftell.c 82807 2001-09-02 19:10:10Z ache $"; |
43#endif /* LIBC_SCCS and not lint */ 44 45#include "namespace.h" 46#include <sys/types.h> 47#include <errno.h> 48#include <limits.h> 49#include <stdio.h> 50#include "un-namespace.h" --- 54 unchanged lines hidden (view full) --- 105 106 /* 107 * Find offset of underlying I/O object, then 108 * adjust for buffered bytes. 109 */ 110 if (fp->_flags & __SOFF) 111 pos = fp->_offset; 112 else { | 43#endif /* LIBC_SCCS and not lint */ 44 45#include "namespace.h" 46#include <sys/types.h> 47#include <errno.h> 48#include <limits.h> 49#include <stdio.h> 50#include "un-namespace.h" --- 54 unchanged lines hidden (view full) --- 105 106 /* 107 * Find offset of underlying I/O object, then 108 * adjust for buffered bytes. 109 */ 110 if (fp->_flags & __SOFF) 111 pos = fp->_offset; 112 else { |
113 pos = (*fp->_seek)(fp->_cookie, (fpos_t)0, SEEK_CUR); | 113 pos = _sseek(fp, (fpos_t)0, SEEK_CUR); |
114 if (pos == -1) 115 return (1); 116 } 117 if (fp->_flags & __SRD) { 118 /* 119 * Reading. Any unread characters (including 120 * those from ungetc) cause the position to be 121 * smaller than that in the underlying object. --- 24 unchanged lines hidden --- | 114 if (pos == -1) 115 return (1); 116 } 117 if (fp->_flags & __SRD) { 118 /* 119 * Reading. Any unread characters (including 120 * those from ungetc) cause the position to be 121 * smaller than that in the underlying object. --- 24 unchanged lines hidden --- |