setrunelocale.c (121845) | setrunelocale.c (122145) |
---|---|
1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Paul Borman at Krystal Technologies. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 24 unchanged lines hidden (view full) --- 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37/* setrunelocale() is obsolete in FreeBSD 6 -- use ANSI functions instead. */ 38#define OBSOLETE_IN_6 39 40#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Paul Borman at Krystal Technologies. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 24 unchanged lines hidden (view full) --- 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37/* setrunelocale() is obsolete in FreeBSD 6 -- use ANSI functions instead. */ 38#define OBSOLETE_IN_6 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/lib/libc/locale/setrunelocale.c 121845 2003-11-01 05:13:13Z tjr $"); | 41__FBSDID("$FreeBSD: head/lib/libc/locale/setrunelocale.c 122145 2003-11-05 22:52:51Z davidxu $"); |
42 43#include <rune.h> 44#include <errno.h> 45#include <limits.h> 46#include <string.h> 47#include <stdio.h> 48#include <stdlib.h> 49#include <unistd.h> 50#include <wchar.h> 51#include "ldpart.h" 52#include "setlocale.h" 53 54extern int _none_init(_RuneLocale *); 55extern int _UTF2_init(_RuneLocale *); 56extern int _UTF8_init(_RuneLocale *); 57extern int _EUC_init(_RuneLocale *); 58extern int _GB18030_init(_RuneLocale *); | 42 43#include <rune.h> 44#include <errno.h> 45#include <limits.h> 46#include <string.h> 47#include <stdio.h> 48#include <stdlib.h> 49#include <unistd.h> 50#include <wchar.h> 51#include "ldpart.h" 52#include "setlocale.h" 53 54extern int _none_init(_RuneLocale *); 55extern int _UTF2_init(_RuneLocale *); 56extern int _UTF8_init(_RuneLocale *); 57extern int _EUC_init(_RuneLocale *); 58extern int _GB18030_init(_RuneLocale *); |
59extern int _GB2312_init(_RuneLocale *); |
|
59extern int _GBK_init(_RuneLocale *); 60extern int _BIG5_init(_RuneLocale *); 61extern int _MSKanji_init(_RuneLocale *); 62extern _RuneLocale *_Read_RuneMagi(FILE *); 63 64extern size_t (*__mbrtowc)(wchar_t * __restrict, const char * __restrict, 65 size_t, mbstate_t * __restrict); 66extern size_t (*__wcrtomb)(char * __restrict, wchar_t, mbstate_t * __restrict); --- 85 unchanged lines hidden (view full) --- 152 else if (strcmp(rl->encoding, "UTF2") == 0) 153 ret = _UTF2_init(rl); 154 else if (strcmp(rl->encoding, "UTF-8") == 0) 155 ret = _UTF8_init(rl); 156 else if (strcmp(rl->encoding, "EUC") == 0) 157 ret = _EUC_init(rl); 158 else if (strcmp(rl->encoding, "GB18030") == 0) 159 ret = _GB18030_init(rl); | 60extern int _GBK_init(_RuneLocale *); 61extern int _BIG5_init(_RuneLocale *); 62extern int _MSKanji_init(_RuneLocale *); 63extern _RuneLocale *_Read_RuneMagi(FILE *); 64 65extern size_t (*__mbrtowc)(wchar_t * __restrict, const char * __restrict, 66 size_t, mbstate_t * __restrict); 67extern size_t (*__wcrtomb)(char * __restrict, wchar_t, mbstate_t * __restrict); --- 85 unchanged lines hidden (view full) --- 153 else if (strcmp(rl->encoding, "UTF2") == 0) 154 ret = _UTF2_init(rl); 155 else if (strcmp(rl->encoding, "UTF-8") == 0) 156 ret = _UTF8_init(rl); 157 else if (strcmp(rl->encoding, "EUC") == 0) 158 ret = _EUC_init(rl); 159 else if (strcmp(rl->encoding, "GB18030") == 0) 160 ret = _GB18030_init(rl); |
161 else if (strcmp(rl->encoding, "GB2312") == 0) 162 ret = _GB2312_init(rl); |
|
160 else if (strcmp(rl->encoding, "GBK") == 0) 161 ret = _GBK_init(rl); 162 else if (strcmp(rl->encoding, "BIG5") == 0) 163 ret = _BIG5_init(rl); 164 else if (strcmp(rl->encoding, "MSKanji") == 0) 165 ret = _MSKanji_init(rl); 166 else 167 ret = EFTYPE; --- 28 unchanged lines hidden --- | 163 else if (strcmp(rl->encoding, "GBK") == 0) 164 ret = _GBK_init(rl); 165 else if (strcmp(rl->encoding, "BIG5") == 0) 166 ret = _BIG5_init(rl); 167 else if (strcmp(rl->encoding, "MSKanji") == 0) 168 ret = _MSKanji_init(rl); 169 else 170 ret = EFTYPE; --- 28 unchanged lines hidden --- |