From 848538ce0dcb004a1eb81077c20d1346323eb60e Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 27 Feb 2016 01:07:35 +0000 Subject: Add an option -charcode-format for ofm2opl and ovf2ovp for compatibility git-svn-id: svn://tug.org/texlive/trunk@39877 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/help.h | 8 ++++++++ Build/source/texk/web2c/omegafonts/omfonts.c | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/Build/source/texk/web2c/help.h b/Build/source/texk/web2c/help.h index 1d1285645d6..2cedb687c6b 100644 --- a/Build/source/texk/web2c/help.h +++ b/Build/source/texk/web2c/help.h @@ -224,6 +224,10 @@ const_string OFM2OPLHELP[] = { " either `hex' or `octal'; default is hex", "-text-format=TYPE output coding scheme and family according to TYPE,", " either `mixed' or `upper' case; default is mixed", + "-charcode-format=TYPE (just for compatibility)", + " output character codes according to TYPE,", + " `hex' , `octal' or `ascii'; default is hex,", + " ascii = ascii letters and digits, hex for all else", #else "-charcode-format=TYPE output character codes according to TYPE,", " either `hex' or `ascii'; default is hex,", @@ -278,6 +282,10 @@ const_string OVF2OVPHELP[] = { " either `hex' or `octal'; default is hex", "-text-format=TYPE output coding scheme and family according to TYPE,", " either `mixed' or `upper' case; default is mixed", + "-charcode-format=TYPE (just for compatibility)", + " output character codes according to TYPE,", + " `hex' , `octal' or `ascii'; default is hex,", + " ascii = ascii letters and digits, hex for all else", #else "-charcode-format=TYPE output character codes according to TYPE,", " either `hex' or `ascii'; default is hex,", diff --git a/Build/source/texk/web2c/omegafonts/omfonts.c b/Build/source/texk/web2c/omegafonts/omfonts.c index 2df884388b9..7e8d4d2fa34 100644 --- a/Build/source/texk/web2c/omegafonts/omfonts.c +++ b/Build/source/texk/web2c/omegafonts/omfonts.c @@ -107,6 +107,7 @@ static struct option long_options[] = { {"verbose", 0, &verbose_option, 1}, {"char-format", 1, 0, 0}, {"num-format", 1, 0, 0}, + {"charcode-format", 1, 0, 0}, {"text-format", 1, 0, 0}, {"ofm2opl", 0, 0, 0}, {"opl2ofm", 0, 0, 0}, @@ -170,6 +171,19 @@ main (int argc, string *argv) if (!strcmp(optarg, "hex")) num_format = NUM_CODE_HEX; else if (!strcmp(optarg, "octal")) num_format = NUM_CODE_OCTAL; else warning_s("Bad number code format (%s)", optarg); + } else if (!strcmp(long_options[option_index ].name, "charcode-format")) { + if (!strcmp(optarg, "ascii")) { + char_format = CHAR_CODE_ASCII; + num_format = NUM_CODE_HEX; + } else if (!strcmp(optarg, "hex")) { + char_format = CHAR_CODE_NUM; + num_format = NUM_CODE_HEX; + } else if (!strcmp(optarg, "octal")) { + char_format = CHAR_CODE_NUM; + num_format = NUM_CODE_OCTAL; + } else { + warning_s("Bad character code format (%s)", optarg); + } } else if (!strcmp(long_options[option_index ].name, "text-format")) { if (!strcmp(optarg, "upper")) text_format = TEXT_CODE_UPPER; else if (!strcmp(optarg, "mixed")) text_format = TEXT_CODE_MIXED; -- cgit v1.2.3