e5ee292000-09-24Martin Nilsson // $Id: roxen.h,v 1.18 2000/09/24 13:35:51 nilsson Exp $
16188f2000-07-15Henrik Grubbström (Grubba) // -*- Pike -*-
b1fca01996-11-12Per Hedbor #ifndef _ROXEN_H_
b878961999-11-06Per Hedbor 
b1fca01996-11-12Per Hedbor #define _ROXEN_H_ #include <config.h> #define HOST_TO_IP 'H' #define IP_TO_HOST 'I'
ff66f71997-03-03Henrik Grubbström (Grubba) #define perror roxen_perror
0e78081998-10-13Henrik Grubbström (Grubba) // Localization support
16188f2000-07-15Henrik Grubbström (Grubba)  #ifndef __LOCALEOBJECT #ifdef IN_ROXEN #define __LOCALEOBJECT locale #else /* !IN_ROXEN */ #define __LOCALEOBJECT roxen.locale #endif /* IN_ROXEN */ #endif /* !__LOCALEOBJECT */
d05f9c2000-07-11Martin Nilsson #ifndef _STR_LOCALE
a316582000-07-19Andreas Lange #define _STR_LOCALE(X, Y, Z) \
e5ee292000-09-24Martin Nilsson  (Locale.translate(X, __LOCALEOBJECT->get(), Y, Z))
16188f2000-07-15Henrik Grubbström (Grubba) #endif /* !_STR_LOCALE */
d05f9c2000-07-11Martin Nilsson 
b9a7022000-07-15Andreas Lange #ifndef _DEF_LOCALE
a316582000-07-19Andreas Lange #define _DEF_LOCALE(X, Y, Z) \
e5ee292000-09-24Martin Nilsson  ([string](mixed)Locale.DeferredLocale(X, GETLOCLANG, Y, Z))
16188f2000-07-15Henrik Grubbström (Grubba) #endif /* !_DEF_LOCALE */
b9a7022000-07-15Andreas Lange  #ifndef USE_DEFERRED_LOCALE
16188f2000-07-15Henrik Grubbström (Grubba) #define USE_DEFERRED_LOCALE \ static local inline string GETLOCLANG() { \ return __LOCALEOBJECT->get(); \ } #endif /* !USE_DEFERRED_LOCALE */
0e78081998-10-13Henrik Grubbström (Grubba) 
1c783c2000-07-15Andreas Lange #ifndef _LOCALE_FUN
16188f2000-07-15Henrik Grubbström (Grubba) #define _LOCALE_FUN(X, Y, Z) \
e5ee292000-09-24Martin Nilsson  (Locale.call(X, __LOCALEOBJECT->get(), Y, Z))
16188f2000-07-15Henrik Grubbström (Grubba) #endif /* !_LOCALE_FUN */ #endif /* !_ROXEN_H_ */