Help: fix indentation

Help: fix indentation

####################################################################
# Help.awk                                                         #
####################################################################

# Return version as a string.
function getVersion() {
    return Name " " Version
}

# Return a list of language codes as a string.
# Parameters:
#     displayName = "endonym" or "name"
function getReference(displayName) {
    if (displayName == "name")
        return "┌─────────────────────────────┬──────────────────────┬─────────────────┐" RS \
            "│ " Locale["af"]["name"] "           - " ansi("bold", "af") "    │ " \
            Locale["ha"]["name"] "          - " ansi("bold", "ha") "  │ " \
            Locale["fa"]["name"] "    - " ansi("bold", "fa") " │" RS    \
            "│ " Locale["sq"]["name"] "            - " ansi("bold", "sq") "    │ " \
            Locale["he"]["name"] "         - " ansi("bold", "he") "  │ " \
            Locale["pl"]["name"] "     - " ansi("bold", "pl") " │" RS   \
            "│ " Locale["ar"]["name"] "              - " ansi("bold", "ar") "    │ " \
            Locale["hi"]["name"] "          - " ansi("bold", "hi") "  │ " \
            Locale["pt"]["name"] " - " ansi("bold", "pt") " │" RS       \
            "│ " Locale["hy"]["name"] "            - " ansi("bold", "hy") "    │ " \
            Locale["hmn"]["name"] "          - " ansi("bold", "hmn") " │ " \
            Locale["pa"]["name"] "    - " ansi("bold", "pa") " │" RS    \
            "│ " Locale["az"]["name"] "         - " ansi("bold", "az") "    │ " \
            Locale["hu"]["name"] "      - " ansi("bold", "hu") "  │ "   \
            Locale["ro"]["name"] "   - " ansi("bold", "ro") " │" RS     \
            "│ " Locale["eu"]["name"] "              - " ansi("bold", "eu") "    │ " \
            Locale["is"]["name"] "      - " ansi("bold", "is") "  │ "   \
            Locale["ru"]["name"] "    - " ansi("bold", "ru") " │" RS    \
            "│ " Locale["be"]["name"] "          - " ansi("bold", "be") "    │ " \
            Locale["ig"]["name"] "           - " ansi("bold", "ig") "  │ " \
            Locale["sr"]["name"] "    - " ansi("bold", "sr") " │" RS    \
            "│ " Locale["bn"]["name"] "             - " ansi("bold", "bn") "    │ " \
            Locale["id"]["name"] "     - " ansi("bold", "id") "  │ "    \
            Locale["st"]["name"] "    - " ansi("bold", "st") " │" RS    \
            "│ " Locale["bs"]["name"] "             - " ansi("bold", "bs") "    │ " \
            Locale["ga"]["name"] "          - " ansi("bold", "ga") "  │ " \
            Locale["si"]["name"] "    - " ansi("bold", "si") " │" RS    \
            "│ " Locale["bg"]["name"] "           - " ansi("bold", "bg") "    │ " \
            Locale["it"]["name"] "        - " ansi("bold", "it") "  │ " \
            Locale["sk"]["name"] "     - " ansi("bold", "sk") " │" RS   \
            "│ " Locale["ca"]["name"] "             - " ansi("bold", "ca") "    │ " \
            Locale["ja"]["name"] "       - " ansi("bold", "ja") "  │ "  \
            Locale["sl"]["name"] "  - " ansi("bold", "sl") " │" RS      \
            "│ " Locale["ceb"]["name"] "             - " ansi("bold", "ceb") "   │ " \
            Locale["jv"]["name"] "       - " ansi("bold", "jv") "  │ "  \
            Locale["so"]["name"] "     - " ansi("bold", "so") " │" RS   \
            "│ " Locale["ny"]["name"] "            - " ansi("bold", "ny") "    │ " \
            Locale["kn"]["name"] "        - " ansi("bold", "kn") "  │ " \
            Locale["es"]["name"] "    - " ansi("bold", "es") " │" RS    \
            "│ " Locale["zh-CN"]["name"] "  - " ansi("bold", "zh-CN") " │ " \
            Locale["kk"]["name"] "         - " ansi("bold", "kk") "  │ " \
            Locale["su"]["name"] "  - " ansi("bold", "su") " │" RS      \
            "│ " Locale["zh-TW"]["name"] " - " ansi("bold", "zh-TW") " │ " \
            Locale["km"]["name"] "          - " ansi("bold", "km") "  │ " \
            Locale["sw"]["name"] "    - " ansi("bold", "sw") " │" RS    \
            "│ " Locale["hr"]["name"] "            - " ansi("bold", "hr") "    │ " \
            Locale["ko"]["name"] "         - " ansi("bold", "ko") "  │ " \
            Locale["sv"]["name"] "    - " ansi("bold", "sv") " │" RS    \
            "│ " Locale["cs"]["name"] "               - " ansi("bold", "cs") "    │ " \
            Locale["lo"]["name"] "            - " ansi("bold", "lo") "  │ " \
            Locale["tg"]["name"] "      - " ansi("bold", "tg") " │" RS  \
            "│ " Locale["da"]["name"] "              - " ansi("bold", "da") "    │ " \
            Locale["la"]["name"] "          - " ansi("bold", "la") "  │ " \
            Locale["ta"]["name"] "      - " ansi("bold", "ta") " │" RS \
            "│ " Locale["nl"]["name"] "               - " ansi("bold", "nl") "    │ " \
            Locale["lv"]["name"] "        - " ansi("bold", "lv") "  │ " \
            Locale["te"]["name"] "     - " ansi("bold", "te") " │" RS   \
            "│ " Locale["en"]["name"] "             - " ansi("bold", "en") "    │ " \
            Locale["lt"]["name"] "     - " ansi("bold", "lt") "  │ "    \
            Locale["th"]["name"] "       - " ansi("bold", "th") " │" RS \
            "│ " Locale["eo"]["name"] "           - " ansi("bold", "eo") "    │ " \
            Locale["mk"]["name"] "     - " ansi("bold", "mk") "  │ "    \
            Locale["tr"]["name"] "    - " ansi("bold", "tr") " │" RS    \
            "│ " Locale["et"]["name"] "            - " ansi("bold", "et") "    │ " \
            Locale["mg"]["name"] "       - " ansi("bold", "mg") "  │ " \
            Locale["uk"]["name"] "  - " ansi("bold", "uk") " │" RS      \
            "│ " Locale["tl"]["name"] "            - " ansi("bold", "tl") "    │ " \
            Locale["ms"]["name"] "          - " ansi("bold", "ms") "  │ " \
            Locale["ur"]["name"] "       - " ansi("bold", "ur") " │" RS \
            "│ " Locale["fi"]["name"] "             - " ansi("bold", "fi") "    │ " \
            Locale["ml"]["name"] "      - " ansi("bold", "ml") "  │ " \
            Locale["uz"]["name"] "      - " ansi("bold", "uz") " │" RS \
            "│ " Locale["fr"]["name"] "              - " ansi("bold", "fr") "    │ " \
            Locale["mt"]["name"] "        - " ansi("bold", "mt") "  │ " \
            Locale["vi"]["name"] " - " ansi("bold", "vi") " │" RS \
            "│ " Locale["gl"]["name"] "            - " ansi("bold", "gl") "    │ " \
            Locale["mi"]["name"] "          - " ansi("bold", "mi") "  │ " \
            Locale["cy"]["name"] "      - " ansi("bold", "cy") " │" RS \
            "│ " Locale["ka"]["name"] "            - " ansi("bold", "ka") "    │ " \
            Locale["mr"]["name"] "        - " ansi("bold", "mr") "  │ " \
            Locale["yi"]["name"] "    - " ansi("bold", "yi") " │" RS \
            "│ " Locale["de"]["name"] "              - " ansi("bold", "de") "    │ " \
            Locale["mn"]["name"] "      - " ansi("bold", "mn") "  │ " \
            Locale["yo"]["name"] "     - " ansi("bold", "yo") " │" RS \
            "│ " Locale["el"]["name"] "               - " ansi("bold", "el") "    │ " \
            Locale["my"]["name"] "        - " ansi("bold", "my") "  │ " \
            Locale["zu"]["name"] "       - " ansi("bold", "zu") " │" RS \
            "│ " Locale["gu"]["name"] "            - " ansi("bold", "gu") "    │ " \
            Locale["ne"]["name"] "         - " ansi("bold", "ne") "  │ " \
            "                │" RS \
            "│ " Locale["ht"]["name"] "      - " ansi("bold", "ht") "    │ " \
            Locale["no"]["name"] "      - " ansi("bold", "no") "  │ " \
            "                │" RS \
            "└─────────────────────────────┴──────────────────────┴─────────────────┘"
    else
        return "┌──────────────────────┬───────────────────────┬─────────────────────┐" RS \
            "│ " Locale["af"]["display"] "      - " ansi("bold", "af") "  │ " \
            Locale["hu"]["display"] "           - " ansi("bold", "hu") " │ " \
            Locale["pl"]["display"] "      - " ansi("bold", "pl") "    │" RS \
            "│ " Locale["ar"]["display"] "        - " ansi("bold", "ar") "  │ " \
            Locale["hy"]["display"] "          - " ansi("bold", "hy") " │ " \
            Locale["pt"]["display"] "   - " ansi("bold", "pt") "    │" RS \
            "│ " Locale["az"]["display"] "   - " ansi("bold", "az") "  │ " \
            Locale["id"]["display"] " - " ansi("bold", "id") " │ " \
            Locale["ro"]["display"] "      - " ansi("bold", "ro") "    │" RS \
            "│ " Locale["be"]["display"] "     - " ansi("bold", "be") "  │ " \
            Locale["ig"]["display"] "             - " ansi("bold", "ig") " │ " \
            Locale["ru"]["display"] "     - " ansi("bold", "ru") "    │" RS \
            "│ " Locale["bg"]["display"] "      - " ansi("bold", "bg") "  │ " \
            Locale["is"]["display"] "         - " ansi("bold", "is") " │ " \
            Locale["si"]["display"] "        - " ansi("bold", "si") "    │" RS \
            "│ " Locale["bn"]["display"] "          - " ansi("bold", "bn") "  │ " \
            Locale["it"]["display"] "         - " ansi("bold", "it") " │ " \
            Locale["sk"]["display"] "  - " ansi("bold", "sk") "    │" RS \
            "│ " Locale["bs"]["display"] "       - " ansi("bold", "bs") "  │ " \
            Locale["ja"]["display"] "           - " ansi("bold", "ja") " │ " \
            Locale["sl"]["display"] " - " ansi("bold", "sl") "    │" RS \
            "│ " Locale["ca"]["display"] "         - " ansi("bold", "ca") "  │ " \
            Locale["jv"]["display"] "        - " ansi("bold", "jv") " │ " \
            Locale["so"]["display"] "    - " ansi("bold", "so") "    │" RS \
            "│ " Locale["ceb"]["display"] "        - " ansi("bold", "ceb") " │ " \
            Locale["ka"]["display"] "          - " ansi("bold", "ka") " │ " \
            Locale["sq"]["display"] "       - " ansi("bold", "sq") "    │" RS \
            "│ " Locale["cs"]["display"] "        - " ansi("bold", "cs") "  │ " \
            Locale["kk"]["display"] "       - " ansi("bold", "kk") " │ " \
            Locale["sr"]["display"] "      - " ansi("bold", "sr") "    │" RS \
            "│ " Locale["cy"]["display"] "        - " ansi("bold", "cy") "  │ " \
            Locale["km"]["display"] "         - " ansi("bold", "km") " │ " \
            Locale["st"]["display"] "     - " ansi("bold", "st") "    │" RS \
            "│ " Locale["da"]["display"] "          - " ansi("bold", "da") "  │ " \
            Locale["kn"]["display"] "             - " ansi("bold", "kn") " │ " \
            Locale["su"]["display"] "  - " ansi("bold", "su") "    │" RS \
            "│ " Locale["de"]["display"] "        - " ansi("bold", "de") "  │ " \
            Locale["ko"]["display"] "           - " ansi("bold", "ko") " │ " \
            Locale["sv"]["display"] "     - " ansi("bold", "sv") "    │" RS \
            "│ " Locale["el"]["display"] "       - " ansi("bold", "el") "  │ " \
            Locale["la"]["display"] "           - " ansi("bold", "la") " │ " \
            Locale["sw"]["display"] "   - " ansi("bold", "sw") "    │" RS \
            "│ " Locale["en"]["display"] "        - " ansi("bold", "en") "  │ " \
            Locale["lo"]["display"] "              - " ansi("bold", "lo") " │ " \
            Locale["ta"]["display"] "        - " ansi("bold", "ta") "    │" RS \
            "│ " Locale["eo"]["display"] "      - " ansi("bold", "eo") "  │ " \
            Locale["lt"]["display"] "         - " ansi("bold", "lt") " │ " \
            Locale["te"]["display"] "       - " ansi("bold", "te") "    │" RS \
            "│ " Locale["es"]["display"] "        - " ansi("bold", "es") "  │ " \
            Locale["lv"]["display"] "         - " ansi("bold", "lv") " │ " \
            Locale["tg"]["display"] "      - " ansi("bold", "tg") "    │" RS \
            "│ " Locale["et"]["display"] "          - " ansi("bold", "et") "  │ " \
            Locale["mg"]["display"] "         - " ansi("bold", "mg") " │ " \
            Locale["th"]["display"] "         - " ansi("bold", "th") "    │" RS \
            "│ " Locale["eu"]["display"] "        - " ansi("bold", "eu") "  │ " \
            Locale["mi"]["display"] "            - " ansi("bold", "mi") " │ " \
            Locale["tl"]["display"] "     - " ansi("bold", "tl") "    │" RS \
            "│ " Locale["fa"]["display"] "          - " ansi("bold", "fa") "  │ " \
            Locale["mk"]["display"] "       - " ansi("bold", "mk") " │ " \
            Locale["tr"]["display"] "      - " ansi("bold", "tr") "    │" RS \
            "│ " Locale["fi"]["display"] "          - " ansi("bold", "fi") "  │ " \
            Locale["ml"]["display"] "           - " ansi("bold", "ml") " │ " \
            Locale["uk"]["display"] "  - " ansi("bold", "uk") "    │" RS \
            "│ " Locale["fr"]["display"] "       - " ansi("bold", "fr") "  │ " \
            Locale["mn"]["display"] "           - " ansi("bold", "mn") " │ " \
            Locale["ur"]["display"] "        - " ansi("bold", "ur") "    │" RS \
            "│ " Locale["ga"]["display"] "        - " ansi("bold", "ga") "  │ " \
            Locale["mr"]["display"] "            - " ansi("bold", "mr") " │ " \
            Locale["uz"]["display"] " - " ansi("bold", "uz") "    │" RS \
            "│ " Locale["gl"]["display"] "         - " ansi("bold", "gl") "  │ " \
            Locale["ms"]["display"] "    - " ansi("bold", "ms") " │ " \
            Locale["vi"]["display"] "  - " ansi("bold", "vi") "    │" RS \
            "│ " Locale["gu"]["display"] "         - " ansi("bold", "gu") "  │ " \
            Locale["mt"]["display"] "            - " ansi("bold", "mt") " │ " \
            Locale["yi"]["display"] "       - " ansi("bold", "yi") "    │" RS \
            "│ " Locale["ha"]["display"] "          - " ansi("bold", "ha") "  │ " \
            Locale["my"]["display"] "          - " ansi("bold", "my") " │ " \
            Locale["yo"]["display"] "      - " ansi("bold", "yo") "    │" RS \
            "│ " Locale["he"]["display"] "          - " ansi("bold", "he") "  │ " \
            Locale["ne"]["display"] "            - " ansi("bold", "ne") " │ " \
            Locale["zh-CN"]["display"] "    - " ansi("bold", "zh-CN") " │" RS \
            "│ " Locale["hi"]["display"] "          - " ansi("bold", "hi") "  │ " \
            Locale["nl"]["display"] "       - " ansi("bold", "nl") " │ " \
            Locale["zh-TW"]["display"] "    - " ansi("bold", "zh-TW") " │" RS \
            "│ " Locale["hmn"]["display"] "          - " ansi("bold", "hmn") " │ " \
            Locale["no"]["display"] "            - " ansi("bold", "no") " │ " \
            Locale["zu"]["display"] "     - " ansi("bold", "zu") "    │" RS \
            "│ " Locale["hr"]["display"] "       - " ansi("bold", "hr") "  │ " \
            Locale["ny"]["display"] "           - " ansi("bold", "ny") " │ " \
            "                    │" RS \
            "│ " Locale["ht"]["display"] " - " ansi("bold", "ht") "  │ " \
            Locale["pa"]["display"] "            - " ansi("bold", "pa") " │ " \
            "                    │" RS \
            "└──────────────────────┴───────────────────────┴─────────────────────┘"
}

# Return help message as a string.
function getHelp() {
    return "Usage:\t" Command " [options] [source]:[target] [" ansi("underline", "text") "] ..." RS \
        "\t" Command " [options] [source]:[target1]+[target2]+... [" ansi("underline", "text") "] ..." RS RS \
        "Options:" RS                                                   \
        ansi("bold", "-V, -version") RS                                 \
        ins(1, "Print version and exit.") RS                            \
        ansi("bold", "-H, -h, -help") RS                                \
        ins(1, "Print this help message and exit.") RS                  \
        ansi("bold", "-M, -m, -manual") RS                              \
        ins(1, "Show the manual.") RS                                   \
        ansi("bold", "-r, -reference") RS                               \
        ins(1, "Print a list of languages (displayed in endonyms) and their ISO 639 codes for reference, and exit.") RS \
        ansi("bold", "-R, -reference-english") RS                       \
        ins(1, "Print a list of languages (displayed in English names) and their ISO 639 codes for reference, and exit.") RS \
        ansi("bold", "-v, -verbose") RS                                 \
        ins(1, "Verbose mode. (default)") RS                            \
        ansi("bold", "-b, -brief") RS                                   \
        ins(1, "Brief mode.") RS                                        \
        ansi("bold", "-no-ansi") RS                                     \
        ins(1, "Don't use ANSI escape codes in the translation.") RS    \
        ansi("bold", "-w [num], -width [num]") RS                       \
        ins(1, "Specify the screen width for padding when displaying right-to-left languages.") RS \
        ansi("bold", "-browser [program]") RS                           \
        ins(1, "Specify the web browser to use.") RS                    \
        ansi("bold", "-p, -play") RS                                    \
        ins(1, "Listen to the translation.") RS                         \
        ansi("bold", "-player [program]") RS                            \
        ins(1, "Specify the command-line audio player to use, and listen to the translation.") RS \
        ansi("bold", "-x [proxy], -proxy [proxy]") RS                   \
        ins(1, "Use proxy on given port.") RS                           \
        ansi("bold", "-I, -interactive") RS                             \
        ins(1, "Start an interactive shell, invoking `rlwrap` whenever possible (unless `-no-rlwrap` is specified).") RS \
        ansi("bold", "-no-rlwrap") RS                                   \
        ins(1, "Don't invoke `rlwrap` when starting an interactive shell with `-I`.") RS \
        ansi("bold", "-E, -emacs") RS                                   \
        ins(1, "Start an interactive shell within GNU Emacs, invoking `emacs`.") RS \
        ansi("bold", "-prompt [prompt_string]") RS                      \
        ins(1, "Customize your prompt string in the interactive shell.") RS \
        ansi("bold", "-prompt-color [color_code]") RS                   \
        ins(1, "Customize your prompt color in the interactive shell.") RS \
        ansi("bold", "-i [file], -input [file]") RS                     \
        ins(1, "Specify the input file name.") RS                       \
        ansi("bold", "-o [file], -output [file]") RS                    \
        ins(1, "Specify the output file name.") RS                      \
        ansi("bold", "-l [code], -lang [code]") RS                      \
        ins(1, "Specify your own, native language (\"home/host language\").") RS \
        ansi("bold", "-s [code], -source [code]") RS                    \
        ins(1, "Specify the source language (language of the original text).") RS \
        ansi("bold", "-t [codes], -target [codes]") RS                  \
        ins(1, "Specify the target language(s) (language(s) of the translated text).") RS \
        RS "See the man page " Command "(1) for more information."
}

####################################################################
# Help.awk                                                         #
####################################################################

# Return version as a string.
function getVersion() {
    return Name " " Version
}

# Return a list of language codes as a string.
# Parameters:
#     displayName = "endonym" or "name"
function getReference(displayName) {
    if (displayName == "name")
        return "┌─────────────────────────────┬──────────────────────┬─────────────────┐" RS \
            "│ " Locale["af"]["name"] "           - " ansi("bold", "af") "    │ " \
            Locale["ha"]["name"] "          - " ansi("bold", "ha") "  │ " \
            Locale["fa"]["name"] "    - " ansi("bold", "fa") " │" RS    \
            "│ " Locale["sq"]["name"] "            - " ansi("bold", "sq") "    │ " \
            Locale["he"]["name"] "         - " ansi("bold", "he") "  │ " \
            Locale["pl"]["name"] "     - " ansi("bold", "pl") " │" RS   \
            "│ " Locale["ar"]["name"] "              - " ansi("bold", "ar") "    │ " \
            Locale["hi"]["name"] "          - " ansi("bold", "hi") "  │ " \
            Locale["pt"]["name"] " - " ansi("bold", "pt") " │" RS       \
            "│ " Locale["hy"]["name"] "            - " ansi("bold", "hy") "    │ " \
            Locale["hmn"]["name"] "          - " ansi("bold", "hmn") " │ " \
            Locale["pa"]["name"] "    - " ansi("bold", "pa") " │" RS    \
            "│ " Locale["az"]["name"] "         - " ansi("bold", "az") "    │ " \
            Locale["hu"]["name"] "      - " ansi("bold", "hu") "  │ "   \
            Locale["ro"]["name"] "   - " ansi("bold", "ro") " │" RS     \
            "│ " Locale["eu"]["name"] "              - " ansi("bold", "eu") "    │ " \
            Locale["is"]["name"] "      - " ansi("bold", "is") "  │ "   \
            Locale["ru"]["name"] "    - " ansi("bold", "ru") " │" RS    \
            "│ " Locale["be"]["name"] "          - " ansi("bold", "be") "    │ " \
            Locale["ig"]["name"] "           - " ansi("bold", "ig") "  │ " \
            Locale["sr"]["name"] "    - " ansi("bold", "sr") " │" RS    \
            "│ " Locale["bn"]["name"] "             - " ansi("bold", "bn") "    │ " \
            Locale["id"]["name"] "     - " ansi("bold", "id") "  │ "    \
            Locale["st"]["name"] "    - " ansi("bold", "st") " │" RS    \
            "│ " Locale["bs"]["name"] "             - " ansi("bold", "bs") "    │ " \
            Locale["ga"]["name"] "          - " ansi("bold", "ga") "  │ " \
            Locale["si"]["name"] "    - " ansi("bold", "si") " │" RS    \
            "│ " Locale["bg"]["name"] "           - " ansi("bold", "bg") "    │ " \
            Locale["it"]["name"] "        - " ansi("bold", "it") "  │ " \
            Locale["sk"]["name"] "     - " ansi("bold", "sk") " │" RS   \
            "│ " Locale["ca"]["name"] "             - " ansi("bold", "ca") "    │ " \
            Locale["ja"]["name"] "       - " ansi("bold", "ja") "  │ "  \
            Locale["sl"]["name"] "  - " ansi("bold", "sl") " │" RS      \
            "│ " Locale["ceb"]["name"] "             - " ansi("bold", "ceb") "   │ " \
            Locale["jv"]["name"] "       - " ansi("bold", "jv") "  │ "  \
            Locale["so"]["name"] "     - " ansi("bold", "so") " │" RS   \
            "│ " Locale["ny"]["name"] "            - " ansi("bold", "ny") "    │ " \
            Locale["kn"]["name"] "        - " ansi("bold", "kn") "  │ " \
            Locale["es"]["name"] "    - " ansi("bold", "es") " │" RS    \
            "│ " Locale["zh-CN"]["name"] "  - " ansi("bold", "zh-CN") " │ " \
            Locale["kk"]["name"] "         - " ansi("bold", "kk") "  │ " \
            Locale["su"]["name"] "  - " ansi("bold", "su") " │" RS      \
            "│ " Locale["zh-TW"]["name"] " - " ansi("bold", "zh-TW") " │ " \
            Locale["km"]["name"] "          - " ansi("bold", "km") "  │ " \
            Locale["sw"]["name"] "    - " ansi("bold", "sw") " │" RS    \
            "│ " Locale["hr"]["name"] "            - " ansi("bold", "hr") "    │ " \
            Locale["ko"]["name"] "         - " ansi("bold", "ko") "  │ " \
            Locale["sv"]["name"] "    - " ansi("bold", "sv") " │" RS    \
            "│ " Locale["cs"]["name"] "               - " ansi("bold", "cs") "    │ " \
            Locale["lo"]["name"] "            - " ansi("bold", "lo") "  │ " \
            Locale["tg"]["name"] "      - " ansi("bold", "tg") " │" RS  \
            "│ " Locale["da"]["name"] "              - " ansi("bold", "da") "    │ " \
            Locale["la"]["name"] "          - " ansi("bold", "la") "  │ " \
            Locale["ta"]["name"] "      - " ansi("bold", "ta") " │" RS \
            "│ " Locale["nl"]["name"] "               - " ansi("bold", "nl") "    │ " \
            Locale["lv"]["name"] "        - " ansi("bold", "lv") "  │ " \
            Locale["te"]["name"] "     - " ansi("bold", "te") " │" RS   \
            "│ " Locale["en"]["name"] "             - " ansi("bold", "en") "    │ " \
            Locale["lt"]["name"] "     - " ansi("bold", "lt") "  │ "    \
            Locale["th"]["name"] "       - " ansi("bold", "th") " │" RS \
            "│ " Locale["eo"]["name"] "           - " ansi("bold", "eo") "    │ " \
            Locale["mk"]["name"] "     - " ansi("bold", "mk") "  │ "    \
            Locale["tr"]["name"] "    - " ansi("bold", "tr") " │" RS    \
            "│ " Locale["et"]["name"] "            - " ansi("bold", "et") "    │ " \
            Locale["mg"]["name"] "       - " ansi("bold", "mg") "  │ " \
            Locale["uk"]["name"] "  - " ansi("bold", "uk") " │" RS      \
            "│ " Locale["tl"]["name"] "            - " ansi("bold", "tl") "    │ " \
            Locale["ms"]["name"] "          - " ansi("bold", "ms") "  │ " \
            Locale["ur"]["name"] "       - " ansi("bold", "ur") " │" RS \
            "│ " Locale["fi"]["name"] "             - " ansi("bold", "fi") "    │ " \
            Locale["ml"]["name"] "      - " ansi("bold", "ml") "  │ " \
            Locale["uz"]["name"] "      - " ansi("bold", "uz") " │" RS \
            "│ " Locale["fr"]["name"] "              - " ansi("bold", "fr") "    │ " \
            Locale["mt"]["name"] "        - " ansi("bold", "mt") "  │ " \
            Locale["vi"]["name"] " - " ansi("bold", "vi") " │" RS \
            "│ " Locale["gl"]["name"] "            - " ansi("bold", "gl") "    │ " \
            Locale["mi"]["name"] "          - " ansi("bold", "mi") "  │ " \
            Locale["cy"]["name"] "      - " ansi("bold", "cy") " │" RS \
            "│ " Locale["ka"]["name"] "            - " ansi("bold", "ka") "    │ " \
            Locale["mr"]["name"] "        - " ansi("bold", "mr") "  │ " \
            Locale["yi"]["name"] "    - " ansi("bold", "yi") " │" RS \
            "│ " Locale["de"]["name"] "              - " ansi("bold", "de") "    │ " \
            Locale["mn"]["name"] "      - " ansi("bold", "mn") "  │ " \
            Locale["yo"]["name"] "     - " ansi("bold", "yo") " │" RS \
            "│ " Locale["el"]["name"] "               - " ansi("bold", "el") "    │ " \
            Locale["my"]["name"] "        - " ansi("bold", "my") "  │ " \
            Locale["zu"]["name"] "       - " ansi("bold", "zu") " │" RS \
            "│ " Locale["gu"]["name"] "            - " ansi("bold", "gu") "    │ " \
            Locale["ne"]["name"] "         - " ansi("bold", "ne") "  │ " \
            "                │" RS \
            "│ " Locale["ht"]["name"] "      - " ansi("bold", "ht") "    │ " \
            Locale["no"]["name"] "      - " ansi("bold", "no") "  │ " \
            "                │" RS \
            "└─────────────────────────────┴──────────────────────┴─────────────────┘"
    else
        return "┌──────────────────────┬───────────────────────┬─────────────────────┐" RS \
            "│ " Locale["af"]["display"] "      - " ansi("bold", "af") "  │ " \
            Locale["hu"]["display"] "           - " ansi("bold", "hu") " │ " \
            Locale["pl"]["display"] "      - " ansi("bold", "pl") "    │" RS \
            "│ " Locale["ar"]["display"] "        - " ansi("bold", "ar") "  │ " \
            Locale["hy"]["display"] "          - " ansi("bold", "hy") " │ " \
            Locale["pt"]["display"] "   - " ansi("bold", "pt") "    │" RS \
            "│ " Locale["az"]["display"] "   - " ansi("bold", "az") "  │ " \
            Locale["id"]["display"] " - " ansi("bold", "id") " │ " \
            Locale["ro"]["display"] "      - " ansi("bold", "ro") "    │" RS \
            "│ " Locale["be"]["display"] "     - " ansi("bold", "be") "  │ " \
            Locale["ig"]["display"] "             - " ansi("bold", "ig") " │ " \
            Locale["ru"]["display"] "     - " ansi("bold", "ru") "    │" RS \
            "│ " Locale["bg"]["display"] "      - " ansi("bold", "bg") "  │ " \
            Locale["is"]["display"] "         - " ansi("bold", "is") " │ " \
            Locale["si"]["display"] "        - " ansi("bold", "si") "    │" RS \
            "│ " Locale["bn"]["display"] "          - " ansi("bold", "bn") "  │ " \
            Locale["it"]["display"] "         - " ansi("bold", "it") " │ " \
            Locale["sk"]["display"] "  - " ansi("bold", "sk") "    │" RS \
            "│ " Locale["bs"]["display"] "       - " ansi("bold", "bs") "  │ " \
            Locale["ja"]["display"] "           - " ansi("bold", "ja") " │ " \
            Locale["sl"]["display"] " - " ansi("bold", "sl") "    │" RS \
            "│ " Locale["ca"]["display"] "         - " ansi("bold", "ca") "  │ " \
            Locale["jv"]["display"] "        - " ansi("bold", "jv") " │ " \
            Locale["so"]["display"] "    - " ansi("bold", "so") "    │" RS \
            "│ " Locale["ceb"]["display"] "        - " ansi("bold", "ceb") " │ " \
            Locale["ka"]["display"] "          - " ansi("bold", "ka") " │ " \
            Locale["sq"]["display"] "       - " ansi("bold", "sq") "    │" RS \
            "│ " Locale["cs"]["display"] "        - " ansi("bold", "cs") "  │ " \
            Locale["kk"]["display"] "       - " ansi("bold", "kk") " │ " \
            Locale["sr"]["display"] "      - " ansi("bold", "sr") "    │" RS \
            "│ " Locale["cy"]["display"] "        - " ansi("bold", "cy") "  │ " \
            Locale["km"]["display"] "         - " ansi("bold", "km") " │ " \
            Locale["st"]["display"] "     - " ansi("bold", "st") "    │" RS \
            "│ " Locale["da"]["display"] "          - " ansi("bold", "da") "  │ " \
            Locale["kn"]["display"] "             - " ansi("bold", "kn") " │ " \
            Locale["su"]["display"] "  - " ansi("bold", "su") "    │" RS \
            "│ " Locale["de"]["display"] "        - " ansi("bold", "de") "  │ " \
            Locale["ko"]["display"] "           - " ansi("bold", "ko") " │ " \
            Locale["sv"]["display"] "     - " ansi("bold", "sv") "    │" RS \
            "│ " Locale["el"]["display"] "       - " ansi("bold", "el") "  │ " \
            Locale["la"]["display"] "           - " ansi("bold", "la") " │ " \
            Locale["sw"]["display"] "   - " ansi("bold", "sw") "    │" RS \
            "│ " Locale["en"]["display"] "        - " ansi("bold", "en") "  │ " \
            Locale["lo"]["display"] "              - " ansi("bold", "lo") " │ " \
            Locale["ta"]["display"] "        - " ansi("bold", "ta") "    │" RS \
            "│ " Locale["eo"]["display"] "      - " ansi("bold", "eo") "  │ " \
            Locale["lt"]["display"] "         - " ansi("bold", "lt") " │ " \
            Locale["te"]["display"] "       - " ansi("bold", "te") "    │" RS \
            "│ " Locale["es"]["display"] "        - " ansi("bold", "es") "  │ " \
            Locale["lv"]["display"] "         - " ansi("bold", "lv") " │ " \
            Locale["tg"]["display"] "      - " ansi("bold", "tg") "    │" RS \
            "│ " Locale["et"]["display"] "          - " ansi("bold", "et") "  │ " \
            Locale["mg"]["display"] "         - " ansi("bold", "mg") " │ " \
            Locale["th"]["display"] "         - " ansi("bold", "th") "    │" RS \
            "│ " Locale["eu"]["display"] "        - " ansi("bold", "eu") "  │ " \
            Locale["mi"]["display"] "            - " ansi("bold", "mi") " │ " \
            Locale["tl"]["display"] "     - " ansi("bold", "tl") "    │" RS \
            "│ " Locale["fa"]["display"] "          - " ansi("bold", "fa") "  │ " \
            Locale["mk"]["display"] "       - " ansi("bold", "mk") " │ " \
            Locale["tr"]["display"] "      - " ansi("bold", "tr") "    │" RS \
            "│ " Locale["fi"]["display"] "          - " ansi("bold", "fi") "  │ " \
            Locale["ml"]["display"] "           - " ansi("bold", "ml") " │ " \
            Locale["uk"]["display"] "  - " ansi("bold", "uk") "    │" RS \
            "│ " Locale["fr"]["display"] "       - " ansi("bold", "fr") "  │ " \
            Locale["mn"]["display"] "           - " ansi("bold", "mn") " │ " \
            Locale["ur"]["display"] "        - " ansi("bold", "ur") "    │" RS \
            "│ " Locale["ga"]["display"] "        - " ansi("bold", "ga") "  │ " \
            Locale["mr"]["display"] "            - " ansi("bold", "mr") " │ " \
            Locale["uz"]["display"] " - " ansi("bold", "uz") "    │" RS \
            "│ " Locale["gl"]["display"] "         - " ansi("bold", "gl") "  │ " \
            Locale["ms"]["display"] "    - " ansi("bold", "ms") " │ " \
            Locale["vi"]["display"] "  - " ansi("bold", "vi") "    │" RS \
            "│ " Locale["gu"]["display"] "         - " ansi("bold", "gu") "  │ " \
            Locale["mt"]["display"] "            - " ansi("bold", "mt") " │ " \
            Locale["yi"]["display"] "       - " ansi("bold", "yi") "    │" RS \
            "│ " Locale["ha"]["display"] "          - " ansi("bold", "ha") "  │ " \
            Locale["my"]["display"] "          - " ansi("bold", "my") " │ " \
            Locale["yo"]["display"] "      - " ansi("bold", "yo") "    │" RS \
            "│ " Locale["he"]["display"] "          - " ansi("bold", "he") "  │ " \
            Locale["ne"]["display"] "            - " ansi("bold", "ne") " │ " \
            Locale["zh-CN"]["display"] "    - " ansi("bold", "zh-CN") " │" RS \
            "│ " Locale["hi"]["display"] "          - " ansi("bold", "hi") "  │ " \
            Locale["nl"]["display"] "       - " ansi("bold", "nl") " │ " \
            Locale["zh-TW"]["display"] "    - " ansi("bold", "zh-TW") " │" RS \
            "│ " Locale["hmn"]["display"] "          - " ansi("bold", "hmn") " │ " \
            Locale["no"]["display"] "            - " ansi("bold", "no") " │ " \
            Locale["zu"]["display"] "     - " ansi("bold", "zu") "    │" RS \
            "│ " Locale["hr"]["display"] "       - " ansi("bold", "hr") "  │ " \
            Locale["ny"]["display"] "           - " ansi("bold", "ny") " │ " \
            "                    │" RS \
            "│ " Locale["ht"]["display"] " - " ansi("bold", "ht") "  │ " \
            Locale["pa"]["display"] "            - " ansi("bold", "pa") " │ " \
            "                    │" RS \
            "└──────────────────────┴───────────────────────┴─────────────────────┘"
}

# Return help message as a string.
function getHelp() {
    return "Usage:\t" Command " [options] [source]:[target] [" ansi("underline", "text") "] ..." RS \
        "\t" Command " [options] [source]:[target1]+[target2]+... [" ansi("underline", "text") "] ..." RS RS \
        "Options:" RS                                                   \
        I ansi("bold", "-V, -version") RS                               \
        I I "Print version and exit." RS                                \
        I ansi("bold", "-H, -h, -help") RS                              \
        I I "Print this help message and exit." RS                      \
        I ansi("bold", "-M, -m, -manual") RS                            \
        I I "Show the manual." RS                                       \
        I ansi("bold", "-r, -reference") RS                             \
        I I "Print a list of languages (displayed in endonyms) and their ISO 639 codes for reference, and exit." RS \
        I ansi("bold", "-R, -reference-english") RS                     \
        I I "Print a list of languages (displayed in English names) and their ISO 639 codes for reference, and exit." RS \
        I ansi("bold", "-v, -verbose") RS                               \
        I I "Verbose mode. (default)" RS                                \
        I ansi("bold", "-b, -brief") RS                                 \
        I I "Brief mode." RS                                            \
        I ansi("bold", "-no-ansi") RS                                   \
        I I "Don't use ANSI escape codes in the translation." RS        \
        I ansi("bold", "-w [num], -width [num]") RS                     \
        I I "Specify the screen width for padding when displaying right-to-left languages." RS \
        I ansi("bold", "-browser [program]") RS                         \
        I I "Specify the web browser to use." RS                        \
        I ansi("bold", "-p, -play") RS                                  \
        I I "Listen to the translation." RS                             \
        I ansi("bold", "-player [program]") RS                          \
        I I "Specify the command-line audio player to use, and listen to the translation." RS \
        I ansi("bold", "-x [proxy], -proxy [proxy]") RS                 \
        I I "Use proxy on given port." RS                               \
        I ansi("bold", "-I, -interactive") RS                           \
        I I "Start an interactive shell, invoking `rlwrap` whenever possible (unless `-no-rlwrap` is specified)." RS \
        I ansi("bold", "-no-rlwrap") RS                                 \
        I I "Don't invoke `rlwrap` when starting an interactive shell with `-I`." RS \
        I ansi("bold", "-E, -emacs") RS                                 \
        I I "Start an interactive shell within GNU Emacs, invoking `emacs`." RS \
        I ansi("bold", "-prompt [prompt_string]") RS                    \
        I I "Customize your prompt string in the interactive shell." RS \
        I ansi("bold", "-prompt-color [color_code]") RS                 \
        I I "Customize your prompt color in the interactive shell." RS  \
        I ansi("bold", "-i [file], -input [file]") RS                   \
        I I "Specify the input file name." RS                           \
        I ansi("bold", "-o [file], -output [file]") RS                  \
        I I "Specify the output file name." RS                          \
        I ansi("bold", "-l [code], -lang [code]") RS                    \
        I I "Specify your own, native language (\"home/host language\")." RS \
        I ansi("bold", "-s [code], -source [code]") RS                  \
        I I "Specify the source language (language of the original text)." RS \
        I ansi("bold", "-t [codes], -target [codes]") RS                \
        I I "Specify the target language(s) (language(s) of the translated text)." RS RS \
        "See the man page " Command "(1) for more information."
}


Main: fix a regression bug with option -play

####################################################################
# Main.awk                                                         #
####################################################################

# Detect gawk version.
function initGawk(    group) {
    Gawk = "gawk"
    GawkVersion = PROCINFO["version"]

    split(PROCINFO["version"], group, ".")
    if (group[1] < 4) {
        e("[ERROR] Oops! Your gawk (version " GawkVersion ") appears to be too old.\nYou need at least gawk 4.0.0 to run this program.")
        exit 1
    }
}

# Main initialization.
function init() {
    initGawk()          #<< AnsiCode

    # Languages
    initBiDi()
    initLocale()
    initLocaleDisplay() #<< Locale, BiDi
    initUserLang()      #<< Locale

    # Translate
    initHttpService()

    RS = "\n"

    ExitCode = 0

    Option["debug"] = 0

    Option["verbose"] = 1
    Option["width"] = ENVIRON["COLUMNS"] ? ENVIRON["COLUMNS"] : 64

    Option["play"] = 0
    Option["player"] = ENVIRON["PLAYER"]

    Option["interactive"] = 0
    Option["no-rlwrap"] = 0
    Option["emacs"] = 0
    Option["prompt"] = ENVIRON["TRANS_PS"] ? ENVIRON["TRANS_PS"] : "%s>"
    Option["prompt-color"] = ENVIRON["TRANS_PS_COLOR"] ? ENVIRON["TRANS_PS_COLOR"] : "blue"

    Option["input"] = ""
    Option["output"] = "/dev/stdout"

    Option["hl"] = ENVIRON["HOME_LANG"] ? ENVIRON["HOME_LANG"] : UserLang
    Option["sl"] = ENVIRON["SOURCE_LANG"] ? ENVIRON["SOURCE_LANG"] : "auto"
    Option["tl"][1] = ENVIRON["TARGET_LANG"] ? ENVIRON["TARGET_LANG"] : UserLang
}

# Main entry point.
BEGIN {
    init()

    pos = 0
    while (ARGV[++pos]) {
        # -, -no-op
        match(ARGV[pos], /^-(-?no-op)?$/)
        if (RSTART) continue

        # -V, -version
        match(ARGV[pos], /^--?(vers(i(on?)?)?|V)$/)
        if (RSTART) {
            print getVersion()
            exit
        }

        # -H, -h, -help
        match(ARGV[pos], /^--?(h(e(lp?)?)?|H)$/)
        if (RSTART) {
            if (ENVIRON["TRANS_MANPAGE"])
                system("echo -E \"${TRANS_MANPAGE}\" | " \
                       "groff -Wall -mtty-char -mandoc -Tutf8 -Dutf8 -rLL=${COLUMNS}n -rLT=${COLUMNS}n | " \
                       "less -P\"\\ \\Manual page " Command "(1) line %lt (press h for help or q to quit)\"")
            else
                print getHelp()
            exit
        }

        # -r, -reference
        match(ARGV[pos], /^--?r(e(f(e(r(e(n(ce?)?)?)?)?)?)?)?$/)
        if (RSTART) {
            print getReference("endonym")
            exit
        }

        # -R, -reference-english
        match(ARGV[pos], /^--?(reference-(e(n(g(l(i(sh?)?)?)?)?)?)?|R)$/)
        if (RSTART) {
            print getReference("name")
            exit
        }

        # -d, -debug
        match(ARGV[pos], /^--?d(e(b(ug?)?)?)?$/)
        if (RSTART) {
            Option["debug"] = 1
            continue
        }

        # -v, -verbose
        match(ARGV[pos], /^--?v(e(r(b(o(se?)?)?)?)?)?$/)
        if (RSTART) {
            Option["verbose"] = 1 # default value
            continue
        }

        # -b, -brief
        match(ARGV[pos], /^--?b(r(i(ef?)?)?)?$/)
        if (RSTART) {
            Option["verbose"] = 0
            continue
        }

        # -w [num], -width [num]
        match(ARGV[pos], /^--?w(i(d(th?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["width"] = group[4] ?
                (group[5] ? group[5] : Option["width"]) :
                ARGV[++pos]
            continue
        }

        # -p, -play
        match(ARGV[pos], /^--?p(l(ay?)?)?$/)
        if (RSTART) {
            Option["play"] = 1
            continue
        }

        # -P [program], -player [program]
        match(ARGV[pos], /^--?(player|P)(=(.*)?)?$/, group)
        if (RSTART) {
            Option["play"] = 1
            Option["player"] = group[2] ?
                (group[3] ? group[3] : Option["player"]) :
                ARGV[++pos]
            continue
        }

        # -I, -interactive
        match(ARGV[pos], /^--?(int(e(r(a(c(t(i(ve?)?)?)?)?)?)?)?|I)$/)
        if (RSTART) {
            Option["interactive"] = 1
            continue
        }

        # -no-rlwrap
        match(ARGV[pos], /^--?no-rlwrap/)
        if (RSTART) {
            Option["no-rlwrap"] = 1
            continue
        }

        # -E, -emacs
        match(ARGV[pos], /^--?(emacs|E)$/)
        if (RSTART) {
            Option["emacs"] = 1
            continue
        }

        # -prompt [prompt_string]
        match(ARGV[pos], /^--?prompt(=(.*)?)?$/, group)
        if (RSTART) {
            Option["prompt"] = group[1] ?
                (group[2] ? group[2] : Option["prompt"]) :
                ARGV[++pos]
            continue
        }

        # -prompt-color [color_code]
        match(ARGV[pos], /^--?prompt-color(=(.*)?)?$/, group)
        if (RSTART) {
            Option["prompt-color"] = group[1] ?
                (group[2] ? group[2] : Option["prompt-color"]) :
                ARGV[++pos]
            continue
        }

        # -i [file], -input [file]
        match(ARGV[pos], /^--?i(n(p(ut?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["input"] = group[4] ?
                (group[5] ? group[5] : Option["input"]) :
                ARGV[++pos]
            continue
        }

        # -o [file], -output [file]
        match(ARGV[pos], /^--?o(u(t(p(ut?)?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["output"] = group[5] ?
                (group[6] ? group[6] : Option["output"]) :
                ARGV[++pos]
            continue
        }

        # -l [code], -lang [code]
        match(ARGV[pos], /^--?l(a(ng?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["hl"] = group[3] ?
                (group[4] ? group[4] : Option["hl"]) :
                ARGV[++pos]
            continue
        }

        # -s [code], -source [code]
        match(ARGV[pos], /^--?s(o(u(r(ce?)?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["sl"] = group[5] ?
                (group[6] ? group[6] : Option["sl"]) :
                ARGV[++pos]
            continue
        }

        # -t [codes], -target [codes]
        match(ARGV[pos], /^--?t(a(r(g(et?)?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            if (group[5]) {
                if (group[6]) split(group[6], Option["tl"], "+")
            } else
                split(ARGV[++pos], Option["tl"], "+")
            continue
        }

        # Shortcut format
        # '[code]:[code]+...' or '[code]=[code]+...'
        match(ARGV[pos], /^[{([]?([[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]])?)?(:|=)((@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]])?\+)*(@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]])?)?)[})\]]?$/, group)
        if (RSTART) {
            if (group[1]) Option["sl"] = group[1]
            if (group[4]) split(group[4], Option["tl"], "+")
            continue
        }

        # --
        match(ARGV[pos], /^--$/)
        if (RSTART) {
            ++pos # skip the end-of-options option
            break # no more option from here
        }

        break # no more option from here
    }

    # Option parsing finished
    if (Option["interactive"] && !Option["no-rlwrap"]) {
        # Interactive mode
        initRlwrap() # initialize Rlwrap

        if (Rlwrap && (ENVIRON["TRANS_PROGRAM"] || fileExists(EntryPoint))) {
            command = Rlwrap " " Gawk " " (ENVIRON["TRANS_PROGRAM"] ?
                                           "\"${TRANS_PROGRAM}\"" :
                                           "-f " EntryPoint) " -" \
                " -no-rlwrap" # be careful - never fork Rlwrap recursively!
            for (i = 1; i < length(ARGV); i++)
                if (ARGV[i])
                    command = command " " parameterize(ARGV[i])

            if (!system(command))
                exit # child process finished, exit
            else
                ; # skip
        } else
            ; # skip

    } else if (!Option["interactive"] && !Option["no-rlwrap"] && Option["emacs"]) {
        # Emacs interface
        Emacs = "emacs"

        if (ENVIRON["TRANS_PROGRAM"] || fileExists(EntryPoint)) {
            params = ""
            for (i = 1; i < length(ARGV); i++)
                if (ARGV[i])
                    params = params " " (parameterize(ARGV[i], "\""))
            if (ENVIRON["TRANS_PROGRAM"]) {
                el = "(progn (setq trans-program (getenv \"TRANS_PROGRAM\")) " \
                    "(setq explicit-shell-file-name \"" Gawk "\") " \
                    "(setq explicit-" Gawk "-args (cons trans-program '(\"-\" \"-I\" \"-no-rlwrap\"" params "))) " \
                    "(command-execute 'shell) (rename-buffer \"" Name "\"))"
            } else {
                el = "(progn (setq explicit-shell-file-name \"" Gawk "\") " \
                    "(setq explicit-" Gawk "-args '(\"-f\" \"" EntryPoint "\" \"--\" \"-I\" \"-no-rlwrap\"" params ")) " \
                    "(command-execute 'shell) (rename-buffer \"" Name "\"))"
            }
            command = Emacs " --eval " parameterize(el)

            if (!system(command))
                exit # child process finished, exit
            else
                Option["interactive"] = 1 # skip
        } else
            Option["interactive"] = 1 # skip
    }

    if (Option["play"]) {
        # Initialize audio player or speech synthesizer
        if (!Option["player"]) {
            initAudioPlayer()
            Option["player"] = AudioPlayer ? AudioPlayer : Option["player"]
            if (!Option["player"])
                initSpeechSynthesizer()
        }

        if (!Option["player"] && !SpeechSynthesizer) {
            w("[WARNING] No available audio player or speech synthesizer is found.")
            Option["play"] = 0
        }
    }

    if (pos < ARGC) {
        # More parameters

        # Translate the rest parameters
        for (i = pos; i < ARGC; i++) {
            # Verbose mode: separator between sources
            if (Option["verbose"] && i > pos)
                print replicate("═", Option["width"])

            translate(ARGV[i])
        }

        # If input not specified, we're done
    } else {
        # No more parameter besides options

        # If input not specified, use stdin
        if (!Option["input"]) Option["input"] = "/dev/stdin"
    }

    # If input specified, start translating
    if (Option["input"])
        translateMain()

    exit ExitCode
}

####################################################################
# Main.awk                                                         #
####################################################################

# Detect gawk version.
function initGawk(    group) {
    Gawk = "gawk"
    GawkVersion = PROCINFO["version"]

    split(PROCINFO["version"], group, ".")
    if (group[1] < 4) {
        e("[ERROR] Oops! Your gawk (version " GawkVersion ") appears to be too old.\nYou need at least gawk 4.0.0 to run this program.")
        exit 1
    }
}

# Main initialization.
function init() {
    initGawk()          #<< AnsiCode

    # Languages
    initBiDi()
    initLocale()
    initLocaleDisplay() #<< Locale, BiDi
    initUserLang()      #<< Locale

    # Translate
    initHttpService()

    RS = "\n"

    ExitCode = 0

    Option["debug"] = 0

    Option["verbose"] = 1
    Option["width"] = ENVIRON["COLUMNS"] ? ENVIRON["COLUMNS"] : 64

    Option["play"] = 0
    Option["player"] = ENVIRON["PLAYER"] ? ENVIRON["PLAYER"] : AudioPlayer

    Option["interactive"] = 0
    Option["no-rlwrap"] = 0
    Option["emacs"] = 0
    Option["prompt"] = ENVIRON["TRANS_PS"] ? ENVIRON["TRANS_PS"] : "%s>"
    Option["prompt-color"] = ENVIRON["TRANS_PS_COLOR"] ? ENVIRON["TRANS_PS_COLOR"] : "blue"

    Option["input"] = ""
    Option["output"] = "/dev/stdout"

    Option["hl"] = ENVIRON["HOME_LANG"] ? ENVIRON["HOME_LANG"] : UserLang
    Option["sl"] = ENVIRON["SOURCE_LANG"] ? ENVIRON["SOURCE_LANG"] : "auto"
    Option["tl"][1] = ENVIRON["TARGET_LANG"] ? ENVIRON["TARGET_LANG"] : UserLang
}

# Main entry point.
BEGIN {
    init()

    pos = 0
    while (ARGV[++pos]) {
        # -, -no-op
        match(ARGV[pos], /^-(-?no-op)?$/)
        if (RSTART) continue

        # -V, -version
        match(ARGV[pos], /^--?(vers(i(on?)?)?|V)$/)
        if (RSTART) {
            print getVersion()
            exit
        }

        # -H, -h, -help
        match(ARGV[pos], /^--?(h(e(lp?)?)?|H)$/)
        if (RSTART) {
            if (ENVIRON["TRANS_MANPAGE"])
                system("echo -E \"${TRANS_MANPAGE}\" | " \
                       "groff -Wall -mtty-char -mandoc -Tutf8 -Dutf8 -rLL=${COLUMNS}n -rLT=${COLUMNS}n | " \
                       "less -P\"\\ \\Manual page " Command "(1) line %lt (press h for help or q to quit)\"")
            else
                print getHelp()
            exit
        }

        # -r, -reference
        match(ARGV[pos], /^--?r(e(f(e(r(e(n(ce?)?)?)?)?)?)?)?$/)
        if (RSTART) {
            print getReference("endonym")
            exit
        }

        # -R, -reference-english
        match(ARGV[pos], /^--?(reference-(e(n(g(l(i(sh?)?)?)?)?)?)?|R)$/)
        if (RSTART) {
            print getReference("name")
            exit
        }

        # -d, -debug
        match(ARGV[pos], /^--?d(e(b(ug?)?)?)?$/)
        if (RSTART) {
            Option["debug"] = 1
            continue
        }

        # -v, -verbose
        match(ARGV[pos], /^--?v(e(r(b(o(se?)?)?)?)?)?$/)
        if (RSTART) {
            Option["verbose"] = 1 # default value
            continue
        }

        # -b, -brief
        match(ARGV[pos], /^--?b(r(i(ef?)?)?)?$/)
        if (RSTART) {
            Option["verbose"] = 0
            continue
        }

        # -w [num], -width [num]
        match(ARGV[pos], /^--?w(i(d(th?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["width"] = group[4] ?
                (group[5] ? group[5] : Option["width"]) :
                ARGV[++pos]
            continue
        }

        # -p, -play
        match(ARGV[pos], /^--?p(l(ay?)?)?$/)
        if (RSTART) {
            if (Option["player"] || SpeechSynthesizer)
                Option["play"] = 1
            else
                w("[WARNING] No available audio player or speech synthesizer is found.")
            continue
        }

        # -P [program], -player [program]
        match(ARGV[pos], /^--?(player|P)(=(.*)?)?$/, group)
        if (RSTART) {
            Option["play"] = 1
            Option["player"] = group[2] ?
                (group[3] ? group[3] : Option["player"]) :
                ARGV[++pos]
            continue
        }

        # -I, -interactive
        match(ARGV[pos], /^--?(int(e(r(a(c(t(i(ve?)?)?)?)?)?)?)?|I)$/)
        if (RSTART) {
            Option["interactive"] = 1
            continue
        }

        # -no-rlwrap
        match(ARGV[pos], /^--?no-rlwrap/)
        if (RSTART) {
            Option["no-rlwrap"] = 1
            continue
        }

        # -E, -emacs
        match(ARGV[pos], /^--?(emacs|E)$/)
        if (RSTART) {
            Option["emacs"] = 1
            continue
        }

        # -prompt [prompt_string]
        match(ARGV[pos], /^--?prompt(=(.*)?)?$/, group)
        if (RSTART) {
            Option["prompt"] = group[1] ?
                (group[2] ? group[2] : Option["prompt"]) :
                ARGV[++pos]
            continue
        }

        # -prompt-color [color_code]
        match(ARGV[pos], /^--?prompt-color(=(.*)?)?$/, group)
        if (RSTART) {
            Option["prompt-color"] = group[1] ?
                (group[2] ? group[2] : Option["prompt-color"]) :
                ARGV[++pos]
            continue
        }

        # -i [file], -input [file]
        match(ARGV[pos], /^--?i(n(p(ut?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["input"] = group[4] ?
                (group[5] ? group[5] : Option["input"]) :
                ARGV[++pos]
            continue
        }

        # -o [file], -output [file]
        match(ARGV[pos], /^--?o(u(t(p(ut?)?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["output"] = group[5] ?
                (group[6] ? group[6] : Option["output"]) :
                ARGV[++pos]
            continue
        }

        # -l [code], -lang [code]
        match(ARGV[pos], /^--?l(a(ng?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["hl"] = group[3] ?
                (group[4] ? group[4] : Option["hl"]) :
                ARGV[++pos]
            continue
        }

        # -s [code], -source [code]
        match(ARGV[pos], /^--?s(o(u(r(ce?)?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            Option["sl"] = group[5] ?
                (group[6] ? group[6] : Option["sl"]) :
                ARGV[++pos]
            continue
        }

        # -t [codes], -target [codes]
        match(ARGV[pos], /^--?t(a(r(g(et?)?)?)?)?(=(.*)?)?$/, group)
        if (RSTART) {
            if (group[5]) {
                if (group[6]) split(group[6], Option["tl"], "+")
            } else
                split(ARGV[++pos], Option["tl"], "+")
            continue
        }

        # Shortcut format
        # '[code]:[code]+...' or '[code]=[code]+...'
        match(ARGV[pos], /^[{([]?([[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]])?)?(:|=)((@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]])?\+)*(@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]])?)?)[})\]]?$/, group)
        if (RSTART) {
            if (group[1]) Option["sl"] = group[1]
            if (group[4]) split(group[4], Option["tl"], "+")
            continue
        }

        # --
        match(ARGV[pos], /^--$/)
        if (RSTART) {
            ++pos # skip the end-of-options option
            break # no more option from here
        }

        break # no more option from here
    }

    # Option parsing finished
    if (Option["interactive"] && !Option["no-rlwrap"]) {
        # Interactive mode
        initRlwrap() # initialize Rlwrap

        if (Rlwrap && (ENVIRON["TRANS_PROGRAM"] || fileExists(EntryPoint))) {
            command = Rlwrap " " Gawk " " (ENVIRON["TRANS_PROGRAM"] ?
                                           "\"${TRANS_PROGRAM}\"" :
                                           "-f " EntryPoint) " -" \
                " -no-rlwrap" # be careful - never fork Rlwrap recursively!
            for (i = 1; i < length(ARGV); i++)
                if (ARGV[i])
                    command = command " " parameterize(ARGV[i])

            if (!system(command))
                exit # child process finished, exit
            else
                ; # skip
        } else
            ; # skip

    } else if (!Option["interactive"] && !Option["no-rlwrap"] && Option["emacs"]) {
        # Emacs interface
        Emacs = "emacs"

        if (ENVIRON["TRANS_PROGRAM"] || fileExists(EntryPoint)) {
            params = ""
            for (i = 1; i < length(ARGV); i++)
                if (ARGV[i])
                    params = params " " (parameterize(ARGV[i], "\""))
            if (ENVIRON["TRANS_PROGRAM"]) {
                el = "(progn (setq trans-program (getenv \"TRANS_PROGRAM\")) " \
                    "(setq explicit-shell-file-name \"" Gawk "\") " \
                    "(setq explicit-" Gawk "-args (cons trans-program '(\"-\" \"-I\" \"-no-rlwrap\"" params "))) " \
                    "(command-execute 'shell) (rename-buffer \"" Name "\"))"
            } else {
                el = "(progn (setq explicit-shell-file-name \"" Gawk "\") " \
                    "(setq explicit-" Gawk "-args '(\"-f\" \"" EntryPoint "\" \"--\" \"-I\" \"-no-rlwrap\"" params ")) " \
                    "(command-execute 'shell) (rename-buffer \"" Name "\"))"
            }
            command = Emacs " --eval " parameterize(el)

            if (!system(command))
                exit # child process finished, exit
            else
                Option["interactive"] = 1 # skip
        } else
            Option["interactive"] = 1 # skip
    }

    if (Option["play"]) {
        # Initialize audio player or speech synthesizer
        initAudioPlayer()
        if (!AudioPlayer) initSpeechSynthesizer()
    }

    if (pos < ARGC) {
        # More parameters

        # Translate the rest parameters
        for (i = pos; i < ARGC; i++) {
            # Verbose mode: separator between sources
            if (Option["verbose"] && i > pos)
                print replicate("═", Option["width"])

            translate(ARGV[i])
        }

        # If input not specified, we're done
    } else {
        # No more parameter besides options

        # If input not specified, use stdin
        if (!Option["input"]) Option["input"] = "/dev/stdin"
    }

    # If input specified, start translating
    if (Option["input"])
        translateMain()

    exit ExitCode
}


Support also different version of Hadoop (=Fedora).

#
# Parsing output of:
#
# hdfs dfs -du -s '/user/*'
#

function dbstr(s) {
	if (s) { return "'" s "'" }
	else { return "NULL" }
}

function dbi(i) {
	if (i >= 0) { return i }
	else { return "NULL" }
}

BEGIN {
	FS="[ \t/]+"
	print "INSERT INTO measure (name) VALUES ('quota');";
}

/^[0-9]+[ 	]+[0-9]+[ 	]+\/.*/ {
	used=$1
	user=$4
	print "INSERT INTO quota (id_measure, user, used) VALUES (last_insert_id(), " dbstr(user) ", " dbi(used) ");"
}
/^[0-9]+[ 	]+\/.*/ {
	used=$1
	user=$3
	print "INSERT INTO quota (id_measure, user, used) VALUES (last_insert_id(), " dbstr(user) ", " dbi(used) ");"
}

#
# Parsing output of:
#
# hdfs dfs -du -s '/user/*'
#

function dbstr(s) {
	if (s) { return "'" s "'" }
	else { return "NULL" }
}

function dbi(i) {
	if (i >= 0) { return i }
	else { return "NULL" }
}

BEGIN {
	FS="[ \t/]+"
	print "INSERT INTO measure (name) VALUES ('quota');";
}

{
	used=$1
	user=$4
	print "INSERT INTO quota (id_measure, user, used) VALUES (last_insert_id(), " dbstr(user) ", " dbi(used) ");"
}