The Complete SPRLIB & ANNLIB

fscanf_link

- load a link part of a network file (LOCAL)

SYNOPSIS

LINK *fscanf_link (stream, NumLinks)

ARGUMENTS

FILE *stream A valid file pointer.
long NumLinks The number of LINK structures to be read.

RETURNS

A pointer to the first of a linked list of LINK structures if successful, NULL in case of an error.

FUNCTION

This function is called by fscanf_unit twice, to read all incoming and outgoing links. The link part for each unit is the part between LINKBEGIN and LINKEND. See NET-IO-format for the layout of this part.

NOTE

Since at the time of reading a LINK structure not all units are read yet, it is not possible to fill the Unit field. Therefore, the SystemData.l field (see system_data) is filled with the unit's ID. The same goes for the pointers to the weight structures; the weight's ID is stored in the UserData.l field. After reading all units, all unit and weight references in the LINK structures are filled using the get_unit and get_weight_byid functions.

SEE ALSO

fscanf_network, fscanf_unit

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