logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

search.h.0p (2980B)


  1. '\" et
  2. .TH search.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. search.h
  12. \(em search tables
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <search.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <search.h>
  21. header shall define the
  22. .BR ENTRY
  23. type for structure
  24. .BR entry
  25. which shall include the following members:
  26. .sp
  27. .RS 4
  28. .nf
  29. char *key
  30. void *data
  31. .fi
  32. .P
  33. .RE
  34. .P
  35. and shall define
  36. .BR ACTION
  37. and
  38. .BR VISIT
  39. as enumeration data types through type definitions as follows:
  40. .sp
  41. .RS 4
  42. .nf
  43. enum { FIND, ENTER } ACTION;
  44. enum { preorder, postorder, endorder, leaf } VISIT;
  45. .fi
  46. .P
  47. .RE
  48. .P
  49. The
  50. .IR <search.h>
  51. header shall define the
  52. .BR size_t
  53. type as described in
  54. .IR <sys/types.h> .
  55. .P
  56. The following shall be declared as functions and may also be defined
  57. as macros. Function prototypes shall be provided.
  58. .sp
  59. .RS 4
  60. .nf
  61. int hcreate(size_t);
  62. void hdestroy(void);
  63. ENTRY *hsearch(ENTRY, ACTION);
  64. void insque(void *, void *);
  65. void *lfind(const void *, const void *, size_t *,
  66. size_t, int (*)(const void *, const void *));
  67. void *lsearch(const void *, void *, size_t *,
  68. size_t, int (*)(const void *, const void *));
  69. void remque(void *);
  70. void *tdelete(const void *restrict, void **restrict,
  71. int(*)(const void *, const void *));
  72. void *tfind(const void *, void *const *,
  73. int(*)(const void *, const void *));
  74. void *tsearch(const void *, void **,
  75. int(*)(const void *, const void *));
  76. void twalk(const void *,
  77. void (*)(const void *, VISIT, int ));
  78. .fi
  79. .P
  80. .RE
  81. .LP
  82. .IR "The following sections are informative."
  83. .SH "APPLICATION USAGE"
  84. None.
  85. .SH RATIONALE
  86. None.
  87. .SH "FUTURE DIRECTIONS"
  88. None.
  89. .SH "SEE ALSO"
  90. .IR "\fB<sys_types.h>\fP"
  91. .P
  92. The System Interfaces volume of POSIX.1\(hy2017,
  93. .IR "\fIhcreate\fR\^(\|)",
  94. .IR "\fIinsque\fR\^(\|)",
  95. .IR "\fIlsearch\fR\^(\|)",
  96. .IR "\fItdelete\fR\^(\|)"
  97. .\"
  98. .SH COPYRIGHT
  99. Portions of this text are reprinted and reproduced in electronic form
  100. from IEEE Std 1003.1-2017, Standard for Information Technology
  101. -- Portable Operating System Interface (POSIX), The Open Group Base
  102. Specifications Issue 7, 2018 Edition,
  103. Copyright (C) 2018 by the Institute of
  104. Electrical and Electronics Engineers, Inc and The Open Group.
  105. In the event of any discrepancy between this version and the original IEEE and
  106. The Open Group Standard, the original IEEE and The Open Group Standard
  107. is the referee document. The original Standard can be obtained online at
  108. http://www.opengroup.org/unix/online.html .
  109. .PP
  110. Any typographical or formatting errors that appear
  111. in this page are most likely
  112. to have been introduced during the conversion of the source files to
  113. man page format. To report such errors, see
  114. https://www.kernel.org/doc/man-pages/reporting_bugs.html .