/* Return index of first table entry with a matching short option or -1 if no match was found.  */
static int find_shortoption(struct arg_hdr **table, char shortopt)
/* Return index of first table entry with a matching short option or -1 if no match was found.  */
static int find_shortoption(struct arg_hdr **table, char shortopt)
{
    int tabindex;
    for(tabindex = 0; !(table[tabindex]->flag & ARG_TERMINATOR); tabindex++)
    {
        if (table[tabindex]->shortopts &&
            strchr(table[tabindex]->shortopts, shortopt))
            return tabindex;
    }
    return -1;
}