Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/docs/style-guide.txt
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/docs/style-guide.txt
r2725 r3232 680 680 Then have long options defined: 681 681 682 static const struct option <applet>_long_options[] = { 683 { "list", 0, NULL, 't' }, 684 { "extract", 0, NULL, 'x' }, 685 { NULL, 0, NULL, 0 } 686 }; 682 static const char <applet>_longopts[] ALIGN1 = 683 "list\0" No_argument "t" 684 "extract\0" No_argument "x" 685 ; 687 686 688 687 And a code block similar to the following near the top of your applet_main() … … 692 691 693 692 opt_complementary = "cryptic_string"; 694 applet_long_options = <applet>_long _options; /* if you have them */693 applet_long_options = <applet>_longopts; /* if you have them */ 695 694 opt = getopt32(argc, argv, "ab:c", &str_b); 696 695 if (opt & 1) {
Note:
See TracChangeset
for help on using the changeset viewer.