3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
5 M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
6 P. Tomsich, J. Wenninger
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 Contact: cacao@complang.tuwien.ac.at
27 Authors: Reinhard Grafl
29 $Id: tables.h 754 2003-12-13 22:23:01Z twisti $
38 #include "global.h" /* for unicode. -- phil */
40 #define CLASS(name) (unicode_getclasslink(unicode_new_char(name)))
42 /* to determine the end of utf strings */
43 #define utf_end(utf) ((char *) utf->text+utf->blength)
45 /* function for disposing javastrings */
46 typedef void (*stringdeleter) (java_objectheader *string);
48 /* creates hashtables for symboltables */
51 /* free memory for hashtables */
52 void tables_close(stringdeleter del);
54 /* check if an UTF-8 string is valid */
55 bool is_valid_utf(char *utf_ptr, char *end_pos);
57 /* write utf symbol to file/buffer */
58 void utf_sprint(char *buffer, utf *u);
59 void utf_fprint(FILE *file, utf *u);
60 void utf_display(utf *u);
62 /* write utf symbol to logfile/stdout */
64 void log_plain_utf(utf *u);
66 /* create new utf-symbol */
67 utf *utf_new(char *text, u2 length);
68 utf *utf_new_char(char *text);
69 utf *utf_new_char_classname(char *text);
74 /* get next unicode character of a utf-string */
75 u2 utf_nextu2(char **utf);
77 /* get number of unicode characters of a utf string */
78 u4 utf_strlen(utf *u);
80 /* search for class and create it if not found */
81 classinfo *class_new(utf *u);
83 /* return an array class with the given component class */
84 classinfo *class_array_of(classinfo *component);
86 /* return an array class with the given dimension and element class */
87 classinfo *class_multiarray_of(int dim, classinfo *element);
89 /* get javatype according to a typedescriptor */
90 u2 desc_to_type(utf *descriptor);
92 /* get length of a datatype */
93 u2 desc_typesize(utf *descriptor);
95 /* determine hashkey of a unicode-symbol */
96 u4 unicode_hashkey(u2 *text, u2 length);
98 /* create hashtable */
99 void init_hashtable(hashtable *hash, u4 size);
101 /* search for class in classtable */
102 classinfo *class_get(utf *u);
104 #endif /* _TABLES_H */
108 * These are local overrides for various environment variables in Emacs.
109 * Please do not remove this and leave it at the end of the file, where
110 * Emacs will automagically detect them.
111 * ---------------------------------------------------------------------
114 * indent-tabs-mode: t