From fc355ee88235a718f2e5f87acaae62ff08589f2f Mon Sep 17 00:00:00 2001 From: Andreas Fankhauser hiddenalpha.ch Date: Mon, 2 Mar 2026 01:44:58 +0100 Subject: Some cosmetic. Plus make encode if no args given --- src/quotprint.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/quotprint.c') diff --git a/src/quotprint.c b/src/quotprint.c index dbb06cc..683ea4f 100644 --- a/src/quotprint.c +++ b/src/quotprint.c @@ -89,10 +89,8 @@ PRIVATE(char) endOfFile; INLINE(void) printHelp( void ){ printf("\n" - " quotprint - QuotedPrintable codec\n" - " Version: " STR_QUOT(PROJECT_VERSION) "\n" + " quotprint " STR_QUOT(PROJECT_VERSION) "\n" " \n" - " About the quoted-printable encoding see:\n" " https://www.rfc-editor.org/rfc/rfc2045#section-6.7\n" " \n" " -e `encode` to QuotedPrintable\n" @@ -100,6 +98,8 @@ printHelp( void ){ " -b When given to `-e`, will encode `binary` safe. Eg newlines will\n" " be quoted always.\n" " \n" + " BUG: Bad decoding when trailing whitespaces present.\n" + " Fix: Make sure input does not have trailing whitespace.\n" "\n"); } @@ -139,8 +139,7 @@ nextArg: verify: err = FLG_isEnc | FLG_isDec; if( (this->flg & err) == err || (this->flg & err) == 0 ){ - fprintf(stderr, "EINVAL: Choose exactly ONE of `encode` XOR `decode`.\n"); - return -1; + this->flg |= FLG_isEnc|FLG_isBinary; /* fallback to encode */ } return 0; } -- cgit v1.3.1