Skip to content

Commit fa514f9

Browse files
committed
Use iconv naming for command-line options.
1 parent ad965d1 commit fa514f9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

recode_cpp.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ void
3131
print_usage(const char* program)
3232
{
3333
printf(
34-
"Usage: %s [-e INPUT_ENCODING] [-g OUTPUT_ENCODING] [-o OUTFILE INFILE] "
34+
"Usage: %s [-f INPUT_ENCODING] [-t OUTPUT_ENCODING] [-o OUTFILE INFILE] "
3535
"[...]\n\n"
3636
"Options:\n"
37-
" -o, --output-file PATH\n"
37+
" -o, --output PATH\n"
3838
" set output file name (- for stdout; the default)\n"
39-
" -e, --input-encoding LABEL\n"
39+
" -f, --from-code LABEL\n"
4040
" set input encoding (defaults to UTF-8)\n"
41-
" -g, --output-encoding LABEL\n"
41+
" -t, --to-code LABEL\n"
4242
" set output encoding (defaults to UTF-8)\n"
4343
" -u, --utf16-intermediate\n"
4444
" use UTF-16 instead of UTF-8 as the intermediate\n"
@@ -219,11 +219,11 @@ int
219219
main(int argc, char** argv)
220220
{
221221
static struct option long_options[] = {
222-
{ "output-file", required_argument, NULL, 'o' },
223-
{ "input-encoding", required_argument, NULL, 'e' },
224-
{ "output-encoding", required_argument, NULL, 'g' },
225-
{ "utf16-intermediate", no_argument, NULL, 'u' },
226-
{ "help", no_argument, NULL, 'h' },
222+
{ "output", required_argument, NULL, 'o' },
223+
{ "from-code", required_argument, NULL, 'f' },
224+
{ "to-code", required_argument, NULL, 't' },
225+
{ "utf16-intermediate", no_argument, NULL, 'u' },
226+
{ "help", no_argument, NULL, 'h' },
227227
{ 0, 0, 0, 0 }
228228
};
229229

@@ -250,10 +250,10 @@ main(int argc, char** argv)
250250
exit(-3);
251251
}
252252
break;
253-
case 'e':
253+
case 'f':
254254
input_encoding = get_encoding(optarg);
255255
break;
256-
case 'g':
256+
case 't':
257257
output_encoding = get_encoding(optarg);
258258
break;
259259
case 'u':

0 commit comments

Comments
 (0)