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

memchr.3p (2452B)


  1. '\" et
  2. .TH MEMCHR "3P" 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. memchr
  12. \(em find byte in memory
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <string.h>
  17. .P
  18. void *memchr(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The functionality described on this reference page is aligned with the
  22. ISO\ C standard. Any conflict between the requirements described here and the
  23. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  24. .P
  25. The
  26. \fImemchr\fR()
  27. function shall locate the first occurrence of
  28. .IR c
  29. (converted to an
  30. .BR "unsigned char" )
  31. in the initial
  32. .IR n
  33. bytes (each interpreted as
  34. .BR "unsigned char" )
  35. pointed to by
  36. .IR s .
  37. .P
  38. Implementations shall behave as if they read the memory byte by byte
  39. from the beginning of the bytes pointed to by
  40. .IR s
  41. and stop at the first occurrence of
  42. .IR c
  43. (if it is found in the initial
  44. .IR n
  45. bytes).
  46. .SH "RETURN VALUE"
  47. The
  48. \fImemchr\fR()
  49. function shall return a pointer to the located byte, or a null pointer
  50. if the byte is not found.
  51. .SH ERRORS
  52. No errors are defined.
  53. .LP
  54. .IR "The following sections are informative."
  55. .SH EXAMPLES
  56. None.
  57. .SH "APPLICATION USAGE"
  58. None.
  59. .SH RATIONALE
  60. None.
  61. .SH "FUTURE DIRECTIONS"
  62. None.
  63. .SH "SEE ALSO"
  64. The Base Definitions volume of POSIX.1\(hy2017,
  65. .IR "\fB<string.h>\fP"
  66. .\"
  67. .SH COPYRIGHT
  68. Portions of this text are reprinted and reproduced in electronic form
  69. from IEEE Std 1003.1-2017, Standard for Information Technology
  70. -- Portable Operating System Interface (POSIX), The Open Group Base
  71. Specifications Issue 7, 2018 Edition,
  72. Copyright (C) 2018 by the Institute of
  73. Electrical and Electronics Engineers, Inc and The Open Group.
  74. In the event of any discrepancy between this version and the original IEEE and
  75. The Open Group Standard, the original IEEE and The Open Group Standard
  76. is the referee document. The original Standard can be obtained online at
  77. http://www.opengroup.org/unix/online.html .
  78. .PP
  79. Any typographical or formatting errors that appear
  80. in this page are most likely
  81. to have been introduced during the conversion of the source files to
  82. man page format. To report such errors, see
  83. https://www.kernel.org/doc/man-pages/reporting_bugs.html .