Sign in
googlers
/
maze
/
klibc
/
1ba3e80738407d13bc4a71812578848b6f657e23
/
.
/
usr
/
klibc
/
stdio
/
ungetc.c
blob: fe328ac593f7e80e3df18583517da795e118935e [
file
] [
log
] [
blame
]
/*
* ungetc.c
*/
#include
"stdioint.h"
int
ungetc
(
int
c
,
FILE
*
file
)
{
struct
_IO_file_pvt
*
f
=
stdio_pvt
(
file
);
if
(
f
->
obytes
||
f
->
data
<=
f
->
buf
)
return
EOF
;
*(--
f
->
data
)
=
c
;
f
->
ibytes
++;
return
c
;
}