summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2023-02-19 17:20:30 +0100
committerAndreas Fankhauser hiddenalpha.ch2023-02-19 17:20:30 +0100
commit4015f6de5c98cab856991a05b27713af90e97e7f (patch)
tree1464d6b6fefeb7b41e78a46fcdb158c38fad6381 /src/main
parent9e4ff1fe33081c1a4a8639fe2e27ffc6f2d4f48a (diff)
downloadDeflateAndInflate-4015f6de5c98cab856991a05b27713af90e97e7f.zip
DeflateAndInflate-4015f6de5c98cab856991a05b27713af90e97e7f.tar.gz
(build) Simplify build doc
- Include target tripplet into version - Refactor docker build env by a more flexible script variant
Diffstat (limited to 'src/main')
-rw-r--r--src/main/c/inflate.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/c/inflate.c b/src/main/c/inflate.c
index 4b50a0a..ab4eb0b 100644
--- a/src/main/c/inflate.c
+++ b/src/main/c/inflate.c
@@ -28,14 +28,14 @@ struct MyInflate {
static void printHelp( void ){
printf("\n %s%s", strrchr(__FILE__,'/')+1, " @ " STR_QUOT(PROJECT_VERSION) "\n"
"\n"
- "inflates stdin to stdout\n"
+ " inflates stdin to stdout\n"
"\n"
- "Options:\n"
+ " Options:\n"
"\n"
" --raw\n"
- " By default, we'll try to decode leading headers. Using this\n"
- " option, no header parsing is done and the input is expected to\n"
- " be a pure deflate stream.\n"
+ " By default, we'll try to decode leading headers. Using this\n"
+ " option, no header parsing is done and the input is expected to\n"
+ " be a pure deflate stream.\n"
"\n"
"\n");
}
@@ -110,6 +110,7 @@ static int doInflate( MyInflate*myInflate ){
}
if( space > 0 && !inputIsEOF ){
err = fread(innBuf + innBuf_len, 1, space, stdin);
+ //fprintf(stderr, "fread(buf+%d, 1, %d, stdin) -> %d\n", innBuf_len, space, err);
if(unlikely( err <= 0 )){
if( feof(stdin) ){
inputIsEOF = !0;
@@ -152,6 +153,8 @@ static int doInflate( MyInflate*myInflate ){
int flush = inputIsEOF ? Z_FINISH : Z_NO_FLUSH;
errno = 0;
err = inflate(&strm, flush);
+ //fprintf(stderr, "inflate({.avI=%d, .avO=%d}, %d) -> %d\n", strm.avail_in, strm.avail_out,
+ // flush, err);
if(unlikely( err != Z_OK )){
if( err == Z_STREAM_END ){
outputIsEOF = !0;