Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
b1c02d51
Commit
b1c02d51
authored
Feb 23, 1996
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/dbck.c
View file @
b1c02d51
/*
* $Id: dbck.c,v 0.2
8
199
5/11/08 21:01:15 ced
er Exp $
* $Id: dbck.c,v 0.2
9
199
6/02/23 16:00:20 by
er
s
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.2
8
199
5/11/08 21:01:15 ced
er Exp $"
;
static
char
*
rcsid
=
"$Id: dbck.c,v 0.2
9
199
6/02/23 16:00:20 by
er
s
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"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment