]> mj.ucw.cz Git - libucw.git/commitdiff
die() called with string containing newlines replaced by fputs(stderr) and exit()
authorRobert Spalek <robert@ucw.cz>
Wed, 26 Sep 2001 16:13:34 +0000 (16:13 +0000)
committerRobert Spalek <robert@ucw.cz>
Wed, 26 Sep 2001 16:13:34 +0000 (16:13 +0000)
lib/bucket.c
lib/sort-test.c

index 38d552e0c44d0ed2016d73371ac8241d6091264b..626c87ac642dd029d5d12b4c84846d77759c8557 100644 (file)
@@ -428,7 +428,10 @@ int main(int argc, char **argv)
   log_init(NULL);
   if (cf_getopt(argc, argv, CF_SHORT_OPTS, CF_NO_LONG_OPTS, NULL) >= 0 ||
       optind < argc)
-    die("This program supports only the following command-line arguments:\n" CF_USAGE);
+  {
+    fputs("This program supports only the following command-line arguments:\n" CF_USAGE, stderr);
+    exit(1);
+  }
 
   unlink(obuck_name);
   obuck_init(1);
index 9d32277797af76f22eb929d3b948b39fc62a6d7f..448abdc31b517fe72e0b39e0c64898613b005a96 100644 (file)
@@ -79,7 +79,10 @@ main(int argc, char **argv)
   log_init(NULL);
   if (cf_getopt(argc, argv, CF_SHORT_OPTS, CF_NO_LONG_OPTS, NULL) >= 0 ||
       optind != argc - 2)
-    die("Usage: sort-test [<options>] <input> <output>\nOptions:\n" CF_USAGE);
+  {
+    fputs("This program supports only the following command-line arguments:\n" CF_USAGE, stderr);
+    exit(1);
+  }
 
   s_sort(argv[optind], argv[optind+1]);
   return 0;