2 * collection4 - common.h
3 * Copyright (C) 2010 Florian octo Forster
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA
21 * Florian octo Forster <ff at octo.it>
30 int print_debug (const char *format, ...)
31 __attribute__((format(printf,1,2)));
33 # define DEBUG(...) print_debug (__VA_ARGS__)
35 # define DEBUG(...) /**/
38 size_t c_strlcat (char *dst, const char *src, size_t size);
39 #define strlcat c_strlcat
41 int ds_list_from_rrd_file (char *file,
42 size_t *ret_dses_num, char ***ret_dses);
44 uint32_t get_random_color (void);
45 uint32_t fade_color (uint32_t color);
47 char *strtolower (char *str);
48 char *strtolower_copy (const char *str);
51 * Parses the time parameters "begin" and "end" and returns the specified time
52 * in epoch in the longs pointed to by "ret_begin" and "ret_end". Returns
53 * non-zero on failure. If the optional "ret_now" pointer is not-NULL, the
54 * current time will be assigned to it.
56 int get_time_args (long *ret_begin, long *ret_end,
60 /* vim: set sw=2 sts=2 et fdm=marker : */