Page MenuHomeFreeBSD

bintrans: replace the quoted printable encoder/decoder
ClosedPublic

Authored by bapt on Aug 23 2022, 3:47 PM.
Tags
None
Referenced Files
F102661550: D36314.diff
Fri, Nov 15, 12:27 PM
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
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47104
Build 43991: arc lint + arc unit

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
4

was this really written during the reign of Septimius Severus?

39

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

102

nit: surplus parentheses

110

nit: space

116

nit: space

124

nit: space

143

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