+void usage(FILE *out) {
+ fprintf(out, "Usage: dus [OPTION]... [FILE]...\n");
+ fprintf(out, "Version %s (%s)\n", VERSION_NUMBER, UNAME);
+ fprintf(out, "List files and directories sorted according to their sizes. If no files or directories are provided as arguments, use the content of the current directory.\n");
+ fprintf(out, "\n");
+ /* 01234567890123456789012345678901234567890123456789012345678901234567890123456789*/
+ fprintf(out, " -d, --ignore-dots ignore files and directories starting with a '.'\n");
+ fprintf(out, " -f, --fancy display size with float values and K, M and G\n");
+ fprintf(out, " units.\n");
+ fprintf(out, " -r, --reverse-order reverse the sorting order.\n");
+ fprintf(out, " -t, --show-top show the top of the list.\n");
+ fprintf(out, " -c <cols>, --nb-columns <cols>\n");
+ fprintf(out, " specificy the number of columns to display. The\n");
+ fprintf(out, " value -1 corresponds to no constraint. By default\n");
+ fprintf(out, " the command uses the tty width, or no constraint\n");
+ fprintf(out, " if the stdout is not a tty.\n");
+ fprintf(out, " -l <lines>, --nb-lines <lines>\n");
+ fprintf(out, " same as -c for number of lines.\n");
+ fprintf(out, " -h, --help show this help.\n");
+ fprintf(out, " -m <size>, --size-min <size>\n");
+ fprintf(out, " set the listed entries minimum size.\n");
+ fprintf(out, "\n");
+ fprintf(out, "Report bugs and comments to <francois@fleuret.org>.\n");
+}
+
+/**********************************************************************/
+
+static struct option long_options[] = {
+ { "ignore-dots", no_argument, 0, 'd' },
+ { "reverse-order", no_argument, 0, 'r' },
+ { "show-top", no_argument, 0, 't' },
+ { "help", no_argument, 0, 'h' },
+ { "fancy", no_argument, 0, 'f' },
+ { "nb-columns", 1, 0, 'c' },
+ { "nb-lines", 1, 0, 'l' },
+ { "size-min", 1, 0, 'm' },
+ { 0, 0, 0, 0 }
+};
+