mailing list of musl libc
 help / color / mirror / code / Atom feed
5fe56cb35ee20a43a438eef1aa93e971be4a11fa blob 305 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
#include "stdio_impl.h"

int ungetc(int c, FILE *f)
{
	if (c == EOF) return c;

	FLOCK(f);

	if (!f->rpos) __toread(f);
	if (!f->rpos || f->rpos <= f->buf - UNGET) {
		FUNLOCK(f);
		return EOF;
	}

       *--f->rpos = (unsigned char)c;
	f->flags &= ~F_EOF;

	FUNLOCK(f);
       return (unsigned char)c;
}
debug log:

solving 9733091a ...
found 9733091a in https://inbox.vuxu.org/musl/eb6e9ee55907488492048b07884f29a9@huawei.com/
found 180673a4 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 180673a47663ad57b11d3e6525c35cc23858939a	src/stdio/ungetc.c

applying [1/1] https://inbox.vuxu.org/musl/eb6e9ee55907488492048b07884f29a9@huawei.com/
diff --git a/src/stdio/ungetc.c b/src/stdio/ungetc.c
index 180673a4..9733091a 100644

Checking patch src/stdio/ungetc.c...
Applied patch src/stdio/ungetc.c cleanly.

index at:
100644 5fe56cb35ee20a43a438eef1aa93e971be4a11fa	src/stdio/ungetc.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).