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
/*
* $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.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* 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>
......@@ -1215,7 +1215,8 @@ main (int argc,
break;
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,
log("ready.\n");
}
if ( modifications == 0 && errors == 0 && gflag )
if ( gflag )
{
log("No errors found. Compressing textfile.\n");
fflush(stdout);
fflush(stderr);
garb_text_file();
log("ready.\n");
if ( modifications == 0 && errors == 0 )
{
log("No errors found. Compressing textfile.\n");
fflush(stdout);
fflush(stderr);
garb_text_file();
log("ready.\n");
}
else
log("Compression not done since errors was found.\n");
}
return errors != 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment