Mercurial > hg > index.fcgi > lj > lj046
annotate src/ljlocale.h @ 0:c84446dfb3f5
initial add
author | paulo@localhost |
---|---|
date | Fri, 13 Mar 2009 00:39:12 -0700 |
parents | |
children |
rev | line source |
---|---|
paulo@0 | 1 #ifndef LJLOCALE_H |
paulo@0 | 2 #define LJLOCALE_H |
paulo@0 | 3 #include <stdint.h> |
paulo@0 | 4 |
paulo@0 | 5 /* |
paulo@0 | 6 A FourCC, or four-character code, is a short string that fits in a |
paulo@0 | 7 32-bit word. |
paulo@0 | 8 */ |
paulo@0 | 9 typedef union FourCC { |
paulo@0 | 10 char c[4]; |
paulo@0 | 11 uint32_t i; |
paulo@0 | 12 } FourCC; |
paulo@0 | 13 |
paulo@0 | 14 /* When abusing union, test that the types that the compiler uses are |
paulo@0 | 15 the same types the developer's compiler uses. */ |
paulo@0 | 16 extern char sizeof_uint32_t_equals_4[(sizeof(uint32_t) == 4) ? 1 : -1]; |
paulo@0 | 17 |
paulo@0 | 18 typedef struct FourCCLocaleEntry { |
paulo@0 | 19 FourCC code; |
paulo@0 | 20 const char *name; |
paulo@0 | 21 const char *desc; |
paulo@0 | 22 } FourCCLocaleEntry; |
paulo@0 | 23 |
paulo@0 | 24 void ljSetLocale(const FourCCLocaleEntry *locale); |
paulo@0 | 25 |
paulo@0 | 26 #define _4CC(i) (ljGetFourCCName((FourCC){i})) |
paulo@0 | 27 const char *ljGetFourCCName(FourCC i); |
paulo@0 | 28 |
paulo@0 | 29 #define _4CCDESC(i) (ljGetFourCCDesc((FourCC){i})) |
paulo@0 | 30 const char *ljGetFourCCDesc(FourCC i); |
paulo@0 | 31 |
paulo@0 | 32 extern const FourCCLocaleEntry englishLocale[]; |
paulo@0 | 33 #endif |