mailing list of musl libc
 help / color / mirror / code / Atom feed
0ebaff47aee0d06db05e2629852d1bb3348794e7 blob 321 bytes (raw)

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

#define SH (8*sizeof(int)-1)
#define NORMALIZE(x) ((x)>>SH | -((-(x))>>SH))

int fwide(FILE *f, int mode)
{
	FLOCK(f);
	if (!f->mode && mode) {
		f->mode = NORMALIZE(mode);
		f->utf8 = (MB_CUR_MAX > 1);
	}
	mode = f->mode;
	FUNLOCK(f);
	return mode;
}
debug log:

solving 0ebaff4 ...
found 0ebaff4 in https://inbox.vuxu.org/musl/20140703071318.GA10117@brightrain.aerifal.cx/
found 8088e7a in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 8088e7ad4311f116a579c998f7aa4bee3e3e85c7	src/stdio/fwide.c

applying [1/1] https://inbox.vuxu.org/musl/20140703071318.GA10117@brightrain.aerifal.cx/
diff --git a/src/stdio/fwide.c b/src/stdio/fwide.c
index 8088e7a..0ebaff4 100644

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

index at:
100644 0ebaff47aee0d06db05e2629852d1bb3348794e7	src/stdio/fwide.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).