Commit b1c02d51 authored by David Byers's avatar David Byers
Browse files

(oformat, force_output): New global variables.

(main): New options: F (to force output) and o (to select output format).
parent d841d964
/*
* $Id: dbck.c,v 0.28 1995/11/08 21:01:15 ceder Exp $
* $Id: dbck.c,v 0.29 1996/02/23 16:00:20 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995 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.28 1995/11/08 21:01:15 ceder Exp $";
static char *rcsid = "$Id: dbck.c,v 0.29 1996/02/23 16:00:20 byers Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -70,6 +70,12 @@ int iflag=0; /* Interactive - prompt user and repair. */
int rflag=0; /* Repair simple error without confirmation. */
int gflag=0; /* Garbage collect text-file. */
int sflag=0; /* Statistic flag. */
/* The following variable holds the output format */
long oformat=0; /* Output format */
long force_output=0; /* Force sync (for conversions) */
/* The following variable corresponds to the -c flag, and is
present here due to a bug in lyskomd 1.6.1. */
int unset_change_name_is_error=0;
......@@ -1289,6 +1295,22 @@ main (int argc,
unset_change_name_is_error = 1;
break;
case 'F':
force_output = 1;
break;
case 'o': /* Select output format */
if (argv[i+1] != 0 && argv[i+1][0] != '-')
{
oformat = atoi(argv[i+1]);
i += 1;
}
else
restart_kom("usage: %s %s [config_file]\n",
argv[0],
"[-d ...] [-i] [-r] [-v] [-g] [-s] [-c] [-t] [-F] [-o ...]");
break;
case 't':
dump_text_numbers++;
break;
......@@ -1296,7 +1318,7 @@ main (int argc,
default:
restart_kom("usage: %s %s [config_file]\n",
argv[0],
"[-d ...] [-i] [-r] [-v] [-g] [-s] [-c] [-t]");
"[-d ...] [-i] [-r] [-v] [-g] [-s] [-c] [-t] [-F] [-o ...]");
}
}
......@@ -1330,7 +1352,7 @@ main (int argc,
else if ( vflag && errors > 0 )
log("%d error%s found.\n", errors, errors == 1 ? "" : "s");
if ( modifications > 0 )
if ( modifications > 0 || force_output)
{
log("%d modification%s made. Syncing...\n",
modifications, modifications == 1 ? "" : "s");
......
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