DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sputl(S-osr5)


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

Syntax

cc . . . -lld

void sputl (value, buffer)
long value;
char *buffer;

long sgetl (buffer) char *buffer;

Description

sputl- puts long integer data in memory

sgetl- gets long integer data from memory

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.

Standards conformance

sgetl and sputl are not part of any currently supported standard; they were developed by UNIX System Laboratories, Inc. and are maintained by The SCO Group.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005