setrunelocale.c (101566) | setrunelocale.c (104828) |
---|---|
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 --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#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 --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/lib/libc/locale/setrunelocale.c 101566 2002-08-09 08:22:29Z ache $"); | 38__FBSDID("$FreeBSD: head/lib/libc/locale/setrunelocale.c 104828 2002-10-10 22:56:18Z tjr $"); |
39 40#include <rune.h> 41#include <errno.h> 42#include <limits.h> 43#include <string.h> 44#include <stdio.h> 45#include <stdlib.h> 46#include <unistd.h> 47#include "setlocale.h" 48 49extern int _none_init(_RuneLocale *); 50extern int _UTF2_init(_RuneLocale *); | 39 40#include <rune.h> 41#include <errno.h> 42#include <limits.h> 43#include <string.h> 44#include <stdio.h> 45#include <stdlib.h> 46#include <unistd.h> 47#include "setlocale.h" 48 49extern int _none_init(_RuneLocale *); 50extern int _UTF2_init(_RuneLocale *); |
51extern int _UTF8_init(_RuneLocale *); |
|
51extern int _EUC_init(_RuneLocale *); 52extern int _BIG5_init(_RuneLocale *); 53extern int _MSKanji_init(_RuneLocale *); 54extern _RuneLocale *_Read_RuneMagi(FILE *); 55 56int 57setrunelocale(char *encoding) 58{ --- 66 unchanged lines hidden (view full) --- 125 return (saverr); 126 } 127 (void)fclose(fp); 128 129 if (strcmp(rl->encoding, "NONE") == 0) 130 ret = _none_init(rl); 131 else if (strcmp(rl->encoding, "UTF2") == 0) 132 ret = _UTF2_init(rl); | 52extern int _EUC_init(_RuneLocale *); 53extern int _BIG5_init(_RuneLocale *); 54extern int _MSKanji_init(_RuneLocale *); 55extern _RuneLocale *_Read_RuneMagi(FILE *); 56 57int 58setrunelocale(char *encoding) 59{ --- 66 unchanged lines hidden (view full) --- 126 return (saverr); 127 } 128 (void)fclose(fp); 129 130 if (strcmp(rl->encoding, "NONE") == 0) 131 ret = _none_init(rl); 132 else if (strcmp(rl->encoding, "UTF2") == 0) 133 ret = _UTF2_init(rl); |
134 else if (strcmp(rl->encoding, "UTF-8") == 0) 135 ret = _UTF8_init(rl); |
|
133 else if (strcmp(rl->encoding, "EUC") == 0) 134 ret = _EUC_init(rl); 135 else if (strcmp(rl->encoding, "BIG5") == 0) 136 ret = _BIG5_init(rl); 137 else if (strcmp(rl->encoding, "MSKanji") == 0) 138 ret = _MSKanji_init(rl); 139 else 140 ret = EFTYPE; --- 16 unchanged lines hidden --- | 136 else if (strcmp(rl->encoding, "EUC") == 0) 137 ret = _EUC_init(rl); 138 else if (strcmp(rl->encoding, "BIG5") == 0) 139 ret = _BIG5_init(rl); 140 else if (strcmp(rl->encoding, "MSKanji") == 0) 141 ret = _MSKanji_init(rl); 142 else 143 ret = EFTYPE; --- 16 unchanged lines hidden --- |