RSC/MP Programming Manual

API Function Descriptions
RscSwapLong [RSCSL]
RscSwapLong [RSCSL]
The RscSwapLong function exchanges the positions of bytes in a long integer. Use this
function on workstations that are little-endian to convert to/from big-endian host va lues.
If the workstation operating system is big-endian, this function does not modify the long
integer.
For multithreaded operating systems, the application can call RscSwapLong or
RscSwapShort at any time; the application does not have to wait for completion of a
previous API call.
LONG RscSwapLong
(LONG lValue /* in */
);
lValue
The long value to reverse.
Return Value
The return va lue is the va lue of lValue with its bytes reversed if RscSwapLong is called
on a little-endian workstation (for example Linux, Solaris x86 or Windows).
The return va lue is lValue if RscSwapLong is called on a big-endian workstation (for
example AIX, HP-UX, or Solaris on SPARC).
HP NonStop Remote Server Call (RSC/MP) Programming Manual 522360-006
10 - 32