cksum: code shrink
[oweals/busybox.git] / coreutils / comm.c
index cd450950b5772a4c62768398086e71d09ecc32ed..4bee7767752edc54f7533351054ec27bc7b9cf1f 100644 (file)
@@ -6,6 +6,16 @@
  *
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
+//config:config COMM
+//config:      bool "comm (3.9 kb)"
+//config:      default y
+//config:      help
+//config:      comm is used to compare two files line by line and return
+//config:      a three-column output.
+
+//applet:IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_COMM) += comm.o
 
 //usage:#define comm_trivial_usage
 //usage:       "[-123] FILE1 FILE2"
@@ -52,8 +62,7 @@ int comm_main(int argc UNUSED_PARAM, char **argv)
        int i;
        int order;
 
-       opt_complementary = "=2";
-       getopt32(argv, "123");
+       getopt32(argv, "^" "123" "\0" "=2");
        argv += optind;
 
        for (i = 0; i < 2; ++i) {