DragonFly On-Line Manual Pages

Search: Section:  


mapLn(3)                     Geography C functions                    mapLn(3)

See the file man.macros.

NAME

MapLn, MapLnCreate, MapLnClear, MapLnSetAlloc, MapLnAddPt, MapLnGetPt, MapLnDestroy - container for map points.

SYNOPSIS

#include <mapLines.h> MapLn MapLnCreate(unsigned nptsMax); void MapLnSetAlloc(MapLn mapLn, unsigned nptsMax); void MapLnClear(MapLn mapLn); void MapLnDestroy(MapLn mapLn); void MapLnAddPt(MapPt mapPt, MapLn mapLn); MapPt MapLnGetPt(MapLn mapLn, unsigned n);

DESCRIPTION

These functions create, manipulate and access maplines, which are arrays of map points. See geography (3) for information on map points. Maplines are represented by objects of type MapLn. MapLnCreate creates and initializes a mapline with enough memory allocated to store nptsMax map points. It returns the new mapline, or NULL if it fails. When no longer needed, the mapline should be destroyed with a call to MapLnDestroy. MapLnSetAlloc sets the allocation of mapLn to nptsMax. MapLnClear removes all points from mapLn, but does not free it's storage. This reduces memory management overhead for maplines that are reused. MapLnDestroy frees all storage associated with mapLn. MapLnAddPt adds mapPt to the end of mapLn. It increases mapLn's allocation automatically, if necessary. MapLnGetPt returns the map point at offset n from mapLn. The first point in the line has offset 0. MapLnGetPt returns MapPtNowhere() if n is out of bounds.

SEE ALSO

mapLnArr, mapLn, mapLnArr, geography

KEYWORDS

MapLn, mapline, geography, container

AUTHOR

Gordon Carrie (user0@tkgeomap.org) Geography 2 mapLn(3)

Search: Section: