RSC/MP 7.2 Programming Manual

API Function Descriptions
HP NonStop Remote Server Call (RSC/MP) Programming Manual522360-004
10-33
RscSwapShort [RSCSI]
RscSwapShort [RSCSI]
The RscSwapShort function exchanges the positions of bytes in a integer. Use this
function on workstations that are little-endian to convert to/from big-endian host values.
If the workstation operating system is big-endian, this function does not modify the
integer.
RscSwapShort replaces the RscSwapInt function, which is still supported for older
applications.
For multithreaded operating systems, the application can call RscSwapShort or
RscSwapLong at any time; the application does not have to wait for completion of a
previous API call.
nValue
The integer value to reverse.
Return Value
The return value is the value of nValue with its bytes reversed if RscSwapShort is
called on a little-endian workstation (for example SCO or Windows).
The return value is nValue if RscSwapShort is called on a big-endian workstation (for
example AIX, HP-UX, or Solaris).
USHORT RscSwapShort
(SHORT nValue /* in */
);