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)
Sun, Oct 20, 9:27 AM
Unknown Object (File)
Sep 21 2024, 7:41 AM
Unknown Object (File)
Sep 20 2024, 8:55 AM
Unknown Object (File)
Sep 19 2024, 7:57 PM
Unknown Object (File)
Sep 19 2024, 5:09 PM
Unknown Object (File)
Sep 16 2024, 3:55 PM
Unknown Object (File)
Sep 16 2024, 9:58 AM
Unknown Object (File)
Sep 10 2024, 4:42 AM
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