charset.c (258712) | charset.c (259555) |
---|---|
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 --- 1614 unchanged lines hidden (view full) --- 1623 haven't enough space for the \n-terminator. */ 1624 if (to.len + 4096 < to.asize || to.len >= to.asize) 1625 to.text = XRESIZEVEC (uchar, to.text, to.len + 1); 1626 1627 /* If the file is using old-school Mac line endings (\r only), 1628 terminate with another \r, not an \n, so that we do not mistake 1629 the \r\n sequence for a single DOS line ending and erroneously 1630 issue the "No newline at end of file" diagnostic. */ | 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 --- 1614 unchanged lines hidden (view full) --- 1623 haven't enough space for the \n-terminator. */ 1624 if (to.len + 4096 < to.asize || to.len >= to.asize) 1625 to.text = XRESIZEVEC (uchar, to.text, to.len + 1); 1626 1627 /* If the file is using old-school Mac line endings (\r only), 1628 terminate with another \r, not an \n, so that we do not mistake 1629 the \r\n sequence for a single DOS line ending and erroneously 1630 issue the "No newline at end of file" diagnostic. */ |
1631 /* APPLE LOCAL don't access to.text[-1] radar 6121572 */ |
|
1631 if (to.len > 0 && to.text[to.len - 1] == '\r') 1632 to.text[to.len] = '\r'; 1633 else 1634 to.text[to.len] = '\n'; 1635 1636 *st_size = to.len; 1637 return to.text; 1638} --- 34 unchanged lines hidden --- | 1632 if (to.len > 0 && to.text[to.len - 1] == '\r') 1633 to.text[to.len] = '\r'; 1634 else 1635 to.text[to.len] = '\n'; 1636 1637 *st_size = to.len; 1638 return to.text; 1639} --- 34 unchanged lines hidden --- |