Skip to content
Snippets Groups Projects
Commit 9e369259 authored by Michal Vlasák's avatar Michal Vlasák
Browse files

Set standard output mode to binary on Windows

parent 9d3a1747
No related branches found
No related tags found
No related merge requests found
Pipeline #255625 passed
......@@ -4,6 +4,13 @@
#include "parser.h"
 
int main(int argc, char **argv) {
#ifdef _WIN32
// Set standard output mode to "binary" on Windows.
// https://nullprogram.com/blog/2021/12/30/
int _setmode(int, int);
_setmode(1, 0x8000);
#endif
if (argc < 2) {
fprintf(stderr, "Error: expected at least one argument\n");
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment