aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog.apple-ppc71
-rw-r--r--libcpp/charset.c272
-rw-r--r--libcpp/directives.c83
-rw-r--r--libcpp/errors.c27
-rw-r--r--libcpp/files.c210
-rw-r--r--libcpp/include/cpplib.h162
-rw-r--r--libcpp/init.c29
-rw-r--r--libcpp/internal.h47
-rw-r--r--libcpp/lex.c384
-rw-r--r--libcpp/macro.c104
-rw-r--r--libcpp/makedepend.c7
-rw-r--r--libcpp/makeucnid.c344
-rw-r--r--libcpp/pch.c32
-rw-r--r--libcpp/ucnid.h1121
-rw-r--r--libcpp/ucnid.pl132
-rw-r--r--libcpp/ucnid.tab75
16 files changed, 2457 insertions, 643 deletions
diff --git a/libcpp/ChangeLog.apple-ppc b/libcpp/ChangeLog.apple-ppc
new file mode 100644
index 00000000000..216a6998a68
--- /dev/null
+++ b/libcpp/ChangeLog.apple-ppc
@@ -0,0 +1,71 @@
+2005-03-11 Devang Patel <dpatel@apple.com.
+
+ * diretives.c: Fix white space.
+
+2005-03-06 Devang Patel <dpatel@apple.com>
+
+ * init.c (cpp_read_main_file): Remove Symbol Separation support.
+ * internal.h (cpp_cinfo_state): Remove.
+ (struct cpp_reader): Remove Symbol Separation support.
+ (find_include_cinfo): Remove.
+ * pch.c (count_defs): Remove Symbol Separation support.
+ (write_defs): Same.
+ (cpp_valid_state): Remove warn_invalid_sr use.
+ * directives.c (find_include_cinfo, cpp_symbol_separation_init,
+ cpp_write_symbol_deps, cpp_get_stabs_checksum): Remove.
+
+2005-02-27 Devang Patel <dpatel@apple.com>
+
+ Radar 3982899
+ * directives.c (do_line): Save sysp early before line table is realloc'ed.
+
+2005-02-21 Devang Patel <dpatel@apple.com>
+
+ Radar 4007432
+ * charset.c (_cpp_convert_input): Check '\r' before inserting
+ '\n' at the end.
+
+2005-02-17 Devang Patel <dpatel@apple.com>
+
+ Radar 3958387
+ * libcpp/lex.c (_cpp_get_fresh_line): Check warn_newline_at_eof.
+
+2005-01-04 Anders Bertelrud <anders@apple.com>
+
+ Radar 3871393
+ * include/cpplib.h (struct cpp_dir): Added 'header_map' field.
+
+2005-01-06 Mike Stump <mrs@apple.com>
+
+ Radar 3929334
+ * files.c (pch_open_file): Add indirection for pch files for distcc.
+ (read_from_parent): Add.
+ (write_to_parent): Add.
+ (init_indirect_pipes): Add.
+ (indirect_file): Add.
+
+2004-12-10 Devang Patel <dpatel@apple.com>
+
+ Undo Radar 3909961
+ * libcpp/directivec.c (do_elif): Do not check EOL when -Wextra-tokens is used.
+
+2004-12-10 Devang Patel <dpatel@apple.com>
+
+ Radar 3909961
+ * libcpp/directivec.c (do_elif): Check EOL when -Wextra-tokens is used.
+
+2004-08-03 Stan Shebs <shebs@apple.com>
+
+ Radar 3368707
+ Support for CodeWarrior-style assembly language blocks and
+ functions.
+ * include/cpplib.h (CPP_BOL, CPP_EOL): Define.
+ * internal.h (struct cpp_context): New field bol_p.
+ * lex.c (lex_identifier): Handle special chars in opcodes.
+ (cw_asm_label_follows): New global.
+ (_cpp_lex_direct): Special handling for @-labels,
+ flag end of operands when ';' seen.
+ * macro.c (enter_macro_context): Add bol_p argument and use.
+ (push_ptoken_context): Seed bol_p field.
+ (push_token_context): Ditto.
+ (cpp_get_token): Detect tokens at beginning of line and record.
diff --git a/libcpp/charset.c b/libcpp/charset.c
index 7a88a708e6c..aa5f6479c88 100644
--- a/libcpp/charset.c
+++ b/libcpp/charset.c
@@ -22,7 +22,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "system.h"
#include "cpplib.h"
#include "internal.h"
-#include "ucnid.h"
+/* APPLE LOCAL mainline UCNs 2005-04-17 3892809 */
+/* Remove include of ucnid.h */
/* Character set handling for C-family languages.
@@ -729,45 +730,132 @@ width_to_mask (size_t width)
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+/* A large table of unicode character information. */
+enum {
+ /* Valid in a C99 identifier? */
+ C99 = 1,
+ /* Valid in a C99 identifier, but not as the first character? */
+ DIG = 2,
+ /* Valid in a C++ identifier? */
+ CXX = 4,
+ /* NFC representation is not valid in an identifier? */
+ CID = 8,
+ /* Might be valid NFC form? */
+ NFC = 16,
+ /* Might be valid NFKC form? */
+ NKC = 32,
+ /* Certain preceding characters might make it not valid NFC/NKFC form? */
+ CTX = 64
+};
+
+static const struct {
+ /* Bitmap of flags above. */
+ unsigned char flags;
+ /* Combining class of the character. */
+ unsigned char combine;
+ /* Last character in the range described by this entry. */
+ unsigned short end;
+} ucnranges[] = {
+#include "ucnid.h"
+};
+
/* Returns 1 if C is valid in an identifier, 2 if C is valid except at
the start of an identifier, and 0 if C is not valid in an
identifier. We assume C has already gone through the checks of
- _cpp_valid_ucn. The algorithm is a simple binary search on the
- table defined in cppucnid.h. */
+ _cpp_valid_ucn. Also update NST for C if returning nonzero. The
+ algorithm is a simple binary search on the table defined in
+ ucnid.h. */
static int
-ucn_valid_in_identifier (cpp_reader *pfile, cppchar_t c)
+ucn_valid_in_identifier (cpp_reader *pfile, cppchar_t c,
+ struct normalize_state *nst)
{
int mn, mx, md;
- mn = -1;
- mx = ARRAY_SIZE (ucnranges);
- while (mx - mn > 1)
+ if (c > 0xFFFF)
+ return 0;
+
+ mn = 0;
+ mx = ARRAY_SIZE (ucnranges) - 1;
+ while (mx != mn)
{
md = (mn + mx) / 2;
- if (c < ucnranges[md].lo)
+ if (c <= ucnranges[md].end)
mx = md;
- else if (c > ucnranges[md].hi)
- mn = md;
else
- goto found;
+ mn = md + 1;
}
- return 0;
- found:
/* When -pedantic, we require the character to have been listed by
the standard for the current language. Otherwise, we accept the
union of the acceptable sets for C++98 and C99. */
+ if (! (ucnranges[mn].flags & (C99 | CXX)))
+ return 0;
+
if (CPP_PEDANTIC (pfile)
- && ((CPP_OPTION (pfile, c99) && !(ucnranges[md].flags & C99))
+ && ((CPP_OPTION (pfile, c99) && !(ucnranges[mn].flags & C99))
|| (CPP_OPTION (pfile, cplusplus)
- && !(ucnranges[md].flags & CXX))))
+ && !(ucnranges[mn].flags & CXX))))
return 0;
+ /* Update NST. */
+ if (ucnranges[mn].combine != 0 && ucnranges[mn].combine < nst->prev_class)
+ nst->level = normalized_none;
+ else if (ucnranges[mn].flags & CTX)
+ {
+ bool safe;
+ cppchar_t p = nst->previous;
+
+ /* Easy cases from Bengali, Oriya, Tamil, Jannada, and Malayalam. */
+ if (c == 0x09BE)
+ safe = p != 0x09C7; /* Use 09CB instead of 09C7 09BE. */
+ else if (c == 0x0B3E)
+ safe = p != 0x0B47; /* Use 0B4B instead of 0B47 0B3E. */
+ else if (c == 0x0BBE)
+ safe = p != 0x0BC6 && p != 0x0BC7; /* Use 0BCA/0BCB instead. */
+ else if (c == 0x0CC2)
+ safe = p != 0x0CC6; /* Use 0CCA instead of 0CC6 0CC2. */
+ else if (c == 0x0D3E)
+ safe = p != 0x0D46 && p != 0x0D47; /* Use 0D4A/0D4B instead. */
+ /* For Hangul, characters in the range AC00-D7A3 are NFC/NFKC,
+ and are combined algorithmically from a sequence of the form
+ 1100-1112 1161-1175 11A8-11C2
+ (if the third is not present, it is treated as 11A7, which is not
+ really a valid character).
+ Unfortunately, C99 allows (only) the NFC form, but C++ allows
+ only the combining characters. */
+ else if (c >= 0x1161 && c <= 0x1175)
+ safe = p < 0x1100 || p > 0x1112;
+ else if (c >= 0x11A8 && c <= 0x11C2)
+ safe = (p < 0xAC00 || p > 0xD7A3 || (p - 0xAC00) % 28 != 0);
+ else
+ {
+ /* Uh-oh, someone updated ucnid.h without updating this code. */
+ cpp_error (pfile, CPP_DL_ICE, "Character %x might not be NFKC", c);
+ safe = true;
+ }
+ if (!safe && c < 0x1161)
+ nst->level = normalized_none;
+ else if (!safe)
+ nst->level = MAX (nst->level, normalized_identifier_C);
+ }
+ else if (ucnranges[mn].flags & NKC)
+ ;
+ else if (ucnranges[mn].flags & NFC)
+ nst->level = MAX (nst->level, normalized_C);
+ else if (ucnranges[mn].flags & CID)
+ nst->level = MAX (nst->level, normalized_identifier_C);
+ else
+ nst->level = normalized_none;
+ nst->previous = c;
+ nst->prev_class = ucnranges[mn].combine;
+
/* In C99, UCN digits may not begin identifiers. */
- if (CPP_OPTION (pfile, c99) && (ucnranges[md].flags & DIG))
+ if (CPP_OPTION (pfile, c99) && (ucnranges[mn].flags & DIG))
return 2;
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
return 1;
}
@@ -781,10 +869,11 @@ ucn_valid_in_identifier (cpp_reader *pfile, cppchar_t c)
designates a character in the basic source character set, then the
program is ill-formed.
+ APPLE LOCAL begin mainline UCNs 2005-04-17 3892809
*PSTR must be preceded by "\u" or "\U"; it is assumed that the
- buffer end is delimited by a non-hex digit. Returns zero if UCNs
- are not part of the relevant standard, or if the string beginning
- at *PSTR doesn't syntactically match the form 'NNNN' or 'NNNNNNNN'.
+ buffer end is delimited by a non-hex digit. Returns zero if the
+ UCN has not been consumed.
+ APPLE LOCAL end mainline UCNs 2005-04-17 3892809
Otherwise the nonzero value of the UCN, whether valid or invalid,
is returned. Diagnostics are emitted for invalid values. PSTR
@@ -796,7 +885,10 @@ ucn_valid_in_identifier (cpp_reader *pfile, cppchar_t c)
cppchar_t
_cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr,
- const uchar *limit, int identifier_pos)
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ const uchar *limit, int identifier_pos,
+ struct normalize_state *nst)
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
{
cppchar_t result, c;
unsigned int length;
@@ -816,8 +908,13 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr,
else if (str[-1] == 'U')
length = 8;
else
- abort();
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ {
+ cpp_error (pfile, CPP_DL_ICE, "In _cpp_valid_ucn but not a UCN");
+ length = 4;
+ }
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
result = 0;
do
{
@@ -829,10 +926,16 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr,
}
while (--length && str < limit);
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ /* Partial UCNs are not valid in strings, but decompose into
+ multiple tokens in identifiers, so we can't give a helpful
+ error message in that case. */
+ if (length && identifier_pos)
+ return 0;
+
*pstr = str;
if (length)
{
- /* We'll error when we try it out as the start of an identifier. */
cpp_error (pfile, CPP_DL_ERROR,
"incomplete universal character name %.*s",
(int) (str - base), base);
@@ -850,9 +953,19 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr,
(int) (str - base), base);
result = 1;
}
+ else if (identifier_pos && result == 0x24
+ && CPP_OPTION (pfile, dollars_in_ident))
+ {
+ if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping)
+ {
+ CPP_OPTION (pfile, warn_dollars) = 0;
+ cpp_error (pfile, CPP_DL_PEDWARN, "'$' in identifier or number");
+ }
+ NORMALIZE_STATE_UPDATE_IDNUM (nst);
+ }
else if (identifier_pos)
{
- int validity = ucn_valid_in_identifier (pfile, result);
+ int validity = ucn_valid_in_identifier (pfile, result, nst);
if (validity == 0)
cpp_error (pfile, CPP_DL_ERROR,
@@ -863,6 +976,7 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr,
"universal character %.*s is not valid at the start of an identifier",
(int) (str - base), base);
}
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
if (result == 0)
result = 1;
@@ -884,10 +998,13 @@ convert_ucn (cpp_reader *pfile, const uchar *from, const uchar *limit,
int rval;
struct cset_converter cvt
= wide ? pfile->wide_cset_desc : pfile->narrow_cset_desc;
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ struct normalize_state nst = INITIAL_NORMALIZE_STATE;
from++; /* Skip u/U. */
- ucn = _cpp_valid_ucn (pfile, &from, limit, 0);
+ ucn = _cpp_valid_ucn (pfile, &from, limit, 0, &nst);
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
rval = one_cppchar_to_utf8 (ucn, &bufp, &bytesleft);
if (rval)
{
@@ -1137,7 +1254,8 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit,
false for failure. */
bool
cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count,
- cpp_string *to, bool wide)
+ /* APPLE LOCAL pascal strings */
+ cpp_string *to, bool wide, bool pascal_p)
{
struct _cpp_strbuf tbuf;
const uchar *p, *base, *limit;
@@ -1147,7 +1265,8 @@ cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count,
tbuf.asize = MAX (OUTBUF_BLOCK_SIZE, from->len);
tbuf.text = xmalloc (tbuf.asize);
- tbuf.len = 0;
+ /* APPLE LOCAL pascal strings */
+ tbuf.len = (pascal_p ? 1 : 0); /* Reserve space for Pascal length byte. */
for (i = 0; i < count; i++)
{
@@ -1155,6 +1274,13 @@ cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count,
if (*p == 'L') p++;
p++; /* Skip leading quote. */
limit = from[i].text + from[i].len - 1; /* Skip trailing quote. */
+ /* APPLE LOCAL begin pascal strings */
+ /* Handle narrow literals beginning with "\p..." specially, but only
+ if '-fpascal-strings' has been specified. */
+ if (pascal_p && p[0] == '\\' && p[1] == 'p')
+ p += 2;
+ /* APPLE LOCAL end pascal strings */
+
for (;;)
{
@@ -1174,6 +1300,17 @@ cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count,
p = convert_escape (pfile, p + 1, limit, &tbuf, wide);
}
}
+
+ /* APPLE LOCAL begin pascal strings */
+ /* For Pascal strings, compute the length byte. */
+ if (pascal_p)
+ {
+ *tbuf.text = (unsigned char) (tbuf.len - 1);
+ if (tbuf.len > 256)
+ cpp_error (pfile, CPP_DL_ERROR, "Pascal string is too long");
+ }
+ /* APPLE LOCAL end pascal strings */
+
/* NUL-terminate the 'to' buffer and translate it to a cpp_string
structure. */
emit_numeric_escape (pfile, 0, &tbuf, wide);
@@ -1192,7 +1329,10 @@ cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count,
in a string, but do not perform character set conversion. */
bool
cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *from,
- size_t count, cpp_string *to, bool wide)
+ /* APPLE LOCAL begin pascal strings */
+ size_t count, cpp_string *to, bool wide,
+ bool pascal_p)
+ /* APPLE LOCAL end pascal strings */
{
struct cset_converter save_narrow_cset_desc = pfile->narrow_cset_desc;
bool retval;
@@ -1200,7 +1340,8 @@ cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *from,
pfile->narrow_cset_desc.func = convert_no_conversion;
pfile->narrow_cset_desc.cd = (iconv_t) -1;
- retval = cpp_interpret_string (pfile, from, count, to, wide);
+ /* APPLE LOCAL pascal strings */
+ retval = cpp_interpret_string (pfile, from, count, to, wide, pascal_p);
pfile->narrow_cset_desc = save_narrow_cset_desc;
return retval;
@@ -1248,7 +1389,10 @@ narrow_str_to_charconst (cpp_reader *pfile, cpp_string str,
cpp_error (pfile, CPP_DL_WARNING,
"character constant too long for its type");
}
- else if (i > 1 && CPP_OPTION (pfile, warn_multichar))
+ /* APPLE LOCAL begin -Wfour-char-constants */
+ else if ((i == 4 && CPP_OPTION (pfile, warn_four_char_constants))
+ || (i > 1 && i != 4 && CPP_OPTION (pfile, warn_multichar)))
+ /* APPLE LOCAL end -Wfour-char-constants */
cpp_error (pfile, CPP_DL_WARNING, "multi-character character constant");
/* Multichar constants are of type int and therefore signed. */
@@ -1344,7 +1488,8 @@ cpp_interpret_charconst (cpp_reader *pfile, const cpp_token *token,
cpp_error (pfile, CPP_DL_ERROR, "empty character constant");
return 0;
}
- else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str, wide))
+ /* APPLE LOCAL pascal strings */
+ else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str, wide, false))
return 0;
if (wide)
@@ -1357,7 +1502,62 @@ cpp_interpret_charconst (cpp_reader *pfile, const cpp_token *token,
return result;
}
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+
+/* Convert an identifier denoted by ID and LEN, which might contain
+ UCN escapes, to the source character set, either UTF-8 or
+ UTF-EBCDIC. Assumes that the identifier is actually a valid identifier. */
+cpp_hashnode *
+_cpp_interpret_identifier (cpp_reader *pfile, const uchar *id, size_t len)
+{
+ /* It turns out that a UCN escape always turns into fewer characters
+ than the escape itself, so we can allocate a temporary in advance. */
+ uchar * buf = alloca (len + 1);
+ uchar * bufp = buf;
+ size_t idp;
+
+ for (idp = 0; idp < len; idp++)
+ if (id[idp] != '\\')
+ *bufp++ = id[idp];
+ else
+ {
+ unsigned length = id[idp+1] == 'u' ? 4 : 8;
+ cppchar_t value = 0;
+ size_t bufleft = len - (bufp - buf);
+ int rval;
+
+ idp += 2;
+ while (length && idp < len && ISXDIGIT (id[idp]))
+ {
+ value = (value << 4) + hex_value (id[idp]);
+ idp++;
+ length--;
+ }
+ idp--;
+
+ /* Special case for EBCDIC: if the identifier contains
+ a '$' specified using a UCN, translate it to EBCDIC. */
+ if (value == 0x24)
+ {
+ *bufp++ = '$';
+ continue;
+ }
+
+ rval = one_cppchar_to_utf8 (value, &bufp, &bufleft);
+ if (rval)
+ {
+ errno = rval;
+ cpp_errno (pfile, CPP_DL_ERROR,
+ "converting UCN to source character set");
+ break;
+ }
+ }
+ return CPP_HASHNODE (ht_lookup (pfile->hash_table,
+ buf, bufp - buf, HT_ALLOC));
+}
+
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
/* Convert an input buffer (containing the complete contents of one
source file) from INPUT_CHARSET to the source character set. INPUT
points to the input buffer, SIZE is its allocated size, and LEN is
@@ -1405,7 +1605,17 @@ _cpp_convert_input (cpp_reader *pfile, const char *input_charset,
if (to.len + 4096 < to.asize || to.len >= to.asize)
to.text = xrealloc (to.text, to.len + 1);
- to.text[to.len] = '\n';
+ /* APPLE LOCAL begin mainline 2005-03-04 */
+ /* If the file is using old-school Mac line endings (\r only),
+ terminate with another \r, not an \n, so that we do not mistake
+ the \r\n sequence for a single DOS line ending and erroneously
+ issue the "No newline at end of file" diagnostic. */
+ if (to.text[to.len - 1] == '\r')
+ to.text[to.len] = '\r';
+ else
+ to.text[to.len] = '\n';
+ /* APPLE LOCAL end mainline 2005-03-04 */
+
*st_size = to.len;
return to.text;
}
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 8a6d45ac191..116707b8761 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -66,12 +66,20 @@ struct pragma_entry
means this directive should be handled even if -fpreprocessed is in
effect (these are the directives with callback hooks).
+ APPLE LOCAL begin pch distcc --mrs
+ IN_I_PCH means that this directive should be handled even if
+ -fpreprocessed is in effect as long as pch_preprocess is also in
+ effect.
+ APPLE LOCAL end pch distcc --mrs
+
EXPAND is set on directives that are always macro-expanded. */
#define COND (1 << 0)
#define IF_COND (1 << 1)
#define INCL (1 << 2)
#define IN_I (1 << 3)
#define EXPAND (1 << 4)
+/* APPLE LOCAL pch distcc --mrs */
+#define IN_I_PCH (1 << 5)
/* Defines one #-directive, including how to handle it. */
typedef void (*directive_handler) (cpp_reader *);
@@ -141,6 +149,8 @@ static void handle_assertion (cpp_reader *, const char *, int);
#define DIRECTIVE_TABLE \
D(define, T_DEFINE = 0, KANDR, IN_I) /* 270554 */ \
D(include, T_INCLUDE, KANDR, INCL | EXPAND) /* 52262 */ \
+/* APPLE LOCAL pch distcc --mrs */ \
+D(include_pch, T_INCLUDE_PCH, KANDR, INCL | IN_I_PCH) \
D(endif, T_ENDIF, KANDR, COND) /* 45855 */ \
D(ifdef, T_IFDEF, KANDR, COND | IF_COND) /* 22000 */ \
D(if, T_IF, KANDR, COND | IF_COND | EXPAND) /* 18162 */ \
@@ -212,7 +222,10 @@ skip_rest_of_line (cpp_reader *pfile)
static void
check_eol (cpp_reader *pfile)
{
- if (! SEEN_EOL () && _cpp_lex_token (pfile)->type != CPP_EOF)
+ /* APPLE LOCAL begin -Wextra-tokens 2001-08-02 --sts */
+ if (! SEEN_EOL () && _cpp_lex_token (pfile)->type != CPP_EOF
+ && CPP_OPTION (pfile, warn_extra_tokens))
+ /* APPLE LOCAL end -Wextra-tokens 2001-08-02 --sts */
cpp_error (pfile, CPP_DL_PEDWARN, "extra tokens at end of #%s directive",
pfile->directive->name);
}
@@ -385,7 +398,11 @@ _cpp_handle_directive (cpp_reader *pfile, int indented)
-fpreprocessed mode only if the # is in column 1. macro.c
puts a space in front of any '#' at the start of a macro. */
if (CPP_OPTION (pfile, preprocessed)
- && (indented || !(dir->flags & IN_I)))
+ /* APPLE LOCAL begin pch distcc --mrs */
+ && (indented || !(dir->flags & IN_I))
+ && ! (CPP_OPTION (pfile, pch_preprocess)
+ && (dir->flags & IN_I_PCH)))
+ /* APPLE LOCAL end pch distcc --mrs */
{
skip = 0;
dir = 0;
@@ -608,7 +625,10 @@ glue_header_name (cpp_reader *pfile)
if (token->flags & PREV_WHITE)
buffer[total_len++] = ' ';
- total_len = (cpp_spell_token (pfile, token, (uchar *) &buffer[total_len])
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ total_len = (cpp_spell_token (pfile, token, (uchar *) &buffer[total_len],
+ true)
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
- (uchar *) buffer);
}
@@ -700,6 +720,14 @@ do_include (cpp_reader *pfile)
do_include_common (pfile, IT_INCLUDE);
}
+/* APPLE LOCAL begin pch distcc --mrs */
+static void
+do_include_pch (cpp_reader *pfile)
+{
+ do_include_common (pfile, IT_INCLUDE_PCH);
+}
+/* APPLE LOCAL end pch distcc --mrs */
+
static void
do_import (cpp_reader *pfile)
{
@@ -775,6 +803,13 @@ do_line (cpp_reader *pfile)
{
const struct line_maps *line_table = pfile->line_table;
const struct line_map *map = &line_table->maps[line_table->used - 1];
+
+ /* APPLE LOCAL begin mainline 2005-03-04 */
+ /* skip_rest_of_line() may cause line table to be realloc()ed so note down
+ sysp right now. */
+
+ unsigned char map_sysp = map->sysp;
+ /* APPLE LOCAL end mainline 2005-03-04 */
const cpp_token *token;
const char *new_file = map->to_file;
unsigned long new_lineno;
@@ -802,7 +837,8 @@ do_line (cpp_reader *pfile)
{
cpp_string s = { 0, 0 };
if (cpp_interpret_string_notranslate (pfile, &token->val.str, 1,
- &s, false))
+ /* APPLE LOCAL pascal strings */
+ &s, false, false))
new_file = (const char *)s.text;
check_eol (pfile);
}
@@ -815,7 +851,8 @@ do_line (cpp_reader *pfile)
skip_rest_of_line (pfile);
_cpp_do_file_change (pfile, LC_RENAME, new_file, new_lineno,
- map->sysp);
+ /* APPLE LOCAL mainline 2005-03-04 */
+ map_sysp);
}
/* Interpret the # 44 "file" [flags] notation, which has slightly
@@ -855,7 +892,8 @@ do_linemarker (cpp_reader *pfile)
{
cpp_string s = { 0, 0 };
if (cpp_interpret_string_notranslate (pfile, &token->val.str,
- 1, &s, false))
+ /* APPLE LOCAL pascal strings */
+ 1, &s, false, false))
new_file = (const char *)s.text;
new_sysp = 0;
@@ -937,7 +975,14 @@ static void
do_warning (cpp_reader *pfile)
{
/* We want #warning diagnostics to be emitted in system headers too. */
- do_diagnostic (pfile, CPP_DL_WARNING_SYSHDR, 1);
+ /* APPLE LOCAL begin handle -Wno-system-headers (2910306) --ilr */
+ /* Unless explicitly suppressed with -Wno-system-headers or
+ -Wno-#warning. */
+ if (!CPP_OPTION (pfile, no_pound_warnings)
+ && (!CPP_IN_SYSTEM_HEADER (pfile)
+ || CPP_OPTION (pfile, warn_system_headers)))
+ do_diagnostic (pfile, CPP_DL_WARNING_SYSHDR, 1);
+ /* APPLE LOCAL end handle -Wno-system-headers (2910306) --ilr */
}
/* Report program identification. */
@@ -1562,7 +1607,10 @@ do_else (cpp_reader *pfile)
ifs->mi_cmacro = 0;
/* Only check EOL if was not originally skipping. */
- if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels))
+ /* APPLE LOCAL begin -Wextra-tokens */
+ if (!ifs->was_skipping
+ && (CPP_OPTION (pfile, warn_endif_labels) || CPP_OPTION (pfile, warn_extra_tokens)))
+ /* APPLE LOCAL end -Wextra-tokens */
check_eol (pfile);
}
}
@@ -1615,7 +1663,10 @@ do_endif (cpp_reader *pfile)
else
{
/* Only check EOL if was not originally skipping. */
- if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels))
+ /* APPLE LOCAL begin -Wextra-tokens */
+ if (!ifs->was_skipping
+ && (CPP_OPTION (pfile, warn_endif_labels) || CPP_OPTION (pfile, warn_extra_tokens)))
+ /* APPLE LOCAL end -Wextra-tokens */
check_eol (pfile);
/* If potential control macro, we go back outside again. */
@@ -2002,6 +2053,20 @@ cpp_get_options (cpp_reader *pfile)
return &pfile->opts;
}
+/* APPLE LOCAL begin predictive compilation */
+void
+set_stdin_option (cpp_reader *pfile, int predict_comp_size)
+{
+ if (! CPP_OPTION (pfile, preprocessed))
+ {
+ /* -fpreprocessed -fpredictive-compilation=n: compiler is reading from
+ the processed file in this case. */
+ CPP_OPTION (pfile, predictive_compilation) = true;
+ CPP_OPTION (pfile, predictive_compilation_size) = predict_comp_size;
+ }
+}
+/* APPLE LOCAL end predictive compilation */
+
/* The callbacks structure. */
cpp_callbacks *
cpp_get_callbacks (cpp_reader *pfile)
diff --git a/libcpp/errors.c b/libcpp/errors.c
index 2aa814016a1..98d309a0e6a 100644
--- a/libcpp/errors.c
+++ b/libcpp/errors.c
@@ -28,6 +28,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "cpplib.h"
#include "internal.h"
+/* APPLE LOCAL error-colon */
+static int gcc_error_colon = 0;
static void print_location (cpp_reader *, source_location, unsigned int);
/* Print the logical file location (LINE, COL) in preparation for a
@@ -37,6 +39,23 @@ static void print_location (cpp_reader *, source_location, unsigned int);
static void
print_location (cpp_reader *pfile, source_location line, unsigned int col)
{
+ /* APPLE LOCAL begin error-colon */
+ const char *estr;
+ {
+ static int done = 0;
+ if ( ! done)
+ {
+ done = 1; /* Do this only once. */
+ /* Pretend we saw "-w" on commandline. */
+ if (getenv ("GCC_DASH_W"))
+ CPP_OPTION (pfile, inhibit_warnings) = 1; /* referenced by diagnostic.h:diagnostic_report_warnings() */
+ if (getenv ("GCC_ERROR_COLON"))
+ gcc_error_colon = 1;
+ }
+ }
+ estr = (gcc_error_colon) ? "error:" : "" ;
+ /* APPLE LOCAL end error-colon */
+
if (line == 0)
fprintf (stderr, "%s: ", progname);
else
@@ -55,12 +74,14 @@ print_location (cpp_reader *pfile, source_location line, unsigned int col)
col = 1;
}
+ /* APPLE LOCAL begin error-colon */
if (lin == 0)
- fprintf (stderr, "%s:", map->to_file);
+ fprintf (stderr, "%s:%s", map->to_file, estr);
else if (CPP_OPTION (pfile, show_column) == 0)
- fprintf (stderr, "%s:%u:", map->to_file, lin);
+ fprintf (stderr, "%s:%u:%s", map->to_file, lin, estr);
else
- fprintf (stderr, "%s:%u:%u:", map->to_file, lin, col);
+ fprintf (stderr, "%s:%u:%u:%s", map->to_file, lin, col, estr);
+ /* APPLE LOCAL end error-colon */
fputc (' ', stderr);
}
diff --git a/libcpp/files.c b/libcpp/files.c
index 593e5ebf0c8..0ea5722c02f 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -36,7 +36,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define FAB_C_VAR 2 /* variable length records (see Starlet fabdef.h) */
# define STAT_SIZE_RELIABLE(ST) ((ST).st_fab_rfm != FAB_C_VAR)
#else
-# define STAT_SIZE_RELIABLE(ST) true
+/* APPLE LOCAL begin predictive compilation */
+# define STAT_SIZE_RELIABLE(ST) (!CPP_OPTION (pfile, predictive_compilation))
+/* APPLE LOCAL end predictive compilation */
#endif
#ifdef __DJGPP__
@@ -177,6 +179,11 @@ static int pchf_save_compare (const void *e1, const void *e2);
static int pchf_compare (const void *d_p, const void *e_p);
static bool check_file_against_entries (cpp_reader *, _cpp_file *, bool);
+/* APPLE LOCAL begin distcc pch indirection --mrs */
+#include <sys/param.h>
+char *indirect_file (char *, const int);
+/* APPLE LOCAL end distcc pch indirection --mrs */
+
/* Given a filename in FILE->PATH, with the empty string interpreted
as <stdin>, open it.
@@ -248,9 +255,11 @@ pch_open_file (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch)
struct stat st;
bool valid = false;
- /* No PCH on <stdin> or if not requested. */
- if (file->name[0] == '\0' || !pfile->cb.valid_pch)
+ /* APPLE LOCAL begin predictive compilation */
+ /* No PCH on <stdin> or if predictive compilation or if not requested. */
+ if (pfile->is_main_file || file->name[0] == '\0' || !pfile->cb.valid_pch)
return false;
+ /* APPLE LOCAL end predictive compilation */
flen = strlen (path);
len = flen + sizeof (extension);
@@ -258,6 +267,11 @@ pch_open_file (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch)
memcpy (pchname, path, flen);
memcpy (pchname + flen, extension, sizeof (extension));
+ /* APPLE LOCAL begin distcc pch indirection --mrs */
+ if (! file->main_file)
+ pchname = indirect_file (pchname, 0);
+ /* APPLE LOCAL end distcc pch indirection --mrs */
+
if (stat (pchname, &st) == 0)
{
DIR *pchdir;
@@ -321,11 +335,21 @@ find_file_in_dir (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch)
if (path)
{
+ /* APPLE LOCAL predictive compilation */
+ bool res_open_file;
file->path = path;
if (pch_open_file (pfile, file, invalid_pch))
return true;
- if (open_file (file))
+ /* APPLE LOCAL begin predictive compilation */
+ /* Temporary path change to force opening stdin */
+ if (pfile->is_main_file)
+ file->path = "";
+ res_open_file = open_file (file);
+ file->path = path;
+
+ if (res_open_file)
+ /* APPLE LOCAL end predictive compilation */
return true;
if (file->err_no != ENOENT)
@@ -542,6 +566,17 @@ read_file_guts (cpp_reader *pfile, _cpp_file *file)
size = file->st.st_size;
}
+ /* APPLE LOCAL begin predictive compilation */
+ else
+ if (CPP_OPTION (pfile, predictive_compilation))
+ {
+ size = CPP_OPTION (pfile, predictive_compilation_size);
+ regular = size >= 0;
+ if (size < 0)
+ size = 8 * 1024;
+ CPP_OPTION(pfile, predictive_compilation_size) = -1;
+ }
+ /* APPLE LOCAL end predictive compilation */
else
/* 8 kilobytes is a sensible starting size. It ought to be bigger
than the kernel pipe buffer, and it's definitely bigger than
@@ -601,8 +636,13 @@ read_file (cpp_reader *pfile, _cpp_file *file)
}
file->dont_read = !read_file_guts (pfile, file);
- close (file->fd);
- file->fd = -1;
+ /* APPLE LOCAL begin predictive compilation */
+ if (file->fd != 0) /* Don't close stdin */
+ {
+ close (file->fd);
+ file->fd = -1;
+ }
+ /* APPLE LOCAL end predictive compilation */
return !file->dont_read;
}
@@ -974,6 +1014,22 @@ new_file_hash_entry (cpp_reader *pfile)
return &pfile->file_hash_entries[pfile->file_hash_entries_used++];
}
+/* APPLE LOCAL begin predictive compilation */
+bool read_from_stdin (cpp_reader *pfile)
+{
+ _cpp_file *file;
+
+ if (pfile->buffer->file->fd != 0)
+ return false;
+
+ file = pfile->main_file;
+ file->dont_read = !read_file_guts (pfile, file);
+ pfile->buffer->next_line = file->buffer;
+ pfile->buffer->rlimit = file->buffer + file->st.st_size;
+ return !file->dont_read;
+}
+/* APPLE LOCAL end predictive compilation */
+
/* Returns TRUE if a file FNAME has ever been successfully opened.
This routine is not intended to correctly handle filenames aliased
by links or redundant . or .. traversals etc. */
@@ -1615,3 +1671,145 @@ check_file_against_entries (cpp_reader *pfile ATTRIBUTE_UNUSED,
return bsearch (&d, pchf->entries, pchf->count, sizeof (struct pchf_entry),
pchf_compare) != NULL;
}
+
+/* APPLE LOCAL begin distcc pch indirection --mrs */
+static const char message_terminator = '\n';
+
+/* Communications routine to communicate with filename translation
+ server for distributed builds. This routine reads data from the
+ server. */
+
+static int
+read_from_parent (int fd, char *buffer, int size)
+{
+ int index = 0;
+ int result;
+
+ if (size <= 0)
+ return 0;
+
+ do {
+ result = read (fd, &buffer[index], size - index);
+
+ if (result <= 0 || index >= size )
+ return 0;
+ else
+ index += result;
+ } while (buffer[index - 1] != message_terminator);
+
+ /* Straighten out the string termination. */
+ buffer[index - 1] = '\0';
+
+ return 1;
+}
+
+/* Communications routine to communicate with filename translation server
+ for distributed builds. This routine writes data to the server. */
+
+static int
+write_to_parent (int fd, const char *message)
+{
+ int result;
+
+ if (message) {
+ const int length = strlen (message);
+ int index = 0;
+
+ while (index < length) {
+ result = write (fd, &message[index], length - index);
+
+ if (result < 0)
+ return 0;
+ else
+ index += result;
+ }
+ }
+
+ result = write (fd, &message_terminator, 1);
+
+ if (result < 0)
+ return 0;
+
+ return 1;
+}
+
+
+/* Initialize the filename translation service. */
+
+static int
+init_indirect_pipes (int *read_fd, int *write_fd)
+{
+ const char *file_indirect_pipes = getenv ("GCC_INDIRECT_FILES");
+ const char *protocol_operation = "VERS";
+ const char *protocol_version = "1";
+ char response[MAXPATHLEN];
+
+ if (!file_indirect_pipes)
+ return -1;
+
+ /* The environment variable indicates that the process that invoked
+ gcc would like to provide a different path for certain files.
+ This is mainly intended to be used with PCH headers and symbol
+ separation files (.cinfo) files under certain circumstances. */
+
+ if (sscanf (file_indirect_pipes, "%d, %d", read_fd, write_fd) != 2)
+ return -1;
+
+ /* Verify the protocol version. */
+ if (write_to_parent (*write_fd, protocol_operation))
+ if (write_to_parent (*write_fd, protocol_version))
+ if (read_from_parent (*read_fd, response, MAXPATHLEN))
+ if (strcmp ("OK", response) == 0)
+ return 1;
+
+ return -1;
+}
+
+/* Redirect file I/O at the direction of a translation server. fname
+ is the filename to transform. OPERATION is:
+
+ 0 for reading
+ 1 for writing
+ 2 for reading and writing */
+
+char *
+indirect_file (char *fname, int operation)
+{
+ static int indirection_initialized;
+ static int read_fd;
+ static int write_fd;
+ const char *operation_identifier = NULL;
+
+ if (!indirection_initialized)
+ indirection_initialized = init_indirect_pipes (&read_fd, &write_fd);
+
+ if (indirection_initialized != 1)
+ return fname;
+
+ switch (operation)
+ {
+ case 0:
+ operation_identifier = "PULL";
+ break;
+ case 1:
+ operation_identifier = "PUSH";
+ break;
+ case 2:
+ operation_identifier = "BOTH";
+ break;
+ default:
+ return fname;
+ }
+
+ if (write_to_parent (write_fd, operation_identifier))
+ if (write_to_parent (write_fd, fname))
+ {
+ char response[MAXPATHLEN];
+
+ if (read_from_parent (read_fd, response, MAXPATHLEN))
+ fname = xstrdup (response);
+ }
+
+ return fname;
+}
+/* APPLE LOCAL end distcc pch indirection --mrs */
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index c3814460705..47ce9705faa 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -129,8 +129,14 @@ struct _cpp_file;
TK(STRING, LITERAL) /* "string" */ \
TK(WSTRING, LITERAL) /* L"string" */ \
TK(OBJC_STRING, LITERAL) /* @"string" - Objective-C */ \
+ /* APPLE LOCAL pascal strings */ \
+ TK(PASCAL_STRING, LITERAL) /* Pascal ("\p...") string */ \
TK(HEADER_NAME, LITERAL) /* <stdio.h> in #include */ \
\
+ /* APPLE LOCAL begin CW asm blocks */ \
+ TK(BOL, LITERAL) /* asm bol */ \
+ TK(EOL, LITERAL) /* asm eol */ \
+ /* APPLE LOCAL end CW asm blocks */ \
TK(COMMENT, LITERAL) /* Only if output comments. */ \
/* SPELL_LITERAL happens to DTRT. */ \
TK(MACRO_ARG, NONE) /* Macro argument. */ \
@@ -236,6 +242,21 @@ typedef CPPCHAR_SIGNED_T cppchar_signed_t;
/* Style of header dependencies to generate. */
enum cpp_deps_style { DEPS_NONE = 0, DEPS_USER, DEPS_SYSTEM };
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+/* The possible normalization levels, from most restrictive to least. */
+enum cpp_normalize_level {
+ /* In NFKC. */
+ normalized_KC = 0,
+ /* In NFC. */
+ normalized_C,
+ /* In NFC, except for subsequences where being in NFC would make
+ the identifier invalid. */
+ normalized_identifier_C,
+ /* Not normalized at all. */
+ normalized_none
+};
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
+
/* This structure is nested inside struct cpp_reader, and
carries all the options visible to the command line. */
struct cpp_options
@@ -243,6 +264,11 @@ struct cpp_options
/* Characters between tab stops. */
unsigned int tabstop;
+ /* APPLE LOCAL begin predictive compilation */
+ bool predictive_compilation;
+ int predictive_compilation_size;
+ /* APPLE LOCAL end predictive compilation */
+
/* The language we're preprocessing. */
enum c_lang lang;
@@ -301,6 +327,27 @@ struct cpp_options
/* Nonzero means warn if there are any trigraphs. */
unsigned char warn_trigraphs;
+ /* APPLE LOCAL begin -Wextra-tokens 2001-08-02 --sts */
+ /* Nonzero means warn if extra tokens at end of directives. */
+ unsigned char warn_extra_tokens;
+ /* APPLE LOCAL end -Wextra-tokens 2001-08-02 --sts */
+ /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */
+ /* Nonzero means warn if no newline at end of file. */
+ unsigned char warn_newline_at_eof;
+ /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */
+ /* APPLE LOCAL begin -Wfour-char-constants */
+ /* Warn about four-char literals (e.g., MacOS-style OSTypes: 'APPL'). */
+ unsigned char warn_four_char_constants;
+ /* APPLE LOCAL end -Wfour-char-constants */
+
+ /* APPLE LOCAL begin pascal strings */
+ /* Nonzero means allow "\p...." Pascal string literals, where '\p'
+ is replaced with the length of the remaining string (excluding the
+ terminating NUL). Pascal string literals have type
+ 'const unsigned char *'. */
+ unsigned char pascal_strings;
+ /* APPLE LOCAL end pascal strings */
+
/* Nonzero means warn about multicharacter charconsts. */
unsigned char warn_multichar;
@@ -361,6 +408,11 @@ struct cpp_options
/* Nonzero means handle C++ alternate operator names. */
unsigned char operator_names;
+ /* APPLE LOCAL begin -Wno-#warnings */
+ /* Nonzero means suppress all #warning messages. (Radar 2796309) */
+ int no_pound_warnings;
+ /* APPLE LOCAL end -Wno-#warnings */
+
/* True for traditional preprocessing. */
unsigned char traditional;
@@ -373,12 +425,32 @@ struct cpp_options
/* Holds the name of the input character set. */
const char *input_charset;
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ /* The minimum permitted level of normalization before a warning
+ is generated. */
+ enum cpp_normalize_level warn_normalize;
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
+
/* True to warn about precompiled header files we couldn't use. */
bool warn_invalid_pch;
/* True if dependencies should be restored from a precompiled header. */
bool restore_pch_deps;
+ /* APPLE LOCAL begin Symbol Separation */
+ unsigned char making_pch;
+ unsigned char making_ss;
+ /* True to warn about symbol repositories we couldn't use. */
+ bool warn_invalid_sr;
+ bool use_ss;
+ /* APPLE LOCAL end Symbol Separation */
+
+ /* APPLE LOCAL begin pch distcc --mrs */
+ /* True if PCH should omit from the -E output all lines from PCH files
+ found in PCH files. */
+ unsigned char pch_preprocess;
+ /* APPLE LOCAL end pch distcc --mrs */
+
/* Dependency generation. */
struct
{
@@ -447,6 +519,21 @@ struct cpp_callbacks
int (*valid_pch) (cpp_reader *, const char *, int);
void (*read_pch) (cpp_reader *, const char *, int, const char *);
missing_header_cb missing_header;
+
+ /* APPLE LOCAL begin Symbol Separation */
+ void (*restore_write_symbols) (void);
+ void (*clear_write_symbols) (const char *, unsigned long);
+ void (*start_symbol_repository) (unsigned int, const char *, unsigned long);
+ void (*end_symbol_repository) (unsigned int);
+ int (*is_builtin_identifier) (cpp_hashnode *);
+ /* APPLE LOCAL end Symbol Separation */
+ /* APPLE LOCAL - PCH distcc debugging --mrs */
+ void (*set_working_directory)(const char *);
+ /* APPLE LOCAL begin AltiVec */
+ /* Context-sensitive macro support. Returns macro (if any) that should
+ be expanded. */
+ cpp_hashnode * (*macro_to_expand) (cpp_reader *, const cpp_token *);
+ /* APPLE LOCAL end AltiVec */
};
/* Chain of directories to look for include files in. */
@@ -467,6 +554,13 @@ struct cpp_dir
platforms. A NULL-terminated array of (from, to) pairs. */
const char **name_map;
+ /* APPLE LOCAL begin headermaps 3871393 */
+ /* Arbitrary mapping of include strings to paths of redirected
+ files. Contents are a special data format -- see struct
+ hmap_header_map below. */
+ void *header_map;
+ /* APPLE LOCAL end headermaps 3871393 */
+
/* Routine to construct pathname, given the search path name and the
HEADER we are trying to find, return a constructed pathname to
try and open. If this is NULL, the constructed pathname is as
@@ -504,6 +598,8 @@ extern const char *progname;
#define NODE_WARN (1 << 4) /* Warn if redefined or undefined. */
#define NODE_DISABLED (1 << 5) /* A disabled macro. */
#define NODE_MACRO_ARG (1 << 6) /* Used during #define processing. */
+/* APPLE LOCAL AltiVec */
+#define NODE_CONDITIONAL (1 << 7) /* Conditional macro */
/* Different flavors of hash node. */
enum node_type
@@ -576,6 +672,20 @@ struct cpp_hashnode GTY(())
} GTY ((desc ("CPP_HASHNODE_VALUE_IDX (%1)"))) value;
};
+/* APPLE LOCAL begin Symbol Separation */
+struct cpp_stab_checksum GTY(())
+{
+ unsigned long checksum;
+};
+extern void cpp_write_symbol_deps PARAMS ((struct cpp_reader *));
+extern void cpp_read_stabs_checksum PARAMS ((struct cpp_reader *, int));
+extern unsigned long cpp_get_stabs_checksum PARAMS ((void));
+extern void cpp_calculate_stabs_checksum PARAMS ((const char *));
+extern const char * cpp_symbol_separation_init PARAMS ((struct cpp_reader *, const char *,
+ const char *));
+
+/* APPLE LOCAL end Symbol Separation */
+
/* Call this first to get a handle to pass to other functions.
If you want cpplib to manage its own hashtable, pass in a NULL
@@ -637,7 +747,8 @@ extern unsigned int cpp_errors (cpp_reader *);
extern unsigned int cpp_token_len (const cpp_token *);
extern unsigned char *cpp_token_as_text (cpp_reader *, const cpp_token *);
extern unsigned char *cpp_spell_token (cpp_reader *, const cpp_token *,
- unsigned char *);
+ /* APPLE LOCAL mainline UCNs 2005-04-17 3892809 */
+ unsigned char *, bool);
extern void cpp_register_pragma (cpp_reader *, const char *, const char *,
void (*) (cpp_reader *), bool);
extern void cpp_handle_deferred_pragma (cpp_reader *, const cpp_string *);
@@ -646,6 +757,10 @@ extern int cpp_avoid_paste (cpp_reader *, const cpp_token *,
extern const cpp_token *cpp_get_token (cpp_reader *);
extern const unsigned char *cpp_macro_definition (cpp_reader *,
const cpp_hashnode *);
+/* APPLE LOCAL begin AltiVec */
+extern const cpp_token *_cpp_peek_token (cpp_reader *, int);
+extern void _cpp_backup_tokens_direct (cpp_reader *, unsigned int);
+/* APPLE LOCAL end AltiVec */
extern void _cpp_backup_tokens (cpp_reader *, unsigned int);
/* Evaluate a CPP_CHAR or CPP_WCHAR token. */
@@ -654,10 +769,12 @@ extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *,
/* Evaluate a vector of CPP_STRING or CPP_WSTRING tokens. */
extern bool cpp_interpret_string (cpp_reader *,
const cpp_string *, size_t,
- cpp_string *, bool);
+ /* APPLE LOCAL pascal strings */
+ cpp_string *, bool, bool);
extern bool cpp_interpret_string_notranslate (cpp_reader *,
const cpp_string *, size_t,
- cpp_string *, bool);
+ /* APPLE LOCAL pascal strings */
+ cpp_string *, bool, bool);
/* Used to register macros and assertions, perhaps from the command line.
The text is the same as the command line argument. */
@@ -763,6 +880,40 @@ extern void cpp_errno (cpp_reader *, int, const char *msgid);
extern void cpp_error_with_line (cpp_reader *, int, source_location, unsigned,
const char *msgid, ...) ATTRIBUTE_PRINTF_5;
+/* APPLE LOCAL begin headermaps 3871393 */
+#define HMAP_SAME_ENDIANNESS_MAGIC (((((('h' << 8) | 'm') << 8) | 'a') << 8) | 'p')
+#define HMAP_OPPOSITE_ENDIANNESS_MAGIC (((((('p' << 8) | 'a') << 8) | 'm') << 8) | 'h')
+
+#define HMAP_NOT_A_KEY 0x00000000
+
+#if !defined(uint32)
+typedef unsigned short uint16;
+typedef unsigned long uint32;
+#endif
+
+struct hmap_bucket
+{
+ uint32 key; /* Offset (into strings) of key */
+ struct {
+ uint32 prefix; /* Offset (into strings) of value prefix */
+ uint32 suffix; /* Offset (into strings) of value suffix */
+ } value; /* Value (prefix- and suffix-strings) */
+};
+
+struct hmap_header_map
+{
+ uint32 magic; /* Magic word, also indicates byte order */
+ uint16 version; /* Version number -- currently 1 */
+ uint16 _reserved; /* Reserved for future use -- zero for now */
+ uint32 strings_offset; /* Offset to start of string pool */
+ uint32 count; /* Number of entries in the string table */
+ uint32 capacity; /* Number of buckets (always a power of 2) */
+ uint32 max_value_length; /* Length of longest result path (excl. '\0') */
+ struct hmap_bucket buckets[1]; /* Inline array of 'capacity' maptable buckets */
+ /* Strings follow the buckets, at strings_offset. */
+};
+/* APPLE LOCAL end headermaps 3871393 */
+
/* In cpplex.c */
extern int cpp_ideq (const cpp_token *, const char *);
extern void cpp_output_line (cpp_reader *, FILE *);
@@ -803,6 +954,11 @@ extern cpp_buffer *cpp_get_buffer (cpp_reader *);
extern struct _cpp_file *cpp_get_file (cpp_buffer *);
extern cpp_buffer *cpp_get_prev (cpp_buffer *);
+/* APPLE LOCAL begin predictive compilation */
+extern bool read_from_stdin PARAMS ((cpp_reader *));
+extern void set_stdin_option PARAMS ((cpp_reader *, int));
+/* APPLE LOCAL end predictive compilation */
+
/* In cpppch.c */
struct save_macro_data;
extern int cpp_save_state (cpp_reader *, FILE *);
diff --git a/libcpp/init.c b/libcpp/init.c
index 39e50f5a519..3bb61ae1223 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -140,6 +140,19 @@ cpp_create_reader (enum c_lang lang, hash_table *table,
pfile = xcalloc (1, sizeof (cpp_reader));
cpp_set_lang (pfile, lang);
+ /* APPLE LOCAL begin -Wextra-tokens 2001-08-01 --sts */
+ /* Suppress warnings about extra tokens after #endif etc. */
+ CPP_OPTION (pfile, warn_extra_tokens) = 0;
+ /* APPLE LOCAL end -Wextra-tokens 2001-08-01 --sts */
+ /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */
+ /* Suppress warnings about missing newlines at ends of files. */
+ CPP_OPTION (pfile, warn_newline_at_eof) = 0;
+ /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */
+ /* APPLE LOCAL begin -Wfour-char-constants */
+ CPP_OPTION (pfile, warn_four_char_constants) = 1;
+ /* APPLE LOCAL end -Wfour-char-constants */
+ /* APPLE LOCAL pascal strings */
+ CPP_OPTION (pfile, pascal_strings) = 0;
CPP_OPTION (pfile, warn_multichar) = 1;
CPP_OPTION (pfile, discard_comments) = 1;
CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1;
@@ -147,12 +160,18 @@ cpp_create_reader (enum c_lang lang, hash_table *table,
CPP_OPTION (pfile, tabstop) = 8;
CPP_OPTION (pfile, operator_names) = 1;
CPP_OPTION (pfile, warn_trigraphs) = 2;
- CPP_OPTION (pfile, warn_endif_labels) = 1;
- CPP_OPTION (pfile, warn_deprecated) = 1;
+ /* APPLE LOCAL begin -Wextra-tokens */
+ /* Suppress warnings about extra tokens after #endif etc. */
+ CPP_OPTION (pfile, warn_endif_labels) = 0;
+ /* APPLE LOCAL end -Wextra-tokens */
+ /* APPLE LOCAL suppress useful warnings */
+ CPP_OPTION (pfile, warn_deprecated) = 0;
CPP_OPTION (pfile, warn_long_long) = !CPP_OPTION (pfile, c99);
CPP_OPTION (pfile, dollars_in_ident) = 1;
CPP_OPTION (pfile, warn_dollars) = 1;
CPP_OPTION (pfile, warn_variadic_macros) = 1;
+ /* APPLE LOCAL mainline UCNs 2005-04-17 3892809 */
+ CPP_OPTION (pfile, warn_normalize) = normalized_C;
/* Default CPP arithmetic to something sensible for the host for the
benefit of dumb users like fix-header. */
@@ -459,8 +478,14 @@ cpp_read_main_file (cpp_reader *pfile, const char *fname)
deps_add_default_target (pfile->deps, fname);
}
+ /* APPLE LOCAL begin predictive compilation */
+ pfile->is_main_file = CPP_OPTION (pfile, predictive_compilation);
+ /* APPLE LOCAL end predictive compilation */
pfile->main_file
= _cpp_find_file (pfile, fname, &pfile->no_search_path, false);
+ /* APPLE LOCAL begin predictive compilation */
+ pfile->is_main_file = false;
+ /* APPLE LOCAL end predictive compilation */
if (_cpp_find_failed (pfile->main_file))
return NULL;
diff --git a/libcpp/internal.h b/libcpp/internal.h
index 0ae13d58cb6..9c6951f0501 100644
--- a/libcpp/internal.h
+++ b/libcpp/internal.h
@@ -115,7 +115,8 @@ extern unsigned char *_cpp_unaligned_alloc (cpp_reader *, size_t);
#define BUFF_LIMIT(BUFF) ((BUFF)->limit)
/* #include types. */
-enum include_type {IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE};
+/* APPLE LOCAL pch distcc --mrs */
+enum include_type {IT_INCLUDE, IT_INCLUDE_PCH, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE};
union utoken
{
@@ -171,6 +172,11 @@ struct cpp_context
/* True if utoken element is token, else ptoken. */
bool direct_p;
+
+ /* APPLE LOCAL begin CW asm blocks */
+ /* True if this expansion is at the beginning of a line. */
+ bool bol_p;
+ /* APPLE LOCAL end CW asm blocks */
};
struct lexer_state
@@ -341,6 +347,9 @@ struct cpp_reader
struct _cpp_file *all_files;
struct _cpp_file *main_file;
+ /* APPLE LOCAL begin predictive compilation */
+ bool is_main_file;
+ /* APPLE LOCAL end predictive compilation */
/* File and directory hash table. */
struct htab *file_hash;
@@ -472,6 +481,10 @@ extern unsigned char _cpp_trigraph_map[UCHAR_MAX + 1];
/* Macros. */
+/* APPLE LOCAL begin warning in system headers */
+#define CPP_IN_SYSTEM_HEADER(PFILE) ((PFILE)->line_table && (PFILE)->line_table->maps && (PFILE)->line_table->maps->sysp)
+/* APPLE LOCAL end warning in system headers */
+
static inline int cpp_in_system_header (cpp_reader *);
static inline int
cpp_in_system_header (cpp_reader *pfile)
@@ -564,13 +577,43 @@ extern unsigned char *_cpp_copy_replacement_text (const cpp_macro *,
extern size_t _cpp_replacement_text_len (const cpp_macro *);
/* In charset.c. */
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+
+/* The normalization state at this point in the sequence.
+ It starts initialized to all zeros, and at the end
+ 'level' is the normalization level of the sequence. */
+
+struct normalize_state
+{
+ /* The previous character. */
+ cppchar_t previous;
+ /* The combining class of the previous character. */
+ unsigned char prev_class;
+ /* The lowest normalization level so far. */
+ enum cpp_normalize_level level;
+};
+#define INITIAL_NORMALIZE_STATE { 0, 0, normalized_KC }
+#define NORMALIZE_STATE_RESULT(st) ((st)->level)
+
+/* We saw a character that matches ISIDNUM(), update a
+ normalize_state appropriately. */
+#define NORMALIZE_STATE_UPDATE_IDNUM(st) \
+ ((st)->previous = 0, (st)->prev_class = 0)
+
extern cppchar_t _cpp_valid_ucn (cpp_reader *, const unsigned char **,
- const unsigned char *, int);
+ const unsigned char *, int,
+ struct normalize_state *state);
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
extern void _cpp_destroy_iconv (cpp_reader *);
extern unsigned char *_cpp_convert_input (cpp_reader *, const char *,
unsigned char *, size_t, size_t,
off_t *);
extern const char *_cpp_default_encoding (void);
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+extern cpp_hashnode * _cpp_interpret_identifier (cpp_reader *pfile,
+ const unsigned char *id,
+ size_t len);
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
/* Utility routines and macros. */
#define DSC(str) (const unsigned char *)str, sizeof str - 1
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 62a28f81b87..c036b30c14b 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -24,6 +24,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "cpplib.h"
#include "internal.h"
+/* APPLE LOCAL begin CW asm blocks */
+/* A hack that would be better done with a callback or some such. */
+extern enum cw_asm_states { cw_asm_none, cw_asm_decls, cw_asm_asm } cw_asm_state;
+extern int cw_asm_in_operands;
+/* APPLE LOCAL end CW asm blocks */
+
enum spell_type
{
SPELL_OPERATOR = 0,
@@ -53,9 +59,8 @@ static const struct token_spelling token_spellings[N_TTYPES] = { TTYPE_TABLE };
static void add_line_note (cpp_buffer *, const uchar *, unsigned int);
static int skip_line_comment (cpp_reader *);
static void skip_whitespace (cpp_reader *, cppchar_t);
-static cpp_hashnode *lex_identifier (cpp_reader *, const uchar *);
-static void lex_number (cpp_reader *, cpp_string *);
-static bool forms_identifier_p (cpp_reader *, int);
+/* APPLE LOCAL mainline UCNs 2005-04-17 3892809 */
+/* Delete prototypes for lex_identifier, lex_number, forms_identifier_p */
static void lex_string (cpp_reader *, cpp_token *, const uchar *);
static void save_comment (cpp_reader *, cpp_token *, const uchar *, cppchar_t);
static void create_literal (cpp_reader *, cpp_token *, const uchar *,
@@ -430,10 +435,40 @@ name_p (cpp_reader *pfile, const cpp_string *string)
return 1;
}
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+/* After parsing an identifier or other sequence, produce a warning about
+ sequences not in NFC/NFKC. */
+static void
+warn_about_normalization (cpp_reader *pfile,
+ const cpp_token *token,
+ const struct normalize_state *s)
+{
+ if (CPP_OPTION (pfile, warn_normalize) < NORMALIZE_STATE_RESULT (s)
+ && !pfile->state.skipping)
+ {
+ /* Make sure that the token is printed using UCNs, even
+ if we'd otherwise happily print UTF-8. */
+ unsigned char *buf = xmalloc (cpp_token_len (token));
+ size_t sz;
+
+ sz = cpp_spell_token (pfile, token, buf, false) - buf;
+ if (NORMALIZE_STATE_RESULT (s) == normalized_C)
+ cpp_error_with_line (pfile, CPP_DL_WARNING, token->src_loc, 0,
+ "`%.*s' is not in NFKC", sz, buf);
+ else
+ cpp_error_with_line (pfile, CPP_DL_WARNING, token->src_loc, 0,
+ "`%.*s' is not in NFC", sz, buf);
+ }
+}
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
+
/* Returns TRUE if the sequence starting at buffer->cur is invalid in
an identifier. FIRST is TRUE if this starts an identifier. */
static bool
-forms_identifier_p (cpp_reader *pfile, int first)
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+forms_identifier_p (cpp_reader *pfile, int first,
+ struct normalize_state *state)
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
{
cpp_buffer *buffer = pfile->buffer;
@@ -453,54 +488,76 @@ forms_identifier_p (cpp_reader *pfile, int first)
}
/* Is this a syntactically valid UCN? */
- if (0 && *buffer->cur == '\\'
+ /* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ if ((CPP_OPTION (pfile, cplusplus) || CPP_OPTION (pfile, c99))
+ && *buffer->cur == '\\'
&& (buffer->cur[1] == 'u' || buffer->cur[1] == 'U'))
{
buffer->cur += 2;
- if (_cpp_valid_ucn (pfile, &buffer->cur, buffer->rlimit, 1 + !first))
+ if (_cpp_valid_ucn (pfile, &buffer->cur, buffer->rlimit, 1 + !first,
+ state))
return true;
buffer->cur -= 2;
}
+ /* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
+
+ /* APPLE LOCAL begin CW asm blocks */
+ /* Allow [.+-] in CW asm opcodes (PowerPC specific). Do this here
+ so we don't have to figure out "bl- 45" vs "bl -45". */
+ if (cw_asm_state >= cw_asm_decls
+ && !cw_asm_in_operands
+ && (*buffer->cur == '.' || *buffer->cur == '+' || *buffer->cur == '-'))
+ {
+ buffer->cur++;
+ return true;
+ }
+ /* APPLE LOCAL end CW asm blocks */
return false;
}
/* Lex an identifier starting at BUFFER->CUR - 1. */
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
static cpp_hashnode *
-lex_identifier (cpp_reader *pfile, const uchar *base)
+lex_identifier (cpp_reader *pfile, const uchar *base, bool starts_ucn,
+ struct normalize_state *nst)
{
cpp_hashnode *result;
- const uchar *cur, *limit;
+ const uchar *cur;
unsigned int len;
unsigned int hash = HT_HASHSTEP (0, *base);
cur = pfile->buffer->cur;
- for (;;)
+ if (! starts_ucn)
+ while (ISIDNUM (*cur))
+ {
+ hash = HT_HASHSTEP (hash, *cur);
+ cur++;
+ }
+ pfile->buffer->cur = cur;
+ if (starts_ucn || forms_identifier_p (pfile, false, nst))
{
- /* N.B. ISIDNUM does not include $. */
- while (ISIDNUM (*cur))
- {
- hash = HT_HASHSTEP (hash, *cur);
- cur++;
- }
-
- pfile->buffer->cur = cur;
- if (!forms_identifier_p (pfile, false))
- break;
-
- limit = pfile->buffer->cur;
- while (cur < limit)
- {
- hash = HT_HASHSTEP (hash, *cur);
- cur++;
- }
+ /* Slower version for identifiers containing UCNs (or $). */
+ do {
+ while (ISIDNUM (*pfile->buffer->cur))
+ {
+ pfile->buffer->cur++;
+ NORMALIZE_STATE_UPDATE_IDNUM (nst);
+ }
+ } while (forms_identifier_p (pfile, false, nst));
+ result = _cpp_interpret_identifier (pfile, base,
+ pfile->buffer->cur - base);
}
- len = cur - base;
- hash = HT_HASHFINISH (hash, len);
+ else
+ {
+ len = cur - base;
+ hash = HT_HASHFINISH (hash, len);
- result = (cpp_hashnode *)
- ht_lookup_with_hash (pfile->hash_table, base, len, hash, HT_ALLOC);
+ result = (cpp_hashnode *)
+ ht_lookup_with_hash (pfile->hash_table, base, len, hash, HT_ALLOC);
+ }
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
/* Rarely, identifiers require diagnostics when lexed. */
if (__builtin_expect ((result->flags & NODE_DIAGNOSTIC)
&& !pfile->state.skipping, 0))
@@ -524,24 +581,32 @@ lex_identifier (cpp_reader *pfile, const uchar *base)
/* Lex a number to NUMBER starting at BUFFER->CUR - 1. */
static void
-lex_number (cpp_reader *pfile, cpp_string *number)
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+lex_number (cpp_reader *pfile, cpp_string *number,
+ struct normalize_state *nst)
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
{
const uchar *cur;
const uchar *base;
uchar *dest;
base = pfile->buffer->cur - 1;
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
do
{
cur = pfile->buffer->cur;
/* N.B. ISIDNUM does not include $. */
while (ISIDNUM (*cur) || *cur == '.' || VALID_SIGN (*cur, cur[-1]))
- cur++;
+ {
+ cur++;
+ NORMALIZE_STATE_UPDATE_IDNUM (nst);
+ }
pfile->buffer->cur = cur;
}
- while (forms_identifier_p (pfile, false));
+ while (forms_identifier_p (pfile, false, nst));
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
number->len = cur - base;
dest = _cpp_unaligned_alloc (pfile, number->len + 1);
@@ -681,6 +746,47 @@ next_tokenrun (tokenrun *run)
return run->next;
}
+/* APPLE LOCAL begin AltiVec */
+/* Look ahead in the input stream. */
+const cpp_token *
+_cpp_peek_token (cpp_reader *pfile, int index)
+{
+ cpp_context *context = pfile->context;
+ const cpp_token *peektok;
+ int count;
+
+ /* First, scan through any pending cpp_context objects. */
+ while (context->prev)
+ {
+ ptrdiff_t sz = (context->direct_p
+ ? LAST (context).token - FIRST (context).token
+ : LAST (context).ptoken - FIRST (context).ptoken);
+
+ if (index < (int) sz)
+ return (context->direct_p
+ ? FIRST (context).token + index
+ : *(FIRST (context).ptoken + index));
+
+ index -= (int) sz;
+ context = context->prev;
+ }
+
+ /* We will have to read some new tokens after all (and do so
+ without invalidating preceding tokens). */
+ count = index;
+ pfile->keep_tokens++;
+
+ do
+ peektok = _cpp_lex_token (pfile);
+ while (index--);
+
+ _cpp_backup_tokens_direct (pfile, count + 1);
+ pfile->keep_tokens--;
+
+ return peektok;
+}
+/* APPLE LOCAL end AltiVec */
+
/* Allocate a single token that is invalidated at the same time as the
rest of the tokens on the line. Has its line and col set to the
same as the last lexed token, so that diagnostics appear in the
@@ -689,9 +795,34 @@ cpp_token *
_cpp_temp_token (cpp_reader *pfile)
{
cpp_token *old, *result;
+ /* APPLE LOCAL begin AltiVec */
+ ptrdiff_t sz = pfile->cur_run->limit - pfile->cur_token;
+ ptrdiff_t la = (ptrdiff_t) pfile->lookaheads;
+ /* APPLE LOCAL end AltiVec */
old = pfile->cur_token - 1;
- if (pfile->cur_token == pfile->cur_run->limit)
+ /* APPLE LOCAL begin AltiVec */
+ /* Any pre-existing lookaheads must not be clobbered. */
+ if (la)
+ {
+ if (sz <= la)
+ {
+ tokenrun *next = next_tokenrun (pfile->cur_run);
+
+ if (sz < la)
+ memmove (next->base + 1, next->base,
+ (la - sz) * sizeof (cpp_token));
+
+ next->base[0] = pfile->cur_run->limit[-1];
+ }
+
+ if (sz > 1)
+ memmove (pfile->cur_token + 1, pfile->cur_token,
+ MIN (la, sz - 1) * sizeof (cpp_token));
+ }
+
+ if (!sz)
+ /* APPLE LOCAL end AltiVec */
{
pfile->cur_run = next_tokenrun (pfile->cur_run);
pfile->cur_token = pfile->cur_run->base;
@@ -742,6 +873,11 @@ _cpp_lex_token (cpp_reader *pfile)
else
{
result = &pfile->directive_result;
+
+ /* APPLE LOCAL begin CW asm blocks C++ */
+ /* We put this back on the result. */
+ result->flags |= BOL;
+ /* APPLE LOCAL end CW asm blocks C++ */
break;
}
}
@@ -783,6 +919,12 @@ _cpp_get_fresh_line (cpp_reader *pfile)
if (!buffer->need_line)
return true;
+ /* APPLE LOCAL begin predictive compilation */
+ if (CPP_OPTION (pfile, predictive_compilation)
+ && buffer->next_line >= buffer->rlimit)
+ read_from_stdin (pfile);
+ /* APPLE LOCAL end predictive compilation */
+
if (buffer->next_line < buffer->rlimit)
{
_cpp_clean_line (pfile);
@@ -800,9 +942,14 @@ _cpp_get_fresh_line (cpp_reader *pfile)
{
/* Only warn once. */
buffer->next_line = buffer->rlimit;
- cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line,
- CPP_BUF_COLUMN (buffer, buffer->cur),
- "no newline at end of file");
+ /* APPLE LOCAL begin suppress no newline warning. */
+ if ( CPP_OPTION (pfile, warn_newline_at_eof))
+ {
+ cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line,
+ CPP_BUF_COLUMN (buffer, buffer->cur),
+ "no newline at end of file");
+ }
+ /* APPLE LOCAL end suppress no newline warning. */
}
return_at_eof = buffer->return_at_eof;
@@ -821,6 +968,10 @@ _cpp_get_fresh_line (cpp_reader *pfile)
} \
while (0)
+/* APPLE LOCAL begin CW asm blocks */
+static int cw_asm_label_follows;
+/* APPLE LOCAL end CW asm blocks */
+
/* Lex a token into pfile->cur_token, which is also incremented, to
get diagnostics pointing to the correct location.
@@ -897,9 +1048,21 @@ _cpp_lex_direct (cpp_reader *pfile)
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- result->type = CPP_NUMBER;
- lex_number (pfile, &result->val.str);
- break;
+ /* APPLE LOCAL begin CW asm blocks */
+ /* An '@' in assembly code makes a following digit string into
+ an identifier. */
+ if (cw_asm_label_follows)
+ goto start_ident;
+ /* APPLE LOCAL end CW asm blocks */
+ /* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ {
+ struct normalize_state nst = INITIAL_NORMALIZE_STATE;
+ result->type = CPP_NUMBER;
+ lex_number (pfile, &result->val.str, &nst);
+ warn_about_normalization (pfile, result, &nst);
+ break;
+ }
+ /* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
case 'L':
/* 'L' may introduce wide characters or strings. */
@@ -910,6 +1073,8 @@ _cpp_lex_direct (cpp_reader *pfile)
}
/* Fall through. */
+ /* APPLE LOCAL CW asm blocks */
+ start_ident:
case '_':
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
@@ -922,7 +1087,14 @@ _cpp_lex_direct (cpp_reader *pfile)
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
case 'Y': case 'Z':
result->type = CPP_NAME;
- result->val.node = lex_identifier (pfile, buffer->cur - 1);
+ /* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ {
+ struct normalize_state nst = INITIAL_NORMALIZE_STATE;
+ result->val.node = lex_identifier (pfile, buffer->cur - 1, false,
+ &nst);
+ warn_about_normalization (pfile, result, &nst);
+ }
+ /* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
/* Convert named operators to their proper types. */
if (result->val.node->flags & NODE_OPERATOR)
@@ -930,6 +1102,10 @@ _cpp_lex_direct (cpp_reader *pfile)
result->flags |= NAMED_OP;
result->type = result->val.node->directive_index;
}
+ /* APPLE LOCAL begin CW asm blocks */
+ /* Got an identifier, reset the CW asm label hack flag. */
+ cw_asm_label_follows = 0;
+ /* APPLE LOCAL end CW asm blocks */
break;
case '\'':
@@ -1067,8 +1243,12 @@ _cpp_lex_direct (cpp_reader *pfile)
result->type = CPP_DOT;
if (ISDIGIT (*buffer->cur))
{
+ /* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ struct normalize_state nst = INITIAL_NORMALIZE_STATE;
result->type = CPP_NUMBER;
- lex_number (pfile, &result->val.str);
+ lex_number (pfile, &result->val.str, &nst);
+ warn_about_normalization (pfile, result, &nst);
+ /* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
}
else if (*buffer->cur == '.' && buffer->cur[1] == '.')
buffer->cur += 2, result->type = CPP_ELLIPSIS;
@@ -1142,22 +1322,40 @@ _cpp_lex_direct (cpp_reader *pfile)
case ']': result->type = CPP_CLOSE_SQUARE; break;
case '{': result->type = CPP_OPEN_BRACE; break;
case '}': result->type = CPP_CLOSE_BRACE; break;
- case ';': result->type = CPP_SEMICOLON; break;
-
- /* @ is a punctuator in Objective-C. */
- case '@': result->type = CPP_ATSIGN; break;
+ /* APPLE LOCAL begin CW asm blocks */
+ case ';':
+ /* ';' separates instructions in CW asm, so flag that we're no
+ longer seeing operands. */
+ if (cw_asm_state >= cw_asm_decls)
+ cw_asm_in_operands = 0;
+ result->type = CPP_SEMICOLON;
+ break;
+ case '@':
+ /* In CW asm, @ can indicate a label, which may consist of
+ either letters or digits, so set a hack flag for this. (We
+ still want to return the @ as a separate token so that the
+ parser can distinguish labels from opcodes.) */
+ if (cw_asm_state >= cw_asm_decls)
+ cw_asm_label_follows = 1;
+ result->type = CPP_ATSIGN;
+ break;
+ /* APPLE LOCAL end CW asm blocks */
case '$':
case '\\':
{
const uchar *base = --buffer->cur;
+ /* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ struct normalize_state nst = INITIAL_NORMALIZE_STATE;
- if (forms_identifier_p (pfile, true))
+ if (forms_identifier_p (pfile, true, &nst))
{
result->type = CPP_NAME;
- result->val.node = lex_identifier (pfile, base);
+ result->val.node = lex_identifier (pfile, base, true, &nst);
+ warn_about_normalization (pfile, result, &nst);
break;
}
+ /* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
buffer->cur++;
}
@@ -1180,19 +1378,59 @@ cpp_token_len (const cpp_token *token)
{
default: len = 4; break;
case SPELL_LITERAL: len = token->val.str.len; break;
- case SPELL_IDENT: len = NODE_LEN (token->val.node); break;
+ /* APPLE LOCAL mainline UCNs 2005-04-17 3892809 */
+ case SPELL_IDENT: len = NODE_LEN (token->val.node) * 10; break;
}
return len;
}
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+/* Parse UTF-8 out of NAMEP and place a \U escape in BUFFER.
+ Return the number of bytes read out of NAME. (There are always
+ 10 bytes written to BUFFER.) */
+
+static size_t
+utf8_to_ucn (unsigned char *buffer, const unsigned char *name)
+{
+ int j;
+ int ucn_len = 0;
+ int ucn_len_c;
+ unsigned t;
+ unsigned long utf32;
+
+ /* Compute the length of the UTF-8 sequence. */
+ for (t = *name; t & 0x80; t <<= 1)
+ ucn_len++;
+
+ utf32 = *name & (0x7F >> ucn_len);
+ for (ucn_len_c = 1; ucn_len_c < ucn_len; ucn_len_c++)
+ {
+ utf32 = (utf32 << 6) | (*++name & 0x3F);
+
+ /* Ill-formed UTF-8. */
+ if ((*name & ~0x3F) != 0x80)
+ abort ();
+ }
+
+ *buffer++ = '\\';
+ *buffer++ = 'U';
+ for (j = 7; j >= 0; j--)
+ *buffer++ = "0123456789abcdef"[(utf32 >> (4 * j)) & 0xF];
+ return ucn_len;
+}
+
+
/* Write the spelling of a token TOKEN to BUFFER. The buffer must
already contain the enough space to hold the token's spelling.
Returns a pointer to the character after the last character written.
+ FORSTRING is true if this is to be the spelling after translation
+ phase 1 (this is different for UCNs).
FIXME: Would be nice if we didn't need the PFILE argument. */
unsigned char *
cpp_spell_token (cpp_reader *pfile, const cpp_token *token,
- unsigned char *buffer)
+ unsigned char *buffer, bool forstring)
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
{
switch (TOKEN_SPELL (token))
{
@@ -1216,8 +1454,28 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token,
spell_ident:
case SPELL_IDENT:
- memcpy (buffer, NODE_NAME (token->val.node), NODE_LEN (token->val.node));
- buffer += NODE_LEN (token->val.node);
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ if (forstring)
+ {
+ memcpy (buffer, NODE_NAME (token->val.node),
+ NODE_LEN (token->val.node));
+ buffer += NODE_LEN (token->val.node);
+ }
+ else
+ {
+ size_t i;
+ const unsigned char * name = NODE_NAME (token->val.node);
+
+ for (i = 0; i < NODE_LEN (token->val.node); i++)
+ if (name[i] & ~0x7F)
+ {
+ i += utf8_to_ucn (buffer, name + i) - 1;
+ buffer += 10;
+ }
+ else
+ *buffer++ = NODE_NAME (token->val.node)[i];
+ }
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
break;
case SPELL_LITERAL:
@@ -1242,7 +1500,8 @@ cpp_token_as_text (cpp_reader *pfile, const cpp_token *token)
unsigned int len = cpp_token_len (token) + 1;
unsigned char *start = _cpp_unaligned_alloc (pfile, len), *end;
- end = cpp_spell_token (pfile, token, start);
+/* APPLE LOCAL mainline UCNs 2005-04-17 3892809 */
+ end = cpp_spell_token (pfile, token, start, false);
end[0] = '\0';
return start;
@@ -1286,9 +1545,24 @@ cpp_output_token (const cpp_token *token, FILE *fp)
spell_ident:
case SPELL_IDENT:
- fwrite (NODE_NAME (token->val.node), 1, NODE_LEN (token->val.node), fp);
- break;
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ {
+ size_t i;
+ const unsigned char * name = NODE_NAME (token->val.node);
+
+ for (i = 0; i < NODE_LEN (token->val.node); i++)
+ if (name[i] & ~0x7F)
+ {
+ unsigned char buffer[10];
+ i += utf8_to_ucn (buffer, name + i) - 1;
+ fwrite (buffer, 1, 10, fp);
+ }
+ else
+ fputc (NODE_NAME (token->val.node)[i], fp);
+ }
+ break;
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
case SPELL_LITERAL:
fwrite (token->val.str.text, 1, token->val.str.len, fp);
break;
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 5e596699e01..d0441bd2166 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -40,7 +40,10 @@ struct macro_arg
/* Macro expansion. */
-static int enter_macro_context (cpp_reader *, cpp_hashnode *);
+/* APPLE LOCAL begin CW asm blocks */
+extern int flag_cw_asm_blocks;
+static int enter_macro_context (cpp_reader *, cpp_hashnode *, int bol_p);
+/* APPLE LOCAL end CW asm blocks */
static int builtin_macro (cpp_reader *, cpp_hashnode *);
static void push_token_context (cpp_reader *, cpp_hashnode *,
const cpp_token *, unsigned int);
@@ -380,13 +383,17 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg)
{
_cpp_buff *buff = _cpp_get_buff (pfile, len);
unsigned char *buf = BUFF_FRONT (buff);
- len = cpp_spell_token (pfile, token, buf) - buf;
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ len = cpp_spell_token (pfile, token, buf, true) - buf;
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
dest = cpp_quote_string (dest, buf, len);
_cpp_release_buff (pfile, buff);
}
else
- dest = cpp_spell_token (pfile, token, dest);
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ dest = cpp_spell_token (pfile, token, dest, true);
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
if (token->type == CPP_OTHER && token->val.str.text[0] == '\\')
backslash_count++;
else
@@ -422,15 +429,19 @@ paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs)
lhs = *plhs;
len = cpp_token_len (lhs) + cpp_token_len (rhs) + 1;
buf = alloca (len);
- end = cpp_spell_token (pfile, lhs, buf);
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ end = cpp_spell_token (pfile, lhs, buf, false);
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
/* Avoid comment headers, since they are still processed in stage 3.
It is simpler to insert a space here, rather than modifying the
lexer to ignore comments in some circumstances. Simply returning
false doesn't work, since we want to clear the PASTE_LEFT flag. */
if (lhs->type == CPP_DIV && rhs->type != CPP_EQ)
*end++ = ' ';
- end = cpp_spell_token (pfile, rhs, end);
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ end = cpp_spell_token (pfile, rhs, end, false);
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
*end = '\n';
cpp_push_buffer (pfile, buf, end - buf, /* from_stage3 */ true);
@@ -714,7 +725,8 @@ funlike_invocation_p (cpp_reader *pfile, cpp_hashnode *node)
containing its yet-to-be-rescanned replacement list and return one.
Otherwise, we don't push a context and return zero. */
static int
-enter_macro_context (cpp_reader *pfile, cpp_hashnode *node)
+/* APPLE LOCAL CW asm blocks */
+enter_macro_context (cpp_reader *pfile, cpp_hashnode *node, int bol_p)
{
/* The presence of a macro invalidates a file's controlling macro. */
pfile->mi_valid = false;
@@ -761,6 +773,12 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node)
if (macro->paramc == 0)
push_token_context (pfile, node, macro->exp.tokens, macro->count);
+ /* APPLE LOCAL begin CW asm blocks */
+ /* Mark this context as being at the beginning of a line. */
+ if (bol_p && pfile->context)
+ pfile->context->bol_p = true;
+ /* APPLE LOCAL end CW asm blocks */
+
return 1;
}
@@ -947,6 +965,8 @@ push_ptoken_context (cpp_reader *pfile, cpp_hashnode *macro, _cpp_buff *buff,
context->direct_p = false;
context->macro = macro;
context->buff = buff;
+ /* APPLE LOCAL CW asm blocks */
+ context->bol_p = false;
FIRST (context).ptoken = first;
LAST (context).ptoken = first + count;
}
@@ -961,6 +981,8 @@ push_token_context (cpp_reader *pfile, cpp_hashnode *macro,
context->direct_p = true;
context->macro = macro;
context->buff = NULL;
+ /* APPLE LOCAL CW asm blocks */
+ context->bol_p = false;
FIRST (context).token = first;
LAST (context).token = first + count;
}
@@ -1059,7 +1081,8 @@ _cpp_pop_context (cpp_reader *pfile)
const cpp_token *
cpp_get_token (cpp_reader *pfile)
{
- const cpp_token *result;
+ /* APPLE LOCAL CW asm blocks */
+ cpp_token *result; /* not 'const' */
for (;;)
{
@@ -1076,6 +1099,16 @@ cpp_get_token (cpp_reader *pfile)
else
result = *FIRST (context).ptoken++;
+ /* APPLE LOCAL begin CW asm blocks */
+ /* Make the context's bol flag stick to the first token, and
+ only the first. */
+ if (context->bol_p)
+ {
+ result->flags |= BOL;
+ context->bol_p = false;
+ }
+ /* APPLE LOCAL end CW asm blocks */
+
if (result->flags & PASTE_LEFT)
{
paste_all_tokens (pfile, result);
@@ -1106,7 +1139,15 @@ cpp_get_token (cpp_reader *pfile)
if (!(node->flags & NODE_DISABLED))
{
if (!pfile->state.prevent_expansion
- && enter_macro_context (pfile, node))
+ /* APPLE LOCAL begin AltiVec */
+ /* Conditional macros require that a predicate be
+ evaluated first. */
+ && (!(node->flags & NODE_CONDITIONAL)
+ || (pfile->cb.macro_to_expand
+ && (node = pfile->cb.macro_to_expand (pfile, result))))
+ /* APPLE LOCAL end AltiVec */
+ /* APPLE LOCAL CW asm blocks */
+ && enter_macro_context (pfile, node, (flag_cw_asm_blocks && result->flags & BOL)))
{
if (pfile->state.in_directive)
continue;
@@ -1164,26 +1205,34 @@ cpp_scan_nooutput (cpp_reader *pfile)
pfile->state.prevent_expansion--;
}
+/* APPLE LOCAL begin AltiVec */
+/* Step back one or more tokens obtained from the lexer. */
+void
+_cpp_backup_tokens_direct (cpp_reader *pfile, unsigned int count)
+{
+ pfile->lookaheads += count;
+ while (count--)
+ {
+ pfile->cur_token--;
+ if (pfile->cur_token == pfile->cur_run->base
+ /* Possible with -fpreprocessed and no leading #line. */
+ && pfile->cur_run->prev != NULL)
+ {
+ pfile->cur_run = pfile->cur_run->prev;
+ pfile->cur_token = pfile->cur_run->limit;
+ }
+ }
+}
+/* APPLE LOCAL end AltiVec */
+
/* Step back one (or more) tokens. Can only step mack more than 1 if
they are from the lexer, and not from macro expansion. */
void
_cpp_backup_tokens (cpp_reader *pfile, unsigned int count)
{
if (pfile->context->prev == NULL)
- {
- pfile->lookaheads += count;
- while (count--)
- {
- pfile->cur_token--;
- if (pfile->cur_token == pfile->cur_run->base
- /* Possible with -fpreprocessed and no leading #line. */
- && pfile->cur_run->prev != NULL)
- {
- pfile->cur_run = pfile->cur_run->prev;
- pfile->cur_token = pfile->cur_run->limit;
- }
- }
- }
+ /* APPLE LOCAL AltiVec */
+ _cpp_backup_tokens_direct (pfile, count);
else
{
if (count != 1)
@@ -1209,6 +1258,13 @@ warn_of_redefinition (cpp_reader *pfile, const cpp_hashnode *node,
if (node->flags & NODE_WARN)
return true;
+ /* APPLE LOCAL begin AltiVec */
+ /* Redefinitions of conditional (context-sensitive) macros, on
+ the other hand, must be allowed silently. */
+ if (node->flags & NODE_CONDITIONAL)
+ return false;
+ /* APPLE LOCAL end AltiVec */
+
/* Redefinition of a macro is allowed if and only if the old and new
definitions are the same. (6.10.3 paragraph 2). */
macro1 = node->value.macro;
@@ -1751,8 +1807,10 @@ cpp_macro_definition (cpp_reader *pfile, const cpp_hashnode *node)
buffer += NODE_LEN (macro->params[token->val.arg_no - 1]);
}
else
- buffer = cpp_spell_token (pfile, token, buffer);
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+ buffer = cpp_spell_token (pfile, token, buffer, false);
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
if (token->flags & PASTE_LEFT)
{
*buffer++ = ' ';
diff --git a/libcpp/makedepend.c b/libcpp/makedepend.c
index f28f9699828..777427d2542 100644
--- a/libcpp/makedepend.c
+++ b/libcpp/makedepend.c
@@ -27,6 +27,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "getopt.h"
#include "mkdeps.h"
+/* APPLE LOCAL begin CW asm blocks -sshebs */
+/* Dummies needed because we use them from cpplib, yuck. */
+int flag_cw_asm_blocks;
+int cw_asm_state;
+int cw_asm_in_operands;
+/* APPLE LOCAL end CW asm blocks -sshebs */
+
const char *progname;
const char *vpath;
diff --git a/libcpp/makeucnid.c b/libcpp/makeucnid.c
new file mode 100644
index 00000000000..f87416f1096
--- /dev/null
+++ b/libcpp/makeucnid.c
@@ -0,0 +1,344 @@
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+/* Make ucnid.h from various sources.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Run this program as
+ ./makeucnid ucnid.tab UnicodeData.txt DerivedNormalizationProps.txt \
+ > ucnid.h
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdbool.h>
+#include <stdlib.h>
+
+enum {
+ C99 = 1,
+ CXX = 2,
+ digit = 4,
+ not_NFC = 8,
+ not_NFKC = 16,
+ maybe_not_NFC = 32
+};
+
+static unsigned flags[65536];
+static unsigned short decomp[65536][2];
+static unsigned char combining_value[65536];
+
+/* Die! */
+
+static void
+fail (const char *s)
+{
+ fprintf (stderr, "%s\n", s);
+ exit (1);
+}
+
+/* Read ucnid.tab and set the C99 and CXX flags in header[]. */
+
+static void
+read_ucnid (const char *fname)
+{
+ FILE *f = fopen (fname, "r");
+ unsigned fl = 0;
+
+ if (!f)
+ fail ("opening ucnid.tab");
+ for (;;)
+ {
+ char line[256];
+
+ if (!fgets (line, sizeof (line), f))
+ break;
+ if (strcmp (line, "[C99]\n") == 0)
+ fl = C99;
+ else if (strcmp (line, "[CXX]\n") == 0)
+ fl = CXX;
+ else if (isxdigit (line[0]))
+ {
+ char *l = line;
+ while (*l)
+ {
+ unsigned long start, end;
+ char *endptr;
+ start = strtoul (l, &endptr, 16);
+ if (endptr == l || (*endptr != '-' && ! isspace (*endptr)))
+ fail ("parsing ucnid.tab [1]");
+ l = endptr;
+ if (*l != '-')
+ end = start;
+ else
+ {
+ end = strtoul (l + 1, &endptr, 16);
+ if (end < start)
+ fail ("parsing ucnid.tab, end before start");
+ l = endptr;
+ if (! isspace (*l))
+ fail ("parsing ucnid.tab, junk after range");
+ }
+ while (isspace (*l))
+ l++;
+ if (end > 0xFFFF)
+ fail ("parsing ucnid.tab, end too large");
+ while (start <= end)
+ flags[start++] |= fl;
+ }
+ }
+ }
+ if (ferror (f))
+ fail ("reading ucnid.tab");
+ fclose (f);
+}
+
+/* Read UnicodeData.txt and set the 'digit' flag, and
+ also fill in the 'decomp' table to be the decompositions of
+ characters for which both the character decomposed and all the code
+ points in the decomposition are either C99 or CXX. */
+
+static void
+read_table (char *fname)
+{
+ FILE * f = fopen (fname, "r");
+
+ if (!f)
+ fail ("opening UnicodeData.txt");
+ for (;;)
+ {
+ char line[256];
+ unsigned long codepoint, this_decomp[4];
+ char *l;
+ int i;
+ int decomp_useful;
+
+ if (!fgets (line, sizeof (line), f))
+ break;
+ codepoint = strtoul (line, &l, 16);
+ if (l == line || *l != ';')
+ fail ("parsing UnicodeData.txt, reading code point");
+ if (codepoint > 0xffff || ! (flags[codepoint] & (C99 | CXX)))
+ continue;
+
+ do {
+ l++;
+ } while (*l != ';');
+ /* Category value; things starting with 'N' are numbers of some
+ kind. */
+ if (*++l == 'N')
+ flags[codepoint] |= digit;
+
+ do {
+ l++;
+ } while (*l != ';');
+ /* Canonical combining class; in NFC/NFKC, they must be increasing
+ (or zero). */
+ if (! isdigit (*++l))
+ fail ("parsing UnicodeData.txt, combining class not number");
+ combining_value[codepoint] = strtoul (l, &l, 10);
+ if (*l++ != ';')
+ fail ("parsing UnicodeData.txt, junk after combining class");
+
+ /* Skip over bidi value. */
+ do {
+ l++;
+ } while (*l != ';');
+
+ /* Decomposition mapping. */
+ decomp_useful = flags[codepoint];
+ if (*++l == '<') /* Compatibility mapping. */
+ continue;
+ for (i = 0; i < 4; i++)
+ {
+ if (*l == ';')
+ break;
+ if (!isxdigit (*l))
+ fail ("parsing UnicodeData.txt, decomposition format");
+ this_decomp[i] = strtoul (l, &l, 16);
+ decomp_useful &= flags[this_decomp[i]];
+ while (isspace (*l))
+ l++;
+ }
+ if (i > 2) /* Decomposition too long. */
+ fail ("parsing UnicodeData.txt, decomposition too long");
+ if (decomp_useful)
+ while (--i >= 0)
+ decomp[codepoint][i] = this_decomp[i];
+ }
+ if (ferror (f))
+ fail ("reading UnicodeData.txt");
+ fclose (f);
+}
+
+/* Read DerivedNormalizationProps.txt and set the flags that say whether
+ a character is in NFC, NFKC, or is context-dependent. */
+
+static void
+read_derived (const char *fname)
+{
+ FILE * f = fopen (fname, "r");
+
+ if (!f)
+ fail ("opening DerivedNormalizationProps.txt");
+ for (;;)
+ {
+ char line[256];
+ unsigned long start, end;
+ char *l;
+ bool not_NFC_p, not_NFKC_p, maybe_not_NFC_p;
+
+ if (!fgets (line, sizeof (line), f))
+ break;
+ not_NFC_p = (strstr (line, "; NFC_QC; N") != NULL);
+ not_NFKC_p = (strstr (line, "; NFKC_QC; N") != NULL);
+ maybe_not_NFC_p = (strstr (line, "; NFC_QC; M") != NULL);
+ if (! not_NFC_p && ! not_NFKC_p && ! maybe_not_NFC_p)
+ continue;
+
+ start = strtoul (line, &l, 16);
+ if (l == line)
+ fail ("parsing DerivedNormalizationProps.txt, reading start");
+ if (start > 0xffff)
+ continue;
+ if (*l == '.' && l[1] == '.')
+ end = strtoul (l + 2, &l, 16);
+ else
+ end = start;
+
+ while (start <= end)
+ flags[start++] |= ((not_NFC_p ? not_NFC : 0)
+ | (not_NFKC_p ? not_NFKC : 0)
+ | (maybe_not_NFC_p ? maybe_not_NFC : 0)
+ );
+ }
+ if (ferror (f))
+ fail ("reading DerivedNormalizationProps.txt");
+ fclose (f);
+}
+
+/* Write out the table.
+ The table consists of two words per entry. The first word is the flags
+ for the unicode code points up to and including the second word. */
+
+static void
+write_table (void)
+{
+ unsigned i;
+ unsigned last_flag = flags[0];
+ bool really_safe = decomp[0][0] == 0;
+ unsigned char last_combine = combining_value[0];
+
+ for (i = 1; i <= 65536; i++)
+ if (i == 65536
+ || (flags[i] != last_flag && ((flags[i] | last_flag) & (C99 | CXX)))
+ || really_safe != (decomp[i][0] == 0)
+ || combining_value[i] != last_combine)
+ {
+ printf ("{ %s|%s|%s|%s|%s|%s|%s, %3d, %#06x },\n",
+ last_flag & C99 ? "C99" : " 0",
+ last_flag & digit ? "DIG" : " 0",
+ last_flag & CXX ? "CXX" : " 0",
+ really_safe ? "CID" : " 0",
+ last_flag & not_NFC ? " 0" : "NFC",
+ last_flag & not_NFKC ? " 0" : "NKC",
+ last_flag & maybe_not_NFC ? "CTX" : " 0",
+ combining_value[i - 1],
+ i - 1);
+ last_flag = flags[i];
+ last_combine = combining_value[0];
+ really_safe = decomp[i][0] == 0;
+ }
+}
+
+/* Print out the huge copyright notice. */
+
+static void
+write_copyright (void)
+{
+ static const char copyright[] = "\
+/* Unicode characters and various properties.\n\
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.\n\
+\n\
+ This program is free software; you can redistribute it and/or modify it\n\
+ under the terms of the GNU General Public License as published by the\n\
+ Free Software Foundation; either version 2, or (at your option) any\n\
+ later version.\n\
+\n\
+ This program is distributed in the hope that it will be useful,\n\
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
+ GNU General Public License for more details.\n\
+\n\
+ You should have received a copy of the GNU General Public License\n\
+ along with this program; if not, write to the Free Software\n\
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\
+\n\
+\n\
+ Copyright (C) 1991-2005 Unicode, Inc. All rights reserved.\n\
+ Distributed under the Terms of Use in\n\
+ http://www.unicode.org/copyright.html.\n\
+\n\
+ Permission is hereby granted, free of charge, to any person\n\
+ obtaining a copy of the Unicode data files and any associated\n\
+ documentation (the \"Data Files\") or Unicode software and any\n\
+ associated documentation (the \"Software\") to deal in the Data Files\n\
+ or Software without restriction, including without limitation the\n\
+ rights to use, copy, modify, merge, publish, distribute, and/or\n\
+ sell copies of the Data Files or Software, and to permit persons to\n\
+ whom the Data Files or Software are furnished to do so, provided\n\
+ that (a) the above copyright notice(s) and this permission notice\n\
+ appear with all copies of the Data Files or Software, (b) both the\n\
+ above copyright notice(s) and this permission notice appear in\n\
+ associated documentation, and (c) there is clear notice in each\n\
+ modified Data File or in the Software as well as in the\n\
+ documentation associated with the Data File(s) or Software that the\n\
+ data or software has been modified.\n\
+\n\
+ THE DATA FILES AND SOFTWARE ARE PROVIDED \"AS IS\", WITHOUT WARRANTY\n\
+ OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\n\
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n\
+ NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE\n\
+ COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR\n\
+ ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY\n\
+ DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\n\
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS\n\
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE\n\
+ OF THE DATA FILES OR SOFTWARE.\n\
+\n\
+ Except as contained in this notice, the name of a copyright holder\n\
+ shall not be used in advertising or otherwise to promote the sale,\n\
+ use or other dealings in these Data Files or Software without prior\n\
+ written authorization of the copyright holder. */\n";
+
+ puts (copyright);
+}
+
+/* Main program. */
+
+int
+main(int argc, char ** argv)
+{
+ if (argc != 4)
+ fail ("too few arguments to makeucn");
+ read_ucnid (argv[1]);
+ read_table (argv[2]);
+ read_derived (argv[3]);
+
+ write_copyright ();
+ write_table ();
+ return 0;
+}
+/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */
diff --git a/libcpp/pch.c b/libcpp/pch.c
index 79900c30c36..7f054b23c2f 100644
--- a/libcpp/pch.c
+++ b/libcpp/pch.c
@@ -423,7 +423,14 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd)
struct ht_node_list nl = { 0, 0, 0 };
unsigned char *first, *last;
unsigned int i;
-
+ /* APPLE LOCAL begin pch distcc --mrs */
+ int skip_validation;
+
+ /* Skip pch validation if we have just validated it. */
+ skip_validation = CPP_OPTION (r, pch_preprocess)
+ && CPP_OPTION (r, preprocessed);
+ /* APPLE LOCAL end pch distcc --mrs */
+
/* Read in the list of identifiers that must be defined
Check that they are defined in the same way. */
for (;;)
@@ -456,6 +463,11 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd)
if ((size_t)read (fd, namebuf, m.definition_length)
!= m.definition_length)
goto error;
+
+ /* APPLE LOCAL begin pch distcc --mrs */
+ if (skip_validation)
+ continue;
+ /* APPLE LOCAL end pch distcc --mrs */
h = cpp_lookup (r, namebuf, m.name_length);
if (m.flags & NODE_POISONED
@@ -492,6 +504,14 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd)
if ((size_t) read (fd, undeftab, m.definition_length) != m.definition_length)
goto error;
+ /* APPLE LOCAL begin pch distcc --mrs */
+ if (skip_validation)
+ {
+ free (undeftab);
+ return 0;
+ }
+ /* APPLE LOCAL end pch distcc --mrs */
+
/* Collect identifiers from the current hash table. */
nl.n_defs = 0;
nl.asize = 10;
@@ -630,6 +650,12 @@ cpp_read_state (cpp_reader *r, const char *name, FILE *f,
struct save_macro_data *data)
{
size_t i;
+ /* APPLE LOCAL begin pch distcc --mrs */
+ void (*saved_line_change) PARAMS ((cpp_reader *, const cpp_token *, int));
+
+ saved_line_change = r->cb.line_change;
+ /* APPLE LOCAL end pch distcc --mrs */
+
struct lexer_state old_state;
/* Restore spec_nodes, which will be full of references to the old
@@ -646,6 +672,8 @@ cpp_read_state (cpp_reader *r, const char *name, FILE *f,
r->state.in_directive = 1;
r->state.prevent_expansion = 1;
r->state.angled_headers = 0;
+ /* APPLE LOCAL pch distcc --mrs */
+ r->cb.line_change = 0;
/* Run through the carefully-saved macros, insert them. */
for (i = 0; i < data->count; i++)
@@ -678,6 +706,8 @@ cpp_read_state (cpp_reader *r, const char *name, FILE *f,
free (data->defns[i]);
}
r->state = old_state;
+ /* APPLE LOCAL pch distcc --mrs */
+ r->cb.line_change = saved_line_change;
_cpp_restore_pragma_names (r, data->saved_pragmas);
diff --git a/libcpp/ucnid.h b/libcpp/ucnid.h
index 04c9513c537..39d28e985bd 100644
--- a/libcpp/ucnid.h
+++ b/libcpp/ucnid.h
@@ -1,336 +1,803 @@
-/* Table of UCNs which are valid in identifiers.
- Copyright (C) 2003 Free Software Foundation, Inc.
+/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */
+/* Unicode characters and various properties.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-/* Automatically generated from cppucnid.tab, do not edit */
-/* This file reproduces the table in ISO/IEC 9899:1999 (C99) Annex
- D, which is itself a reproduction from ISO/IEC TR 10176:1998, and
- the similar table from ISO/IEC 14882:1988 (C++98) Annex E, which is
- a reproduction of ISO/IEC PDTR 10176. Unfortunately these tables
- are not identical. */
+ Copyright (C) 1991-2005 Unicode, Inc. All rights reserved.
+ Distributed under the Terms of Use in
+ http://www.unicode.org/copyright.html.
-#ifndef LIBCPP_UCNID_H
-#define LIBCPP_UCNID_H
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of the Unicode data files and any associated
+ documentation (the "Data Files") or Unicode software and any
+ associated documentation (the "Software") to deal in the Data Files
+ or Software without restriction, including without limitation the
+ rights to use, copy, modify, merge, publish, distribute, and/or
+ sell copies of the Data Files or Software, and to permit persons to
+ whom the Data Files or Software are furnished to do so, provided
+ that (a) the above copyright notice(s) and this permission notice
+ appear with all copies of the Data Files or Software, (b) both the
+ above copyright notice(s) and this permission notice appear in
+ associated documentation, and (c) there is clear notice in each
+ modified Data File or in the Software as well as in the
+ documentation associated with the Data File(s) or Software that the
+ data or software has been modified.
-#define C99 1
-#define CXX 2
-#define DIG 4
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY
+ OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
+ COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
+ ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
+ DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ OF THE DATA FILES OR SOFTWARE.
-struct ucnrange
-{
- unsigned short lo, hi;
- unsigned short flags;
-};
+ Except as contained in this notice, the name of a copyright holder
+ shall not be used in advertising or otherwise to promote the sale,
+ use or other dealings in these Data Files or Software without prior
+ written authorization of the copyright holder. */
-static const struct ucnrange ucnranges[] = {
- { 0x00aa, 0x00aa, C99 }, /* Latin */
- { 0x00b5, 0x00b5, C99 }, /* Special characters */
- { 0x00b7, 0x00b7, C99 },
- { 0x00ba, 0x00ba, C99 }, /* Latin */
- { 0x00c0, 0x00d6, CXX|C99 },
- { 0x00d8, 0x00f6, CXX|C99 },
- { 0x00f8, 0x01f5, CXX|C99 },
- { 0x01fa, 0x0217, CXX|C99 },
- { 0x0250, 0x02a8, CXX|C99 },
- { 0x02b0, 0x02b8, C99 }, /* Special characters */
- { 0x02bb, 0x02bb, C99 },
- { 0x02bd, 0x02c1, C99 },
- { 0x02d0, 0x02d1, C99 },
- { 0x02e0, 0x02e4, C99 },
- { 0x037a, 0x037a, C99 },
- { 0x0384, 0x0384, CXX }, /* Greek */
- { 0x0386, 0x0386, C99 },
- { 0x0388, 0x038a, CXX|C99 },
- { 0x038c, 0x038c, CXX|C99 },
- { 0x038e, 0x03a1, CXX|C99 },
- { 0x03a3, 0x03ce, CXX|C99 },
- { 0x03d0, 0x03d6, CXX|C99 },
- { 0x03da, 0x03da, CXX|C99 },
- { 0x03dc, 0x03dc, CXX|C99 },
- { 0x03de, 0x03de, CXX|C99 },
- { 0x03e0, 0x03e0, CXX|C99 },
- { 0x03e2, 0x03f3, CXX|C99 },
- { 0x0401, 0x040c, CXX|C99 }, /* Cyrillic */
- { 0x040d, 0x040d, CXX },
- { 0x040e, 0x040e, C99 },
- { 0x040f, 0x044f, CXX|C99 },
- { 0x0451, 0x045c, CXX|C99 },
- { 0x045e, 0x0481, CXX|C99 },
- { 0x0490, 0x04c4, CXX|C99 },
- { 0x04c7, 0x04c8, CXX|C99 },
- { 0x04cb, 0x04cc, CXX|C99 },
- { 0x04d0, 0x04eb, CXX|C99 },
- { 0x04ee, 0x04f5, CXX|C99 },
- { 0x04f8, 0x04f9, CXX|C99 },
- { 0x0531, 0x0556, CXX|C99 }, /* Armenian */
- { 0x0559, 0x0559, C99 }, /* Special characters */
- { 0x0561, 0x0587, CXX|C99 }, /* Armenian */
- { 0x05b0, 0x05b9, C99 }, /* Hebrew */
- { 0x05bb, 0x05bd, C99 },
- { 0x05bf, 0x05bf, C99 },
- { 0x05c1, 0x05c2, C99 },
- { 0x05d0, 0x05ea, CXX|C99 },
- { 0x05f0, 0x05f2, CXX|C99 },
- { 0x05f3, 0x05f4, CXX },
- { 0x0621, 0x063a, CXX|C99 }, /* Arabic */
- { 0x0640, 0x0652, CXX|C99 },
- { 0x0660, 0x0669, C99|DIG }, /* Digits */
- { 0x0670, 0x06b7, CXX|C99 }, /* Arabic */
- { 0x06ba, 0x06be, CXX|C99 },
- { 0x06c0, 0x06ce, CXX|C99 },
- { 0x06d0, 0x06dc, C99 },
- { 0x06e5, 0x06e7, CXX|C99 },
- { 0x06e8, 0x06e8, C99 },
- { 0x06ea, 0x06ed, C99 },
- { 0x06f0, 0x06f9, C99|DIG }, /* Digits */
- { 0x0901, 0x0903, C99 }, /* Devanagari */
- { 0x0905, 0x0939, CXX|C99 },
- { 0x093d, 0x093d, C99 }, /* Special characters */
- { 0x093e, 0x094d, C99 }, /* Devanagari */
- { 0x0950, 0x0952, C99 },
- { 0x0958, 0x0962, CXX|C99 },
- { 0x0963, 0x0963, C99 },
- { 0x0966, 0x096f, C99|DIG }, /* Digits */
- { 0x0981, 0x0983, C99 }, /* Bengali */
- { 0x0985, 0x098c, CXX|C99 },
- { 0x098f, 0x0990, CXX|C99 },
- { 0x0993, 0x09a8, CXX|C99 },
- { 0x09aa, 0x09b0, CXX|C99 },
- { 0x09b2, 0x09b2, CXX|C99 },
- { 0x09b6, 0x09b9, CXX|C99 },
- { 0x09be, 0x09c4, C99 },
- { 0x09c7, 0x09c8, C99 },
- { 0x09cb, 0x09cd, C99 },
- { 0x09dc, 0x09dd, CXX|C99 },
- { 0x09df, 0x09e1, CXX|C99 },
- { 0x09e2, 0x09e3, C99 },
- { 0x09e6, 0x09ef, C99|DIG }, /* Digits */
- { 0x09f0, 0x09f1, CXX|C99 }, /* Bengali */
- { 0x0a02, 0x0a02, C99 }, /* Gurmukhi */
- { 0x0a05, 0x0a0a, CXX|C99 },
- { 0x0a0f, 0x0a10, CXX|C99 },
- { 0x0a13, 0x0a28, CXX|C99 },
- { 0x0a2a, 0x0a30, CXX|C99 },
- { 0x0a32, 0x0a33, CXX|C99 },
- { 0x0a35, 0x0a36, CXX|C99 },
- { 0x0a38, 0x0a39, CXX|C99 },
- { 0x0a3e, 0x0a42, C99 },
- { 0x0a47, 0x0a48, C99 },
- { 0x0a4b, 0x0a4d, C99 },
- { 0x0a59, 0x0a5c, CXX|C99 },
- { 0x0a5e, 0x0a5e, CXX|C99 },
- { 0x0a66, 0x0a6f, C99|DIG }, /* Digits */
- { 0x0a74, 0x0a74, C99 }, /* Gurmukhi */
- { 0x0a81, 0x0a83, C99 }, /* Gujarati */
- { 0x0a85, 0x0a8b, CXX|C99 },
- { 0x0a8d, 0x0a8d, CXX|C99 },
- { 0x0a8f, 0x0a91, CXX|C99 },
- { 0x0a93, 0x0aa8, CXX|C99 },
- { 0x0aaa, 0x0ab0, CXX|C99 },
- { 0x0ab2, 0x0ab3, CXX|C99 },
- { 0x0ab5, 0x0ab9, CXX|C99 },
- { 0x0abd, 0x0ac5, C99 },
- { 0x0ac7, 0x0ac9, C99 },
- { 0x0acb, 0x0acd, C99 },
- { 0x0ad0, 0x0ad0, C99 },
- { 0x0ae0, 0x0ae0, CXX|C99 },
- { 0x0ae6, 0x0aef, C99|DIG }, /* Digits */
- { 0x0b01, 0x0b03, C99 }, /* Oriya */
- { 0x0b05, 0x0b0c, CXX|C99 },
- { 0x0b0f, 0x0b10, CXX|C99 },
- { 0x0b13, 0x0b28, CXX|C99 },
- { 0x0b2a, 0x0b30, CXX|C99 },
- { 0x0b32, 0x0b33, CXX|C99 },
- { 0x0b36, 0x0b39, CXX|C99 },
- { 0x0b3d, 0x0b3d, C99 }, /* Special characters */
- { 0x0b3e, 0x0b43, C99 }, /* Oriya */
- { 0x0b47, 0x0b48, C99 },
- { 0x0b4b, 0x0b4d, C99 },
- { 0x0b5c, 0x0b5d, CXX|C99 },
- { 0x0b5f, 0x0b61, CXX|C99 },
- { 0x0b66, 0x0b6f, C99|DIG }, /* Digits */
- { 0x0b82, 0x0b83, C99 }, /* Tamil */
- { 0x0b85, 0x0b8a, CXX|C99 },
- { 0x0b8e, 0x0b90, CXX|C99 },
- { 0x0b92, 0x0b95, CXX|C99 },
- { 0x0b99, 0x0b9a, CXX|C99 },
- { 0x0b9c, 0x0b9c, CXX|C99 },
- { 0x0b9e, 0x0b9f, CXX|C99 },
- { 0x0ba3, 0x0ba4, CXX|C99 },
- { 0x0ba8, 0x0baa, CXX|C99 },
- { 0x0bae, 0x0bb5, CXX|C99 },
- { 0x0bb7, 0x0bb9, CXX|C99 },
- { 0x0bbe, 0x0bc2, C99 },
- { 0x0bc6, 0x0bc8, C99 },
- { 0x0bca, 0x0bcd, C99 },
- { 0x0be7, 0x0bef, C99|DIG }, /* Digits */
- { 0x0c01, 0x0c03, C99 }, /* Telugu */
- { 0x0c05, 0x0c0c, CXX|C99 },
- { 0x0c0e, 0x0c10, CXX|C99 },
- { 0x0c12, 0x0c28, CXX|C99 },
- { 0x0c2a, 0x0c33, CXX|C99 },
- { 0x0c35, 0x0c39, CXX|C99 },
- { 0x0c3e, 0x0c44, C99 },
- { 0x0c46, 0x0c48, C99 },
- { 0x0c4a, 0x0c4d, C99 },
- { 0x0c60, 0x0c61, CXX|C99 },
- { 0x0c66, 0x0c6f, C99|DIG }, /* Digits */
- { 0x0c82, 0x0c83, C99 }, /* Kannada */
- { 0x0c85, 0x0c8c, CXX|C99 },
- { 0x0c8e, 0x0c90, CXX|C99 },
- { 0x0c92, 0x0ca8, CXX|C99 },
- { 0x0caa, 0x0cb3, CXX|C99 },
- { 0x0cb5, 0x0cb9, CXX|C99 },
- { 0x0cbe, 0x0cc4, C99 },
- { 0x0cc6, 0x0cc8, C99 },
- { 0x0cca, 0x0ccd, C99 },
- { 0x0cde, 0x0cde, C99 },
- { 0x0ce0, 0x0ce1, CXX|C99 },
- { 0x0ce6, 0x0cef, C99|DIG }, /* Digits */
- { 0x0d02, 0x0d03, C99 }, /* Malayalam */
- { 0x0d05, 0x0d0c, CXX|C99 },
- { 0x0d0e, 0x0d10, CXX|C99 },
- { 0x0d12, 0x0d28, CXX|C99 },
- { 0x0d2a, 0x0d39, CXX|C99 },
- { 0x0d3e, 0x0d43, C99 },
- { 0x0d46, 0x0d48, C99 },
- { 0x0d4a, 0x0d4d, C99 },
- { 0x0d60, 0x0d61, CXX|C99 },
- { 0x0d66, 0x0d6f, C99|DIG }, /* Digits */
- { 0x0e01, 0x0e30, CXX|C99 }, /* Thai */
- { 0x0e31, 0x0e31, C99 },
- { 0x0e32, 0x0e33, CXX|C99 },
- { 0x0e34, 0x0e3a, C99 },
- { 0x0e40, 0x0e46, CXX|C99 },
- { 0x0e47, 0x0e49, C99 },
- { 0x0e50, 0x0e59, CXX|C99|DIG }, /* Digits */
- { 0x0e5a, 0x0e5b, CXX|C99 }, /* Thai */
- { 0x0e81, 0x0e82, CXX|C99 }, /* Lao */
- { 0x0e84, 0x0e84, CXX|C99 },
- { 0x0e87, 0x0e88, CXX|C99 },
- { 0x0e8a, 0x0e8a, CXX|C99 },
- { 0x0e8d, 0x0e8d, CXX|C99 },
- { 0x0e94, 0x0e97, CXX|C99 },
- { 0x0e99, 0x0e9f, CXX|C99 },
- { 0x0ea1, 0x0ea3, CXX|C99 },
- { 0x0ea5, 0x0ea5, CXX|C99 },
- { 0x0ea7, 0x0ea7, CXX|C99 },
- { 0x0eaa, 0x0eab, CXX|C99 },
- { 0x0ead, 0x0eae, CXX|C99 },
- { 0x0eaf, 0x0eaf, CXX },
- { 0x0eb0, 0x0eb0, CXX|C99 },
- { 0x0eb1, 0x0eb1, C99 },
- { 0x0eb2, 0x0eb3, CXX|C99 },
- { 0x0eb4, 0x0eb9, C99 },
- { 0x0ebb, 0x0ebc, C99 },
- { 0x0ebd, 0x0ebd, CXX|C99 },
- { 0x0ec0, 0x0ec4, CXX|C99 },
- { 0x0ec6, 0x0ec6, CXX|C99 },
- { 0x0ec8, 0x0ecd, C99 },
- { 0x0ed0, 0x0ed9, C99|DIG }, /* Digits */
- { 0x0edc, 0x0edd, C99 }, /* Lao */
- { 0x0f00, 0x0f00, C99 }, /* Tibetan */
- { 0x0f18, 0x0f19, C99 },
- { 0x0f20, 0x0f33, C99|DIG }, /* Digits */
- { 0x0f35, 0x0f35, C99 }, /* Tibetan */
- { 0x0f37, 0x0f37, C99 },
- { 0x0f39, 0x0f39, C99 },
- { 0x0f3e, 0x0f47, C99 },
- { 0x0f49, 0x0f69, C99 },
- { 0x0f71, 0x0f84, C99 },
- { 0x0f86, 0x0f8b, C99 },
- { 0x0f90, 0x0f95, C99 },
- { 0x0f97, 0x0f97, C99 },
- { 0x0f99, 0x0fad, C99 },
- { 0x0fb1, 0x0fb7, C99 },
- { 0x0fb9, 0x0fb9, C99 },
- { 0x10a0, 0x10c5, CXX|C99 }, /* Georgian */
- { 0x10d0, 0x10f6, CXX|C99 },
- { 0x1100, 0x1159, CXX }, /* Hangul */
- { 0x1161, 0x11a2, CXX },
- { 0x11a8, 0x11f9, CXX },
- { 0x1e00, 0x1e9a, CXX|C99 }, /* Latin */
- { 0x1e9b, 0x1e9b, C99 },
- { 0x1ea0, 0x1ef9, CXX|C99 },
- { 0x1f00, 0x1f15, CXX|C99 }, /* Greek */
- { 0x1f18, 0x1f1d, CXX|C99 },
- { 0x1f20, 0x1f45, CXX|C99 },
- { 0x1f48, 0x1f4d, CXX|C99 },
- { 0x1f50, 0x1f57, CXX|C99 },
- { 0x1f59, 0x1f59, CXX|C99 },
- { 0x1f5b, 0x1f5b, CXX|C99 },
- { 0x1f5d, 0x1f5d, CXX|C99 },
- { 0x1f5f, 0x1f7d, CXX|C99 },
- { 0x1f80, 0x1fb4, CXX|C99 },
- { 0x1fb6, 0x1fbc, CXX|C99 },
- { 0x1fbe, 0x1fbe, C99 }, /* Special characters */
- { 0x1fc2, 0x1fc4, CXX|C99 }, /* Greek */
- { 0x1fc6, 0x1fcc, CXX|C99 },
- { 0x1fd0, 0x1fd3, CXX|C99 },
- { 0x1fd6, 0x1fdb, CXX|C99 },
- { 0x1fe0, 0x1fec, CXX|C99 },
- { 0x1ff2, 0x1ff4, CXX|C99 },
- { 0x1ff6, 0x1ffc, CXX|C99 },
- { 0x203f, 0x2040, C99 }, /* Special characters */
- { 0x207f, 0x207f, C99 }, /* Latin */
- { 0x2102, 0x2102, C99 }, /* Special characters */
- { 0x2107, 0x2107, C99 },
- { 0x210a, 0x2113, C99 },
- { 0x2115, 0x2115, C99 },
- { 0x2118, 0x211d, C99 },
- { 0x2124, 0x2124, C99 },
- { 0x2126, 0x2126, C99 },
- { 0x2128, 0x2128, C99 },
- { 0x212a, 0x2131, C99 },
- { 0x2133, 0x2138, C99 },
- { 0x2160, 0x2182, C99 },
- { 0x3005, 0x3007, C99 },
- { 0x3021, 0x3029, C99 },
- { 0x3041, 0x3093, CXX|C99 }, /* Hiragana */
- { 0x3094, 0x3094, CXX },
- { 0x309b, 0x309c, CXX|C99 },
- { 0x309d, 0x309e, CXX },
- { 0x30a1, 0x30f6, CXX|C99 }, /* Katakana */
- { 0x30f7, 0x30fa, CXX },
- { 0x30fb, 0x30fc, CXX|C99 },
- { 0x30fd, 0x30fe, CXX },
- { 0x3105, 0x312c, CXX|C99 }, /* Bopomofo */
- { 0x4e00, 0x9fa5, CXX|C99 }, /* CJK Unified Ideographs */
- { 0xac00, 0xd7a3, C99 }, /* Hangul */
- { 0xf900, 0xfa2d, CXX }, /* CJK Unified Ideographs */
- { 0xfb1f, 0xfb36, CXX },
- { 0xfb38, 0xfb3c, CXX },
- { 0xfb3e, 0xfb3e, CXX },
- { 0xfb40, 0xfb44, CXX },
- { 0xfb46, 0xfbb1, CXX },
- { 0xfbd3, 0xfd3f, CXX },
- { 0xfd50, 0xfd8f, CXX },
- { 0xfd92, 0xfdc7, CXX },
- { 0xfdf0, 0xfdfb, CXX },
- { 0xfe70, 0xfe72, CXX },
- { 0xfe74, 0xfe74, CXX },
- { 0xfe76, 0xfefc, CXX },
- { 0xff21, 0xff3a, CXX },
- { 0xff41, 0xff5a, CXX },
- { 0xff66, 0xffbe, CXX },
- { 0xffc2, 0xffc7, CXX },
- { 0xffca, 0xffcf, CXX },
- { 0xffd2, 0xffd7, CXX },
- { 0xffda, 0xffdc, CXX },
-};
-
-#endif /* LIBCPP_UCNID_H */
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x00a9 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x00aa },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x00b4 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x00b5 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x00b6 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x00b7 },
+{ 0| 0| 0|CID|NFC| 0| 0, 0, 0x00b9 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x00ba },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x00bf },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x00d6 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x00d7 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x00f6 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x00f7 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0131 },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x0133 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x013e },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x0140 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0148 },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x0149 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x017e },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x017f },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x01c3 },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x01cc },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x01f0 },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x01f3 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x01f5 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x01f9 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0217 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x024f },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x02a8 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x02af },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x02b8 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x02ba },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x02bb },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x02bc },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x02c1 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x02cf },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x02d1 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x02df },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x02e4 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0379 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x037a },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0383 },
+{ 0| 0|CXX|CID|NFC| 0| 0, 0, 0x0384 },
+{ 0| 0| 0|CID|NFC| 0| 0, 0, 0x0385 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0386 },
+{ 0| 0| 0|CID| 0| 0| 0, 0, 0x0387 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x038a },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x038b },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x038c },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x038d },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x03a1 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x03a2 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x03ce },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x03cf },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x03d6 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x03d9 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x03da },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x03db },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x03dc },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x03dd },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x03de },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x03df },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x03e0 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x03e1 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x03ef },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x03f2 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x03f3 },
+{ 0| 0| 0|CID|NFC| 0| 0, 0, 0x0400 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x040c },
+{ 0| 0|CXX|CID|NFC|NKC| 0, 0, 0x040d },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x040e },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x044f },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0450 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x045c },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x045d },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0481 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x048f },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x04c4 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x04c6 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x04c8 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x04ca },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x04cc },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x04cf },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x04eb },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x04ed },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x04f5 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x04f7 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x04f9 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0530 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0556 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0558 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0559 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0560 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0586 },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x0587 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x05af },
+{ C99| 0| 0|CID|NFC|NKC| 0, 10, 0x05b0 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 11, 0x05b1 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 12, 0x05b2 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 13, 0x05b3 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 14, 0x05b4 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 15, 0x05b5 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 16, 0x05b6 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 17, 0x05b7 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 18, 0x05b8 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 19, 0x05b9 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x05ba },
+{ C99| 0| 0|CID|NFC|NKC| 0, 20, 0x05bb },
+{ C99| 0| 0|CID|NFC|NKC| 0, 21, 0x05bc },
+{ C99| 0| 0|CID|NFC|NKC| 0, 22, 0x05bd },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x05be },
+{ C99| 0| 0|CID|NFC|NKC| 0, 23, 0x05bf },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x05c0 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 24, 0x05c1 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 25, 0x05c2 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x05cf },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x05ea },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x05ef },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x05f2 },
+{ 0| 0|CXX|CID|NFC|NKC| 0, 0, 0x05f4 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0620 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x063a },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x063f },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x064a },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 27, 0x064b },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 28, 0x064c },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 29, 0x064d },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 30, 0x064e },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 31, 0x064f },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 32, 0x0650 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 33, 0x0651 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 34, 0x0652 },
+{ 0| 0| 0|CID|NFC|NKC|CTX, 0, 0x065f },
+{ C99|DIG| 0|CID|NFC|NKC| 0, 0, 0x0669 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x066f },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0674 },
+{ C99| 0|CXX|CID|NFC| 0| 0, 0, 0x0678 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x06b7 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x06b9 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x06be },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x06bf },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x06ce },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x06cf },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x06d5 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06d6 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06d7 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06d8 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06d9 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06da },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06db },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06dc },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x06e4 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x06e6 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 230, 0x06e7 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06e8 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x06e9 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 220, 0x06ea },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06eb },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x06ec },
+{ C99| 0| 0|CID|NFC|NKC| 0, 220, 0x06ed },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x06ef },
+{ C99|DIG| 0|CID|NFC|NKC| 0, 0, 0x06f9 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0900 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0903 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0904 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0939 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x093c },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x094c },
+{ C99| 0| 0|CID|NFC|NKC| 0, 9, 0x094d },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x094f },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0950 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x0951 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 220, 0x0952 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0957 },
+{ C99| 0|CXX|CID| 0| 0| 0, 0, 0x095f },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0962 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0963 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0965 },
+{ C99|DIG| 0|CID|NFC|NKC| 0, 0, 0x096f },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0980 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0983 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0984 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x098c },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x098e },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x0990 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0992 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x09a8 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x09a9 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x09b0 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x09b1 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x09b2 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x09b5 },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x09b9 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x09bd },
+{ C99| 0| 0|CID|NFC|NKC|CTX, 0, 0x09be },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x09c4 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x09c6 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x09c8 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x09ca },
+{ C99| 0| 0| 0|NFC|NKC| 0, 0, 0x09cb },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x09cc },
+{ C99| 0| 0|CID|NFC|NKC| 0, 9, 0x09cd },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x09db },
+{ C99| 0|CXX|CID| 0| 0| 0, 0, 0x09dd },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x09de },
+{ C99| 0|CXX|CID| 0| 0| 0, 0, 0x09df },
+{ C99| 0|CXX|CID|NFC|NKC| 0, 0, 0x09e1 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x09e3 },
+{ 0| 0| 0|CID|NFC|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+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x0f5c },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0f68 },
+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x0f69 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0f70 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 129, 0x0f71 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 130, 0x0f72 },
+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x0f73 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 132, 0x0f74 },
+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x0f76 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x0f77 },
+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x0f78 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x0f79 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 130, 0x0f7a },
+{ C99| 0| 0|CID|NFC|NKC| 0, 130, 0x0f7b },
+{ C99| 0| 0|CID|NFC|NKC| 0, 130, 0x0f7c },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0f7f },
+{ C99| 0| 0|CID|NFC|NKC| 0, 130, 0x0f80 },
+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x0f81 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x0f82 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x0f83 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 9, 0x0f84 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0f85 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 230, 0x0f86 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0f8b },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x0f8f },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x0f92 },
+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x0f93 },
+{ C99| 0| 0|CID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 0| 0| 0|CID|NFC| 0| 0, 0, 0x2106 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x2107 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x2109 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x2113 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x2114 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x2115 },
+{ 0| 0| 0|CID|NFC| 0| 0, 0, 0x2117 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x2118 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x211d },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x2123 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x2124 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x2125 },
+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x2126 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x2127 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x2128 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x2129 },
+{ C99| 0| 0|CID| 0| 0| 0, 0, 0x212a },
+{ C99| 0| 0| 0| 0| 0| 0, 0, 0x212b },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x212d },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x212e },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x2131 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x2132 },
+{ C99| 0| 0|CID|NFC| 0| 0, 0, 0x2138 },
+{ 0| 0| 0|CID|NFC| 0| 0, 0, 0x215f },
+{ C99|DIG| 0|CID|NFC| 0| 0, 0, 0x217f },
+{ C99|DIG| 0|CID|NFC|NKC| 0, 0, 0x2182 },
+{ 0| 0| 0|CID|NFC|NKC| 0, 0, 0x3004 },
+{ C99| 0| 0|CID|NFC|NKC| 0, 0, 0x3006 },
+{ C99|DIG| 0|CID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git a/libcpp/ucnid.pl b/libcpp/ucnid.pl
index eb8bbcac627..fe24c67abdf 100644
--- a/libcpp/ucnid.pl
+++ b/libcpp/ucnid.pl
@@ -1,130 +1,2 @@
-#! /usr/bin/perl -w
-use strict;
-
-# Convert cppucnid.tab to cppucnid.h. We use two arrays of length
-# 65536 to represent the table, since this is nice and simple. The
-# first array holds the tags indicating which ranges are valid in
-# which contexts. The second array holds the language name associated
-# with each element.
-
-our(@tags, @names);
-@tags = ("") x 65536;
-@names = ("") x 65536;
-
-
-# Array mapping tag numbers to standard #defines
-our @stds;
-
-# Current standard and language
-our($curstd, $curlang);
-
-# First block of the file is a template to be saved for later.
-our @template;
-
-while (<>) {
- chomp;
- last if $_ eq '%%';
- push @template, $_;
-};
-
-# Second block of the file is the UCN tables.
-# The format looks like this:
-#
-# [std]
-#
-# ; language
-# xxxx-xxxx xxxx xxxx-xxxx ....
-#
-# with comment lines starting with #.
-
-while (<>) {
- chomp;
- /^#/ and next;
- /^\s*$/ and next;
- /^\[(.+)\]$/ and do {
- $curstd = $1;
- next;
- };
- /^; (.+)$/ and do {
- $curlang = $1;
- next;
- };
-
- process_range(split);
-}
-
-# Print out the template, inserting as requested.
-$\ = "\n";
-for (@template) {
- print("/* Automatically generated from cppucnid.tab, do not edit */"),
- next if $_ eq "[dne]";
- print_table(), next if $_ eq "[table]";
- print;
-}
-
-sub print_table {
- my($lo, $hi);
- my $prevname = "";
-
- for ($lo = 0; $lo <= $#tags; $lo = $hi) {
- $hi = $lo;
- $hi++ while $hi <= $#tags
- && $tags[$hi] eq $tags[$lo]
- && $names[$hi] eq $names[$lo];
-
- # Range from $lo to $hi-1.
- # Don't make entries for ranges that are not valid idchars.
- next if ($tags[$lo] eq "");
- my $tag = $tags[$lo];
- $tag = " ".$tag if $tag =~ /^C99/;
-
- if ($names[$lo] eq $prevname) {
- printf(" { 0x%04x, 0x%04x, %-11s },\n",
- $lo, $hi-1, $tag);
- } else {
- printf(" { 0x%04x, 0x%04x, %-11s }, /* %s */\n",
- $lo, $hi-1, $tag, $names[$lo]);
- }
- $prevname = $names[$lo];
- }
-}
-
-# The line is a list of four-digit hexadecimal numbers or
-# pairs of such numbers. Each is a valid identifier character
-# from the given language, under the given standard.
-sub process_range {
- for my $range (@_) {
- if ($range =~ /^[0-9a-f]{4}$/) {
- my $i = hex($range);
- if ($tags[$i] eq "") {
- $tags[$i] = $curstd;
- } else {
- $tags[$i] = $curstd . "|" . $tags[$i];
- }
- if ($names[$i] ne "" && $names[$i] ne $curlang) {
- warn sprintf ("language overlap: %s/%s at %x (tag %d)",
- $names[$i], $curlang, $i, $tags[$i]);
- next;
- }
- $names[$i] = $curlang;
- } elsif ($range =~ /^ ([0-9a-f]{4}) - ([0-9a-f]{4}) $/x) {
- my ($start, $end) = (hex($1), hex($2));
- my $i;
- for ($i = $start; $i <= $end; $i++) {
- if ($tags[$i] eq "") {
- $tags[$i] = $curstd;
- } else {
- $tags[$i] = $curstd . "|" . $tags[$i];
- }
- if ($names[$i] ne "" && $names[$i] ne $curlang) {
- warn sprintf ("language overlap: %s/%s at %x (tag %d)",
- $names[$i], $curlang, $i, $tags[$i]);
- next;
- }
- $names[$i] = $curlang;
- }
- } else {
- warn "malformed range expression $range";
- }
- }
-}
+/* APPLE LOCAL mainline UCNs 2005-04-17 3892809 */
+/* entire file deleted */
diff --git a/libcpp/ucnid.tab b/libcpp/ucnid.tab
index 7cb16e1e5a4..b710ed710e8 100644
--- a/libcpp/ucnid.tab
+++ b/libcpp/ucnid.tab
@@ -1,47 +1,26 @@
-/* Table of UCNs which are valid in identifiers.
- Copyright (C) 2003 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-[dne]
-
-/* This file reproduces the table in ISO/IEC 9899:1999 (C99) Annex
- D, which is itself a reproduction from ISO/IEC TR 10176:1998, and
- the similar table from ISO/IEC 14882:1988 (C++98) Annex E, which is
- a reproduction of ISO/IEC PDTR 10176. Unfortunately these tables
- are not identical. */
-
-#ifndef LIBCPP_UCNID_H
-#define LIBCPP_UCNID_H
-
-#define C99 1
-#define CXX 2
-#define DIG 4
-
-struct ucnrange
-{
- unsigned short lo, hi;
- unsigned short flags;
-};
-
-static const struct ucnrange ucnranges[] = {
-[table]
-};
-
-#endif /* LIBCPP_UCNID_H */
-%%
+/* APPLE LOCAL file mainline UCNs 2005-04-17 3892809 */
+; Table of UCNs which are valid in identifiers.
+; Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+;
+; This program is free software; you can redistribute it and/or modify it
+; under the terms of the GNU General Public License as published by the
+; Free Software Foundation; either version 2, or (at your option) any
+; later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program; if not, write to the Free Software
+; Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+;
+; This file reproduces the table in ISO/IEC 9899:1999 (C99) Annex
+; D, which is itself a reproduction from ISO/IEC TR 10176:1998, and
+; the similar table from ISO/IEC 14882:1988 (C++98) Annex E, which is
+; a reproduction of ISO/IEC PDTR 10176. Unfortunately these tables
+; are not identical.
[C99]
@@ -141,7 +120,6 @@ ac00-d7a3
0b3d 1fbe 203f-2040 2102 2107 210a-2113 2115 2118-211d 2124 2126 2128
212a-2131 2133-2138 2160-2182 3005-3007 3021-3029
-[C99|DIG]
; Digits
0660-0669 06f0-06f9 0966-096f 09e6-09ef 0a66-0a6f 0ae6-0aef 0b66-0b6f
0be7-0bef 0c66-0c6f 0ce6-0cef 0d66-0d6f 0e50-0e59 0ed0-0ed9 0f20-0f33
@@ -201,16 +179,12 @@ ac00-d7a3
; Malayalam
0d05-0d0c 0d0e-0d10 0d12-0d28 0d2a-0d39 0d60-0d61
-# CORRECTION: Exclude 0e50-0e59 from the Thai range and make a fake
-# Digits range for it, to match C99. cppcharset.c knows that C++
-# doesn't distinguish digits from other UCNs valid in identifiers.
; Thai
-0e01-0e30 0e32-0e33 0e40-0e46 0e4f-0e49 0e5a-0e5b
+0e01-0e30 0e32-0e33 0e40-0e46 0e4f-0e5b
; Digits
0e50-0e59
-# CORRECTION: Change 0e0d to 0e8d (typo in standard; see C++ DR 131)
; Lao
0e81-0e82 0e84 0e87-0e88 0e8a 0e8d 0e94-0e97 0e99-0e9f 0ea1-0ea3 0ea5
0ea7 0eaa-0eab 0ead-0eb0 0eb2 0eb3 0ebd 0ec0-0ec4 0ec6
@@ -224,7 +198,6 @@ ac00-d7a3
; Katakana
30a1-30fe
-# CORRECTION: language spelled "Bopmofo" in C++98.
; Bopomofo
3105-312c