Main Page | Class List | File List | Class Members | File Members

share.h

Go to the documentation of this file.
00001 /*
00002  *  $Id: share.h,v 1.21 2005/12/27 12:06:27 ghost666 Exp $
00003  *
00004  *  rssbgr - RSS backgroud reader
00005  *  Copyright (C) 2005 Piotr 'GhosT' Wydrych
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (at your option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 
00022 #ifndef _RSSBGR_SHARE_H
00023 #define _RSSBGR_SHARE_H
00024 
00025 #include <stdio.h>
00026 #include <unistd.h>
00027 #include <limits.h>
00028 
00029 #define DIRECTORY ".rssbgr"
00030 #define LOCKFILE DIRECTORY "/.lock"
00031 #define CONFIGFILE DIRECTORY "/config"
00032 #define CONFIGFILE_FORMAT "%s\t%lu\t%s"
00033 #define CONFIGFILE_VARS_SCAN url, &frequency, action
00034 #define CONFIGFILE_VARS_PRINT url, frequency, action
00035 #define MIN_FREQUENCY 60
00036 
00037 #define DEBUG_ON 0
00038 
00039 #define DEBUG1(foo1)                   { if (DEBUG_ON) { fprintf(stdout, "DEBUG: " foo1 "\n"                   ); } }
00040 #define DEBUG2(foo1, foo2)             { if (DEBUG_ON) { fprintf(stdout, "DEBUG: " foo1 "\n", foo2             ); } }
00041 #define DEBUG3(foo1, foo2, foo3)       { if (DEBUG_ON) { fprintf(stdout, "DEBUG: " foo1 "\n", foo2, foo3       ); } }
00042 #define DEBUG4(foo1, foo2, foo3, foo4) { if (DEBUG_ON) { fprintf(stdout, "DEBUG: " foo1 "\n", foo2, foo3, foo4 ); } }
00043 
00044 #define DIE(reason) { fprintf(stderr, "ERROR: " reason "\n"); _exit(1); }
00045 
00046 #ifndef _POSIX_PATH_MAX
00047 #define _POSIX_PATH_MAX 1024
00048 #endif /* ifndef _POSIX_PATH_MAX */
00049 
00050 #ifndef PATH_MAX
00051 #define PATH_MAX _POSIX_PATH_MAX
00052 #endif /* ifndef PATH_MAX */
00053 
00054 #ifndef MIN
00055 #define MIN( x, y ) ((x) < (y) ? (x) : (y))
00056 #endif /* ifndef MIN */
00057 
00058 #endif /* ifndef _RSSBGR_SHARE_H */

Generated on Fri May 26 08:40:18 2006 for RSSbgr by doxygen 1.3.6