X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fident%2Fident_t.h;h=2fbf2d65ae15defcd81343376adc03d01c36a8ca;hb=e70c22e8aa4cc93e7d72f58453c03cb9bd797e31;hp=34685d2be1cdf7363eab33a07326480826bdc6be;hpb=3c21ababf2b5985dbe433fda07855fc331456987;p=libfirm diff --git a/ir/ident/ident_t.h b/ir/ident/ident_t.h index 34685d2be..2fbf2d65a 100644 --- a/ir/ident/ident_t.h +++ b/ir/ident/ident_t.h @@ -1,30 +1,40 @@ -/* Declarations for ident. - Copyright (C) 1995, 1996 Markus Armbruster */ - -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. -** -** Authors: Martin Trapp, Christian Schaefer -*/ - -/* $Id$ */ +/* + * Project: libFIRM + * File name: ir/common/ident_t.h + * Purpose: Hash table to store names -- private header. + * Author: Goetz Lindenmaier + * Modified by: + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1999-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ # ifndef _IDENT_T_H_ # define _IDENT_T_H_ # include "ident.h" -# include "xprintf.h" -# include "xp_help.h" - -void id_init (void); -int ident_print (XP_PAR1, const xprintf_info *, XP_PARN); - -/* @@@ tune */ -#define ID_HASH(str, len) \ - ((( ((unsigned char *)(str))[0] * 33 \ - + ((unsigned char *)(str))[(len)>>1]) * 31 \ - + ((unsigned char *)(str))[(len)-1]) * 9 \ +/** + * Initialize the ident module. + * + * @param id_if The ident module interface, if NULL, the default + * libFirm ident module will be used. + * @param initial_n_idents Only used in the default libFirm ident module, initial + * number of entries in the hash table. + */ +void init_ident (ident_if_t *id_if, int initial_n_idents); + +/** + * Finishes the ident module, frees all entries. + */ +void finish_ident (void); + +/** The hash function of the internal ident module implementation. */ +#define ID_HASH(type, str, len) \ + ((( ((type *)(str))[0] * 33 \ + + ((type *)(str))[(len)>>1]) * 31 \ + + ((type *)(str))[(len)-1]) * 9 \ + (len)) # endif /* _IDENT_T_H_ */