X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=types.c;h=0f252455d761a16ffc2a090eb62fd40858e74909;hb=4f2e72b82ad87a0cd9e9d808f77557da7e0ce55f;hp=0842ba2781cd9d04b5f8499e49352398b326f037;hpb=e1487550e8addd019fea3810b59aaa57a26c0471;p=cparser diff --git a/types.c b/types.c index 0842ba2..0f25245 100644 --- a/types.c +++ b/types.c @@ -1,6 +1,6 @@ /* * This file is part of cparser. - * Copyright (C) 2007-2008 Matthias Braun + * Copyright (C) 2007-2009 Matthias Braun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -48,6 +48,7 @@ type_t *type_const_char_ptr; type_t *type_int_ptr; type_t *type_long_long_ptr; type_t *type_long_ptr; +type_t *type_unsigned_long_ptr; type_t *type_short_ptr; type_t *type_signed_char_ptr; type_t *type_void_ptr; @@ -70,6 +71,8 @@ type_t *type_ssize_t_ptr; type_t *type_wchar_t_ptr; type_t *type_const_wchar_t_ptr; +type_t *type_valist; + /* microsoft types */ atomic_type_kind_t int8_type_kind = ATOMIC_TYPE_INVALID; atomic_type_kind_t int16_type_kind = ATOMIC_TYPE_INVALID; @@ -90,12 +93,12 @@ type_t *type_unsigned_int8; type_t *type_unsigned_int16; type_t *type_unsigned_int32; type_t *type_unsigned_int64; +type_t *type_int64_ptr; void init_basic_types(void) { - static const type_base_t error = { TYPE_ERROR, 0, TYPE_QUALIFIER_NONE, - TYPE_MODIFIER_NONE, 0, NULL }; + static const type_base_t error = { TYPE_ERROR, TYPE_QUALIFIER_NONE, NULL }; type_error_type = (type_t*)&error; type_bool = make_atomic_type(ATOMIC_TYPE_BOOL, TYPE_QUALIFIER_NONE); @@ -133,6 +136,9 @@ void init_basic_types(void) type_unsigned_int32 = make_atomic_type(unsigned_int32_type_kind, TYPE_QUALIFIER_NONE); unsigned_int64_type_kind = find_unsigned_int_atomic_type_kind_for_size(8); type_unsigned_int64 = make_atomic_type(unsigned_int64_type_kind, TYPE_QUALIFIER_NONE); + + /* pointer types */ + type_int64_ptr = make_pointer_type(type_int64, TYPE_QUALIFIER_NONE); } /* pointer types */ @@ -142,6 +148,7 @@ void init_basic_types(void) type_short_ptr = make_pointer_type(type_short, TYPE_QUALIFIER_NONE); type_int_ptr = make_pointer_type(type_int, TYPE_QUALIFIER_NONE); type_long_ptr = make_pointer_type(type_long, TYPE_QUALIFIER_NONE); + type_unsigned_long_ptr = make_pointer_type(type_unsigned_long, TYPE_QUALIFIER_NONE); type_long_long_ptr = make_pointer_type(type_long_long, TYPE_QUALIFIER_NONE); type_char_ptr_ptr = make_pointer_type(type_char_ptr, TYPE_QUALIFIER_NONE);