optional stdin binary mode (win)

pull/53/head
Zilog80 2022-11-23 20:56:38 +01:00
rodzic 0553964121
commit 524ce99015
4 zmienionych plików z 42 dodań i 0 usunięć

Wyświetl plik

@ -11,6 +11,11 @@
#include <complex.h>
#include <math.h>
#ifdef CYGWIN
#include <fcntl.h> // cygwin: _setmode()
#include <io.h>
#endif
// optional JSON "version"
// (a) set global
// gcc -DVERSION_JSN [-I<inc_dir>] ...
@ -520,6 +525,12 @@ int main(int argc, char *argv[]) {
float cb0, cb1;
int cfreq = -1;
#ifdef CYGWIN
_setmode(fileno(stdin), _O_BINARY); // _setmode(_fileno(stdin), _O_BINARY);
#endif
setbuf(stdout, NULL);
fpname = argv[0];
++argv;
while ((*argv) && (!wavloaded)) {

Wyświetl plik

@ -11,6 +11,11 @@
#include <complex.h>
#include <math.h>
#ifdef CYGWIN
#include <fcntl.h> // cygwin: _setmode()
#include <io.h>
#endif
// optional JSON "version"
// (a) set global
// gcc -DVERSION_JSN [-I<inc_dir>] ...
@ -527,6 +532,12 @@ int main(int argc, char *argv[]) {
float cb0, cb1;
int cfreq = -1;
#ifdef CYGWIN
_setmode(fileno(stdin), _O_BINARY); // _setmode(_fileno(stdin), _O_BINARY);
#endif
setbuf(stdout, NULL);
fpname = argv[0];
++argv;
while ((*argv) && (!wavloaded)) {

Wyświetl plik

@ -21,6 +21,11 @@
#include <complex.h>
#include <math.h>
#ifdef CYGWIN
#include <fcntl.h> // cygwin: _setmode()
#include <io.h>
#endif
// optional JSON "version"
// (a) set global
// gcc -DVERSION_JSN [-I<inc_dir>] ...
@ -1369,6 +1374,11 @@ int main(int argc, char *argv[]) {
pcm_t pcm = {0};
dsp_t dsp = {0};
#ifdef CYGWIN
_setmode(fileno(stdin), _O_BINARY); // _setmode(_fileno(stdin), _O_BINARY);
#endif
setbuf(stdout, NULL);
fpname = argv[0];
++argv;

Wyświetl plik

@ -26,6 +26,11 @@
#include <math.h>
#include <complex.h>
#ifdef CYGWIN
#include <fcntl.h> // cygwin: _setmode()
#include <io.h>
#endif
// optional JSON "version"
// (a) set global
// gcc -DVERSION_JSN [-I<inc_dir>] ...
@ -2118,6 +2123,11 @@ int main(int argc, char **argv) {
gpx_t gpx = {0};
hdb_t hdb = {0};
#ifdef CYGWIN
_setmode(fileno(stdin), _O_BINARY); // _setmode(_fileno(stdin), _O_BINARY);
#endif
setbuf(stdout, NULL);
fpname = argv[0];
++argv;