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)
May 22 2024, 7:58 AM
Unknown Object (File)
May 22 2024, 4:30 AM
Unknown Object (File)
May 22 2024, 2:53 AM
Unknown Object (File)
May 22 2024, 2:29 AM
Unknown Object (File)
May 21 2024, 10:59 PM
Unknown Object (File)
May 21 2024, 10:32 PM
Unknown Object (File)
May 21 2024, 8:16 PM
Unknown Object (File)
Feb 14 2024, 9:25 PM

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 14127
Build 14300: arc lint + arc unit

Event Timeline

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

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
296–300

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

344

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

433

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

Also, style(9) spaces around =

439

style(9) spaces around =

444

Inconsistent omission of braces around single-line clauses

613

Spaces around =

622

Spaces around =

628

Spaces around =

631

Spaces around =

634

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
302–303

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

445

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. =)

354

Here

358

Here

364

Here

373

Here

380

Here

384

Here

548

Here

555

Here

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

renamed to rflag to match dragongflybsd.

445

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