aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/bintrans
Commit message (Collapse)AuthorAgeFilesLines
* bintrans: disable argument permutation for qp and base64Kyle Evans2025-04-202-2/+2
| | | | | | | | | | | | | Err on the side of caution and revert to the BSD-style getopt(3) behavior for argument processing, as it's harder to go back and it's not clear that this was strictly intentional. This is the difference between allowing `base64 /COPYRIGHT -w 80` and forcing `base64 -w 80 /COPYRIGHT`. Reviewed by: emaste, pstef MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D48483
* bintrans(1): fix typoBaptiste Daroussin2025-01-161-1/+1
| | | | Reported by: Helge Oldach <freebsd@oldach.net>
* bintrans(1): RFC2047 variant of quoted printBaptiste Daroussin2025-01-092-9/+25
| | | | | | MFC After: 1 week Reviewed by: pstref Differential Revision: https://reviews.freebsd.org/D48381
* bintrans(1): qp switch to getopt_longBaptiste Daroussin2025-01-092-29/+36
| | | | | | | | | | In preparation for more arguments, switch bintrans qp argument parsing to getopt_long, while here make the decodign argument being -d|--decode for compatibility with base64 encoding/decoding MFC After: 1 week Reviewed by: pstef Differential Revision: https://reviews.freebsd.org/D48380
* manuals: Fix syntax of list widthGraham Percival2024-10-081-4/+4
| | | | | | | | Signed-off-by: Graham Percival <gperciva@tarsnap.com> Reviewed by: mhorne MFC after: 3 days Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1455
* manuals: Fix "missing end of block" errorsGraham Percival2024-10-081-0/+1
| | | | | | | | | | | | These were reported by `mandoc -T lint ...` as errors. The rendered output (in ascii and html) is not affected by this commit. Signed-off-by: Graham Percival <gperciva@tarsnap.com> Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com> MFC after: 3 days Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1454
* Remove residual blank line at start of MakefileWarner Losh2024-07-152-2/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* bintrans: Remove unused variable.Dag-Erling Smørgrav2024-02-011-2/+1
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D43559
* bintrans: Add base64 to name list in manual page.Dag-Erling Smørgrav2024-02-011-3/+4
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: 0mp, pstef Differential Revision: https://reviews.freebsd.org/D43558
* bintrans: Fix uninitialized variable.Dag-Erling Smørgrav2024-02-011-1/+1
| | | | | | | | | `prev` may be used uninitialized if `body` starts with a newline. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D43534
* bintrans: Error out if writing to the output failed.Dag-Erling Smørgrav2024-02-012-13/+24
| | | | | | | | | | | | - Cover all code paths. - When decoding, check all output files, not just the last one. - A simple `ferror()` check is not enough as an error may later occur while flushing whatever remains in the output buffer. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D43532
* Remove copyright strings ifdef'd outWarner Losh2023-11-272-18/+0
| | | | | | | | | | | We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require). Sponsored by: Netflix
* usr.bin: Remove ancient SCCS tags.Warner Losh2023-11-275-11/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-166-6/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-162-4/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* bintrans: replace the quoted printable encoder/decoderBaptiste Daroussin2022-08-257-266/+244
| | | | | | | | | Replace the quoted printable code with one that respects RFC2045 Add tests about this parsers and encoders, using examples from the wikipedia page. Reviewed by: pstef Differential Revision: https://reviews.freebsd.org/D36314
* base64: ignore -i as promisedPiotr Pawel Stefaniak2022-04-241-0/+4
|
* Add a quoted-printable encoder/decoderPiotr Pawel Stefaniak2022-04-244-8/+35
| | | | | | | | | | As an example: printf 'We don=27t know what to do with other=20worlds.=0D=0A' \ | bintrans qp -u Differential Revision: https://reviews.freebsd.org/D34933 Reviewed by: debdrup (manpage)
* bintrans: adjust mmencode.c to style(9)Piotr Pawel Stefaniak2022-04-241-221/+224
|
* bintrans: make mmencode.c compilablePiotr Pawel Stefaniak2022-04-241-285/+9
| | | | Also remove MSDOS code, base64 code and commented out code.
* bintrans: import mmencode.c for quoted-printable en/de-codingPiotr Pawel Stefaniak2022-04-241-0/+530
| | | | | This is a preliminary commit in preparation for exposing a quoted-printable encoder and decoder through the new command bintrans.
* Add the base64 command using b64encode and b64decodePiotr Pawel Stefaniak2022-04-185-6/+140
| | | | | | | | | Various scripts expect the base64 command to be present. We've had the code and it's been exposed as b64encode/b64decode, but it wasn't widely known under these names and the syntax is much different. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D32945
* b64encode: implement -w to wrap linesPiotr Pawel Stefaniak2022-04-182-11/+59
| | | | | | | | This functionality is present in GNU base64 and I find it useful when I want to generate random, ASCII-clean data of specific width. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D32944
* bintrans: reinstate a test case that I lostPiotr Pawel Stefaniak2022-04-181-0/+3
| | | | Reported by: https://ci.freebsd.org/job/FreeBSD-main-amd64-test/21166
* bintrans: move files to a new directoryPiotr Pawel Stefaniak2022-04-1819-0/+1564
And reflect the change in various places.