S
Sergei Koveshnikov
Hello,
I am trying to use hash management (from <search.h>).
I can add and search however I can't update entries in the hash table...
In the manual I found following note:
============
man (3) HSEARCH
SVID and POSIX 1003.1-2001 specify that action is significant only for
unsuccessful searches, so that an ENTER should not do anything for a
successful search. The libc and glibc implementations update the data
for the given key in this case.
Individual hash table entries can be added, but not deleted
============
Could you look at my example in the attached file `hash.c'
and give me some hints?
$ gcc -D_GNU_SOURCE -o hash hash.c
$ ./hash
Value: yes
Value: yes
$
I'm using:
============
gcc version 3.3.4
Linux aldan 2.4.27-1-386 #1 Fri Sep 3 06:24:46 UTC 2004 i686 GNU/Linux
============
Thanks a lot!
I am trying to use hash management (from <search.h>).
I can add and search however I can't update entries in the hash table...
In the manual I found following note:
============
man (3) HSEARCH
SVID and POSIX 1003.1-2001 specify that action is significant only for
unsuccessful searches, so that an ENTER should not do anything for a
successful search. The libc and glibc implementations update the data
for the given key in this case.
Individual hash table entries can be added, but not deleted
============
Could you look at my example in the attached file `hash.c'
and give me some hints?
$ gcc -D_GNU_SOURCE -o hash hash.c
$ ./hash
Value: yes
Value: yes
$
I'm using:
============
gcc version 3.3.4
Linux aldan 2.4.27-1-386 #1 Fri Sep 3 06:24:46 UTC 2004 i686 GNU/Linux
============
Thanks a lot!