Skip to contentSkip to conversation

hsearch.3: update ERRORS section

PATCH In review Seonghun Lim 2 participants 2 messages Aug 31, 2011 – Sep 15, 2011 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hsearch.3: update ERRORS section

man-pages version: latest git repository
why:
Remove ENOMEM and ESRCH from the list for hcreate() and hcreate_h(). The (e)glibc implementation of the two functions (of course!) doesn't set such errors. The two error codes are garbage from commit fe80e23e.

Then, hdestroy_r() was added to the list.

man3/hsearch.3 +0 -0
@@ -191,22 +191,16 @@ returns nonzero on success, and 0 on error.

.SH ERRORS
.LP
.BR hcreate ()
-and
+,
.BR hcreate_r ()
+and
+.BR hdestroy_r ()
can fail for the following reasons:
.TP
.B EINVAL
.RB ( hcreate_r ())
.I htab
is NULL.
-.TP
-.B ENOMEM
-Table full with \fIaction\fP set to \fBENTER\fP.
-.TP
-.B ESRCH
-The \fIaction\fP argument is \fBFIND\fP and no corresponding element -is found in the table.
-.\" hdestroy_r() can set errno to EINVAL if 'tab' is NULL. .PP
.BR hsearch ()
and

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hello Seonghun,

2011/8/31 Seonghun Lim <[email protected]>:

Quoted 35 lines

man-pages version: latest git repository
why:
Remove ENOMEM and ESRCH from the list for hcreate() and hcreate_h(). The (e)glibc implementation of the two functions (of course!) doesn't set such errors. The two error codes are garbage from commit fe80e23e.

Then, hdestroy_r() was added to the list.

man3/hsearch.3 +0 -0
@@ -191,22 +191,16 @@ returns nonzero on success, and 0 on error.

.SH ERRORS
.LP
.BR hcreate ()
-and
+,
.BR hcreate_r ()
+and
+.BR hdestroy_r ()
can fail for the following reasons:
.TP
.B EINVAL
.RB ( hcreate_r ())
.I htab
is NULL.
-.TP
-.B ENOMEM

man3/hsearch.3 +0 -6
-Table full with \fIaction\fP set to \fBENTER\fP.
-.TP
-.B ESRCH
-The \fIaction\fP argument is \fBFIND\fP and no corresponding element
-is found in the table.
-.\" hdestroy_r() can set errno to EINVAL if 'tab' is NULL.
Quoted 3 lines

.PP
.BR hsearch ()
and

Thanks. I tweaked your patch a little and applied the version below for 3.33.

Cheers,

Michael

man3/hsearch.3 +3 -12
@@ -32,7 +32,7 @@
 .\" 2008-09-03, mtk, restructured somewhat, in part after suggestions from
 .\"     Timothy S. Nelson <wayland-r28gBBs99rhWo+R/V/U2/[email protected]>
 .\"
-.TH HSEARCH 3 2008-10-06 "GNU" "Linux Programmer's Manual"
+.TH HSEARCH 3 2011-09-10 "GNU" "Linux Programmer's Manual"
 .SH NAME
 hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r,
 hsearch_r \- hash table management
@@ -190,23 +190,14 @@ cannot be found in the hash table.
 returns nonzero on success, and 0 on error.
 .SH ERRORS
 .LP
-.BR hcreate ()
-and
 .BR hcreate_r ()
+and
+.BR hdestroy_r ()
 can fail for the following reasons:
 .TP
 .B EINVAL
-.RB ( hcreate_r ())
 .I htab
 is NULL.
-.TP
-.B ENOMEM
-Table full with \fIaction\fP set to \fBENTER\fP.
-.TP
-.B ESRCH
-The \fIaction\fP argument is \fBFIND\fP and no corresponding element
-is found in the table.
-.\" hdestroy_r() can set errno to EINVAL if 'tab' is NULL.
 .PP
 .BR hsearch ()
 and
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html