b9a7022000-07-15Andreas Lange // $Id: roxen.h,v 1.13 2000/07/15 01:03:58 lange Exp $
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
d05f9c2000-07-11Martin Nilsson #ifndef _STR_LOCALE # if constant(Locale.translate) # ifdef IN_ROXEN
b9a7022000-07-15Andreas Lange # define _STR_LOCALE(Z,X,Y) (Locale.translate(Z, locale->get(), X, Y))
d05f9c2000-07-11Martin Nilsson # else
b9a7022000-07-15Andreas Lange # define _STR_LOCALE(Z,X,Y) (Locale.translate(Z, roxen.locale->get(), X,Y))
d05f9c2000-07-11Martin Nilsson # endif # else # ifdef IN_ROXEN
b9a7022000-07-15Andreas Lange # define _STR_LOCALE(Z,X,Y) (RoxenLocale.translate(Z, locale->get(), X, Y))
d05f9c2000-07-11Martin Nilsson # else
b9a7022000-07-15Andreas Lange # define _STR_LOCALE(Z,X,Y) (RoxenLocale.translate(Z, roxen.locale->get(), X, Y))
d05f9c2000-07-11Martin Nilsson # endif # endif #endif
b9a7022000-07-15Andreas Lange #ifndef _DEF_LOCALE # if constant(Locale.translate) # define _DEF_LOCALE(Z,X,Y) ([string](mixed)Locale.DeferredLocale(Z,GETLOCLANG,X,Y)) # else # define _DEF_LOCALE(Z,X,Y) ([string](mixed)RoxenLocale.DeferredLocale(Z,GETLOCLANG,X,Y)) # endif #endif #ifndef USE_DEFERRED_LOCALE
d846882000-07-10Martin Nilsson # ifdef IN_ROXEN
b9a7022000-07-15Andreas Lange # define USE_DEFERRED_LOCALE static inline string GETLOCLANG() {return locale->get();}
d846882000-07-10Martin Nilsson # else
b9a7022000-07-15Andreas Lange # define USE_DEFERRED_LOCALE static inline string GETLOCLANG() {return roxen.locale->get();}
d05f9c2000-07-11Martin Nilsson # endif #endif
0e78081998-10-13Henrik Grubbström (Grubba) 
b878961999-11-06Per Hedbor #endif /* _ROXEN_H_ */