Last change
on this file since 9519422 was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Use standard integer types.
|
-
Property mode
set to
100644
|
File size:
418 bytes
|
Rev | Line | |
---|
[f40a309] | 1 | /*
|
---|
| 2 | ============================================================================
|
---|
| 3 | ungetc.c -- 'unget' a character
|
---|
| 4 | Version 2 -- 1987-06-26 -- D.N. Lynx Crowe
|
---|
| 5 | ============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #include "stdio.h"
|
---|
| 9 | #include "stddefs.h"
|
---|
| 10 |
|
---|
[7258c6a] | 11 | int16_t ungetc(int16_t c, FILE *ptr)
|
---|
[f40a309] | 12 | {
|
---|
| 13 | if ((c EQ EOF) OR (ptr->_bp LE ptr->_buff))
|
---|
| 14 | return(EOF);
|
---|
| 15 |
|
---|
| 16 | *--ptr->_bp = c;
|
---|
| 17 |
|
---|
| 18 | return(c);
|
---|
| 19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.