DATAMANIP (ksegops) functions
LIBRARY ROUTINE
lkconvert - convert, offset, and/or scale data in specified segment
LIBRARY CALL
int
lkconvert(
kobject source_object,
char *segment_name,
char *data_type_string,
double scale,
double real_offset,
double imaginary_offset,
kobject destination_object)
INPUT
- source_object - the object to get the segment from
- segment_name - the segment to convert
- data_type_string - data type to convert to
- scale - value to scale the data by
- real_offset - real value to offset data by
- imaginary_offset - imaginary value to offset data by
OUTPUT
- destination_object - the resulting object
RETURN VALUE
TRUE (1) on success, FALSE (0) otherwise
DESCRIPTION
This routine will convert, offset and/or scale
the segment specified by segment_name of the input
object source_object and create a new object
destination_object containing the modified segment
and all the other segments which will be unmodified.
Data is scaled first, and then the offset is applied.
Data type conversion is accomplished via casting.
The data type to convert to will be passed in
data_type_string and should be one of these values:
.TS H
center tab(:) ;
lfB lfB lfB
l l lf(CW) .
Data Type:Abbreviation:Data Type
=
.TH
bit :bi : KBIT
byte :by : KBYTE
unsigned byte :un by : KUBYTE
ubyte :uby : KUBYTE
short :sh : KSHORT
unsigned short :un sh : KUSHORT
ushort :ush : KUSHORT
integer :in : KINT
unsigned integer :un in : KUINT
uint :ui : KUINT
long :lon : KLONG
unsigned long :un lon : KULONG
ulong :ul : KULONG
float :fl : KFLOAT
double :do : KDOUBLE
complex :co : KCOMPLEX
double complex :do co : KDCOMPLEX
dcomplex :dc : KDCOMPLEX
.T&
l s s.
Propagate Input Type - will not change the data type
.TE
The scale value is specified by scale and the
offset value by real_offset & imaginary_offset.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$DATAMANIP/objects/library/ksegops/src/lkconvert.c
SEE ALSO
ksegops(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.