diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-28 09:40:22 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-28 09:40:22 +0000 |
commit | 1fdf6039a543331eeabe2198b36e89fd0a3bd06d (patch) | |
tree | 04de76def0a1a191465d81cb782799aeec34587f /gcc/cpphash.h | |
parent | 012dc873918b9c28244b2e353fba69870c3c8de4 (diff) | |
download | gcc-1fdf6039a543331eeabe2198b36e89fd0a3bd06d.tar.gz |
* cpphash.h (struct cpp_buff): Make unsigned.
(_cpp_get_buff): Take length of size_t.
(_cpp_unaligned_alloc): New.
(BUFF_ROOM, BUFF_FRONT, BUFF_LIMIT): New.
(struct cpp_reader): Remove ident_pool. Add u_buff.
* cppinit.c (cpp_create_reader): Initialize u_buff, not ident_pool.
(cpp_destroy): Destroy u_buff, not ident_pool.
* cpplex.c (parse_number, parse_string, save_comment,
cpp_token_as_text): Update to use the unaligned buffer.
(new_buff): Make unsigned.
(_cpp_unaligned_alloc): New.
* cpplib.c (glue_header_name): Update to use the unaligned buffer.
* cppmacro.c (new_number_token, builtin_macro, stringify_arg):
Similarly.
(collect_args): Make unsigned.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45858 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 5bb2ce5e681..874baf2e63b 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -77,14 +77,18 @@ typedef struct _cpp_buff _cpp_buff; struct _cpp_buff { struct _cpp_buff *next; - char *base, *cur, *limit; + unsigned char *base, *cur, *limit; }; -extern _cpp_buff *_cpp_get_buff PARAMS ((cpp_reader *, unsigned int)); +extern _cpp_buff *_cpp_get_buff PARAMS ((cpp_reader *, size_t)); extern void _cpp_release_buff PARAMS ((cpp_reader *, _cpp_buff *)); extern _cpp_buff *_cpp_extend_buff PARAMS ((cpp_reader *, _cpp_buff *, - unsigned int)); + size_t)); extern void _cpp_free_buff PARAMS ((_cpp_buff *)); +extern unsigned char *_cpp_unaligned_alloc PARAMS ((cpp_reader *, size_t)); +#define BUFF_ROOM(BUFF) ((BUFF)->limit - (BUFF)->cur) +#define BUFF_FRONT(BUFF) ((BUFF)->cur) +#define BUFF_LIMIT(BUFF) ((BUFF)->limit) /* List of directories to look for include files in. */ struct search_path @@ -267,12 +271,11 @@ struct cpp_reader unsigned int directive_line; /* Memory pools. */ - cpp_pool ident_pool; /* For all identifiers, and permanent - numbers and strings. */ cpp_pool macro_pool; /* For macro definitions. Permanent. */ /* Memory buffers. */ - _cpp_buff *free_buffs; + _cpp_buff *u_buff; /* Unaligned permanent storage. */ + _cpp_buff *free_buffs; /* Free buffer chain. */ /* Context stack. */ struct cpp_context base_context; |