comparison Meerwald-dir/wm.c @ 24:9f20bce6184e v0.7

move directories, support netpbm 11
author Peter Meerwald-Stadler <pmeerw@pmeerw.net>
date Fri, 20 Dec 2024 13:08:59 +0100
parents Meerwald/wm.c@be303a3f5ea8
children
comparison
equal deleted inserted replaced
23:71dd4b96221b 24:9f20bce6184e
1 #include "wm.h"
2
3 #ifdef __MINGW32_VERSION
4 void bzero(char *b, size_t length) {
5 int i;
6 for (i=0; i<length; i++) { *b=0; b++; }
7 }
8 #endif
9
10 void set_in_binary() {
11 #if defined(EMX)
12 _fsetmode(in, "b");
13 #elif defined(MINGW)
14 setmode(STDIN_FILENO, O_BINARY);
15 #endif
16 }
17
18 void set_out_binary() {
19 #if defined(EMX)
20 _fsetmode(out, "b");
21 #elif defined(MINGW)
22 setmode(STDOUT_FILENO, O_BINARY);
23 #endif
24 }
25
26 void wm_init2() {
27 set_in_binary();
28 }
29
30 void wm_init1() {
31 set_out_binary();
32 }
33
34 void wm_init() {
35 set_in_binary();
36 set_out_binary();
37 }
38

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.