Last change
on this file since 73dd55f was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
458 bytes
|
Rev | Line | |
---|
[3ae31e9] | 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 |
|
---|
| 11 | int
|
---|
| 12 | ungetc(c, ptr)
|
---|
| 13 | register int c;
|
---|
| 14 | register FILE *ptr;
|
---|
| 15 | {
|
---|
| 16 | if ((c EQ EOF) OR (ptr->_bp LE ptr->_buff))
|
---|
| 17 | return(EOF);
|
---|
| 18 |
|
---|
| 19 | *--ptr->_bp = c;
|
---|
| 20 |
|
---|
| 21 | return(c);
|
---|
| 22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.