8sa1-gcc/gcc/pcp.h
Kaveh R. Ghazi 4b79993fd5 cccp.c (progname, [...]): Constify a char*.
* cccp.c (progname, file_buf, default_include, include_file,
        macrodef, definition, hashval, wchar_type, user_label_prefix,
        directive, out_fname, if_stack, safe_write, index0, get_lintcmd,
        expand_to_temp_buffer, is_system_include, base_name,
        absolute_filename, read_name_map, open_include_file,
        record_control_macro, check_precompiled, check_preconditions,
        pcfinclude, pass_thru_directive, create_definition,
        check_macro_name, comp_def_part, collect_expansion,
        check_assertion, read_token_list, assertion_install,
        assertion_lookup, eval_if_expression, conditional_skip,
        validate_else, skip_quoted_string, quote_string, macarg1,
        error_from_errno, install, lookup, hashf, dump_defn_1,
        perror_with_name, pfatal_with_name, main, trigraph_pcp,
        check_white_space, rescan, handle_directive, monthnames,
        special_symbol, do_include, remap_include_file, write_output,
        arglist, do_assert, do_unassert, do_line, do_error, do_once,
        do_ident, do_sccs, do_xifdef, skip_if_group,
        output_line_directive, macroexpand, macarg, change_newlines,
        initialize_builtins, make_definition): Constify a char*.

        * pcp.h (stringdef): Likewise.

From-SVN: r30150
1999-10-25 00:33:56 +00:00

102 lines
3.1 KiB
C

/* pcp.h -- Describes the format of a precompiled file
Copyright (C) 1990 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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.
GNU CC 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 GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Structure allocated for every string in a precompiled file */
typedef struct stringdef STRINGDEF;
struct stringdef
{
U_CHAR *contents; /* String to include */
int len; /* Its length */
int writeflag; /* Whether we write this */
int lineno; /* Linenumber of source file */
const U_CHAR *filename; /* Name of source file */
STRINGDEF *chain; /* Global list of strings in natural order */
int output_mark; /* Where in the output this goes */
};
typedef struct keydef KEYDEF;
struct keydef
{
STRINGDEF *str;
KEYDEF *chain;
};
/* Format: */
/* A precompiled file starts with a series of #define and #undef
statements:
#define MAC DEF --- Indicates MAC must be defined with defn DEF
#define MAC --- Indicates MAC must be defined with any defn
#undef MAC --- Indicates MAC cannot be defined
These preconditions must be true for a precompiled file to be used.
The preconditions section is null terminated. */
/* Then, there is a four byte number (in network byte order) which */
/* indicates the number of strings the file contains. */
/* Each string contains a STRINGDEF structure. The only component of */
/* the STRINGDEF structure which is used is the lineno field, which */
/* should hold the line number in the original header file. */
/* Then follows the string, followed by a null. Then comes a four */
/* byte number (again, in network byte order) indicating the number */
/* of keys for this string. Each key is a KEYDEF structure, with */
/* irrelevant contents, followed by the null-terminated string. */
/* If the number of keys is 0, then there are no keys for the string, */
/* in other words, the string will never be included. If the number */
/* of keys is -1, this is a special flag indicating there are no keys */
/* in the file, and the string is mandatory (that is, it must be */
/* included regardless in the included output). */
/* A file, then, looks like this:
Precondition 1
Precondition 2
.
.
.
<NUL>
Number of strings
STRINGDEF
String . . . <NUL>
Number of keys
KEYDEF
Key . . . <NUL>
KEYDEF
Key . . . <NUL>
.
.
.
STRINGDEF
String . . . <NUL>
Number of keys
KEYDEF
Key . . . <NUL>
.
.
.
.
.
.
*/