Commit dc65cd60 by Kazu Hirata Committed by Kazu Hirata

* cppfiles.c: Fix formatting.

From-SVN: r59245
parent f3226a90
2002-11-19 Kazu Hirata <kazu@cs.umass.edu>
* cppfiles.c: Fix formatting.
2002-11-19 Jason Thorpe <thorpej@wasabisystems.com> 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
* gcc.c (The Specs Language): Document spec functions. * gcc.c (The Specs Language): Document spec functions.
......
...@@ -77,8 +77,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -77,8 +77,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef strcmp #undef strcmp
/* This structure is used for the table of all includes. */ /* This structure is used for the table of all includes. */
struct include_file struct include_file {
{
const char *name; /* actual path name of file */ const char *name; /* actual path name of file */
const cpp_hashnode *cmacro; /* macro, if any, preventing reinclusion. */ const cpp_hashnode *cmacro; /* macro, if any, preventing reinclusion. */
const struct search_path *foundhere; const struct search_path *foundhere;
...@@ -106,7 +105,7 @@ struct include_file ...@@ -106,7 +105,7 @@ struct include_file
included again. If it's NEVER_REREAD, the file is never to be included again. If it's NEVER_REREAD, the file is never to be
included again. Otherwise it is a macro hashnode, and the file is included again. Otherwise it is a macro hashnode, and the file is
to be included again if the macro is defined. */ to be included again if the macro is defined. */
#define NEVER_REREAD ((const cpp_hashnode *)-1) #define NEVER_REREAD ((const cpp_hashnode *) -1)
#define DO_NOT_REREAD(inc) \ #define DO_NOT_REREAD(inc) \
((inc)->cmacro && ((inc)->cmacro == NEVER_REREAD \ ((inc)->cmacro && ((inc)->cmacro == NEVER_REREAD \
|| (inc)->cmacro->type == NT_MACRO)) || (inc)->cmacro->type == NT_MACRO))
...@@ -168,7 +167,7 @@ static void ...@@ -168,7 +167,7 @@ static void
destroy_node (v) destroy_node (v)
splay_tree_value v; splay_tree_value v;
{ {
struct include_file *f = (struct include_file *)v; struct include_file *f = (struct include_file *) v;
if (f) if (f)
{ {
...@@ -416,7 +415,7 @@ read_include_file (pfile, inc) ...@@ -416,7 +415,7 @@ read_include_file (pfile, inc)
if (SHOULD_MMAP (size, pagesize)) if (SHOULD_MMAP (size, pagesize))
{ {
buf = (uchar *) mmap (0, size, PROT_READ, MAP_PRIVATE, inc->fd, 0); buf = (uchar *) mmap (0, size, PROT_READ, MAP_PRIVATE, inc->fd, 0);
if (buf == (uchar *)-1) if (buf == (uchar *) -1)
goto perror_fail; goto perror_fail;
inc->mapped = 1; inc->mapped = 1;
} }
...@@ -642,7 +641,7 @@ report_missing_guard (n, b) ...@@ -642,7 +641,7 @@ report_missing_guard (n, b)
void *b; void *b;
{ {
struct include_file *f = (struct include_file *) n->value; struct include_file *f = (struct include_file *) n->value;
int *bannerp = (int *)b; int *bannerp = (int *) b;
if (f && f->cmacro == 0 && f->include_count == 1) if (f && f->cmacro == 0 && f->include_count == 1)
{ {
...@@ -668,7 +667,7 @@ handle_missing_header (pfile, fname, angle_brackets) ...@@ -668,7 +667,7 @@ handle_missing_header (pfile, fname, angle_brackets)
{ {
bool print_dep bool print_dep
= CPP_OPTION (pfile, deps.style) > (angle_brackets || pfile->map->sysp); = CPP_OPTION (pfile, deps.style) > (angle_brackets || pfile->map->sysp);
if (CPP_OPTION (pfile, deps.missing_files) && print_dep) if (CPP_OPTION (pfile, deps.missing_files) && print_dep)
deps_add_dep (pfile->deps, fname); deps_add_dep (pfile->deps, fname);
/* If -M was specified, then don't count this as an error, because /* If -M was specified, then don't count this as an error, because
...@@ -830,8 +829,7 @@ search_from (pfile, type) ...@@ -830,8 +829,7 @@ search_from (pfile, type)
such as DOS. The format of the file name map file is just a series such as DOS. The format of the file name map file is just a series
of lines with two tokens on each line. The first token is the name of lines with two tokens on each line. The first token is the name
to map, and the second token is the actual name to use. */ to map, and the second token is the actual name to use. */
struct file_name_map struct file_name_map {
{
struct file_name_map *map_next; struct file_name_map *map_next;
char *map_from; char *map_from;
char *map_to; char *map_to;
...@@ -851,10 +849,10 @@ read_filename_string (ch, f) ...@@ -851,10 +849,10 @@ read_filename_string (ch, f)
len = 20; len = 20;
set = alloc = xmalloc (len + 1); set = alloc = xmalloc (len + 1);
if (! is_space(ch)) if (! is_space (ch))
{ {
*set++ = ch; *set++ = ch;
while ((ch = getc (f)) != EOF && ! is_space(ch)) while ((ch = getc (f)) != EOF && ! is_space (ch))
{ {
if (set - alloc == len) if (set - alloc == len)
{ {
...@@ -871,8 +869,7 @@ read_filename_string (ch, f) ...@@ -871,8 +869,7 @@ read_filename_string (ch, f)
} }
/* This structure holds a linked list of file name maps, one per directory. */ /* This structure holds a linked list of file name maps, one per directory. */
struct file_name_map_list struct file_name_map_list {
{
struct file_name_map_list *map_list_next; struct file_name_map_list *map_list_next;
char *map_list_name; char *map_list_name;
struct file_name_map *map_list_map; struct file_name_map *map_list_map;
...@@ -918,10 +915,10 @@ read_name_map (pfile, dirname) ...@@ -918,10 +915,10 @@ read_name_map (pfile, dirname)
char *from, *to; char *from, *to;
struct file_name_map *ptr; struct file_name_map *ptr;
if (is_space(ch)) if (is_space (ch))
continue; continue;
from = read_filename_string (ch, f); from = read_filename_string (ch, f);
while ((ch = getc (f)) != EOF && is_hspace(ch)) while ((ch = getc (f)) != EOF && is_hspace (ch))
; ;
to = read_filename_string (ch, f); to = read_filename_string (ch, f);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment