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

Fixed format string in VBUG macro.

parent 9de96476
/*
* $Id: simple-cache.c,v 0.41 1993/11/22 19:09:46 ceder Exp $
* $Id: simple-cache.c,v 0.42 1994/01/12 01:56:51 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -33,7 +33,7 @@
* New save algorithm by ceder.
*/
static char *rcsid = "$Id: simple-cache.c,v 0.41 1993/11/22 19:09:46 ceder Exp $";
static char *rcsid = "$Id: simple-cache.c,v 0.42 1994/01/12 01:56:51 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -78,6 +78,7 @@ USE(rcsid);
#include "com.h"
#include "connections.h"
#include "send-async.h"
#include "param.h"
/*
* Possible improvements: +++
......@@ -157,8 +158,6 @@ BUGDECL;
the data base. */
#ifdef LOGACCESSES
extern char *logaccess_file; /* From ramkomd.c */
typedef enum {
lt_restart,
lt_text_stat,
......@@ -447,7 +446,7 @@ mark_text_as_changed( Text_no text_no )
node = get_text_node (text_no);
TRACE2("Text %u is changed.\n", text_no);
TRACE2("Text %lu is changed.\n", text_no);
if ( text_no < 1 || text_no >= next_text_num
|| node == NULL || node->s.exists == 0)
{
......@@ -829,7 +828,7 @@ cached_get_text( Text_no text )
String the_string;
Text_stat *t_stat;
TRACE2("cached_get_text %u\n", text);
TRACE2("cached_get_text %lu\n", text);
if ( (t_stat = cached_get_text_stat (text)) == NULL )
return EMPTY_STRING;
......@@ -858,7 +857,7 @@ cached_get_text_stat( Text_no text )
{
Cache_node *node;
TRACE2("cached_get_text_stat(%u); next_text_num == ", text);
TRACE2("cached_get_text_stat(%lu); next_text_num == ", text);
TRACE2("%d\n", next_text_num);
if ( text == 0 )
......@@ -918,7 +917,7 @@ cached_create_text(const String message)
tno = next_text_num++;
TRACE2("cached_create_text (len=%u)\n", message.len);
TRACE2("cached_create_text (len=%lu)\n", message.len);
if ( tno >= MAX_TEXT )
{
......@@ -956,7 +955,7 @@ cached_create_text(const String message)
fflush(text_file);
LOGACC(lt_create_text, tno);
TRACE2("cached_create_text -> %u\n", tno);
TRACE2("cached_create_text -> %lu\n", tno);
return tno;
}
......@@ -1564,7 +1563,7 @@ save_one_pers(void)
}
else /* All persons are written. */
{
fprintf(file_b, "%u\n", highest_text_no); /* NEXT_TEXT_NUM */
fprintf(file_b, "%lu\n", highest_text_no); /* NEXT_TEXT_NUM */
sync_next = 1;
sync_state = sync_save_text;
}
......@@ -1900,14 +1899,14 @@ init_cache(void)
text_mcb = create_cache_node_mcb(100, MAX_TEXT);
#ifdef LOGACCESSES
if (logaccess_file)
if (param.logaccess_file)
{
logfile = fopen(logaccess_file, "a");
logfile = fopen(param.logaccess_file, "a");
if (logfile)
log("Logging db accesses to %s.\n", logaccess_file);
log("Logging db accesses to %s.\n", param.logaccess_file);
else
log("Failed to open db log file %s. Ignoring -L option.\n",
logaccess_file);
log("Failed to open db log file %s. Not logging.\n",
param.logaccess_file);
}
#endif
LOGACC(lt_restart, time(NULL));
......
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