Previous accidental commit was actually to improve the way box drawing
[users/jgh/exim.git] / src / exim_monitor / em_version.c
1 /* $Cambridge: exim/src/exim_monitor/em_version.c,v 1.5 2007/01/31 16:52:12 ph10 Exp $ */
2
3 /*************************************************
4 *                  Exim Monitor                  *
5 *************************************************/
6
7 /* Copyright (c) University of Cambridge 1995 - 2007 */
8 /* See the file NOTICE for conditions of use and distribution. */
9
10 #include "mytypes.h"
11 #include "macros.h"
12 #include <string.h>
13 #include <stdlib.h>
14
15 extern uschar *version_string;
16 extern uschar *version_date;
17
18 void
19 version_init(void)
20 {
21 int i = 0;
22 uschar today[20];
23
24 version_string = US"2.06";
25
26 Ustrcpy(today, __DATE__);
27 if (today[4] == ' ') i = 1;
28 today[3] = today[6] = '-';
29
30 version_date = (uschar *)malloc(32);
31 version_date[0] = 0;
32 Ustrncat(version_date, today+4+i, 3-i);
33 Ustrncat(version_date, today, 4);
34 Ustrncat(version_date, today+7, 4);
35 Ustrcat(version_date, " ");
36 Ustrcat(version_date, __TIME__);
37 }
38
39 /* End of em_version.c */