| 1 | /************************************************* |
| 2 | * Exim Monitor * |
| 3 | *************************************************/ |
| 4 | |
| 5 | /* Copyright (c) University of Cambridge 1995 - 2009 */ |
| 6 | /* See the file NOTICE for conditions of use and distribution. */ |
| 7 | |
| 8 | #include "mytypes.h" |
| 9 | #include "macros.h" |
| 10 | #include <string.h> |
| 11 | #include <stdlib.h> |
| 12 | |
| 13 | extern uschar *version_string; |
| 14 | extern uschar *version_date; |
| 15 | |
| 16 | void |
| 17 | version_init(void) |
| 18 | { |
| 19 | int i = 0; |
| 20 | uschar today[20]; |
| 21 | |
| 22 | version_string = US"2.06"; |
| 23 | |
| 24 | Ustrcpy(today, __DATE__); |
| 25 | if (today[4] == ' ') i = 1; |
| 26 | today[3] = today[6] = '-'; |
| 27 | |
| 28 | version_date = (uschar *)malloc(32); |
| 29 | version_date[0] = 0; |
| 30 | Ustrncat(version_date, today+4+i, 3-i); |
| 31 | Ustrncat(version_date, today, 4); |
| 32 | Ustrncat(version_date, today+7, 4); |
| 33 | Ustrcat(version_date, " "); |
| 34 | Ustrcat(version_date, __TIME__); |
| 35 | } |
| 36 | |
| 37 | /* End of em_version.c */ |