struct Segment * FindSegment (name , seg , system)
LOCATION
In DOSBase at offset 130
SYNOPSIS
STRPTR name struct Segment * seg BOOL system
FUNCTION
Search for a resident segment by name and type. FindSegment() will return the first segment that exactly matches the name and type.
You can continue searching by specifying the last returned segment as the seg argument.
INPUTS
name
Name of the segment to search for.
seg
Start search from this point.
system
Search for a system segment.
RESULT
Will return the segment structure if a match is found, otherwise will return NULL.
EXAMPLE
SEE ALSO
AddSegment(), RemSegment()
NOTES
FindSegment() does no locking of the segment list. You should lock yourself. FindSegment() also does not increment the value of the seg_UC field. If the value of seg_UC > 0, you MUST perform user counting in order to prevent the segment from being unloaded.