00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
00049
00050 #ifndef PATH_MAX
00051 #define PATH_MAX _POSIX_PATH_MAX
00052 #endif
00053
00054 #ifndef MIN
00055 #define MIN( x, y ) ((x) < (y) ? (x) : (y))
00056 #endif
00057
00058 #endif