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