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 14154
Build 14326: 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

348

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

428

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

Also, style(9) spaces around =

434

style(9) spaces around =

439

Inconsistent omission of braces around single-line clauses

607

Spaces around =

616

Spaces around =

622

Spaces around =

625

Spaces around =

628

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

440

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

362

Here

370

Here

376

Here

379

Here

543

Here

549

Here

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

renamed to rflag to match dragongflybsd.

440

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