diff options
| author | Andreas Fankhauser hiddenalpha.ch | 2026-03-02 01:44:58 +0100 |
|---|---|---|
| committer | Andreas Fankhauser hiddenalpha.ch | 2026-03-02 01:44:58 +0100 |
| commit | fc355ee88235a718f2e5f87acaae62ff08589f2f (patch) | |
| tree | b4864fb826538884a291cbda5cb48e071c9348ce /src/quotprint.c | |
| parent | 9eb0f859ad53cadec82144c2cda57205e77b4682 (diff) | |
| download | quotprint-fc355ee88235a718f2e5f87acaae62ff08589f2f.tar.gz quotprint-fc355ee88235a718f2e5f87acaae62ff08589f2f.zip | |
Some cosmetic. Plus make encode if no args given
Diffstat (limited to 'src/quotprint.c')
| -rw-r--r-- | src/quotprint.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |
