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

memcmp.3p (2580B)


  1. '\" et
  2. .TH MEMCMP "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. memcmp
  12. \(em compare bytes in memory
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <string.h>
  17. .P
  18. int memcmp(const void *\fIs1\fP, const void *\fIs2\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. \fImemcmp\fR()
  27. function shall compare the first
  28. .IR n
  29. bytes (each interpreted as
  30. .BR "unsigned char" )
  31. of the object pointed to by
  32. .IR s1
  33. to the first
  34. .IR n
  35. bytes of the object pointed to by
  36. .IR s2 .
  37. .P
  38. The sign of a non-zero return value shall be determined by the sign of
  39. the difference between the values of the first pair of bytes (both
  40. interpreted as type
  41. .BR "unsigned char" )
  42. that differ in the objects being compared.
  43. .SH "RETURN VALUE"
  44. The
  45. \fImemcmp\fR()
  46. function shall return an integer greater than, equal to, or less than
  47. 0, if the object pointed to by
  48. .IR s1
  49. is greater than, equal to, or less than the object pointed to by
  50. .IR s2 ,
  51. respectively.
  52. .SH ERRORS
  53. No errors are defined.
  54. .LP
  55. .IR "The following sections are informative."
  56. .SH EXAMPLES
  57. None.
  58. .SH "APPLICATION USAGE"
  59. None.
  60. .SH RATIONALE
  61. None.
  62. .SH "FUTURE DIRECTIONS"
  63. None.
  64. .SH "SEE ALSO"
  65. The Base Definitions volume of POSIX.1\(hy2017,
  66. .IR "\fB<string.h>\fP"
  67. .\"
  68. .SH COPYRIGHT
  69. Portions of this text are reprinted and reproduced in electronic form
  70. from IEEE Std 1003.1-2017, Standard for Information Technology
  71. -- Portable Operating System Interface (POSIX), The Open Group Base
  72. Specifications Issue 7, 2018 Edition,
  73. Copyright (C) 2018 by the Institute of
  74. Electrical and Electronics Engineers, Inc and The Open Group.
  75. In the event of any discrepancy between this version and the original IEEE and
  76. The Open Group Standard, the original IEEE and The Open Group Standard
  77. is the referee document. The original Standard can be obtained online at
  78. http://www.opengroup.org/unix/online.html .
  79. .PP
  80. Any typographical or formatting errors that appear
  81. in this page are most likely
  82. to have been introduced during the conversion of the source files to
  83. man page format. To report such errors, see
  84. https://www.kernel.org/doc/man-pages/reporting_bugs.html .