aboutsummaryrefslogtreecommitdiff
path: root/manual/search.texi
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-31 13:33:18 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-31 13:33:18 +0000
commit32c075e1f01849e161724bbd400ba77244e482cc (patch)
tree5f083a3f352104f32bb6c902d57fa3f294bd8d4d /manual/search.texi
parentd6220e9ee38c1c9285221b023346201ec5f511b3 (diff)
downloadglibc-32c075e1f01849e161724bbd400ba77244e482cc.zip
glibc-32c075e1f01849e161724bbd400ba77244e482cc.tar.gz
glibc-32c075e1f01849e161724bbd400ba77244e482cc.tar.bz2
.
Diffstat (limited to 'manual/search.texi')
-rw-r--r--manual/search.texi18
1 files changed, 9 insertions, 9 deletions
diff --git a/manual/search.texi b/manual/search.texi
index 0afd0ae..1ac2653 100644
--- a/manual/search.texi
+++ b/manual/search.texi
@@ -82,7 +82,7 @@ starting at @var{base} if it is found. If no matching element is
available @code{NULL} is returned.
The mean runtime of this function is @code{*@var{nmemb}}/2. This
-function should only be used if elements often get added to or deleted from
+function should only be used elements often get added to or deleted from
the array in which case it might not be useful to sort the array before
searching.
@end deftypefun
@@ -247,21 +247,21 @@ Couldn't find Janice.
@node Hash Search Function
@section The @code{hsearch} function.
-The functions mentioned so far in this chapter are for searching in a sorted
+The functions mentioned so far in this chapter are searching in a sorted
or unsorted array. There are other methods to organize information
which later should be searched. The costs of insert, delete and search
differ. One possible implementation is using hashing tables.
-The following functions are declared in the header file @file{search.h}.
+The following functions are declared in the the header file @file{search.h}.
@comment search.h
@comment SVID
@deftypefun int hcreate (size_t @var{nel})
The @code{hcreate} function creates a hashing table which can contain at
least @var{nel} elements. There is no possibility to grow this table so
-it is necessary to choose the value for @var{nel} wisely. The method
-used to implement this function might make it necessary to make the
+it is necessary to choose the value for @var{nel} wisely. The used
+methods to implement this function might make it necessary to make the
number of elements in the hashing table larger than the expected maximal
-number of elements. Hashing tables usually work inefficiently if they are
+number of elements. Hashing tables usually work inefficient if they are
filled 80% or more. The constant access time guaranteed by hashing can
only be achieved if few collisions exist. See Knuth's ``The Art of
Computer Programming, Part 3: Searching and Sorting'' for more
@@ -368,9 +368,9 @@ necessary for the @code{struct hsearch_data} object can be allocated
dynamically. It must be initialized with zero before calling this
function.
-The return value is non-zero if the operation was successful. If the
-return value is zero, something went wrong, which probably means the
-programs ran out of memory.
+The return value is non-zero if the operation were successful. if the
+return value is zero something went wrong which probably means the
+programs runs out of memory.
@end deftypefun
@comment search.h