sputl(3X)


sputl, sgetl -- access long integer data in a machine-independent fashion

Synopsis

   cc [flag . . . ] file . . . -lld [library] . . .
   

#include <ldfcn.h>

void sputl (long value, char *buffer);

long sgetl (const char *buffer);

Description

sputl takes the four bytes of the long integer value and places them in memory starting at the address pointed to by buffer. The ordering of the bytes is the same across all machines.

sgetl retrieves the four bytes in memory starting at the address pointed to by buffer and returns the long integer value in the byte ordering of the host machine.

The combination of sputl and sgetl provides a machine-independent way of storing long numeric data in a file in binary form without conversion to characters.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004