"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/holidays.c" between
xymon-4.3.29.tar.gz and xymon-4.3.30.tar.gz

About: Xymon is a system for monitoring servers, applications and networks (like Big Brother; former name "hobbit").

holidays.c  (xymon-4.3.29):holidays.c  (xymon-4.3.30)
skipping to change at line 15 skipping to change at line 15
/* It contains routines for handling holidays. */ /* It contains routines for handling holidays. */
/* */ /* */
/* Copyright (C) 2006-2008 Michael Nagel */ /* Copyright (C) 2006-2008 Michael Nagel */
/* Modifications for Xymon (C) 2007-2011 Henrik Storner <henrik@hswn.dk> */ /* Modifications for Xymon (C) 2007-2011 Henrik Storner <henrik@hswn.dk> */
/* */ /* */
/* This program is released under the GNU General Public License (GPL), */ /* This program is released under the GNU General Public License (GPL), */
/* version 2. See the file "COPYING" for details. */ /* version 2. See the file "COPYING" for details. */
/* */ /* */
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
static char rcsid[] = "$Id: holidays.c 7240M 2019-07-23 14:46:51Z (local) $"; static char rcsid[] = "$Id: holidays.c 8084 2019-08-30 23:01:18Z jccleaver $";
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <limits.h> #include <limits.h>
#include "libxymon.h" #include "libxymon.h"
skipping to change at line 590 skipping to change at line 590
* *
* Note: tm_yday is zero-based, but tm_mday is 1-based! * Note: tm_yday is zero-based, but tm_mday is 1-based!
*/ */
tm.tm_mon = 0; tm.tm_mday = day+1; tm.tm_year = current_y ear; tm.tm_mon = 0; tm.tm_mday = day+1; tm.tm_year = current_y ear;
tm.tm_hour = 12; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_hour = 12; tm.tm_min = 0; tm.tm_sec = 0;
tm.tm_isdst = -1; tm.tm_isdst = -1;
t = mktime(&tm); t = mktime(&tm);
if ((tm.tm_mon >= mfirst) && (tm.tm_mon <= mlast)) { if ((tm.tm_mon >= mfirst) && (tm.tm_mon <= mlast)) {
strftime(dstr, sizeof(dstr), fmt, localtime(&t)); strftime(dstr, sizeof(dstr), fmt, localtime(&t));
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncati on" #pragma GCC diagnostic ignored "-Wformat-truncati on"
#endif // __GNUC__
snprintf(oneh, sizeof(oneh), "<tr><td>%s</td><td> %s</td>\n", desc, dstr); snprintf(oneh, sizeof(oneh), "<tr><td>%s</td><td> %s</td>\n", desc, dstr);
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif // __GNUC__
addtobuffer(buf, oneh); addtobuffer(buf, oneh);
} }
} }
} }
} }
#ifdef STANDALONE #ifdef STANDALONE
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
char l[1024]; char l[1024];
 End of changes. 5 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)