- // process parameters
- while ((o = getopt(argc, argv, "du")) != EOF) {
- switch (o) {
- case 'd':
- ConvType = CT_UNIX2DOS;
- break;
- case 'u':
- ConvType = CT_DOS2UNIX;
- break;
- default:
- show_usage();
- }
- }
+ /* process parameters */
+ o = bb_getopt_ulflags(argc, argv, "ud");
+
+ /* Do the conversion requested by an argument else do the default
+ * conversion depending on our name. */
+ if (o)
+ ConvType = o;