X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fident%2Fident_t.h;h=5919fbc00bc9170bdf883da9969bf548b7abb451;hb=f6aeac6a547a52beb3cb663c5e63c05c9c3728ea;hp=2aa19470d49766bcae98f1e0cf07763e6db9638f;hpb=109b367e18cda22744a532c734ecfbf6220d6c2d;p=libfirm diff --git a/ir/ident/ident_t.h b/ir/ident/ident_t.h index 2aa19470d..5919fbc00 100644 --- a/ir/ident/ident_t.h +++ b/ir/ident/ident_t.h @@ -1,19 +1,32 @@ /* - * 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. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ -# ifndef _IDENT_T_H_ -# define _IDENT_T_H_ +/** + * @file + * @brief Hash table to store names -- private header. + * @author Goetz Lindenmaier + * @version $Id$ + */ +#ifndef FIRM_IDENT_IDENT_T_H +#define FIRM_IDENT_IDENT_T_H -# include "ident.h" +#include "ident.h" /** * Initialize the ident module. @@ -31,10 +44,10 @@ void init_ident (ident_if_t *id_if, int initial_n_idents); void finish_ident (void); /** The hash function of the internal ident module implementation. */ -#define ID_HASH(str, len) \ - ((( ((unsigned char *)(str))[0] * 33 \ - + ((unsigned char *)(str))[(len)>>1]) * 31 \ - + ((unsigned char *)(str))[(len)-1]) * 9 \ +#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_ */ +#endif