isconv(S) 6 January 1993 isconv(S) Name isconv: lddbl, ldfloat, ldint, ldlong, stdbl, stfloat, stint, stlong - ISAM data conversion tools Syntax #include <isam.h> double lddbl (p) char *p; float ldfloat (p) char *p; short ldint (p) char *p; long ldlong (p) char *p; int stdbl (d, p) double d; char *p; int stfloat (f, p) float f; char *p; short stint (i, p) integer i; char *p; int stlong (l, p) long l; char *p; Description The isconv routines provide conversion tools for use with ISAM files. The bytes that make up an integer are always stored in the ISAM file in the order you would expect: most-significant byte first and least-sig- nificant byte last. Some machines, however, store integers in the reverse order. Four routines are available to convert integers between ISAM and machine format, and four to convert between the unaligned ISAM format and the aligned machine format. Converting integers ldint(p)" returns a short integer in machine format. Here p is a char pointer to the first byte of the format INTTYPE. ldlong(p) returns a long integer in machine format. Here p is a char pointer to the first byte of the format LONGTYPE. stint(i,p) converts a machine-format short integer i to INTTYPE and stores it at location p. Here p is a char pointer to the first byte of INTTYPE. stlong(l,p) converts a machine-format long integer l to LONGTYPE and stores it at location p. Here p is a char pointer to the first byte of LONGTYPE. ldint and ldlong might be used when ISAM records are written to a tem- porary storage area for further processing by a C program. Any integers being passed from the buffer to the executing program are first converted to machine format with the ldint and ldlong routines. stint and stlong might be used when integers produced or processed by an executing C pro- gram are to be written to an ISAM file. The stint and stlong routines convert the machine-format integers to ISAM format and place them in a buffer in preparation for writing them to the ISAM file. Converting floating point Integers in ISAM format need not align along word boundaries as must integers in some machine format. On certain machines, floating-point numbers must generally be aligned on word boundaries. ISAM-format numbers need not be. Four routines are available to convert between the unaligned ISAM format and the aligned machine format. ldfloat(p)" returns a float in machine format. Here p is a char pointer to the first byte of the format FLOATTYPE. lddbl(p)" returns a double in machine format. Here p is a char pointer to the first byte of the format DOUBLETYPE. stfloat(f,p) converts a machine-format float to FLOATTYPE and stores it at location p. Here p is a char pointer to the first byte of FLOATTYPE. stdbl(d,p) converts a machine-format double d to DOUBLETYPE and stores it at location p. Here p is a char pointer to the first byte of DOUBLETYPE. ldfloat and lddbl can be used when ISAM records are accessed for pro- cessing. Any floating-point numbers being passed from the buffer to the executing program must be first converted to machine format with the ldfloat and lddbl routines. stfloat and stddbl might be used when floating-point numbers produced or processed by an executing C program are to be written to an ISAM file. The stfloat and stdbl routines con- vert the machine-format numbers to ISAM format and place them in a buffer in preparation for writing them to the ISAM file. See also isbuild(S) Standards conformance lddbl, ldfloat, ldint, ldlong, stdbl, stfloat and stint are not part of any currently supported standard; they are an extension of AT&T System V provided by the Santa Cruz Operation.