The Complete SPRLIB & ANNLIB

create_layer

- fill one LAYER structure (LOCAL)

SYNOPSIS

int create_layer (layer, recipe)

ARGUMENTS

LAYER *layer A pointer to the LAYER structure to be filled.
LAYER_RECIPE recipe The recipe for the creation of layer.

RETURNS

TRUE if an error occured, FALSE if not.

FUNCTION

This function is used to fill in default values in the layer and allocate and fill the MAP structures in layer. The LayerName field is filled using DFLT_LAYER_TEXT and layernames (see SHAREDNET-constants). The LayerId field is given the correct value using the layer_count counter (see SHAREDNET-variables). NumMaps is copied from the recipe, and the l and p fields of the UserData and SystemData members are set to 0 and NULL, respectively. Finally, all maps are allocated and filled using the create_map routine, links to the linked list are given in the FirstMap and LastMap field and links to the linked list of units are given in FirstUnit and LastUnit. NumUnits is set to the right number of units in the layer.

NOTE

This function is called by create_sharednet.

SEE ALSO

create_sharednet

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