X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.h;h=79a83ec4579a4178f77b1bc1a3cab5983d3dadbf;hb=067f1db82ec2cf7c9a3fabe4f3e3e022714e8cbe;hp=e08c455d884a6f1b7396cdf7b5a2b6be751c732e;hpb=b8b8d15d228be65ae62db08e4163d34e958e7766;p=collection4.git diff --git a/src/common.h b/src/common.h index e08c455..79a83ec 100644 --- a/src/common.h +++ b/src/common.h @@ -1,3 +1,26 @@ +/** + * collection4 - common.h + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #ifndef COMMON_H #define COMMON_H 1 @@ -24,5 +47,14 @@ uint32_t fade_color (uint32_t color); char *strtolower (char *str); char *strtolower_copy (const char *str); +/* + * Parses the time parameters "begin" and "end" and returns the specified time + * in epoch in the longs pointed to by "ret_begin" and "ret_end". Returns + * non-zero on failure. If the optional "ret_now" pointer is not-NULL, the + * current time will be assigned to it. + */ +int get_time_args (long *ret_begin, long *ret_end, + long *ret_now); + #endif /* COMMON_H */ /* vim: set sw=2 sts=2 et fdm=marker : */