On 26/05/2023 16:19, Ian Abbott wrote:
As per the C standard, calling ungetc() with the character parameter equal to EOF causes it to fail, returning EOF. Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx> --- man3/fgetc.3 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/man3/fgetc.3 b/man3/fgetc.3 index 75dcaeaf6..d6bf62327 100644 --- a/man3/fgetc.3 +++ b/man3/fgetc.3 @@ -62,7 +62,13 @@ A terminating null byte (\[aq]\e0\[aq]) is stored after the last character in the buffer. .PP .BR ungetc () -pushes +returns +.B EOF +if the value of +.I c +equals that of the macro +.BR EOF , +otherwise it pushes .I c back to .IR stream ,
Sorry, I've just realized my English grammar usage was a bit poor there. I'll send a v2 patch.
-- -=( Ian Abbott <abbotti@xxxxxxxxx> || MEV Ltd. is a company )=- -=( registered in England & Wales. Regd. number: 02862268. )=- -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-