a316582000-07-19Andreas Lange // $Id: roxen.h,v 1.17 2000/07/19 20:11:32 lange 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 __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
a316582000-07-19Andreas Lange #define _STR_LOCALE(X, Y, Z) \ (__LOCALEMODULE.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) \ ([string](mixed)__LOCALEMODULE.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) \ (__LOCALEMODULE.call(X, __LOCALEOBJECT->get(), Y, Z)) #endif /* !_LOCALE_FUN */ #endif /* !_ROXEN_H_ */