Page MenuHomeFreeBSD

bintrans: replace the quoted printable encoder/decoder
ClosedPublic

Authored by bapt on Aug 23 2022, 3:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 3:51 PM
Unknown Object (File)
Thu, Apr 11, 12:41 PM
Unknown Object (File)
Feb 16 2024, 4:31 AM
Unknown Object (File)
Dec 29 2023, 1:24 PM
Unknown Object (File)
Dec 20 2023, 1:37 AM
Unknown Object (File)
Dec 9 2023, 11:24 PM
Unknown Object (File)
Dec 9 2023, 6:32 PM
Unknown Object (File)
Dec 8 2023, 4:19 PM
Subscribers

Details

Summary

Replace the quoted printable code with one that respects RFC2045
Add tests about this parsers and encoders, using examples from the
wikipedia page.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bapt requested review of this revision.Aug 23 2022, 3:47 PM
usr.bin/bintrans/Makefile
7

Would it be possible to not add a new file and just replace the old code in place?
Or completely throw the old quoted-printable.c away since you mentioned that you'd like to rewrite the encoder as well.

usr.bin/bintrans/qp.c
91

I recently played with getline() and I'm afraid that it's double-buffered.

lwhsu added inline comments.
usr.bin/bintrans/qp.c
2

How about adding a SPDX header? BTW I'm not sure what license this file is, ISC or 0BSD?

usr.bin/bintrans/tests/bintrans_test.sh
2

Should a license header be added to this file?

bapt retitled this revision from bintrans: replace the quoted printable decoder. to bintrans: replace the quoted printable encoder/decoder.Aug 24 2022, 10:10 AM
bapt edited the summary of this revision. (Show Details)

Address @pstef comments and change license for regular BSD 2 clause

usr.bin/bintrans/qp.c
5

was this really written during the reign of Septimius Severus?

40

nit: possibly move the return to the next line and indent

103

nit: surplus parentheses

111

nit: space

117

nit: space

125

nit: space

144

or just codec = encode ? encode_... : decode_...
to assign always only once.

bapt marked 9 inline comments as done.

Address @pstef comments

usr.bin/bintrans/qp.c
2

How about adding a SPDX header? BTW I'm not sure what license this file is, ISC or 0BSD?

the license here is MIT, is ISC as a huge part of the code comes from another project of mine, I can make it a standard BSD2 clause if you prefer

usr.bin/bintrans/tests/bintrans_test.sh
2

I can but I don't care, so if people prefer I make it the license one do prefer

pstef added inline comments.
usr.bin/bintrans/qp.c
32

nit: "string" sorts after "stdio".

145

nit: surplus space before ;

This revision is now accepted and ready to land.Aug 25 2022, 6:29 AM