Mercurial > hg > dmlib
diff tools/packed.c @ 1742:ddec147d1f90
Bring in changes from the th-libs version of commandline argument handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 09 Jun 2018 17:56:07 +0300 |
parents | 8fb4e8c825d6 |
children | 33c29e7d1861 |
line wrap: on
line diff
--- a/tools/packed.c Sat Jun 09 17:04:33 2018 +0300 +++ b/tools/packed.c Sat Jun 09 17:56:07 2018 +0300 @@ -73,7 +73,7 @@ const DMOptArg *cmd = &cmdList[i]; char tmpStr[128]; snprintf(tmpStr, sizeof(tmpStr), "%c / %s", - cmd->optShort, cmd->optLong); + cmd->o_short, cmd->o_long); fprintf(stdout, " %-15s %s\n", tmpStr, cmd->desc); } @@ -159,8 +159,8 @@ for (int n = 0; n < cmdListN; n++) { const DMOptArg *cmd = &cmdList[n]; - if ((currArg[0] == cmd->optShort && currArg[1] == 0) || - strcmp(currArg, cmd->optLong) == 0) + if ((currArg[0] == cmd->o_short && currArg[1] == 0) || + strcmp(currArg, cmd->o_long) == 0) { optCommand = cmd->id; break;