Nп/п : 25 из 100
 От   : wij                                 2:5075/128        20 авг 23 23:05:31
 К    : All                                                   20 авг 23 09:06:02
 Тема : Question about hsearch(3) ENTER method
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
<40b905c7-54ae-4e9f-bd6c-990f8e0e804an@googlegroups.com> 755f22c9
@REPLYADDR wij <wyniijj5@gmail.com>
@REPLYTO 2:5075/128 wij
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID:
<40b905c7-54ae-4e9f-bd6c-990f8e0e804an@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
manpage of hsearch(3) says:
...
The argument action determines what hsearch() does after an  unsuccess-
       ful  search.   This  argument must either have the value ENTER, meaning
       insert a copy of item (and return a pointer to the new hash table entry
       as the function result), or the value FIND, meaning that NULL should be
       returned.  (If action is FIND, then data is ignored.)
...

 When I want to insert an item into the hash table, I invokes
hsearch(item,ENTER).
But I only want to insert the item when it is not in the hash table. How can I
do (Only invokes hsearch once. The manpage seems not mentioning the condition I
am looking for)?
--- G2/1.0
 * Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх