a188c7 | 2002-03-12 | Martin Stjernholm | |
|
0917d3 | 2013-03-04 | Anders Johansson | |
|
16188f | 2000-07-15 | Henrik Grubbström (Grubba) | |
|
b1fca0 | 1996-11-12 | Per Hedbor | | #ifndef _ROXEN_H_
|
b87896 | 1999-11-06 | Per Hedbor | |
|
b1fca0 | 1996-11-12 | Per Hedbor | | #define _ROXEN_H_
#include <config.h>
#define HOST_TO_IP 'H'
#define IP_TO_HOST 'I'
|
6d05fc | 2006-04-20 | Henrik Grubbström (Grubba) | | #ifndef REQUESTID
#define REQUESTID id
#endif
|
1e6cb6 | 2008-11-05 | Martin Stjernholm | |
#define TOSTR2(X) #X
#define TOSTR(X) TOSTR2(X)
|
0e7808 | 1998-10-13 | Henrik Grubbström (Grubba) | |
|
16188f | 2000-07-15 | Henrik Grubbström (Grubba) | |
#ifndef __LOCALEOBJECT
#ifdef IN_ROXEN
|
c6ea9e | 2000-11-21 | Per Hedbor | | mixed get_locale();
#define __LOCALE (get_locale)
|
16188f | 2000-07-15 | Henrik Grubbström (Grubba) | | #else /* !IN_ROXEN */
|
c6ea9e | 2000-11-21 | Per Hedbor | | #define __LOCALE (roxen.get_locale)
|
16188f | 2000-07-15 | Henrik Grubbström (Grubba) | | #endif /* IN_ROXEN */
#endif /* !__LOCALEOBJECT */
|
d05f9c | 2000-07-11 | Martin Nilsson | | #ifndef _STR_LOCALE
|
c6ea9e | 2000-11-21 | Per Hedbor | | #define _STR_LOCALE(X, Y, Z) Locale.translate(X, __LOCALE(), Y, Z)
|
16188f | 2000-07-15 | Henrik Grubbström (Grubba) | | #endif /* !_STR_LOCALE */
|
d05f9c | 2000-07-11 | Martin Nilsson | |
|
b9a702 | 2000-07-15 | Andreas Lange | | #ifndef _DEF_LOCALE
|
79ca87 | 2000-11-24 | Per Hedbor | | # define _DEF_LOCALE(X, Y, Z) ([object(Locale.DeferredLocale)|string]((mixed)Locale.DeferredLocale(X,__LOCALE,Y,Z)))
|
16188f | 2000-07-15 | Henrik Grubbström (Grubba) | | #endif /* !_DEF_LOCALE */
|
b9a702 | 2000-07-15 | Andreas Lange | |
|
1c783c | 2000-07-15 | Andreas Lange | | #ifndef _LOCALE_FUN
|
c6ea9e | 2000-11-21 | Per Hedbor | | #define _LOCALE_FUN(X, Y, Z) Locale.call(X, __LOCALE(), Y, Z)
|
16188f | 2000-07-15 | Henrik Grubbström (Grubba) | | #endif /* !_LOCALE_FUN */
|
a188c7 | 2002-03-12 | Martin Stjernholm | |
#ifdef DEBUG
#define DO_IF_DEBUG(X...) X
|
9674ab | 2004-04-21 | Martin Stjernholm | | #define ASSERT_IF_DEBUG(TEST, ARGS...) do { \
|
322f59 | 2004-04-21 | Martin Stjernholm | | if (!(TEST)) error ("Assertion failed: " #TEST "\n", ARGS); \
|
9674ab | 2004-04-21 | Martin Stjernholm | | } while (0)
|
a188c7 | 2002-03-12 | Martin Stjernholm | | #else
#define DO_IF_DEBUG(X...)
|
9674ab | 2004-04-21 | Martin Stjernholm | | #define ASSERT_IF_DEBUG(TEST, ARGS...) do {} while (0)
|
a188c7 | 2002-03-12 | Martin Stjernholm | | #endif
|
1f88ef | 2009-04-17 | Martin Stjernholm | |
#define CACHE(seconds) REQUESTID->lower_max_cache (seconds)
#define RAISE_CACHE(seconds) REQUESTID->raise_max_cache (seconds)
#define NOCACHE() REQUESTID->set_max_cache (0)
|
3983d4 | 2003-11-25 | Anders Johansson | | #ifdef DEBUG_CACHEABLE
|
6d05fc | 2006-04-20 | Henrik Grubbström (Grubba) | | # define NO_PROTO_CACHE() do { \
([mapping(string:mixed)]REQUESTID->misc)->no_proto_cache = 1; \
report_debug("%s:%d disabled proto cache\n", __FILE__, __LINE__); \
} while(0)
# define PROTO_CACHE() do { \
([mapping(string:mixed)]REQUESTID->misc)->no_proto_cache = 0; \
report_debug("%s:%d enabled proto cache\n", __FILE__, __LINE__); \
} while(0)
|
3983d4 | 2003-11-25 | Anders Johansson | | #else
|
6d05fc | 2006-04-20 | Henrik Grubbström (Grubba) | | # define NO_PROTO_CACHE() \
([mapping(string:mixed)]REQUESTID->misc)->no_proto_cache = 1
# define PROTO_CACHE() \
([mapping(string:mixed)]REQUESTID->misc)->no_proto_cache = 0
|
3983d4 | 2003-11-25 | Anders Johansson | | #endif /* DEBUG_CACHEABLE */
|
d58400 | 2009-10-31 | Martin Stjernholm | |
#ifdef OBJ_COUNT_DEBUG
#define DECLARE_OBJ_COUNT \
protected int __object_count = ++all_constants()->_obj_count
#define OBJ_COUNT ("[" + this_program::__object_count + "]")
#else
#define DECLARE_OBJ_COUNT ;
#define OBJ_COUNT ""
#endif
|
16188f | 2000-07-15 | Henrik Grubbström (Grubba) | | #endif /* !_ROXEN_H_ */
|