comparison Meerwald/wm.c @ 0:be303a3f5ea8

import
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Sun, 12 Aug 2007 13:14:34 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:be303a3f5ea8
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.