Mercurial > hg > wm
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Meerwald-dir/wm.c Fri Dec 20 13:08:59 2024 +0100 @@ -0,0 +1,38 @@ +#include "wm.h" + +#ifdef __MINGW32_VERSION +void bzero(char *b, size_t length) { + int i; + for (i=0; i<length; i++) { *b=0; b++; } +} +#endif + +void set_in_binary() { +#if defined(EMX) + _fsetmode(in, "b"); +#elif defined(MINGW) + setmode(STDIN_FILENO, O_BINARY); +#endif +} + +void set_out_binary() { +#if defined(EMX) + _fsetmode(out, "b"); +#elif defined(MINGW) + setmode(STDOUT_FILENO, O_BINARY); +#endif +} + +void wm_init2() { + set_in_binary(); +} + +void wm_init1() { + set_out_binary(); +} + +void wm_init() { + set_in_binary(); + set_out_binary(); +} +