26 |
|
|
27 |
/* GNU options */ |
/* GNU options */ |
28 |
static struct argp_option options[] = { |
static struct argp_option options[] = { |
29 |
{"form", 'F', N_("FILE"), 0, N_("Read format from given file")}, |
{"form", ARG_FORM, N_("FILE"), 0, |
30 |
{"format", 't', N_("FORMAT"), 0, N_("Use this format string")}, |
N_("Read format from given file")}, |
31 |
{"dump", 'd', NULL, 0, N_("Dump the listing of compiled format code")}, |
{"format", ARG_FORMAT, N_("FORMAT"), 0, |
32 |
{ "debug", 'D', NULL, 0, N_("Enable parser debugging output"),}, |
N_("Use this format string")}, |
33 |
|
{"dump", ARG_DUMP, NULL, 0, |
34 |
|
N_("Dump the listing of compiled format code")}, |
35 |
|
{ "debug", ARG_DEBUG, NULL, 0, |
36 |
|
N_("Enable parser debugging output"),}, |
37 |
{ 0 } |
{ 0 } |
38 |
}; |
}; |
39 |
|
|
68 |
{ |
{ |
69 |
switch (key) |
switch (key) |
70 |
{ |
{ |
71 |
case 'F': |
case ARG_FORM: |
72 |
mh_read_formfile (arg, &format_str); |
mh_read_formfile (arg, &format_str); |
73 |
break; |
break; |
74 |
|
|
75 |
case 't': |
case ARG_FORMAT: |
76 |
format_str = arg; |
format_str = arg; |
77 |
break; |
break; |
78 |
|
|
79 |
case 'd': |
case ARG_DUMP: |
80 |
action = action_dump; |
action = action_dump; |
81 |
break; |
break; |
82 |
|
|
83 |
case 'D': |
case ARG_DEBUG: |
84 |
mh_format_debug (1); |
mh_format_debug (1); |
85 |
break; |
break; |
86 |
|
|