Commit a8c453fb authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(datafilename): Removed. All users modified to use

	param.datafile_name instead.
(backupfilename): Removed.  All users modified to use
	param.backupfile_name instead.
(textfilename): Removed.  All users modified to use
	param.textfile_name instead.
(textbackupfilename): Removed.  All users modified to use
	param.textfile_name instead.
(TEXTBACKUPFILE_NAME): Removed.
parent fd67e69f
/*
* $Id: dbck.c,v 0.24 1994/10/22 12:56:17 ceder Exp $
* $Id: dbck.c,v 0.25 1995/10/07 14:28:27 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994 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.24 1994/10/22 12:56:17 ceder Exp $";
static char *rcsid = "$Id: dbck.c,v 0.25 1995/10/07 14:28:27 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -65,13 +65,6 @@ struct kom_par param;
database is missing. */
Bool truncated_texts = FALSE;
char datafilename[1024]; /* Full pathname to the database file */
char backupfilename[1024]; /* Full pathname to the backup file */
char textfilename[1024];
char textbackupfilename[1024]; /* unshrinked text-file. */
#define TEXTBACKUPFILE_NAME "db/backup-texts"
int vflag=0; /* Verbose - list statistics also. */
int iflag=0; /* Interactive - prompt user and repair. */
int rflag=0; /* Repair simple error without confirmation. */
......@@ -1168,17 +1161,12 @@ check_data_base(void)
static void
init_data_base(char *dbase_dir)
{
sprintf(datafilename, "%s/%s", dbase_dir, param.datafile_name);
sprintf(backupfilename, "%s/%s", dbase_dir, param.backupfile_name);
sprintf(textfilename, "%s/%s", dbase_dir, param.textfile_name);
sprintf(textbackupfilename, "%s/%s", dbase_dir, param.textbackupfile_name);
if ( vflag )
{
log("Database = %s\n", datafilename);
log("Backup = %s\n", backupfilename);
log("Text = %s\n", textfilename);
log("Textback = %s\n", textbackupfilename);
log("Database = %s\n", param.datafile_name);
log("Backup = %s\n", param.backupfile_name);
log("Text = %s\n", param.textfile_name);
log("Textback = %s\n", param.textbackupfile_name);
}
if ( init_cache() == FAILURE )
......@@ -1191,9 +1179,9 @@ garb_text_file(void)
Text_no tno = 0;
String text;
log("Renaming %s to %s\n", textfilename, textbackupfilename);
rename(textfilename, textbackupfilename);
log("Writing texts to (new) %s\n", textfilename);
log("Renaming %s to %s\n", param.textfile_name, param.textbackupfile_name);
rename(param.textfile_name, param.textbackupfile_name);
log("Writing texts to (new) %s\n", param.textfile_name);
fflush(stdout);
fflush(stderr);
cache_open_new_text_file();
......
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