]>
gcc.gnu.org Git - gcc.git/blob - gcc/pcp.h
1 /* pcp.h -- Describes the format of a precompiled file
2 Copyright (C) 1990 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
23 /* Structure allocated for every string in a precompiled file */
24 typedef struct stringdef STRINGDEF
;
27 U_CHAR
*contents
; /* String to include */
28 int len
; /* Its length */
29 int writeflag
; /* Whether we write this */
30 int lineno
; /* Linenumber of source file */
31 U_CHAR
*filename
; /* Name of source file */
32 STRINGDEF
*chain
; /* Global list of strings in natural order */
33 int output_mark
; /* Where in the output this goes */
36 typedef struct keydef KEYDEF
;
44 /* A precompiled file starts with a series of #define and #undef
46 #define MAC DEF --- Indicates MAC must be defined with defn DEF
47 #define MAC --- Indicates MAC must be defined with any defn
48 #undef MAC --- Indicates MAC cannot be defined
50 These preconditions must be true for a precompiled file to be used.
51 The preconditions section is null terminated. */
53 /* Then, there is a four byte number (in network byte order) which */
54 /* indicates the number of strings the file contains. */
56 /* Each string contains a STRINGDEF structure. The only component of */
57 /* the STRINGDEF structure which is used is the lineno field, which */
58 /* should hold the line number in the original header file. */
59 /* Then follows the string, followed by a null. Then comes a four */
60 /* byte number (again, in network byte order) indicating the number */
61 /* of keys for this string. Each key is a KEYDEF structure, with */
62 /* irrelevant contents, followed by the null-terminated string. */
64 /* If the number of keys is 0, then there are no keys for the string, */
65 /* in other words, the string will never be included. If the number */
66 /* of keys is -1, this is a special flag indicating there are no keys */
67 /* in the file, and the string is mandatory (that is, it must be */
68 /* included regardless in the included output). */
70 /* A file, then, looks like this:
This page took 0.039982 seconds and 5 git commands to generate.