16188f2000-07-15Henrik Grubbström (Grubba) // $Id: roxen.h,v 1.15 2000/07/15 11:17:44 grubba Exp $ // -*- 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 __LOCALEMODULE #if constant(Locale.translate) #define __LOCALEMODULE Locale #else /* !constant(Locale.translate) */ #define __LOCALEMODULE RoxenLocale #endif /* constant(Locale.translate) */ #endif /* !__LOCALEMODULE */ #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
16188f2000-07-15Henrik Grubbström (Grubba) #define _STR_LOCALE(Z, X, Y) \ (__LOCALEMODULE.translate(X, __LOCALEOBJECT->get, X, Y)) #endif /* !_STR_LOCALE */
d05f9c2000-07-11Martin Nilsson 
b9a7022000-07-15Andreas Lange #ifndef _DEF_LOCALE
16188f2000-07-15Henrik Grubbström (Grubba) #define _DEF_LOCALE(Z, X, Y) \ ([string](mixed)__LOCALEMODULE.DeferredLocale(Z, GETLOCLANG, X, Y)) #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) \ (__LOCALEMODULE.call(X, __LOCALEOBJECT->get(), Y, Z)) #endif /* !_LOCALE_FUN */ #endif /* !_ROXEN_H_ */