Mercurial > hg > dmlib
comparison tools/packed.c @ 2440:5b8cb850f5ab
Rename extract short from 'e' to 'x'.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 26 Feb 2020 18:15:17 +0200 |
parents | f81b42dd600d |
children | 275374725598 |
comparison
equal
deleted
inserted
replaced
2439:f81b42dd600d | 2440:5b8cb850f5ab |
---|---|
43 static const DMOptArg cmdList[] = | 43 static const DMOptArg cmdList[] = |
44 { | 44 { |
45 { CMD_CREATE , 'c', "create", "Create and add files to PACK", OPT_NONE }, | 45 { CMD_CREATE , 'c', "create", "Create and add files to PACK", OPT_NONE }, |
46 { CMD_ADD , 'a', "add", "Add files to PACK", OPT_NONE }, | 46 { CMD_ADD , 'a', "add", "Add files to PACK", OPT_NONE }, |
47 { CMD_LIST , 'l', "list", "List files in PACK", OPT_NONE }, | 47 { CMD_LIST , 'l', "list", "List files in PACK", OPT_NONE }, |
48 { CMD_EXTRACT , 'e', "extract", "Extract files from PACK", OPT_NONE }, | 48 { CMD_EXTRACT , 'x', "extract", "Extract files from PACK", OPT_NONE }, |
49 }; | 49 }; |
50 | 50 |
51 static const int cmdListN = sizeof(cmdList) / sizeof(cmdList[0]); | 51 static const int cmdListN = sizeof(cmdList) / sizeof(cmdList[0]); |
52 | 52 |
53 | 53 |
170 { | 170 { |
171 for (int n = 0; n < cmdListN; n++) | 171 for (int n = 0; n < cmdListN; n++) |
172 { | 172 { |
173 const DMOptArg *cmd = &cmdList[n]; | 173 const DMOptArg *cmd = &cmdList[n]; |
174 if ((currArg[0] == cmd->o_short && currArg[1] == 0) || | 174 if ((currArg[0] == cmd->o_short && currArg[1] == 0) || |
175 (currArg[0] == cmd->o_long[0] && currArg[1] == 0) || | |
175 strcmp(currArg, cmd->o_long) == 0) | 176 strcmp(currArg, cmd->o_long) == 0) |
176 { | 177 { |
177 optCommand = cmd->id; | 178 optCommand = cmd->id; |
178 break; | 179 break; |
179 } | 180 } |