Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-27
edfseek (supplementary)
Example
This example prints “num = -123.45670”:
#include <stdlibh>
#include <stdioh>
int main(void)
{
double num;
int dp;
int sign;
char *string;
int i;
num = -123.4567;
string = ecvt(num, 8, &dp, &sign);
printf("num = ");
if(sign != 0)
printf("-");
/* print integer part of number */
for(i=0;i<dp;i++)
printf("%c", string[i]);
/* print decimal point and fractional part of number */
printf(".");
for(i=dp;i<8;i++)
printf("%c", string[i]);
printf("\n");
}
edfseek (supplementary)
The edfseek function sets the file-position indicator of an Edit file opened for ANSI I/O
to the beginning of a specified line.
stream
denotes an Edit file opened for ANSI I/O.
pos
specifies the desired file position. Depending on pos_base, the file position is either
a line number or a line offset.
#include <stdioh>
int edfseek(FILE *stream, long pos, int pos_base);