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

(sync_output_header): Output the supplied state instead of hardcoding

	it to DIRTY.  Added a missing const.
parent 7adb34e8
/*
* $Id: dbck-cache.c,v 0.40 1999/05/24 09:34:22 ceder Exp $
* $Id: dbck-cache.c,v 0.41 1999/05/24 11:57:07 ceder Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -39,7 +39,7 @@
static const char *
rcsid = "$Id: dbck-cache.c,v 0.40 1999/05/24 09:34:22 ceder Exp $";
rcsid = "$Id: dbck-cache.c,v 0.41 1999/05/24 11:57:07 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -553,18 +553,18 @@ is_clean(const char *fn)
}
static void
sync_output_header(FILE* fp, char *state, int oformat)
sync_output_header(FILE* fp, const char *state, int oformat)
{
switch (oformat)
{
case 0:
fprintf(fp, "DIRTY\n");
fprintf(fp, "%s\n", state);
break;
case 1:
fprintf(fp, "DIRTY:%05ld\n", (long)oformat);
fprintf(fp, "%s:%05ld\n", state, (long)oformat);
break;
case 2:
fprintf(fp, "DIRTY:%05ld\n", (long)oformat);
fprintf(fp, "%s:%05ld\n", state, (long)oformat);
fprintf(fp, "%020lu\n", (unsigned long)time(NULL));
break;
default:
......
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