Page MenuHomeFreeBSD

morse: implement support for decoding morse code
ClosedPublic

Authored by eadler on Jan 4 2018, 1:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 24, 6:09 PM
Unknown Object (File)
Wed, Oct 22, 3:15 AM
Unknown Object (File)
Tue, Oct 21, 4:42 AM
Unknown Object (File)
Wed, Oct 15, 7:31 AM
Unknown Object (File)
Tue, Oct 14, 3:23 PM
Unknown Object (File)
Tue, Oct 14, 6:10 AM
Unknown Object (File)
Thu, Oct 9, 5:00 PM
Unknown Object (File)
Sun, Oct 5, 1:49 AM

Details

Reviewers
kevans
Group Reviewers
manpages
Summary
  • Use -r for "reverse" mode and to match DragonFlyBSD.
  • Move defines around to clear up logic
  • use errx instead of fprintf and exit

PR: 35109
Submitted By: philipp.mergenthaler@stud.uni-karlsruhe.de
Submitted on: 2002-02-19

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14129
Build 14302: arc lint + arc unit

Event Timeline

allanjude added inline comments.
usr.bin/morse/morse.c
351

A and B and C reads badly

try: "only one of -l, -s, and -D may be used"

I have some nits to be picked. =p Please don't hate me

usr.bin/morse/morse.c
297–301

I like this re-organization to avoid #undef ugliness... Please do mention it in the commit message

345

Can you rename this to Dflag to match the case of the flag, given that there's also a -d?

427

Can you throw these tokens in a separate #define up above as well? DELIMITERS or something to that effect.

Also, style(9) spaces around =

433

style(9) spaces around =

438

Inconsistent omission of braces around single-line clauses

605

Spaces around =

614

Spaces around =

620

Spaces around =

623

Spaces around =

626

Spaces around =

I have some nits to be picked. =p Please don't hate me

Review is great. Why would I hate you. Will fix

eadler marked 10 inline comments as done.

Thank you @kevans!

usr.bin/morse/morse.c
303–304

This doesn't seem to match the given commit message, which indicates that the flag was called -r

439

This one seems to have actually been missed; the braces should be omitted here like on the other one-line blocks.

I reckon this will be the last round. =)

usr.bin/morse/morse.c
349

These left more inconsistent omission of braces for single line blocks, but otherwise also a good change that should be noted in the commit message. =)

353

Here

356

Here

361

Here

369

Here

375

Here

378

Here

541

Here

547

Here

eadler marked 2 inline comments as done.
eadler added inline comments.
usr.bin/morse/morse.c
345

renamed to rflag to match dragongflybsd.

439

I went the reverse: adding braces to all single line blocks. style(9) makes it optional, I prefer it.

eadler marked 12 inline comments as done.Jan 6 2018, 6:42 AM
This revision is now accepted and ready to land.Jan 6 2018, 6:52 AM