aboutsummaryrefslogtreecommitdiff
path: root/gcc/gengtype.h
diff options
context:
space:
mode:
authorBasile Starynkevitch <basile@starynkevitch.net>2010-09-24 17:37:16 +0000
committerBasile Starynkevitch <basile@starynkevitch.net>2010-09-24 17:37:16 +0000
commitc3d8f282b2ae6a9889b9afc4488cb4713692b460 (patch)
treeb69215f34e3bb2c29a5ec4bfc4727dfce15fafb1 /gcc/gengtype.h
parent726a7485c137b276ca49c7a7c410dd3028702f7a (diff)
2010-09-24 Basile Starynkevitch <basile@starynkevitch.net>
* gcc/gengtype.c: Reindented. * gcc/gengtype.h: Reindented. * gcc/gengtype-parse.c: Reindented. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@164604 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gengtype.h')
-rw-r--r--gcc/gengtype.h111
1 files changed, 59 insertions, 52 deletions
diff --git a/gcc/gengtype.h b/gcc/gengtype.h
index 75e4e2d5c43..304d3b17ae4 100644
--- a/gcc/gengtype.h
+++ b/gcc/gengtype.h
@@ -1,28 +1,29 @@
/* Process source files and output type information.
Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
-This file is part of GCC.
+ This file is part of GCC.
-GCC 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 3, or (at your option) any later
-version.
+ GCC 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 3, or (at your option) any later
+ version.
-GCC 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.
+ GCC 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 GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
#ifndef GCC_GENGTYPE_H
#define GCC_GENGTYPE_H
/* A file position, mostly for error messages.
The FILE element may be compared using pointer equality. */
-struct fileloc {
+struct fileloc
+{
const char *file;
int line;
};
@@ -39,10 +40,12 @@ extern struct fileloc lexer_line;
/* Print an error message. */
extern void error_at_line
- (const struct fileloc *pos, const char *msg, ...) ATTRIBUTE_PRINTF_2;
+(const struct fileloc *pos, const char *msg, ...) ATTRIBUTE_PRINTF_2;
/* Like asprintf, but calls fatal() on out of memory. */
-extern char *xasprintf(const char *, ...) ATTRIBUTE_PRINTF_1;
+extern char *
+xasprintf (const char *, ...)
+ ATTRIBUTE_PRINTF_1;
/* Constructor routines for types. */
extern void do_typedef (const char *s, type_p t, struct fileloc *pos);
@@ -55,11 +58,14 @@ extern type_p find_structure (const char *s, int isunion);
extern type_p create_scalar_type (const char *name);
extern type_p create_pointer (type_p t);
extern type_p create_array (type_p t, const char *len);
-extern options_p create_option (options_p, const char *name, const void *info);
+extern options_p create_option (options_p, const char *name,
+ const void *info);
extern options_p create_nested_ptr_option (options_p, type_p t,
- const char *from, const char *to);
-extern pair_p create_field_at (pair_p next, type_p type, const char *name,
- options_p opt, struct fileloc *pos);
+ const char *from,
+ const char *to);
+extern pair_p create_field_at (pair_p next, type_p type,
+ const char *name, options_p opt,
+ struct fileloc *pos);
extern pair_p nreverse_pairs (pair_p list);
extern type_p adjust_field_type (type_p, options_p);
extern void note_variable (const char *s, type_p t, options_p o,
@@ -77,37 +83,38 @@ extern void parse_file (const char *name);
extern bool hit_error;
/* Token codes. */
-enum {
- EOF_TOKEN = 0,
-
- /* Per standard convention, codes in the range (0, UCHAR_MAX]
- represent single characters with those character codes. */
-
- CHAR_TOKEN_OFFSET = UCHAR_MAX + 1,
- GTY_TOKEN = CHAR_TOKEN_OFFSET,
- TYPEDEF,
- EXTERN,
- STATIC,
- UNION,
- STRUCT,
- ENUM,
- VEC_TOKEN,
- DEFVEC_OP,
- DEFVEC_I,
- DEFVEC_ALLOC,
- ELLIPSIS,
- PTR_ALIAS,
- NESTED_PTR,
- PARAM_IS,
- NUM,
- SCALAR,
- ID,
- STRING,
- CHAR,
- ARRAY,
-
- /* print_token assumes that any token >= FIRST_TOKEN_WITH_VALUE may have
- a meaningful value to be printed. */
- FIRST_TOKEN_WITH_VALUE = PARAM_IS
-};
+enum
+ {
+ EOF_TOKEN = 0,
+
+ /* Per standard convention, codes in the range (0, UCHAR_MAX]
+ represent single characters with those character codes. */
+
+ CHAR_TOKEN_OFFSET = UCHAR_MAX + 1,
+ GTY_TOKEN = CHAR_TOKEN_OFFSET,
+ TYPEDEF,
+ EXTERN,
+ STATIC,
+ UNION,
+ STRUCT,
+ ENUM,
+ VEC_TOKEN,
+ DEFVEC_OP,
+ DEFVEC_I,
+ DEFVEC_ALLOC,
+ ELLIPSIS,
+ PTR_ALIAS,
+ NESTED_PTR,
+ PARAM_IS,
+ NUM,
+ SCALAR,
+ ID,
+ STRING,
+ CHAR,
+ ARRAY,
+
+ /* print_token assumes that any token >= FIRST_TOKEN_WITH_VALUE may have
+ a meaningful value to be printed. */
+ FIRST_TOKEN_WITH_VALUE = PARAM_IS
+ };
#endif