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

swab.3p (2159B)


  1. '\" et
  2. .TH SWAB "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. swab
  12. \(em swap bytes
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <unistd.h>
  17. .P
  18. void swab(const void *restrict \fIsrc\fP, void *restrict \fIdest\fP,
  19. ssize_t \fInbytes\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fIswab\fR()
  24. function shall copy
  25. .IR nbytes
  26. bytes, which are pointed to by
  27. .IR src ,
  28. to the object pointed to by
  29. .IR dest ,
  30. exchanging adjacent bytes. The
  31. .IR nbytes
  32. argument should be even. If
  33. .IR nbytes
  34. is odd,
  35. \fIswab\fR()
  36. copies and exchanges
  37. .IR nbytes \-1
  38. bytes and the disposition of the last byte is unspecified. If copying
  39. takes place between objects that overlap, the behavior is undefined.
  40. If
  41. .IR nbytes
  42. is negative,
  43. \fIswab\fR()
  44. does nothing.
  45. .SH "RETURN VALUE"
  46. None.
  47. .SH ERRORS
  48. No errors are defined.
  49. .LP
  50. .IR "The following sections are informative."
  51. .SH EXAMPLES
  52. None.
  53. .SH "APPLICATION USAGE"
  54. None.
  55. .SH RATIONALE
  56. None.
  57. .SH "FUTURE DIRECTIONS"
  58. None.
  59. .SH "SEE ALSO"
  60. The Base Definitions volume of POSIX.1\(hy2017,
  61. .IR "\fB<unistd.h>\fP"
  62. .\"
  63. .SH COPYRIGHT
  64. Portions of this text are reprinted and reproduced in electronic form
  65. from IEEE Std 1003.1-2017, Standard for Information Technology
  66. -- Portable Operating System Interface (POSIX), The Open Group Base
  67. Specifications Issue 7, 2018 Edition,
  68. Copyright (C) 2018 by the Institute of
  69. Electrical and Electronics Engineers, Inc and The Open Group.
  70. In the event of any discrepancy between this version and the original IEEE and
  71. The Open Group Standard, the original IEEE and The Open Group Standard
  72. is the referee document. The original Standard can be obtained online at
  73. http://www.opengroup.org/unix/online.html .
  74. .PP
  75. Any typographical or formatting errors that appear
  76. in this page are most likely
  77. to have been introduced during the conversion of the source files to
  78. man page format. To report such errors, see
  79. https://www.kernel.org/doc/man-pages/reporting_bugs.html .