# RSL_uf_to_radar

# RSL_uf_to_radar_fp

### Synopsis

#include "rsl.h"
Radar *RSL_uf_to_radar(char *infile);
Radar *RSL_uf_to_radar_fp(FILE *fp);

### Description

Read a UF (Universal Format) file and return a pointer to the structure Radar. The input file is specified by the string infile. RSL_uf_to_radar calls RSL_uf_to_radar_fp which is provided as a means of constructing filter programs -- reading stdio, for instance. If infile is NULL, then stdin is used. RSL_uf_to_radar_fp checks the UF magic information to ensure that a valid UF file is being read. The input file may be compressed. If the data is compressed, it is passed through the GNU gunzip filter. Thus, compressed data can be any format that gzip understands. It can handle true UF files, as well as, UF files with 2 and 4 byte Fortran record delimeters. These routines work on big and little endian machines, provided that the input UF file is in big endian format. RSL_radar_to_uf creates UF files in big endian format when run on either big or little endian machines; by definition UF files are in big endian format.

The radar structure is, essentially, an array of Volumes. The number and type of volumes allocated is automatically determined from the input UF file. No UF library needed; the UF code is part of RSL.

### Return value

Upon successful completion, RSL_uf_to_radar returns a pointer to the structure Radar. Otherwise, NULL is returned and errno is set.

### See also

RSL_anyformat_to_radar, RSL_radar_to_uf

Author: John H. Merritt.