Deleted Added
full compact
charset.c (259555) charset.c (260310)
1/* CPP Library - charsets
2 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
3 Free Software Foundation, Inc.
4
5 Broken out of c-lex.c Apr 2003, adding valid C99 UCN ranges.
6
7This program is free software; you can redistribute it and/or modify it
8under the terms of the GNU General Public License as published by the

--- 1583 unchanged lines hidden (view full) ---

1592 uchar *input, size_t size, size_t len, off_t *st_size)
1593{
1594 struct cset_converter input_cset;
1595 struct _cpp_strbuf to;
1596
1597 input_cset = init_iconv_desc (pfile, SOURCE_CHARSET, input_charset);
1598 if (input_cset.func == convert_no_conversion)
1599 {
1/* CPP Library - charsets
2 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
3 Free Software Foundation, Inc.
4
5 Broken out of c-lex.c Apr 2003, adding valid C99 UCN ranges.
6
7This program is free software; you can redistribute it and/or modify it
8under the terms of the GNU General Public License as published by the

--- 1583 unchanged lines hidden (view full) ---

1592 uchar *input, size_t size, size_t len, off_t *st_size)
1593{
1594 struct cset_converter input_cset;
1595 struct _cpp_strbuf to;
1596
1597 input_cset = init_iconv_desc (pfile, SOURCE_CHARSET, input_charset);
1598 if (input_cset.func == convert_no_conversion)
1599 {
1600 /* APPLE LOCAL begin UTF-8 BOM 5774975 */
1601 /* Eat the UTF-8 BOM. */
1602 if (len >= 3
1603 && input[0] == 0xef
1604 && input[1] == 0xbb
1605 && input[2] == 0xbf)
1606 {
1607 memmove (&input[0], &input[3], size-3);
1608 len -= 3;
1609 }
1610 /* APPLE LOCAL end UTF-8 BOM 5774975 */
1600 to.text = input;
1601 to.asize = size;
1602 to.len = len;
1603 }
1604 else
1605 {
1606 to.asize = MAX (65536, len);
1607 to.text = XNEWVEC (uchar, to.asize);

--- 66 unchanged lines hidden ---
1611 to.text = input;
1612 to.asize = size;
1613 to.len = len;
1614 }
1615 else
1616 {
1617 to.asize = MAX (65536, len);
1618 to.text = XNEWVEC (uchar, to.asize);

--- 66 unchanged lines hidden ---