/*************************************************
*                  Smailmon                      *
*************************************************/

/* Copyright (c) University of Cambridge, 1995. */

/* Written by Philip Hazel, starting February 1995. */

/* This file contains one function, which sets up the current
version string. Note the fudgery needed to prevent the compiler
optimizing the copyright string out of the binary. */

#define this_version  "1.02"

#include "smailmon.h"

void version_init(void)
{
int i = 0;
char *copyright = "Copyright (c) University of Cambridge 1994";
char today[20];

version_string = (char *)malloc(strlen(copyright));
strcpy(version_string, copyright);
strcpy(version_string, this_version);

strcpy(today, __DATE__);
if (today[4] == ' ') i = 1;
today[3] = today[6] = '-';

version_date = (char *)malloc(20);
version_date[0] = 0;
strncat(version_date, today+4+i, 3-i);
strncat(version_date, today, 4);
strncat(version_date, today+7, 4);
}

/* End of version.c */

