*
* Home page of code is: http://smartmontools.sourceforge.net
*
- * Copyright (C) 2004-6 Christian Franke <smartmontools-support@lists.sourceforge.net>
+ * Copyright (C) 2004-10 Christian Franke <smartmontools-support@lists.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
*/
-static char rcsid[] = "$Id: syslogevt.c,v 1.4 2006/04/12 14:54:29 ballen4705 Exp $";
+static char rcsid[] = "$Id: syslogevt.c 3257 2011-02-14 22:19:42Z manfred99 $";
#include <stdio.h>
#include <string.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#ifdef _DEBUG
#include "syslogevt.h"
-#endif
+// Compile time check for Message Ids, see also syslog_win32.cpp
+typedef assert_msg_syslog [MSG_SYSLOG == 0 ? 1 : -1];
+typedef assert_msg_syslog_01[MSG_SYSLOG_01 == 1 ? 1 : -1];
+typedef assert_msg_syslog_10[MSG_SYSLOG_10 == 10 ? 1 : -1];
static int usage()
{
puts(
- "syslogevt $Revision: 1.4 $ Copyright (C) 2004-6 Christian Franke\n"
+ "syslogevt $Revision: 3257 $ Copyright (C) 2004-10 Christian Franke\n"
"Home page is http://smartmontools.sourceforge.net/\n"
"\n"
"Usage: syslogevt [-ru] name [ident ...]\n"
const char * ident;
FILE * f1, * f2;
-#ifdef _DEBUG
- if (!(MSG_SYSLOG == 0 && MSG_SYSLOG_01 == 1 && MSG_SYSLOG_10 == 10)) {
- puts("Internal error: MSG_SYSLOG_n != n"); return 1;
- }
-#endif
-
if (argc < 2)
return usage();
perror(name1); return 1;
}
if (!(f2 = fopen(name2, "w"))) {
- perror(name2); unlink(name1); return 1;
+ perror(name2); fclose(f1); unlink(name1); return 1;
}
fputs("REGEDIT4\n\n", f1);