The Complete SPRLIB & ANNLIB

load_dataset

- read a (possibly) compressed dataset from a file

SYNOPSIS

DATASET *load_dataset (filename)

ARGUMENTS

char *filename The name of the file to be read.

RETURNS

A pointer to a DATASET structure if all went well, NULL if an error occured.

FUNCTION

This routine uses the find_full_fname function to expand the filename. If the file is not found, the function returns NULL. If it is, the routine looks whether the filename ends in .Z. If so, the fscanf_compressed_dataset function is called; otherwise, the fscanf_dataset function is used.

NOTE

The zcat command must be available in the user's search path. Reading compressed files does not work under Turbo-C / MS-DOS, since this combination does not support pipes. There may be a problem with portability using too long filenames. When a network is written in compressed form, .Z is added to the filename. If this filename already contains an extension, the file will not be properly named under MS-DOS.

SEE ALSO

fscanf_pattern, fscanf_io_pattern, fscanf_header, fscanf_sample, fprintf_dataset, fscanf_dataset, fscanf_compressed_dataset

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998