Skip to content

Commit ea3a2c8

Browse files
committed
Improve argp usage in emv-decode
Move documentation strings out of argp options and instead specify them in the documentation parameter of struct argp.
1 parent 9b6de94 commit ea3a2c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/emv-decode.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ static struct argp_option argp_options[] = {
164164
{ "iso8859-14", EMV_DECODE_ISO8859_14, NULL, OPTION_HIDDEN },
165165
{ "iso8859-15", EMV_DECODE_ISO8859_15, NULL, OPTION_HIDDEN },
166166

167-
{ 0, 0, NULL, 0, "OPTION may only be _one_ of the above." },
168-
{ 0, 0, NULL, 0, "INPUT is either a string of hex digits representing binary data, or \"-\" to read from stdin" },
169-
170167
{ "version", EMV_DECODE_VERSION, NULL, 0, "Display emv-utils version" },
171168

172169
// Hidden option for testing
@@ -180,7 +177,10 @@ static struct argp argp_config = {
180177
argp_options,
181178
argp_parser_helper,
182179
"INPUT",
183-
"Decode data and print it in a human readable format.",
180+
"Decode data and print it in a human readable format."
181+
"\v" // Print remaining text after options
182+
"OPTION may only be _one_ of the above.\n\n"
183+
"INPUT is either a string of hex digits representing binary data, or \"-\" to read from stdin",
184184
};
185185

186186
// argp parser helper function

0 commit comments

Comments
 (0)