Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: fusl/src/internal/locale_impl.h

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #ifndef _LOCALE_IMPL_H 1 #ifndef _LOCALE_IMPL_H
2 #define _LOCALE_IMPL_H 2 #define _LOCALE_IMPL_H
3 3
4 #include <locale.h> 4 #include <locale.h>
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include "libc.h" 6 #include "libc.h"
7 #include "pthread_impl.h" 7 #include "pthread_impl.h"
8 8
9 #define LOCALE_NAME_MAX 15 9 #define LOCALE_NAME_MAX 15
10 10
11 struct __locale_map { 11 struct __locale_map {
12 » const void *map; 12 const void* map;
13 » size_t map_size; 13 size_t map_size;
14 » char name[LOCALE_NAME_MAX+1]; 14 char name[LOCALE_NAME_MAX + 1];
15 » const struct __locale_map *next; 15 const struct __locale_map* next;
16 }; 16 };
17 17
18 extern const struct __locale_map __c_dot_utf8; 18 extern const struct __locale_map __c_dot_utf8;
19 extern const struct __locale_struct __c_locale; 19 extern const struct __locale_struct __c_locale;
20 extern const struct __locale_struct __c_dot_utf8_locale; 20 extern const struct __locale_struct __c_dot_utf8_locale;
21 21
22 const struct __locale_map *__get_locale(int, const char *); 22 const struct __locale_map* __get_locale(int, const char*);
23 const char *__mo_lookup(const void *, size_t, const char *); 23 const char* __mo_lookup(const void*, size_t, const char*);
24 const char *__lctrans(const char *, const struct __locale_map *); 24 const char* __lctrans(const char*, const struct __locale_map*);
25 const char *__lctrans_cur(const char *); 25 const char* __lctrans_cur(const char*);
26 26
27 #define LCTRANS(msg, lc, loc) __lctrans(msg, (loc)->cat[(lc)]) 27 #define LCTRANS(msg, lc, loc) __lctrans(msg, (loc)->cat[(lc)])
28 #define LCTRANS_CUR(msg) __lctrans_cur(msg) 28 #define LCTRANS_CUR(msg) __lctrans_cur(msg)
29 29
30 #define C_LOCALE ((locale_t)&__c_locale) 30 #define C_LOCALE ((locale_t)&__c_locale)
31 #define UTF8_LOCALE ((locale_t)&__c_dot_utf8_locale) 31 #define UTF8_LOCALE ((locale_t)&__c_dot_utf8_locale)
32 32
33 #define CURRENT_LOCALE (__pthread_self()->locale) 33 #define CURRENT_LOCALE (__pthread_self()->locale)
34 34
35 #define CURRENT_UTF8 (!!__pthread_self()->locale->cat[LC_CTYPE]) 35 #define CURRENT_UTF8 (!!__pthread_self()->locale->cat[LC_CTYPE])
36 36
37 #undef MB_CUR_MAX 37 #undef MB_CUR_MAX
38 #define MB_CUR_MAX (CURRENT_UTF8 ? 4 : 1) 38 #define MB_CUR_MAX (CURRENT_UTF8 ? 4 : 1)
39 39
40 #endif 40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698