home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / fd2inline-1.0-bin.lha / include / inline / locale.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-12  |  4.2 KB  |  114 lines

  1. #ifndef _INLINE_LOCALE_H
  2. #define _INLINE_LOCALE_H
  3.  
  4. #ifndef __INLINE_MACROS_H
  5. #include <inline/macros.h>
  6. #endif
  7.  
  8. #ifndef LOCALE_BASE_NAME
  9. #define LOCALE_BASE_NAME LocaleBase
  10. #endif
  11.  
  12. #define CloseCatalog(catalog) \
  13.     LP1NR(0x24, CloseCatalog, struct Catalog *, catalog, a0, \
  14.     , LOCALE_BASE_NAME)
  15.  
  16. #define CloseLocale(locale) \
  17.     LP1NR(0x2a, CloseLocale, struct Locale *, locale, a0, \
  18.     , LOCALE_BASE_NAME)
  19.  
  20. #define ConvToLower(locale, character) \
  21.     LP2(0x30, ULONG, ConvToLower, struct Locale *, locale, a0, unsigned long, character, d0, \
  22.     , LOCALE_BASE_NAME)
  23.  
  24. #define ConvToUpper(locale, character) \
  25.     LP2(0x36, ULONG, ConvToUpper, struct Locale *, locale, a0, unsigned long, character, d0, \
  26.     , LOCALE_BASE_NAME)
  27.  
  28. #define FormatDate(locale, fmtTemplate, date, putCharFunc) \
  29.     LP4NR(0x3c, FormatDate, struct Locale *, locale, a0, STRPTR, fmtTemplate, a1, struct DateStamp *, date, a2, struct Hook *, putCharFunc, a3, \
  30.     , LOCALE_BASE_NAME)
  31.  
  32. #define FormatString(locale, fmtTemplate, dataStream, putCharFunc) \
  33.     LP4(0x42, APTR, FormatString, struct Locale *, locale, a0, STRPTR, fmtTemplate, a1, APTR, dataStream, a2, struct Hook *, putCharFunc, a3, \
  34.     , LOCALE_BASE_NAME)
  35.  
  36. #define GetCatalogStr(catalog, stringNum, defaultString) \
  37.     LP3(0x48, STRPTR, GetCatalogStr, struct Catalog *, catalog, a0, long, stringNum, d0, STRPTR, defaultString, a1, \
  38.     , LOCALE_BASE_NAME)
  39.  
  40. #define GetLocaleStr(locale, stringNum) \
  41.     LP2(0x4e, STRPTR, GetLocaleStr, struct Locale *, locale, a0, unsigned long, stringNum, d0, \
  42.     , LOCALE_BASE_NAME)
  43.  
  44. #define IsAlNum(locale, character) \
  45.     LP2(0x54, BOOL, IsAlNum, struct Locale *, locale, a0, unsigned long, character, d0, \
  46.     , LOCALE_BASE_NAME)
  47.  
  48. #define IsAlpha(locale, character) \
  49.     LP2(0x5a, BOOL, IsAlpha, struct Locale *, locale, a0, unsigned long, character, d0, \
  50.     , LOCALE_BASE_NAME)
  51.  
  52. #define IsCntrl(locale, character) \
  53.     LP2(0x60, BOOL, IsCntrl, struct Locale *, locale, a0, unsigned long, character, d0, \
  54.     , LOCALE_BASE_NAME)
  55.  
  56. #define IsDigit(locale, character) \
  57.     LP2(0x66, BOOL, IsDigit, struct Locale *, locale, a0, unsigned long, character, d0, \
  58.     , LOCALE_BASE_NAME)
  59.  
  60. #define IsGraph(locale, character) \
  61.     LP2(0x6c, BOOL, IsGraph, struct Locale *, locale, a0, unsigned long, character, d0, \
  62.     , LOCALE_BASE_NAME)
  63.  
  64. #define IsLower(locale, character) \
  65.     LP2(0x72, BOOL, IsLower, struct Locale *, locale, a0, unsigned long, character, d0, \
  66.     , LOCALE_BASE_NAME)
  67.  
  68. #define IsPrint(locale, character) \
  69.     LP2(0x78, BOOL, IsPrint, struct Locale *, locale, a0, unsigned long, character, d0, \
  70.     , LOCALE_BASE_NAME)
  71.  
  72. #define IsPunct(locale, character) \
  73.     LP2(0x7e, BOOL, IsPunct, struct Locale *, locale, a0, unsigned long, character, d0, \
  74.     , LOCALE_BASE_NAME)
  75.  
  76. #define IsSpace(locale, character) \
  77.     LP2(0x84, BOOL, IsSpace, struct Locale *, locale, a0, unsigned long, character, d0, \
  78.     , LOCALE_BASE_NAME)
  79.  
  80. #define IsUpper(locale, character) \
  81.     LP2(0x8a, BOOL, IsUpper, struct Locale *, locale, a0, unsigned long, character, d0, \
  82.     , LOCALE_BASE_NAME)
  83.  
  84. #define IsXDigit(locale, character) \
  85.     LP2(0x90, BOOL, IsXDigit, struct Locale *, locale, a0, unsigned long, character, d0, \
  86.     , LOCALE_BASE_NAME)
  87.  
  88. #define OpenCatalogA(locale, name, tags) \
  89.     LP3(0x96, struct Catalog *, OpenCatalogA, struct Locale *, locale, a0, STRPTR, name, a1, struct TagItem *, tags, a2, \
  90.     , LOCALE_BASE_NAME)
  91.  
  92. #ifndef NO_INLINE_STDARG
  93. #define OpenCatalog(a0, a1, tags...) \
  94.     ({ULONG _tags[] = { tags }; OpenCatalogA((a0), (a1), (struct TagItem *)_tags);})
  95. #endif /* !NO_INLINE_STDARG */
  96.  
  97. #define OpenLocale(name) \
  98.     LP1(0x9c, struct Locale *, OpenLocale, STRPTR, name, a0, \
  99.     , LOCALE_BASE_NAME)
  100.  
  101. #define ParseDate(locale, date, fmtTemplate, getCharFunc) \
  102.     LP4(0xa2, BOOL, ParseDate, struct Locale *, locale, a0, struct DateStamp *, date, a1, STRPTR, fmtTemplate, a2, struct Hook *, getCharFunc, a3, \
  103.     , LOCALE_BASE_NAME)
  104.  
  105. #define StrConvert(locale, string, buffer, bufferSize, type) \
  106.     LP5(0xae, ULONG, StrConvert, struct Locale *, locale, a0, STRPTR, string, a1, APTR, buffer, a2, unsigned long, bufferSize, d0, unsigned long, type, d1, \
  107.     , LOCALE_BASE_NAME)
  108.  
  109. #define StrnCmp(locale, string1, string2, length, type) \
  110.     LP5(0xb4, LONG, StrnCmp, struct Locale *, locale, a0, STRPTR, string1, a1, STRPTR, string2, a2, long, length, d0, unsigned long, type, d1, \
  111.     , LOCALE_BASE_NAME)
  112.  
  113. #endif /* _INLINE_LOCALE_H */
  114.