sputl(3) CLIX sputl(3)
NAME
sputl, sgetl - Accesses long integer data in a machine-independent fashion
LIBRARY
COFF Object File Manipulation Library (libld.a)
SYNOPSIS
void sputl(
long value ,
char *buffer );
long sgetl(
char *buffer );
PARAMETERS
value Four bytes of data to be placed at the address pointed to by
buffer
buffer Address where the data in value is to be placed or from which
data is to be retrieved
DESCRIPTION
The sputl() function 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 for all machines.
The combination of sputl() and sgetl() functions provides a machine-
independent way of storing long numeric data in a file in binary form
without conversion to characters.
EXAMPLES
To put a value in a buffer:
main()
{
long value;
char *outbuf[43;
/* put a value in outbuf in a */
/* machine independent fashion */
value = 629;
sputl(value, outbuf);
}
NOTES
2/94 - Intergraph Corporation 1
sputl(3) CLIX sputl(3)
A program that uses these functions must be loaded with the object-file
access routine library <libld.a>.
RETURN VALUES
The sgetl() function 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.
2 Intergraph Corporation - 2/94