Skip to content

Commit

Permalink
Add help output to example
Browse files Browse the repository at this point in the history
  • Loading branch information
n1000 committed Dec 9, 2022
1 parent 96a03c0 commit a911387
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ $ make -f Makefile.bsd
clang -c ttf.c -Wall
clang -o ttf ttf.o -lm

# get basic usage help
$ ./ttf
usage: ttf [-l low_freq (Hz)] [-h high_freq (Hz)] [-r sampling_rate (Hz)] [-d character_duration (sec)] [-g character gap (sec)] string

# generate a "hello world" ogg file
$ ./ttf "hello world" | oggenc -r -q 7 -C 1 - > test.ogg
```
Expand Down
3 changes: 2 additions & 1 deletion ttf.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,9 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;

if (!*argv)
if (!*argv) {
usage();
}

str = *argv;

Expand Down

0 comments on commit a911387

Please sign in to comment.