(C) 1998 AROS - The Amiga Research OS


NAME
#include <dos/dosextens.h>
#include <proto/dos.h>

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.

BUGS

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
02.01.1998 srittau
Fixed typos and warnings
01.01.1998 iaint
Segment functions
27.01.1997 ldp
Polish
09.12.1996 aros
Added empty templates for all missing functions

Moved #include's into first column