Table of Contents

Name

addauth2elem - adds an element in the hash table.

Origin

This software belongs to the ALLIANCE CAD system from the CAO-VLSI team at ASIM/LIP6/UPMC laboratory.
LIP6/ASIM
University P. et M. Curie 4, place Jussieu 75252 PARIS Cedex 05 FRANCE
Fax : {33/0} 1.44.27.62.86
E-mail support : alliance-support@asim.lip6.fr

Synopsys

#include aut101.h"
auth2elem *addauth2elem( HashTable, Key1, Key2, Value ) auth2table *HashTable;

char
*Key1;
char
*Key2;
long
Value;

Parameters

HashTable
Pointer to the hash table where to add an element in.
Key1
The first hash element key.
Key2
The second hash element key.
Value
The value associated to the two keys Key1 and Key2.

Description

addauth2elem adds a new element in the hash table if there is not already an element associated to the two keys Key1 and Key2. Otherwise addauth2elem changes the value of the existing one. addauth2elem stretches the hash table HashTable if its size seems to be too small.

Return Value

addauth2elem returns a pointer to the element associated to the two keys.

Errors

auth2ash: hash key 0 error !"
The two keys Key1 and Key2 must be valid pointers.

Example

#include aut101.h"
auth2table *HashTable;
void add_in_dictionary( Name1, Name2 ) * Name1;
* Name2;
{

addauth2elem( HashTable,
namealloc( Name1 ),
namealloc( Name2 ), 0 ); }
...
HashTable = createauth2table( 1000 ); add_in_dictionary( hello", world ); ...
destroyauth2table( HashTable );

See Also

aut(1) destroyauth2table(3) , resetauth2table(3) , createauth2table(3) , searchauth2elem(3) , delauth2elem(3) .

Bug Report

This tool is under development at the ASIM/LIP6/UPMC laboratory, cao-vlsi research team.
We need your feedbak to improve documentation and tools. If you find bugs, please fill-in the form at http://asim.lip6.fr/alliance/support/bug-report/ Thanks for doing this.


Table of Contents

 



Alliance Web Site © 1997, 2002 ASIM/LIP6/UPMC, page maintained by Czo [Olivier Sirol] , last updated on 26 May 2000.