Skip to content
Snippets Groups Projects
Commit 419048ed authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Better usage message.

An explanation why no compression was done when -g is specified and an
error was detected is now printed.
parent d721611a
No related branches found
No related tags found
No related merge requests found
/* /*
* $Id: dbck.c,v 0.6 1991/09/15 10:32:29 linus Exp $ * $Id: dbck.c,v 0.7 1992/01/05 18:48:41 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association. * Copyright (C) 1991 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* Author: Per Cederqvist. * Author: Per Cederqvist.
*/ */
static char *rcsid = "$Id: dbck.c,v 0.6 1991/09/15 10:32:29 linus Exp $"; static char *rcsid = "$Id: dbck.c,v 0.7 1992/01/05 18:48:41 ceder Exp $";
#include <stdarg.h> #include <stdarg.h>
...@@ -1215,7 +1215,8 @@ main (int argc, ...@@ -1215,7 +1215,8 @@ main (int argc,
break; break;
default: default:
restart_kom("usage: dbck [options]\n"); restart_kom("usage: %s [-d] [-Ddir] [-i] [-r] [-v] [-g]\n",
argv[0]);
} }
} }
...@@ -1238,13 +1239,18 @@ main (int argc, ...@@ -1238,13 +1239,18 @@ main (int argc,
log("ready.\n"); log("ready.\n");
} }
if ( modifications == 0 && errors == 0 && gflag ) if ( gflag )
{ {
log("No errors found. Compressing textfile.\n"); if ( modifications == 0 && errors == 0 )
fflush(stdout); {
fflush(stderr); log("No errors found. Compressing textfile.\n");
garb_text_file(); fflush(stdout);
log("ready.\n"); fflush(stderr);
garb_text_file();
log("ready.\n");
}
else
log("Compression not done since errors was found.\n");
} }
return errors != 0; return errors != 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment