diff --git a/Makefile b/Makefile index 8a81663b..f9498f8a 100644 --- a/Makefile +++ b/Makefile @@ -193,6 +193,9 @@ build_single_header: "single_include/AggregateHeaders.cpp" \ "single_include/kompute/Kompute.hpp" +win_build_xxd: + cd external/bin/ && gcc -o xxd.exe xxd.c -DCYGWIN + format: $(CLANG_FORMAT_BIN) -i -style="{BasedOnStyle: mozilla, IndentWidth: 4}" src/*.cpp src/include/kompute/*.hpp test/*cpp diff --git a/external/bin/xxd.c b/external/bin/xxd.c index ebfd4f67..383e24b9 100644 --- a/external/bin/xxd.c +++ b/external/bin/xxd.c @@ -230,7 +230,7 @@ char *pname; fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); fprintf(stderr, "Options:\n"); fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n"); - fprintf(stderr, " -). Default hex.\n"); + fprintf(stderr, " -b binary digit dump (incompatible with -p,-i,-r). Default hex.\n"); fprintf(stderr, " -c cols format octets per line. Default 16 (-i: 12, -ps: 30).\n"); fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n"); fprintf(stderr, " -g number of octets per group in normal output. Default 2.\n"); @@ -738,7 +738,7 @@ char *argv[]; } if (hextype == HEX_NORMAL) { - l[c / octspergrp)] = hexx[(e >> 4) & 0xf]; + l[c = (9 + (grplen * p) / octspergrp)] = hexx[(e >> 4) & 0xf]; l[++c] = hexx[ e & 0xf]; } else /* hextype == HEX_BITS */ diff --git a/external/bin/xxd.exe b/external/bin/xxd.exe deleted file mode 100755 index 0f980ea9..00000000 Binary files a/external/bin/xxd.exe and /dev/null differ