Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect short option for --graph #15

Merged
merged 3 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ $ bin/regexp -h # or --help
```
regexp

Usage: regexp [-h] [-V] [-d regexp [-o FILE]] [[-c] regexp string]
Usage: regexp [-h] [-V] [-g regexp [-o FILE]] [[-c] regexp string]

Description: Regular expression implementation.
Supports . ( ) | * + ?. No escapes.
Expand All @@ -94,7 +94,7 @@ Graph mode:
Converts the regular expression into a graph,
exits with 1 if regexp is ill-formed or the file can't be opened

-d, --graph Converts the NFA of the regexp into a Graphviz
-g, --graph Converts the NFA of the regexp into a Graphviz
dot file (default: False)
-o FILE, --output FILE
The name of the dot file.
Expand All @@ -112,7 +112,7 @@ Match mode:

Written by: Lai-YT

regexp version: 1.0.0
regexp version: 1.0.2
```

### Example
Expand Down
4 changes: 2 additions & 2 deletions src/messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void help() {
*/
void usage() {
fprintf(stdout, YELLOW "Usage: " NO_COLOR);
fprintf(stdout, "%s [-h] [-V] [-d regexp [-o FILE]] [[-c] regexp string]\n\n",
fprintf(stdout, "%s [-h] [-V] [-g regexp [-o FILE]] [[-c] regexp string]\n\n",
PROGRAM_NAME);
}

Expand Down Expand Up @@ -58,7 +58,7 @@ void graph_mode() {
" Converts the regular expression into a graph,\n"
" exits with 1 if regexp is ill-formed or the file can't be opened\n"
"\n"
" -d, --graph Converts the NFA of the regexp into a Graphviz\n"
" -g, --graph Converts the NFA of the regexp into a Graphviz\n"
" dot file (default: False)\n"
" -o FILE, --output FILE\n"
" The name of the dot file.\n"
Expand Down
2 changes: 1 addition & 1 deletion src/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The full text of the license can be found in
#define MESSAGES_H

#define PROGRAM_NAME "regexp"
#define PROGRAM_VERSION "1.0.1"
#define PROGRAM_VERSION "1.0.2"
#define PROGRAM_AUTHOR "Lai-YT"

void help();
Expand Down