TSEARCH(3P)
π hey bestie, welcome to TSEARCH(3P) π
okay so this one lives in the POSIX Programmer's Manual, and it's filed under section 3P, which is the β¨ POSIX-flavoured β¨ part of the library. it's called tsearch and it's all about searching a binary search tree. yes, the actual tree. slay. π³
πΈ PROLOG πΈ
quick lil heads up before we go any further, bestie, and this one's important:
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
ngl that last bit is giving "she might not even show up to the party" π always check your own system's man page before you commit, fr fr.
π NAME π
tsearch β search a binary search tree
like. that's the whole job. she searches. iconic behaviour. π
β¨ SYNOPSIS β¨
so here's the whole vibe, verbatim, no notes:
#include <search.h>
void *tsearch(const void *key, void **rootp,
int (*compar)(const void *, const void *));
three args, one include, zero drama. we love a low-maintenance icon. π
π¦ DESCRIPTION π¦
okay so this is the part where I have to be honest with you: this page doesn't actually spell out the description itself. it just says:
Refer to tdelete().
that's it. that's the whole section. she's pointing you at her sister page, which honestly? valid. the tdelete() page is where the real lore lives β tsearch(), tfind(), tdelete() and twalk() all get explained together over there. so go read that one, bestie, I'm not even joking. π«Ά
π COPYRIGHT π
okay now the part where we give credit, because we always give credit in this house. β¨
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
basically: if this page and the official standard ever beef, the standard wins. periodt.
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
if you spot a typo, it's probably from the format conversion, not the standard itself β go tell the kernel.org man-pages folks at that link. they'll handle it. π
π SEE ALSO π
not gonna lie, this page doesn't have a SEE ALSO section of its own β but it does tell you to go look at tdelete() in the DESCRIPTION, so that's your next stop. consider this your group-chat invite to the next page. π
and that's the whole thing, bestie!! you ate that. π β¨
this page came to you courtesy of IEEE/The Open Group, dated 2017 β thanks for reading my lil rewrite of the POSIX tsearch(3P) man page, ily, go touch some grass and then go read tdelete() π¦π
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms