Deleted Added
full compact
ungetc.c (72529) ungetc.c (82673)
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[] = "@(#)ungetc.c 8.2 (Berkeley) 11/3/93";
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[] = "@(#)ungetc.c 8.2 (Berkeley) 11/3/93";
40#endif
41static const char rcsid[] =
42 "$FreeBSD: head/lib/libc/stdio/ungetc.c 72529 2001-02-16 06:11:22Z imp $";
42 "$FreeBSD: head/lib/libc/stdio/ungetc.c 82673 2001-08-31 19:50:25Z ache $";
43#endif /* LIBC_SCCS and not lint */
44
45#include "namespace.h"
46#include <stdio.h>
47#include <stdlib.h>
48#include <string.h>
49#include "un-namespace.h"
50#include "local.h"

--- 76 unchanged lines hidden (view full) ---

127 if (__sflush(fp))
128 return (EOF);
129 fp->_flags &= ~__SWR;
130 fp->_w = 0;
131 fp->_lbfsize = 0;
132 }
133 fp->_flags |= __SRD;
134 }
43#endif /* LIBC_SCCS and not lint */
44
45#include "namespace.h"
46#include <stdio.h>
47#include <stdlib.h>
48#include <string.h>
49#include "un-namespace.h"
50#include "local.h"

--- 76 unchanged lines hidden (view full) ---

127 if (__sflush(fp))
128 return (EOF);
129 fp->_flags &= ~__SWR;
130 fp->_w = 0;
131 fp->_lbfsize = 0;
132 }
133 fp->_flags |= __SRD;
134 }
135
136 if (!(fp->_flags & __SSTR) && _ftello(fp) == 0)
137 return (EOF);
138
135 c = (unsigned char)c;
136
137 /*
138 * If we are in the middle of ungetc'ing, just continue.
139 * This may require expanding the current ungetc buffer.
140 */
141 if (HASUB(fp)) {
142 if (fp->_r >= fp->_ub._size && __submore(fp))

--- 32 unchanged lines hidden ---
139 c = (unsigned char)c;
140
141 /*
142 * If we are in the middle of ungetc'ing, just continue.
143 * This may require expanding the current ungetc buffer.
144 */
145 if (HASUB(fp)) {
146 if (fp->_r >= fp->_ub._size && __submore(fp))

--- 32 unchanged lines hidden ---