aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/numconvert.c
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2009-08-12 20:14:25 -0800
committerDavid M. Syzdek <david@syzdek.net>2009-08-12 20:14:25 -0800
commit92faf7eeede16669ebb8d1fe82e33b3d97f33911 (patch)
tree696316492a94351f94f537cb8f3bac9dc431f45a /src/numconvert.c
parentfc13d11a748608a0c67af449e3e6928c289b72db (diff)
downloaddmstools-92faf7eeede16669ebb8d1fe82e33b3d97f33911.tar.gz
dmstools-92faf7eeede16669ebb8d1fe82e33b3d97f33911.tar.bz2
dmstools-92faf7eeede16669ebb8d1fe82e33b3d97f33911.tar.xz
dmstools-92faf7eeede16669ebb8d1fe82e33b3d97f33911.zip
Changing numconvert -H option to -X for Hex output
Diffstat (limited to 'src/numconvert.c')
-rw-r--r--src/numconvert.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/numconvert.c b/src/numconvert.c
index a68fb78..e40397a 100644
--- a/src/numconvert.c
+++ b/src/numconvert.c
@@ -145,7 +145,7 @@ int main(int argc, char * argv[])
145 uintmax_t byte; 145 uintmax_t byte;
146 146
147 // getopt options 147 // getopt options
148 static char short_opt[] = "aBDHhOsV"; 148 static char short_opt[] = "aBDhOsVXx";
149 static struct option long_opt[] = 149 static struct option long_opt[] =
150 { 150 {
151 {"help", no_argument, 0, 'h'}, 151 {"help", no_argument, 0, 'h'},
@@ -172,9 +172,6 @@ int main(int argc, char * argv[])
172 case 'D': 172 case 'D':
173 opt |= MY_OPT_DEC; 173 opt |= MY_OPT_DEC;
174 break; 174 break;
175 case 'H':
176 opt |= MY_OPT_HEX;
177 break;
178 case 'h': 175 case 'h':
179 my_usage(); 176 my_usage();
180 return(0); 177 return(0);
@@ -184,6 +181,9 @@ int main(int argc, char * argv[])
184 case 's': 181 case 's':
185 opt = MY_TOGGLE(opt, MY_OPT_SPACE); 182 opt = MY_TOGGLE(opt, MY_OPT_SPACE);
186 break; 183 break;
184 case 'X':
185 opt |= MY_OPT_HEX;
186 break;
187 case 'V': 187 case 'V':
188 my_version(); 188 my_version();
189 return(0); 189 return(0);
@@ -263,10 +263,10 @@ void my_usage()
263 printf(_("Usage: %s num1 num2 ... numX\n" 263 printf(_("Usage: %s num1 num2 ... numX\n"
264 " -B enable binary output\n" 264 " -B enable binary output\n"
265 " -D enable decimal output\n" 265 " -D enable decimal output\n"
266 " -H enable hexadecimal output\n"
267 " -h, --help print this help and exit\n" 266 " -h, --help print this help and exit\n"
268 " -O enable octal output\n" 267 " -O enable octal output\n"
269 " -s display binary value in 8 bit blocks\n" 268 " -s display binary value in 8 bit blocks\n"
269 " -X enable hexadecimal output\n"
270 " -V, --version print version number and exit\n" 270 " -V, --version print version number and exit\n"
271 "\n" 271 "\n"
272 "Input Notation:\n" 272 "Input Notation:\n"