gengtype.h: Remove all type definitions to gengtype.c...
commit065ae6117579cc9a089c238207b42f5a1470423a
authorZack Weinberg <zackw@panix.com>
Mon, 26 Mar 2007 21:04:59 +0000 (26 21:04 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Mon, 26 Mar 2007 21:04:59 +0000 (26 21:04 +0000)
tree0a7175b4448ec3facb884c40c5169621bbe9bbe8
parent17defa6a13ef4f317e22dcb3827b4e8ea1b37541
gengtype.h: Remove all type definitions to gengtype.c...

* gengtype.h: Remove all type definitions to gengtype.c; leave
only definitions of options_p, type_p, and pair_p as opaque
pointers.  Update prototypes.
* gengtype.c: Many type definitions moved here from gengtype.h.
Consolidate type definitions at the top of the file.
(xvasprintf): Delete.
(xasprintf): Make static.
(create_nested_pointer_option): Add 'next' parameter.
(create_field_all, create_field_at): New functions.
(create_field): Now a thin wrapper around create_field_all.
(create_optional_field): Rename create_optional_field_ and add
line argument.  Original name is now a macro which supplies
__LINE__.
(oprintf): Use vsnprintf directly.
(close_output_files): Use fatal rather than perror/exit.
(note_def_vec, note_def_vec_alloc): Use create_field_at.
(main): Set progname.  Don't use exit.
* gengtype-yacc.y (struct_fields): Use create_field_at.
(option, optionseqopt): Delete.
(optionseq): Consolidate productions from option here so we
can use the first argument to create_option.

From-SVN: r123233
gcc/ChangeLog
gcc/gengtype-yacc.y
gcc/gengtype.c
gcc/gengtype.h