<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<book>
    <bookinfo>
        <title>mathtrans</title>
    </bookinfo>
    <chapter>
        <title>mathtrans</title>
        <section id="n1">
            <title>mathtrans.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n2"> SPAcos() </link>
                    
                <link linkend="n3"> SPAsin() </link>
                    
                <link linkend="n4"> SPAtan() </link>
                    
                <link linkend="n5"> SPCos() </link>
                    
                <link linkend="n6"> SPCosh() </link>
                    
                <link linkend="n7"> SPExp() </link>
                    
                <link linkend="n8"> SPFieee() </link>
                    
                <link linkend="n9"> SPLog() </link>
                    
                <link linkend="n10"> SPLog10() </link>
                    
                <link linkend="n11"> SPPow() </link>
                    
                <link linkend="n12"> SPSin() </link>
                    
                <link linkend="n13"> SPSincos() </link>
                    
                <link linkend="n14"> SPSinh() </link>
                    
                <link linkend="n15"> SPSqrt() </link>
                    
                <link linkend="n16"> SPTan() </link>
                    
                <link linkend="n17"> SPTanh() </link>
                    
                <link linkend="n18"> SPTieee() </link>
            </literallayout>
        </section>
        <section id="n2">
            <title>mathtrans.library/SPAcos</title>
            <literallayout class="monospaced">
                NAME

	SPAcos - obtain the arccosine of the floating point number

SYNOPSIS

	fnum2 = SPAcos(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing the cosine
	of an angle and returns the value of said angle in
	radians

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n12">SPSin()</link>
            </literallayout>
        </section>
        <section id="n3">
            <title>mathtrans.library/SPAsin</title>
            <literallayout class="monospaced">
                NAME

	SPAsin - obtain the arcsine of the floating point number

SYNOPSIS

	fnum2 = SPAsin(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing the sine
	of an angle and returns the value of said angle in
	radians

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n5">SPCos()</link>
            </literallayout>
        </section>
        <section id="n4">
            <title>mathtrans.library/SPAtan</title>
            <literallayout class="monospaced">
                NAME

	SPAtan - obtain the arctangent of the floating point number

SYNOPSIS

	fnum2 = SPAtan(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing the tangent
	of an angle and returns the value of said angle in
	radians

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n16">SPTan()</link>
            </literallayout>
        </section>
        <section id="n5">
            <title>mathtrans.library/SPCos</title>
            <literallayout class="monospaced">
                NAME

	SPCos - obtain the cosine of the floating point number

SYNOPSIS

	fnum2 = SPCos(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing an angle
	in radians and returns the cosine of said angle.

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n2">SPAcos()</link>
            </literallayout>
        </section>
        <section id="n6">
            <title>mathtrans.library/SPCosh</title>
            <literallayout class="monospaced">
                NAME

	SPCosh - obtain the hyperbolic cosine of the floating point number

SYNOPSIS

	fnum2 = SPCosh(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing an angle
	in radians and returns the hyperbolic cosine of said angle.

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n14">SPSinh()</link>
            </literallayout>
        </section>
        <section id="n7">
            <title>mathtrans.library/SPExp</title>
            <literallayout class="monospaced">
                NAME

	SPExp - obtain the exponential (e**X) of the floating point number

SYNOPSIS

	fnum2 = SPExp(fnum1);
                      d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number and returns the value
	of e raised to the fnum1 power

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n9">SPLog()</link>
            </literallayout>
        </section>
        <section id="n8">
            <title>mathtrans.library/SPFieee</title>
            <literallayout class="monospaced">
                NAME

	SPFieee - convert single precision ieee to FFP number

SYNOPSIS

	fnum = SPFieee(ieeenum);
                       d0.l
	float fnum;
	float ieeenum;

FUNCTION

	Accepts a standard single precision format
	returns the same number, converted to Motorola
	fast floating point number

INPUTS

	ieeenum - IEEE Single Precision Floating Point

RESULT

	fnum - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n18">SPTieee()</link>
            </literallayout>
        </section>
        <section id="n9">
            <title>mathtrans.library/SPLog</title>
            <literallayout class="monospaced">
                NAME

	SPLog - obtain the natural logarithm of the floating point number

SYNOPSIS

	fnum2 = SPLog(fnum1);
                      d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number and returns the natural
	logarithem (base e) of said number

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n7">SPExp()</link>
            </literallayout>
        </section>
        <section id="n10">
            <title>mathtrans.library/SPLog10</title>
            <literallayout class="monospaced">
                NAME

	SPLog10 - obtain the naperian logarithm(base 10) of the
		  floating point number

SYNOPSIS

	fnum2 = SPLog10(fnum1);
                        d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number and returns the naperian
	logarithm (base 10) of said number

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n7">SPExp()</link>
                , SpLog()
            </literallayout>
        </section>
        <section id="n11">
            <title>mathtrans.library/SPPow</title>
            <literallayout class="monospaced">
                NAME

	SPPow - raise a number to a power

SYNOPSIS

	result = SPPow(fnum1, fnum2);
                      d1.l    d0.l
	float fnum1, fnum2;
	float result;

FUNCTION

	Accepts two floating point numbers and returns the
	result of fnum2 raised to the fnum1 power

INPUTS

	fnum1 - Motorola fast floating point number
	fnum2 - Motorola fast floating point number

RESULT

	result - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n7">SPExp()</link>
                , 
                <link linkend="n9">SPLog()</link>
            </literallayout>
        </section>
        <section id="n12">
            <title>mathtrans.library/SPSin</title>
            <literallayout class="monospaced">
                NAME

	SPSin - obtain the sine of the floating point number

SYNOPSIS

	fnum2 = SPSin(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing an angle
	in radians and returns the sine of said angle.

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n3">SPAsin()</link>
            </literallayout>
        </section>
        <section id="n13">
            <title>mathtrans.library/SPSincos</title>
            <literallayout class="monospaced">
                NAME

	SPSincos - obtain the sine and cosine of a number

SYNOPSIS

	fnum3 = SPSincos(pfnum2, fnum1);
                         d1.l,   d0.l
	float *pfnum2;
	float fnum1;
	float fnum3;

FUNCTION

	Accepts a floating point number (fnum1) representing
	an angle in radians and a pointer to another floating
	point number (pfnum2). It computes the cosine and places it in
	*pfnum2. It computes the sine and returns it as a result.

INPUTS

	fnum1 - Motorola fast floating point number
	pfnum2 - pointer to Motorola fast floating point number

RESULT

	*pfnum2 - Motorola fast floating point number (cosine)
	fnum3 - Motorola fast floating point number (sine)

BUGS

	None

SEE ALSO

	
                <link linkend="n12">SPSin()</link>
                , 
                <link linkend="n5">SPCos()</link>
            </literallayout>
        </section>
        <section id="n14">
            <title>mathtrans.library/SPSinh</title>
            <literallayout class="monospaced">
                NAME

	SPSinh - obtain the hyperbolic sine of the floating point number

SYNOPSIS

	fnum2 = SPSinh(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing an angle
	in radians and returns the hyperbolic sine of said angle.

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n6">SPCosh()</link>
            </literallayout>
        </section>
        <section id="n15">
            <title>mathtrans.library/SPSqrt</title>
            <literallayout class="monospaced">
                NAME

	SPSqrt - obtain the square root of the floating point number

SYNOPSIS

	fnum2 = SPSqrt(fnum1);
                      d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number and returns the square toot
	of said number

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n11">SPPow()</link>
                , 
                <link linkend="n28">SPMul()</link>
            </literallayout>
        </section>
        <section id="n16">
            <title>mathtrans.library/SPTan</title>
            <literallayout class="monospaced">
                NAME

	SPTan - obtain the tangent of the floating point number

SYNOPSIS

	fnum2 = SPTan(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing an angle
	in radians and returns the tangent of said angle.

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n4">SPAtan()</link>
            </literallayout>
        </section>
        <section id="n17">
            <title>mathtrans.library/SPTanh</title>
            <literallayout class="monospaced">
                NAME

	SPTanh - obtain the hyperbolic tangent of the floating point number

SYNOPSIS

	fnum2 = SPTanh(fnum1);
                       d0.l
	float fnum2;
	float fnum1;

FUNCTION

	Accepts a floating point number representing an angle
	in radians and returns the hyperbolic tangent of said angle.

INPUTS

	fnum1 - Motorola fast floating point number

RESULT

	fnum2 - Motorola fast floating point number

BUGS

	None

SEE ALSO

	
                <link linkend="n14">SPSinh()</link>
                , 
                <link linkend="n6">SPCosh()</link>
            </literallayout>
        </section>
        <section id="n18">
            <title>mathtrans.library/SPTieee</title>
            <literallayout class="monospaced">
                NAME

	SPTieee - convert FFP number to single precision ieee

SYNOPSIS

	ieeenum = SPTieee(fnum);
                         d0.l
	float ieeenum;
	float fnum;

FUNCTION

       Accepts a Motorola fast floating point number and
       returns the same number, converted into IEEE
       standard single precision format

INPUTS

	fnum - Motorola fast floating point number

RESULT

	ieeenum - IEEE Single Precision Floating Point

BUGS

	None

SEE ALSO

	
                <link linkend="n8">SPFieee()</link>
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>mathffp</title>
        <section id="n19">
            <title>mathffp.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n20"> SPAbs() </link>
                    
                <link linkend="n21"> SPAdd() </link>
                    
                <link linkend="n22"> SPCeil() </link>
                    
                <link linkend="n23"> SPCmp() </link>
                    
                <link linkend="n24"> SPDiv() </link>
                    
                <link linkend="n25"> SPFix() </link>
                    
                <link linkend="n26"> SPFloor() </link>
                    
                <link linkend="n27"> SPFlt() </link>
                    
                <link linkend="n28"> SPMul() </link>
                    
                <link linkend="n29"> SPNeg() </link>
                    
                <link linkend="n30"> SPSub() </link>
                    
                <link linkend="n31"> SPTst() </link>
            </literallayout>
        </section>
        <section id="n20">
            <title>mathffp.library/SPAbs</title>
            <literallayout class="monospaced">NAME
	SPAbs -- Obtain the absolute value of the fast floating point number.

SYNOPSIS
	fnum2 = SPAbs(fnum1)
	D0	      D0

	float SPAbs(float fnum1);

FUNCTION
	Accepts a floating point number and returns the absolute value of
	said number.

INPUTS
	fnum1 	- floating point number.

RESULT
	fnum2 	- floating point absolute value of fnum1.

BUGS
	None

SEE ALSO

</literallayout>
        </section>
        <section id="n21">
            <title>mathffp.library/SPAdd</title>
            <literallayout class="monospaced">NAME
	SPAdd -- Add two floating point numbers.

SYNOPSIS
	fnum3 = SPAdd(fnum1, fnum2)
	D0	      D1     D0

	float SPAdd(float fnum1, float fnum2);

FUNCTION
	Accepts two floating point numbers and returns the arithmetic
	sum of said numbers.

INPUTS
	fnum1 	- floating point number to add.
	fnum2 	- other floating point number to add.

RESULT
	fnum3 	- floating point number, sum of fnum1 and fnum2.

BUGS
	None.

SEE ALSO
</literallayout>
        </section>
        <section id="n22">
            <title>mathffp.library/SPCeil</title>
            <literallayout class="monospaced">
                   NAME
	SPCeil -- Compute Ceil function of a number.

   SYNOPSIS
	x = SPCeil(y)
	D0         D0

	float SPCeil(float y);

   FUNCTION
	Calculate the least integer greater than or equal to x and return it.
	This identity is true.  Ceil(x) = -Floor(-x).

   INPUTS
	y 	- Motorola Fast Floating Point 
                <link linkend="n83">Format</link>
                 Number.

   RESULT
	x 	- Motorola Fast Floating Point 
                <link linkend="n83">Format</link>
                 Number.

   BUGS
	None.

   SEE ALSO
	
                <link linkend="n26">SPFloor()</link>
                
            </literallayout>
        </section>
        <section id="n23">
            <title>mathffp.library/SPCmp</title>
            <literallayout class="monospaced">NAME
	SPCmp -- Compares two floating point numbers.

SYNOPSIS
	result = SPCmp(fnum1, fnum2)
	D0               D0     D1

	int SPCmp(float fnum1, float fnum2);

FUNCTION

	Accepts two floating point numbers and returns the condition
	codes set to indicate the result of said comparison.  Additionally,
	the integer functional result is returned to indicate the result
	of said comparison.

INPUTS
	fnum1 	- floating point number.
	fnum2 	- floating point number.

RESULT
	Condition codes set to reflect the following branches:

		GT - fnum2 &gt;  fnum1
		GE - fnum2 &gt;= fnum1
		EQ - fnum2 =  fnum1
		NE - fnum2 != fnum1
		LT - fnum2 &lt;  fnum1
		LE - fnum2 &lt;= fnum1

	Integer functional result as:

		+1 =&gt; fnum1 &gt; fnum2
		-1 =&gt; fnum1 &lt; fnum2
		 0 =&gt; fnum1 = fnum2

BUGS
	None.

SEE ALSO
</literallayout>
        </section>
        <section id="n24">
            <title>mathffp.library/SPDiv</title>
            <literallayout class="monospaced">NAME
	SPDiv -- Divide two floating point numbers.

SYNOPSIS
	fnum3 = SPDiv(fnum1, fnum2)
	D0	      D1     D0

	float SPDiv(float fnum1, float fnum2);

FUNCTION
	Accepts two floating point numbers and returns the arithmetic
	division of said numbers.

INPUTS
	fnum1 	- floating point number.
	fnum2	- floating point number.

RESULT

	fnum3 	- floating point number (fnum3 = fnum2/fnum1).

BUGS
	None.

SEE ALSO
</literallayout>
        </section>
        <section id="n25">
            <title>mathffp.library/SPFix</title>
            <literallayout class="monospaced">NAME
	SPFix -- Convert fast floating point number to integer.

SYNOPSIS
	inum = SPFix(fnum)
	D0	     D0

	int SPFix(float fnum);

FUNCTION
	Accepts a floating point number and returns the truncated
	integer portion of said number.

INPUTS

	fnum 	- floating point number.

RESULT

	inum 	- signed integer number.

BUGS
	None.

SEE ALSO
</literallayout>
        </section>
        <section id="n26">
            <title>mathffp.library/SPFloor</title>
            <literallayout class="monospaced">
                   NAME
	SPFloor -- compute Floor function of a number.

   SYNOPSIS
	x = SPFloor(y)
	D0 	    D0

	float SPFloor(float y);

   FUNCTION
	Calculate the largest integer less than or equal to x and return it.

   INPUTS
	y 	- Motorola Fast Floating Point number.

   RESULT
	x 	- Motorola Fast Floating Point number.

   BUGS
	None.

   SEE ALSO
	
                <link linkend="n22">SPCeil()</link>
                
            </literallayout>
        </section>
        <section id="n27">
            <title>mathffp.library/SPFlt</title>
            <literallayout class="monospaced">NAME
	SPFlt -- Convert integer number to fast floating point.


SYNOPSIS
	fnum = SPFlt(inum)
	D0	     D0

	float SPFlt(inet inum);

FUNCTION
	Accepts an integer and returns the converted
	floating point result of said number.

INPUTS
	inum 	- signed integer number

RESULT
	fnum 	- floating point number

BUGS
	None.

SEE ALSO
</literallayout>
        </section>
        <section id="n28">
            <title>mathffp.library/SPMul</title>
            <literallayout class="monospaced">NAME
	SPMul -- Multiply two floating point numbers.

SYNOPSIS
	fnum3 = SPMul(fnum1, fnum2)
	D0	      D1     D0

	float SPMul(float fnum1, float fnum2);

FUNCTION
	Accepts two floating point numbers and returns the arithmetic
	multiplication of said numbers.

INPUTS
	fnum1 	- floating point number
	fnum2 	- floating point number

RESULT
	fnum3 	- floating point number

BUGS
	None

SEE ALSO
</literallayout>
        </section>
        <section id="n29">
            <title>mathffp.library/SPNeg</title>
            <literallayout class="monospaced">NAME
	SPNeg -- Negate the supplied floating point number.

SYNOPSIS
	fnum2 = SPNeg(fnum1)
	D0	      D0

	float SPNeg(float fnum1);

FUNCTION
	Accepts a floating point number and returns the value
	of said number after having been subtracted from 0.0.

INPUTS
	fnum1 	- floating point number.

RESULT
	fnum2 	- floating point negation of fnum1.

BUGS
	None

SEE ALSO

</literallayout>
        </section>
        <section id="n30">
            <title>mathffp.library/SPSub</title>
            <literallayout class="monospaced">NAME
	SPSub -- Subtract two floating point numbers.

SYNOPSIS
	fnum3 = SPSub(fnum1, fnum2)
	D0	      D1     D0

	float SPSub(float fnum1, float fnum2);

FUNCTION
	Accepts two floating point numbers and returns the arithmetic
	subtraction of said numbers.

INPUTS
	fnum1 	- floating point number.
	fnum2 	- floating point number.

RESULT
	fnum3 	- floating point number.

BUGS
	None.

SEE ALSO
</literallayout>
        </section>
        <section id="n31">
            <title>mathffp.library/SPTst</title>
            <literallayout class="monospaced">NAME
	SPTst - Compares a float against zero (0.0).

SYNOPSIS
	result = SPTst(fnum)
	D0	       D1

	int SPTst(float fnum);

FUNCTION
	Accepts a floating point number and returns the condition
	codes set to indicate the result of a comparison against
	the value of zero (0.0).  Additionally, the integer functional
	result is returned.

INPUTS
	fnum 	- floating point number.

RESULT
	Condition codes set to reflect the following branches:

		EQ - fnum =  0.0
		NE - fnum != 0.0
		PL - fnum &gt;= 0.0
		MI - fnum &lt;  0.0

	Integer functional result as:

		+1 =&gt; fnum &gt; 0.0
		-1 =&gt; fnum &lt; 0.0
		 0 =&gt; fnum = 0.0

BUGS
	None.

SEE ALSO
</literallayout>
        </section>
    </chapter>
    <chapter>
        <title>dos</title>
        <section id="n32">
            <title>dos.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n33"> AbortPkt() </link>
                    
                <link linkend="n34"> AddBuffers() </link>
                    
                <link linkend="n35"> AddDosEntry() </link>
                    
                <link linkend="n36"> AddPart() </link>
                    
                <link linkend="n37"> AddSegment() </link>
                    
                <link linkend="n38"> AllocDosObject() </link>
                    
                <link linkend="n39"> AssignAdd() </link>
                    
                <link linkend="n40"> AssignLate() </link>
                    
                <link linkend="n41"> AssignLock() </link>
                    
                <link linkend="n42"> AssignPath() </link>
                    
                <link linkend="n43"> AttemptLockDosList() </link>
                    
                <link linkend="n44"> ChangeMode() </link>
                    
                <link linkend="n45"> CheckSignal() </link>
                    
                <link linkend="n46"> Cli() </link>
                    
                <link linkend="n47"> CliInitNewcli() </link>
                    
                <link linkend="n48"> CliInitRun() </link>
                    
                <link linkend="n49"> Close() </link>
                    
                <link linkend="n50"> CompareDates() </link>
                    
                <link linkend="n51"> CreateDir() </link>
                    
                <link linkend="n52"> CreateNewProc() </link>
                    
                <link linkend="n53"> CreateProc() </link>
                    
                <link linkend="n54"> CurrentDir() </link>
                    
                <link linkend="n55"> DateStamp() </link>
                    
                <link linkend="n56"> DateToStr() </link>
                    
                <link linkend="n57"> Delay() </link>
                    
                <link linkend="n58"> DeleteFile() </link>
                    
                <link linkend="n59"> DeleteVar() </link>
                    
                <link linkend="n60"> DeviceProc() </link>
                    
                <link linkend="n61"> DoPkt() </link>
                    
                <link linkend="n62"> DupLock() </link>
                    
                <link linkend="n63"> DupLockFromFH() </link>
                    
                <link linkend="n64"> EndNotify() </link>
                    
                <link linkend="n65"> ErrorReport() </link>
                    
                <link linkend="n66"> ExAll() </link>
                    
                <link linkend="n67"> ExAllEnd() </link>
                    
                <link linkend="n68"> Examine() </link>
                    
                <link linkend="n69"> ExamineFH() </link>
                    
                <link linkend="n70"> Execute() </link>
                    
                <link linkend="n71"> Exit() </link>
                    
                <link linkend="n72"> ExNext() </link>
                    
                <link linkend="n73"> Fault() </link>
                    
                <link linkend="n74"> FGetC() </link>
                    
                <link linkend="n75"> FGets() </link>
                    
                <link linkend="n76"> FilePart() </link>
                    
                <link linkend="n77"> FindArg() </link>
                    
                <link linkend="n78"> FindCliProc() </link>
                    
                <link linkend="n79"> FindDosEntry() </link>
                    
                <link linkend="n80"> FindSegment() </link>
                    
                <link linkend="n81"> FindVar() </link>
                    
                <link linkend="n82"> Flush() </link>
                    
                <link linkend="n83"> Format() </link>
                    
                <link linkend="n84"> FPutC() </link>
                    
                <link linkend="n85"> FPuts() </link>
                    
                <link linkend="n86"> FRead() </link>
                    
                <link linkend="n87"> FreeArgs() </link>
                    
                <link linkend="n88"> FreeDeviceProc() </link>
                    
                <link linkend="n89"> FreeDosEntry() </link>
                    
                <link linkend="n90"> FreeDosObject() </link>
                    
                <link linkend="n91"> FWrite() </link>
                    
                <link linkend="n92"> GetArgStr() </link>
                    
                <link linkend="n93"> GetConsoleTask() </link>
                    
                <link linkend="n94"> GetCurrentDirName() </link>
                    
                <link linkend="n95"> GetDeviceProc() </link>
                    
                <link linkend="n96"> GetFileSysTask() </link>
                    
                <link linkend="n97"> GetProgramDir() </link>
                    
                <link linkend="n98"> GetProgramName() </link>
                    
                <link linkend="n99"> GetPrompt() </link>
                    
                <link linkend="n100"> GetVar() </link>
                    
                <link linkend="n101"> Info() </link>
                    
                <link linkend="n102"> Inhibit() </link>
                    
                <link linkend="n103"> Input() </link>
                    
                <link linkend="n104"> InternalLoadSeg() </link>
                    
                <link linkend="n105"> InternalUnLoadSeg() </link>
                    
                <link linkend="n106"> IoErr() </link>
                    
                <link linkend="n107"> IsFileSystem() </link>
                    
                <link linkend="n108"> IsInteractive() </link>
                    
                <link linkend="n109"> LoadSeg() </link>
                    
                <link linkend="n110"> Lock() </link>
                    
                <link linkend="n111"> LockDosList() </link>
                    
                <link linkend="n112"> LockRecord() </link>
                    
                <link linkend="n113"> LockRecords() </link>
                    
                <link linkend="n114"> MakeDosEntry() </link>
                    
                <link linkend="n115"> MakeLink() </link>
                    
                <link linkend="n116"> MatchEnd() </link>
                    
                <link linkend="n117"> MatchFirst() </link>
                    
                <link linkend="n118"> MatchNext() </link>
                    
                <link linkend="n119"> MatchPattern() </link>
                    
                <link linkend="n120"> MatchPatternNoCase() </link>
                    
                <link linkend="n121"> MaxCli() </link>
                    
                <link linkend="n122"> NameFromFH() </link>
                    
                <link linkend="n123"> NameFromLock() </link>
                    
                <link linkend="n124"> NewLoadSeg() </link>
                    
                <link linkend="n125"> NextDosEntry() </link>
                    
                <link linkend="n126"> Open() </link>
                    
                <link linkend="n127"> OpenFromLock() </link>
                    
                <link linkend="n128"> Output() </link>
                    
                <link linkend="n129"> ParentDir() </link>
                    
                <link linkend="n130"> ParentOfFH() </link>
                    
                <link linkend="n131"> ParsePattern() </link>
                    
                <link linkend="n132"> ParsePatternNoCase() </link>
                    
                <link linkend="n133"> PathPart() </link>
                    
                <link linkend="n134"> PrintFault() </link>
                    
                <link linkend="n135"> PutStr() </link>
                    
                <link linkend="n136"> Read() </link>
                    
                <link linkend="n137"> ReadArgs() </link>
                    
                <link linkend="n138"> ReadItem() </link>
                    
                <link linkend="n139"> ReadLink() </link>
                    
                <link linkend="n140"> Relabel() </link>
                    
                <link linkend="n141"> RemAssignList() </link>
                    
                <link linkend="n142"> RemDosEntry() </link>
                    
                <link linkend="n143"> RemSegment() </link>
                    
                <link linkend="n144"> Rename() </link>
                    
                <link linkend="n145"> ReplyPkt() </link>
                    
                <link linkend="n146"> RunCommand() </link>
                    
                <link linkend="n147"> SameDevice() </link>
                    
                <link linkend="n148"> SameLock() </link>
                    
                <link linkend="n149"> Seek() </link>
                    
                <link linkend="n150"> SelectInput() </link>
                    
                <link linkend="n151"> SelectOutput() </link>
                    
                <link linkend="n152"> SendPkt() </link>
                    
                <link linkend="n153"> SetArgStr() </link>
                    
                <link linkend="n154"> SetComment() </link>
                    
                <link linkend="n155"> SetConsoleTask() </link>
                    
                <link linkend="n156"> SetCurrentDirName() </link>
                    
                <link linkend="n157"> SetFileDate() </link>
                    
                <link linkend="n158"> SetFileSize() </link>
                    
                <link linkend="n159"> SetFileSysTask() </link>
                    
                <link linkend="n160"> SetIoErr() </link>
                    
                <link linkend="n161"> SetMode() </link>
                    
                <link linkend="n162"> SetOwner() </link>
                    
                <link linkend="n163"> SetProgramDir() </link>
                    
                <link linkend="n164"> SetProgramName() </link>
                    
                <link linkend="n165"> SetPrompt() </link>
                    
                <link linkend="n166"> SetProtection() </link>
                    
                <link linkend="n167"> SetVar() </link>
                    
                <link linkend="n168"> SetVBuf() </link>
                    
                <link linkend="n169"> SplitName() </link>
                    
                <link linkend="n170"> StartNotify() </link>
                    
                <link linkend="n171"> StrToDate() </link>
                    
                <link linkend="n172"> StrToLong() </link>
                    
                <link linkend="n173"> SystemTagList() </link>
                    
                <link linkend="n174"> UnGetC() </link>
                    
                <link linkend="n175"> UnLoadSeg() </link>
                    
                <link linkend="n176"> UnLock() </link>
                    
                <link linkend="n177"> UnLockDosList() </link>
                    
                <link linkend="n178"> UnLockRecord() </link>
                    
                <link linkend="n179"> UnLockRecords() </link>
                    
                <link linkend="n180"> VFPrintf() </link>
                    
                <link linkend="n181"> VFWritef() </link>
                    
                <link linkend="n182"> VPrintf() </link>
                    
                <link linkend="n183"> WaitForChar() </link>
                    
                <link linkend="n184"> WaitPkt() </link>
                    
                <link linkend="n185"> Write() </link>
                    
                <link linkend="n186"> WriteChars() </link>
            </literallayout>
        </section>
        <section id="n33">
            <title>dos.library/AbortPkt</title>
            <literallayout class="monospaced">
                   NAME
	AbortPkt -- Aborts an asynchronous packet, if possible. (V36)

   SYNOPSIS
	AbortPkt(port, pkt)
		  D1    D2

	void AbortPkt(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosPacket</ulink>
                 *)

   FUNCTION
	This attempts to abort a packet sent earlier with 
                <link linkend="n152">SendPkt</link>
                 to a
	handler.  There is no guarantee that any given handler will allow
	a packet to be aborted, or if it is aborted whether function
	requested completed first or completely.  After calling AbortPkt(),
	you must wait for the packet to return before reusing it or
	deallocating it.

   INPUTS
	port - port the packet was sent to
	pkt  - the packet you wish aborted

   BUGS
	As of V37, this function does nothing.

   SEE ALSO
	
                <link linkend="n152">SendPkt()</link>
                , 
                <link linkend="n61">DoPkt()</link>
                , 
                <link linkend="n184">WaitPkt()</link>
                
            </literallayout>
        </section>
        <section id="n34">
            <title>dos.library/AddBuffers</title>
            <literallayout class="monospaced">
                   NAME
	AddBuffers -- Changes the number of buffers for a filesystem (V36)

   SYNOPSIS
	success = AddBuffers(filesystem, number)
	D0		       D1          D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AddBuffers(STRPTR, LONG)

   FUNCTION
	Adds buffers to a filesystem.  If it succeeds, the number of current
	buffers is returned in 
                <link linkend="n106">IoErr()</link>
                .  Note that "number" may be negative.
	The amount of memory used per buffer, and any limits on the number of
	buffers, are dependant on the filesystem in question.
	If the call succeeds, the number of buffers in use on the filesystem
	will be returned by 
                <link linkend="n106">IoErr()</link>
                .

   INPUTS
	filesystem - Name of device to add buffers to (with ':').
	number     - Number of buffers to add.  May be negative.

   RESULT
	success    - Success or failure of command.

   BUGS
	The V36 ROM filesystem (FFS/OFS) doesn't return the right number of
	buffers unless preceded by an AddBuffers(fs,-1) (in-use buffers aren't
	counted).  This is fixed in V37.

	The V37 and before ROM filesystem doesn't return success, it returns
	the number of buffers.  The best way to test for this is to consider
	0 (FALSE) failure, -1 (DOSTRUE) to mean that 
                <link linkend="n106">IoErr()</link>
                 will have the
	number of buffers, and any other positive value to be the number of
	buffers.  It may be fixed in some future ROM revision.

   SEE ALSO
	
                <link linkend="n106">IoErr()</link>
                
            </literallayout>
        </section>
        <section id="n35">
            <title>dos.library/AddDosEntry</title>
            <literallayout class="monospaced">
                   NAME
	AddDosEntry -- Add a Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 entry to the lists (V36)

   SYNOPSIS
	success = AddDosEntry(dlist)
	D0                     D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AddDosEntry(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *)

   FUNCTION
	Adds a device, volume or assign to the dos devicelist.  Can fail if it
	conflicts with an existing entry (such as another assign to the same
	name or another device of the same name).  Volume nodes with different
	dates and the same name CAN be added, or with names that conflict with
	devices or assigns.  Note: the dos list does NOT have to be locked to
	call this.  Do not access dlist after adding unless you have locked the
	Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 list.

	An additional note concerning calling this from within a handler:
	in order to avoid deadlocks, your handler must either be multi-
	threaded, or it must attempt to lock the list before calling this
	function.  The code would look something like this:

	if (AttemptLockDosList(LDF_xxx|LDF_WRITE))
	{
		rc = AddDosEntry(...);
		UnLockDosList(LDF_xxx|LDF_WRITE);
	}

	If 
                <link linkend="n43">AttemptLockDosList()</link>
                 fails (i.e. it's locked already), check for
	messages at your filesystem port (don't wait!) and try the
	
                <link linkend="n43">AttemptLockDosList()</link>
                 again.

   INPUTS
	dlist   - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 list entry to be added.

   RESULT
	success - Success/Failure indicator

   SEE ALSO
	
                <link linkend="n142">RemDosEntry()</link>
                , 
                <link linkend="n79">FindDosEntry()</link>
                , 
                <link linkend="n125">NextDosEntry()</link>
                , 
                <link linkend="n111">LockDosList()</link>
                ,
	
                <link linkend="n114">MakeDosEntry()</link>
                , 
                <link linkend="n89">FreeDosEntry()</link>
                , 
                <link linkend="n43">AttemptLockDosList()</link>
                
            </literallayout>
        </section>
        <section id="n36">
            <title>dos.library/AddPart</title>
            <literallayout class="monospaced">
                   NAME
	AddPart -- Appends a file/dir to the end of a path (V36)

   SYNOPSIS
	success = AddPart( dirname, filename, size )
	D0                   D1        D2      D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AddPart( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ULONG )

   FUNCTION
	This function adds a file, directory, or subpath name to a directory
	path name taking into account any required separator characters.  If
	filename is a fully-qualified path it will totally replace the current
	value of dirname.

   INPUTS
	dirname  - the path to add a file/directory name to.
	filename - the filename or directory name to add.  May be a relative
		   pathname from the current directory (example: foo/bar).
		   Can deal with leading '/'(s), indicating one directory up
		   per '/', or with a ':', indicating it's relative to the
		   root of the appropriate volume.
	size     - size in bytes of the space allocated for dirname.  Must
		   not be 0.

   RESULT
	success - non-zero for ok, FALSE if the buffer would have overflowed.
		  If an overflow would have occured, dirname will not be
		  changed.

   BUGS
	Doesn't check if a subpath is legal (i.e. doesn't check for ':'s) and
	doesn't handle leading '/'s in 2.0 through 2.02 (V36).  V37 fixes
	this, allowing filename to be any path, including absolute.

   SEE ALSO
	
                <link linkend="n76">FilePart()</link>
                , 
                <link linkend="n133">PathPart()</link>
                
            </literallayout>
        </section>
        <section id="n37">
            <title>dos.library/AddSegment</title>
            <literallayout class="monospaced">
                   NAME
	AddSegment - Adds a resident segment to the resident list (V36)

   SYNOPSIS
	success = AddSegment(name, seglist, type)
	D0		      D1     D2      D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AddSegment(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                , LONG)

   FUNCTION
	Adds a segment to the Dos resident list, with the specified Seglist
	and type (stored in seg_UC - normally 0).  NOTE: currently unused
	types may cause it to interpret other registers (d4-?) as additional
	parameters in the future.

	Do NOT build 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Segment</ulink>
                 structures yourself!

   INPUTS
	name    - name for the segment
	seglist - Dos seglist of code for segment
	type    - initial usecount, normally 0

   RESULT
	success - success or failure

   SEE ALSO
	
                <link linkend="n80">FindSegment()</link>
                , 
                <link linkend="n143">RemSegment()</link>
                , 
                <link linkend="n109">LoadSeg()</link>
                
            </literallayout>
        </section>
        <section id="n38">
            <title>dos.library/AllocDosObject</title>
            <literallayout class="monospaced">
                   NAME
	AllocDosObject -- Creates a dos object (V36)

   SYNOPSIS
	ptr = AllocDosObject(type, tags)
	D0                    D1    D2

	void *AllocDosObject(ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *)

	ptr = AllocDosObjectTagList(type, tags)
	D0                 	     D1    D2

	void *AllocDosObjectTagList(ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *)

	ptr = AllocDosObjectTags(type, Tag1, ...)

	void *AllocDosObjectTags(ULONG, ULONG, ...)

   FUNCTION
	Create one of several dos objects, initializes it, and returns it
	to you.  Note the DOS_STDPKT returns a pointer to the sp_Pkt of the
	structure.

	This function may be called by a task for all types and tags defined
	in the V37 includes (DOS_FILEHANDLE through DOS_RDARGS and ADO_FH_Mode
	through ADO_PromptLen, respectively).  Any future types or tags
	will be documented as to whether a task may use them.

   INPUTS
	type - type of object requested
	tags - pointer to taglist with additional information

   RESULT
	packet - pointer to the object or NULL

   BUGS
	Before V39, DOS_CLI should be used with care since 
                <link linkend="n90">FreeDosObject()</link>
                	can't free it.

   SEE ALSO
	
                <link linkend="n90">FreeDosObject()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dostags.h">&lt;dos/dostags.h&gt;</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n39">
            <title>dos.library/AssignAdd</title>
            <literallayout class="monospaced">
                   NAME
	AssignAdd -- Adds a lock to an assign for multi-directory assigns (V36)

   SYNOPSIS
	success = AssignAdd(name,lock)
	D0                   D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AssignAdd(STRPTR,BPTR)

   FUNCTION
	Adds a lock to an assign, making or adding to a multi-directory
	assign.  Note that this only will succeed on an assign created with
	
                <link linkend="n41">AssignLock()</link>
                , or an assign created with 
                <link linkend="n40">AssignLate()</link>
                 which has been
	resolved (converted into a AssignLock()-assign).

	NOTE: you should not use the lock in any way after making this call
	successfully.  It becomes the part of the assign, and will be unlocked
	by the system when the assign is removed.  If you need to keep the
	lock, pass a lock from 
                <link linkend="n62">DupLock()</link>
                 to 
                <link linkend="n41">AssignLock()</link>
                .

   INPUTS
	name - Name of device to assign lock to (without trailing ':')
	lock - 
                <link linkend="n110">Lock</link>
                 associated with the assigned name

   RESULT
	success - Success/failure indicator.  On failure, the lock is not
		  unlocked.

   SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n41">AssignLock()</link>
                , 
                <link linkend="n42">AssignPath()</link>
                , 
                <link linkend="n40">AssignLate()</link>
                , 
                <link linkend="n62">DupLock()</link>
                ,
	
                <link linkend="n141">RemAssignList()</link>
                
            </literallayout>
        </section>
        <section id="n40">
            <title>dos.library/AssignLate</title>
            <literallayout class="monospaced">
                   NAME
	AssignLate -- Creates an assignment to a specified path later (V36)

   SYNOPSIS
	success = AssignLate(name,path)
	D0                    D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AssignLate(STRPTR,STRPTR)

   FUNCTION
	Sets up a assignment that is expanded upon the FIRST reference to the
	name.  The path (a string) would be attached to the node.  When
	the name is referenced (Open("FOO:xyzzy"...), the string will be used
	to determine where to set the assign to, and if the directory can be
	locked, the assign will act from that point on as if it had been
	created by 
                <link linkend="n41">AssignLock()</link>
                .

	A major advantage is assigning things to unmounted volumes, which
	will be requested upon access (useful in startup sequences).

   INPUTS
	name - Name of device to be assigned (without trailing ':')
	path - Name of late assignment to be resolved on the first reference.

   RESULT
	success - Success/failure indicator of the operation

   SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n39">AssignAdd()</link>
                , 
                <link linkend="n42">AssignPath()</link>
                , 
                <link linkend="n41">AssignLock()</link>
                ,

            </literallayout>
        </section>
        <section id="n41">
            <title>dos.library/AssignLock</title>
            <literallayout class="monospaced">
                   NAME
	AssignLock -- Creates an assignment to a locked object (V36)

   SYNOPSIS
	success = AssignLock(name,lock)
	D0                    D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AssignLock(STRPTR,BPTR)

   FUNCTION
	Sets up an assign of a name to a given lock.  Passing NULL for a lock
	cancels any outstanding assign to that name.  If an assign entry of
	that name is already on the list, this routine replaces that entry.  If
	an entry is on the list that conflicts with the new assign, then a
	failure code is returned.

	NOTE: you should not use the lock in any way after making this call
	successfully.  It becomes the assign, and will be unlocked by the
	system when the assign is removed.  If you need to keep the lock,
	pass a lock from 
                <link linkend="n62">DupLock()</link>
                 to AssignLock().

   INPUTS
	name - Name of device to assign lock to (without trailing ':')
	lock - 
                <link linkend="n110">Lock</link>
                 associated with the assigned name

   RESULT
	success - Success/failure indicator.  On failure, the lock is not
		  unlocked.

   SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n39">AssignAdd()</link>
                , 
                <link linkend="n42">AssignPath()</link>
                , 
                <link linkend="n40">AssignLate()</link>
                , 
                <link linkend="n62">DupLock()</link>
                ,
	
                <link linkend="n141">RemAssignList()</link>
                
            </literallayout>
        </section>
        <section id="n42">
            <title>dos.library/AssignPath</title>
            <literallayout class="monospaced">
                   NAME
	AssignPath -- Creates an assignment to a specified path (V36)

   SYNOPSIS
	success = AssignPath(name,path)
	D0                    D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AssignPath(STRPTR,STRPTR)

   FUNCTION
	Sets up a assignment that is expanded upon EACH reference to the name.
	This is implemented through a new device list type (DLT_ASSIGNPATH, or
	some such).  The path (a string) would be attached to the node.  When
	the name is referenced (Open("FOO:xyzzy"...), the string will be used
	to determine where to do the open.  No permanent lock will be part of
	it.  For example, you could AssignPath() c2: to df2:c, and references
	to c2: would go to df2:c, even if you change disks.

	The other major advantage is assigning things to unmounted volumes,
	which will be requested upon access (useful in startup sequences).

   INPUTS
	name - Name of device to be assigned (without trailing ':')
	path - Name of late assignment to be resolved at each reference

   RESULT
	success - Success/failure indicator of the operation

   SEE ALSO
	
                <link linkend="n39">AssignAdd()</link>
                , 
                <link linkend="n41">AssignLock()</link>
                , 
                <link linkend="n40">AssignLate()</link>
                , 
                <link linkend="n126">Open()</link>
                
            </literallayout>
        </section>
        <section id="n43">
            <title>dos.library/AttemptLockDosList</title>
            <literallayout class="monospaced">
                   NAME
	AttemptLockDosList -- Attempt to lock the Dos Lists for use (V36)

   SYNOPSIS
	dlist = AttemptLockDosList(flags)
	D0			    D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *AttemptLockDosList(ULONG)

   FUNCTION
	Locks the dos device list in preparation to walk the list.  If the
	list is 'busy' then this routine will return NULL.  See 
                <link linkend="n111">LockDosList()</link>
                	for more information.

   INPUTS
	flags - Flags stating which types of nodes you want to lock.

   RESULT
	dlist - Pointer to the beginning of the list or NULL.  Not a valid
		node!

   BUGS
	In V36 through V39.23 dos, this would return NULL or 0x00000001 for
	failure.  Fixed in V39.24 dos (after kickstart 39.106).

   SEE ALSO
	
                <link linkend="n111">LockDosList()</link>
                , 
                <link linkend="n177">UnLockDosList()</link>
                , 
                <link linkend="n241">Forbid()</link>
                , 
                <link linkend="n125">NextDosEntry()</link>
                
            </literallayout>
        </section>
        <section id="n44">
            <title>dos.library/ChangeMode</title>
            <literallayout class="monospaced">
                   NAME
	ChangeMode - Change the current mode of a lock or filehandle (V36)

   SYNOPSIS
	success = ChangeMode(type, object, newmode)
	D0                    D1     D2      D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ChangeMode(ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                , ULONG)

   FUNCTION
	This allows you to attempt to change the mode in use by a lock or
	filehandle.  For example, you could attempt to turn a shared lock
	into an exclusive lock.  The handler may well reject this request.
	Warning: if you use the wrong type for the object, the system may
	crash.

   INPUTS
	type    - Either CHANGE_FH or CHANGE_LOCK
	object  - A lock or filehandle
	newmode - The new mode you want

   RESULT
	success - Boolean

   BUGS
	Did not work in 2.02 or before (V36).  Works in V37.  In the
	earlier versions, it can crash the machine.

   SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n126">Open()</link>
                
            </literallayout>
        </section>
        <section id="n45">
            <title>dos.library/CheckSignal</title>
            <literallayout class="monospaced">   NAME
	CheckSignal -- Checks for break signals (V36)

   SYNOPSIS
	signals = CheckSignal(mask)
	D0		      D1

	ULONG CheckSignal(ULONG)

   FUNCTION
	This function checks to see if any signals specified in the mask have
	been set and if so, returns them.  Otherwise it returns FALSE.
	All signals specified in mask will be cleared.

   INPUTS
	mask    - Signals to check for.

   RESULT
	signals - Signals specified in mask that were set.

   SEE ALSO
</literallayout>
        </section>
        <section id="n46">
            <title>dos.library/Cli</title>
            <literallayout class="monospaced">
                   NAME
	Cli -- Returns a pointer to the CLI structure of the process (V36)

   SYNOPSIS
	cli_ptr = Cli()
	D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">CommandLineInterface</ulink>
                 *Cli(void)

   FUNCTION
	Returns a pointer to the CLI structure of the current process, or NULL
	if the process has no CLI structure.

   RESULT
	cli_ptr - pointer to the CLI structure, or NULL.

   SEE ALSO

            </literallayout>
        </section>
        <section id="n47">
            <title>dos.library/CliInitNewcli</title>
            <literallayout class="monospaced">
                   NAME
	CliInitNewcli -- Set up a process to be a shell from initial packet

   SYNOPSIS
	flags = CliInitNewcli( packet )
	D0		         A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 CliInitNewcli( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosPacket</ulink>
                 * )

   FUNCTION
	This function initializes a process and CLI structure for a new
	shell, from parameters in an initial packet passed by the system
	(NewShell or NewCLI, etc).  The format of the data in the packet
	is purposely not defined.  The setup includes all the normal fields
	in the structures that are required for proper operation (current
	directory, paths, input streams, etc).

	It returns a set of flags containing information about what type
	of shell invocation this is.

	Definitions for the values of fn:
		Bit 31     Set to indicate flags are valid
		Bit  3     Set to indicate asynch system call
		Bit  2     Set if this is a System() call
		Bit  1     Set if user provided input stream
		Bit  0     Set if RUN provided output stream

	If Bit 31 is 0, then you must check 
                <link linkend="n106">IoErr()</link>
                 to determine if an error
	occurred.  If 
                <link linkend="n106">IoErr()</link>
                 returns a pointer to your process, there has
	been an error, and you should clean up and exit.  The packet will
	have already been returned by CliInitNewcli().  If it isn't a pointer
	to your process and Bit 31 is 0, reply the packet immediately.
	(Note: this is different from what you do for CliInitRun().)

	This function is very similar to 
                <link linkend="n48">CliInitRun()</link>
                .

   INPUTS
	packet - the initial packet sent to your process 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                   RESULT
	fn - flags or a pointer

   SEE ALSO
	
                <link linkend="n48">CliInitRun()</link>
                , 
                <link linkend="n145">ReplyPkt()</link>
                , 
                <link linkend="n184">WaitPkt()</link>
                , 
                <link linkend="n106">IoErr()</link>
                
            </literallayout>
        </section>
        <section id="n48">
            <title>dos.library/CliInitRun</title>
            <literallayout class="monospaced">
                   NAME
	CliInitRun -- Set up a process to be a shell from initial packet

   SYNOPSIS
	flags = CliInitRun( packet )
	D0		      A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 CliInitRun( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosPacket</ulink>
                 * )

   FUNCTION
	This function initializes a process and CLI structure for a new
	shell, from parameters in an initial packet passed by the system
	(Run, System(), Execute()).  The format of the data in the packet
	is purposely not defined.  The setup includes all the normal fields
	in the structures that are required for proper operation (current
	directory, paths, input streams, etc).

	It returns a set of flags containing information about what type
	of shell invocation this is.

	Definitions for the values of fn:
		Bit 31     Set to indicate flags are valid
		Bit  3     Set to indicate asynch system call
		Bit  2     Set if this is a System() call
		Bit  1     Set if user provided input stream
		Bit  0     Set if RUN provided output stream

	If Bit 31 is 0, then you must check 
                <link linkend="n106">IoErr()</link>
                 to determine if an error
	occurred.  If 
                <link linkend="n106">IoErr()</link>
                 returns a pointer to your process, there has
	been an error, and you should clean up and exit.  The packet will
	have already been returned by 
                <link linkend="n47">CliInitNewcli()</link>
                .  If it isn't a pointer
	to your process and Bit 31 is 0, you should wait before replying
	the packet until after you've loaded the first command (or when you
	exit).  This helps avoid disk "gronking" with the Run command.
	(Note: this is different from what you do for CliInitNewcli().)

	If Bit 31 is 1, then if Bit 3 is one, 
                <link linkend="n145">ReplyPkt()</link>
                 the packet
	immediately (Asynch System()), otherwise wait until your shell exits
	(Sync System(), 
                <link linkend="n70">Execute()</link>
                ).
	(Note: this is different from what you do for CliInitNewcli().)

	This function is very similar to 
                <link linkend="n47">CliInitNewcli()</link>
                .

   INPUTS
	packet - the initial packet sent to your process 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                   RESULT
	fn - flags or a pointer

   SEE ALSO
	
                <link linkend="n47">CliInitNewcli()</link>
                , 
                <link linkend="n145">ReplyPkt()</link>
                , 
                <link linkend="n184">WaitPkt()</link>
                , System(), 
                <link linkend="n70">Execute()</link>
                , 
                <link linkend="n106">IoErr()</link>
                
            </literallayout>
        </section>
        <section id="n49">
            <title>dos.library/Close</title>
            <literallayout class="monospaced">
                    NAME
	Close -- Close an open file

    SYNOPSIS
	success = Close( file )
	   D0             D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Close(BPTR)

    FUNCTION
	The file specified by the file handle is closed. You must close all
	files you explicitly opened, but you must not close inherited file
	handles that are passed to you (each filehandle must be closed once
	and ONLY once).  If Close() fails, the file handle is still
	deallocated and should not be used.

    INPUTS
	file - BCPL pointer to a file handle

    RESULTS
	success - returns if Close() succeeded.  Note that it might fail
		  depending on buffering and whatever IO must be done to
		  close a file being written to.  NOTE: this return value
		  did not exist before V36!

    SEE ALSO
	
                <link linkend="n126">Open()</link>
                , 
                <link linkend="n127">OpenFromLock()</link>
                
            </literallayout>
        </section>
        <section id="n50">
            <title>dos.library/CompareDates</title>
            <literallayout class="monospaced">
                   NAME
	CompareDates -- Compares two datestamps (V36)

   SYNOPSIS
	result = CompareDates(date1,date2)
	D0                     D1     D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 CompareDates(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 *)

   FUNCTION
	Compares two times for relative magnitide.  &lt;0 is returned if date1 is
	later than date2, 0 if they are equal, or &gt;0 if date2 is later than
	date1.  NOTE: this is NOT the same ordering as strcmp!

   INPUTS
	date1, date2 - DateStamps to compare

   RESULT
	result -  &lt;0, 0, or &gt;0 based on comparison of two date stamps

   SEE ALSO
	
                <link linkend="n55">DateStamp()</link>
                , 
                <link linkend="n56">DateToStr()</link>
                , 
                <link linkend="n171">StrToDate()</link>
                
            </literallayout>
        </section>
        <section id="n51">
            <title>dos.library/CreateDir</title>
            <literallayout class="monospaced">
                    NAME
	CreateDir -- Create a new directory

    SYNOPSIS
	lock = CreateDir( name )
	D0		  D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 CreateDir(STRPTR)

    FUNCTION
	CreateDir creates a new directory with the specified name. An error
	is returned if it fails.  Directories can only be created on
	devices which support them, e.g. disks.  CreateDir returns an
	exclusive lock on the new directory if it succeeds.

    INPUTS
	name - pointer to a null-terminated string

    RESULTS
	lock - BCPL pointer to a lock or NULL for failure.

    SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                
            </literallayout>
        </section>
        <section id="n52">
            <title>dos.library/CreateNewProc</title>
            <literallayout class="monospaced">
                   NAME
	CreateNewProc -- Create a new process (V36)

   SYNOPSIS
	process = CreateNewProc(tags)
	D0                       D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 *CreateNewProc(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *)

	process = CreateNewProcTagList(tags)
	D0                       	D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 *CreateNewProcTagList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *)

	process = CreateNewProcTags(Tag1, ...)

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 *CreateNewProcTags(ULONG, ...)

   FUNCTION
	This creates a new process according to the tags passed in.  See
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dostags.h">dos/dostags.h</ulink>
                 for the tags.

	You must specify one of NP_Seglist or NP_Entry.  NP_Seglist takes a
	seglist (as returned by LoadSeg()).  NP_Entry takes a function
	pointer for the routine to call.

	There are many options, as you can see by examining 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dostags.h">dos/dostags.h</ulink>
                .
	The defaults are for a non-CLI process, with copies of your
	
                <link linkend="n54">CurrentDir</link>
                , HomeDir (used for PROGDIR:), priority, consoletask,
	windowptr, and variables.  The input and output filehandles default
	to opens of NIL:, stack to 4000, and others as shown in dostags.h.
	This is a fairly reasonable default setting for creating threads,
	though you may wish to modify it (for example, to give a descriptive
	name to the process.)

	CreateNewProc() is callable from a task, though any actions that
	require doing Dos I/O (DupLock() of currentdir, for example) will not
	occur.

	NOTE: if you call CreateNewProc() with both NP_Arguments, you must
	not specify an NP_Input of NULL.  When NP_Arguments is specified, it
	needs to modify the input filehandle to make 
                <link linkend="n137">ReadArgs()</link>
                 work properly.

   INPUTS
	tags - a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 array.

   RESULT
	process - The created process, or NULL.  Note that if it returns
		  NULL, you must free any items that were passed in via
		  tags, such as if you passed in a new current directory
		  with NP_CurrentDir.

   BUGS
	In V36, NP_Arguments was broken in a number of ways, and probably
	should be avoided (instead you should start a small piece of your
	own code, which calls 
                <link linkend="n146">RunCommand()</link>
                 to run the actual code you wish
	to run).  In V37, NP_Arguments works, though see the note above.

   SEE ALSO
	
                <link linkend="n109">LoadSeg()</link>
                , 
                <link linkend="n53">CreateProc()</link>
                , 
                <link linkend="n137">ReadArgs()</link>
                , 
                <link linkend="n146">RunCommand()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dostags.h">&lt;dos/dostags.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n53">
            <title>dos.library/CreateProc</title>
            <literallayout class="monospaced">
                    NAME

	CreateProc -- Create a new process

    SYNOPSIS
	process = CreateProc( name, pri, seglist, stackSize )
	D0		      D1    D2	 D3	  D4

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *CreateProc(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                , LONG)

    FUNCTION
	CreateProc() creates a new AmigaDOS process of name 'name'.  AmigaDOS
	processes are a superset of exec tasks.

	A seglist, as returned by 
                <link linkend="n109">LoadSeg()</link>
                , is passed as 'seglist'.
	This represents a section of code which is to be run as a new
	process. The code is entered at the first hunk in the segment list,
	which should contain suitable initialization code or a jump to
	such.  A process control structure is allocated from memory and
	initialized.  If you wish to fake a seglist (that will never
	have DOS 
                <link linkend="n175">UnLoadSeg()</link>
                 called on it), use this code:

		    DS.L    0	;Align to longword
		    DC.L    16	;Segment "length" (faked)
		    DC.L    0	;Pointer to next segment
		    ...start of code...

	The size of the root stack upon activation is passed as
	'stackSize'.  'pri' specifies the required priority of the new
	process.  The result will be the process msgport address of the new
	process, or zero if the routine failed.  The argument 'name'
	specifies the new process name.  A zero return code indicates
	error.

	The seglist passed to CreateProc() is not freed when it exits; it
	is up to the parent process to free it, or for the code to unload
	itself.

	Under V36 and later, you probably should use 
                <link linkend="n52">CreateNewProc()</link>
                 instead.

    INPUTS
	name      - pointer to a null-terminated string
	pri       - signed long (range -128 to +127)
	seglist   - BCPL pointer to a seglist
	stackSize - integer (must be a multiple of 4 bytes)

    RESULTS
	process   - pointer to new process msgport

    SEE ALSO
	
                <link linkend="n52">CreateNewProc()</link>
                , 
                <link linkend="n109">LoadSeg()</link>
                , 
                <link linkend="n175">UnLoadSeg()</link>
                
            </literallayout>
        </section>
        <section id="n54">
            <title>dos.library/CurrentDir</title>
            <literallayout class="monospaced">
                    NAME
	CurrentDir -- Make a directory lock the current directory

    SYNOPSIS
	oldLock = CurrentDir( lock )
	D0		      D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 CurrentDir(BPTR)

    FUNCTION
	CurrentDir() causes a directory associated with a lock to be made
	the current directory.	The old current directory lock is returned.

	A value of zero is a valid result here, this 0 lock represents the
	root of file system that you booted from.

	Any call that has to 
                <link linkend="n126">Open()</link>
                 or 
                <link linkend="n110">Lock()</link>
                 files (etc) requires that
	the current directory be a valid lock or 0.

    INPUTS
	lock - BCPL pointer to a lock

    RESULTS
	oldLock - BCPL pointer to a lock

    SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                , 
                <link linkend="n126">Open()</link>
                , 
                <link linkend="n62">DupLock()</link>
                
            </literallayout>
        </section>
        <section id="n55">
            <title>dos.library/DateStamp</title>
            <literallayout class="monospaced">
                    NAME
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 -- Obtain the date and time in internal format

    SYNOPSIS
	ds = DateStamp( ds );
	D0		D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 *DateStamp(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 *)

    FUNCTION
	DateStamp() takes a structure of three longwords that is set to the
	current time.  The first element in the vector is a count of the
	number of days.  The second element is the number of minutes elapsed
	in the day.  The third is the number of ticks elapsed in the current
	minute.  A tick happens 50 times a second.  DateStamp() ensures that
	the day and minute are consistent.  All three elements are zero if
	the date is unset. DateStamp() currently only returns even
	multiples of 50 ticks.  Therefore the time you get is always an even
	number of ticks.

	Time is measured from Jan 1, 1978.

    INPUTS
	ds - pointer a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                    RESULTS
	The array is filled as described and returned (for pre-V36
	compabability).

    SEE ALSO
	
                <link linkend="n56">DateToStr()</link>
                , 
                <link linkend="n171">StrToDate()</link>
                , 
                <link linkend="n157">SetFileDate()</link>
                , 
                <link linkend="n50">CompareDates()</link>
                
            </literallayout>
        </section>
        <section id="n56">
            <title>dos.library/DateToStr</title>
            <literallayout class="monospaced">
                   NAME
	DateToStr -- Converts a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 to a string (V36)

   SYNOPSIS
	success = DateToStr( datetime )
	D0                      D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 DateToStr(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 *)

   FUNCTION
	DateToStr converts an AmigaDOS 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 to a human
	readable ASCII string as requested by your settings in the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 structure.

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 - a pointer to an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 structure.

	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 structure should be initialized as follows:

	dat_Stamp - a copy of the datestamp you wish to convert to
		  ascii.

	dat_Format - a format	byte which specifies the format	of the
		  dat_StrDate.	This can be any	of the following
		  (note: If value used is something other than those
		  below, the default of	FORMAT_DOS is used):

		  FORMAT_DOS:	  AmigaDOS format (dd-mmm-yy).

		  FORMAT_INT:	  International	format (yy-mmm-dd).

		  FORMAT_USA:	  American format (mm-dd-yy).

		  FORMAT_CDN:	  Canadian format (dd-mm-yy).

		  FORMAT_DEF:	  default format for locale.

	dat_Flags - a	flags byte.  The only flag which affects this
		  function is:

		  DTF_SUBST:	  If set, a string such	as Today,
				  Monday, etc.,	will be	used instead
				  of the dat_Format specification if
				  possible.
		  DTF_FUTURE:	  Ignored by this function.

	dat_StrDay - pointer to a buffer to receive the day of the
		  week string.	(Monday, Tuesday, etc.). If null, this
		  string will not be generated.

	dat_StrDate -	pointer	to a buffer to receive the date
		  string, in the format	requested by dat_Format,
		  subject to possible modifications by DTF_SUBST.  If
		  null,	this string will not be	generated.

	dat_StrTime -	pointer	to a buffer to receive the time	of day
		  string. If NULL, this	will not be generated.

   RESULT
	success	- a zero return indicates that the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 was
		  invalid, and could not be converted.	Non-zero
		  indicates that the call succeeded.

   SEE ALSO
	
                <link linkend="n55">DateStamp()</link>
                , StrtoDate(), 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">&lt;dos/datetime.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n57">
            <title>dos.library/Delay</title>
            <literallayout class="monospaced">    NAME
	Delay -- Delay a process for a specified time

    SYNOPSIS
	Delay( ticks )
	       D1

	void Delay(ULONG)

    FUNCTION
	The argument 'ticks' specifies how many ticks (50 per second) to
	wait before returning control.

    INPUTS
	ticks - integer

    BUGS
	Due to a bug in the timer.device in V1.2/V1.3, specifying a timeout
	of zero for Delay() can cause the unreliable timer &amp; floppy disk
	operation.  This is fixed in V36 and later.

    SEE ALSO
</literallayout>
        </section>
        <section id="n58">
            <title>dos.library/DeleteFile</title>
            <literallayout class="monospaced">
                    NAME
	DeleteFile -- Delete a file or directory

    SYNOPSIS
	success = DeleteFile( name )
	D0		      D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 DeleteFile(STRPTR)

    FUNCTION
	This attempts to delete the file or directory specified by 'name'.
	An error is returned if the deletion fails. Note that all the files
	within a directory must be deleted before the directory itself can
	be deleted.

    INPUTS
	name - pointer to a null-terminated string

    RESULTS
	success - boolean

    SEE ALSO

            </literallayout>
        </section>
        <section id="n59">
            <title>dos.library/DeleteVar</title>
            <literallayout class="monospaced">
                   NAME
	DeleteVar -- Deletes a local or environment variable (V36)

   SYNOPSIS
	success = DeleteVar( name, flags )
	D0		      D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 DeleteVar(STRPTR, ULONG )

   FUNCTION
	Deletes a local or environment variable.

   INPUTS
	name   - pointer to an variable name.  Note variable names follow
		 filesystem syntax and semantics.
	flags  - combination of type of var to delete (low 8 bits), and
		 flags to control the behavior of this routine.  Currently
		 defined flags include:

		 GVF_LOCAL_ONLY  - delete a local (to your process) variable.
		 GVF_GLOBAL_ONLY - delete a global environment variable.

		 The default is to delete a local variable if found, otherwise
		 a global environment variable if found (only for LV_VAR).

   RESULT
	success - If non-zero, the variable was sucessfully deleted, FALSE
		  indicates failure.

   BUGS
	LV_VAR is the only type that can be global

   SEE ALSO
	
                <link linkend="n100">GetVar()</link>
                , 
                <link linkend="n167">SetVar()</link>
                , 
                <link linkend="n81">FindVar()</link>
                , 
                <link linkend="n58">DeleteFile()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/var.h">&lt;dos/var.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n60">
            <title>dos.library/DeviceProc</title>
            <literallayout class="monospaced">
                    NAME
	DeviceProc -- Return the process 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 of specific I/O handler

    SYNOPSIS
	process = DeviceProc( name )
	D0		      D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *DeviceProc (STRPTR)

    FUNCTION
	DeviceProc() returns the process identifier of the process which
	handles the device associated with the specified name. If no
	process handler can be found then the result is zero. If the name
	refers to an assign then a directory lock is returned in 
                <link linkend="n106">IoErr()</link>
                .
	This lock should not be UnLock()ed or Examine()ed (if you wish to do
	so, 
                <link linkend="n62">DupLock()</link>
                 it first).

    BUGS
	In V36, if you try to DeviceProc() something relative to an assign
	made with 
                <link linkend="n42">AssignPath()</link>
                , it will fail.  This is because there's no
	way to know when to unlock the lock.  If you're writing code for
	V36 or later, it is highly advised you use 
                <link linkend="n95">GetDeviceProc()</link>
                 instead,
	or make your code conditional on V36 to use GetDeviceProc()/
	
                <link linkend="n88">FreeDeviceProc()</link>
                .

    SEE ALSO
	
                <link linkend="n95">GetDeviceProc()</link>
                , 
                <link linkend="n88">FreeDeviceProc()</link>
                , 
                <link linkend="n62">DupLock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                , 
                <link linkend="n68">Examine()</link>
                
            </literallayout>
        </section>
        <section id="n61">
            <title>dos.library/DoPkt</title>
            <literallayout class="monospaced">
                   NAME
	DoPkt -- Send a dos packet and wait for reply (V36)

   SYNOPSIS
	result1 = DoPkt(port,action,arg1,arg2,arg3,arg4,arg5)
	D0               D1    D2    D3   D4   D5   D6   D7

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 DoPkt(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,LONG)

   FUNCTION
	Sends a packet to a handler and waits for it to return.  Any secondary
	return will be available in D1 AND from 
                <link linkend="n106">IoErr()</link>
                .  DoPkt() will work
	even if the caller is an exec task and not a process; however it will
	be slower, and may fail for some additional reasons, such as being
	unable to allocate a signal.  DoPkt() uses your pr_MsgPort for the
	reply, and will call pr_PktWait.  (See BUGS regarding tasks, though).

	Only allows 5 arguments to be specified.  For more arguments (packets
	support a maximum of 7) create a packet and use 
                <link linkend="n184">SendPkt()/WaitPkt()</link>
                .

   INPUTS
	port    - pr_MsgPort of the handler process to send to.
	action  - the action requested of the filesystem/handler
	arg1, arg2, arg3, arg4,arg5 - arguments, depend on the action, may not
		   be required.

   RESULT
	result1 - the value returned in dp_Res1, or FALSE if there was some
		  problem in sending the packet or recieving it.
	result2 - Available from 
                <link linkend="n106">IoErr()</link>
                 AND in register D1.

   BUGS
	Using DoPkt() from tasks doesn't work in V36. Use 
                <link linkend="n38">AllocDosObject()</link>
                ,
	
                <link linkend="n267">PutMsg()</link>
                , and 
                <link linkend="n249">WaitPort()/GetMsg()</link>
                 for a workaround, or you can call
	
                <link linkend="n52">CreateNewProc()</link>
                 to start a process to do Dos I/O for you.  In V37,
	DoPkt() will allocate, use, and free the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 required.

   NOTES
	Callable from a task (under V37 and above).

   SEE ALSO
	
                <link linkend="n38">AllocDosObject()</link>
                , 
                <link linkend="n90">FreeDosObject()</link>
                , 
                <link linkend="n152">SendPkt()</link>
                , 
                <link linkend="n184">WaitPkt()</link>
                ,
	
                <link linkend="n52">CreateNewProc()</link>
                , 
                <link linkend="n33">AbortPkt()</link>
                
            </literallayout>
        </section>
        <section id="n62">
            <title>dos.library/DupLock</title>
            <literallayout class="monospaced">
                    NAME
	DupLock -- Duplicate a lock

    SYNOPSIS
	lock = DupLock( lock )
	D0		D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 DupLock(BPTR)

    FUNCTION
	DupLock() is passed a shared filing system lock.  This is the ONLY
	way to obtain a duplicate of a lock... simply copying is not
	allowed.

	Another lock to the same object is then returned.  It is not
	possible to create a copy of a exclusive lock.

	A zero return indicates failure.

    INPUTS
	lock - BCPL pointer to a lock

    RESULTS
	newLock - BCPL pointer to a lock

    SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                , 
                <link linkend="n63">DupLockFromFH()</link>
                , 
                <link linkend="n130">ParentOfFH()</link>
                
            </literallayout>
        </section>
        <section id="n63">
            <title>dos.library/DupLockFromFH</title>
            <literallayout class="monospaced">
                   NAME
	DupLockFromFH -- Gets a lock on an open file (V36)

   SYNOPSIS
	lock = DupLockFromFH(fh)
	D0                   D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 DupLockFromFH(BPTR)

   FUNCTION
	Obtain a lock on the object associated with fh.  Only works if the
	file was opened using a non-exclusive mode.  Other restrictions may be
	placed on success by the filesystem.

   INPUTS
	fh   - Opened file for which to obtain the lock

   RESULT
	lock - Obtained lock or NULL for failure

   SEE ALSO
	
                <link linkend="n62">DupLock()</link>
                , 
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                
            </literallayout>
        </section>
        <section id="n64">
            <title>dos.library/EndNotify</title>
            <literallayout class="monospaced">
                   NAME
	EndNotify -- Ends a notification request (V36)

   SYNOPSIS
	EndNotify(notifystructure)
			D1

	VOID EndNotify(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/notify.h">NotifyRequest</ulink>
                 *)

   FUNCTION
	Removes a notification request.  Safe to call even if 
                <link linkend="n170">StartNotify()</link>
                	failed.  For NRF_SEND_MESSAGE, it searches your port for any messages
	about the object in question and removes and replies them before
	returning.

   INPUTS
	notifystructure - a structure passed to 
                <link linkend="n170">StartNotify()</link>
                   SEE ALSO
	
                <link linkend="n170">StartNotify()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/notify.h">&lt;dos/notify.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n65">
            <title>dos.library/ErrorReport</title>
            <literallayout class="monospaced">
                   NAME
	ErrorReport -- Displays a Retry/Cancel requester for an error (V36)

   SYNOPSIS
	status = ErrorReport(code, type, arg1, device)
	D0                    D1    D2    D3     D4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ErrorReport(LONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *)

   FUNCTION
	Based on the request type, this routine formats the appropriate
	requester to be displayed.  If the code is not understood, it returns
	DOS_TRUE immediately.  Returns DOS_TRUE if the user selects CANCEL or
	if the attempt to put up the requester fails, or if the process
	pr_WindowPtr is -1.  Returns FALSE if the user selects Retry.  The
	routine will retry on DISKINSERTED for appropriate error codes.
	These return values are the opposite of what 
                <link linkend="n328">AutoRequest</link>
                 returns.

	Note: this routine sets 
                <link linkend="n106">IoErr()</link>
                 to code before returning.

   INPUTS
	code   - Error code to put a requester up for.
	   Current valid error codes are:
		ERROR_DISK_NOT_VALIDATED
		ERROR_DISK_WRITE_PROTECTED
		ERROR_DISK_FULL
		ERROR_DEVICE_NOT_MOUNTED
		ERROR_NOT_A_DOS_DISK
		ERROR_NO_DISK
		ABORT_DISK_ERROR	/* read/write error */
		ABORT_BUSY		/* you MUST replace... */
	type   - 
                <link linkend="n407">Request</link>
                 type:
                       REPORT_LOCK   - arg1 is a lock (BPTR).
                       REPORT_FH     - arg1 is a filehandle (BPTR).
			REPORT_VOLUME - arg1 is a volumenode (C pointer).
			REPORT_INSERT - arg1 is the string for the volumename
					(will be split on a ':').
					With ERROR_DEVICE_NOT_MOUNTED puts
					up the "Please insert..." requester.
	arg1   - variable parameter (see type)
	device - (Optional) Address of handler task for which report is to be
                made.  Only required for REPORT_LOCK, and only if arg1==NULL.

   RESULT
	status - Cancel/Retry indicator (0 means Retry)

   SEE ALSO
	
                <link linkend="n73">Fault()</link>
                , 
                <link linkend="n106">IoErr()</link>
                
            </literallayout>
        </section>
        <section id="n66">
            <title>dos.library/ExAll</title>
            <literallayout class="monospaced">
                   NAME
	ExAll -- 
                <link linkend="n68">Examine</link>
                 an entire directory (V36)

   SYNOPSIS
	continue = ExAll(lock, buffer, size, type, control)
	D0               D1     D2     D3    D4     D5

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ExAll(BPTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/exall.h">ExAllControl</ulink>
                 *)

   FUNCTION
	Examines an entire directory.

 
                <link linkend="n110">Lock</link>
                 must be on a directory.  Size is the size of the buffer supplied.
 The buffer will be filled with (partial) 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/exall.h">ExAllData</ulink>
                 structures, as
 specified by the type field.

 Type is a value from those shown below that determines which information is
 to be stored in the buffer.  Each higher value adds a new thing to the list
 as described in the table below:-

	ED_NAME		FileName
	ED_TYPE		Type
	ED_SIZE		Size in bytes
	ED_PROTECTION	Protection bits
	ED_DATE		3 longwords of date
	ED_COMMENT	Comment (will be NULL if no comment)
			Note: the V37 ROM/disk filesystem returns this
			incorrectly as a BSTR.  See BUGS for a workaround.
	ED_OWNER	owner user-id and group-id (if supported)  (V39)

 Thus, ED_NAME gives only filenames, and ED_OWNER gives everything.

 NOTE: V37 dos.library, when doing ExAll() emulation, and RAM: filesystem
 will return an error if passed ED_OWNER.  If you get ERROR_BAD_NUMBER,
 retry with ED_COMMENT to get everything but owner info.  All filesystems
 supporting ExAll() must support through ED_COMMENT, and must check Type
 and return ERROR_BAD_NUMBER if they don't support the type.

 The V37 ROM/disk filesystem doesn't fill in the comment field correctly
 if you specify ED_OWNER.  See BUGS for a workaround if you need to use
 ED_OWNER.

 The ead_Next entry gives a pointer to the next entry in the buffer.  The
 last entry will have NULL in ead_Next.

 The control structure is required so that FFS can keep track if more than
 one call to ExAll is required.  This happens when there are more names in
 a directory than will fit into the buffer.  The format of the control
 structure is as follows:-

 NOTE: the control structure MUST be allocated by AllocDosObject!!!

 Entries:  This field tells the calling application how many entries are
	    in the buffer after calling ExAll.  Note: make sure your code
	    handles the 0 entries case, including 0 entries with continue
	    non-zero.

 LastKey:  This field ABSOLUTELY MUST be initialised to 0 before calling
	    ExAll for the first time.  Any other value will cause nasty
	    things to happen.  If ExAll returns non-zero, then this field
	    should not be touched before making the second and subsequent
	    calls to ExAll.  Whenever ExAll returns non-zero, there are more
	    calls required before all names have been received.

	    As soon as a FALSE return is received then ExAll has completed
	    (if 
                <link linkend="n106">IoErr()</link>
                 returns ERROR_NO_MORE_ENTRIES - otherwise it returns
	    the error that occured, similar to ExNext.)

 MatchString
	    If this field is NULL then all filenames will be returned.  If
	    this field is non-null then it is interpreted as a pointer to
	    a string that is used to pattern match all file names before
	    accepting them and putting them into the buffer.  The default
	    AmigaDOS caseless pattern match routine is used.  This string
	    MUST have been parsed by ParsePatternNoCase()!

 MatchFunc:
	    Contains a pointer to a hook for a routine to decide if the entry
	    will be included in the returned list of entries.  The entry is
	    filled out first, and then passed to the hook.  If no MatchFunc is
	    to be called then this entry should be NULL.  The hook is
	    called with the following parameters (as is standard for hooks):

	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 = MatchFunc( hookptr, data, typeptr )
				a0	a1	a2
	    (a0 = ptr to hook, a1 = ptr to filled in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/exall.h">ExAllData</ulink>
                , a2 = ptr
	     to longword of type).

	    MatchFunc should return FALSE if the entry is not to be
	    accepted, otherwise return TRUE.

	Note that Dos will emulate ExAll() using 
                <link linkend="n68">Examine()</link>
                 and 
                <link linkend="n72">ExNext()</link>
                	if the handler in question doesn't support the ExAll() packet.

   INPUTS
	lock    - 
                <link linkend="n110">Lock</link>
                 on directory to be examined.
	buffer  - Buffer for data returned (MUST be at least word-aligned,
		  preferably long-word aligned).
	size    - Size in bytes of 'buffer'.
	type    - Type of data to be returned.
	control - Control data structure (see notes above).  MUST have been
		  allocated by AllocDosObject!

   RESULT
	continue - Whether or not ExAll is done.  If FALSE is returned, either
		   ExAll has completed (IoErr() == ERROR_NO_MORE_ENTRIES), or
		   an error occurred (check IoErr()).  If non-zero is returned,
		   you MUST call ExAll again until it returns FALSE.

   EXAMPLE

   eac = AllocDosObject(DOS_EXALLCONTROL,NULL);
   if (!eac) ...
   ...
   eac-&gt;eac_LastKey = 0;
   do {
       more = ExAll(lock, EAData, sizeof(EAData), ED_FOO, eac);
       if ((!more) &amp;&amp; (IoErr() != ERROR_NO_MORE_ENTRIES)) {
           \* ExAll failed abnormally *\
           break;
       }
       if (eac-&gt;eac_Entries == 0) {
           \* ExAll failed normally with no entries *\
           continue;                   \* ("more" is *usually* zero) *\
       }
       ead = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/exall.h">ExAllData</ulink>
                 *) EAData;
       do {
           \* use ead here *\
           ...
           \* get next ead *\
           ead = ead-&gt;ed_Next;
       } while (ead);

   } while (more);
   ...
   FreeDosObject(DOS_EXALLCONTROL,eac);

   BUGS
	In V36, there were problems with ExAll (particularily with
	eac_MatchString, and ed_Next with the ramdisk and the emulation
	of it in Dos for handlers that do not support the packet.  It is
	advised you only use this under V37 and later.

	The V37 ROM/disk filesystem incorrectly returned comments as BSTR's
	(length plus characters) instead of CSTR's (null-terminated).  See
	the next bug for a way to determine if the filesystem is a V37
	ROM/disk filesystem.  Fixed in V39.

	The V37 ROM/disk filesystem incorrectly handled values greater than
	ED_COMMENT.  Because of this, ExAll() information is trashed if
	ED_OWNER is passed to it.  Fixed in V39.  To work around this, use
	the following code to identify if a filesystem is a V37 ROM/disk
	filesystem:

 // return TRUE if this is a V37 ROM filesystem, which doesn't (really)
 // support ED_OWNER safely

 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 CheckV37(BPTR lock)
 {
 	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">FileLock</ulink>
                 *l = BADDR(lock);
 	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">Resident</ulink>
                 *resident;
 	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *dl;
 	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 result = FALSE;

 	dl = LockDosList(LDF_READ|LDF_DEVICES);

 	// if the lock has a volume and no device, we won't find it,
	// so we know it's not a V37 ROM/disk filesystem
 	do {
 	    dl = NextDosEntry(dl,LDF_READ|LDF_DEVICES);
 	    if (dl &amp;&amp; (dl-&gt;dol_Task == l-&gt;fl_Task))
 	    {
 		// found the filesystem - test isn't actually required,
		// but we know the filesystem we're looking for will always
		// have a startup msg.  If we needed to examine the message,
		// we would need a _bunch_ of checks to make sure it's not
		// either a small value (like port-handler uses) or a BSTR.
 		if (dl-&gt;dol_misc.dol_handler.dol_Startup)
 		{
 			// try to make sure it's the ROM fs or l:FastFileSystem
 			if (resident =
 			    FindRomTag(dl-&gt;dol_misc.dol_handler.dol_SegList))
 			{
 				if (resident-&gt;rt_Version &lt; 39 &amp;&amp;
 				    (strncmp(resident-&gt;rt_IdString,"fs 37.",
 					     strlen("fs 37.")) == 0 ||
 				     strncmp(resident-&gt;rt_Name,"ffs 37.",
 					     strlen("ffs 37.")) == 0))
 				{
 					result = TRUE;
 				}
 			}
 		}
 		break;
 	    }
 	} while (dl);

 	UnLockDosList(LDF_READ|LDF_DEVICES);

 	return result;
 }


   SEE ALSO
	
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <link linkend="n69">ExamineFH()</link>
                , 
                <link linkend="n120">MatchPatternNoCase()</link>
                ,
	
                <link linkend="n132">ParsePatternNoCase()</link>
                , 
                <link linkend="n38">AllocDosObject()</link>
                , 
                <link linkend="n67">ExAllEnd()</link>
                
            </literallayout>
        </section>
        <section id="n67">
            <title>dos.library/ExAllEnd</title>
            <literallayout class="monospaced">
                   NAME
	ExAllEnd -- Stop an 
                <link linkend="n66">ExAll()</link>
                 (V39)

   SYNOPSIS
	ExAllEnd(lock, buffer, size, type, control)
	          D1     D2     D3    D4     D5

	ExAllEnd(BPTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/exall.h">ExAllControl</ulink>
                 *)

   FUNCTION
	Stops an 
                <link linkend="n66">ExAll()</link>
                 on a directory before it hits NO_MORE_ENTRIES.
	The full set of arguments that had been passed to 
                <link linkend="n66">ExAll()</link>
                 must be
	passed to ExAllEnd(), so it can handle filesystems that can't abort
	an 
                <link linkend="n66">ExAll()</link>
                 directly.

   INPUTS
	lock    - 
                <link linkend="n110">Lock</link>
                 on directory to be examined.
	buffer  - Buffer for data returned (MUST be at least word-aligned,
		  preferably long-word aligned).
	size    - Size in bytes of 'buffer'.
	type    - Type of data to be returned.
	control - Control data structure (see notes above).  MUST have been
		  allocated by AllocDosObject!

   SEE ALSO
	
                <link linkend="n66">ExAll()</link>
                , 
                <link linkend="n38">AllocDosObject()</link>
                
            </literallayout>
        </section>
        <section id="n68">
            <title>dos.library/Examine</title>
            <literallayout class="monospaced">
                    NAME
	Examine -- Examine a directory or file associated with a lock

    SYNOPSIS
	success = Examine( lock, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 )
	D0		    D1	      D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Examine(BPTR,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 *)

    FUNCTION
	Examine() fills in information in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 concerning the
	file or directory associated with the lock. This information
	includes the name, size, creation date and whether it is a file or
	directory.  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 must be longword aligned.  Examine() gives
	a return code of zero if it fails.

	You may make a local copy of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                , as long as it is
	never passed to 
                <link linkend="n72">ExNext()</link>
                .

    INPUTS
	lock	  - BCPL pointer to a lock
	infoBlock - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 (MUST be longword aligned)

    RESULTS
	success - boolean

    SPECIAL NOTE
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 must be longword-aligned.  
                <link linkend="n38">AllocDosObject()</link>
                 will
	allocate them correctly for you.

    SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <link linkend="n69">ExamineFH()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                , 
                <link linkend="n38">AllocDosObject()</link>
                ,
	
                <link linkend="n66">ExAll()</link>
                
            </literallayout>
        </section>
        <section id="n69">
            <title>dos.library/ExamineFH</title>
            <literallayout class="monospaced">
                   NAME
	ExamineFH -- Gets information on an open file (V36)

   SYNOPSIS
	success = ExamineFH(fh, fib)
	D0                  D1  D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ExamineFH(BPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 *)

   FUNCTION
	Examines a filehandle and returns information about the file in the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                .  There are no guarantees as to whether the fib_Size
	field will reflect any changes made to the file size it was opened,
	though filesystems should attempt to provide up-to-date information
	for it.

   INPUTS
	fh  - Filehandle you wish to examine
	fib - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                , must be longword aligned.

   RESULT
	success - Success/failure indication

   SEE ALSO
	
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <link linkend="n66">ExAll()</link>
                , 
                <link linkend="n126">Open()</link>
                , 
                <link linkend="n38">AllocDosObject()</link>
                
            </literallayout>
        </section>
        <section id="n70">
            <title>dos.library/Execute</title>
            <literallayout class="monospaced">
                    NAME
	Execute -- Execute a CLI command

    SYNOPSIS
	success = Execute( commandString, input, output )
	D0		   D1		  D2	 D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Execute(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                , BPTR)

    FUNCTION
	This function attempts to execute the string commandString as a
	Shell command and arguments. The string can contain any valid input
	that you could type directly in a Shell, including input and output
	redirection using &lt; and &gt;.  Note that Execute() doesn't return until
	the command(s) in commandstring have returned.

	The input file handle will normally be zero, and in this case
	Execute() will perform whatever was requested in the commandString
	and then return. If the input file handle is nonzero then after the
	(possibly empty) commandString is performed subsequent input is read
	from the specified input file handle until end of that file is
	reached.

	In most cases the output file handle must be provided, and is used
	by the Shell commands as their output stream unless output
	redirection was specified. If the output file handle is set to zero
	then the current window, normally specified as *, is used. Note
	that programs running under the Workbench do not normally have a
	current window.

	Execute() may also be used to create a new interactive Shell process
	just like those created with the NewShell command. In order to do
	this you would call Execute() with an empty commandString, and pass
	a file handle relating to a new window as the input file handle.
	The output file handle would be set to zero. The Shell will read
	commands from the new window, and will use the same window for
	output. This new Shell window can only be terminated by using the
	EndCLI command.

	Under V37, if an input filehandle is passed, and it's either
	interactive or a NIL: filehandle, the pr_ConsoleTask of the new
	process will be set to that filehandle's process (the same applies
	to 
                <link linkend="n173">SystemTagList()</link>
                ).

	For this command to work the program Run must be present in C: in
	versions before V36 (except that in 1.3.2 and any later 1.3 versions,
	the system first checks the resident list for Run).

    INPUTS
	commandString - pointer to a null-terminated string
	input	      - BCPL pointer to a file handle
	output	      - BCPL pointer to a file handle

    RESULTS
	success - BOOLEAN indicating whether Execute was successful
		  in finding and starting the specified program.  Note this
		  is NOT the return code of the command(s).
    SEE ALSO
	
                <link linkend="n173">SystemTagList()</link>
                , NewShell, EndCLI, Run

            </literallayout>
        </section>
        <section id="n71">
            <title>dos.library/Exit</title>
            <literallayout class="monospaced">
                    NAME
	Exit -- Exit from a program

    SYNOPSIS
	Exit( returnCode )
	      D1

	void Exit(LONG)

    FUNCTION
	Exit() is currently for use with programs written as if they
	were BCPL programs.  This function is not normally useful for
	other purposes.

	In general, therefore, please DO NOT CALL THIS FUNCTION!

	In order to exit, C programs should use the C language exit()
	function (note the lower case letter "e").  Assembly programs should
	place a return code in D0, and execute an RTS instruction with
	their original stack ptr.

    IMPLEMENTATION
	The action of Exit() depends on whether the program which called it
	is running as a command under a CLI or not. If the program is
	running under the CLI the command finishes and control reverts to
	the CLI. In this case, returnCode is interpreted as the return code
	from the program.

	If the program is running as a distinct process, Exit() deletes the
	process and release the space associated with the stack, segment
	list and process structure.

    INPUTS
	returnCode - integer

    SEE ALSO
	
                <link linkend="n53">CreateProc()</link>
                , 
                <link linkend="n52">CreateNewProc()</link>
                
            </literallayout>
        </section>
        <section id="n72">
            <title>dos.library/ExNext</title>
            <literallayout class="monospaced">
                    NAME
	ExNext -- 
                <link linkend="n68">Examine</link>
                 the next entry in a directory

    SYNOPSIS
	success = ExNext( lock, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 )
	D0		   D1	     D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ExNext(BPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 *)

    FUNCTION
	This routine is passed a directory lock and a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 that
	have been initialized by a previous call to 
                <link linkend="n68">Examine()</link>
                , or updated
	by a previous call to ExNext().  ExNext() gives a return code of zero
	on failure.  The most common cause of failure is reaching the end
	of the list of files in the owning directory.  In this case, 
                <link linkend="n106">IoErr</link>
                	will return ERROR_NO_MORE_ENTRIES and a good exit is appropriate.

	So, follow these steps to examine a directory:
	1) Pass a 
                <link linkend="n110">Lock</link>
                 and a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 to 
                <link linkend="n68">Examine()</link>
                .  The lock must
	   be on the directory you wish to examine.
	2) Pass ExNext() the same lock and 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                .
	3) Do something with the information returned in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                .
	   Note that the fib_DirEntryType field is positive for directories,
	   negative for files.
	4) Keep calling ExNext() until it returns FALSE.  Check 
                <link linkend="n106">IoErr()</link>
                	   to ensure that the reason for failure was ERROR_NO_MORE_ENTRIES.

	Note: if you wish to recursively scan the file tree and you find
	another directory while ExNext()ing you must 
                <link linkend="n110">Lock</link>
                 that directory and
	
                <link linkend="n68">Examine()</link>
                 it using a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                .  Use of the same
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 to enter a directory would lose important state
	information such that it will be impossible to continue scanning
	the parent directory.  While it is permissible to 
                <link linkend="n176">UnLock()</link>
                 and 
                <link linkend="n110">Lock()</link>
                	the parent directory between ExNext() calls, this is NOT recommended.
	Important state information is associated with the parent lock, so
	if it is freed between ExNext() calls this information has to be
	rebuilt on each new ExNext() call, and will significantly slow down
	directory scanning.

	It is NOT legal to 
                <link linkend="n68">Examine()</link>
                 a file, and then to ExNext() from that
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                .	You may make a local copy of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                , as
	long as it is never passed back to the operating system.

    INPUTS
	lock - BCPL pointer to a lock originally used for the 
                <link linkend="n68">Examine()</link>
                 call
	infoBlock - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 used on the previous 
                <link linkend="n68">Examine()</link>
                		    or ExNext() call.

    RESULTS
	success - boolean

    SPECIAL NOTE
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 must be longword-aligned.  
                <link linkend="n38">AllocDosObject()</link>
                 will
	allocate them correctly for you.

    SEE ALSO
	
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                , 
                <link linkend="n106">IoErr()</link>
                , 
                <link linkend="n69">ExamineFH()</link>
                , 
                <link linkend="n38">AllocDosObject()</link>
                ,
	
                <link linkend="n66">ExAll()</link>
                
            </literallayout>
        </section>
        <section id="n73">
            <title>dos.library/Fault</title>
            <literallayout class="monospaced">
                   NAME
	Fault -- Returns the text associated with a DOS error code (V36)

   SYNOPSIS
	len = Fault(code, header, buffer, len)
	D0           D1     D2      D3    D4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 Fault(LONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , LONG)

   FUNCTION
	This routine obtains the error message text for the given error code.
	The header is prepended to the text of the error message, followed
	by a colon.  Puts a null-terminated string for the error message into
	the buffer.  By convention, error messages should be no longer than 80
	characters (+1 for termination), and preferably no more than 60.
	The value returned by 
                <link linkend="n106">IoErr()</link>
                 is set to the code passed in.  If there
	is no message for the error code, the message will be "Error code
	&lt;number&gt;\n".

	The number of characters put into the buffer is returned, which will
	be 0 if the code passed in was 0.

   INPUTS
	code   - Error code
	header - header to output before error text
	buffer - Buffer to receive error message.
	len    - Length of the buffer.

   RESULT
	len    - number of characters put into buffer (may be 0)

   SEE ALSO
	
                <link linkend="n106">IoErr()</link>
                , 
                <link linkend="n160">SetIoErr()</link>
                , 
                <link linkend="n134">PrintFault()</link>
                   BUGS
	In older documentation, the return was shown as 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 success.  This
	was incorrect, it has always returned the length.

            </literallayout>
        </section>
        <section id="n74">
            <title>dos.library/FGetC</title>
            <literallayout class="monospaced">
                   NAME
	FGetC -- 
                <link linkend="n136">Read</link>
                 a character from the specified input (buffered) (V36)

   SYNOPSIS
	char = FGetC(fh)
	D0	     D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FGetC(BPTR)

   FUNCTION
	Reads the next character from the input stream.  A -1 is
	returned when EOF or an error is encountered.  This call is buffered.
	Use 
                <link linkend="n82">Flush()</link>
                 between buffered and unbuffered I/O on a filehandle.

   INPUTS
	fh - filehandle to use for buffered I/O

   RESULT
	char - character read (0-255) or -1

   BUGS
	In V36, after an EOF was read, EOF would always be returned from
	FGetC() from then on.  Starting in V37, it tries to read from the
	handler again each time (unless UnGetC(fh,-1) was called).

   SEE ALSO
	
                <link linkend="n84">FPutC()</link>
                , 
                <link linkend="n174">UnGetC()</link>
                , 
                <link linkend="n82">Flush()</link>
                
            </literallayout>
        </section>
        <section id="n75">
            <title>dos.library/FGets</title>
            <literallayout class="monospaced">
                   NAME
	FGets -- Reads a line from the specified input (buffered) (V36)

   SYNOPSIS
	buffer = FGets(fh, buf, len)
	D0             D1  D2   D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 FGets(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ULONG)

   FUNCTION
	This routine reads in a single line from the specified input stopping
	at a NEWLINE character or EOF.  In either event, UP TO the number of
	len specified bytes minus 1 will be copied into the buffer.  Hence if
	a length of 50 is passed and the input line is longer than 49 bytes,
	it will return 49 characters.  It returns the buffer pointer normally,
	or NULL if EOF is the first thing read.

	If terminated by a newline, the newline WILL be the last character in
	the buffer.  This is a buffered read routine.  The string read in IS
	null-terminated.

   INPUTS
	fh  - filehandle to use for buffered I/O
	buf - Area to read bytes into.
	len - Number of bytes to read, must be &gt; 0.

   RESULT
	buffer - Pointer to buffer passed in, or NULL for immediate EOF or for
		 an error.  If NULL is returnd for an EOF, 
                <link linkend="n106">IoErr()</link>
                 will return
		 0.

   BUGS
	In V36 and V37, it copies one more byte than it should if it doesn't
	hit an EOF or newline.  In the example above, it would copy 50 bytes
	and put a null in the 51st.  This is fixed in dos V39.  Workaround
	for V36/V37: pass in buffersize-1.

   SEE ALSO
	
                <link linkend="n86">FRead()</link>
                , 
                <link linkend="n85">FPuts()</link>
                , 
                <link linkend="n74">FGetC()</link>
                
            </literallayout>
        </section>
        <section id="n76">
            <title>dos.library/FilePart</title>
            <literallayout class="monospaced">
                   NAME
	FilePart -- Returns the last component of a path (V36)

   SYNOPSIS
	fileptr = FilePart( path )
	D0		     D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 FilePart( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 )

   FUNCTION
	This function returns a pointer to the last component of a string path
	specification, which will normally be the file name.  If there is only
	one component, it returns a pointer to the beginning of the string.

   INPUTS
	path - pointer to an path string.  May be relative to the current
	       directory or the current disk.

   RESULT
	fileptr - pointer to the last component of the path.

   EXAMPLE
	FilePart("xxx:yyy/zzz/qqq") would return a pointer to the first 'q'.
	FilePart("xxx:yyy") would return a pointer to the first 'y').

   SEE ALSO
	
                <link linkend="n133">PathPart()</link>
                , 
                <link linkend="n36">AddPart()</link>
                
            </literallayout>
        </section>
        <section id="n77">
            <title>dos.library/FindArg</title>
            <literallayout class="monospaced">
                   NAME
	FindArg - find a keyword in a template (V36)

   SYNOPSIS
	index = FindArg(template, keyword)
	D0                D1        D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FindArg(STRPTR, STRPTR)

   FUNCTION
	Returns the argument number of the keyword, or -1 if it is not a
	keyword for the template.  Abbreviations are handled.

   INPUTS
	keyword  - keyword to search for in template
	template - template string to search

   RESULT
	index - number of entry in template, or -1 if not found

   BUGS
	In earlier published versions of the autodoc, keyword and template
	were backwards.

   SEE ALSO
	
                <link linkend="n137">ReadArgs()</link>
                , 
                <link linkend="n138">ReadItem()</link>
                , 
                <link linkend="n87">FreeArgs()</link>
                
            </literallayout>
        </section>
        <section id="n78">
            <title>dos.library/FindCliProc</title>
            <literallayout class="monospaced">
                   NAME
	FindCliProc -- returns a pointer to the requested CLI process (V36)

   SYNOPSIS
	proc = FindCliProc(num)
	D0             D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 *FindCliProc(ULONG)

   FUNCTION
	This routine returns a pointer to the CLI process associated with the
	given CLI number.  If the process isn't an active CLI process, NULL is
	returned.  NOTE: should normally be called inside a 
                <link linkend="n241">Forbid()</link>
                , if you
	must use this function at all.

   INPUTS
	num  - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 number of CLI process (range 1-N)

   RESULT
	proc - Pointer to given CLI process

   SEE ALSO
	
                <link linkend="n46">Cli()</link>
                , 
                <link linkend="n241">Forbid()</link>
                , 
                <link linkend="n121">MaxCli()</link>
                
            </literallayout>
        </section>
        <section id="n79">
            <title>dos.library/FindDosEntry</title>
            <literallayout class="monospaced">
                   NAME
	FindDosEntry -- Finds a specific Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 entry (V36)

   SYNOPSIS
	newdlist = FindDosEntry(dlist,name,flags)
	D0                       D1    D2   D3

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *FindDosEntry(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,ULONG)

   FUNCTION
	Locates an entry on the device list.  Starts with the entry dlist.
	NOTE: must be called with the device list locked, no references may be
	made to dlist after unlocking.

   INPUTS
	dlist    - The device entry to start with.
	name     - Name of device entry (without ':') to locate.
	flags    - Search control flags.  Use the flags you passed to
		   
                <link linkend="n111">LockDosList</link>
                , or a subset of them.  LDF_READ/LDF_WRITE are
		   not required for this call.

   RESULT
	newdlist - The device entry or NULL

   SEE ALSO
	
                <link linkend="n35">AddDosEntry()</link>
                , 
                <link linkend="n142">RemDosEntry()</link>
                , 
                <link linkend="n125">NextDosEntry()</link>
                , 
                <link linkend="n111">LockDosList()</link>
                ,
	
                <link linkend="n114">MakeDosEntry()</link>
                , 
                <link linkend="n89">FreeDosEntry()</link>
                
            </literallayout>
        </section>
        <section id="n80">
            <title>dos.library/FindSegment</title>
            <literallayout class="monospaced">
                   NAME
	FindSegment - Finds a segment on the resident list (V36)

   SYNOPSIS
	segment = FindSegment(name, start, system)
	D0		       D1     D2     D3

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Segment</ulink>
                 *FindSegment(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Segment</ulink>
                 *, LONG)

   FUNCTION
	Finds a segment on the Dos resident list by name and type, starting
	at the segment AFTER 'start', or at the beginning if start is NULL.
	If system is zero, it will only return nodes with a seg_UC of 0
	or more.  It does NOT increment the seg_UC, and it does NOT do any
	locking of the list.  You must 
                <link linkend="n241">Forbid()</link>
                 lock the list to use this
	call.

	To use an entry you have found, you must: if the seg_UC is 0 or more,
	increment it, and decrement it (under Forbid()!) when you're done
	the the seglist.

	The other values for seg_UC are:
		-1   - system module, such as a filesystem or shell
		-2   - resident shell command
		-999 - disabled internal command, ignore
	Negative values should never be modified.  All other negative
	values between 0 and -32767 are reserved to AmigaDos and should not
	be used.

   INPUTS
	name   - name of segment to find
	start  - segment to start the search after
	system - true for system segment, false for normal segments

   RESULT
	segment - the segment found or NULL

   SEE ALSO
	
                <link linkend="n37">AddSegment()</link>
                , 
                <link linkend="n143">RemSegment()</link>
                , 
                <link linkend="n241">Forbid()</link>
                
            </literallayout>
        </section>
        <section id="n81">
            <title>dos.library/FindVar</title>
            <literallayout class="monospaced">
                   NAME
	FindVar -- Finds a local variable (V36)

   SYNOPSIS
	var = FindVar( name, type )
	D0		D1    D2

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/var.h">LocalVar</ulink>
                 * FindVar(STRPTR, ULONG )

   FUNCTION
	Finds a local variable structure.

   INPUTS
	name - pointer to an variable name.  Note variable names follow
	       filesystem syntax and semantics.

	type - type of variable to be found (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/var.h">&lt;dos/var.h&gt;</ulink>
                )

   RESULT

	var  - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/var.h">LocalVar</ulink>
                 structure or NULL

   SEE ALSO
	
                <link linkend="n100">GetVar()</link>
                , 
                <link linkend="n167">SetVar()</link>
                , 
                <link linkend="n59">DeleteVar()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/var.h">&lt;dos/var.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n82">
            <title>dos.library/Flush</title>
            <literallayout class="monospaced">
                   NAME
	Flush -- Flushes buffers for a buffered filehandle (V36)

   SYNOPSIS
	success = Flush(fh)
	D0		D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 Flush(BPTR)

   FUNCTION
	Flushes any pending buffered writes to the filehandle.  All buffered
	writes will also be flushed on 
                <link linkend="n49">Close()</link>
                .  If the filehandle was being
	used for input, it drops the buffer, and tries to 
                <link linkend="n149">Seek()</link>
                 back to the
	last read position  (so subsequent reads or writes will occur at the
	expected position in the file).

   INPUTS
	fh	- Filehandle to flush.

   RESULT
	success - Success or failure.

   BUGS
	Before V37 release, Flush() returned a random value.  As of V37,
	it always returns success (this will be fixed in some future
	release).

	The V36 and V37 releases didn't properly flush filehandles which
	have never had a buffered IO done on them.  This commonly occurs
	on redirection of input of a command, or when opening a file for
	input and then calling 
                <link linkend="n52">CreateNewProc()</link>
                 with NP_Arguments, or when
	using a new filehandle with 
                <link linkend="n150">SelectInput()</link>
                 and then calling
	
                <link linkend="n146">RunCommand()</link>
                .  This is fixed in V39.  A workaround would be to
	do 
                <link linkend="n74">FGetC()</link>
                , then 
                <link linkend="n174">UnGetC()</link>
                , then Flush().

   SEE ALSO
	FputC(), 
                <link linkend="n74">FGetC()</link>
                , 
                <link linkend="n174">UnGetC()</link>
                , 
                <link linkend="n149">Seek()</link>
                , 
                <link linkend="n49">Close()</link>
                , 
                <link linkend="n52">CreateNewProc()</link>
                ,
	
                <link linkend="n150">SelectInput()</link>
                , 
                <link linkend="n146">RunCommand()</link>
                
            </literallayout>
        </section>
        <section id="n83">
            <title>dos.library/Format</title>
            <literallayout class="monospaced">
                   NAME
	Format -- Causes a filesystem to initialize itself (V36)

   SYNOPSIS
	success = Format(filesystem, volumename, dostype)
	D0                   D1          D2         D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Format(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ULONG)

   FUNCTION
	Interface for initializing new media on a device.  This causes the
	filesystem to write out an empty disk structure to the media, which
	should then be ready for use.  This assumes the media has been low-
	level formatted and verified already.

	The filesystem should be inhibited before calling Format() to make
	sure you don't get an ERROR_OBJECT_IN_USE.

   INPUTS
	filesystem - Name of device to be formatted.  ':' must be supplied.
	volumename - Name for volume (if supported).  No ':'.
	dostype    - Type of format, if filesystem supports multiple types.

   RESULT
	success - Success/failure indicator.

   BUGS
	Existed, but was non-functional in V36 dos.  (The volumename wasn't
	converted to a BSTR.)  Workaround: require V37, or under V36
	convert volumename to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 to a BSTR before calling Format().
	Note: a number of printed packet docs for ACTION_FORMAT are wrong
	as to the arguments.

   SEE ALSO

            </literallayout>
        </section>
        <section id="n84">
            <title>dos.library/FPutC</title>
            <literallayout class="monospaced">
                   NAME
	FPutC -- 
                <link linkend="n185">Write</link>
                 a character to the specified output (buffered) (V36)

   SYNOPSIS
	char = FPutC(fh, char)
	D0           D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FPutC(BPTR, LONG)

   FUNCTION
	Writes a single character to the output stream.  This call is
	buffered.  Use 
                <link linkend="n82">Flush()</link>
                 between buffered and unbuffered I/O on a
	filehandle.  Interactive filehandles are flushed automatically
	on a newline, return, '\0', or line feed.

   INPUTS
	fh   - filehandle to use for buffered I/O
	char - character to write

   RESULT
	char - either the character written, or EOF for an error.

   BUGS
	Older autodocs indicated that you should pass a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                .  The
	correct usage is to pass a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 in the range 0-255.

   SEE ALSO
	
                <link linkend="n74">FGetC()</link>
                , 
                <link linkend="n174">UnGetC()</link>
                , 
                <link linkend="n82">Flush()</link>
                
            </literallayout>
        </section>
        <section id="n85">
            <title>dos.library/FPuts</title>
            <literallayout class="monospaced">
                   NAME
	FPuts -- Writes a string the the specified output (buffered) (V36)

   SYNOPSIS
	error = FPuts(fh, str)
	D0            D1  D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FPuts(BPTR, STRPTR)

   FUNCTION
	This routine writes an unformatted string to the filehandle.  No
	newline is appended to the string.  This routine is buffered.

   INPUTS
	fh    - filehandle to use for buffered I/O
	str   - Null-terminated string to be written to default output

   RESULT
	error - 0 normally, otherwise -1.  Note that this is opposite of
		most other Dos functions, which return success.

   SEE ALSO
	
                <link linkend="n75">FGets()</link>
                , 
                <link linkend="n84">FPutC()</link>
                , 
                <link linkend="n91">FWrite()</link>
                , 
                <link linkend="n135">PutStr()</link>
                
            </literallayout>
        </section>
        <section id="n86">
            <title>dos.library/FRead</title>
            <literallayout class="monospaced">
                   NAME
	FRead -- Reads a number of blocks from an input (buffered) (V36)

   SYNOPSIS
	count = FRead(fh, buf, blocklen, blocks)
	D0	      D1  D2     D3        D4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FRead(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ULONG, ULONG)

   FUNCTION
	Attempts to read a number of blocks, each blocklen long, into the
	specified buffer from the input stream.  May return less than
	the number of blocks requested, either due to EOF or read errors.
	This call is buffered.

   INPUTS
	fh	 - filehandle to use for buffered I/O
	buf      - Area to read bytes into.
	blocklen - number of bytes per block.  Must be &gt; 0.
	blocks	 - number of blocks to read.  Must be &gt; 0.

   RESULT
	count - Number of _blocks_ read, or 0 for EOF.  On an error, the
		number of blocks actually read is returned.

   BUGS
	Doesn't clear 
                <link linkend="n106">IoErr()</link>
                 before starting.  If you want to find out
	about errors, use SetIoErr(0L) before calling.

   SEE ALSO
	
                <link linkend="n74">FGetC()</link>
                , 
                <link linkend="n91">FWrite()</link>
                , 
                <link linkend="n75">FGets()</link>
                
            </literallayout>
        </section>
        <section id="n87">
            <title>dos.library/FreeArgs</title>
            <literallayout class="monospaced">
                   NAME
	FreeArgs - Free allocated memory after 
                <link linkend="n137">ReadArgs()</link>
                 (V36)

   SYNOPSIS
	FreeArgs(rdargs)
	           D1

	void FreeArgs(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 *)

   FUNCTION
	Frees memory allocated to return arguments in from 
                <link linkend="n137">ReadArgs()</link>
                .  If
	
                <link linkend="n137">ReadArgs</link>
                 allocated the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 structure it will be freed.  If NULL
	is passed in this function does nothing.

   INPUTS
	rdargs - structure returned from 
                <link linkend="n137">ReadArgs()</link>
                 or NULL.

   SEE ALSO
	
                <link linkend="n137">ReadArgs()</link>
                , 
                <link linkend="n138">ReadItem()</link>
                , 
                <link linkend="n77">FindArg()</link>
                
            </literallayout>
        </section>
        <section id="n88">
            <title>dos.library/FreeDeviceProc</title>
            <literallayout class="monospaced">
                   NAME
	FreeDeviceProc -- Releases port returned by 
                <link linkend="n95">GetDeviceProc()</link>
                 (V36)

   SYNOPSIS
	FreeDeviceProc(devproc)
			 D1

	void FreeDeviceProc(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DevProc</ulink>
                 *)

   FUNCTION
	Frees up the structure created by 
                <link linkend="n95">GetDeviceProc()</link>
                , and any associated
	temporary locks.

	Decrements the counter incremented by 
                <link linkend="n95">GetDeviceProc()</link>
                .  The counter
	is in an extension to the 1.3 process structure.  After calling
	FreeDeviceProc(), do not use the port or lock again!  It is safe to
	call FreeDeviceProc(NULL).

   INPUTS
	devproc - A value returned by 
                <link linkend="n95">GetDeviceProc()</link>
                   BUGS
	Counter not currently active in 2.0.

   SEE ALSO
	
                <link linkend="n95">GetDeviceProc()</link>
                , 
                <link linkend="n60">DeviceProc()</link>
                , 
                <link linkend="n41">AssignLock()</link>
                , 
                <link linkend="n40">AssignLate()</link>
                ,
	
                <link linkend="n42">AssignPath()</link>
                
            </literallayout>
        </section>
        <section id="n89">
            <title>dos.library/FreeDosEntry</title>
            <literallayout class="monospaced">
                   NAME
	FreeDosEntry -- Frees an entry created by 
                <link linkend="n114">MakeDosEntry</link>
                 (V36)

   SYNOPSIS
	FreeDosEntry(dlist)
	               D1

	void FreeDosEntry(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *)

   FUNCTION
	Frees an entry created by 
                <link linkend="n114">MakeDosEntry()</link>
                .  This routine should be
	eliminated and replaced by a value passed to FreeDosObject()!

   INPUTS
	dlist - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 to free.

   SEE ALSO
	
                <link linkend="n35">AddDosEntry()</link>
                , 
                <link linkend="n142">RemDosEntry()</link>
                , 
                <link linkend="n79">FindDosEntry()</link>
                , 
                <link linkend="n111">LockDosList()</link>
                ,
	
                <link linkend="n125">NextDosEntry()</link>
                , 
                <link linkend="n114">MakeDosEntry()</link>
                
            </literallayout>
        </section>
        <section id="n90">
            <title>dos.library/FreeDosObject</title>
            <literallayout class="monospaced">
                   NAME
	FreeDosObject -- Frees an object allocated by 
                <link linkend="n38">AllocDosObject()</link>
                 (V36)

   SYNOPSIS
	FreeDosObject(type, ptr)
		       D1   D2

	void FreeDosObject(ULONG, void *)

   FUNCTION
	Frees an object allocated by 
                <link linkend="n38">AllocDosObject()</link>
                .  Do NOT call for
	objects allocated in any other way.

   INPUTS
	type - type passed to 
                <link linkend="n38">AllocDosObject()</link>
                	ptr  - ptr returned by 
                <link linkend="n38">AllocDosObject()</link>
                   BUGS
	Before V39, DOS_CLI objects will only have the struct
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">CommandLineInterface</ulink>
                 freed, not the strings it points to.  This
	is fixed in V39 dos.  Before V39, you can workaround this bug by
	using 
                <link linkend="n247">FreeVec()</link>
                 on cli_SetName, cli_CommandFile, cli_CommandName,
	and cli_Prompt, and then setting them all to NULL.  In V39 or
	above, do NOT use the workaround.

   SEE ALSO
	
                <link linkend="n38">AllocDosObject()</link>
                , 
                <link linkend="n247">FreeVec()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n91">
            <title>dos.library/FWrite</title>
            <literallayout class="monospaced">
                   NAME
	FWrite -- Writes a number of blocks to an output (buffered) (V36)

   SYNOPSIS
	count = FWrite(fh, buf, blocklen, blocks)
	D0	       D1  D2     D3        D4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FWrite(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ULONG, ULONG)

   FUNCTION
	Attempts to write a number of blocks, each blocklen long, from the
	specified buffer to the output stream.  May return less than the
	number of blocks requested, if there is some error such as a full
	disk or r/w error.  This call is buffered.

   INPUTS
	fh	 - filehandle to use for buffered I/O
	buf      - Area to write bytes from.
	blocklen - number of bytes per block.  Must be &gt; 0.
	blocks	 - number of blocks to write.  Must be &gt; 0.

   RESULT
	count - Number of _blocks_ written.  On an error, the number of
		blocks actually written is returned.

   BUGS
	Doesn't clear 
                <link linkend="n106">IoErr()</link>
                 before starting.  If you want to find out
	about errors, use SetIoErr(0L) before calling.

   SEE ALSO
	
                <link linkend="n84">FPutC()</link>
                , 
                <link linkend="n86">FRead()</link>
                , 
                <link linkend="n85">FPuts()</link>
                
            </literallayout>
        </section>
        <section id="n92">
            <title>dos.library/GetArgStr</title>
            <literallayout class="monospaced">
                   NAME
	GetArgStr -- Returns the arguments for the process (V36)

   SYNOPSIS
	ptr = GetArgStr()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 GetArgStr(void)

   FUNCTION
	Returns a pointer to the (null-terminated) arguments for the program
	(process).  This is the same string passed in a0 on startup from CLI.

   RESULT
	ptr - pointer to arguments

   SEE ALSO
	
                <link linkend="n153">SetArgStr()</link>
                , 
                <link linkend="n146">RunCommand()</link>
                
            </literallayout>
        </section>
        <section id="n93">
            <title>dos.library/GetConsoleTask</title>
            <literallayout class="monospaced">
                   NAME
	GetConsoleTask -- Returns the default console for the process (V36)

   SYNOPSIS
	port = GetConsoleTask()
	D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *GetConsoleTask(void)

   FUNCTION
	Returns the default console task's port (pr_ConsoleTask) for the
	current process.

   RESULT
	port - The pr_MsgPort of the console handler, or NULL.

   SEE ALSO
	
                <link linkend="n155">SetConsoleTask()</link>
                , 
                <link linkend="n126">Open()</link>
                
            </literallayout>
        </section>
        <section id="n94">
            <title>dos.library/GetCurrentDirName</title>
            <literallayout class="monospaced">
                   NAME
	GetCurrentDirName -- returns the current directory name (V36)

   SYNOPSIS
	success = GetCurrentDirName(buf, len)
	D0                          D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 GetCurrentDirName(STRPTR, LONG)

   FUNCTION
	Extracts the current directory name from the CLI structure and puts it
	into the buffer.  If the buffer is too small, the name is truncated
	appropriately and a failure code returned.  If no CLI structure is
	present, a null string is returned in the buffer, and failure from
	the call (with 
                <link linkend="n106">IoErr()</link>
                 == ERROR_OBJECT_WRONG_TYPE);

   INPUTS
	buf     - Buffer to hold extracted name
	len     - Number of bytes of space in buffer

   RESULT
	success - Success/failure indicator

   BUGS
	In V36, this routine didn't handle 0-length buffers correctly.

   SEE ALSO
	
                <link linkend="n156">SetCurrentDirName()</link>
                
            </literallayout>
        </section>
        <section id="n95">
            <title>dos.library/GetDeviceProc</title>
            <literallayout class="monospaced">
                   NAME
	GetDeviceProc -- Finds a handler to send a message to (V36)

   SYNOPSIS
	devproc = GetDeviceProc(name, devproc)
	  D0			 D1     D2

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DevProc</ulink>
                 *GetDeviceProc(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DevProc</ulink>
                 *)

   FUNCTION
	Finds the handler/filesystem to send packets regarding 'name' to.
	This may involve getting temporary locks.  It returns a structure
	that includes a lock and msgport to send to to attempt your operation.
	It also includes information on how to handle multiple-directory
	assigns (by passing the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DevProc</ulink>
                 back to GetDeviceProc() until it
	returns NULL).

	The initial call to GetDeviceProc() should pass NULL for devproc.  If
	after using the returned 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DevProc</ulink>
                , you get an ERROR_OBJECT_NOT_FOUND,
	and (devproc-&gt;dvp_Flags &amp; DVPF_ASSIGN) is true, you should call
	GetDeviceProc() again, passing it the devproc structure.  It will
	either return a modified devproc structure, or NULL (with
	ERROR_NO_MORE_ENTRIES in IoErr()).  Continue until it returns NULL.

	This call also increments the counter that locks a handler/fs into
	memory.  After calling 
                <link linkend="n88">FreeDeviceProc()</link>
                , do not use the port or lock
	again!

   INPUTS
	name    - name of the object you wish to access.  This can be a
		  relative path ("foo/bar"), relative to the current volume
		  (":foo/bar"), or relative to a device/volume/assign
		  ("foo:bar").
	devproc - A value returned by GetDeviceProc() before, or NULL

   RESULT
	devproc - a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DevProc</ulink>
                 structure or NULL

   BUGS
	Counter not currently active in 2.0.
	In 2.0 and 2.01, you HAD to check DVPF_ASSIGN before calling it again.
	This was fixed for the 2.02 release of V36.

   SEE ALSO
	
                <link linkend="n88">FreeDeviceProc()</link>
                , 
                <link linkend="n60">DeviceProc()</link>
                , 
                <link linkend="n41">AssignLock()</link>
                , 
                <link linkend="n40">AssignLate()</link>
                ,
	
                <link linkend="n42">AssignPath()</link>
                
            </literallayout>
        </section>
        <section id="n96">
            <title>dos.library/GetFileSysTask</title>
            <literallayout class="monospaced">
                   NAME
	GetFileSysTask -- Returns the default filesystem for the process (V36)

   SYNOPSIS
	port = GetFileSysTask()
	D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *GetFileSysTask(void)

   FUNCTION
	Returns the default filesystem task's port (pr_FileSystemTask) for the
	current process.

   RESULT
	port - The pr_MsgPort of the filesystem, or NULL.

   SEE ALSO
	
                <link linkend="n159">SetFileSysTask()</link>
                , 
                <link linkend="n126">Open()</link>
                
            </literallayout>
        </section>
        <section id="n97">
            <title>dos.library/GetProgramDir</title>
            <literallayout class="monospaced">
                   NAME
	GetProgramDir -- Returns a lock on the directory the program was loaded
			 from (V36)

   SYNOPSIS
	lock = GetProgramDir()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 GetProgramDir(void)

   FUNCTION
	Returns a shared lock on the directory the program was loaded from.
	This can be used for a program to find data files, etc, that are stored
	with the program, or to find the program file itself.  NULL returns are
	valid, and may occur, for example, when running a program from the
	resident list.  You should NOT unlock the lock.

   RESULT
	lock - A lock on the directory the current program was loaded from,
	       or NULL if loaded from resident list, etc.

   BUGS
	Should return a lock for things loaded via resident.  Perhaps should
	return currentdir if NULL.

   SEE ALSO
	
                <link linkend="n163">SetProgramDir()</link>
                , 
                <link linkend="n126">Open()</link>
                
            </literallayout>
        </section>
        <section id="n98">
            <title>dos.library/GetProgramName</title>
            <literallayout class="monospaced">
                   NAME
	GetProgramName -- Returns the current program name (V36)

   SYNOPSIS
	success = GetProgramName(buf, len)
	D0                       D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 GetProgramName(STRPTR, LONG)

   FUNCTION
	Extracts the program name from the CLI structure and puts it
	into the buffer.  If the buffer is too small, the name is truncated.
	If no CLI structure is present, a null string is returned in the
	buffer, and failure from the call (with 
                <link linkend="n106">IoErr()</link>
                 ==
	ERROR_OBJECT_WRONG_TYPE);

   INPUTS
	buf     - Buffer to hold extracted name
	len     - Number of bytes of space in buffer

   RESULT
	success - Success/failure indicator

   SEE ALSO
	
                <link linkend="n164">SetProgramName()</link>
                
            </literallayout>
        </section>
        <section id="n99">
            <title>dos.library/GetPrompt</title>
            <literallayout class="monospaced">
                   NAME
	GetPrompt -- Returns the prompt for the current process (V36)

   SYNOPSIS
	success = GetPrompt(buf, len)
	D0                  D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 GetPrompt(STRPTR, LONG)

   FUNCTION
	Extracts the prompt string from the CLI structure and puts it
	into the buffer.  If the buffer is too small, the string is truncated
	appropriately and a failure code returned.  If no CLI structure is
	present, a null string is returned in the buffer, and failure from
	the call (with 
                <link linkend="n106">IoErr()</link>
                 == ERROR_OBJECT_WRONG_TYPE);

   INPUTS
	buf     - Buffer to hold extracted prompt
	len     - Number of bytes of space in buffer

   RESULT
	success - Success/failure indicator

   SEE ALSO
	
                <link linkend="n165">SetPrompt()</link>
                
            </literallayout>
        </section>
        <section id="n100">
            <title>dos.library/GetVar</title>
            <literallayout class="monospaced">
                   NAME
	GetVar -- Returns the value of a local or global variable (V36)

   SYNOPSIS
	len = GetVar( name, buffer, size, flags )
	D0	       D1     D2     D3    D4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 GetVar( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , ULONG )

   FUNCTION
	Gets the value of a local or environment variable.  It is advised to
 	only use ASCII strings inside variables, but not required.  This stops
	putting characters into the destination when a \n is hit, unless
	GVF_BINARY_VAR is specified.  (The \n is not stored in the buffer.)

   INPUTS
	name   - pointer to a variable name.
	buffer - a user allocated area which will be used to store
		 the value associated with the variable.
	size   - length of the buffer region in bytes.
	flags  - combination of type of var to get value of (low 8 bits), and
		 flags to control the behavior of this routine.  Currently
		 defined flags include:

			GVF_GLOBAL_ONLY - tries to get a global env variable.
			GVF_LOCAL_ONLY  - tries to get a local variable.
			GVF_BINARY_VAR  - don't stop at \n
			GVF_DONT_NULL_TERM - no null termination (only valid
					  for binary variables). (V37)

		 The default is to try to get a local variable first, then
		 to try to get a global environment variable.

   RESULT
	len -   Size of environment variable.  -1 indicates that the
		variable was not defined (if 
                <link linkend="n106">IoErr()</link>
                 returns
		ERROR_OBJECT_NOT_FOUND - it returns ERROR_BAD_NUMBER if
		you specify a size of 0).  If the value would overflow
		the user buffer, the buffer is truncated.  The buffer
		returned is null-terminated (even if GVF_BINARY_VAR is
		used, unless GVF_DONT_NULL_TERM is in effect).  If it
		succeeds, len is the number of characters put in the buffer
		(not including null termination), and 
                <link linkend="n106">IoErr()</link>
                 will return the
		the size of the variable (regardless of buffer size).

   BUGS
	LV_VAR is the only type that can be global.
	Under V36, we documented (and it returned) the size of the variable,
	not the number of characters transferred.  For V37 this was changed
	to the number of characters put in the buffer, and the total size
	of the variable is put in 
                <link linkend="n106">IoErr()</link>
                .
	GVF_DONT_NULL_TERM only works for local variables under V37.  For
	V39, it also works for globals.

   SEE ALSO
	
                <link linkend="n167">SetVar()</link>
                , 
                <link linkend="n59">DeleteVar()</link>
                , 
                <link linkend="n81">FindVar()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/var.h">&lt;dos/var.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n101">
            <title>dos.library/Info</title>
            <literallayout class="monospaced">
                    NAME
	Info -- Returns information about the disk

    SYNOPSIS
	success = Info( lock, parameterBlock )
	D0		D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Info(BPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">InfoData</ulink>
                 *)

    FUNCTION
	Info() can be used to find information about any disk in use.
	'lock' refers to the disk, or any file on the disk. The parameter
	block is returned with information about the size of the disk,
	number of free blocks and any soft errors.

    INPUTS
	lock	       - BCPL pointer to a lock
	parameterBlock - pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">InfoData</ulink>
                 structure
			 (longword aligned)

    RESULTS
	success - boolean

    SPECIAL NOTE:
	Note that 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">InfoData</ulink>
                 structure must be longword aligned.

            </literallayout>
        </section>
        <section id="n102">
            <title>dos.library/Inhibit</title>
            <literallayout class="monospaced">
                   NAME
	Inhibit -- Inhibits access to a filesystem (V36)

   SYNOPSIS
	success = Inhibit(filesystem, flag)
	D0                    D1       D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Inhibit(STRPTR,LONG)

   FUNCTION
	Sends an ACTION_INHIBIT packet to the indicated handler.  This stops
	all activity by the handler until uninhibited.  When uninhibited,
	anything may have happened to the disk in the drive, or there may no
	longer be one.

   INPUTS
	filesystem - Name of device to inhibit (with ':')
	flag	   - New status.  DOSTRUE = inhibited, FALSE = uninhibited

   RESULT
	success    - Success/failure indicator

   SEE ALSO

            </literallayout>
        </section>
        <section id="n103">
            <title>dos.library/Input</title>
            <literallayout class="monospaced">
                    NAME
	Input -- Identify the program's initial input file handle

    SYNOPSIS
	file = Input()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 Input(void)

    FUNCTION
	Input() is used to identify the initial input stream allocated when
	the program was initiated.  Never close the filehandle returned by
	Input!

    RESULTS
	file - BCPL pointer to a file handle

    SEE ALSO
	
                <link linkend="n128">Output()</link>
                , 
                <link linkend="n150">SelectInput()</link>
                
            </literallayout>
        </section>
        <section id="n104">
            <title>dos.library/InternalLoadSeg</title>
            <literallayout class="monospaced">
                   NAME
	InternalLoadSeg -- Low-level load routine (V36)

   SYNOPSIS
	seglist = InternalLoadSeg(fh,table,functionarray,stack)
	D0			  D0  A0        A1	  A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 InternalLoadSeg(BPTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *)

   FUNCTION
	Loads from fh.  Table is used when loading an overlay, otherwise
	should be NULL.  Functionarray is a pointer to an array of functions.
	Note that the current 
                <link linkend="n149">Seek</link>
                 position after loading may be at any point
	after the last hunk loaded.  The filehandle will not be closed.  If a
	stacksize is encoded in the file, the size will be stuffed in the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 pointed to by stack.  This 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 should be initialized to your
	default value: InternalLoadSeg() will not change it if no stacksize
	is found. Clears unused portions of Code and Data hunks (as well as
	BSS hunks).  (This also applies to 
                <link linkend="n109">LoadSeg()</link>
                 and 
                <link linkend="n124">NewLoadSeg()</link>
                ).

	If the file being loaded is an overlaid file, this will return
	-(seglist).  All other results will be positive.

	NOTE to overlay users: InternalLoadSeg() does NOT return seglist in
	both D0 and D1, as 
                <link linkend="n109">LoadSeg</link>
                 does.  The current ovs.asm uses 
                <link linkend="n109">LoadSeg()</link>
                ,
	and assumes returns are in D1.  We will support this for 
                <link linkend="n109">LoadSeg()</link>
                	ONLY.

   INPUTS
	fh	      - Filehandle to load from.
	table	      - When loading an overlay, otherwise ignored.
	functionarray - Array of function to be used for read, alloc, and free.
	   FuncTable[0] -&gt;  Actual = ReadFunc(readhandle,buffer,length),DOSBase
		            D0                D1         D2     D3      A6
	   FuncTable[1] -&gt;  Memory = AllocFunc(size,flags), Execbase
		            D0                 D0   D1      a6
	   FuncTable[2] -&gt;  FreeFunc(memory,size), Execbase
		                     A1     D0     A6
	stack         - Pointer to storage (ULONG) for stacksize.

   RESULT
	seglist	      - Seglist loaded or NULL.  NOT returned in D1!

   BUGS
	Really should use tags.

   SEE ALSO
	
                <link linkend="n109">LoadSeg()</link>
                , 
                <link linkend="n175">UnLoadSeg()</link>
                , 
                <link linkend="n124">NewLoadSeg()</link>
                , 
                <link linkend="n105">InternalUnLoadSeg()</link>
                
            </literallayout>
        </section>
        <section id="n105">
            <title>dos.library/InternalUnLoadSeg</title>
            <literallayout class="monospaced">
                   NAME
	InternalUnLoadSeg -- Unloads a seglist loaded with 
                <link linkend="n104">InternalLoadSeg()</link>
                 (V36)

   SYNOPSIS
	success = InternalUnLoadSeg(seglist,FreeFunc)
	  D0			      D1       A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 InternalUnLoadSeg(BPTR,void (*)(STRPTR,ULONG))

   FUNCTION
	Unloads a seglist using freefunc to free segments.  Freefunc is called
	as for 
                <link linkend="n104">InternalLoadSeg</link>
                .  NOTE: will call 
                <link linkend="n49">Close()</link>
                 for overlaid
	seglists.

   INPUTS
	seglist  - Seglist to be unloaded
	FreeFunc - Function called to free memory

   RESULT
	success - returns whether everything went OK (since this may close
		  files).  Also returns FALSE if seglist was NULL.

   BUGS
	Really should use tags

   SEE ALSO
	
                <link linkend="n109">LoadSeg()</link>
                , 
                <link linkend="n175">UnLoadSeg()</link>
                , 
                <link linkend="n104">InternalLoadSeg()</link>
                , NewUnLoadSeg(), 
                <link linkend="n49">Close()</link>
                
            </literallayout>
        </section>
        <section id="n106">
            <title>dos.library/IoErr</title>
            <literallayout class="monospaced">
                    NAME
	IoErr -- Return extra information from the system

    SYNOPSIS
	error = IoErr()
	  D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 IoErr(void)

    FUNCTION
	Most I/O routines return zero to indicate an error. When this
	happens (or whatever the defined error return for the routine)
	this routine may be called to determine more information. It is
	also used in some routines to pass back a secondary result.

	Note: there is no guarantee as to the value returned from IoErr()
	after a successful operation, unless to specified by the routine.

    RESULTS
	error - integer

    SEE ALSO
	
                <link linkend="n73">Fault()</link>
                , 
                <link linkend="n134">PrintFault()</link>
                , 
                <link linkend="n160">SetIoErr()</link>
                
            </literallayout>
        </section>
        <section id="n107">
            <title>dos.library/IsFileSystem</title>
            <literallayout class="monospaced">
                   NAME
	IsFileSystem -- returns whether a Dos handler is a filesystem (V36)

   SYNOPSIS
	result = IsFileSystem(name)
	D0                     D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 IsFileSystem(STRPTR)

   FUNCTION
	Returns whether the device is a filesystem or not.  A filesystem
	supports seperate files storing information.  It may also support
	sub-directories, but is not required to.  If the filesystem doesn't
	support this new packet, IsFileSystem() will use Lock(":",...) as
	an indicator.

   INPUTS
	name   - Name of device in question, with trailing ':'.

   RESULT
	result - Flag to indicate if device is a file system

   SEE ALSO
	
                <link linkend="n110">Lock()</link>
                
            </literallayout>
        </section>
        <section id="n108">
            <title>dos.library/IsInteractive</title>
            <literallayout class="monospaced">
                    NAME
	IsInteractive -- Discover whether a file is "interactive"

    SYNOPSIS
	status = IsInteractive( file )
	D0			D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 IsInteractive(BPTR)

    FUNCTION
	The return value 'status' indicates whether the file associated
	with the file handle 'file' is connected to a virtual terminal.

    INPUTS
	file - BCPL pointer to a file handle

    RESULTS
	status - boolean

    SEE ALSO

            </literallayout>
        </section>
        <section id="n109">
            <title>dos.library/LoadSeg</title>
            <literallayout class="monospaced">
                    NAME
	LoadSeg -- Scatterload a loadable file into memory

    SYNOPSIS
	seglist = LoadSeg( name )
	D0		   D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 LoadSeg(STRPTR)

    FUNCTION
	The file 'name' should be a load module produced by the linker.
	LoadSeg() scatterloads the CODE, DATA and BSS segments into memory,
	chaining together the segments with BPTR's on their first words.
	The end of the chain is indicated by a zero.  There can be any number
	of segments in a file.  All necessary relocation is handled by
	LoadSeg().

	In the event of an error any blocks loaded will be unloaded and a
	NULL result returned.

	If the module is correctly loaded then the output will be a pointer
	at the beginning of the list of blocks. Loaded code is unloaded via
	a call to 
                <link linkend="n175">UnLoadSeg()</link>
                .

    INPUTS
	name - pointer to a null-terminated string

    RESULTS
	seglist - BCPL pointer to a seglist

    SEE ALSO
	
                <link linkend="n175">UnLoadSeg()</link>
                , 
                <link linkend="n104">InternalLoadSeg()</link>
                , 
                <link linkend="n105">InternalUnLoadSeg()</link>
                , 
                <link linkend="n53">CreateProc()</link>
                ,
	
                <link linkend="n52">CreateNewProc()</link>
                , 
                <link linkend="n124">NewLoadSeg()</link>
                .

            </literallayout>
        </section>
        <section id="n110">
            <title>dos.library/Lock</title>
            <literallayout class="monospaced">
                    NAME
	Lock -- Lock a directory or file

    SYNOPSIS
	lock  = Lock( name, accessMode )
	D0	      D1	D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 Lock(STRPTR, LONG)

    FUNCTION
	A filing system lock on the file or directory 'name' is returned if
	possible.

	If the accessMode is ACCESS_READ, the lock is a shared read lock;
	if the accessMode is ACCESS_WRITE then it is an exclusive write
	lock.  Do not use random values for mode.

	If Lock() fails (that is, if it cannot obtain a filing system lock
	on the file or directory) it returns a zero.

	Tricky assumptions about the internal format of a lock are unwise,
	as are any attempts to use the fl_Link or fl_Access fields.

    INPUTS
	name	   - pointer to a null-terminated string
	accessMode - integer

    RESULTS
	lock - BCPL pointer to a lock

    SEE ALSO
	
                <link linkend="n176">UnLock()</link>
                , 
                <link linkend="n62">DupLock()</link>
                , 
                <link linkend="n44">ChangeMode()</link>
                , 
                <link linkend="n123">NameFromLock()</link>
                , 
                <link linkend="n63">DupLockFromFH()</link>
                
            </literallayout>
        </section>
        <section id="n111">
            <title>dos.library/LockDosList</title>
            <literallayout class="monospaced">
                   NAME
	LockDosList -- Locks the specified Dos Lists for use (V36)

   SYNOPSIS
	dlist = LockDosList(flags)
	D0		     D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *LockDosList(ULONG)

   FUNCTION
	Locks the dos device list in preparation to walk the list.
	If the list is 'busy' then this routine will not return until it is
	available.  This routine "nests": you can call it multiple times, and
	then must unlock it the same number of times.  The dlist
	returned is NOT a valid entry: it is a special value.  Note that
	for 1.3 compatibility, it also does a 
                <link linkend="n241">Forbid()</link>
                 - this will probably
	be removed at some future time.  The 1.3 
                <link linkend="n241">Forbid()</link>
                 locking of this
	list had some race conditions.  The pointer returned by this is NOT
	an actual 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 pointer - you should use on of the other DosEntry
	calls to get actual pointers to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 structures (such as
	
                <link linkend="n125">NextDosEntry()</link>
                ), passing the value returned by LockDosList()
	as the dlist value.

	Note for handler writers: you should never call this function with
	LDF_WRITE, since it can deadlock you (if someone has it read-locked
	and they're trying to send you a packet).  Use 
                <link linkend="n43">AttemptLockDosList()</link>
                	instead, and effectively busy-wait with delays for the list to be
	available.  The other option is that you can spawn a process to
	add the entry safely.

	As an example, here's how you can search for all volumes of a specific
	name and do something with them:

	2.0 way:

		dl = LockDosList(LDF_VOLUMES|LDF_READ);
		while (dl = FindDosEntry(dl,name,LDF_VOLUMES))
		{
			Add to list of volumes to process or break out of
			the while loop.
			(You could try using it here, but I advise
			against it for compatability reasons if you
			are planning on continuing to examine the list.)
		}

		process list of volumes saved above, or current entry if
		you're only interested in the first one of that name.

		UnLockDosList(LDF_VOLUMES|LDF_READ);
				  \* must not use dl after this! *\

	1.3/2.0 way:

		if (version &gt;= 36)
			dl = LockDosList(LDF_VOLUMES|LDF_READ);
		else {
			Forbid();
			/* tricky! note dol_Next is at offset 0! */
			dl = &amp;(...-&gt;di_DeviceList);
		}

		while (version &gt;= 36 ?
				dl = FindDosEntry(dl,name,LDF_VOLUMES) :
			        dl = yourfindentry(dl,name,DLT_VOLUME))
		{
			Add to list of volumes to process, or break out of
			the while loop.
			Do NOT lock foo1/foo2 here if you will continue
			to examine the list - it breaks the forbid
			and the list may change on you.
		}

		process list of volumes saved above, or current entry if
		you're only interested in the first one of that name.

		if (version &gt;= 36)
			UnLockDosList(LDF_VOLUMES|LDF_READ);
		else
			Permit();
		\* must not use dl after this! *\
		...

		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *
		yourfindentry (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *dl, STRPTRname, type)
		{
		\* tricky - depends on dol_Next being at offset 0,
		   and the initial ptr being a ptr to di_DeviceList! *\
			while (dl = dl-&gt;dol_Next)
			{
			    if (dl-&gt;dol_Type == type &amp;&amp;
				stricmp(name,BADDR(dl-&gt;dol_Name)+1) == 0)
			    {
				break;
			    }
			}
			return dl;
		}

   INPUTS
	flags - Flags stating which types of nodes you want to lock.

   RESULT
	dlist - Pointer to the head of the list.  NOT a valid node!

   SEE ALSO
	
                <link linkend="n43">AttemptLockDosList()</link>
                , 
                <link linkend="n177">UnLockDosList()</link>
                , 
                <link linkend="n241">Forbid()</link>
                , 
                <link linkend="n125">NextDosEntry()</link>
                
            </literallayout>
        </section>
        <section id="n112">
            <title>dos.library/LockRecord</title>
            <literallayout class="monospaced">
                   NAME
	LockRecord -- Locks a portion of a file (V36)

   SYNOPSIS
	success = LockRecord(fh,offset,length,mode,timeout)
	D0                   D1   D2     D3    D4    D5

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 LockRecord(BPTR,ULONG,ULONG,ULONG,ULONG)

   FUNCTION
	This locks a portion of a file for exclusive access.  Timeout is how
	long to wait in ticks (1/50 sec) for the record to be available.

	Valid modes are:
		REC_EXCLUSIVE
		REC_EXCLUSIVE_IMMED
		REC_SHARED
		REC_SHARED_IMMED
	For the IMMED modes, the timeout is ignored.

	Record locks are tied to the filehandle used to create them.  The
	same filehandle can get any number of exclusive locks on the same
	record, for example.  These are cooperative locks, they only
	affect other people calling LockRecord().

   INPUTS
	fh      - File handle for which to lock the record
	offset  - Record start position
	length  - Length of record in bytes
	mode    - Type of lock requester
	timeout - Timeout interval in ticks.  0 is legal.

   RESULT
	success - Success or failure

   BUGS
	In 2.0 through 2.02 (V36), LockRecord() only worked in the ramdisk.
	Attempting to lock records on the disk filesystem causes a crash.
	This was fixed for V37.

   SEE ALSO
	
                <link linkend="n113">LockRecords()</link>
                , 
                <link linkend="n178">UnLockRecord()</link>
                , 
                <link linkend="n179">UnLockRecords()</link>
                
            </literallayout>
        </section>
        <section id="n113">
            <title>dos.library/LockRecords</title>
            <literallayout class="monospaced">
                   NAME
	LockRecords -- 
                <link linkend="n110">Lock</link>
                 a series of records (V36)

   SYNOPSIS
	success = LockRecords(record_array,timeout)
	D0                       D1           D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 LockRecords(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/record.h">RecordLock</ulink>
                 *,ULONG)

   FUNCTION
	This locks several records within a file for exclusive access.
	Timeout is how long to wait in ticks for the records to be available.
	The wait is applied to each attempt to lock each record in the list.
	It is recommended that you always lock a set of records in the same
	order to reduce possibilities of deadlock.

	The array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/record.h">RecordLock</ulink>
                 structures is terminated by an entry with
	rec_FH of NULL.

   INPUTS
	record_array - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 of records to be locked
	timeout      - Timeout interval.  0 is legal

   RESULT
	success      - Success or failure

   BUGS
	See 
                <link linkend="n112">LockRecord()</link>
                   SEE ALSO
	
                <link linkend="n112">LockRecord()</link>
                , 
                <link linkend="n178">UnLockRecord()</link>
                , 
                <link linkend="n179">UnLockRecords()</link>
                
            </literallayout>
        </section>
        <section id="n114">
            <title>dos.library/MakeDosEntry</title>
            <literallayout class="monospaced">
                   NAME
	MakeDosEntry -- Creates a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 structure (V36)

   SYNOPSIS
	newdlist = MakeDosEntry(name, type)
	D0                       D1    D2

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *MakeDosEntry(STRPTR, LONG)

   FUNCTION
	Create a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 structure, including allocating a name and correctly
	null-terminating the BSTR.  It also sets the dol_Type field, and sets
	all other fields to 0.  This routine should be eliminated and replaced
	by a value passed to AllocDosObject()!

   INPUTS
	name - name for the device/volume/assign node.
	type - type of node.

   RESULT
	newdlist - The new device entry or NULL.

   SEE ALSO
	
                <link linkend="n35">AddDosEntry()</link>
                , 
                <link linkend="n142">RemDosEntry()</link>
                , 
                <link linkend="n79">FindDosEntry()</link>
                , 
                <link linkend="n111">LockDosList()</link>
                ,
	
                <link linkend="n125">NextDosEntry()</link>
                , 
                <link linkend="n89">FreeDosEntry()</link>
                
            </literallayout>
        </section>
        <section id="n115">
            <title>dos.library/MakeLink</title>
            <literallayout class="monospaced">
                   NAME
	MakeLink -- Creates a filesystem link (V36)

   SYNOPSIS
	success = MakeLink( name, dest, soft )
	D0		     D1    D2    D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 MakeLink( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 )

   FUNCTION
	Create a filesystem link from 'name' to dest.  For "soft-links",
	dest is a pointer to a null-terminated path string.  For "hard-
	links", dest is a lock (BPTR).  'soft' is FALSE for hard-links,
	non-zero otherwise.

	Soft-links are resolved at access time by a combination of the
	filesystem (by returning ERROR_IS_SOFT_LINK to dos), and by
	Dos (using 
                <link linkend="n139">ReadLink()</link>
                 to resolve any links that are hit).

	Hard-links are resolved by the filesystem in question.  A series
	of hard-links to a file are all equivalent to the file itself.
	If one of the links (or the original entry for the file) is
	deleted, the data remains until there are no links left.

   INPUTS
	name - Name of the link to create
	dest - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">CPTR</ulink>
                 to path string, or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 lock
	soft - FALSE for hard-links, non-zero for soft-links

   RESULT
	Success - boolean

   BUGS
	In V36, soft-links didn't work in the ROM filesystem.  This was
	fixed for V37.

   SEE ALSO
	
                <link linkend="n139">ReadLink()</link>
                , 
                <link linkend="n126">Open()</link>
                , 
                <link linkend="n110">Lock()</link>
                
            </literallayout>
        </section>
        <section id="n116">
            <title>dos.library/MatchEnd</title>
            <literallayout class="monospaced">
                   NAME
	MatchEnd -- Free storage allocated for 
                <link linkend="n118">MatchFirst()/MatchNext()</link>
                 (V36)

   SYNOPSIS
	MatchEnd(AnchorPath)
	             D1

	VOID MatchEnd(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                 *)

   FUNCTION
	Return all storage associated with a given search.

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                 - Anchor used for 
                <link linkend="n118">MatchFirst()/MatchNext()</link>
                		     MUST be longword aligned!

   SEE ALSO
	
                <link linkend="n117">MatchFirst()</link>
                , 
                <link linkend="n131">ParsePattern()</link>
                , 
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n54">CurrentDir()</link>
                , 
                <link linkend="n68">Examine()</link>
                ,
	
                <link linkend="n118">MatchNext()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">&lt;dos/dosasl.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n117">
            <title>dos.library/MatchFirst</title>
            <literallayout class="monospaced">
                   NAME
	MatchFirst -- Finds file that matches pattern (V36)

   SYNOPSIS
	error = MatchFirst(pat, AnchorPath)
	D0                 D1       D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 MatchFirst(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                 *)

   FUNCTION
	Locates the first file or directory that matches a given pattern.
	MatchFirst() is passed your pattern (you do not pass it through
	
                <link linkend="n131">ParsePattern()</link>
                 - MatchFirst() does that for you), and the control
	structure.  MatchFirst() normally initializes your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                	structure for you, and returns the first file that matched your
	pattern, or an error.  Note that 
                <link linkend="n118">MatchFirst()/MatchNext()</link>
                 are unusual
	for Dos in that they return 0 for success, or the error code (see
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                ), instead of the application getting the error code
	from 
                <link linkend="n106">IoErr()</link>
                .

	When looking at the result of 
                <link linkend="n118">MatchFirst()/MatchNext()</link>
                , the ap_Info
	field of your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                 has the results of an 
                <link linkend="n68">Examine()</link>
                 of the object.
	You normally get the name of the object from fib_FileName, and the
	directory it's in from ap_Current-&gt;an_Lock.  To access this object,
	normally you would temporarily 
                <link linkend="n54">CurrentDir()</link>
                 to the lock, do an action
	to the file/dir, and then 
                <link linkend="n54">CurrentDir()</link>
                 back to your original directory.
	This makes certain you affect the right object even when two volumes
	of the same name are in the system.  You can use ap_Buf (with
	ap_Strlen) to get a name to report to the user.

	To initialize the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                 structure (particularily when reusing
	it), set ap_BreakBits to the signal bits (CDEF) that you want to take
	a break on, or NULL, if you don't want to convenience the user.
	ap_Flags should be set to any flags you need or all 0's otherwise.
	ap_FoundBreak should be cleared if you'll be using breaks.

	If you want to have the FULL PATH NAME of the files you found,
	allocate a buffer at the END of this structure, and put the size of
	it into ap_Strlen.  If you don't want the full path name, make sure
	you set ap_Strlen to zero.  In this case, the name of the file, and
	stats are available in the ap_Info, as per usual.

	Then call MatchFirst() and then afterwards, 
                <link linkend="n118">MatchNext()</link>
                 with this
	structure.  You should check the return value each time (see below)
	and take the appropriate action, ultimately calling 
                <link linkend="n116">MatchEnd()</link>
                 when
	there are no more files or you are done.  You can tell when you are
	done by checking for the normal AmigaDOS return code
	ERROR_NO_MORE_ENTRIES.

	Note: patterns with trailing slashes may cause 
                <link linkend="n118">MatchFirst()/MatchNext()</link>
                	to return with an ap_Current-&gt;an_Lock on the object, and a filename
	of the empty string ("").

	See 
                <link linkend="n131">ParsePattern()</link>
                 for more information on the patterns.

   INPUTS
	pat        - Pattern to search for
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                 - Place holder for search.  MUST be longword aligned!

   RESULT
	error - 0 for success or error code.  (Opposite of most Dos calls!)

   BUGS
	In V36, there were a number of bugs with 
                <link linkend="n118">MatchFirst()/MatchNext()</link>
                .
	One was that if you entered a directory with a name like "df0:l"
	using DODIR, it would re-lock the full string "df0:l", which can
	cause problems if the disk has changed.  It also had problems
	with patterns such as #?/abc/def - the ap_Current-&gt;an_Lock would
	not be on the directory def is found in.  ap_Buf would be correct,
	however.  It had similar problems with patterns with trailing
	slashes.  These have been fixed for V37 and later.

	A bug that has not been fixed for V37 concerns a pattern of a
	single directory name (such as "l").  If you enter such a directory
	via DODIR, it re-locks l relative to the current directory.  Thus
	you must not change the current directory before calling 
                <link linkend="n118">MatchNext()</link>
                	with DODIR in that situation.  If you aren't using DODIR to enter
	directories you can ignore this.  This may be fixed in some upcoming
	release.

   SEE ALSO
	
                <link linkend="n118">MatchNext()</link>
                , 
                <link linkend="n131">ParsePattern()</link>
                , 
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n54">CurrentDir()</link>
                , 
                <link linkend="n68">Examine()</link>
                ,
	
                <link linkend="n116">MatchEnd()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">&lt;dos/dosasl.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n118">
            <title>dos.library/MatchNext</title>
            <literallayout class="monospaced">
                   NAME
	MatchNext - Finds the next file or directory that matches pattern (V36)

   SYNOPSIS
	error = MatchNext(AnchorPath)
	D0                    D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 MatchNext(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                 *)

   FUNCTION
	Locates the next file or directory that matches a given pattern.
	See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">&lt;dos/dosasl.h&gt;</ulink>
                 for more information.  Various bits in the flags
	allow the application to control the operation of MatchNext().

	See 
                <link linkend="n117">MatchFirst()</link>
                 for other notes.

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">AnchorPath</ulink>
                 - Place holder for search.  MUST be longword aligned!

   RESULT
	error - 0 for success or error code.  (Opposite of most Dos calls)

   BUGS
	See 
                <link linkend="n117">MatchFirst()</link>
                .

   SEE ALSO
	
                <link linkend="n117">MatchFirst()</link>
                , 
                <link linkend="n131">ParsePattern()</link>
                , 
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n54">CurrentDir()</link>
                , 
                <link linkend="n68">Examine()</link>
                ,
	
                <link linkend="n116">MatchEnd()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosasl.h">&lt;dos/dosasl.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n119">
            <title>dos.library/MatchPattern</title>
            <literallayout class="monospaced">
                   NAME
	MatchPattern --  Checks for a pattern match with a string (V36)

   SYNOPSIS
	match = MatchPattern(pat, str)
	D0                   D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 MatchPattern(STRPTR, STRPTR)

   FUNCTION
	Checks for a pattern match with a string.  The pattern must be a
	tokenized string output by 
                <link linkend="n131">ParsePattern()</link>
                .  This routine is
	case-sensitive.

	NOTE: this routine is highly recursive.  You must have at least
	1500 free bytes of stack to call this (it will cut off it's
	recursion before going any deeper than that and return failure).
	That's _currently_ enough for about 100 levels deep of #, (, ~, etc.

   INPUTS
	pat - Special pattern string to match as returned by 
                <link linkend="n131">ParsePattern()</link>
                	str - String to match against given pattern

   RESULT
	match - success or failure of pattern match.  On failure,
		
                <link linkend="n106">IoErr()</link>
                 will return 0 or ERROR_TOO_MANY_LEVELS (starting
		with V37 - before that there was no stack checking).

   SEE ALSO
	
                <link linkend="n131">ParsePattern()</link>
                , 
                <link linkend="n120">MatchPatternNoCase()</link>
                , 
                <link linkend="n117">MatchFirst()</link>
                , 
                <link linkend="n118">MatchNext()</link>
                
            </literallayout>
        </section>
        <section id="n120">
            <title>dos.library/MatchPatternNoCase</title>
            <literallayout class="monospaced">
                   NAME
	MatchPatternNoCase --  Checks for a pattern match with a string (V37)

   SYNOPSIS
	match = MatchPatternNoCase(pat, str)
	D0                         D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 MatchPatternNoCase(STRPTR, STRPTR)

   FUNCTION
	Checks for a pattern match with a string.  The pattern must be a
	tokenized string output by 
                <link linkend="n132">ParsePatternNoCase()</link>
                .  This routine is
	case-insensitive.

	NOTE: this routine is highly recursive.  You must have at least
	1500 free bytes of stack to call this (it will cut off it's
	recursion before going any deeper than that and return failure).
	That's _currently_ enough for about 100 levels deep of #, (, ~, etc.

   INPUTS
	pat - Special pattern string to match as returned by 
                <link linkend="n132">ParsePatternNoCase()</link>
                	str - String to match against given pattern

   RESULT
	match - success or failure of pattern match.  On failure,
		
                <link linkend="n106">IoErr()</link>
                 will return 0 or ERROR_TOO_MANY_LEVELS (starting
		with V37 - before that there was no stack checking).

   BUGS
	See 
                <link linkend="n132">ParsePatternNoCase()</link>
                .

   SEE ALSO
	
                <link linkend="n132">ParsePatternNoCase()</link>
                , 
                <link linkend="n119">MatchPattern()</link>
                , 
                <link linkend="n117">MatchFirst()</link>
                , 
                <link linkend="n118">MatchNext()</link>
                
            </literallayout>
        </section>
        <section id="n121">
            <title>dos.library/MaxCli</title>
            <literallayout class="monospaced">
                   NAME
	MaxCli -- returns the highest CLI process number possibly in use (V36)

   SYNOPSIS
	number = MaxCli()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 MaxCli(void)

   FUNCTION
	Returns the highest CLI number that may be in use.  CLI numbers are
	reused, and are usually as small as possible.  To find all CLIs, scan
	using 
                <link linkend="n78">FindCliProc()</link>
                 from 1 to MaxCLI().  The number returned by
	MaxCli() may change as processes are created and destroyed.

   RESULT
	number - The highest CLI number that _may_ be in use.

   SEE ALSO
	
                <link linkend="n78">FindCliProc()</link>
                , 
                <link linkend="n46">Cli()</link>
                
            </literallayout>
        </section>
        <section id="n122">
            <title>dos.library/NameFromFH</title>
            <literallayout class="monospaced">
                   NAME
	NameFromFH -- Get the name of an open filehandle (V36)

   SYNOPSIS
	success = NameFromFH(fh, buffer, len)
	D0                   D1    D2    D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 NameFromFH(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , LONG)

   FUNCTION
	Returns a fully qualified path for the filehandle.  This routine is
	guaranteed not to write more than len characters into the buffer.  The
	name will be null-terminated.  See 
                <link linkend="n123">NameFromLock()</link>
                 for more information.

	Note: Older filesystems that don't support 
                <link linkend="n69">ExamineFH()</link>
                 will cause
	NameFromFH() to fail with ERROR_ACTION_NOT_SUPPORTED.

   INPUTS
	fh     - 
                <link linkend="n110">Lock</link>
                 of object to be examined.
	buffer - Buffer to store name.
	len    - Length of buffer.

   RESULT
	success - Success/failure indicator.

   SEE ALSO
	
                <link linkend="n123">NameFromLock()</link>
                , 
                <link linkend="n69">ExamineFH()</link>
                
            </literallayout>
        </section>
        <section id="n123">
            <title>dos.library/NameFromLock</title>
            <literallayout class="monospaced">
                   NAME
	NameFromLock -- Returns the name of a locked object (V36)

   SYNOPSIS
	success = NameFromLock(lock, buffer, len)
	D0                      D1     D2    D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 NameFromLock(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , LONG)

   FUNCTION
	Returns a fully qualified path for the lock.  This routine is
	guaranteed not to write more than len characters into the buffer.  The
	name will be null-terminated.  NOTE: if the volume is not mounted,
	the system will request it (unless of course you set pr_WindowPtr to
	-1).  If the volume is not mounted or inserted, it will return an
	error.  If the lock passed in is NULL, "SYS:" will be returned. If
	the buffer is too short, an error will be returned, and 
                <link linkend="n106">IoErr()</link>
                 will
	return ERROR_LINE_TOO_LONG.

   INPUTS
	lock   - 
                <link linkend="n110">Lock</link>
                 of object to be examined.
	buffer - Buffer to store name.
	len    - Length of buffer.

   RESULT
	success - Success/failure indicator.

   BUGS
	Should return the name of the boot volume instead of SYS: for a NULL
	lock.

   SEE ALSO
	
                <link linkend="n122">NameFromFH()</link>
                , 
                <link linkend="n110">Lock()</link>
                
            </literallayout>
        </section>
        <section id="n124">
            <title>dos.library/NewLoadSeg</title>
            <literallayout class="monospaced">
                   NAME
	NewLoadSeg -- Improved version of 
                <link linkend="n109">LoadSeg</link>
                 for stacksizes (V36)

   SYNOPSIS
	seglist = NewLoadSeg(file, tags)
	D0		      D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 NewLoadSeg(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *)

	seglist = NewLoadSegTagList(file, tags)
	D0			     D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 NewLoadSegTagList(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *)

	seglist = NewLoadSegTags(file, ...)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 NewLoadSegTags(STRPTR, ...)

   FUNCTION
	Does a 
                <link linkend="n109">LoadSeg</link>
                 on a file, and takes additional actions based on the
	tags supplied.

	Clears unused portions of Code and Data hunks (as well as BSS hunks).
	(This also applies to 
                <link linkend="n104">InternalLoadSeg()</link>
                 and 
                <link linkend="n109">LoadSeg()</link>
                ).

	NOTE to overlay users: NewLoadSeg() does NOT return seglist in
	both D0 and D1, as 
                <link linkend="n109">LoadSeg</link>
                 does.  The current ovs.asm uses 
                <link linkend="n109">LoadSeg()</link>
                ,
	and assumes returns are in D1.  We will support this for 
                <link linkend="n109">LoadSeg()</link>
                	ONLY.

   INPUTS
	file - Filename of file to load
	tags - pointer to tagitem array

   RESULT
	seglist - Seglist loaded, or NULL

   BUGS
	No tags are currently defined.

   SEE ALSO
	
                <link linkend="n109">LoadSeg()</link>
                , 
                <link linkend="n175">UnLoadSeg()</link>
                , 
                <link linkend="n104">InternalLoadSeg()</link>
                , 
                <link linkend="n105">InternalUnLoadSeg()</link>
                
            </literallayout>
        </section>
        <section id="n125">
            <title>dos.library/NextDosEntry</title>
            <literallayout class="monospaced">
                   NAME
	NextDosEntry -- Get the next Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 entry (V36)

   SYNOPSIS
	newdlist = NextDosEntry(dlist,flags)
	D0                       D1    D2

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *NextDosEntry(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *,ULONG)

   FUNCTION
	Find the next Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 entry of the right type.  You MUST have locked
	the types you're looking for.  Returns NULL if there are no more of
	that type in the list.

   INPUTS
	dlist    - The current device entry.
	flags	 - What type of entries to look for.

   RESULT
	newdlist - The next device entry of the right type or NULL.

   SEE ALSO
	
                <link linkend="n35">AddDosEntry()</link>
                , 
                <link linkend="n142">RemDosEntry()</link>
                , 
                <link linkend="n79">FindDosEntry()</link>
                , 
                <link linkend="n111">LockDosList()</link>
                ,
	
                <link linkend="n114">MakeDosEntry()</link>
                , 
                <link linkend="n89">FreeDosEntry()</link>
                
            </literallayout>
        </section>
        <section id="n126">
            <title>dos.library/Open</title>
            <literallayout class="monospaced">
                    NAME
	Open -- Open a file for input or output

    SYNOPSIS
	file = Open( name, accessMode )
	D0	     D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 Open(STRPTR, LONG)

    FUNCTION
	The named file is opened and a file handle returned.  If the
	accessMode is MODE_OLDFILE, an existing file is opened for reading
	or writing. If the value is MODE_NEWFILE, a new file is created for
	writing. MODE_READWRITE opens a file with an shared lock, but
	creates it if it didn't exist.  Open types are documented in the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                 or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/dos.h">&lt;libraries/dos.h&gt;</ulink>
                 include file.

	The 'name' can be a filename (optionally prefaced by a device
	name), a simple device such as NIL:, a window specification such as
	CON: or RAW: followed by window parameters, or "*", representing the
	current window.  Note that as of V36, "*" is obsolete, and CONSOLE:
	should be used instead.

	If the file cannot be opened for any reason, the value returned
	will be zero, and a secondary error code will be available by
	calling the routine 
                <link linkend="n106">IoErr()</link>
                .

    INPUTS
	name	   - pointer to a null-terminated string
	accessMode - integer

    RESULTS
	file - BCPL pointer to a file handle

    SEE ALSO
	
                <link linkend="n49">Close()</link>
                , 
                <link linkend="n44">ChangeMode()</link>
                , 
                <link linkend="n122">NameFromFH()</link>
                , 
                <link linkend="n130">ParentOfFH()</link>
                , 
                <link linkend="n69">ExamineFH()</link>
                
            </literallayout>
        </section>
        <section id="n127">
            <title>dos.library/OpenFromLock</title>
            <literallayout class="monospaced">
                   NAME
	OpenFromLock -- Opens a file you have a lock on (V36)

   SYNOPSIS
	fh = OpenFromLock(lock)
	D0                 D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 OpenFromLock(BPTR)

   FUNCTION
	Given a lock, this routine performs an open on that lock.  If the open
	succeeds, the lock is (effectively) relinquished, and should not be
	UnLock()ed or used.  If the open fails, the lock is still usable.
	The lock associated with the file internally is of the same access
	mode as the lock you gave up - shared is similar to MODE_OLDFILE,
	exclusive is similar to MODE_NEWFILE.

   INPUTS
	lock - 
                <link linkend="n110">Lock</link>
                 on object to be opened.

   RESULT
	fh   - Newly opened file handle or NULL for failure

   BUGS
	In the original V36 autodocs, this was shown (incorrectly) as
	taking a Mode parameter as well.  The prototypes and pragmas were
	also wrong.

   SEE ALSO
	
                <link linkend="n126">Open()</link>
                , 
                <link linkend="n49">Close()</link>
                , 
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                
            </literallayout>
        </section>
        <section id="n128">
            <title>dos.library/Output</title>
            <literallayout class="monospaced">
                    NAME
	Output -- Identify the programs' initial output file handle

    SYNOPSIS
	file = Output()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 Output(void)

    FUNCTION
	Output() is used to identify the initial output stream allocated
	when the program was initiated.  Never close the filehandle returned
	by Output().

    RESULTS
	file - BCPL pointer to a file handle

    SEE ALSO
	
                <link linkend="n103">Input()</link>
                
            </literallayout>
        </section>
        <section id="n129">
            <title>dos.library/ParentDir</title>
            <literallayout class="monospaced">
                    NAME
	ParentDir -- Obtain the parent of a directory or file

    SYNOPSIS
	newlock = ParentDir( lock )
	D0		     D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 ParentDir(BPTR)

    FUNCTION
	The argument 'lock' is associated with a given file or directory.
	ParentDir() returns 'newlock' which is associated the parent
	directory of 'lock'.

	Taking the ParentDir() of the root of the current filing system
	returns a NULL (0) lock.  Note this 0 lock represents the root of
	file system that you booted from (which is, in effect, the parent
	of all other file system roots.)

    INPUTS
	lock - BCPL pointer to a lock

    RESULTS
	newlock - BCPL pointer to a lock

    SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n62">DupLock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                , 
                <link linkend="n130">ParentOfFH()</link>
                , 
                <link linkend="n63">DupLockFromFH()</link>
                
            </literallayout>
        </section>
        <section id="n130">
            <title>dos.library/ParentOfFH</title>
            <literallayout class="monospaced">
                   NAME
	ParentOfFH -- returns a lock on the parent directory of a file (V36)

   SYNOPSIS
	lock = ParentOfFH(fh)
	D0               D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 ParentOfFH(BPTR)

   FUNCTION
	Returns a shared lock on the parent directory of the filehandle.

   INPUTS
	fh   - Filehandle you want the parent of.

   RESULT
	lock - 
                <link linkend="n110">Lock</link>
                 on parent directory of the filehandle or NULL for failure.

   SEE ALSO
	Parent(), 
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n176">UnLock()</link>
                 
                <link linkend="n63">DupLockFromFH()</link>
                
            </literallayout>
        </section>
        <section id="n131">
            <title>dos.library/ParsePattern</title>
            <literallayout class="monospaced">
                   NAME
	ParsePattern -- Create a tokenized string for 
                <link linkend="n119">MatchPattern()</link>
                 (V36)

   SYNOPSIS
	IsWild = ParsePattern(Source, Dest, DestLength)
	d0                      D1     D2      D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ParsePattern(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , LONG)

   FUNCTION
	Tokenizes a pattern, for use by 
                <link linkend="n119">MatchPattern()</link>
                .  Also indicates if
	there are any wildcards in the pattern (i.e. whether it might match
	more than one item).  Note that Dest must be at least 2 times as
	large as Source plus bytes to be (almost) 100% certain of no
	buffer overflow.  This is because each input character can currently
	expand to 2 tokens (with one exception that can expand to 3, but
	only once per string).  Note: this implementation may change in
	the future, so you should handle error returns in all cases, but
	the size above should still be a reasonable upper bound for a buffer
	allocation.

	The patterns are fairly extensive, and approximate some of the ability
	of Unix/grep "regular expression" patterns.  Here are the available
	tokens:

	?	Matches a single character.
	#	Matches the following expression 0 or more times.
	(ab|cd)	Matches any one of the items seperated by '|'.
	~	Negates the following expression.  It matches all strings
		that do not match the expression (aka ~(foo) matches all
		strings that are not exactly "foo").
	[abc]	Character class: matches any of the characters in the class.
	[~bc]	Character class: matches any of the characters not in the
		class.
	a-z	Character range (only within character classes).
	%	Matches 0 characters always (useful in "(foo|bar|%)").
	*	Synonym for "#?", not available by default in 2.0.  Available
		as an option that can be turned on.

	"Expression" in the above table means either a single character
	(ex: "#?"), or an alternation (ex: "#(ab|cd|ef)"), or a character
	class (ex: "#[a-zA-Z]").

   INPUTS
	source     - unparsed wildcard string to search for.
       dest       - output string, gets tokenized version of input.
	DestLength - length available in destination (should be at least as
		     twice as large as source + 2 bytes).

   RESULT
	IsWild - 1 means there were wildcards in the pattern,
		 0 means there were no wildcards in the pattern,
		-1 means there was a buffer overflow or other error

   BUGS
	In V37 this call didn't always set 
                <link linkend="n106">IoErr()</link>
                 to something useful on an
	error.  Fixed in V39.

   SEE ALSO
	
                <link linkend="n132">ParsePatternNoCase()</link>
                , 
                <link linkend="n119">MatchPattern()</link>
                , 
                <link linkend="n117">MatchFirst()</link>
                , 
                <link linkend="n118">MatchNext()</link>
                
            </literallayout>
        </section>
        <section id="n132">
            <title>dos.library/ParsePatternNoCase</title>
            <literallayout class="monospaced">
                   NAME
	ParsePatternNoCase -- Create a tokenized string for
						
                <link linkend="n120">MatchPatternNoCase()</link>
                 (V37)

   SYNOPSIS
	IsWild = ParsePatternNoCase(Source, Dest, DestLength)
	d0                            D1     D2      D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ParsePatternNoCase(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , LONG)

   FUNCTION
	Tokenizes a pattern, for use by 
                <link linkend="n120">MatchPatternNoCase()</link>
                .  Also indicates
	if there are any wildcards in the pattern (i.e. whether it might match
	more than one item).  Note that Dest must be at least 2 times as
	large as Source plus 2 bytes.

	For a description of the wildcards, see 
                <link linkend="n131">ParsePattern()</link>
                .

   INPUTS
	source     - unparsed wildcard string to search for.
       dest       - output string, gets tokenized version of input.
	DestLength - length available in destination (should be at least as
		     twice as large as source + 2 bytes).

   RESULT
	IsWild - 1 means there were wildcards in the pattern,
		 0 means there were no wildcards in the pattern,
		-1 means there was a buffer overflow or other error

   BUGS
	In V37 this call didn't always set 
                <link linkend="n106">IoErr()</link>
                 to something useful on an
	error.  Fixed in V39.
	In V37, it didn't properly convert character-classes ([x-y]) to
	upper case.  Workaround: convert the input pattern to upper case
	using 
                <link linkend="n476">ToUpper()</link>
                 from utility.library before calling
	ParsePatternNoCase().  Fixed in V39 dos.

   SEE ALSO
	
                <link linkend="n131">ParsePattern()</link>
                , 
                <link linkend="n120">MatchPatternNoCase()</link>
                , 
                <link linkend="n117">MatchFirst()</link>
                , 
                <link linkend="n118">MatchNext()</link>
                ,
	
                <link linkend="n476">utility.library/ToUpper()</link>
                
            </literallayout>
        </section>
        <section id="n133">
            <title>dos.library/PathPart</title>
            <literallayout class="monospaced">
                   NAME
	PathPart -- Returns a pointer to the end of the next-to-last (V36)
		    component of a path.

   SYNOPSIS
	fileptr = PathPart( path )
	D0		     D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 PathPart( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 )

   FUNCTION
	This function returns a pointer to the character after the next-to-last
	component of a path specification, which will normally be the directory
	name.  If there is only one component, it returns a pointer to the
	beginning of the string.  The only real difference between this and
	
                <link linkend="n76">FilePart()</link>
                 is the handling of '/'.

   INPUTS
	path - pointer to an path string.  May be relative to the current
	       directory or the current disk.

   RESULT
	fileptr - pointer to the end of the next-to-last component of the path.

   EXAMPLE
	PathPart("xxx:yyy/zzz/qqq") would return a pointer to the last '/'.
	PathPart("xxx:yyy") would return a pointer to the first 'y').

   SEE ALSO
	
                <link linkend="n76">FilePart()</link>
                , 
                <link linkend="n36">AddPart()</link>
                
            </literallayout>
        </section>
        <section id="n134">
            <title>dos.library/PrintFault</title>
            <literallayout class="monospaced">
                   NAME
	PrintFault -- Returns the text associated with a DOS error code (V36)

   SYNOPSIS
	success = PrintFault(code, header)
	D0                    D1     D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 PrintFault(LONG, STRPTR)

   FUNCTION
	This routine obtains the error message text for the given error code.
	This is similar to the 
                <link linkend="n73">Fault()</link>
                 function, except that the output is
	written to the default output channel with buffered output.
	The value returned by 
                <link linkend="n106">IoErr()</link>
                 is set to the code passed in.

   INPUTS
	code   - Error code
	header - header to output before error text

   RESULT
	success - Success/failure code.

   SEE ALSO
	
                <link linkend="n106">IoErr()</link>
                , 
                <link linkend="n73">Fault()</link>
                , 
                <link linkend="n160">SetIoErr()</link>
                , 
                <link linkend="n128">Output()</link>
                , 
                <link linkend="n85">FPuts()</link>
                
            </literallayout>
        </section>
        <section id="n135">
            <title>dos.library/PutStr</title>
            <literallayout class="monospaced">
                   NAME
	PutStr -- Writes a string the the default output (buffered) (V36)

   SYNOPSIS
	error = PutStr(str)
	D0             D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 PutStr(STRPTR)

   FUNCTION
	This routine writes an unformatted string to the default output.  No
	newline is appended to the string and any error is returned.  This
	routine is buffered.

   INPUTS
	str   - Null-terminated string to be written to default output

   RESULT
	error - 0 for success, -1 for any error.  NOTE: this is opposite
		most Dos function returns!

   SEE ALSO
	
                <link linkend="n85">FPuts()</link>
                , 
                <link linkend="n84">FPutC()</link>
                , 
                <link linkend="n91">FWrite()</link>
                , 
                <link linkend="n186">WriteChars()</link>
                
            </literallayout>
        </section>
        <section id="n136">
            <title>dos.library/Read</title>
            <literallayout class="monospaced">
                    NAME
	Read -- Read bytes of data from a file

    SYNOPSIS
	actualLength = Read( file, buffer, length )
	D0		     D1    D2	   D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 Read(BPTR, void *, LONG)

    FUNCTION
	Data can be copied using a combination of Read() and 
                <link linkend="n185">Write()</link>
                .
	Read() reads bytes of information from an opened file (represented
	here by the argument 'file') into the buffer given. The argument
	'length' is the length of the buffer given.

	The value returned is the length of the information actually read.
	So, when 'actualLength' is greater than zero, the value of
	'actualLength' is the the number of characters read. Usually Read
	will try to fill up your buffer before returning. A value of zero
	means that end-of-file has been reached. Errors are indicated by a
	value of -1.

	Note: this is an unbuffered routine (the request is passed directly
	to the filesystem.)  Buffered I/O is more efficient for small
	reads and writes; see 
                <link linkend="n74">FGetC()</link>
                .

    INPUTS
	file - BCPL pointer to a file handle
	buffer - pointer to buffer
	length - integer

    RESULTS
	actualLength - integer

    SEE ALSO
	
                <link linkend="n126">Open()</link>
                , 
                <link linkend="n49">Close()</link>
                , 
                <link linkend="n185">Write()</link>
                , 
                <link linkend="n149">Seek()</link>
                , 
                <link linkend="n74">FGetC()</link>
                
            </literallayout>
        </section>
        <section id="n137">
            <title>dos.library/ReadArgs</title>
            <literallayout class="monospaced">
                   NAME
	ReadArgs - Parse the command line input (V36)

   SYNOPSIS
	result = ReadArgs(template, array, rdargs)
	D0                   D1      D2      D3

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 * ReadArgs(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 *)

   FUNCTION
	Parses and argument string according to a template.  Normally gets
	the arguments by reading buffered IO from 
                <link linkend="n103">Input()</link>
                , but also can be
	made to parse a string.  MUST be matched by a call to 
                <link linkend="n87">FreeArgs()</link>
                .

	ReadArgs() parses the commandline according to a template that is
	passed to it.  This specifies the different command-line options and
	their types.  A template consists of a list of options.  Options are
	named in "full" names where possible (for example, "Quick" instead of
	"Q").  Abbreviations can also be specified by using "abbrev=option"
	(for example, "Q=Quick").

	Options in the template are separated by commas.  To get the results
	of ReadArgs(), you examine the array of longwords you passed to it
	(one entry per option in the template).  This array should be cleared
	(or initialized to your default values) before passing to ReadArgs().
	Exactly what is put in a given entry by ReadArgs() depends on the type
	of option.  The default is a string (a sequence of non-whitespace
	characters, or delimited by quotes, which will be stripped by
	ReadArgs()), in which case the entry will be a pointer.

	Options can be followed by modifiers, which specify things such as
	the type of the option.  Modifiers are specified by following the
	option with a '/' and a single character modifier.  Multiple modifiers
	can be specified by using multiple '/'s.  Valid modifiers are:

	/S - Switch.  This is considered a boolean variable, and will be
	     set if the option name appears in the command-line.  The entry
	     is the boolean (0 for not set, non-zero for set).

	/K - Keyword.  This means that the option will not be filled unless
	     the keyword appears.  For example if the template is "Name/K",
	     then unless "Name=&lt;string&gt;" or "Name &lt;string&gt;" appears in the
	     command line, Name will not be filled.

	/N - Number.  This parameter is considered a decimal number, and will
	     be converted by ReadArgs.  If an invalid number is specified,
	     an error will be returned.  The entry will be a pointer to the
	     longword number (this is how you know if a number was specified).

	/T - Toggle.  This is similar to a switch, but when specified causes
	     the boolean value to "toggle".  Similar to /S.

	/A - Required.  This keyword must be given a value during command-line
	     processing, or an error is returned.

	/F - Rest of line.  If this is specified, the entire rest of the line
	     is taken as the parameter for the option, even if other option
	     keywords appear in it.

	/M - Multiple strings.  This means the argument will take any number
	     of strings, returning them as an array of strings.  Any arguments
	     not considered to be part of another option will be added to this
	     option.  Only one /M should be specified in a template.  Example:
	     for a template "Dir/M,All/S" the command-line "foo bar all qwe"
	     will set the boolean "all", and return an array consisting of
	     "foo", "bar", and "qwe".  The entry in the array will be a pointer
	     to an array of string pointers, the last of which will be NULL.

	     There is an interaction between /M parameters and /A parameters.
	     If there are unfilled /A parameters after parsing, it will grab
	     strings from the end of a previous /M parameter list to fill the
	     /A's.  This is used for things like Copy ("From/A/M,To/A").

	ReadArgs() returns a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 if it succeeds.  This serves as an
	"anchor" to allow 
                <link linkend="n87">FreeArgs()</link>
                 to free the associated memory.  You can
	also pass in a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 to control the operation of ReadArgs()
	(normally you pass NULL for the parameter, and ReadArgs() allocates
	one for you).  This allows providing different sources for the
	arguments, providing your own string buffer space for temporary
	storage, and extended help text.  See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">&lt;dos/rdargs.h&gt;</ulink>
                 for more
	information on this.  Note: if you pass in a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                , you must
	still call 
                <link linkend="n87">FreeArgs()</link>
                 to release storage that gets attached to it,
	but you are responsible for freeing the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 yourself.

	If you pass in a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 structure, you MUST reset (clear or set)
	RDA_Buffer for each new call to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                .  The exact behavior if you
	don't do this varies from release to release and case to case; don't
	count on the behavior!

	See BUGS regarding passing in strings.

   INPUTS
	template - formatting string
	array    - array of longwords for results, 1 per template entry
	rdargs   - optional rdargs structure for options.  
                <link linkend="n38">AllocDosObject</link>
                		   should be used for allocating them if you pass one in.

   RESULT
	result   - a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">RDArgs</ulink>
                 or NULL for failure.

   BUGS
	In V36, there were a couple of minor bugs with certain argument
	combinations (/M/N returned strings, /T didn't work, and /K and
	/F interacted).  Also, a template with a /K before any non-switch
	parameter will require the argument name to be given in order for
	line to be accepted (i.e. "parm/K,xyzzy/A" would require
	"xyzzy=xxxxx" in order to work - "xxxxx" would not work).  If you
	need to avoid this for V36, put /K parameters after all non-switch
	parameters.  These problems should be fixed for V37.

	Currently (V37 and before) it requires any strings passed in to have
	newlines at the end of the string.  This may or may not be fixed in
	the future.

   SEE ALSO
	
                <link linkend="n77">FindArg()</link>
                , 
                <link linkend="n138">ReadItem()</link>
                , 
                <link linkend="n87">FreeArgs()</link>
                , 
                <link linkend="n38">AllocDosObject()</link>
                
            </literallayout>
        </section>
        <section id="n138">
            <title>dos.library/ReadItem</title>
            <literallayout class="monospaced">
                   NAME
	ReadItem - reads a single argument/name from command line (V36)

   SYNOPSIS
	value = ReadItem(buffer, maxchars, input)
	D0                D1        D2      D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ReadItem(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">CSource</ulink>
                 *)

   FUNCTION
	Reads a "word" from either 
                <link linkend="n103">Input()</link>
                 (buffered), or via 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">CSource</ulink>
                , if it
	is non-NULL (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">&lt;dos/rdargs.h&gt;</ulink>
                 for more information).  Handles
	quoting and some '*' substitutions (*e and *n) inside quotes (only).
	See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">dos/dos.h</ulink>
                 for a listing of values returned by ReadItem()
	(ITEM_XXXX).  A "word" is delimited by whitespace, quotes, '=', or
	an EOF.

	ReadItem always unreads the last thing read (UnGetC(fh,-1)) so the
	caller can find out what the terminator was.

   INPUTS
	buffer   - buffer to store word in.
	maxchars - size of the buffer
	input    - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">CSource</ulink>
                 input or NULL (uses FGetC(Input()))

   RESULT
	value - See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                 for return values.

   BUGS
	Doesn't actually unread the terminator.

   SEE ALSO
	
                <link linkend="n137">ReadArgs()</link>
                , 
                <link linkend="n77">FindArg()</link>
                , 
                <link linkend="n174">UnGetC()</link>
                , 
                <link linkend="n74">FGetC()</link>
                , 
                <link linkend="n103">Input()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                ,
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/rdargs.h">&lt;dos/rdargs.h&gt;</ulink>
                , 
                <link linkend="n87">FreeArgs()</link>
                
            </literallayout>
        </section>
        <section id="n139">
            <title>dos.library/ReadLink</title>
            <literallayout class="monospaced">
                   NAME
	ReadLink -- Reads the path for a soft filesystem link (V36)

   SYNOPSIS
	success = ReadLink( port, lock, path, buffer, size)
	D0		     D1    D2    D3     D4     D5

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ReadLink( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ULONG)

   FUNCTION
	ReadLink() takes a lock/name pair (usually from a failed attempt
	to use them to access an object with packets), and asks the
	filesystem to find the softlink and fill buffer with the modified
	path string.  You then start the resolution process again by
	calling 
                <link linkend="n95">GetDeviceProc()</link>
                 with the new string from ReadLink().

	Soft-links are resolved at access time by a combination of the
	filesystem (by returning ERROR_IS_SOFT_LINK to dos), and by
	Dos (using ReadLink() to resolve any links that are hit).

   INPUTS
	port - msgport of the filesystem
	lock - lock this path is relative to on the filesystem
	path - path that caused the ERROR_IS_SOFT_LINK
	buffer - pointer to buffer for new path from handler.
	size - size of buffer.

   RESULT
	Success - boolean

   BUGS
	In V36, soft-links didn't work in the ROM filesystem.  This was
	fixed for V37.

   SEE ALSO
	
                <link linkend="n115">MakeLink()</link>
                , 
                <link linkend="n126">Open()</link>
                , 
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n95">GetDeviceProc()</link>
                
            </literallayout>
        </section>
        <section id="n140">
            <title>dos.library/Relabel</title>
            <literallayout class="monospaced">
                   NAME
	Relabel -- Change the volume name of a volume (V36)

   SYNOPSIS
	success = Relabel(volumename,name)
	D0                    D1      D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Relabel(STRPTR,STRPTR)

   FUNCTION
	Changes the volumename of a volume, if supported by the filesystem.

   INPUTS
	volumename - Full name of device to rename (with ':')
	newname    - New name to apply to device (without ':')

   RESULT
	success    - Success/failure indicator

   SEE ALSO

            </literallayout>
        </section>
        <section id="n141">
            <title>dos.library/RemAssignList</title>
            <literallayout class="monospaced">
                   NAME
	RemAssignList -- 
                <link linkend="n276">Remove</link>
                 an entry from a multi-dir assign (V36)

   SYNOPSIS
	success = RemAssignList(name,lock)
	D0                  	 D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 RemAssignList(STRPTR,BPTR)

   FUNCTION
	Removes an entry from a multi-directory assign.  The entry removed is
	the first one for which 
                <link linkend="n148">SameLock</link>
                 with 'lock' returns that they are on
	the same object.  The lock for the entry in the list is unlocked (not
	the entry passed in).

   INPUTS
	name - Name of device to remove lock from (without trailing ':')
	lock - 
                <link linkend="n110">Lock</link>
                 associated with the object to remove from the list

   RESULT
	success - Success/failure indicator.

   BUGS
	In V36 through V39.23 dos, it would fail to remove the first lock
	in the assign.  Fixed in V39.24 dos (after the V39.106 kickstart).

   SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n41">AssignLock()</link>
                , 
                <link linkend="n42">AssignPath()</link>
                , 
                <link linkend="n40">AssignLate()</link>
                , 
                <link linkend="n62">DupLock()</link>
                ,
	
                <link linkend="n39">AssignAdd()</link>
                , 
                <link linkend="n176">UnLock()</link>
                
            </literallayout>
        </section>
        <section id="n142">
            <title>dos.library/RemDosEntry</title>
            <literallayout class="monospaced">
                   NAME
	RemDosEntry -- Removes a Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 entry from it's list (V36)

   SYNOPSIS
	success = RemDosEntry(dlist)
	D0                     D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 RemDosEntry(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosList</ulink>
                 *)

   FUNCTION
	This removes an entry from the Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 list.  The memory associated
	with the entry is NOT freed.  NOTE: you must have locked the Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                	with the appropriate flags before calling this routine.  Handler
	writers should see the 
                <link linkend="n35">AddDosEntry()</link>
                 caveats about locking and use
	a similar workaround to avoid deadlocks.

   INPUTS
	dlist   - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 list entry to be removed.

   RESULT
	success - Success/failure indicator

   SEE ALSO
	
                <link linkend="n35">AddDosEntry()</link>
                , 
                <link linkend="n79">FindDosEntry()</link>
                , 
                <link linkend="n125">NextDosEntry()</link>
                , 
                <link linkend="n111">LockDosList()</link>
                ,
	
                <link linkend="n114">MakeDosEntry()</link>
                , 
                <link linkend="n89">FreeDosEntry()</link>
                
            </literallayout>
        </section>
        <section id="n143">
            <title>dos.library/RemSegment</title>
            <literallayout class="monospaced">
                   NAME
	RemSegment - Removes a resident segment from the resident list (V36)

   SYNOPSIS
	success = RemSegment(segment)
	D0		        D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 RemSegment(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Segment</ulink>
                 *)

   FUNCTION
	Removes a resident segment from the Dos resident segment list,
	unloads it, and does any other cleanup required.  Will only succeed
	if the seg_UC (usecount) is 0.

   INPUTS
	segment - the segment to be removed

   RESULT
	success - success or failure.

   SEE ALSO
	
                <link linkend="n80">FindSegment()</link>
                , 
                <link linkend="n37">AddSegment()</link>
                
            </literallayout>
        </section>
        <section id="n144">
            <title>dos.library/Rename</title>
            <literallayout class="monospaced">
                    NAME
	Rename -- Rename a directory or file

    SYNOPSIS
	success = Rename( oldName, newName )
	D0		  D1	   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Rename(STRPTR, STRPTR)

    FUNCTION
	Rename() attempts to rename the file or directory specified as
	'oldName' with the name 'newName'. If the file or directory
	'newName' exists, Rename() fails and returns an error. Both
	'oldName' and the 'newName' can contain a directory specification.
	In this case, the file will be moved from one directory to another.

	Note: it is impossible to Rename() a file from one volume to
	another.

    INPUTS
	oldName - pointer to a null-terminated string
	newName - pointer to a null-terminated string

    RESULTS
	success - boolean

    SEE ALSO
	
                <link linkend="n140">Relabel()</link>
                
            </literallayout>
        </section>
        <section id="n145">
            <title>dos.library/ReplyPkt</title>
            <literallayout class="monospaced">
                   NAME
	ReplyPkt -- replies a packet to the person who sent it to you (V36)

   SYNOPSIS
	ReplyPkt(packet, result1, result2)
		   D1      D2       D3

	void ReplyPkt(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosPacket</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , LONG)

   FUNCTION
	This returns a packet to the process which sent it to you.  In
	addition, puts your pr_MsgPort address in dp_Port, so using ReplyPkt()
	again will send the message to you.  (This is used in "ping-ponging"
	packets between two processes).  It uses result 1 &amp; 2 to set the
	dp_Res1 and dp_Res2 fields of the packet.

   INPUTS
	packet  - packet to reply, assumed to set up correctly.
	result1 - first result
	result2 - secondary result

   SEE ALSO
	
                <link linkend="n61">DoPkt()</link>
                , 
                <link linkend="n152">SendPkt()</link>
                , 
                <link linkend="n184">WaitPkt()</link>
                , 
                <link linkend="n106">IoErr()</link>
                
            </literallayout>
        </section>
        <section id="n146">
            <title>dos.library/RunCommand</title>
            <literallayout class="monospaced">
                   NAME
	RunCommand -- Runs a program using the current process (V36)

   SYNOPSIS
	rc = RunCommand(seglist, stacksize, argptr, argsize)
	D0                D1         D2       D3      D4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 RunCommand(BPTR, ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ULONG)

   FUNCTION
	Runs a command on your process/cli.  Seglist may be any language,
	including BCPL programs.  Stacksize is in bytes.  argptr is a null-
	terminated string, argsize is its length.  Returns the returncode the
	program exited with in d0. Returns -1 if the stack couldn't be
	allocated.

	NOTE: the argument string MUST be terminated with a newline to work
	properly with 
                <link linkend="n137">ReadArgs()</link>
                 and other argument parsers.

	RunCommand also takes care of setting up the current input filehandle
	in such a way that 
                <link linkend="n137">ReadArgs()</link>
                 can be used in the program, and restores
	the state of the buffering before returning.  It also sets the value
	returned by 
                <link linkend="n92">GetArgStr()</link>
                , and restores it before returning.  NOTE:
	the setting of the argument string in the filehandle was added in V37.

	It's usually appropriate to set the command name (via
	
                <link linkend="n164">SetProgramName()</link>
                ) before calling RunCommand().  RunCommand() sets
	the value returned by 
                <link linkend="n92">GetArgStr()</link>
                 while the command is running.

   INPUTS
	seglist   - Seglist of command to run.
	stacksize - Number of bytes to allocate for stack space
	argptr    - Pointer to argument command string.
	argsize   - Number of bytes in argument command.

   RESULT
	rc        - Return code from executed command. -1 indicates failure

   SEE ALSO
	
                <link linkend="n52">CreateNewProc()</link>
                , 
                <link linkend="n173">SystemTagList()</link>
                , 
                <link linkend="n70">Execute()</link>
                , 
                <link linkend="n92">GetArgStr()</link>
                ,
	
                <link linkend="n164">SetProgramName()</link>
                , 
                <link linkend="n137">ReadArgs()</link>
                
            </literallayout>
        </section>
        <section id="n147">
            <title>dos.library/SameDevice</title>
            <literallayout class="monospaced">
                   NAME
	SameDevice -- Are two locks are on partitions of the device? (V37)

   SYNOPSIS
	same = SameDevice(lock1, lock2)
	D0		   D1     D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SameDevice( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 )

   FUNCTION
	SameDevice() returns whether two locks refer to partitions that
	are on the same physical device (if it can figure it out).  This
	may be useful in writing copy routines to take advantage of
	asynchronous multi-device copies.

	Entry existed in V36 and always returned 0.

   INPUTS
	lock1,lock2 - locks

   RESULT
	same - whether they're on the same device as far as Dos can determine.

            </literallayout>
        </section>
        <section id="n148">
            <title>dos.library/SameLock</title>
            <literallayout class="monospaced">
                   NAME
	SameLock -- returns whether two locks are on the same object (V36)

   SYNOPSIS
	value = SameLock(lock1, lock2)
	D0		  D1     D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SameLock(BPTR, BPTR)

   FUNCTION
	Compares two locks.  Returns LOCK_SAME if they are on the same object,
	LOCK_SAME_VOLUME if on different objects on the same volume, and
	LOCK_DIFFERENT if they are on different volumes.  Always compare
	for equality or non-equality with the results, in case new return
	values are added.

   INPUTS
	lock1 - 1st lock for comparison
	lock2 - 2nd lock for comparison

   RESULT
	value -	LOCK_SAME, LOCK_SAME_VOLUME, or LOCK_DIFFERENT

   BUGS
	Should do more extensive checks for NULL against a real lock, checking
	to see if the real lock is a lock on the root of the boot volume.

	In V36, it would return LOCK_SAME_VOLUME for different volumes on the
	same handler.  Also, LOCK_SAME_VOLUME was LOCK_SAME_HANDLER (now
	an obsolete define, see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                ).

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n149">
            <title>dos.library/Seek</title>
            <literallayout class="monospaced">
                    NAME
	Seek -- Set the current position for reading and writing

    SYNOPSIS
	oldPosition = Seek( file, position, mode )
	D0		    D1	  D2	    D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 Seek(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , LONG)

    FUNCTION
	Seek() sets the read/write cursor for the file 'file' to the
	position 'position'. This position is used by both 
                <link linkend="n136">Read()</link>
                 and
	
                <link linkend="n185">Write()</link>
                 as a place to start reading or writing. The result is the
	current absolute position in the file, or -1 if an error occurs, in
	which case 
                <link linkend="n106">IoErr()</link>
                 can be used to find more information. 'mode' can
	be OFFSET_BEGINNING, OFFSET_CURRENT or OFFSET_END. It is used to
	specify the relative start position. For example, 20 from current
	is a position 20 bytes forward from current, -20 is 20 bytes back
	from current.

	So that to find out where you are, seek zero from current. The end
	of the file is a Seek() positioned by zero from end. You cannot
	Seek() beyond the end of a file.

    INPUTS
	file - BCPL pointer to a file handle
	position - integer
	mode - integer

    RESULTS
	oldPosition - integer

    BUGS
	The V36 and V37 ROM filesystem (and V36/V37 l:fastfilesystem)
	returns the current position instead of -1 on an error.  It sets
	
                <link linkend="n106">IoErr()</link>
                 to 0 on success, and an error code on an error.  This bug
	was fixed in the V39 filesystem.

    SEE ALSO
	
                <link linkend="n136">Read()</link>
                , 
                <link linkend="n185">Write()</link>
                , 
                <link linkend="n158">SetFileSize()</link>
                
            </literallayout>
        </section>
        <section id="n150">
            <title>dos.library/SelectInput</title>
            <literallayout class="monospaced">
                   NAME
	SelectInput -- Select a filehandle as the default input channel (V36)

   SYNOPSIS
	old_fh = SelectInput(fh)
	D0                   D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 SelectInput(BPTR)

   FUNCTION
	Set the current input as the default input for the process.
	This changes the value returned by 
                <link linkend="n103">Input()</link>
                .  old_fh should
	be closed or saved as needed.

   INPUTS
	fh     - Newly default input handle

   RESULT
	old_fh - Previous default input filehandle

   SEE ALSO
	
                <link linkend="n103">Input()</link>
                , 
                <link linkend="n151">SelectOutput()</link>
                , 
                <link linkend="n128">Output()</link>
                
            </literallayout>
        </section>
        <section id="n151">
            <title>dos.library/SelectOutput</title>
            <literallayout class="monospaced">
                   NAME
	SelectOutput -- Select a filehandle as the default output channel (V36)

   SYNOPSIS
	old_fh = SelectOutput(fh)
	D0                    D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 SelectOutput(BPTR)

   FUNCTION
	Set the current output as the default output for the process.
	This changes the value returned by 
                <link linkend="n128">Output()</link>
                .  old_fh should
	be closed or saved as needed.

   INPUTS
	fh     - Newly desired output handle

   RESULT
	old_fh - Previous current output

   SEE ALSO
	
                <link linkend="n128">Output()</link>
                , 
                <link linkend="n150">SelectInput()</link>
                , 
                <link linkend="n103">Input()</link>
                
            </literallayout>
        </section>
        <section id="n152">
            <title>dos.library/SendPkt</title>
            <literallayout class="monospaced">
                   NAME
	SendPkt -- Sends a packet to a handler (V36)

   SYNOPSIS
	SendPkt(packet, port, replyport)
		 D1     D2	D3

	void SendPkt(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosPacket</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *)

   FUNCTION
	Sends a packet to a handler and does not wait.  All fields in the
	packet must be initialized before calling this routine.  The packet
	will be returned to replyport.  If you wish to use this with
	
                <link linkend="n184">WaitPkt()</link>
                , use the address of your pr_MsgPort for replyport.

   INPUTS
	packet - packet to send, must be initialized and have a message.
	port   - pr_MsgPort of handler process to send to.
	replyport - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 for the packet to come back to.

   NOTES
	Callable from a task.

   SEE ALSO
	
                <link linkend="n61">DoPkt()</link>
                , 
                <link linkend="n184">WaitPkt()</link>
                , 
                <link linkend="n38">AllocDosObject()</link>
                , 
                <link linkend="n90">FreeDosObject()</link>
                , 
                <link linkend="n33">AbortPkt()</link>
                
            </literallayout>
        </section>
        <section id="n153">
            <title>dos.library/SetArgStr</title>
            <literallayout class="monospaced">
                   NAME
	SetArgStr -- Sets the arguments for the current process (V36)

   SYNOPSIS
	oldptr = SetArgStr(ptr)
	D0		   D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 SetArgStr(STRPTR)

   FUNCTION
	Sets the arguments for the current program.  The ptr MUST be reset
	to it's original value before process exit.

   INPUTS
	ptr - pointer to new argument string.

   RESULT
	oldptr - the previous argument string

   SEE ALSO
	
                <link linkend="n92">GetArgStr()</link>
                , 
                <link linkend="n146">RunCommand()</link>
                
            </literallayout>
        </section>
        <section id="n154">
            <title>dos.library/SetComment</title>
            <literallayout class="monospaced">
                    NAME
	SetComment -- Change a files' comment string

    SYNOPSIS
	success = SetComment( name, comment )
	D0		      D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetComment(STRPTR, STRPTR)

    FUNCTION
	SetComment() sets a comment on a file or directory. The comment is
	a pointer to a null-terminated string of up to 80 characters in the
	current ROM filesystem (and RAM:).  Note that not all filesystems
	will support comments (for example, NFS usually will not), or the
	size of comment supported may vary.

    INPUTS
	name    - pointer to a null-terminated string
	comment - pointer to a null-terminated string

    RESULTS
	success - boolean

    SEE ALSO
	
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <link linkend="n166">SetProtection()</link>
                
            </literallayout>
        </section>
        <section id="n155">
            <title>dos.library/SetConsoleTask</title>
            <literallayout class="monospaced">
                   NAME
	SetConsoleTask -- Sets the default console for the process (V36)

   SYNOPSIS
	oldport = SetConsoleTask(port)
	D0			  D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *SetConsoleTask(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *)

   FUNCTION
	Sets the default console task's port (pr_ConsoleTask) for the
	current process.

   INPUTS
	port - The pr_MsgPort of the default console handler for the process

   RESULT
	oldport - The previous ConsoleTask value.

   SEE ALSO
	
                <link linkend="n93">GetConsoleTask()</link>
                , 
                <link linkend="n126">Open()</link>
                
            </literallayout>
        </section>
        <section id="n156">
            <title>dos.library/SetCurrentDirName</title>
            <literallayout class="monospaced">
                   NAME
	SetCurrentDirName -- Sets the directory name for the process (V36)

   SYNOPSIS
	success = SetCurrentDirName(name)
	D0                        D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetCurrentDirName(STRPTR)

   FUNCTION
	Sets the name for the current dir in the cli structure.  If the name
	is too long to fit, a failure is returned, and the old value is left
	intact.  It is advised that you inform the user of this condition.
	This routine is safe to call even if there is no CLI structure.

   INPUTS
	name    - Name of directory to be set.

   RESULT
	success - Success/failure indicator

   BUGS
	This clips to a fixed (1.3 compatible) size.

   SEE ALSO
	
                <link linkend="n94">GetCurrentDirName()</link>
                
            </literallayout>
        </section>
        <section id="n157">
            <title>dos.library/SetFileDate</title>
            <literallayout class="monospaced">
                   NAME
	SetFileDate -- Sets the modification date for a file or dir (V36)

   SYNOPSIS
	success = SetFileDate(name, date)
	D0                     D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetFileDate(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 *)

   FUNCTION
	Sets the file date for a file or directory.  Note that for the Old
	File System and the Fast File System, the date of the root directory
	cannot be set.  Other filesystems may not support setting the date
	for all files/directories.

   INPUTS
	name - Name of object
	date - New modification date

   RESULT
	success - Success/failure indication

   SEE ALSO
	
                <link linkend="n55">DateStamp()</link>
                , 
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <link linkend="n66">ExAll()</link>
                
            </literallayout>
        </section>
        <section id="n158">
            <title>dos.library/SetFileSize</title>
            <literallayout class="monospaced">
                   NAME
	SetFileSize -- Sets the size of a file (V36)

   SYNOPSIS
	newsize = SetFileSize(fh, offset, mode)
	D0                    D1    D2     D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SetFileSize(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , LONG)

   FUNCTION
	Changes the file size, truncating or extending as needed.  Not all
	handlers may support this; be careful and check the return code.  If
	the file is extended, no values should be assumed for the new bytes.
	If the new position would be before the filehandle's current position
	in the file, the filehandle will end with a position at the
	end-of-file.  If there are other filehandles open onto the file, the
	new size will not leave any filehandle pointing past the end-of-file.
	You can check for this by looking at the new size (which would be
	different than what you requested).

	The seek position should not be changed unless the file is made
	smaller than the current seek position.  However, see BUGS.

	Do NOT count on any specific values to be in any extended area.

   INPUTS
	fh     - File to be truncated/extended.
	offset - Offset from position determined by mode.
	mode   - One of OFFSET_BEGINNING, OFFSET_CURRENT, or OFFSET_END.

   RESULT
	newsize - position of new end-of-file or -1 for error.

   BUGS
	The RAM: filesystem and the normal Amiga filesystem act differently
	in where the file position is left after SetFileSize().  RAM: leaves
	you at the new end of the file (incorrectly), while the Amiga ROM
	filesystem leaves the seek position alone, unless the new position
	is less than the current position, in which case you're left at the
	new EOF.

	The best workaround is to not make any assumptions about the seek
	position after SetFileSize().

   SEE ALSO
	
                <link linkend="n149">Seek()</link>
                
            </literallayout>
        </section>
        <section id="n159">
            <title>dos.library/SetFileSysTask</title>
            <literallayout class="monospaced">
                   NAME
	SetFileSysTask -- Sets the default filesystem for the process (V36)

   SYNOPSIS
	oldport = SetFileSysTask(port)
	D0			  D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *SetFileSysTask(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *)

   FUNCTION
	Sets the default filesystem task's port (pr_FileSystemTask) for the
	current process.

   INPUTS
	port - The pr_MsgPort of the default filesystem for the process

   RESULT
	oldport - The previous FileSysTask value

   SEE ALSO
	
                <link linkend="n96">GetFileSysTask()</link>
                , 
                <link linkend="n126">Open()</link>
                
            </literallayout>
        </section>
        <section id="n160">
            <title>dos.library/SetIoErr</title>
            <literallayout class="monospaced">
                   NAME
	SetIoErr -- Sets the value returned by 
                <link linkend="n106">IoErr()</link>
                 (V36)

   SYNOPSIS
	oldcode = SetIoErr(code)
	D0		    D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SetIoErr(LONG);

   FUNCTION
	This routine sets up the secondary result (pr_Result2) return code
	(returned by the 
                <link linkend="n106">IoErr()</link>
                 function).

   INPUTS
	code - Code to be returned by a call to 
                <link linkend="n106">IoErr</link>
                .

   RESULT
	oldcode - The previous error code.

   SEE ALSO
	
                <link linkend="n106">IoErr()</link>
                , 
                <link linkend="n73">Fault()</link>
                , 
                <link linkend="n134">PrintFault()</link>
                
            </literallayout>
        </section>
        <section id="n161">
            <title>dos.library/SetMode</title>
            <literallayout class="monospaced">
                   NAME
	SetMode - Set the current behavior of a handler (V36)

   SYNOPSIS
	success = SetMode(fh, mode)
	D0                D1  D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetMode(BPTR, LONG)

   FUNCTION
	SetMode() sends an ACTION_SCREEN_MODE packet to the handler in
	question, normally for changing a CON: handler to raw mode or
	vice-versa.  For CON:, use 1 to go to RAW: mode, 0 for CON: mode.

   INPUTS
	fh   - filehandle
	mode - The new mode you want

   RESULT
	success - Boolean

   SEE ALSO

            </literallayout>
        </section>
        <section id="n162">
            <title>dos.library/SetOwner</title>
            <literallayout class="monospaced">
                    NAME
	SetOwner -- Set owner information for a file or directory (V39)

    SYNOPSIS
	success = SetOwner( name, owner_info )
	D0		     D1       D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetOwner (STRPTR, LONG)

    FUNCTION
	SetOwner() sets the owner information for the file or directory.
	This value is a 32-bit value that is normally split into 16 bits
	of owner user id (bits 31-16), and 16 bits of owner group id (bits
	15-0).  However, other than returning them as shown by Examine()/
	
                <link linkend="n66">ExNext()/ExAll()</link>
                , the filesystem take no interest in the values.
	These are primarily for use by networking software (clients and
	hosts), in conjunction with the FIBF_OTR_xxx and FIBF_GRP_xxx
	protection bits.

	This entrypoint did not exist in V36, so you must open at least V37
	dos.library to use it.  V37 dos.library will return FALSE to this
	call.

    INPUTS
	name	   - pointer to a null-terminated string
	owner_info - owner uid (31:16) and group id (15:0)

    RESULTS
	success - boolean

    SEE ALSO
	SetProtect(), 
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <link linkend="n66">ExAll()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n163">
            <title>dos.library/SetProgramDir</title>
            <literallayout class="monospaced">
                   NAME
	SetProgramDir -- Sets the directory returned by 
                <link linkend="n97">GetProgramDir</link>
                 (V36)

   SYNOPSIS
	oldlock = SetProgramDir(lock)
	D0		         D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 SetProgramDir(BPTR)

   FUNCTION
	Sets a shared lock on the directory the program was loaded from.
	This can be used for a program to find data files, etc, that are
	stored with the program, or to find the program file itself.  NULL
	is a valid input.  This can be accessed via 
                <link linkend="n97">GetProgramDir()</link>
                 or
	by using paths relative to PROGDIR:.

   INPUTS
	lock - A lock on the directory the current program was loaded from

   RESULT
	oldlock - The previous ProgramDir.

   SEE ALSO
	
                <link linkend="n97">GetProgramDir()</link>
                , 
                <link linkend="n126">Open()</link>
                
            </literallayout>
        </section>
        <section id="n164">
            <title>dos.library/SetProgramName</title>
            <literallayout class="monospaced">
                   NAME
	SetProgramName -- Sets the name of the program being run (V36)

   SYNOPSIS
	success = SetProgramName(name)
	D0                        D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetProgramName(STRPTR)

   FUNCTION
	Sets the name for the program in the cli structure.  If the name is
	too long to fit, a failure is returned, and the old value is left
	intact.  It is advised that you inform the user if possible of this
	condition, and/or set the program name to an empty string.
	This routine is safe to call even if there is no CLI structure.

   INPUTS
	name    - Name of program to use.

   RESULT
	success - Success/failure indicator.

   BUGS
	This clips to a fixed (1.3 compatible) size.

   SEE ALSO
	
                <link linkend="n98">GetProgramName()</link>
                
            </literallayout>
        </section>
        <section id="n165">
            <title>dos.library/SetPrompt</title>
            <literallayout class="monospaced">
                   NAME
	SetPrompt -- Sets the CLI/shell prompt for the current process (V36)

   SYNOPSIS
	success = SetPrompt(name)
	D0                D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetPrompt(STRPTR)

   FUNCTION
	Sets the text for the prompt in the cli structure.  If the prompt is
	too long to fit, a failure is returned, and the old value is left
	intact.  It is advised that you inform the user of this condition.
	This routine is safe to call even if there is no CLI structure.

   INPUTS
	name    - Name of prompt to be set.

   RESULT
	success - Success/failure indicator.

   BUGS
	This clips to a fixed (1.3 compatible) size.

   SEE ALSO
	
                <link linkend="n99">GetPrompt()</link>
                
            </literallayout>
        </section>
        <section id="n166">
            <title>dos.library/SetProtection</title>
            <literallayout class="monospaced">
                    NAME
	SetProtection -- Set protection for a file or directory

    SYNOPSIS
	success = SetProtection( name, mask )
	D0			 D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetProtection (STRPTR, LONG)

    FUNCTION
	SetProtection() sets the protection attributes on a file or
	directory.  See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                 for a listing of protection bits.

	Before V36, the ROM filesystem didn't respect the 
                <link linkend="n136">Read</link>
                 and 
                <link linkend="n185">Write</link>
                	bits.  In V36 or later and in the FFS, the 
                <link linkend="n136">Read</link>
                 and 
                <link linkend="n185">Write</link>
                	bits are respected.

	The archive bit should be cleared by the filesystem whenever the file
	is changed.  Backup utilities will generally set the bit after
	backing up each file.

	The V36 Shell looks at the execute bit, and will refuse to execute
	a file if it is set.

	Other bits will be defined in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                 include files.  Rather
	than referring to bits by number you should use the definitions in
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                .

    INPUTS
	name - pointer to a null-terminated string
	mask - the protection mask required

    RESULTS
	success - boolean

    SEE ALSO
	
                <link linkend="n154">SetComment()</link>
                , 
                <link linkend="n68">Examine()</link>
                , 
                <link linkend="n72">ExNext()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n167">
            <title>dos.library/SetVar</title>
            <literallayout class="monospaced">
                   NAME
	SetVar -- Sets a local or environment variable (V36)

   SYNOPSIS
	success = SetVar( name, buffer, size, flags )
	D0	           D1     D2     D3    D4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetVar(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , ULONG )

   FUNCTION
	Sets a local or environment variable.  It is advised to only use
	ASCII strings inside variables, but not required.

   INPUTS
	name   - pointer to an variable name.  Note variable names follow
		 filesystem syntax and semantics.
	buffer - a user allocated area which contains a string that is the
		 value to be associated with this variable.
	size   - length of the buffer region in bytes.  -1 means buffer
		 contains a null-terminated string.
	flags  - combination of type of var to set (low 8 bits), and
		 flags to control the behavior of this routine.  Currently
		 defined flags include:

		GVF_LOCAL_ONLY - set a local (to your process) variable.
		GVF_GLOBAL_ONLY - set a global environment variable.

		The default is to set a local environment variable.

   RESULT
	success - If non-zero, the variable was sucessfully set, FALSE
	 	  indicates failure.

   BUGS
	LV_VAR is the only type that can be global

   SEE ALSO
	
                <link linkend="n100">GetVar()</link>
                , 
                <link linkend="n59">DeleteVar()</link>
                , 
                <link linkend="n81">FindVar()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/var.h">&lt;dos/var.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n168">
            <title>dos.library/SetVBuf</title>
            <literallayout class="monospaced">
                   NAME
	SetVBuf -- set buffering modes and size (V39)

   SYNOPSIS
	error = SetVBuf(fh, buff, type, size)
	D0		D1   D2    D3    D4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SetVBuf(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , LONG)

   FUNCTION
	Changes the buffering modes and buffer size for a filehandle.
	With buff == NULL, the current buffer will be deallocated and a
	new one of (approximately) size will be allocated.  If buffer is
	non-NULL, it will be used for buffering and must be at least
	max(size,208) bytes long, and MUST be longword aligned.  If size
	is -1, then only the buffering mode will be changed.

	Note that a user-supplied buffer will not be freed if it is later
	replaced by another SetVBuf() call, nor will it be freed if the
	filehandle is closed.

	Has no effect on the buffersize of filehandles that were not created
	by 
                <link linkend="n38">AllocDosObject()</link>
                .

   INPUTS
	fh   - Filehandle
	buff - buffer pointer for buffered I/O or NULL.  MUST be LONG-aligned!
	type - buffering mode (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/stdio.h">&lt;dos/stdio.h&gt;</ulink>
                )
	size - size of buffer for buffered I/O (sizes less than 208 bytes
	       will be rounded up to 208), or -1.

   RESULT
	error - 0 if successful.  NOTE: opposite of most dos functions!
		NOTE: fails if someone has replaced the buffer without
		using SetVBuf() - 
                <link linkend="n146">RunCommand()</link>
                 does this.  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 to
		check error before freeing user-supplied buffers!

   BUGS
	Not implemented until after V39.  From V36 up to V39, always
	returned 0.

   SEE ALSO
	FputC(), 
                <link linkend="n74">FGetC()</link>
                , 
                <link linkend="n174">UnGetC()</link>
                , 
                <link linkend="n82">Flush()</link>
                , 
                <link linkend="n86">FRead()</link>
                , 
                <link linkend="n91">FWrite()</link>
                , 
                <link linkend="n75">FGets()</link>
                ,
	
                <link linkend="n85">FPuts()</link>
                , 
                <link linkend="n38">AllocDosObject()</link>
                
            </literallayout>
        </section>
        <section id="n169">
            <title>dos.library/SplitName</title>
            <literallayout class="monospaced">
                   NAME
	SplitName -- splits out a component of a pathname into a buffer (V36)

   SYNOPSIS
	newpos = SplitName(name, separator, buf, oldpos, size)
	D0                  D1      D2      D3     D4     D5

	WORD SplitName(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , WORD, LONG)

   FUNCTION
	This routine splits out the next piece of a name from a given file
	name.  Each piece is copied into the buffer, truncating at size-1
	characters.  The new position is then returned so that it may be
	passed in to the next call to splitname.  If the separator is not
	found within 'size' characters, then size-1 characters plus a null will
	be put into the buffer, and the position of the next separator will
	be returned.

	If a a separator cannot be found, -1 is returned (but the characters
	from the old position to the end of the string are copied into the
	buffer, up to a maximum of size-1 characters).  Both strings are
	null-terminated.

	This function is mainly intended to support handlers.

   INPUTS
	name      - Filename being parsed.
	separator - Separator charactor to split by.
	buf       - Buffer to hold separated name.
	oldpos    - Current position in the file.
	size 	  - Size of buf in bytes (including null termination).

   RESULT
	newpos    - New position for next call to splitname.  -1 for last one.

   BUGS
	In V36 and V37, path portions greater than or equal to 'size' caused
	the last character of the portion to be lost when followed by a
	separator.  Fixed for V39 dos.  For V36 and V37, the suggested work-
	around is to call SplitName() with a buffer one larger than normal
	(for example, 32 bytes), and then set buf[size-2] to '0' (for example,
	buf[30] = '\0';).

   SEE ALSO
	
                <link linkend="n76">FilePart()</link>
                , 
                <link linkend="n133">PathPart()</link>
                , 
                <link linkend="n36">AddPart()</link>
                
            </literallayout>
        </section>
        <section id="n170">
            <title>dos.library/StartNotify</title>
            <literallayout class="monospaced">
                   NAME
	StartNotify -- Starts notification on a file or directory (V36)

   SYNOPSIS
	success = StartNotify(notifystructure)
	D0                          D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 StartNotify(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/notify.h">NotifyRequest</ulink>
                 *)

   FUNCTION
	Posts a notification request.  Do not modify the notify structure while
	it is active.  You will be notified when the file or directory changes.
	For files, you will be notified after the file is closed.  Not all
	filesystems will support this: applications should NOT require it.  In
	particular, most network filesystems won't support it.

   INPUTS
	notifystructure - A filled-in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/notify.h">NotifyRequest</ulink>
                 structure

   RESULT
	success - Success/failure of request

   BUGS
	The V36 floppy/HD filesystem doesn't actually send notifications.  The
	V36 ram handler (ram:) does.  This has been fixed for V37.

   SEE ALSO
	
                <link linkend="n64">EndNotify()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/notify.h">&lt;dos/notify.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n171">
            <title>dos.library/StrToDate</title>
            <literallayout class="monospaced">
                   NAME
	StrToDate -- Converts a string to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 (V36)

   SYNOPSIS
	success = StrToDate( datetime )
	D0                      D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 StrToDate( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 * )

   FUNCTION
	Converts a human readable ASCII string into an AmigaDOS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                .

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 - a pointer to an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 structure.

	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">DateTime</ulink>
                 structure should	be initialized as follows:

	dat_Stamp  - ignored on input.

	dat_Format - a format	byte which specifies the format	of the
		dat_StrDat.  This can	be any of the following	(note:
		If value used	is something other than	those below,
		the default of FORMAT_DOS is used):

		FORMAT_DOS:	  AmigaDOS format (dd-mmm-yy).

		FORMAT_INT:	  International	format (yy-mmm-dd).

		FORMAT_USA:	  American format (mm-dd-yy).

		FORMAT_CDN:	  Canadian format (dd-mm-yy).

		FORMAT_DEF:	  default format for locale.

	dat_Flags - a flags byte.  The only flag which affects this
		  function is:

		DTF_SUBST:	ignored by this function
		DTF_FUTURE:	  If set, indicates that strings such
				  as (stored in	dat_StrDate) "Monday"
				  refer	to "next" monday. Otherwise,
				  if clear, strings like "Monday"
				  refer	to "last" monday.

	dat_StrDay - ignored bythis function.

	dat_StrDate -	pointer	to valid string	representing the date.
		  This can be a	"DTF_SUBST" style string such as
		  "Today" "Tomorrow" "Monday", or it may be a string
		  as specified by the dat_Format byte.	This will be
		  converted to the ds_Days portion of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                .
		  If this pointer is NULL, DateStamp-&gt;ds_Days will not
		  be affected.

	dat_StrTime -	Pointer	to a buffer which contains the time in
		  the ASCII format hh:mm:ss.  This will	be converted
		  to the ds_Minutes and	ds_Ticks portions of the
		  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                .  If this pointer is NULL, ds_Minutes and
		  ds_Ticks will	be unchanged.

   RESULT
	success	- a zero return indicates that a conversion could
		not be performed. A non-zero return indicates that the
		DateTime.dat_Stamp variable contains the converted
		values.

   SEE ALSO
	
                <link linkend="n55">DateStamp()</link>
                , 
                <link linkend="n56">DateToStr()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/datetime.h">&lt;dos/datetime.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n172">
            <title>dos.library/StrToLong</title>
            <literallayout class="monospaced">
                   NAME
	StrToLong -- string to long value (decimal) (V36)

   SYNOPSIS
	characters = StrToLong(string,value)
	D0                       D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 StrToLong(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *)

   FUNCTION
	Converts decimal string into 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 value.  Returns number of characters
	converted.  Skips over leading spaces &amp; tabs (included in count).  If
	no decimal digits are found (after skipping leading spaces &amp; tabs),
	StrToLong returns -1 for characters converted, and puts 0 into value.

   INPUTS
	string - 
                <link linkend="n103">Input</link>
                 string.
	value  - Pointer to long value.  Set to 0 if no digits are converted.

   RESULT
	result - Number of characters converted or -1.

   BUGS
	Before V39, if there were no convertible characters it returned the
	number of leading white-space characters (space and tab in this case).

            </literallayout>
        </section>
        <section id="n173">
            <title>dos.library/SystemTagList</title>
            <literallayout class="monospaced">
                   NAME
	SystemTagList -- Have a shell execute a command line (V36)

   SYNOPSIS
	error = SystemTagList(command, tags)
	D0		        D1      D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SystemTagList(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *)

	error = System(command, tags)
	D0		 D1      D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 System(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *)

	error = SystemTags(command, Tag1, ...)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SystemTags(STRPTR, ULONG, ...)

   FUNCTION
	Similar to 
                <link linkend="n70">Execute()</link>
                , but does not read commands from the input
	filehandle.  Spawns a Shell process to execute the command, and
	returns the returncode the command produced, or -1 if the command
	could not be run for any reason.  The input and output filehandles
	will not be closed by System, you must close them (if needed) after
	System returns, if you specified them via SYS_Input or SYS_Output.

	By default the new process will use your current 
                <link linkend="n103">Input()</link>
                 and 
                <link linkend="n128">Output()</link>
                	filehandles.  Normal Shell command-line parsing will be done
	including redirection on 'command'.  The current directory and path
	will be inherited from your process.  Your path will be used to find
	the command (if no path is specified).

	Note that you may NOT pass the same filehandle for both SYS_Input
	and SYS_Output.  If you want input and output to both be to the same
	CON: window, pass a SYS_Input of a filehandle on the CON: window,
	and pass a SYS_Output of NULL.  The shell will automatically set
	the default 
                <link linkend="n128">Output()</link>
                 stream to the window you passed via SYS_Input,
	by opening "*" on that handler.

	If used with the SYS_Asynch flag, it WILL close both it's input and
	output filehandles after running the command (even if these were
	your 
                <link linkend="n103">Input()</link>
                 and Output()!)

	Normally uses the boot (ROM) shell, but other shells can be specified
	via SYS_UserShell and SYS_CustomShell.  Normally, you should send
	things written by the user to the UserShell.  The UserShell defaults
	to the same shell as the boot shell.

	The tags are passed through to 
                <link linkend="n52">CreateNewProc()</link>
                 (tags that conflict
	with SystemTagList() will be filtered out).  This allows setting
	things like priority, etc for the new process.  The tags that are
	currently filtered out are:

		NP_Seglist
		NP_FreeSeglist
		NP_Entry
		NP_Input
		NP_Output
		NP_CloseInput
		NP_CloseOutput
		NP_HomeDir
		NP_Cli

   INPUTS
	command - Program and arguments
	tags    - see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dostags.h">&lt;dos/dostags.h&gt;</ulink>
                .  Note that both SystemTagList()-
		  specific tags and tags from 
                <link linkend="n52">CreateNewProc()</link>
                 may be passed.

   RESULT
	error	- 0 for success, result from command, or -1.  Note that on
		  error, the caller is responsible for any filehandles or other
		  things passed in via tags.  -1 will only be returned if
		  dos could not create the new shell.  If the command is not
		  found the shell will return an error value, normally
		  RETURN_ERROR.

   SEE ALSO
	
                <link linkend="n70">Execute()</link>
                , 
                <link linkend="n52">CreateNewProc()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dostags.h">&lt;dos/dostags.h&gt;</ulink>
                , 
                <link linkend="n103">Input()</link>
                , 
                <link linkend="n128">Output()</link>
                
            </literallayout>
        </section>
        <section id="n174">
            <title>dos.library/UnGetC</title>
            <literallayout class="monospaced">
                   NAME
	UnGetC -- Makes a char available for reading again. (buffered) (V36)

   SYNOPSIS
	value = UnGetC(fh, character)
	D0	       D1      D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 UnGetC(BPTR, LONG)

   FUNCTION
	Pushes the character specified back into the input buffer.  Every
	time you use a buffered read routine, you can always push back 1
	character.  You may be able to push back more, though it is not
	recommended, since there is no guarantee on how many can be
	pushed back at a given moment.

	Passing -1 for the character will cause the last character read to
	be pushed back.  If the last character read was an EOF, the next
	character read will be an EOF.

	Note: UnGetC can be used to make sure that a filehandle is set up
	as a read filehandle.  This is only of importance if you are writing
	a shell, and must manipulate the filehandle's buffer.

   INPUTS
	fh	  - filehandle to use for buffered I/O
	character - character to push back or -1

   RESULT
	value     - character pushed back, or FALSE if the character cannot
		    be pushed back.

   BUGS
	In V36, UnGetC(fh,-1) after an EOF would not cause the next character
	read to be an EOF.  This was fixed for V37.

   SEE ALSO
	
                <link linkend="n74">FGetC()</link>
                , 
                <link linkend="n84">FPutC()</link>
                , 
                <link linkend="n82">Flush()</link>
                
            </literallayout>
        </section>
        <section id="n175">
            <title>dos.library/UnLoadSeg</title>
            <literallayout class="monospaced">
                    NAME
	UnLoadSeg -- Unload a seglist previously loaded by 
                <link linkend="n109">LoadSeg()</link>
                    SYNOPSIS
	success = UnLoadSeg( seglist )
	D0		       D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 UnLoadSeg(BPTR)

    FUNCTION
	Unload a seglist loaded by 
                <link linkend="n109">LoadSeg()</link>
                .  'seglist' may be zero.
	Overlaid segments will have all needed cleanup done, including
	closing files.

    INPUTS
	seglist - BCPL pointer to a segment identifier

    RESULTS
	success - returns 0 if a NULL seglist was passed or if it failed
		  to close an overlay file.  NOTE: this function returned
		  a random value before V36!

    SEE ALSO
	
                <link linkend="n109">LoadSeg()</link>
                , 
                <link linkend="n104">InternalLoadSeg()</link>
                , 
                <link linkend="n105">InternalUnLoadSeg()</link>
                
            </literallayout>
        </section>
        <section id="n176">
            <title>dos.library/UnLock</title>
            <literallayout class="monospaced">
                    NAME
	UnLock -- Unlock a directory or file

    SYNOPSIS
	UnLock( lock )
		D1

	void UnLock(BPTR)

    FUNCTION
	The filing system lock (obtained from 
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n62">DupLock()</link>
                , or
	
                <link linkend="n51">CreateDir()</link>
                ) is removed and deallocated.

    INPUTS
	lock - BCPL pointer to a lock

    NOTE
	passing zero to UnLock() is harmless

    SEE ALSO
	
                <link linkend="n110">Lock()</link>
                , 
                <link linkend="n62">DupLock()</link>
                , 
                <link linkend="n130">ParentOfFH()</link>
                , 
                <link linkend="n63">DupLockFromFH()</link>
                
            </literallayout>
        </section>
        <section id="n177">
            <title>dos.library/UnLockDosList</title>
            <literallayout class="monospaced">
                   NAME
	UnLockDosList -- Unlocks the Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 (V36)

   SYNOPSIS
	UnLockDosList(flags)
			D1

	void UnLockDosList(ULONG)

   FUNCTION
	Unlocks the access on the Dos 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                .  You MUST pass the same
	flags you used to lock the list.

   INPUTS
	flags - MUST be the same flags passed to (Attempt)LockDosList()

   SEE ALSO
	
                <link linkend="n43">AttemptLockDosList()</link>
                , 
                <link linkend="n111">LockDosList()</link>
                , 
                <link linkend="n265">Permit()</link>
                
            </literallayout>
        </section>
        <section id="n178">
            <title>dos.library/UnLockRecord</title>
            <literallayout class="monospaced">
                   NAME
	UnLockRecord -- Unlock a record (V36)

   SYNOPSIS
	success = UnLockRecord(fh,offset,length)
	D0		       D1   D2     D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 UnLockRecord(BPTR,ULONG,ULONG)

   FUNCTION
	This releases the specified lock on a file.  Note that you must use
	the same filehandle you used to lock the record, and offset and length
	must be the same values used to lock it.  Every 
                <link linkend="n112">LockRecord()</link>
                 call must
	be balanced with an UnLockRecord() call.

   INPUTS
	fh      - File handle of locked file
	offset  - Record start position
	length  - Length of record in bytes

   RESULT
	success - Success or failure.

   BUGS
	See 
                <link linkend="n112">LockRecord()</link>
                   SEE ALSO
	
                <link linkend="n113">LockRecords()</link>
                , 
                <link linkend="n112">LockRecord()</link>
                , 
                <link linkend="n179">UnLockRecords()</link>
                
            </literallayout>
        </section>
        <section id="n179">
            <title>dos.library/UnLockRecords</title>
            <literallayout class="monospaced">
                   NAME
	UnLockRecords -- Unlock a list of records (V36)

   SYNOPSIS
	success = UnLockRecords(record_array)
	D0		             D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 UnLockRecords(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/record.h">RecordLock</ulink>
                 *)

   FUNCTION
	This releases an array of record locks obtained using 
                <link linkend="n113">LockRecords</link>
                .
	You should NOT modify the record_array while you have the records
	locked.  Every 
                <link linkend="n113">LockRecords()</link>
                 call must be balanced with an
	UnLockRecords() call.

   INPUTS
	record_array - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 of records to be unlocked

   RESULT
	success      - Success or failure.

   BUGS
	See 
                <link linkend="n112">LockRecord()</link>
                   SEE ALSO
	
                <link linkend="n113">LockRecords()</link>
                , 
                <link linkend="n112">LockRecord()</link>
                , 
                <link linkend="n178">UnLockRecord()</link>
                
            </literallayout>
        </section>
        <section id="n180">
            <title>dos.library/VFPrintf</title>
            <literallayout class="monospaced">
                   NAME
	VFPrintf -- format and print a string to a file (buffered) (V36)

   SYNOPSIS
	count = VFPrintf(fh, fmt, argv)
	D0               D1  D2    D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 VFPrintf(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *)

	count = FPrintf(fh, fmt, ...)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FPrintf(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ...)

   FUNCTION
	Writes the formatted string and values to the given file.  This
	routine is assumed to handle all internal buffering so that the
	formatting string and resultant formatted values can be arbitrarily
	long.  Any secondary error code is returned in 
                <link linkend="n106">IoErr()</link>
                .  This routine
	is buffered.

   INPUTS
	fh    - Filehandle to write to
	fmt   - 
                <link linkend="n268">RawDoFmt()</link>
                 style formatting string
	argv  - Pointer to array of formatting values

   RESULT
	count - Number of bytes written or -1 (EOF) for an error

   BUGS
	The prototype for FPrintf() currently forces you to cast the first
	varargs parameter to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 due to a deficiency in the program
	that generates fds, prototypes, and amiga.lib stubs.

   SEE ALSO
	
                <link linkend="n182">VPrintf()</link>
                , 
                <link linkend="n181">VFWritef()</link>
                , 
                <link linkend="n268">RawDoFmt()</link>
                , 
                <link linkend="n84">FPutC()</link>
                
            </literallayout>
        </section>
        <section id="n181">
            <title>dos.library/VFWritef</title>
            <literallayout class="monospaced">
                   NAME
	VFWritef - write a BCPL formatted string to a file (buffered) (V36)

   SYNOPSIS
	count = VFWritef(fh, fmt, argv)
	D0               D1  D2    D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 VFWritef(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *)

	count = FWritef(fh, fmt, ...)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FWritef(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , ...)

   FUNCTION
	Writes the formatted string and values to the specified file.  This
	routine is assumed to handle all internal buffering so that the
	formatting string and resultant formatted values can be arbitrarily
	long.  The formats are in BCPL form.  This routine is buffered.

	Supported formats are:  (Note x is in base 36!)
		%S  - string (CSTR)
		%Tx - writes a left-justified string in a field at least
		      x bytes long.
		%C  - writes a single character
		%Ox - writes a number in octal, maximum x characters wide
		%Xx - writes a number in hex, maximum x characters wide
		%Ix - writes a number in decimal, maximum x characters wide
		%N  - writes a number in decimal, any length
		%Ux - writes an unsigned number, maximum x characters wide
		%$  - ignore parameter

	Note: 'x' above is actually the character value - '0'.

   INPUTS
	fh    - filehandle to write to
	fmt   - BCPL style formatting string
	argv  - Pointer to array of formatting values

   RESULT
	count - Number of bytes written or -1 for error

   BUGS
	As of V37, VFWritef() does NOT return a valid return value.  In
	order to reduce possible errors, the prototypes supplied for the
	system as of V37 have it typed as VOID.

   SEE ALSO
	
                <link linkend="n180">VFPrintf()</link>
                , 
                <link linkend="n180">VFPrintf()</link>
                , 
                <link linkend="n84">FPutC()</link>
                
            </literallayout>
        </section>
        <section id="n182">
            <title>dos.library/VPrintf</title>
            <literallayout class="monospaced">
                   NAME
	VPrintf -- format and print string (buffered) (V36)

   SYNOPSIS
	count = VPrintf(fmt, argv)
	  D0            D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 VPrintf(STRPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *)

	count = Printf(fmt, ...)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 Printf(STRPTR, ...)

   FUNCTION
	Writes the formatted string and values to 
                <link linkend="n128">Output()</link>
                .  This routine is
	assumed to handle all internal buffering so that the formatting string
	and resultant formatted values can be arbitrarily long.  Any secondary
	error code is returned in 
                <link linkend="n106">IoErr()</link>
                .  This routine is buffered.

	Note: 
                <link linkend="n268">RawDoFmt</link>
                 assumes 16 bit ints, so you will usually need 'l's in
	your formats (ex: %ld versus %d).

   INPUTS
	fmt   - exec.library 
                <link linkend="n268">RawDoFmt()</link>
                 style formatting string
	argv  - Pointer to array of formatting values

   RESULT
	count - Number of bytes written or -1 (EOF) for an error

   BUGS
	The prototype for Printf() currently forces you to cast the first
	varargs parameter to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 due to a deficiency in the program
	that generates fds, prototypes, and amiga.lib stubs.

   SEE ALSO
	
                <link linkend="n180">VFPrintf()</link>
                , 
                <link linkend="n181">VFWritef()</link>
                , 
                <link linkend="n268">RawDoFmt()</link>
                , 
                <link linkend="n84">FPutC()</link>
                
            </literallayout>
        </section>
        <section id="n183">
            <title>dos.library/WaitForChar</title>
            <literallayout class="monospaced">
                    NAME
	WaitForChar -- Determine if chars arrive within a time limit

    SYNOPSIS
	status = WaitForChar( file, timeout )
	D0		      D1    D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 WaitForChar(BPTR, LONG)

    FUNCTION
	If a character is available to be read from 'file' within the
	time (in microseconds) indicated by 'timeout', WaitForChar()
	returns -1 (TRUE). If a character is available, you can use 
                <link linkend="n136">Read()</link>
                	to read it.  Note that WaitForChar() is only valid when the I/O
	stream is connected to a virtual terminal device. If a character is
	not available within 'timeout', a 0 (FALSE) is returned.

    BUGS
	Due to a bug in the timer.device in V1.2/V1.3, specifying a timeout
	of zero for WaitForChar() can cause the unreliable timer &amp; floppy
	disk operation.

    INPUTS
	file - BCPL pointer to a file handle
	timeout - integer

    RESULTS
	status - boolean

    SEE ALSO
	
                <link linkend="n136">Read()</link>
                , 
                <link linkend="n74">FGetC()</link>
                
            </literallayout>
        </section>
        <section id="n184">
            <title>dos.library/WaitPkt</title>
            <literallayout class="monospaced">
                   NAME
	WaitPkt -- Waits for a packet to arrive at your pr_MsgPort (V36)

   SYNOPSIS
	packet = WaitPkt()
	D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">DosPacket</ulink>
                 *WaitPkt(void);

   FUNCTION
	Waits for a packet to arrive at your pr_MsgPort.  If anyone has
	installed a packet wait function in pr_PktWait, it will be called.
	The message will be automatically GetMsg()ed so that it is no longer
	on the port.  It assumes the message is a dos packet.  It is NOT
	guaranteed to clear the signal for the port.

   RESULT
	packet - the packet that arrived at the port (from ln_Name of message).

   SEE ALSO
	
                <link linkend="n152">SendPkt()</link>
                , 
                <link linkend="n61">DoPkt()</link>
                , 
                <link linkend="n33">AbortPkt()</link>
                
            </literallayout>
        </section>
        <section id="n185">
            <title>dos.library/Write</title>
            <literallayout class="monospaced">
                    NAME
	Write -- Write bytes of data to a file

    SYNOPSIS
	returnedLength =  Write( file, buffer, length )
	D0			 D1    D2      D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 Write (BPTR, void *, LONG)

    FUNCTION
	Write() writes bytes of data to the opened file 'file'. 'length'
	indicates the length of data to be transferred; 'buffer' is a
	pointer to the buffer. The value returned is the length of
	information actually written. So, when 'length' is greater than
	zero, the value of 'length' is the number of characters written.
	Errors are indicated by a value of -1.

	Note: this is an unbuffered routine (the request is passed directly
	to the filesystem.)  Buffered I/O is more efficient for small
	reads and writes; see 
                <link linkend="n84">FPutC()</link>
                .

    INPUTS
	file - BCPL pointer to a file handle
	buffer - pointer to the buffer
	length - integer

    RESULTS
	returnedLength - integer

    SEE ALSO
	
                <link linkend="n136">Read()</link>
                , 
                <link linkend="n149">Seek()</link>
                , 
                <link linkend="n126">Open()</link>
                , 
                <link linkend="n49">Close()</link>
                , 
                <link linkend="n84">FPutC</link>
                
            </literallayout>
        </section>
        <section id="n186">
            <title>dos.library/WriteChars</title>
            <literallayout class="monospaced">
                   NAME
	WriteChars -- Writes bytes to the the default output (buffered) (V36)

   SYNOPSIS
	count = WriteChars(buf, buflen)
	D0                 D1   D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 WriteChars(STRPTR, LONG)

   FUNCTION
	This routine writes a number of bytes to the default output.  The
	length is returned.  This routine is buffered.

   INPUTS
	buf    - buffer of characters to write
	buflen - number of characters to write

   RESULT
	count - Number of bytes written.  -1 (EOF) indicates an error

   SEE ALSO
	
                <link linkend="n85">FPuts()</link>
                , 
                <link linkend="n84">FPutC()</link>
                , 
                <link linkend="n91">FWrite()</link>
                , 
                <link linkend="n135">PutStr()</link>
                
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>exec</title>
        <section id="n187">
            <title>exec.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n188"> AbortIO() </link>
                    
                <link linkend="n189"> AddDevice() </link>
                    
                <link linkend="n190"> AddHead() </link>
                    
                <link linkend="n191"> AddIntServer() </link>
                    
                <link linkend="n192"> AddLibrary() </link>
                    
                <link linkend="n193"> AddMemHandler() </link>
                    
                <link linkend="n194"> AddMemList() </link>
                    
                <link linkend="n195"> AddPort() </link>
                    
                <link linkend="n196"> AddResource() </link>
                    
                <link linkend="n197"> AddSemaphore() </link>
                    
                <link linkend="n198"> AddTail() </link>
                    
                <link linkend="n199"> AddTask() </link>
                    
                <link linkend="n200"> Alert() </link>
                    
                <link linkend="n201"> AllocAbs() </link>
                    
                <link linkend="n202"> Allocate() </link>
                    
                <link linkend="n203"> AllocEntry() </link>
                    
                <link linkend="n204"> AllocMem() </link>
                    
                <link linkend="n205"> AllocPooled() </link>
                    
                <link linkend="n206"> AllocSignal() </link>
                    
                <link linkend="n207"> AllocTrap() </link>
                    
                <link linkend="n208"> AllocVec() </link>
                    
                <link linkend="n209"> AttemptSemaphore() </link>
                    
                <link linkend="n210"> AttemptSemaphoreShared() </link>
                    
                <link linkend="n211"> AvailMem() </link>
                    
                <link linkend="n212"> CacheClearE() </link>
                    
                <link linkend="n213"> CacheClearU() </link>
                    
                <link linkend="n214"> CacheControl() </link>
                    
                <link linkend="n215"> CachePostDMA() </link>
                    
                <link linkend="n216"> CachePreDMA() </link>
                    
                <link linkend="n217"> Cause() </link>
                    
                <link linkend="n218"> CheckIO() </link>
                    
                <link linkend="n219"> CloseDevice() </link>
                    
                <link linkend="n220"> CloseLibrary() </link>
                    
                <link linkend="n221"> ColdReboot() </link>
                    
                <link linkend="n222"> CopyMem() </link>
                    
                <link linkend="n223"> CopyMemQuick() </link>
                    
                <link linkend="n224"> CreateIORequest() </link>
                    
                <link linkend="n225"> CreateMsgPort() </link>
                    
                <link linkend="n226"> CreatePool() </link>
                    
                <link linkend="n227"> Deallocate() </link>
                    
                <link linkend="n228"> Debug() </link>
                    
                <link linkend="n229"> DeleteIORequest() </link>
                    
                <link linkend="n230"> DeleteMsgPort() </link>
                    
                <link linkend="n231"> DeletePool() </link>
                    
                <link linkend="n232"> Disable() </link>
                    
                <link linkend="n233"> DoIO() </link>
                    
                <link linkend="n234"> Enable() </link>
                    
                <link linkend="n235"> Enqueue() </link>
                    
                <link linkend="n236"> FindName() </link>
                    
                <link linkend="n237"> FindPort() </link>
                    
                <link linkend="n238"> FindResident() </link>
                    
                <link linkend="n239"> FindSemaphore() </link>
                    
                <link linkend="n240"> FindTask() </link>
                    
                <link linkend="n241"> Forbid() </link>
                    
                <link linkend="n242"> FreeEntry() </link>
                    
                <link linkend="n243"> FreeMem() </link>
                    
                <link linkend="n244"> FreePooled() </link>
                    
                <link linkend="n245"> FreeSignal() </link>
                    
                <link linkend="n246"> FreeTrap() </link>
                    
                <link linkend="n247"> FreeVec() </link>
                    
                <link linkend="n248"> GetCC() </link>
                    
                <link linkend="n249"> GetMsg() </link>
                    
                <link linkend="n250"> InitCode() </link>
                    
                <link linkend="n251"> InitResident() </link>
                    
                <link linkend="n252"> InitSemaphore() </link>
                    
                <link linkend="n253"> InitStruct() </link>
                    
                <link linkend="n254"> Insert() </link>
                    
                <link linkend="n255"> MakeFunctions() </link>
                    
                <link linkend="n256"> MakeLibrary() </link>
                    
                <link linkend="n257"> ObtainQuickVector() </link>
                    
                <link linkend="n258"> ObtainSemaphore() </link>
                    
                <link linkend="n259"> ObtainSemaphoreList() </link>
                    
                <link linkend="n260"> ObtainSemaphoreShared() </link>
                    
                <link linkend="n261"> OldOpenLibrary() </link>
                    
                <link linkend="n262"> OpenDevice() </link>
                    
                <link linkend="n263"> OpenLibrary() </link>
                    
                <link linkend="n264"> OpenResource() </link>
                    
                <link linkend="n265"> Permit() </link>
                    
                <link linkend="n266"> Procure() </link>
                    
                <link linkend="n267"> PutMsg() </link>
                    
                <link linkend="n268"> RawDoFmt() </link>
                    
                <link linkend="n269"> ReleaseSemaphore() </link>
                    
                <link linkend="n270"> ReleaseSemaphoreList() </link>
                    
                <link linkend="n271"> RemDevice() </link>
                    
                <link linkend="n272"> RemHead() </link>
                    
                <link linkend="n273"> RemIntServer() </link>
                    
                <link linkend="n274"> RemLibrary() </link>
                    
                <link linkend="n275"> RemMemHandler() </link>
                    
                <link linkend="n276"> Remove() </link>
                    
                <link linkend="n277"> RemPort() </link>
                    
                <link linkend="n278"> RemResource() </link>
                    
                <link linkend="n279"> RemSemaphore() </link>
                    
                <link linkend="n280"> RemTail() </link>
                    
                <link linkend="n281"> RemTask() </link>
                    
                <link linkend="n282"> ReplyMsg() </link>
                    
                <link linkend="n283"> SendIO() </link>
                    
                <link linkend="n284"> SetExcept() </link>
                    
                <link linkend="n285"> SetFunction() </link>
                    
                <link linkend="n286"> SetIntVector() </link>
                    
                <link linkend="n287"> SetSignal() </link>
                    
                <link linkend="n288"> SetSR() </link>
                    
                <link linkend="n289"> SetTaskPri() </link>
                    
                <link linkend="n290"> Signal() </link>
                    
                <link linkend="n291"> StackSwap() </link>
                    
                <link linkend="n292"> SumKickData() </link>
                    
                <link linkend="n293"> SumLibrary() </link>
                    
                <link linkend="n294"> SuperState() </link>
                    
                <link linkend="n295"> Supervisor() </link>
                    
                <link linkend="n296"> TypeOfMem() </link>
                    
                <link linkend="n297"> UserState() </link>
                    
                <link linkend="n298"> Vacate() </link>
                    
                <link linkend="n299"> Wait() </link>
                    
                <link linkend="n300"> WaitIO() </link>
                    
                <link linkend="n301"> WaitPort() </link>
                    
                <link linkend="n302"> --Overview-- </link>
                    
                <link linkend="n303"> ALLOCATE_MEMORY </link>
                    
                <link linkend="n304"> CALL_ADDRESS </link>
                    
                <link linkend="n305"> FREE_MEMORY </link>
                    
                <link linkend="n306"> GET_CONTEXT_FRAME </link>
                    
                <link linkend="n307"> NOP </link>
                    
                <link linkend="n308"> READ_ARRAY </link>
                    
                <link linkend="n309"> READ_BYTE </link>
                    
                <link linkend="n310"> READ_LONG </link>
                    
                <link linkend="n311"> READ_WORD </link>
                    
                <link linkend="n312"> RESET </link>
                    
                <link linkend="n313"> RETURN_TO_SYSTEM </link>
                    
                <link linkend="n314"> TURN_OFF_SINGLE </link>
                    
                <link linkend="n315"> TURN_ON_SINGLE </link>
                    
                <link linkend="n316"> WRITE_ARRAY </link>
                    
                <link linkend="n317"> WRITE_BYTE </link>
                    
                <link linkend="n318"> WRITE_LONG </link>
                    
                <link linkend="n319"> WRITE_WORD </link>
            </literallayout>
        </section>
        <section id="n188">
            <title>exec.library/AbortIO</title>
            <literallayout class="monospaced">
                   NAME
	AbortIO - attempt to abort an in-progress I/O request

   SYNOPSIS
	AbortIO(iORequest)
	        A1

	VOID AbortIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	Ask a device to abort a previously started 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                .  This is done
	by calling the device's ABORTIO vector, with your given 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                .


	AbortIO is a command the device that may or may not grant.  If
	successful, the device will stop processing the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                , and
	reply to it earlier than it would otherwise have done.

   NOTE
	AbortIO() does NOT 
                <link linkend="n276">Remove()</link>
                 the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 from your ReplyPort, OR
	wait for it to complete.  After an AbortIO() you must wait normally
	for the reply message before actually reusing the request.

	If a request has already completed when AbortIO() is called, no
	action is taken.

   EXAMPLE
	    AbortIO(timer_request);
	    WaitIO(timer_request);
	    /* 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 is free to be reused */

   INPUTS
	iORequest - pointer to an I/O request block (must have been used
		at least once.  May be active or finished).

   SEE ALSO
	
                <link linkend="n300">WaitIO()</link>
                , 
                <link linkend="n233">DoIO()</link>
                , 
                <link linkend="n283">SendIO()</link>
                , 
                <link linkend="n218">CheckIO()</link>
                
            </literallayout>
        </section>
        <section id="n189">
            <title>exec.library/AddDevice</title>
            <literallayout class="monospaced">
                   NAME
	AddDevice -- add a device to the system

   SYNOPSIS
	AddDevice(device)
		  A1

	void AddDevice(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 *);

   FUNCTION
	This function adds a new device to the system device list, making
	it available to other programs.  The device must be ready to be
	opened at this time.

   INPUTS
	device - pointer to a properly initialized device node

   SEE ALSO
	
                <link linkend="n271">RemDevice()</link>
                , 
                <link linkend="n262">OpenDevice()</link>
                , 
                <link linkend="n219">CloseDevice()</link>
                , 
                <link linkend="n256">MakeLibrary()</link>
                
            </literallayout>
        </section>
        <section id="n190">
            <title>exec.library/AddHead</title>
            <literallayout class="monospaced">
                   NAME
	AddHead -- insert node at the head of a list

   SYNOPSIS
	AddHead(list, node)
		A0    A1

	void AddHead(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *)

   FUNCTION
	Add a node to the head of a doubly linked list. Assembly
	programmers may prefer to use the ADDHEAD macro from
	"exec/lists.i".

   WARNING
	This function does not arbitrate for access to the list.  The
	calling task must be the owner of the involved list.

   INPUTS
	list - a pointer to the target list header
	node - the node to insert at head

   SEE ALSO
	
                <link linkend="n198">AddTail()</link>
                , 
                <link linkend="n235">Enqueue()</link>
                , 
                <link linkend="n254">Insert()</link>
                , 
                <link linkend="n276">Remove()</link>
                , 
                <link linkend="n272">RemHead()</link>
                , 
                <link linkend="n280">RemTail()</link>
                
            </literallayout>
        </section>
        <section id="n191">
            <title>exec.library/AddIntServer</title>
            <literallayout class="monospaced">
                   NAME
	AddIntServer -- add an interrupt server to a system server chain

   SYNOPSIS
	AddIntServer(intNum, interrupt)
		     D0-0:4  A1

	void AddIntServer(ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 *);

   FUNCTION
	This function adds a new interrupt server to a given server chain.
	The node is located on the chain in a priority dependent position.
	If this is the first server on a particular chain, interrupts will
	be enabled for that chain.

	Each link in the chain will be called in priority order until the
	chain ends or one of the servers returns with the 68000's Z condition
	code clear (indicating non-zero).  Servers on the chain should return
	with the Z flag clear if the interrupt was specifically for that
	server, and no one else.  VERTB servers should always return Z set.
	(Take care with High Level Language servers, the language may not
	have a mechanism for reliably setting the Z flag on exit).

	Servers are called with the following register conventions:

	    D0 - scratch
	    D1 - scratch

	    A0 - scratch
	    A1 - server is_Data pointer (scratch)

	    A5 - jump vector register (scratch)
	    A6 - scratch

	    all other registers must be preserved

   INPUTS
	intNum - the Paula interrupt bit number (0 through 14). Processor
		 level seven interrupts (NMI) are encoded as intNum 15.
		 The PORTS, COPER, VERTB, EXTER and NMI interrupts are
		 set up as server chains.
	interrupt - pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 structure.
		 By convention, the LN_NAME of the interrupt structure must
		 point a descriptive string so that other users may
		 identify who currently has control of the interrupt.

   WARNING
	Some compilers or assemblers may optimize code in unexpected ways,
	affecting the conditions codes returned from the function.  Watch
	out for a "MOVEM" instruction (which does not affect the condition
	codes) turning into "MOVE" (which does).

   BUGS
	The graphics library's VBLANK server, and some user code, currently
	assume that address register A0 will contain a pointer to the custom
	chips. If you add a server at a priority of 10 or greater, you must
	compensate for this by providing the expected value ($DFF000).

   SEE ALSO
	
                <link linkend="n273">RemIntServer()</link>
                , 
                <link linkend="n286">SetIntVector()</link>
                , hardware/intbits.i,exec/interrupts.i

            </literallayout>
        </section>
        <section id="n192">
            <title>exec.library/AddLibrary</title>
            <literallayout class="monospaced">
                   NAME
	AddLibrary -- add a library to the system

   SYNOPSIS
	AddLibrary(library)
		   A1

	void AddLibrary(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *);

   FUNCTION
	This function adds a new library to the system, making it available
	to other programs.  The library should be ready to be opened at
	this time.  It will be added to the system library name list, and
	the checksum on the library entries will be calculated.

   INPUTS
	library - pointer to a properly initialized library structure

   SEE ALSO
	
                <link linkend="n274">RemLibrary()</link>
                , 
                <link linkend="n220">CloseLibrary()</link>
                , 
                <link linkend="n263">OpenLibrary()</link>
                , 
                <link linkend="n256">MakeLibrary()</link>
                
            </literallayout>
        </section>
        <section id="n193">
            <title>exec.library/AddMemHandler</title>
            <literallayout class="monospaced">
                   NAME
	AddMemHandler - Add a low memory handler to exec                 (V39)

   SYNOPSIS
	AddMemHandler(memHandler)
	              A1

	VOID AddMemHandler(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 *);

   FUNCTION
	This function adds a low memory handler to the system.  The handler
	is described in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 structure.  Due to multitasking
	issues, the handler must be ready to run the moment this function
	call is made.  (The handler may be called before the call returns)

   NOTE
	Adding a handler from within a handler will cause undefined
	actions.  It is safe to add a handler to the list while within
	a handler but the newly added handler may or may not be called
	for the specific failure currently running.

   EXAMPLE
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 *myInt;  /* Assume it is allocated */

	myInt-&gt;is_Node.ln_Pri=50;  /* Relatively early; before RAMLIB */

	/* Please fill in the name field! */
	myInt-&gt;is_Node.ln_Name="Example Handler";

	myInt-&gt;is_Data=(APTR)mydata_pointer;
	myInt-&gt;is_Code=myhandler_code;

	AddMemHandler(myInt);
	... /* and so on */

	_myhandler_code:
			; This is the handler code
			; We are passed a pointer to struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHandlerData</ulink>
                			; in a0, the value of is_Data in a1 and
			; 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 in a6.
			; We must not break forbid!!!
	;
	; Start off assuming we did nothing
	;
		moveq.l	#MEM_DID_NOTHING,d0
		move.l	memh_RequestFlags(a0),d1
		btst.l	#MEMB_CHIP,d1	; Did the failure happen in CHIP
		beq.s	handler_nop	; If not, we have nothing to do
		bsr	DoMyMagic	; Do the magic...
		; DoMyMagic frees whatever we can and returns d0 set...
	handler_nop:
		rts			; Return with d0 set...

   INPUTS
	memHandler - A pointer to a completely filled in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 structure
	             The priority field determine the position of the handler
	             with respect to other handlers in the system.  The higher
	             the priority, the earlier the handler is called.
	             Positive priorities will have the handler called before
	             any of the library expunge vectors are called.  Negative
	             priority handlers will be called after the library
	             expunge routines are called.
	             (Note:  RAMLIB is a handler at priority 0)

   SEE ALSO
	
                <link linkend="n275">RemMemHandler()</link>
                , exec/interrupts.i

            </literallayout>
        </section>
        <section id="n194">
            <title>exec.library/AddMemList</title>
            <literallayout class="monospaced">
                   NAME
	AddMemList - add memory to the system free pool

   SYNOPSIS
	AddMemList( size, attributes, pri, base, name )
                     D0      D1        D2   A0    A1

	void AddMemList(ULONG, ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , STRPTR);

   FUNCTION
	Add a new region of memory to the system free pool.  The first few
	bytes will be used to hold the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 structure.  The remainder
	will be made available to the rest of the world.

   INPUTS
	size - the size (in bytes) of the memory area
	attributes - the attributes word that the memory pool will have
	pri  - the priority for this memory.  CHIP memory has a pri of -10,
	       16 bit expansion memory has a priority of 0.  The higher the
	       priority, the closer to the head of the memory list it will
	       be placed.
	base - the base of the new memory area
	name - the name that will be used in the memory header, or NULL
	       if no name is to be provided.  This name is not copied, so it
	       must remain valid for as long as the memory header is in the
	       system.

   NOTES
	*DO NOT* add memory to the system with the attribute of MEMF_KICK.
	EXEC will mark your memory as such if it is of the right type.

   SEE ALSO
	
                <link linkend="n204">AllocMem()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">exec/memory.h</ulink>
                
            </literallayout>
        </section>
        <section id="n195">
            <title>exec.library/AddPort</title>
            <literallayout class="monospaced">
                   NAME
	AddPort -- add a public message port to the system

   SYNOPSIS
	AddPort(port)
		A1

	void AddPort(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *);

   FUNCTION
	This function attaches a message port structure to the system's
	public message port list, where it can be found by the 
                <link linkend="n237">FindPort()</link>
                	function.  The name and priority fields of the port structure must
	be initialized prior to calling this function.	If the user does
	not require the priority field, it should be initialized to zero.

	Only ports that will be searched for with 
                <link linkend="n237">FindPort()</link>
                 need to
	be added to the system list.  In addition, adding ports is often
	useful during debugging.  If the port will be searched for,
	the priority field should be at least 1 (to avoid the large number
	of inactive ports at priority zero).  If the port will be searched
	for often, set the priority in the 50-100 range (so it will be
	before other less used ports).

	Once a port has been added to the naming list, you must be careful
	to remove the port from the list (via RemPort) before deallocating
	its memory.

   NOTE
	A point of confusion is that clearing a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 structure to all
	zeros is not enough to prepare it for use.  As mentioned in the
	Exec chapter of the ROM Kernel Manual, the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 for the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                	must be initialized.  This is automatically handled by AddPort(),
	and 
                <link linkend="n497">amiga.lib/CreatePort</link>
                .  This initialization can be done manually
	with 
                <link linkend="n526">amiga.lib/NewList</link>
                 or the assembly NEWLIST macro.

	Do not AddPort an active port.

   INPUTS
	port - pointer to a message port

   SEE ALSO
	
                <link linkend="n277">RemPort()</link>
                , 
                <link linkend="n237">FindPort()</link>
                , 
                <link linkend="n497">amiga.lib/CreatePort()</link>
                , 
                <link linkend="n526">amiga.lib/NewList()</link>
                
            </literallayout>
        </section>
        <section id="n196">
            <title>exec.library/AddResource</title>
            <literallayout class="monospaced">
                   NAME
	AddResource -- add a resource to the system

   SYNOPSIS
	AddResource(resource)
		    A1

	void AddResource(APTR);

   FUNCTION
	This function adds a new resource to the system and makes it
	available to other users.  The resource must be ready to be called
	at this time.

	Resources currently have no system-imposed structure, however they
	must start with a standard named node (LN_SIZE), and should with
	a standard 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 node (LIB_SIZE).

   INPUTS
	resource - pointer an initialized resource node

   SEE ALSO
	
                <link linkend="n278">RemResource()</link>
                , 
                <link linkend="n264">OpenResource()</link>
                , 
                <link linkend="n256">MakeLibrary()</link>
                
            </literallayout>
        </section>
        <section id="n197">
            <title>exec.library/AddSemaphore</title>
            <literallayout class="monospaced">
                   NAME
	AddSemaphore -- initialize then add a signal semaphore to the system

   SYNOPSIS
	AddSemaphore(signalSemaphore)
		     A1

	void AddSemaphore(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *);

   FUNCTION
	This function attaches a signal semaphore structure to the system's
	public signal semaphore list.  The name and priority fields of the
	semaphore structure must be initialized prior to calling this
	function.  If you do not want to let others rendezvous with this
	semaphore, use 
                <link linkend="n252">InitSemaphore()</link>
                 instead.

	If a semaphore has been added to the naming list, you must be
	careful to remove the semaphore from the list (via RemSemaphore)
	before deallocating its memory.

	Semaphores that are linked together in an allocation list (which
	
                <link linkend="n259">ObtainSemaphoreList()</link>
                 would use) may not be added to the system
	naming list, because the facilities use the link field of the
	signal semaphore in incompatible ways

   INPUTS
       signalSemaphore -- an signal semaphore structure

   BUGS
	Does not work in Exec &lt;V36.  Instead use this code:

	    #include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">&lt;exec/execbase.h&gt;</ulink>
                	    #include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">&lt;exec/nodes.h&gt;</ulink>
                	    extern struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 *SysBase;
		...
	    void LocalAddSemaphore(s)
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *s;
	    {
		s-&gt;ss_Link.ln_Type=NT_SIGNALSEM;
		InitSemaphore(s);
		Forbid();
		Enqueue(&amp;SysBase-&gt;SemaphoreList,s);
		Permit();
	    }

   SEE ALSO
	
                <link linkend="n279">RemSemaphore()</link>
                , 
                <link linkend="n239">FindSemaphore()</link>
                , 
                <link linkend="n252">InitSemaphore()</link>
                
            </literallayout>
        </section>
        <section id="n198">
            <title>exec.library/AddTail</title>
            <literallayout class="monospaced">
                   NAME
	AddTail -- append node to tail of a list

   SYNOPSIS
	AddTail(list, node)
                A0    A1

	void AddTail(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *);

   FUNCTION
	Add a node to the tail of a doubly linked list.  Assembly
	programmers may prefer to use the ADDTAIL macro from
	"exec/lists.i".

   WARNING
	This function does not arbitrate for access to the list.  The
	calling task must be the owner of the involved list.

   INPUTS
	list - a pointer to the target list header
	node - a pointer to the node to insert at tail of the list

   SEE ALSO
	
                <link linkend="n190">AddHead()</link>
                , 
                <link linkend="n235">Enqueue()</link>
                , 
                <link linkend="n254">Insert()</link>
                , 
                <link linkend="n276">Remove()</link>
                , 
                <link linkend="n272">RemHead()</link>
                , 
                <link linkend="n280">RemTail()</link>
                
            </literallayout>
        </section>
        <section id="n199">
            <title>exec.library/AddTask</title>
            <literallayout class="monospaced">
                   NAME
	AddTask -- add a task to the system

   SYNOPSIS
	result = AddTask(task, initialPC, finalPC)
	 D0               A1    A2         A3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 AddTask(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , APTR);

   FUNCTION
	Add a task to the system.  A reschedule will be run; the task with
	the highest priority in the system will start to execute (this may
	or may not be the new task).

	Certain fields of the task control block must be initialized and a
	stack allocated prior to calling this function.  The absolute
	smallest stack that is allowable is something in the range of 100
	bytes, but in general the stack size is dependent on what
	subsystems are called. In general 256 bytes is sufficient if only
	Exec is called, and 4K will do if anything in the system is called.
	DO NOT UNDERESTIMATE.  If you use a stack sniffing utility,
	leave a healthy pad above the minimum value.  The system guarantees
	that its stack operations will leave the stack longword aligned.

	This function will temporarily use space from the new task's stack
	for the task's initial set of registers.  This space is allocated
	starting at the SPREG location specified in the task control block
	(not from SPUPPER).  This means that a task's stack may contain
	static data put there prior to its execution.  This is useful for
	providing initialized global variables or some tasks may want to
	use this space for passing the task its initial arguments.

	A task's initial registers are set to zero (except the PC).

	The TC_MEMENTRY field of the task structure may be extended by
	the user to hold additional MemLists (as returned by 
                <link linkend="n203">AllocEntry()</link>
                ).
	These will be automatically be deallocated at 
                <link linkend="n281">RemTask()</link>
                 time.
	If the code you have used to start the task has already added
	something to the MEMENTRY list, simply use 
                <link linkend="n190">AddHead</link>
                 to add your
	new MemLists in.  If no initialization has been done, a 
                <link linkend="n526">NewList</link>
                 will
	need to be performed.

   INPUTS
	task  - pointer to the task control block (TCB).  All unset fields
		must be zero.
	initialPC - the initial entry point's address
	finalPC - the finalization code entry point's address.  If zero,
		  the system will use a general finalizer. This pointer is
		  placed on the stack as if it were the outermost return
		  address.

   RESULTS
	For V36, AddTask returns either a NULL or the address of the new
	task.  Old code need not check this.

   WARNING
	Tasks are a low-level building block, and are unable to call
	dos.library, or any system function that might call dos.library.
	See the AmigaDOS 
                <link linkend="n53">CreateProc()</link>
                 for information on Processes.

   SEE ALSO
	
                <link linkend="n281">RemTask()</link>
                , 
                <link linkend="n240">FindTask()</link>
                , 
                <link linkend="n499">amiga.lib/CreateTask()</link>
                , 
                <link linkend="n53">dos/CreateProc()</link>
                ,
	
                <link linkend="n526">amiga.lib/NewList()</link>
                
            </literallayout>
        </section>
        <section id="n200">
            <title>exec.library/Alert</title>
            <literallayout class="monospaced">
                   NAME
	Alert -- alert the user of an error

   SYNOPSIS
	Alert(alertNum)
	      D7

	void Alert(ULONG);

   FUNCTION
	Alerts the user of a serious system problem.  This function will
	bring the system to a grinding halt, and do whatever is necessary
	to present the user with a message stating what happened.
	Interrupts are disabled, and an attempt to post the alert is made.
	If that fails, the system is reset.  When the system comes up
	again, Exec notices the cause of the failure and tries again to
	post the alert.

	If the Alert is a recoverable type, this call MAY return.

	This call may be made at any time, including interrupts.
	(Well, only in interrupts if it is non-recoverable)

	New, for V39:
	The alert now times out based on the value in LastAlert[3]
	This value is transfered accross warm-reboots and thus will let
	you set it once.  The value is the number of frames that need to
	be displayed before the alert is auto-answered.  A value of
	0 will thus make the alert never be displayed.  Note that
	it is recommended that applications *NOT* change the value in
	LastAlert[] since the main reason for this is to make
	unattended operation of the Amiga (in production enviroments)
	possible.

   POST-MORTEM DIAGNOSIS
	There are several options for determining the cause of a crash.
	Descriptions of each alert number can be found in the "alerts.h"
	include file.

	A remote terminal can be attached to the Amiga's first built-in
	serial port.  Set the communication parameters to 9600 baud, 8 bits,
	no parity.  Before resetting the machine, the Alert function will
	blink the power LED 10 times.  While the power indicator is flashing,
	pressing DELETE on the remote terminal will invoke the ROM debugger.

   INPUT
	alertNum   - a number indicating the particular alert.  -1 is
	             not a valid input.

   NOTE
	Much more needs to be said about this function and its implications.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/alerts.h">exec/alerts.h</ulink>
                
            </literallayout>
        </section>
        <section id="n201">
            <title>exec.library/AllocAbs</title>
            <literallayout class="monospaced">
                   NAME
	AllocAbs -- allocate at a given location

   SYNOPSIS
	memoryBlock = AllocAbs(byteSize, location)
	D0		       D0	 A1

	void *AllocAbs(ULONG, APTR);

   FUNCTION
	This function attempts to allocate memory at a given absolute
	memory location.  Often this is used by boot-surviving entities
	such as recoverable ram-disks.	If the memory is already being
	used, or if there is not enough memory to satisfy the request,
	AllocAbs will return NULL.

	This block may not be exactly the same as the requested block
	because of rounding, but if the return value is non-zero, the block
	is guaranteed to contain the requested range.

   INPUTS
	byteSize - the size of the desired block in bytes
		   This number is rounded up to the next larger
		   block size for the actual allocation.
	location - the address where the memory MUST be.


   RESULT
	memoryBlock - a pointer to the newly allocated memory block, or
		      NULL if failed.

   NOTE
	If the free list is corrupt, the system will panic with alert
	AN_MemCorrupt, $01000005.

	The 8 bytes past the end of an AllocAbs will be changed by Exec
	relinking the next block of memory.  Generally you can't trust
	the first 8 bytes of anything you AllocAbs.

   SEE ALSO
	
                <link linkend="n204">AllocMem()</link>
                , 
                <link linkend="n243">FreeMem()</link>
                
            </literallayout>
        </section>
        <section id="n202">
            <title>exec.library/Allocate</title>
            <literallayout class="monospaced">
                   NAME
	Allocate - allocate a block of memory

   SYNOPSIS
	memoryBlock=Allocate(memHeader, byteSize)
	D0		     A0 	D0

	void *Allocate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 *, ULONG);

   FUNCTION
	This function is used to allocate blocks of memory from a given
	private free memory pool (as specified by a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 and its
	memory chunk list).  Allocate will return the first free block that
	is greater than or equal to the requested size.

	All blocks, whether free or allocated, will be block aligned;
	hence, all allocation sizes are rounded up to the next block even
	value (e.g. the minimum allocation resolution is currently 8
	bytes.  A request for 8 bytes will use up exactly 8 bytes.  A
	request for 7 bytes will also use up exactly 8 bytes.).

	This function can be used to manage an application's internal data
	memory.  Note that no arbitration of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 and associated
	free chunk list is done.  You must be the owner before calling
	Allocate.

   INPUTS
	memHeader - points to the local memory list header.
	byteSize - the size of the desired block in bytes.

   RESULT
	memoryBlock - a pointer to the just allocated free block.
	       If there are no free regions large enough to satisfy the
	       request, return zero.

   EXAMPLE
	#include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">&lt;exec/types.h&gt;</ulink>
                	#include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">&lt;exec/memory.h&gt;</ulink>
                	void *AllocMem();
	#define BLOCKSIZE 4096L /* Or whatever you want */

	void main()
	{
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 *mh;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemChunk</ulink>
                  *mc;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                   block1;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                   block2;

	    /* Get the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 needed to keep track of our new block */
	    mh = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 *)
		 AllocMem((long)sizeof(struct MemHeader), MEMF_CLEAR );
	    if( !mh )
		exit(10);

	    /* Get the actual block the above 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 will manage */
	    mc = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemChunk</ulink>
                 *)AllocMem( BLOCKSIZE, 0L );
	    if( !mc )
		{
		FreeMem( mh, (long)sizeof(struct MemHeader) ); exit(10);
		}

	    mh-&gt;mh_Node.ln_Type = NT_MEMORY;
	    mh-&gt;mh_Node.ln_Name = "myname";
	    mh-&gt;mh_First = mc;
	    mh-&gt;mh_Lower = (APTR) mc;
	    mh-&gt;mh_Upper = (APTR) ( BLOCKSIZE + (ULONG) mc );
	    mh-&gt;mh_Free  = BLOCKSIZE;

	    /* Set up first chunk in the freelist */
	    mc-&gt;mc_Next  = NULL;
	    mc-&gt;mc_Bytes = BLOCKSIZE;

	    block1 = (APTR) Allocate( mh, 20L );
	    block2 = (APTR) Allocate( mh, 314L );
	    printf("mh=$%lx mc=$%lx\n",mh,mc);
	    printf("Block1=$%lx, Block2=$%lx\n",block1,block2);

	    FreeMem( mh, (long)sizeof(struct MemHeader) );
	    FreeMem( mc, BLOCKSIZE );
	}

   NOTE
	If the free list is corrupt, the system will panic with alert
	AN_MemCorrupt, $01000005.

   SEE ALSO
	
                <link linkend="n227">Deallocate()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">exec/memory.h</ulink>
                
            </literallayout>
        </section>
        <section id="n203">
            <title>exec.library/AllocEntry</title>
            <literallayout class="monospaced">
                   NAME
	AllocEntry -- allocate many regions of memory

   SYNOPSIS
	memList = AllocEntry(memList)
	D0		     A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 *AllocEntry(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 *);

   FUNCTION
	This function takes a memList structure and allocates enough memory
	to hold the required memory as well as a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 structure to keep
	track of it.

	These 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 structures may be linked together in a task control
	block to keep track of the total memory usage of this task. (See
	the description of TC_MEMENTRY under RemTask).

   INPUTS
	memList -- A 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 structure filled in with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemEntry</ulink>
                 structures.

   RESULTS
	memList -- A different 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 filled in with the actual memory
	    allocated in the me_Addr field, and their sizes in me_Length.
	    If enough memory cannot be obtained, then the requirements of
	    the allocation that failed is returned and bit 31 is set.

	    WARNING: The result is unusual!  Bit 31 indicates failure.

   EXAMPLES
	The user wants five regions of 2, 4, 8, 16, and 32 bytes in size
	with requirements of MEMF_CLEAR, MEMF_PUBLIC, MEMF_CHIP!MEMF_CLEAR,
	MEMF_CLEAR, and MEMF_PUBLIC!MEMF_CLEAR respectively.  The
	following code fragment would do that:

	    MemListDecl:
		DS.B	LN_SIZE 	    * reserve space for list node
		DC.W	5		    * number of entries
		DC.L	MEMF_CLEAR		    * entry #0
		DC.L	2
		DC.L	MEMF_PUBLIC		    * entry #1
		DC.L	4
		DC.L	MEMF_CHIP!MEMF_CLEAR	    * entry #2
		DC.L	8
		DC.L	MEMF_CLEAR	   	    * entry #3
		DC.L	16
		DC.L	MEMF_PUBLIC!MEMF_CLEAR	    * entry #4
		DC.L	32

	    start:
		LEA.L	MemListDecl(PC),A0
		JSR	_LVOAllocEntry(a6)
		BCLR.L	#31,D0
		BEQ.S	success

		------- Type of memory that we failed on is in D0

   BUGS
	If any one of the allocations fails, this function fails to back
	out fully.  This is fixed by the "SetPatch" program on V1.3
	Workbench disks.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">exec/memory.h</ulink>
                
            </literallayout>
        </section>
        <section id="n204">
            <title>exec.library/AllocMem</title>
            <literallayout class="monospaced">
                   NAME
	AllocMem -- allocate memory given certain requirements

   SYNOPSIS
	memoryBlock = AllocMem(byteSize, attributes)
	D0		       D0	 D1

	void *AllocMem(ULONG, ULONG);

   FUNCTION
	This is the memory allocator to be used by system code and
	applications.  It provides a means of specifying that the allocation
	should be made in a memory area accessible to the chips, or
	accessible to shared system code.

	Memory is allocated based on requirements and options.	Any
	"requirement" must be met by a memory allocation, any "option" will
	be applied to the block regardless.  AllocMem will try all memory
	spaces until one is found with the proper requirements and room for
	the memory request.

   INPUTS
	byteSize - the size of the desired block in bytes.  (The operating
		system will automatically round this number to a multiple of
		the system memory chunk size)

	attributes -
	    requirements

		If no flags are set, the system will return the best
		available memory block.  For expanded systems, the fast
		memory pool is searched first.

		MEMF_CHIP:	If the requested memory will be used by
				the Amiga custom chips, this flag *must*
				be set.

				Only certain parts of memory are reachable
				by the special chip sets' DMA circuitry.
				Chip DMA includes screen memory, images that
				are blitted, audio data, copper lists, sprites
				and Pre-V36 trackdisk.device buffers.


		MEMF_FAST:	This is non-chip memory.  If no flag is set
				MEMF_FAST is taken as the default.

				DO NOT SPECIFY MEMF_FAST unless you know
				exactly what you are doing!  If MEMF_FAST is
				set, AllocMem() will fail on machines that
				only have chip memory!  This flag may not
				be set when MEMF_CHIP is set.


		MEMF_PUBLIC:	Memory that must not be mapped, swapped,
				or otherwise made non-addressable. ALL
				MEMORY THAT IS REFERENCED VIA INTERRUPTS
				AND/OR BY OTHER TASKS MUST BE EITHER PUBLIC
				OR LOCKED INTO MEMORY! This includes both
				code and data.


		MEMF_LOCAL:	This is memory that will not go away
				after the CPU 
                <link linkend="n312">RESET</link>
                 instruction.  Normally,
				autoconfig memory boards become unavailable
				after 
                <link linkend="n312">RESET</link>
                 while motherboard memory
				may still be available.  This memory type
				is now automatically set in V36.  Pre-V36
				systems may not have this memory type
				and AllocMem() will then fail.


		MEMF_24BITDMA:	This is memory that is within the address
				range of 24-bit DMA devices.  (Zorro-II)
				This is required if you run a Zorro-II
				DMA device on a machine that has memory
				beyond the 24-bit addressing limit of
				Zorro-II.  This memory type
				is now automatically set in V36.  Pre-V36
				systems may not have this memory type
				and AllocMem() will then fail.


		MEMF_KICK:	This memory is memory that EXEC was able
				to access during/before the KickMem and
				KickTags are processed.  This means that
				if you wish to use these, you should allocate
				memory with this flag.  This flag is
				automaticly set by EXEC in V39.  Pre-V39
				systems may not have this memory type and
				AllocMem() will then fail.  Also, *DO NOT*
				ever add memory the system with this flag
				set.  EXEC will set the flag as needed
				if the memory matches the needs of EXEC.


	    options

		MEMF_CLEAR:	The memory will be initialized to all
				zeros.


		MEMF_REVERSE:	This allocates memory from the top of
				the memory pool.  It searches the pools
				in the same order, such that FAST memory
				will be found first.  However, the
				memory will be allocated from the highest
				address available in the pool.  This
				option is new as of V36.  Note that this
				option has a bug in pre-V39 systems.


		MEMF_NO_EXPUNGE	This will prevent an expunge to happen on
				a failed memory allocation.  This option is
				new to V39 and will be ignored in V37.
				If a memory allocation with this flag
				set fails, the allocator will not cause
				any expunge operations.  (See 
                <link linkend="n193">AddMemHandler()</link>
                )


   RESULT
	memoryBlock - a pointer to the newly allocated memory block.
		If there are no free memory regions large enough to satisfy
		the request, zero will be returned.  The pointer must be
		checked for zero before the memory block may be used!
		The memory block returned is long word aligned.

   WARNING
	The result of any memory allocation MUST be checked, and a viable
	error handling path taken.  ANY allocation may fail if memory has
	been filled.

   EXAMPLES
	AllocMem(64,0L)		- 
                <link linkend="n202">Allocate</link>
                 the best available memory
	AllocMem(25,MEMF_CLEAR) - 
                <link linkend="n202">Allocate</link>
                 the best available memory, and
				  clear it before returning.
	AllocMem(128,MEMF_CHIP) - 
                <link linkend="n202">Allocate</link>
                 chip memory
	AllocMem(128,MEMF_CHIP|MEMF_CLEAR) - 
                <link linkend="n202">Allocate</link>
                 cleared chip memory
	AllocMem(821,MEMF_CHIP|MEMF_PUBLIC|MEMF_CLEAR) - 
                <link linkend="n202">Allocate</link>
                 cleared,
		public, chip memory.

   NOTE
	If the free list is corrupt, the system will panic with alert
	AN_MemCorrupt, $01000005.

	This function may not be called from interrupts.

	A DOS process will have its pr_Result2 field set to
	ERROR_NO_FREE_STORE if the memory allocation fails.

   SEE ALSO
	
                <link linkend="n243">FreeMem()</link>
                
            </literallayout>
        </section>
        <section id="n205">
            <title>exec.library/AllocPooled</title>
            <literallayout class="monospaced">
                    NAME
	AllocPooled -- 
                <link linkend="n202">Allocate</link>
                 memory with the pool manager (V39)

    SYNOPSIS
	memory=AllocPooled(poolHeader,memSize)
	d0                 a0         d0

	void *AllocPooled(void *,ULONG);

    FUNCTION
	
                <link linkend="n202">Allocate</link>
                 memSize bytes of memory, and return a pointer. NULL is
	returned if the allocation fails.

	Doing a 
                <link linkend="n231">DeletePool()</link>
                 on the pool will free all of the puddles
	and thus all of the allocations done with AllocPooled() in that
	pool.  (No need to 
                <link linkend="n244">FreePooled()</link>
                 each allocation)

    INPUTS
	memSize - the number of bytes to allocate
	poolHeader - a specific private pool header.

    RESULT
	A pointer to the memory, or NULL.
	The memory block returned is long word aligned.

    NOTES
	The pool function do not protect an individual pool from
	multiple accesses.  The reason is that in most cases the pools
	will be used by a single task.  If your pool is going to
	be used by more than one task you must Semaphore protect
	the pool from having more than one task trying to allocate
	within the same pool at the same time.  Warning:  
                <link linkend="n241">Forbid()</link>
                	protection *will not work* in the future.  *Do NOT* assume
	that we will be able to make it work in the future.  AllocPooled()
	may well break a 
                <link linkend="n241">Forbid()</link>
                 and as such can only be protected
	by a semaphore.

	To track sizes yourself, the following code can be used:
	Assumes a6=ExecBase

	;
	; Function to do AllocVecPooled(Pool,memSize)
	;
	AllocVecPooled:	addq.l	#4,d0		; Get space for tracking
			move.l	d0,-(sp)	; Save the size
			jsr	_LVOAllocPooled(a6)	; Call pool...
			move.l	(sp)+,d1	; Get size back...
			tst.l	d0		; Check for error
			beq.s	avp_fail	; If NULL, failed!
			move.l	d0,a0		; Get pointer...
			move.l	d1,(a0)+	; Store size
			move.l	a0,d0		; Get result
	avp_fail:	rts			; return

	;
	; Function to do FreeVecPooled(pool,memory)
	;
	FreeVecPooled:	move.l	-(a1),d0	; Get size / ajust pointer
			jmp	_LVOFreePooled(a6)

    SEE ALSO
	
                <link linkend="n244">FreePooled()</link>
                , 
                <link linkend="n226">CreatePool()</link>
                , 
                <link linkend="n231">DeletePool()</link>
                
            </literallayout>
        </section>
        <section id="n206">
            <title>exec.library/AllocSignal</title>
            <literallayout class="monospaced">
                   NAME
	AllocSignal -- allocate a signal bit

   SYNOPSIS
	signalNum = AllocSignal(signalNum)
	D0			D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 AllocSignal(BYTE);

   FUNCTION
	
                <link linkend="n202">Allocate</link>
                 a signal bit from the current tasks' pool.  Either a
	particular bit, or the next free bit may be allocated.	The signal
	associated with the bit will be properly initialized (cleared).  At
	least 16 user signals are available per task.  Signals should be
	deallocated before the task exits.

	If the signal is already in use (or no free signals are available)
	a -1 is returned.

	Allocated signals are only valid for use with the task that
	allocated them.


   WARNING
	Signals may not be allocated or freed from exception handling code.

   INPUTS
	signalNum - the desired signal number {of 0..31} or -1 for no
		    preference.

   RESULTS
	signalNum - the signal bit number allocated {0..31}. If no signals
		    are available, this function returns -1.

   SEE ALSO
	
                <link linkend="n245">FreeSignal()</link>
                
            </literallayout>
        </section>
        <section id="n207">
            <title>exec.library/AllocTrap</title>
            <literallayout class="monospaced">
                   NAME
	AllocTrap -- allocate a processor trap vector

   SYNOPSIS
	trapNum = AllocTrap(trapNum)
	D0		    D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AllocTrap(LONG);

   FUNCTION
	
                <link linkend="n202">Allocate</link>
                 a trap number from the current task's pool.  These trap
	numbers are those associated with the 68000 TRAP type instructions.
	Either a particular number, or the next free number may be
	allocated.

	If the trap is already in use (or no free traps are available) a -1
	is returned.

	This function only affects the currently running task.

	Traps are sent to the trap handler pointed at by tc_TrapCode.
	Unless changed by user code, this points to a standard trap
	handler.  The stack frame of the exception handler will be:

		0(SP) = Exception vector number.  This will be in the
			range of 32 to 47 (corresponding to the
			Trap #1...Trap #15 instructions).
		4(SP) = 68000/68010/68020/68030, etc. exception frame

	tc_TrapData is not used.


   WARNING
	Traps may not be allocated or freed from exception handling code.
	You are not allowed to write to the exception table yourself.  In
	fact, on some machines you will have trouble finding it - the VBR
	register may be used to remap its location.

   INPUTS
	trapNum - the desired trap number {of 0..15} or -1
		  for no preference.

   RESULTS
	trapNum - the trap number allocated {of 0..15}.  If no traps are
		  available, this function returns -1.	Instructions of the
		  form "Trap #trapNum" will be sent to the task's trap
		  handler.

   SEE ALSO
	
                <link linkend="n246">FreeTrap()</link>
                
            </literallayout>
        </section>
        <section id="n208">
            <title>exec.library/AllocVec</title>
            <literallayout class="monospaced">
                   NAME
	AllocVec -- allocate memory and keep track of the size  (V36)

   SYNOPSIS
	memoryBlock = AllocVec(byteSize, attributes)
	D0		       D0	 D1

	void *AllocVec(ULONG, ULONG);

   FUNCTION
	This function works identically to 
                <link linkend="n204">AllocMem()</link>
                , but tracks the size
	of the allocation.

	See the 
                <link linkend="n204">AllocMem()</link>
                 documentation for details.

   WARNING
	The result of any memory allocation MUST be checked, and a viable
	error handling path taken.  ANY allocation may fail if memory has
	been filled.

   SEE ALSO
	
                <link linkend="n247">FreeVec()</link>
                , 
                <link linkend="n204">AllocMem()</link>
                
            </literallayout>
        </section>
        <section id="n209">
            <title>exec.library/AttemptSemaphore</title>
            <literallayout class="monospaced">
                   NAME
	AttemptSemaphore -- try to obtain without blocking

   SYNOPSIS
	success = AttemptSemaphore(signalSemaphore)
	D0			   A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AttemptSemaphore(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *);

   FUNCTION
	This call is similar to 
                <link linkend="n258">ObtainSemaphore()</link>
                , except that it will not
	block if the semaphore could not be locked.

   INPUT
       signalSemaphore -- an initialized signal semaphore structure

   RESULT
	success -- TRUE if the semaphore was locked, false if some
	    other task already possessed the semaphore.

    NOTE
	This call does NOT preserve registers.

   SEE ALSO
	
                <link linkend="n258">ObtainSemaphore()</link>
                 
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , 
                <link linkend="n269">ReleaseSemaphore()</link>
                ,
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">exec/semaphores.h</ulink>
                
            </literallayout>
        </section>
        <section id="n210">
            <title>exec.library/AttemptSemaphoreShared</title>
            <literallayout class="monospaced">
                   NAME
	AttemptSemaphoreShared -- try to obtain without blocking       (V37)

   SYNOPSIS
	success = AttemptSemaphoreShared(signalSemaphore)
	D0			         A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AttemptSemaphoreShared(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *);

   FUNCTION
	This call is similar to 
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , except that it
	will not block if the semaphore could not be locked.

   INPUT
       signalSemaphore -- an initialized signal semaphore structure

   RESULT
	success -- TRUE if the semaphore was granted, false if some
	    other task already possessed the semaphore in exclusive mode.

   NOTE
	This call does NOT preserve registers.

	Starting in V39 this call will grant the semaphore if the
	caller is already the owner of an exclusive lock on the semaphore.
	In pre-V39 systems this would not be the case.  If you need this
	feature you can do the following workaround:

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 myAttemptSempahoreShared(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *ss)
	{
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 result;

		/* Try for a shared semaphore */
		if (!(result=AttemptSemaphoreShared(ss)))
		{
			/* Now try for the exclusive one... */
			result=AttempSemaphore(ss);
		}
		return(result);
	}

   SEE ALSO
	
                <link linkend="n258">ObtainSemaphore()</link>
                 
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , 
                <link linkend="n269">ReleaseSemaphore()</link>
                ,
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">exec/semaphores.h</ulink>
                
            </literallayout>
        </section>
        <section id="n211">
            <title>exec.library/AvailMem</title>
            <literallayout class="monospaced">
                   NAME
	AvailMem -- memory available given certain requirements

   SYNOPSIS
	size = AvailMem(attributes)
	D0		D1

	ULONG AvailMem(ULONG);

   FUNCTION
	This function returns the amount of free memory given certain
	attributes.

	To find out what the largest block of a particular type is, add
	MEMF_LARGEST into the requirements argument.  Returning the largest
	block is a slow operation.

   WARNING
	Due to the effect of multitasking, the value returned may not
	actually be the amount of free memory available at that instant.

   INPUTS
	requirements - a requirements mask as specified in 
                <link linkend="n204">AllocMem</link>
                .  Any
		       of the 
                <link linkend="n204">AllocMem</link>
                 bits are valid, as is MEMF_LARGEST
		       which returns the size of the largest block matching
		       the requirements.

   RESULT
	size - total free space remaining (or the largest free block).

   NOTE
	For V36 Exec, AvailMem(MEMF_LARGEST) does a consistency check on
	the memory list.  
                <link linkend="n200">Alert</link>
                 AN_MemoryInsane will be pulled if any mismatch
	is noted.

   EXAMPLE
	AvailMem(MEMF_CHIP|MEMF_LARGEST);
	/* return size of largest available chip memory chunk */

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">exec/memory.h</ulink>
                
            </literallayout>
        </section>
        <section id="n212">
            <title>exec.library/CacheClearE</title>
            <literallayout class="monospaced">
                   NAME
	CacheClearE - Cache clearing with extended control (V37)

   SYNOPSIS
	CacheClearE(address,length,caches)
	            a0      d0     d1

	void CacheClearE(APTR,ULONG,ULONG);

   FUNCTION
	
                <link linkend="n82">Flush</link>
                 out the contents of the CPU instruction and/or data caches.
	If dirty data cache lines are present, push them to memory first.

	Motorola CPUs have separate instruction and data caches.  A data
	write does not update the instruction cache.  If an instruction is
	written to memory or modified, the old instruction may still exist
	in the cache.  Before attempting to execute the code, a flush of
	the instruction cache is required.

	For most systems, the data cache is not updated by Direct Memory
	Access (DMA), or if some external factor changes shared memory.

	Caches must be cleared after *any* operation that could cause
	invalid or stale data.  The most common cases are DMA and modifying
	instructions using the processor.

	Some examples:
			Self modifying code
			Building Jump tables
			Run-time code patches
			Relocating code for use at different addresses.
			Loading code from disk

   INPUTS
	address - Address to start the operation.  This may be rounded
		  due to hardware granularity.
	length	- Length of area to be cleared, or $FFFFFFFF to indicate all
		  addresses should be cleared.
	caches  - Bit flags to indicate what caches to affect.  The current
		  supported flags are:
			CACRF_ClearI	;Clear instruction cache
			CACRF_ClearD	;Clear data cache
		  All other bits are reserved for future definition.

   NOTES
	On systems with a copyback mode cache, any dirty data is pushed
	to memory as a part of this operation.

	Regardless of the length given, the function will determine the most
	efficient way to implement the operation.  For some cache systems,
	including the 68030, the overhead partially clearing a cache is often
	too great.  The entire cache may be cleared.

	For all current Amiga models, Chip memory is set with Instruction
	caching enabled, data caching disabled.  This prevents coherency
	conflicts with the blitter or other custom chip DMA.  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/custom.h">Custom</ulink>
                 chip
	registers are marked as non-cacheable by the hardware.

	The system takes care of appropriately flushing the caches for normal
	operations.  The instruction cache is cleared by all calls that
	modify instructions, including 
                <link linkend="n109">LoadSeg()</link>
                , 
                <link linkend="n256">MakeLibrary()</link>
                 and
	
                <link linkend="n285">SetFunction()</link>
                .

   SEE ALSO
	exec/execbase.i, 
                <link linkend="n214">CacheControl()</link>
                , 
                <link linkend="n213">CacheClearU()</link>
                
            </literallayout>
        </section>
        <section id="n213">
            <title>exec.library/CacheClearU</title>
            <literallayout class="monospaced">
                   NAME
	CacheClearU - User callable simple cache clearing (V37)

   SYNOPSIS
	CacheClearU()

	void CacheClearU(void);

   FUNCTION
	
                <link linkend="n82">Flush</link>
                 out the contents of any CPU instruction and data caches.
	If dirty data cache lines are present, push them to memory first.

	Caches must be cleared after *any* operation that could cause
	invalid or stale data.  The most common cases are DMA and modifying
	instructions using the processor.  See the 
                <link linkend="n212">CacheClearE()</link>
                 autodoc
	for a more complete description.

	Some examples of when the cache needs clearing:
			Self modifying code
			Building Jump tables
			Run-time code patches
			Relocating code for use at different addresses.
			Loading code from disk

   SEE ALSO
	exec/execbase.i, 
                <link linkend="n214">CacheControl()</link>
                , 
                <link linkend="n212">CacheClearE()</link>
                
            </literallayout>
        </section>
        <section id="n214">
            <title>exec.library/CacheControl</title>
            <literallayout class="monospaced">
                   NAME
	CacheControl - Instruction &amp; data cache control

   SYNOPSIS
	oldBits = CacheControl(cacheBits,cacheMask)
	D0                     D0        D1

	ULONG CacheControl(ULONG,ULONG);

   FUNCTION
	This function provides global control of any instruction or data
	caches that may be connected to the system.  All settings are
	global -- per task control is not provided.

	The action taken by this function will depend on the type of
	CPU installed.  This function may be patched to support external
	caches, or different cache architectures.  In all cases the function
	will attempt to best emulate the provided settings.  Use of this
	function may save state specific to the caches involved.

	The list of supported settings is provided in the exec/execbase.i
	include file.  The bits currently defined map directly to the Motorola
	68030 CPU CACR register.  Alternate cache solutions may patch into
	the Exec cache functions.  Where possible, bits will be interpreted to
	have the same meaning on the installed cache.

   INPUTS
	cacheBits - new values for the bits specified in cacheMask.

	cacheMask - a mask with ones for all bits to be changed.

   RESULT
	oldBits   - the complete prior values for all settings.

   NOTE
	As a side effect, this function clears all caches.

   SEE ALSO
	exec/execbase.i, 
                <link linkend="n213">CacheClearU()</link>
                , 
                <link linkend="n212">CacheClearE()</link>
                
            </literallayout>
        </section>
        <section id="n215">
            <title>exec.library/CachePostDMA</title>
            <literallayout class="monospaced">
                   NAME
	CachePostDMA - Take actions after to hardware DMA  (V37)

   SYNOPSIS
	CachePostDMA(vaddress,&amp;length,flags)
	             a0       a1      d0

	CachePostDMA(APTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *,ULONG);

   FUNCTION
	Take all appropriate steps after Direct Memory Access (DMA).  This
	function is primarily intended for writers of DMA device drivers.  The
	action will depend on the CPU type installed, caching modes, and the
	state of any Memory Management 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Unit</ulink>
                 (MMU) activity.

	As implemented
		68000 - Do nothing
		68010 - Do nothing
		68020 - Do nothing
		68030 - 
                <link linkend="n82">Flush</link>
                 the data cache
		68040 - 
                <link linkend="n82">Flush</link>
                 matching areas of the data cache
		????? - External cache boards, Virtual Memory Systems, or
			future hardware may patch this vector to best emulate
			the intended behavior.
			With a Bus-Snooping CPU, this function my end up
			doing nothing.

   INPUTS
	address	- Same as initially passed to 
                <link linkend="n216">CachePreDMA</link>
                	length	- Same as initially passed to 
                <link linkend="n216">CachePreDMA</link>
                	flags	- Values:
			DMA_NoModify - If the area was not modified (and
			thus there is no reason to flush the cache) set
			this bit.

			DMA_ReadFromRAM - Indicates that this DMA is a
			read from RAM to the DMA device (ie - a write
			to the hard drive)  This flag is not required
			but if used must match in both the PreDMA and
			PostDMA calls.  This flag *should* be used to
			help the system provide the best performance.
			This flag is safe in all versions of CachePostDMA()

   SEE ALSO
	exec/execbase.i, 
                <link linkend="n216">CachePreDMA()</link>
                , 
                <link linkend="n213">CacheClearU()</link>
                , 
                <link linkend="n212">CacheClearE()</link>
                
            </literallayout>
        </section>
        <section id="n216">
            <title>exec.library/CachePreDMA</title>
            <literallayout class="monospaced">
                   NAME
	CachePreDMA - Take actions prior to hardware DMA  (V37)

   SYNOPSIS
	paddress = CachePreDMA(vaddress,&amp;length,flags)
	d0                     a0       a1      d0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 CachePreDMA(APTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *,ULONG);

   FUNCTION
	Take all appropriate steps before Direct Memory Access (DMA).  This
	function is primarily intended for writers of DMA device drivers.  The
	action will depend on the CPU type installed, caching modes, and the
	state of any Memory Management 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Unit</ulink>
                 (MMU) activity.

	This function supports advanced cache architectures that have
	"copyback" modes.  With copyback, write data may be cached, but not
	actually flushed out to memory.  If the CPU has unflushed data at the
	time of DMA, data may be lost.

	As implemented
		68000 - Do nothing
		68010 - Do nothing
		68020 - Do nothing
		68030 - Do nothing
		68040 - 
                <link linkend="n185">Write</link>
                 any matching dirty cache lines back to memory.
			As a side effect of the 68040's design, matching data
			cache lines are also invalidated -- future CPUs may
			be different.
		????? - External cache boards, Virtual Memory Systems, or
			future hardware may patch this vector to best emulate
			the intended behavior.
			With a Bus-Snooping CPU, this function my end up
			doing nothing.

   INPUTS
	address	- Base address to start the action.
	length	- Pointer to a longword with a length.
	flags	- Values:
			DMA_Continue - Indicates this call is to complete
			a prior request that was broken up.

			DMA_ReadFromRAM - Indicates that this DMA is a
			read from RAM to the DMA device (ie - a write
			to the hard drive)  This flag is not required
			but if used must match in both the PreDMA and
			PostDMA calls.  This flag *should* be used to
			help the system provide the best performance.
			This flag is safe in all versions of CachePreDMA()

   RESULTS
	paddress- Physical address that corresponds to the input virtual
		  address.
	&amp;length	- This length value will be updated to reflect the contiguous
		  length of physical memory present at paddress.  This may
		  be smaller than the requested length.  To get the mapping
		  for the next chunk of memory, call the function again with
		  a new address, length, and the DMA_Continue flag.

   NOTE
	Due to processor granularity, areas outside of the address range
	may be affected by the cache flushing actions.  Care has been taken
	to ensure that no harm is done outside the range, and that activities
	on overlapping cache lines won't harm data.

   SEE ALSO
	exec/execbase.i, 
                <link linkend="n215">CachePostDMA()</link>
                , 
                <link linkend="n213">CacheClearU()</link>
                , 
                <link linkend="n212">CacheClearE()</link>
                
            </literallayout>
        </section>
        <section id="n217">
            <title>exec.library/Cause</title>
            <literallayout class="monospaced">
                   NAME
       Cause -- cause a software interrupt

   SYNOPSIS
       Cause(interrupt)
	     A1

       void Cause(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 *);

   FUNCTION
	This function causes a software interrupt to occur.  If it is
	called from user mode (and processor level 0), the software
	interrupt will preempt the current task.  This call is often used
	by high-level hardware interrupts to defer medium-length processing
	down to a lower interrupt level.  Note that a software interrupt is
	still a real interrupt, and must obey the same restrictions on what
	system function it may call.

	Currently only 5 software interrupt priorities are implemented:
	-32, -16, 0, +16, and +32.  Priorities in between are truncated,
	values outside the -32/+32 range are not allowed.

   NOTE
	When setting up the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 structure, set the node type to
	NT_INTERRUPT, or NT_UNKOWN.

   IMPLEMENTATION
	1&gt; Checks if the node type is NT_SOFTINT.  If so does nothing since
	   the softint is already pending.  No nest count is maintained.
	2&gt; Sets the node type to NT_SOFTINT.
	3&gt; Links into one of the 5 priority queues.
	4&gt; Pokes the hardware interrupt bit used for softints.

	The node type returns to NT_INTERRUPT after removal from the list.

   INPUTS
	interrupt - pointer to a properly initialized interrupt node

   BUGS
	Unlike other Interrupts, SoftInts must preserve the value of A6.

            </literallayout>
        </section>
        <section id="n218">
            <title>exec.library/CheckIO</title>
            <literallayout class="monospaced">
                   NAME
	CheckIO -- get the status of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                   SYNOPSIS
	result = CheckIO(IORequest)
	D0		 A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *CheckIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	This function determines the current state of an I/O request and
	returns FALSE if the I/O has not yet completed.  This function
	effectively hides the internals of the I/O completion mechanism.

	CheckIO() will NOT remove the returned 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 from the reply port.
	This is best performed with 
                <link linkend="n300">WaitIO()</link>
                . If the request has already
	completed, 
                <link linkend="n300">WaitIO()</link>
                 will return quickly. Use of the 
                <link linkend="n276">Remove()</link>
                	function is dangerous, since other tasks may still be adding things
	to your message port; a 
                <link linkend="n232">Disable()</link>
                 would be required.

	This function should NOT be used to busy loop (looping until IO is
	complete).  
                <link linkend="n300">WaitIO()</link>
                 is provided for that purpose.

   INPUTS
	iORequest - pointer to an I/O request block

   RESULTS
	result - NULL if I/O is still in progress.  Otherwise
		 D0 points to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 block.

   NOTE
	CheckIO can hang if called on an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 that has never been used.
	This occurs if LN_TYPE of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 is set to "NT_MESSAGE".
	Instead simply set LN_TYPE to 0.

   SEE ALSO
	
                <link linkend="n233">DoIO()</link>
                , 
                <link linkend="n283">SendIO()</link>
                , 
                <link linkend="n300">WaitIO()</link>
                , 
                <link linkend="n188">AbortIO()</link>
                
            </literallayout>
        </section>
        <section id="n219">
            <title>exec.library/CloseDevice</title>
            <literallayout class="monospaced">
                   NAME
	CloseDevice -- conclude access to a device

   SYNOPSIS
	CloseDevice(iORequest)
		    A1

	void CloseDevice(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	This function informs the device that access to a device/unit
	previously opened has been concluded.  The device may perform
	certain house-cleaning operations.

	The user must ensure that all outstanding IORequests have been
	returned before closing the device.  The 
                <link linkend="n537">AbortIO</link>
                 function can kill
	any stragglers.

	After a close, the I/O request structure is free to be reused.
	Starting with V36 exec it is safe to CloseDevice() with an
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 that is either cleared to zeros, or failed to
	open.

   INPUTS
	iORequest - pointer to an I/O request structure

   SEE ALSO
	
                <link linkend="n262">OpenDevice()</link>
                
            </literallayout>
        </section>
        <section id="n220">
            <title>exec.library/CloseLibrary</title>
            <literallayout class="monospaced">
                   NAME
	CloseLibrary -- conclude access to a library

   SYNOPSIS
	CloseLibrary(library)
		     A1

	void CloseLibrary(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *);

   FUNCTION
	This function informs the system that access to the given library
	has been concluded.  The user must not reference the library or any
	function in the library after this close.

	Starting with V36, it is safe to pass a NULL instead of
	a library pointer.

   INPUTS
	library - pointer to a library node

   NOTE
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 writers must pass a SegList pointer or NULL back from their
	open point.  This value is used by the system, and not visible as
	a return code from CloseLibrary.

   SEE ALSO
	
                <link linkend="n263">OpenLibrary()</link>
                
            </literallayout>
        </section>
        <section id="n221">
            <title>exec.library/ColdReboot</title>
            <literallayout class="monospaced">
                    NAME
	ColdReboot - reboot the Amiga (V36)

    SYNOPSIS
	ColdReboot()

	void ColdReboot(void);

    FUNCTION
	Reboot the machine.  All external memory and periperals will be
	
                <link linkend="n312">RESET</link>
                , and the machine will start its power up diagnostics.

	This function never returns.

    INPUT
	A chaotic pile of disoriented bits.

    RESULTS
	An altogether totally integrated living system.

            </literallayout>
        </section>
        <section id="n222">
            <title>exec.library/CopyMem</title>
            <literallayout class="monospaced">
                   NAME
	CopyMem - general purpose memory copy function

   SYNOPSIS
	CopyMem( source, dest, size )
		 A0	 A1    D0

	void CopyMem(APTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                ,ULONG);

   FUNCTION
	CopyMem is a general purpose, fast memory copy function.  It can
	deal with arbitrary lengths, with its pointers on arbitrary
	alignments.  It attempts to optimize larger copies with more
	efficient copies, it uses byte copies for small moves, parts of
	larger copies, or the entire copy if the source and destination are
	misaligned with respect to each other.

	Arbitrary overlapping copies are not supported.

	The internal implementation of this function will change from
	system to system, and may be implemented via hardware DMA.

   INPUTS
	source - a pointer to the source data region
	dest  - a pointer to the destination data region
	size  - the size (in bytes) of the memory area.  Zero copies
		zero bytes

   SEE ALSO
	
                <link linkend="n223">CopyMemQuick()</link>
                
            </literallayout>
        </section>
        <section id="n223">
            <title>exec.library/CopyMemQuick</title>
            <literallayout class="monospaced">
                   NAME
	CopyMemQuick - optimized memory copy function

   SYNOPSIS
	CopyMemQuick( source, dest, size )
		      A0      A1    D0

	void CopyMemQuick(ULONG *,ULONG *,ULONG);

   FUNCTION
	CopyMemQuick is a highly optimized memory copy function, with
	restrictions on the size and alignment of its arguments. Both the
	source and destination pointers must be longword aligned.  In
	addition, the size must be an integral number of longwords (e.g.
	the size must be evenly divisible by four).

	Arbitrary overlapping copies are not supported.

	The internal implementation of this function will change from system
	to system, and may be implemented via hardware DMA.

   INPUTS
	source - a pointer to the source data region, long aligned
	dest -  a pointer to the destination data region, long aligned
	size -  the size (in bytes) of the memory area.  Zero copies
		zero bytes.

   SEE ALSO
	
                <link linkend="n222">CopyMem()</link>
                
            </literallayout>
        </section>
        <section id="n224">
            <title>exec.library/CreateIORequest</title>
            <literallayout class="monospaced">
                   NAME
	CreateIORequest() -- create an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 structure  (V36)

   SYNOPSIS
	ioReq = CreateIORequest( ioReplyPort, size );
	 D0                       A0           D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *CreateIORequest(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *, ULONG);

   FUNCTION
	Allocates memory for and initializes a new IO request block
	of a user-specified number of bytes.  The number of bytes
	must be at least as large as a "struct Message".

   INPUTS
	ioReplyPort - Pointer to a port for replies (an initialized message
		port, as created by 
                <link linkend="n225">CreateMsgPort()</link>
                 ).  If NULL, this
		function fails.
	size - the size of the IO request to be created.

   RESULT
	ioReq - A pointer to the new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 block, or NULL.

   SEE ALSO
	
                <link linkend="n229">DeleteIORequest()</link>
                , 
                <link linkend="n225">CreateMsgPort()</link>
                , 
                <link linkend="n496">amiga.lib/CreateExtIO()</link>
                
            </literallayout>
        </section>
        <section id="n225">
            <title>exec.library/CreateMsgPort</title>
            <literallayout class="monospaced">
                   NAME
	CreateMsgPort - 
                <link linkend="n202">Allocate</link>
                 and initialize a new message port  (V36)

   SYNOPSIS
	CreateMsgPort()

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 * CreateMsgPort(void);

   FUNCTION
	Allocates and initializes a new message port.  The message list
	of the new port will be prepared for use (via NewList).  A signal
	bit will be allocated, and the port will be set to signal your
	task when a message arrives (PA_SIGNAL).

	You *must* use 
                <link linkend="n230">DeleteMsgPort()</link>
                 to delete ports created with
	CreateMsgPort()!

   RESULT
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 - A new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 structure ready for use, or NULL if out of
		memory or signals.  If you wish to add this port to the public
		port list, fill in the ln_Name and ln_Pri fields, then call
		
                <link linkend="n195">AddPort()</link>
                .  Don't forget RemPort()!

   SEE ALSO
	
                <link linkend="n230">DeleteMsgPort()</link>
                , 
                <link linkend="n195">exec/AddPort()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">exec/ports.h</ulink>
                , 
                <link linkend="n497">amiga.lib/CreatePort()</link>
                
            </literallayout>
        </section>
        <section id="n226">
            <title>exec.library/CreatePool</title>
            <literallayout class="monospaced">
                    NAME
	CreatePool -- Generate a private memory pool header (V39)

    SYNOPSIS
	newPool=CreatePool(memFlags,puddleSize,threshSize)
	d0                 d0       d1         d2

	void *CreatePool(ULONG,ULONG,ULONG);

    FUNCTION
	
                <link linkend="n202">Allocate</link>
                 and prepare a new memory pool header.	Each pool is a
	separate tracking system for memory of a specific type.  Any number
	of pools may exist in the system.

	Pools automatically expand and shrink based on demand.	Fixed sized
	"puddles" are allocated by the pool manager when more total memory
	is needed.  Many small allocations can fit in a single puddle.
	Allocations larger than the threshSize are allocation in their own
	puddles.

	At any time individual allocations may be freed.  Or, the entire
	pool may be removed in a single step.

    INPUTS
	memFlags - a memory flags specifier, as taken by 
                <link linkend="n204">AllocMem</link>
                .
	puddleSize - the size of Puddles...
	threshSize - the largest allocation that goes into normal puddles
	             This *MUST* be less than or equal to puddleSize
	             (CreatePool() will fail if it is not)

    RESULT
	The address of a new pool header, or NULL for error.

    SEE ALSO
	
                <link linkend="n231">DeletePool()</link>
                , 
                <link linkend="n205">AllocPooled()</link>
                , 
                <link linkend="n244">FreePooled()</link>
                , exec/memory.i

            </literallayout>
        </section>
        <section id="n227">
            <title>exec.library/Deallocate</title>
            <literallayout class="monospaced">
                   NAME
	Deallocate -- deallocate a block of memory

   SYNOPSIS
	Deallocate(memHeader, memoryBlock, byteSize)
		   A0	      A1	   D0

	void Deallocate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                ,ULONG);

   FUNCTION
	This function deallocates memory by returning it to the appropriate
	private free memory pool.  This function can be used to free an
	entire block allocated with the above function, or it can be used
	to free a sub-block of a previously allocated block.  Sub-blocks
	must be an even multiple of the memory chunk size (currently 8
	bytes).

	This function can even be used to add a new free region to an
	existing 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                , however the extent pointers in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemHeader</ulink>
                	will no longer be valid.

	If memoryBlock is not on a block boundary (MEM_BLOCKSIZE) then it
	will be rounded down in a manner compatible with 
                <link linkend="n202">Allocate()</link>
                .  Note
	that this will work correctly with all the memory allocation
	functions, but may cause surprises if one is freeing only part of a
	region.  The size of the block will be rounded up, so the freed
	block will fill to an even memory block boundary.

   INPUTS
	memHeader - points to the memory header this block is part of.
	memoryBlock - address of memory block to free.
	byteSize - the size of the block in bytes. If NULL, nothing
		   happens.

   SEE ALSO
	
                <link linkend="n202">Allocate()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">exec/memory.h</ulink>
                
            </literallayout>
        </section>
        <section id="n228">
            <title>exec.library/Debug</title>
            <literallayout class="monospaced">
                   NAME
	Debug -- run the system debugger

   SYNOPSIS
	Debug(flags)
	      D0

	void Debug(ULONG);

   FUNCTION
	This function calls the system debugger.  By default this debugger
	is "SAD" in &gt;= V39 and "ROM-WACK" in &lt; V39.  Other debuggers are
	encouraged to take over this entry point (via 
                <link linkend="n285">SetFunction()</link>
                ) so
	that when an application calls Debug(), the alternative debugger
	will get control.  Currently a zero is passed to allow future
	expansion.

   NOTE
	The Debug() call may be made when the system is in a questionable
	state; if you have a 
                <link linkend="n285">SetFunction()</link>
                 patch, make few assumptions, be
	prepared for 
                <link linkend="n295">Supervisor</link>
                 mode, and be aware of differences in the
	Motorola stack frames on the 68000,'10,'20,'30,'40 (etc.)

   BUGS
	In ROMWack, calling this function in SUPERVISOR state would have
	caused the a5 register to be trashed and the user stack pointer to
	be trashed.  As of V39 (and the instroduction of SAD) this is no
	longer the case.  However, calling this function in 
                <link linkend="n295">Supervisor</link>
                	state is a bit "tricky" at best...

	Note that due to a bug, pre-V40 SAD had the command
	codes wrong.  See the SAD autodoc for more details.

   SEE ALSO
	
                <link linkend="n285">SetFunction()</link>
                	your favorite debugger's manual...
	the SAD autodocs...
	the ROM-WACK chapter of the ROM Kernel Manual... (pre-V39)

            </literallayout>
        </section>
        <section id="n229">
            <title>exec.library/DeleteIORequest</title>
            <literallayout class="monospaced">
                   NAME
	DeleteIORequest() - Free a request made by 
                <link linkend="n224">CreateIORequest()</link>
                  (V36)

   SYNOPSIS
	DeleteIORequest( ioReq );
	                 a0

	void DeleteIORequest(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	Frees up an IO request as allocated by 
                <link linkend="n224">CreateIORequest()</link>
                .

   INPUTS
	ioReq - A pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 block to be freed, or NULL.
		This function uses the mn_Length field to determine how
		much memory to free.

   SEE ALSO
	
                <link linkend="n224">CreateIORequest()</link>
                , 
                <link linkend="n507">amiga.lib/DeleteExtIO()</link>
                
            </literallayout>
        </section>
        <section id="n230">
            <title>exec.library/DeleteMsgPort</title>
            <literallayout class="monospaced">
                   NAME
	DeleteMsgPort - Free a message port created by 
                <link linkend="n225">CreateMsgPort</link>
                  (V36)

   SYNOPSIS
	DeleteMsgPort(msgPort)
		      a0

	void DeleteMsgPort(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *);

   FUNCTION
	Frees a message port created by 
                <link linkend="n225">CreateMsgPort()</link>
                .  All messages that
	may have been attached to this port must have already been
	replied to.

   INPUTS
	msgPort - A message port.  NULL for no action.

   SEE ALSO
	
                <link linkend="n225">CreateMsgPort()</link>
                , 
                <link linkend="n508">amiga.lib/DeletePort()</link>
                
            </literallayout>
        </section>
        <section id="n231">
            <title>exec.library/DeletePool</title>
            <literallayout class="monospaced">
                    NAME
	DeletePool --  Drain an entire memory pool (V39)

    SYNOPSIS
	DeletePool(poolHeader)
	           a0

	void DeletePool(void *);

    FUNCTION
	Frees all memory in all pudles of the specified pool header, then
	deletes the pool header.  Individual free calls are not needed.

    INPUTS
	poolHeader - as returned by 
                <link linkend="n226">CreatePool()</link>
                .

    SEE ALSO
	
                <link linkend="n226">CreatePool()</link>
                , 
                <link linkend="n205">AllocPooled()</link>
                , 
                <link linkend="n244">FreePooled()</link>
                
            </literallayout>
        </section>
        <section id="n232">
            <title>exec.library/Disable</title>
            <literallayout class="monospaced">
                    NAME
	Disable -- disable interrupt processing.

    SYNOPSIS
	Disable();

	void Disable(void);

    FUNCTION
	Prevents interrupts from being handled by the system, until a
	matching 
                <link linkend="n234">Enable()</link>
                 is executed.  Disable() implies 
                <link linkend="n241">Forbid()</link>
                .

	DO NOT USE THIS CALL WITHOUT GOOD JUSTIFICATION.  THIS CALL IS
	VERY DANGEROUS!

    RESULTS
	All interrupt processing is deferred until the task executing makes
	a call to 
                <link linkend="n234">Enable()</link>
                 or is placed in a wait state.  Normal task
	rescheduling does not occur while interrupts are disabled.  In order
	to restore normal interrupt processing, the programmer must execute
	exactly one call to 
                <link linkend="n234">Enable()</link>
                 for every call to Disable().

	IMPORTANT REMINDER:

	It is important to remember that there is a danger in using
	disabled sections.  Disabling interrupts for more than ~250
	microseconds will prevent vital system functions (especially serial
	I/0) from operating in a normal fashion.

	Think twice before using Disable(), then think once more.
	After all that, think again.  With enough thought, the need
	for a Disable() can often be eliminated.  For the user of many
	device drivers, a write to disable *only* the particular interrupt
	of interest can replace a Disable().  For example:
			MOVE.W	#INTF_PORTS,_intena
	Do not use a macro for Disable(), insist on the real thing.

	This call may be made from interrupts, it will have the effect
	of locking out all higher-level interrupts (lower-level interrupts
	are automatically disabled by the CPU).

        Note: In the event of a task entering a 
                <link linkend="n299">Wait()</link>
                 after disabling
              interrupts, the system "breaks" the disabled state and runs
              normally until the task which called Disable() is rescheduled.

    NOTE
	This call is guaranteed to preserve all registers.

    SEE ALSO
	
                <link linkend="n241">Forbid()</link>
                , 
                <link linkend="n265">Permit()</link>
                , 
                <link linkend="n234">Enable()</link>
                
            </literallayout>
        </section>
        <section id="n233">
            <title>exec.library/DoIO</title>
            <literallayout class="monospaced">
                   NAME
	DoIO -- perform an I/O command and wait for completion

   SYNOPSIS
	error = DoIO(iORequest)
	D0	     A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 DoIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	This function requests a device driver to perform the I/O command
	specified in the I/O request.  This function will always wait until
	the I/O request is fully complete.

	DoIO() handles all the details, including Quick I/O, waiting for
	the request, and removing the reply message, etc..

   IMPLEMENTATION
	This function first tries to complete the IO via the "Quick I/O"
	mechanism.  The io_Flags field is always set to IOF_QUICK (0x01)
	before the internal device call.

	The LN_TYPE field is used internally to flag completion.  Active
	requests have type NT_MESSAGE.  Requests that have been replied
	have type NT_REPLYMSG.  It is illegal to start IO using a
	still active 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                , or a request with type NT_REPLYMSG.

   INPUTS
	iORequest - pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 initialized by 
                <link linkend="n262">OpenDevice()</link>
                   RESULTS
	error - a sign-extended copy of the io_Error field of the
		
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                .  Most device commands require that the error
		return be checked.

   SEE ALSO
	
                <link linkend="n283">SendIO()</link>
                , 
                <link linkend="n218">CheckIO()</link>
                , 
                <link linkend="n300">WaitIO()</link>
                , 
                <link linkend="n188">AbortIO()</link>
                , 
                <link linkend="n548">amiga.lib/BeginIO</link>
                
            </literallayout>
        </section>
        <section id="n234">
            <title>exec.library/Enable</title>
            <literallayout class="monospaced">
                   NAME
	Enable -- permit system interrupts to resume.

   SYNOPSIS
	Enable();

	void Enable(void);

   FUNCTION
	Allow system interrupts to again occur normally, after a matching
	
                <link linkend="n232">Disable()</link>
                 has been executed.

   RESULTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 processing is restored to normal operation. The
	programmer must execute exactly one call to Enable() for every call
	to 
                <link linkend="n232">Disable()</link>
                .

    NOTE
	This call is guaranteed to preserve all registers.

   SEE ALSO
	
                <link linkend="n241">Forbid()</link>
                , 
                <link linkend="n265">Permit()</link>
                , 
                <link linkend="n232">Disable()</link>
                
            </literallayout>
        </section>
        <section id="n235">
            <title>exec.library/Enqueue</title>
            <literallayout class="monospaced">
                   NAME
	Enqueue -- insert or append node to a system queue

   SYNOPSIS
	Enqueue(list, node)
		A0    A1

	void Enqueue(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *);

   FUNCTION
	
                <link linkend="n254">Insert</link>
                 or append a node into a system queue.  The insert is
	performed based on the node priority -- it will keep the list
	properly sorted.  New nodes will be inserted in front of the first
	node with a lower priority.   Hence a FIFO queue for nodes of equal
	priority

   WARNING
	This function does not arbitrate for access to the list.  The
	calling task must be the owner of the involved list.

   INPUTS
	list - a pointer to the system queue header
	node - the node to enqueue.  This must be a full featured node
	       with type, priority and name fields.

   SEE ALSO
	
                <link linkend="n190">AddHead()</link>
                , 
                <link linkend="n198">AddTail()</link>
                , 
                <link linkend="n254">Insert()</link>
                , 
                <link linkend="n276">Remove()</link>
                , 
                <link linkend="n272">RemHead()</link>
                , 
                <link linkend="n280">RemTail()</link>
                
            </literallayout>
        </section>
        <section id="n236">
            <title>exec.library/FindName</title>
            <literallayout class="monospaced">
                   NAME
	FindName -- find a system list node with a given name

   SYNOPSIS
	node = FindName(start, name)
	D0,Z		A0     A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *FindName(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *, STRPTR);

   FUNCTION
	Traverse a system list until a node with the given name is found.
	To find multiple occurrences of a string, this function may be
	called with a node starting point.

	No arbitration is done for access to the list!	If multiple tasks
	access the same list, an arbitration mechanism such as
	SignalSemaphores must be used.

   INPUTS
	start - a list header or a list node to start the search
		(if node, this one is skipped)
	name - a pointer to a name string terminated with NULL

   RESULTS
	node - a pointer to the node with the same name else
	    zero to indicate that the string was not found.

            </literallayout>
        </section>
        <section id="n237">
            <title>exec.library/FindPort</title>
            <literallayout class="monospaced">
                   NAME
	FindPort -- find a given system message port

   SYNOPSIS
	port = FindPort(name)
	D0		A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *FindPort(STRPTR);

   FUNCTION
	This function will search the system message port list for a port
	with the given name.  The first port matching this name will be
	returned.  No arbitration of the port list is done.  This function
	MUST be protected with A 
                <link linkend="n265">Forbid()/Permit()</link>
                 pair!

   EXAMPLE
	#include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">&lt;exec/types.h&gt;</ulink>
                	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *FindPort();

	ULONG SafePutToPort(message, portname)
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 *message;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                          portname;
	{
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *port;

	    Forbid();
		port = FindPort(portname);
		if (port)
		    PutMsg(port,message);
	    Permit();
	    return((ULONG)port); /* If zero, the port has gone away */
	}

   INPUT
	name - name of the port to find

   RETURN
	port - a pointer to the message port, or zero if
		not found.


            </literallayout>
        </section>
        <section id="n238">
            <title>exec.library/FindResident</title>
            <literallayout class="monospaced">
                   NAME
	FindResident - find a resident module by name

   SYNOPSIS
	resident = FindResident(name)
	D0			A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">Resident</ulink>
                 *FindResident(STRPTR);

   FUNCTION
	Search the system resident tag list for a resident tag ("ROMTag") with
	the given name.  If found return a pointer to the resident tag
	structure, else return zero.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">Resident</ulink>
                 modules are used by the system to pull all its parts
	together at startup.  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">Resident</ulink>
                 tags are also found in disk based
	devices and libraries.

   INPUTS
	name - pointer to name string

   RESULT
	resident - pointer to the resident tag structure or
		zero if none found.

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">exec/resident.h</ulink>
                , 
                <link linkend="n251">InitResident()</link>
                
            </literallayout>
        </section>
        <section id="n239">
            <title>exec.library/FindSemaphore</title>
            <literallayout class="monospaced">
                   NAME
	FindSemaphore -- find a given system signal semaphore

   SYNOPSIS
	signalSemaphore = FindSemaphore(name)
	D0		                A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *FindSemaphore(STRPTR);

   FUNCTION
	This function will search the system signal semaphore list for a
	semaphore with the given name.	The first semaphore matching this
	name will be returned.

	This function does not arbitrate for access to the semaphore list,
	surround the call with a 
                <link linkend="n265">Forbid()/Permit()</link>
                 pair.

   INPUT
	name - name of the semaphore to find

   RESULT
	semaphore - a pointer to the signal semaphore, or zero if not
		    found.

            </literallayout>
        </section>
        <section id="n240">
            <title>exec.library/FindTask</title>
            <literallayout class="monospaced">
                   NAME
	FindTask -- find a task with the given name or find oneself

   SYNOPSIS
	task = FindTask(name)
	D0		A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 *FindTask(STRPTR);

   FUNCTION
	This function will check all task queues for a task with the given
	name, and return a pointer to its task control block.  If a NULL
	name pointer is given a pointer to the current task will be
	returned.

	Finding oneself with a NULL for the name is very quick.  Finding a
	task by name is very system expensive, and will disable interrupts
	for a long time.  Since a task may remove itself at any time,
	a 
                <link linkend="n265">Forbid()/Permit()</link>
                 pair may be needed to ensure the pointer
	returned by FindTask() is still valid when used.

   INPUT
	name - pointer to a name string

   RESULT
	task - pointer to the task (or Process)

            </literallayout>
        </section>
        <section id="n241">
            <title>exec.library/Forbid</title>
            <literallayout class="monospaced">
                    NAME
	Forbid -- forbid task rescheduling.

    SYNOPSIS
	Forbid()

	void Forbid(void);

    FUNCTION
	Prevents other tasks from being scheduled to run by the dispatcher,
	until a matching 
                <link linkend="n265">Permit()</link>
                 is executed, or this task is scheduled to
	
                <link linkend="n299">Wait()</link>
                .  Interrupts are NOT disabled.

	DO NOT USE THIS CALL WITHOUT GOOD JUSTIFICATION.  THIS CALL IS
	DANGEROUS!

    RESULTS
	The current task will not be rescheduled as long as it is ready to
	run.  In the event that the current task enters a wait state, other
	tasks may be scheduled.  Upon return from the wait state, the original
	task will continue to run without disturbing the Forbid().

	Calls to Forbid() nest. In order to restore normal task rescheduling,
	the programmer must execute exactly one call to 
                <link linkend="n265">Permit()</link>
                 for every
	call to Forbid().

    WARNING
	In the event of a task entering a 
                <link linkend="n299">Wait()</link>
                 after a Forbid(), the system
	"breaks" the forbidden state and runs normally until the task which
	called Forbid() is rescheduled.  If caution is not taken, this can
	cause subtle bugs, since any device or DOS call will (in effect)
	cause your task to wait.

	Forbid() is not useful or safe from within interrupt code
	(All interrupts are always higher priority than tasks, and
	interrupts are allowed to break a Forbid()).

    NOTE
	This call is guaranteed to preserve all registers.

    SEE ALSO
	
                <link linkend="n265">Permit()</link>
                , 
                <link linkend="n232">Disable()</link>
                , 
                <link linkend="n258">ObtainSemaphore()</link>
                , 
                <link linkend="n260">ObtainSemaphoreShared()</link>
                
            </literallayout>
        </section>
        <section id="n242">
            <title>exec.library/FreeEntry</title>
            <literallayout class="monospaced">
                   NAME
	FreeEntry -- free many regions of memory

   SYNOPSIS
	FreeEntry(memList)
		  A0
	void FreeEntry(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 *);

   FUNCTION
	This function takes a memList structure (as returned by AllocEntry)
	and frees all the entries.

   INPUTS
	memList -- pointer to structure filled in with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemEntry</ulink>
                		   structures

   SEE ALSO
	
                <link linkend="n203">AllocEntry()</link>
                
            </literallayout>
        </section>
        <section id="n243">
            <title>exec.library/FreeMem</title>
            <literallayout class="monospaced">
                   NAME
	FreeMem -- deallocate with knowledge

   SYNOPSIS
	FreeMem(memoryBlock, byteSize)
		A1	     D0

	void FreeMem(void *,ULONG);

   FUNCTION
	Free a region of memory, returning it to the system pool from which
	it came.  Freeing partial blocks back into the system pool is
	unwise.

   NOTE
	If a block of memory is freed twice, the system will Guru. The
	
                <link linkend="n200">Alert</link>
                 is AN_FreeTwice ($01000009).   If you pass the wrong pointer,
	you will probably see AN_MemCorrupt $01000005.  Future versions may
	add more sanity checks to the memory lists.

   INPUTS
	memoryBlock - pointer to the memory block to free
	byteSize - the size of the desired block in bytes.  (The operating
		system will automatically round this number to a multiple of
		the system memory chunk size)

   SEE ALSO
	
                <link linkend="n204">AllocMem()</link>
                
            </literallayout>
        </section>
        <section id="n244">
            <title>exec.library/FreePooled</title>
            <literallayout class="monospaced">
                    NAME
	FreePooled -- Free pooled memory  (V39)

    SYNOPSIS
	FreePooled(poolHeader,memory,memSize)
		   a0         a1     d0

	void FreePooled(void *,void *,ULONG);

    FUNCTION
	Deallocates memory allocated by 
                <link linkend="n205">AllocPooled()</link>
                .  The size of the
	allocation *MUST* match the size given to 
                <link linkend="n205">AllocPooled()</link>
                .
	The reason the pool functions do not track individual allocation
	sizes is because many of the uses of pools have small allocation
	sizes and the tracking of the size would be a large overhead.

	Only memory allocated by 
                <link linkend="n205">AllocPooled()</link>
                 may be freed with this
	function!

	Doing a 
                <link linkend="n231">DeletePool()</link>
                 on the pool will free all of the puddles
	and thus all of the allocations done with 
                <link linkend="n205">AllocPooled()</link>
                 in that
	pool.  (No need to FreePooled() each allocation)

    INPUTS
	memory - pointer to memory allocated by 
                <link linkend="n205">AllocPooled</link>
                .
	poolHeader - a specific private pool header.

    NOTES
	The pool function do not protect an individual pool from
	multiple accesses.  The reason is that in most cases the pools
	will be used by a single task.  If your pool is going to
	be used by more than one task you must Semaphore protect
	the pool from having more than one task trying to allocate
	within the same pool at the same time.  Warning:  
                <link linkend="n241">Forbid()</link>
                	protection *will not work* in the future.  *Do NOT* assume
	that we will be able to make it work in the future.  FreePooled()
	may well break a 
                <link linkend="n241">Forbid()</link>
                 and as such can only be protected
	by a semaphore.

	To track sizes yourself, the following code can be used:
	Assumes a6=ExecBase

	;
	; Function to do AllocVecPooled(Pool,memSize)
	;
	AllocVecPooled:	addq.l	#4,d0		; Get space for tracking
			move.l	d0,-(sp)	; Save the size
			jsr	_LVOAllocPooled(a6)	; Call pool...
			move.l	(sp)+,d1	; Get size back...
			tst.l	d0		; Check for error
			beq.s	avp_fail	; If NULL, failed!
			move.l	d0,a0		; Get pointer...
			move.l	d1,(a0)+	; Store size
			move.l	a0,d0		; Get result
	avp_fail:	rts			; return

	;
	; Function to do FreeVecPooled(pool,memory)
	;
	FreeVecPooled:	move.l	-(a1),d0	; Get size / ajust pointer
			jmp	_LVOFreePooled(a6)

    SEE ALSO
	
                <link linkend="n205">AllocPooled()</link>
                , 
                <link linkend="n226">CreatePool()</link>
                , 
                <link linkend="n231">DeletePool()</link>
                
            </literallayout>
        </section>
        <section id="n245">
            <title>exec.library/FreeSignal</title>
            <literallayout class="monospaced">   NAME
	FreeSignal -- free a signal bit

   SYNOPSIS
	FreeSignal(signalNum)
		   D0

	void FreeSignal(BYTE);

   FUNCTION
	This function frees a previously allocated signal bit for reuse.
	This call must be performed while running in the same task in which
	the signal was allocated.

   WARNING
	Signals may not be allocated or freed from exception handling code.

   NOTE
	Starting with V37, an attempt to free signal -1 is harmless.

   INPUTS
	signalNum - the signal number to free {0..31}.
</literallayout>
        </section>
        <section id="n246">
            <title>exec.library/FreeTrap</title>
            <literallayout class="monospaced">   NAME
	FreeTrap -- free a processor trap

   SYNOPSIS
	FreeTrap(trapNum)
		 D0

	void FreeTrap(ULONG);

   FUNCTION
	This function frees a previously allocated trap number for reuse.
	This call must be performed while running in the same task in which
	the trap was allocated.

   WARNING
	Traps may not be allocated or freed from exception handling code.

   INPUTS
	trapNum - the trap number to free {of 0..15}
</literallayout>
        </section>
        <section id="n247">
            <title>exec.library/FreeVec</title>
            <literallayout class="monospaced">
                   NAME
	FreeVec -- return 
                <link linkend="n208">AllocVec()</link>
                 memory to the system  (V36)

   SYNOPSIS
	FreeVec(memoryBlock)
		A1

	void FreeVec(void *);

   FUNCTION
	Free an allocation made by the 
                <link linkend="n208">AllocVec()</link>
                 call.  The memory will
	be returned to the system pool from which it came.

   NOTE
	If a block of memory is freed twice, the system will Guru. The
	
                <link linkend="n200">Alert</link>
                 is AN_FreeTwice ($01000009).   If you pass the wrong pointer,
	you will probably see AN_MemCorrupt $01000005.  Future versions may
	add more sanity checks to the memory lists.

   INPUTS
	memoryBlock - pointer to the memory block to free, or NULL.

   SEE ALSO
	
                <link linkend="n208">AllocVec()</link>
                
            </literallayout>
        </section>
        <section id="n248">
            <title>exec.library/GetCC</title>
            <literallayout class="monospaced">
                   NAME
	GetCC -- get condition codes in a 68010 compatible way.

   SYNOPSIS
	conditions = GetCC()
	  D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 GetCC(void);

   FUNCTION
	The 68000 processor has a "MOVE SR,&lt;ea&gt;" instruction which gets a
	copy of the processor condition codes.

	On the 68010,20 and 30 CPUs, "MOVE SR,&lt;ea&gt;" is privileged.  User
	code will trap if it is attempted.  These processors need to use
	the "MOVE CCR,&lt;ea&gt;" instruction instead.

	This function provides a means of obtaining the CPU condition codes
	in a manner that will make upgrades transparent.  This function is
	VERY short and quick.

   RESULTS
	conditions - the 680XX condition codes

    NOTE
	This call is guaranteed to preserve all registers.  This function
	may be implemented as code right in the jump table.

            </literallayout>
        </section>
        <section id="n249">
            <title>exec.library/GetMsg</title>
            <literallayout class="monospaced">
                   NAME
	GetMsg -- get next message from a message port

   SYNOPSIS
	message = GetMsg(port)
	D0		 A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 *GetMsg(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *);

   FUNCTION
	This function receives a message from a given message port. It
	provides a fast, non-copying message receiving mechanism. The
	received message is removed from the message port.

	This function will not wait.  If a message is not present this
	function will return zero.  If a program must wait for a message,
	it can 
                <link linkend="n299">Wait()</link>
                 on the signal specified for the port or use the
	
                <link linkend="n301">WaitPort()</link>
                 function.  There can only be one task waiting for any
	given port.

	Getting a message does not imply to the sender that the message is
	free to be reused by the sender.  When the receiver is finished
	with the message, it may 
                <link linkend="n282">ReplyMsg()</link>
                 it back to the sender.


	Getting a signal does NOT always imply a message is ready.  More
	than one message may arrive per signal, and signals may show up
	without messages.  Typically you must loop to GetMsg() until it
	returns zero, then 
                <link linkend="n299">Wait()</link>
                 or 
                <link linkend="n301">WaitPort()</link>
                .

   INPUT
	port - a pointer to the receiver message port

   RESULT
	message - a pointer to the first message available.  If
		  there are no messages, return zero.
		  Callers must be prepared for zero at any time.

   SEE ALSO
	
                <link linkend="n267">PutMsg()</link>
                , 
                <link linkend="n282">ReplyMsg()</link>
                , 
                <link linkend="n301">WaitPort()</link>
                , 
                <link linkend="n299">Wait()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">exec/ports.h</ulink>
                
            </literallayout>
        </section>
        <section id="n250">
            <title>exec.library/InitCode</title>
            <literallayout class="monospaced">
                   NAME
	InitCode - initialize resident code modules (internal function)

   SYNOPSIS
	InitCode(startClass, version)
		 D0          D1

	void InitCode(ULONG,ULONG);

   FUNCTION
	(This function may be ignored by application programmers)

	Call 
                <link linkend="n251">InitResident()</link>
                 for all resident modules in the ResModules array
	with the given startClass and with versions equal or greater than
	that specified.  The segList parameter is passed as zero.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">Resident</ulink>
                 modules are used by the system to pull all its parts
	together at startup.  Modules are initialized in a prioritized order.

	Modules that do not have a startclass should be of priority -120.
	RTF_AFTERDOS modules should start at -100 (working down).

   INPUTS
	startClass - the class of code to be initialized:
		BITDEF RT,COLDSTART,0
		BITDEF RT,SINGLETASK,1	;ExecBase-&gt;ThisTask==0 (V36 only)
		BITDEF RT,AFTERDOS,2	;(V36 only)
	version - a major version number

    SEE ALSO
	ResidentTag (RT) structure definition (resident.h)

            </literallayout>
        </section>
        <section id="n251">
            <title>exec.library/InitResident</title>
            <literallayout class="monospaced">
                   NAME
	InitResident - initialize resident module

   SYNOPSIS
	object = InitResident(resident, segList)
	D0	               A1        D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 InitResident(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">Resident</ulink>
                 *,ULONG);

   FUNCTION
	Initialize a ROMTag.  ROMTags are used to link system modules
	together.  Each disk based device or library must contain a
	ROMTag structure in the first code hunk.

	Once the validity of the ROMTag is verified, the RT_INIT pointer
	is jumped to  with the following registers:
		D0 = 0
		A0 = segList
	 	A6 = 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                   INPUTS
	resident - Pointer to a ROMTag
	segList  - SegList of the loaded object, if loaded from disk.
		   Libraries &amp; Devices will cache this value for later
		   return at close or expunge time.  Pass NULL for ROM
		   modules.

   RESULTS
	object	- Return value from the init code, usually the library
		  or device base.  NULL for failure.

   AUTOINIT FEATURE
	An automatic method of library/device base and vector table
	initialization is also provided by InitResident().  The initial code
	hunk of the library or device should contain "MOVEQ #-1,d0; RTS;".
	Following that must be an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">Resident</ulink>
                 structure with
	RTF_AUTOINIT set in rt_Flags, and an rt_Init pointer which points
	to four longwords.  These four longwords will be used in a call
	to MakeLibrary();

	    - The size of your library/device base structure including initial
	      
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 structure.

	    - A pointer to a longword table of standard, then library
	      specific function offsets, terminated with -1L.
	      (short format offsets are also acceptable)

	    - Pointer to data table in 
                <link linkend="n253">exec/InitStruct</link>
                 format for
	      initialization of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 structure.

	    - Pointer to library initialization function, or NULL.
		Calling sequence:
			D0 = library base
			A0 = segList
			A6 = 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                	      This function must return in D0 the library/device base to be
	      linked into the library/device list.  If the initialization
	      function fails, the device memory must be manually deallocated,
	      then NULL returned in D0.

   SEE ALSO
	exec/resident.i, 
                <link linkend="n238">FindResident()</link>
                
            </literallayout>
        </section>
        <section id="n252">
            <title>exec.library/InitSemaphore</title>
            <literallayout class="monospaced">
                   NAME
	InitSemaphore -- initialize a signal semaphore

   SYNOPSIS
	InitSemaphore(signalSemaphore)
		      A0

	void InitSemaphore(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *);

   FUNCTION
	This function initializes a signal semaphore and prepares it for
	use.  It does not allocate anything, but does initialize list
	pointers and the semaphore counters.

	Semaphores are often used to protect critical data structures
	or hardware that can only be accessed by one task at a time.
	After initialization, the address of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 may be
	made available to any number of tasks.  Typically a task will
	try to 
                <link linkend="n258">ObtainSemaphore()</link>
                , passing this address in.  If no other
	task owns the semaphore, then the call will lock and return
	quickly.  If more tasks try to 
                <link linkend="n258">ObtainSemaphore()</link>
                , they will
	be put to sleep.  When the owner of the semaphore releases
	it, the next waiter in turn will be woken up.

	Semaphores are often preferable to the old-style 
                <link linkend="n265">Forbid()/Permit()</link>
                	type arbitration.  With 
                <link linkend="n265">Forbid()/Permit()</link>
                 *all* other tasks are
	prevented from running.  With semaphores, only those tasks that
	need access to whatever the semaphore protects are subject
	to waiting.

   INPUT
	signalSemaphore -- a signal semaphore structure (with all fields
			   set to zero before the call)

   SEE ALSO
	
                <link linkend="n258">ObtainSemaphore()</link>
                , 
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , 
                <link linkend="n209">AttemptSemaphore()</link>
                ,
	
                <link linkend="n269">ReleaseSemaphore()</link>
                , 
                <link linkend="n266">Procure()</link>
                , 
                <link linkend="n298">Vacate()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">exec/semaphores.h</ulink>
                
            </literallayout>
        </section>
        <section id="n253">
            <title>exec.library/InitStruct</title>
            <literallayout class="monospaced">
                   NAME
	InitStruct - initialize memory from a table

   SYNOPSIS
	InitStruct(initTable, memory, size);
		   A1	      A2      D0

	void InitStruct(struct InitStruct *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , ULONG);

   FUNCTION
	Clear a memory area, then set up default values according to
	the data and offset values in the initTable.  Typically only assembly
	programs take advantage of this function, and only with the macros
	defined in "exec/initializers.i".

	The initialization table has byte commands to

	     |a    ||byte|	|given||byte|	      |once	    |
	load |count||word| into |next ||rptr| offset, |repetitively |
		    |long|

	Not all combinations are supported.  The offset, when specified, is
	relative to the memory pointer provided (Memory), and is initially
	zero.  The initialization data (InitTable) contains byte commands
	whose 8 bits are interpreted as follows:

	ddssnnnn
	    dd	the destination type (and size):
		00  no offset, use next destination, nnnn is count
		01  no offset, use next destination, nnnn is repeat
		10  destination offset is in the next byte, nnnn is count
		11  destination offset is in the next 24-bits, nnnn is count
	    ss	the size and location of the source:
		00  long, from the next two aligned words
		01  word, from the next aligned word
		10  byte, from the next byte
		11  ERROR - will cause an ALERT (see below)
	  nnnn	the count or repeat:
	     count  the (number+1) of source items to copy
	    repeat  the source is copied (number+1) times.

	initTable commands are always read from the next even byte. Given
	destination offsets are always relative to the memory pointer (A2).

	The command %00000000 ends the InitTable stream: use %00010001 if you
	really want to copy one longword without a new offset.

	24 bit 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 not supported for 68020 compatibility -- use long.

   INPUTS
	initTable - the beginning of the commands and data to init
		Memory with.  Must be on an even boundary unless only
		byte initialization is done.  End table with "dc.b 0"
		or "dc.w 0".
	memory - the beginning of the memory to initialize.  Must be
		on an even boundary if size is specified.
	size - the size of memory, which is used to clear it before
		initializing it via the initTable.  If Size is zero,
		memory is not cleared before initializing.

		size must be an even number.

    SEE ALSO
	exec/initializers.i

            </literallayout>
        </section>
        <section id="n254">
            <title>exec.library/Insert</title>
            <literallayout class="monospaced">
                   NAME
	Insert -- insert a node into a list

   SYNOPSIS
	Insert(list, node, listNode)
	       A0    A1    A2

	void Insert(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *);

   FUNCTION
	Insert a node into a doubly linked list AFTER a given node
	position.  Insertion at the head of a list is possible by passing a
	zero value for listNode, though the 
                <link linkend="n190">AddHead</link>
                 function is slightly
	faster for that special case.

   WARNING
	This function does not arbitrate for access to the list.  The
	calling task must be the owner of the involved list.

   INPUTS
	list - a pointer to the target list header
	node - the node to insert
	listNode - the node after which to insert

    SEE ALSO
	
                <link linkend="n190">AddHead()</link>
                , 
                <link linkend="n198">AddTail()</link>
                , 
                <link linkend="n235">Enqueue()</link>
                , 
                <link linkend="n272">RemHead()</link>
                , 
                <link linkend="n276">Remove()</link>
                , 
                <link linkend="n280">RemTail()</link>
                
            </literallayout>
        </section>
        <section id="n255">
            <title>exec.library/MakeFunctions</title>
            <literallayout class="monospaced">
                   NAME
	MakeFunctions -- construct a function jump table

   SYNOPSIS
	tableSize = MakeFunctions(target, functionArray, funcDispBase)
	D0			  A0	  A1		 A2

	ULONG MakeFunctions(APTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                ,APTR);

   FUNCTION
	A low level function used by 
                <link linkend="n256">MakeLibrary</link>
                 to build jump tables of
	the type used by libraries, devices and resources.  It allows the
	table to be built anywhere in memory, and can be used both for
	initialization and replacement. This function also supports function
	pointer compression by expanding relative displacements into absolute
	pointers.

	The processor instruction cache is cleared after the table building.

   INPUT
	destination - the target address for the high memory end of the
		function jump table.  Typically this will be the library
		base pointer.

	functionArray - pointer to an array of function pointers or
		function displacements.  If funcDispBase is zero, the array
		is assumed to contain absolute pointers to functions. If
		funcDispBase is not zero, then the array is assumed to
		contain word displacements to functions.  In both cases,
		the array is terminated by a -1 (of the same size as the
		actual entry.

	funcDispBase - pointer to the base about which all function
		displacements are relative.  If zero, then the function
		array contains absolute pointers.

   RESULT
	tableSize - size of the new table in bytes (for LIB_NEGSIZE).

   SEE ALSO
	
                <link linkend="n256">MakeLibrary()</link>
                
            </literallayout>
        </section>
        <section id="n256">
            <title>exec.library/MakeLibrary</title>
            <literallayout class="monospaced">
                   NAME
	MakeLibrary -- construct a library

   SYNOPSIS
	library = MakeLibrary(vectors, structure, init, dSize, segList)
	D0		      A0       A1	  A2	D0     D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *MakeLibrary
			      (APTR,struct 
                <link linkend="n253">InitStruct</link>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                ,ULONG,BPTR);

   FUNCTION
	This function is used for constructing a library vector and data
	area.  The same call is used to make devices.  Space for the library
	is allocated from the system's free memory pool.  The data portion of
	the library is initialized.  init may point to a library specific
	entry point.

   NOTE
	Starting with V36, the library base is longword adjusted.  The
	lib_PosSize and lib_NegSize fields of the library structure are
	adjusted to match.

   INPUTS
	vectors - pointer to an array of function pointers or function
		displacements.	If the first word of the array is -1, then
		the array contains relative word displacements (based off
		of vectors); otherwise, the array contains absolute
		function pointers. The vector list is terminated by a -1
		(of the same size as the pointers).

	structure - points to an "InitStruct" data region.  If NULL,
		then it will not be used.

	init -	If non-NULL, an entry point that will be called before adding
		the library to the system.  Registers are as follows:
			d0 = libAddr 	;Your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 Address
			a0 = segList	;Your AmigaDOS segment list
			a6 = 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                	;Address of exec.library
		The result of the init function must be the library address,
		or NULL for failure.   If NULL, the init point must manually
		deallocate the library base memory (based on the sizes stored
		in lib_PosSize and lib_NegSize).

	dSize - the size of the library data area, including the
		standard library node data.  This must be at leas
		sizeof(struct Library).

       segList - pointer to an AmigaDOS SegList (segment list).
		 This is passed to a library's init code, and is used later
		 for removing the library from memory.

   RESULT
	library - the reference address of the library.  This is the
		  address used in references to the library, not the
		  beginning of the memory area allocated.  If the library
		  vector table require more system memory than is
		  available, this function will return NULL.

   SEE ALSO
	
                <link linkend="n253">InitStruct()</link>
                , 
                <link linkend="n251">InitResident()</link>
                , exec/initializers.i

            </literallayout>
        </section>
        <section id="n257">
            <title>exec.library/ObtainQuickVector</title>
            <literallayout class="monospaced">
                   NAME
	ObtainQuickVector -- obtain and install a Quick 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 vector (V39)

   SYNOPSIS
	vector=ObtainQuickVector(interruptCode)
	d0                       a0

	ULONG ObtainQuickVector(APTR);

   FUNCTION
	This function will install the code pointer into the quick interrupt
	vector it allocates and returns to you the interrupt vector that
	your Quick 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 system needs to use.

	This function may also return 0 if no vectors are available.  Your
	hardware should be able to then fall back to using the shared
	interrupt server chain should this happen.

	The interrupt code is a direct connect to the physical interrupt.
	This means that it is the responsibility of your code to do all
	of the context saving/restoring required by interrupt code.

	Also, due to the performance of the interrupt controller, you may
	need to also watch for "false" interrupts.  These are interrupts
	that come in just after a DISABLE.  The reason this happens is
	because the interrupt may have been posted before the DISABLE
	hardware access is completed.  For example:

	myInt:		move.l	d0,-(sp)	; Save d0...
			move.w	_intenar,d0	; Get interrupt enable state
			btst.l	#INTB_INTEN,d0	; Check if pending disable
			bne.s	realInt		; If not, do real one...
	exitInt:	move.l	(sp)+,d0	; Restore d0
			rte			; Return from int...
	;
	realInt:	; Now do your int code...  d0 is already saved
			; ALL other registers need to be saved if needed
			; This includes a0/a1/d0/d1 as this is an interrupt
			; and not a function call...
			;
			bra.s	exitInt		; 
                <link linkend="n71">Exit</link>
                 interrupt...

	If your interrupt will not play with system (OS) structures and your
	own structures are safe to play with you do not need to check for
	the disable.  It is only needed for when the system is in disable but
	that "one last interrupt" still got through.

   NOTE
	This function was not implemented fully until V39.  Due to a mis-cue
	it is not safe to call in V37 EXEC.  (Sorry)

   INPUTS
	A pointer to your interrupt code.  This code is not an EXEC interrupt
	but is dirrectly connected to the hardware interrupt.  Thus, the
	interrupt code must not modify any registers and must return via
	an RTE.

   RESULTS
	The 8-bit vector number used for Zorro-III Quick Interrupts
	If it returns 0, no quick interrupt was allocatable.  The device
	should at this point switch to using the shared interrupt server
	method.

   SEE ALSO

            </literallayout>
        </section>
        <section id="n258">
            <title>exec.library/ObtainSemaphore</title>
            <literallayout class="monospaced">
                   NAME
	ObtainSemaphore -- gain exclusive access to a semaphore

   SYNOPSIS
	ObtainSemaphore(signalSemaphore)
			A0

	void ObtainSemaphore(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *);

   FUNCTION
	
                <link linkend="n290">Signal</link>
                 semaphores are used to gain exclusive access to an object.
	ObtainSemaphore is the call used to gain this access.  If another
	user currently has the semaphore locked the call will block until
	the object is available.

	If the current task already has locked the semaphore and attempts to
	lock it again the call will still succeed.  A "nesting count" is
	incremented each time the current owning task of the semaphore calls
	ObtainSemaphore().  This counter is decremented each time
	
                <link linkend="n269">ReleaseSemaphore()</link>
                 is called.  When the counter returns to zero the
	semaphore is actually released, and the next waiting task is called.

	A queue of waiting tasks is maintained on the stacks of the waiting
	tasks.	Each will be called in turn as soon as the current task
	releases the semaphore.

	
                <link linkend="n290">Signal</link>
                 Semaphores are different than 
                <link linkend="n298">Procure()/Vacate()</link>
                 semaphores.
	The former requires less CPU time, especially if the semaphore is
	not currently locked.  They require very little set up and user
	thought.  The latter flavor of semaphore make no assumptions about
	how they are used -- they are completely general.  Unfortunately
	they are not as efficient as signal semaphores, and require the
	locker to have done some setup before doing the call.

   INPUT
       signalSemaphore -- an initialized signal semaphore structure

   NOTE
	This function preserves all registers (see BUGS).

   BUGS
	Until V37, this function could destroy A0.

   SEE ALSO
	
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , 
                <link linkend="n252">InitSemaphore()</link>
                , 
                <link linkend="n269">ReleaseSemaphore()</link>
                ,
	
                <link linkend="n209">AttemptSemaphore()</link>
                , 
                <link linkend="n259">ObtainSemaphoreList()</link>
                , 
                <link linkend="n266">Procure()</link>
                , 
                <link linkend="n298">Vacate()</link>
                
            </literallayout>
        </section>
        <section id="n259">
            <title>exec.library/ObtainSemaphoreList</title>
            <literallayout class="monospaced">
                   NAME
	ObtainSemaphoreList -- get a list of semaphores.

   SYNOPSIS
	ObtainSemaphoreList(list)
			    A0

	void ObtainSemaphoreList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *);

   FUNCTION
	
                <link linkend="n290">Signal</link>
                 semaphores may be linked together into a list. This function
	takes a list of these semaphores and attempts to lock all of them at
	once. This call is preferable to applying 
                <link linkend="n258">ObtainSemaphore()</link>
                 to each
	element in the list because it attempts to lock all the elements
	simultaneously, and won't deadlock if someone is attempting to lock
	in some other order.

	This function assumes that only one task at a time will attempt to
	lock the entire list of semaphores.  In other words, there needs to
	be a higher level lock (perhaps another signal semaphore...) that is
	used before someone attempts to lock the semaphore list via
	ObtainSemaphoreList().

	Note that deadlocks may result if this call is used AND someone
	attempts to use 
                <link linkend="n258">ObtainSemaphore()</link>
                 to lock more than one semaphore on
	the list.  If you wish to lock more than semaphore (but not all of
	them) then you should obtain the higher level lock (see above)

   INPUT
       list -- a list of signal semaphores

   SEE ALSO
	
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , 
                <link linkend="n252">InitSemaphore()</link>
                , 
                <link linkend="n269">ReleaseSemaphore()</link>
                ,
	
                <link linkend="n209">AttemptSemaphore()</link>
                , 
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , 
                <link linkend="n266">Procure()</link>
                , 
                <link linkend="n298">Vacate()</link>
                
            </literallayout>
        </section>
        <section id="n260">
            <title>exec.library/ObtainSemaphoreShared</title>
            <literallayout class="monospaced">
                    NAME
	ObtainSemaphoreShared -- gain shared access to a semaphore (V36)

    SYNOPSIS
	ObtainSemaphoreShared(signalSemaphore)
	                      a0

	void ObtainSemaphoreShared(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *);

    FUNCTION
	A lock on a signal semaphore may either be exclusive, or shared.
	Exclusive locks are granted by the 
                <link linkend="n258">ObtainSemaphore()</link>
                 and
	
                <link linkend="n209">AttemptSemaphore()</link>
                 functions.  Shared locks are granted by
	ObtainSemaphoreShared().  Calls may be nested.

	Any number of tasks may simultaneously hold a shared lock on a
	semaphore.  Only one task may hold an exclusive lock.  A typical
	application is a list that is often read, but only occasionally
	written to.

	Any exlusive locker will be held off until all shared lockers
	release the semaphore.  Likewise, if an exlusive lock is held,
	all potential shared lockers will block until the exclusive lock
	is released.  All shared lockers are restarted at the same time.

    EXAMPLE
		ObtainSemaphoreShared(ss);
		/* read data */
		ReleaseSemaohore(ss);

		ObtainSemaphore(ss);
		/* modify data */
		ReleaseSemaohore(ss);

    NOTES
	While this function was added for V36, the feature magically works
	with all older semaphore structures.

	A task owning a shared lock must not attempt to get an exclusive
	lock on the same semaphore.

	Starting in V39, if the caller already has an exclusive lock on the
	semaphore it will return with another nesting of the lock.  Pre-V39
	this would cause a deadlock.  For pre-V39 use, you can use the
	following workaround:

		/* Try to get the shared semaphore */
		if (!AttemptSemaphoreShared(ss))
		{
			/* Check if we can get the exclusive version */
			if (!AttemptSemaphore(ss))
			{
				/* Oh well, wait for the shared lock */
				ObtainSemaphoreShared(ss));
			}
		}
		:
		:
		ReleaseSemaphore(ss);

    INPUT
	signalSemaphore -- an initialized signal semaphore structure

    NOTE
	This call is guaranteed to preserve all registers, starting with
	V37 exec.

    RESULT

    SEE ALSO
	
                <link linkend="n258">ObtainSemaphore()</link>
                , 
                <link linkend="n252">InitSemaphore()</link>
                , 
                <link linkend="n269">ReleaseSemaphore()</link>
                ,
	
                <link linkend="n209">AttemptSemaphore()</link>
                , 
                <link linkend="n259">ObtainSemaphoreList()</link>
                , 
                <link linkend="n266">Procure()</link>
                , 
                <link linkend="n298">Vacate()</link>
                
            </literallayout>
        </section>
        <section id="n261">
            <title>exec.library/OldOpenLibrary</title>
            <literallayout class="monospaced">
                   NAME
	OldOpenLibrary -- obsolete 
                <link linkend="n263">OpenLibrary</link>
                   SYNOPSIS
	library = OldOpenLibrary(libName)
	D0			 A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *OldOpenLibrary(APTR);

   FUNCTION
	The 1.0 release of the Amiga system had an incorrect version of
	
                <link linkend="n263">OpenLibrary</link>
                 that did not check the version number during the
	library open.  This obsolete function is provided so that object
	code compiled using a 1.0 system will still run.

	This exactly the same as "OpenLibrary(libName,0L);"

   INPUTS
	libName - the name of the library to open

   RESULTS
	library - a library pointer for a successful open, else zero

   SEE ALSO
	
                <link linkend="n220">CloseLibrary()</link>
                
            </literallayout>
        </section>
        <section id="n262">
            <title>exec.library/OpenDevice</title>
            <literallayout class="monospaced">
                   NAME
	OpenDevice -- gain access to a device

   SYNOPSIS
	error = OpenDevice(devName, unitNumber, iORequest, flags)
	D0		   A0	    D0		A1	   D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 OpenDevice(STRPTR,ULONG,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *,ULONG);

   FUNCTION
	This function opens the named device/unit and initializes the given
	I/O request block.  Specific documentation on opening procedures
	may come with certain devices.

	The device may exist in memory, or on disk; this is transparent to
	the OpenDevice caller.

	A full path name for the device name is legitimate.  For example
	"test:devs/fred.device".  This allows the use of custom devices
	without requiring the user to copy the device into the system's
	DEVS: directory.

   NOTES
	All calls to OpenDevice should have matching calls to CloseDevice!

	Devices on disk cannot be opened until after DOS has been
	started.

	As of V36 tasks can safely call OpenDevice, though DOS may open
	system requesters (e.g., asking the user to insert the Workbench
	disk if DEVS: is not online).  You must call this function from a
	DOS 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 if you want to turn off DOS requesters.

   INPUTS
	devName - requested device name

	unitNumber - the unit number to open on that device.  The format of
		the unit number is device specific.  If the device does
		not have separate units, send a zero.

	iORequest - the I/O request block to be returned with
		appropriate fields initialized.

	flags - additional driver specific information.  This is sometimes
		used to request opening a device with exclusive access.

   RESULTS
	error - Returns a sign-extended copy of the io_Error field
		of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                .  Zero if successful, else an error code
		is returned.

   BUGS
	AmigaDOS file names are not case sensitive, but Exec lists are.  If
	the library name is specified in a different case than it exists on
	disk, unexpected results may occur.

	Prior to V36, tasks could not make OpenDevice calls requiring disk
	access (since tasks are not allowed to make dos.library calls).
	Now OpenDevice is protected from tasks.

   SEE ALSO
	
                <link linkend="n219">CloseDevice()</link>
                , 
                <link linkend="n233">DoIO()</link>
                , 
                <link linkend="n283">SendIO()</link>
                , 
                <link linkend="n218">CheckIO()</link>
                , 
                <link linkend="n188">AbortIO()</link>
                , 
                <link linkend="n300">WaitIO()</link>
                
            </literallayout>
        </section>
        <section id="n263">
            <title>exec.library/OpenLibrary</title>
            <literallayout class="monospaced">
                   NAME
	OpenLibrary -- gain access to a library

   SYNOPSIS
	library = OpenLibrary(libName, version)
	D0		      A1       D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *OpenLibrary(STRPTR, ULONG);

   FUNCTION
	This function returns a pointer to a library that was previously
	installed into the system.  If the requested library is exists, and
	if the library version is greater than or equal to the requested
	version, then the open will succeed.

	The library may exist in memory, or on disk; this is transparent to
	the OpenLibrary caller.  Only Processes are allowed to call
	OpenLibrary (since OpenLibrary may in turn call dos.library).

	A full path name for the library name is legitimate.  For example
	"wp:libs/wp.library".  This allows the use of custom libraries
	without requiring the user to copy the library into the system's
	LIBS: directory.

   NOTES
	All calls to OpenLibrary should have matching calls to CloseLibrary!

	Libraries on disk cannot be opened until after DOS has been
	started.

	As of V36 tasks can safely call OpenLibrary, though DOS may open
	system requesters (e.g., asking the user to insert the Workbench
	disk if LIBS: is not online).  You must call this function from a
	DOS 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 if you want to turn off DOS requesters.

   INPUTS
	libName - the name of the library to open

	version - the version of the library required.

   RESULTS
	library - a library pointer for a successful open, else zero

   BUGS
	AmigaDOS file names are not case sensitive, but Exec lists are. If
	the library name is specified in a different case than it exists on
	disk, unexpected results may occur.

	Prior to V36, tasks could not make OpenLibrary calls requiring disk
	access (since tasks are not allowed to make dos.library calls).
	Now OpenLibrary is protected from tasks.

	The version number of the resident tag in disk based library must
	match the version number of the library, or V36 may fail to load it.

   SEE ALSO
	
                <link linkend="n220">CloseLibrary()</link>
                
            </literallayout>
        </section>
        <section id="n264">
            <title>exec.library/OpenResource</title>
            <literallayout class="monospaced">
                   NAME
	OpenResource -- gain access to a resource

   SYNOPSIS
	resource = OpenResource(resName)
	D0			A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 OpenResource(STRPTR);

   FUNCTION
	This function returns a pointer to a resource that was previously
	installed into the system.

	There is no CloseResource() function.

   INPUTS
       resName - the name of the resource requested.

   RESULTS
	resource - if successful, a resource pointer, else NULL

            </literallayout>
        </section>
        <section id="n265">
            <title>exec.library/Permit</title>
            <literallayout class="monospaced">
                    NAME
	Permit -- permit task rescheduling.

    SYNOPSIS
	Permit()

	void Permit(void);

    FUNCTION
	Allow other tasks to be scheduled to run by the dispatcher, after a
	matching 
                <link linkend="n241">Forbid()</link>
                 has been executed.

    RESULTS
	Other tasks will be rescheduled as they are ready to run. In order
	to restore normal task rescheduling, the programmer must execute
	exactly one call to Permit() for every call to 
                <link linkend="n241">Forbid()</link>
                .

    NOTE
	This call is guaranteed to preserve all registers.

    SEE ALSO
	
                <link linkend="n241">Forbid()</link>
                , 
                <link linkend="n232">Disable()</link>
                , 
                <link linkend="n234">Enable()</link>
                
            </literallayout>
        </section>
        <section id="n266">
            <title>exec.library/Procure</title>
            <literallayout class="monospaced">
                   NAME
	Procure -- bid for a semaphore                                   (V39)

   SYNOPSIS
	Procure(semaphore, bidMessage)
		A0	    A1

	VOID Procure(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SemaphoreMessage</ulink>
                 *);

   FUNCTION
	This function is used to obtain a semaphore in an async manner.
	Like 
                <link linkend="n258">ObtainSemaphore()</link>
                , it will obtain a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 for you
	but unlike 
                <link linkend="n258">ObtainSemaphore()</link>
                , you will not block until you get
	the semaphore.  Procure() will just post a request for the semaphore
	and will return.  When the semaphore is available (which could
	be at any time) the bidMessage will 
                <link linkend="n282">ReplyMsg()</link>
                 and you will own
	the semaphore.  This lets you wait on multiple semaphores at once
	and to continue processing while waiting for the semaphore.

	NOTE:  Pre-V39, Procure() and 
                <link linkend="n298">Vacate()</link>
                 did not work correctly.
	They also did not operate on 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 semaphores.
	Old (and broken) MessageSemaphore use as of V39 will no longer work.

   INPUT
	semaphore - The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 that you wish to Procure()
	bidMessage- The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SemaphoreMessage</ulink>
                 that you wish replied when
		you obtain access to the semaphore.  The message's
		ssm_Semaphore field will point at the semaphore that
		was obtained.  If the ssm_Semaphore field is NULL,
		the Procure() was aborted via 
                <link linkend="n298">Vacate()</link>
                .
		The mn_ReplyPort field of the message must point to
		a valid message port.
		To obtain a shared semaphore, the ln_Name field
		must be set to 1.  For an exclusive lock, the ln_Name
		field must be 0.  No other values are valid.

   BUGS
	Before V39, Procure() and 
                <link linkend="n298">Vacate()</link>
                 used a different semaphore
	system that was very broken.  This new system is only available
	as of V39 even though the LVOs are the same.

   SEE ALSO
	
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , 
                <link linkend="n252">InitSemaphore()</link>
                , 
                <link linkend="n269">ReleaseSemaphore()</link>
                ,
	
                <link linkend="n209">AttemptSemaphore()</link>
                , 
                <link linkend="n259">ObtainSemaphoreList()</link>
                , 
                <link linkend="n298">Vacate()</link>
                , 
                <link linkend="n258">ObtainSemaphore()</link>
                
            </literallayout>
        </section>
        <section id="n267">
            <title>exec.library/PutMsg</title>
            <literallayout class="monospaced">
                   NAME
	PutMsg -- put a message to a message port

   SYNOPSIS
	PutMsg(port, message)
	       A0    A1

	void PutMsg(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 *);

   FUNCTION
	This function attaches a message to the end of a given message port.
	It provides a fast, non-copying message sending mechanism.

	Messages can be attached to only one port at a time.  The message
	body can be of any size or form.  Because messages are not copied,
	cooperating tasks share the same message memory.  The sender task
	must not recycle the message until it has been replied by the
	receiver.  Of course this depends on the message handling conventions
	setup by the involved tasks.  If the ReplyPort field is non-zero,
	when the message is replied by the receiver, it will be sent back to
	that port.

	Any one of the following actions can be set to occur when a message
	is put:

		1. no special action
		2. signal a given task (specified by MP_SIGTASK)
		3. cause a software interrupt (specified by MP_SIGTASK)

	The action is selected depending on the value found in the MP_FLAGS
	of the destination port.

   IMPLEMENTATION
	1.  Sets the LN_TYPE field to "NT_MESSAGE".
	2.  Attaches the message to the destination port.
	3.  Performs the specified arrival action at the destination.

   INPUT
	port - pointer to a message port
	message - pointer to a message

   SEE ALSO
	
                <link linkend="n249">GetMsg()</link>
                , 
                <link linkend="n282">ReplyMsg()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">exec/ports.h</ulink>
                
            </literallayout>
        </section>
        <section id="n268">
            <title>exec.library/RawDoFmt</title>
            <literallayout class="monospaced">
                   NAME
	RawDoFmt -- format data into a character stream.

   SYNOPSIS
	NextData = RawDoFmt(FormatString, DataStream, PutChProc, PutChData);
       d0                  a0            a1          a2         a3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 RawDoFmt(STRPTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                ,void (*)(),APTR);

   FUNCTION
	perform "C"-language-like formatting of a data stream, outputting
	the result a character at a time.  Where % formatting commands are
	found in the 
                <link linkend="n570">FormatString</link>
                , they will be replaced with the
	corresponding element in the DataStream.  %% must be used in the
	string if a % is desired in the output.

	Under V36, RawDoFmt() returns a pointer to the end of the DataStream
	(The next argument that would have been processed).  This allows
	multiple formatting passes to be made using the same data.

   INPUTS
	
                <link linkend="n570">FormatString</link>
                 - a "C"-language-like NULL terminated format string,
	with the following supported % options:

	 %[flags][width.limit][length]type

	flags  - only one allowed. '-' specifies left justification.
	width  - field width.  If the first character is a '0', the
		 field will be padded with leading 0's.
	  .    - must follow the field width, if specified
	limit  - maximum number of characters to output from a string.
		 (only valid for %s).
	length - size of input data defaults to WORD for types d, x,
		 and c, 'l' changes this to long (32-bit).
	type   - supported types are:
			b - BSTR, data is 32-bit 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 to byte count followed
			    by a byte string, or NULL terminated byte string.
			    A NULL 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 is treated as an empty string.
			    (Added in V36 exec)
			d - decimal
			u - unsigned decimal (Added in V37 exec)
			x - hexadecimal
			s - string, a 32-bit pointer to a NULL terminated
			    byte string.  In V36, a NULL pointer is treated
			    as an empty string
			c - character

	DataStream - a stream of data that is interpreted according to
		 the format string.  Often this is a pointer into
		 the task's stack.
	PutChProc  - the procedure to call with each character to be
		 output, called as:

	PutChProc(Char,  PutChData);
		  D0-0:8 A3

		the procedure is called with a NULL Char at the end of
		the format string.

	PutChData - a value that is passed through to the PutChProc
		procedure.  This is untouched by RawDoFmt, and may be
		modified by the PutChProc.

   EXAMPLE
	;
	; Simple version of the C "sprintf" function.  Assumes C-style
	; stack-based function conventions.
	;
	;   long eyecount;
	;   eyecount=2;
	;   sprintf(string,"%s have %ld eyes.","Fish",eyecount);
	;
	; would produce "Fish have 2 eyes." in the string buffer.
	;
		XDEF _sprintf
		XREF _AbsExecBase
		XREF _LVORawDoFmt
	_sprintf:	; ( ostring, format, {values} )
		movem.l a2/a3/a6,-(sp)

		move.l	4*4(sp),a3       ;Get the output string pointer
		move.l	5*4(sp),a0       ;Get the 
                <link linkend="n570">FormatString</link>
                 pointer
		lea.l	6*4(sp),a1       ;Get the pointer to the DataStream
		lea.l	stuffChar(pc),a2
		move.l	_AbsExecBase,a6
		jsr	_LVORawDoFmt(a6)

		movem.l (sp)+,a2/a3/a6
		rts

	;------ PutChProc function used by RawDoFmt -----------
	stuffChar:
		move.b	d0,(a3)+        ;Put data to output string
		rts

   WARNING
	This Amiga ROM function formats word values in the data stream.  If
	your compiler defaults to longs, you must add an "l" to your
	% specifications.  This can get strange for characters, which might
	look like "%lc".

	The result of RawDoFmt() is *ONLY* valid in V36 and later releases
	of EXEC.  Pre-V36 versions of EXEC have "random" return values.

   SEE ALSO
	Documentation on the C language "printf" call in any C language
	reference book.

            </literallayout>
        </section>
        <section id="n269">
            <title>exec.library/ReleaseSemaphore</title>
            <literallayout class="monospaced">
                   NAME
	ReleaseSemaphore -- make signal semaphore available to others

   SYNOPSIS
	ReleaseSemaphore(signalSemaphore)
			 A0

	void ReleaseSemaphore(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *);

   FUNCTION
	ReleaseSemaphore() is the inverse of 
                <link linkend="n258">ObtainSemaphore()</link>
                . It makes
	the semaphore lockable to other users.	If tasks are waiting for
	the semaphore and this this task is done with the semaphore then
	the next waiting task is signalled.

	Each 
                <link linkend="n258">ObtainSemaphore()</link>
                 call must be balanced by exactly one
	ReleaseSemaphore() call.  This is because there is a nesting count
	maintained in the semaphore of the number of times that the current
	task has locked the semaphore. The semaphore is not released to
	other tasks until the number of releases matches the number of
	obtains.

	Needless to say, havoc breaks out if the task releases more times
	than it has obtained.

   INPUT
       signalSemaphore -- an initialized signal semaphore structure

   NOTE
	This call is guaranteed to preserve all registers.

   SEE ALSO
	
                <link linkend="n252">InitSemaphore()</link>
                , 
                <link linkend="n258">ObtainSemaphore()</link>
                , 
                <link linkend="n260">ObtainSemaphoreShared()</link>
                
            </literallayout>
        </section>
        <section id="n270">
            <title>exec.library/ReleaseSemaphoreList</title>
            <literallayout class="monospaced">
                   NAME
	ReleaseSemaphoreList -- make a list of semaphores available

   SYNOPSIS
	ReleaseSemaphoreList(list)
			     A0

	void ReleaseSemaphoreList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *);

   FUNCTION
	ReleaseSemaphoreList() is the inverse of 
                <link linkend="n259">ObtainSemaphoreList()</link>
                . It
	releases each element in the semaphore list.

	Needless to say, havoc breaks out if the task releases more times
	than it has obtained.

   INPUT
       list -- a list of signal semaphores

   SEE ALSO
	
                <link linkend="n259">ObtainSemaphoreList()</link>
                
            </literallayout>
        </section>
        <section id="n271">
            <title>exec.library/RemDevice</title>
            <literallayout class="monospaced">
                   NAME
	RemDevice -- remove a device from the system

   SYNOPSIS
	RemDevice(device)
	          A1

	void RemDevice(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 *);

   FUNCTION
	This function calls the device's EXPUNGE vector, which requests
	that a device delete itself.  The device may refuse to do this if
	it is busy or currently open. This is not typically called by user
	code.

	There are certain, limited circumstances where it may be
	appropriate to attempt to specifically flush a certain device.
	Example:

	 /* Attempts to flush the named device out of memory. */
	 #include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">&lt;exec/types.h&gt;</ulink>
                	 #include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">&lt;exec/execbase.h&gt;</ulink>
                	 void FlushDevice(name)
	 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 name;
	 {
	 struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 *result;

	    Forbid();
	    if(result=(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 *)FindName(&amp;SysBase-&gt;DeviceList,name))
		RemDevice(result);
	    Permit();
	 }

   INPUTS
	device - pointer to a device node

   SEE ALSO
	
                <link linkend="n192">AddLibrary()</link>
                
            </literallayout>
        </section>
        <section id="n272">
            <title>exec.library/RemHead</title>
            <literallayout class="monospaced">
                   NAME
	RemHead -- remove the head node from a list

   SYNOPSIS
	node = RemHead(list)
	D0	       A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *RemHead(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *);

   FUNCTION
	Get a pointer to the head node and remove it from the list.
	Assembly programmers may prefer to use the REMHEAD macro from
	"exec/lists.i".

   WARNING
	This function does not arbitrate for access to the list.  The
	calling task must be the owner of the involved list.

   INPUTS
	list - a pointer to the target list header

   RESULT
	node - the node removed or zero when empty list

   SEE ALSO
	
                <link linkend="n190">AddHead()</link>
                , 
                <link linkend="n198">AddTail()</link>
                , 
                <link linkend="n235">Enqueue()</link>
                , 
                <link linkend="n254">Insert()</link>
                , 
                <link linkend="n276">Remove()</link>
                , 
                <link linkend="n280">RemTail()</link>
                
            </literallayout>
        </section>
        <section id="n273">
            <title>exec.library/RemIntServer</title>
            <literallayout class="monospaced">
                   NAME
	RemIntServer -- remove an interrupt server from a server chain

   SYNOPSIS
	RemIntServer(intNum, interrupt)
		     D0      A1

	void RemIntServer(ULONG,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 *);

   FUNCTION
	This function removes an interrupt server node from the given
	server chain.

	If this server was the last one on this chain, interrupts for this
	chain are disabled.

   INPUTS
	intNum - the Paula interrupt bit (0..14)
	interrupt - pointer to an interrupt server node

   BUGS
	Before V36 Kickstart, the feature that disables the interrupt
	would not function.  For most server chains this does not
	cause a problem.

   SEE ALSO
	
                <link linkend="n191">AddIntServer()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/intbits.h">hardware/intbits.h</ulink>
                
            </literallayout>
        </section>
        <section id="n274">
            <title>exec.library/RemLibrary</title>
            <literallayout class="monospaced">
                   NAME
	RemLibrary -- remove a library from the system

   SYNOPSIS
	RemLibrary(library)
	           A1

	void RemLibrary(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *);

   FUNCTION
	This function calls the library's EXPUNGE vector, which requests
	that a library delete itself.  The library may refuse to do this if
	it is busy or currently open. This is not typically called by user
	code.

	There are certain, limited circumstances where it may be
	appropriate to attempt to specifically flush a certain 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                .
	Example:

	 /* Attempts to flush the named library out of memory. */
	 #include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">&lt;exec/types.h&gt;</ulink>
                	 #include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">&lt;exec/execbase.h&gt;</ulink>
                	 void FlushLibrary(name)
	 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 name;
	 {
	 struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *result;

	    Forbid();
	    if(result=(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *)FindName(&amp;SysBase-&gt;LibList,name))
		RemLibrary(result);
	    Permit();
	 }

   INPUTS
	library - pointer to a library node structure

            </literallayout>
        </section>
        <section id="n275">
            <title>exec.library/RemMemHandler</title>
            <literallayout class="monospaced">
                   NAME
	RemMemHandler - 
                <link linkend="n276">Remove</link>
                 low memory handler from exec              (V39)

   SYNOPSIS
	RemMemHandler(memHandler)
	              A1

	VOID RemMemHandler(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 *);

   FUNCTION
	This function removes the low memory handler from the system.
	This function can be called from within a handler.  If removing
	oneself, it is important that the handler returns MEM_ALL_DONE.

   NOTE
	When removing a handler, the handler may be called until this
	function returns.  Thus, the handler must still be valid until
	then.

   INPUTS
	memHandler - Pointer to a handler added with 
                <link linkend="n193">AddMemHandler()</link>
                   SEE ALSO
	
                <link linkend="n193">AddMemHandler()</link>
                , exec/interrupts.i

            </literallayout>
        </section>
        <section id="n276">
            <title>exec.library/Remove</title>
            <literallayout class="monospaced">
                   NAME
	Remove -- remove a node from a list

   SYNOPSIS
	Remove(node)
	       A1

	void Remove(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *);

   FUNCTION
	Unlink a node from whatever list it is in.  Nodes that are not part
	of a list must not be passed to this function!  Assembly programmers
	may prefer to use the REMOVE macro from "exec/lists.i".

   WARNING
	This function does not arbitrate for access to the list.  The
	calling task must be the owner of the involved list.

   INPUTS
	node - the node to remove

   SEE ALSO
	
                <link linkend="n190">AddHead()</link>
                , 
                <link linkend="n198">AddTail()</link>
                , 
                <link linkend="n235">Enqueue()</link>
                , 
                <link linkend="n254">Insert()</link>
                , 
                <link linkend="n272">RemHead()</link>
                , 
                <link linkend="n280">RemTail()</link>
                
            </literallayout>
        </section>
        <section id="n277">
            <title>exec.library/RemPort</title>
            <literallayout class="monospaced">
                   NAME
	RemPort -- remove a message port from the system

   SYNOPSIS
	RemPort(port)
		A1

	void RemPort(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *);

   FUNCTION
	This function removes a message port structure from the system's
	message port list.  Subsequent attempts to rendezvous by name with
	this port will fail.

   INPUTS
	port - pointer to a message port

   SEE ALSO
	
                <link linkend="n195">AddPort()</link>
                , 
                <link linkend="n237">FindPort()</link>
                
            </literallayout>
        </section>
        <section id="n278">
            <title>exec.library/RemResource</title>
            <literallayout class="monospaced">
                   NAME
	RemResource -- remove a resource from the system

   SYNOPSIS
	RemResource(resource)
		   A1

	void RemResource(APTR);

   FUNCTION
	This function removes an existing resource from the system resource
	list.  There must be no outstanding users of the resource.

   INPUTS
	resource - pointer to a resource node

   SEE ALSO
	
                <link linkend="n196">AddResource()</link>
                
            </literallayout>
        </section>
        <section id="n279">
            <title>exec.library/RemSemaphore</title>
            <literallayout class="monospaced">
                   NAME
	RemSemaphore -- remove a signal semaphore from the system

   SYNOPSIS
	RemSemaphore(signalSemaphore)
		     A1

	void RemSemaphore(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *);

   FUNCTION
	This function removes a signal semaphore structure from the
	system's signal semaphore list.  Subsequent attempts to
	rendezvous by name with this semaphore will fail.

   INPUTS
       signalSemaphore -- an initialized signal semaphore structure

   SEE ALSO
	
                <link linkend="n197">AddSemaphore()</link>
                , 
                <link linkend="n239">FindSemaphore()</link>
                
            </literallayout>
        </section>
        <section id="n280">
            <title>exec.library/RemTail</title>
            <literallayout class="monospaced">
                   NAME
	RemTail -- remove the tail node from a list

   SYNOPSIS
	node = RemTail(list)
	D0	       A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *RemTail(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *);

   FUNCTION
	
                <link linkend="n276">Remove</link>
                 the last node from a list, and return a pointer to it. If
	the list is empty, return zero. Assembly programmers may prefer to
	use the REMTAIL macro from "exec/lists.i".

   WARNING
	This function does not arbitrate for access to the list.  The
	calling task must be the owner of the involved list.

   INPUTS
	list - a pointer to the target list header

   RESULT
	node - the node removed or zero when empty list

   SEE ALSO
	
                <link linkend="n190">AddHead()</link>
                , 
                <link linkend="n198">AddTail()</link>
                , 
                <link linkend="n235">Enqueue()</link>
                , 
                <link linkend="n254">Insert()</link>
                , 
                <link linkend="n276">Remove()</link>
                , 
                <link linkend="n272">RemHead()</link>
                
            </literallayout>
        </section>
        <section id="n281">
            <title>exec.library/RemTask</title>
            <literallayout class="monospaced">
                   NAME
	RemTask -- remove a task from the system

   SYNOPSIS
	RemTask(task)
		A1

	void RemTask(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 *);

   FUNCTION
	This function removes a task from the system.  Deallocation of
	resources should have been performed prior to calling this
	function.  Removing some other task is very dangerous.	Generally
	is is best to arrange for tasks to call RemTask(0L) on themselves.

	RemTask will automagically free any memory lists attached to the
	task's TC_MEMENTRY list.

   INPUTS
	task - pointer to the task node representing the task to be
	       removed.  A zero value indicates self removal, and will
	       cause the next ready task to begin execution.

   BUGS
	Before V36 if RemTask() was called on a task other than the current
	task, and that task was created with 
                <link linkend="n499">amiga.lib/CreateTask</link>
                , there was
	a slight chance of a crash.  The problem can be hidden by bracketing
	RemTask() with 
                <link linkend="n265">Forbid()/Permit()</link>
                .

   SEE ALSO
	
                <link linkend="n199">AddTask()</link>
                , 
                <link linkend="n203">AllocEntry()</link>
                , 
                <link linkend="n510">amiga.lib/DeleteTask()</link>
                
            </literallayout>
        </section>
        <section id="n282">
            <title>exec.library/ReplyMsg</title>
            <literallayout class="monospaced">
                   NAME
	ReplyMsg -- put a message to its reply port

   SYNOPSIS
	ReplyMsg(message)
		 A1

	void ReplyMsg(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 *);

   FUNCTION
	This function sends a message to its reply port.  This is usually
	done when the receiver of a message has finished and wants to
	return it to the sender (so that it can be re-used or deallocated,
	whatever).

	This call may be made from interrupts.

   INPUT
	message - a pointer to the message

   IMPLEMENTATION
	1&gt; Places "NT_REPLYMSG" into LN_TYPE.
	2&gt; Puts the message to the port specified by MN_REPLYPORT
	   If there is no replyport, sets LN_TYPE to "NT_FREEMSG" (use this
	   feature only with extreme care).

   SEE ALSO
	
                <link linkend="n249">GetMsg()</link>
                , 
                <link linkend="n267">PutMsg()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">exec/ports.h</ulink>
                
            </literallayout>
        </section>
        <section id="n283">
            <title>exec.library/SendIO</title>
            <literallayout class="monospaced">
                   NAME
	SendIO -- initiate an I/O command

   SYNOPSIS
	SendIO(iORequest)
	       A1

	void SendIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	This function requests the device driver start processing the given
	I/O request.  The device will return control without waiting for
	the I/O to complete.

	The io_Flags field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 will be set to zero before the
	request is sent.  See 
                <link linkend="n548">BeginIO()</link>
                 for more details.

   INPUTS
	iORequest - pointer to an I/O request, or a device specific
		    extended 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                .

   SEE ALSO
	
                <link linkend="n233">DoIO()</link>
                , 
                <link linkend="n218">CheckIO()</link>
                , 
                <link linkend="n300">WaitIO()</link>
                , 
                <link linkend="n188">AbortIO()</link>
                
            </literallayout>
        </section>
        <section id="n284">
            <title>exec.library/SetExcept</title>
            <literallayout class="monospaced">
                   NAME
	SetExcept -- define certain signals to cause exceptions

   SYNOPSIS
	oldSignals = SetExcept(newSignals, signalMask)
	D0		       D0	   D1

	ULONG SetExcept(ULONG,ULONG);

   FUNCTION
	This function defines which of the task's signals will cause a
	private task exception.  When any of the signals occurs the task's
	exception handler will be dispatched.  If the signal occurred prior
	to calling SetExcept, the exception will happen immediately.

	The user function pointed to by the task's tc_ExceptCode gets
	called as:

	    newExcptSet = &lt;exceptCode&gt;(signals, exceptData),SysBase
	    D0			       D0	A1	    A6

	    signals - The set of signals that caused this exception.  These
		Signals have been disabled from the current set of signals
		that can cause an exception.

	    exceptData - A copy of the task structure tc_ExceptData field.

	    newExcptSet - The set of signals in NewExceptSet will be re-
		enabled for exception generation.  Usually this will be the
		same as the Signals that caused the exception.

   INPUTS
	newSignals - the new values for the signals specified in
		signalMask.
	signalMask - the set of signals to be effected

   RESULTS
	oldSignals - the prior exception signals

   EXAMPLE
	Get the current state of all exception signals:
	    SetExcept(0,0)
	Change a few exception signals:
	    SetExcept($1374,$1074)

   SEE ALSO
	
                <link linkend="n290">Signal()</link>
                , 
                <link linkend="n287">SetSignal()</link>
                
            </literallayout>
        </section>
        <section id="n285">
            <title>exec.library/SetFunction</title>
            <literallayout class="monospaced">
                   NAME
	SetFunction -- change a function vector in a library

   SYNOPSIS
	oldFunc = SetFunction(library, funcOffset, funcEntry)
	D0		      A1       A0.W	   D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 SetFunction(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,APTR);

   FUNCTION
	SetFunction is a functional way of changing where vectors in a
	library point.	They are changed in such a way that the
	checksumming process will never falsely declare a library to be
	invalid.

   WARNING
	If you use SetFunction on a function that can be called from
	interrupts, you are obligated to provide your own arbitration.

   NOTE
	SetFunction cannot be used on non-standard libraries like pre-V36
	dos.library.  Here you must manually 
                <link linkend="n241">Forbid()</link>
                , preserve all 6
	original bytes, set the new vector, 
                <link linkend="n293">SumLibrary()</link>
                , then 
                <link linkend="n265">Permit()</link>
                .

   INPUTS
	library    - a pointer to the library to be changed
	funcOffset - the offset of the function to be replaced
	funcEntry  - pointer to new function

   RESULTS
	oldFunc    - pointer to the old function that was just replaced

            </literallayout>
        </section>
        <section id="n286">
            <title>exec.library/SetIntVector</title>
            <literallayout class="monospaced">
                   NAME
	SetIntVector -- set a new handler for a system interrupt vector

   SYNOPSIS
	oldInterrupt = SetIntVector(intNumber, interrupt)
	D0			    D0         A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 *SetIntVector(ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 *);

   FUNCTION
	This function provides a mechanism for setting the system interrupt
	vectors.  These are non-sharable; setting a new interrupt handler
	disconnects the old one.  Installed handlers are responsible for
	processing, enabling and clearing the interrupt.  Note that interrupts
	may have been left in any state by the previous code.

	The IS_CODE and IS_DATA pointers of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 structure will
	be copied into a private place by Exec.  A pointer to the previously
	installed 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 structure is returned.

	When the system calls the specified interrupt code, the registers are
	setup as follows:

	    D0 - scratch
	    D1 - scratch (on entry: active
			  interrupts -&gt; equals INTENA &amp; INTREQ)

	    A0 - scratch (on entry: pointer to base of custom chips
			  for fast indexing)
	    A1 - scratch (on entry: Interrupt's IS_DATA pointer)

	    A5 - jump vector register (scratch on call)
	    A6 - Exec library base pointer (scratch on call)

	    all other registers must be preserved

   INPUTS
	intNum - the Paula interrupt bit number (0..14).  Only non-chained
		 interrupts should be set.  Use 
                <link linkend="n191">AddIntServer()</link>
                 for server
		 chains.
	interrupt - a pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/interrupts.h">Interrupt</ulink>
                 structure containing the
		 handler's entry point and data segment pointer.  A NULL
		 interrupt pointer will remove the current interrupt and
		 set illegal values for IS_CODE and IS_DATA.

		 By convention, the LN_NAME of the interrupt structure must
		 point a descriptive string so that other users may
		 identify who currently has control of the interrupt.

   RESULT
	A pointer to the prior interrupt structure which had control
	of this interrupt.

   SEE ALSO
	
                <link linkend="n191">AddIntServer()</link>
                ,exec/interrupts.i,hardware/intbits.i

            </literallayout>
        </section>
        <section id="n287">
            <title>exec.library/SetSignal</title>
            <literallayout class="monospaced">
                   NAME
	SetSignal -- define the state of this task's signals

   SYNOPSIS
	oldSignals = SetSignal(newSignals, signalMask)
	D0		       D0	   D1

	ULONG SetSignal(ULONG,ULONG);

   FUNCTION
	This function can query or modify the state of the current task's
	received signal mask.  Setting the state of signals is considered
	dangerous.  Reading the state of signals is safe.

   INPUTS
	newSignals - the new values for the signals specified in
		     signalSet.
	signalMask - the set of signals to be affected.

   RESULTS
	oldSignals - the prior values for all signals

   EXAMPLES
	Get the current state of all signals:
	    SetSignal(0L,0L);
	Clear the CTRL-C signal:
	    SetSignal(0L,SIGBREAKF_CTRL_C);


	Check if the CTRL-C signal was pressed:

	    #include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/dos.h">&lt;libraries/dos.h&gt;</ulink>
                	    /* Check &amp; clear CTRL_C signal */
	    if(SetSignal(0L,SIGBREAKF_CTRL_C) &amp; SIGBREAKF_CTRL_C)
		{
		printf("CTRL-C pressed!\n");
		}

   SEE ALSO
	
                <link linkend="n290">Signal()</link>
                , 
                <link linkend="n299">Wait()</link>
                
            </literallayout>
        </section>
        <section id="n288">
            <title>exec.library/SetSR</title>
            <literallayout class="monospaced">   NAME
	SetSR -- get and/or set processor status register

   SYNOPSIS
	oldSR = SetSR(newSR, mask)
	D0	      D0     D1

	ULONG SetSR(ULONG, ULONG);

   FUNCTION
	This function provides a means of modifying the CPU status register
	in a "safe" way (well, how safe can a function like this be
	anyway?).  This function will only affect the status register bits
	specified in the mask parameter.  The prior content of the entire
	status register is returned.

   INPUTS
	newSR - new values for bits specified in the mask.
	    All other bits are not effected.
	mask - bits to be changed

   RESULTS
	oldSR - the entire status register before new bits

   EXAMPLES
	To get the current SR:
	    currentSR = SetSR(0,0);
	To change the processor interrupt level to 3:
	    oldSR = SetSR($0300,$0700);
	Set processor interrupts back to prior level:
	    SetSR(oldSR,$0700);
</literallayout>
        </section>
        <section id="n289">
            <title>exec.library/SetTaskPri</title>
            <literallayout class="monospaced">
                   NAME
	SetTaskPri -- get and set the priority of a task

   SYNOPSIS
	oldPriority = SetTaskPri(task, priority)
	D0-0:8			 A1    D0-0:8

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 SetTaskPri(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 *,LONG);

   FUNCTION
	This function changes the priority of a task regardless of its
	state.	The old priority of the task is returned.  A reschedule is
	performed, and a context switch may result.

	To change the priority of the currently running task, pass the
	result of FindTask(0); as the task pointer.

   INPUTS
	task - task to be affected
	priority - the new priority for the task

   RESULT
	oldPriority - the tasks previous priority

            </literallayout>
        </section>
        <section id="n290">
            <title>exec.library/Signal</title>
            <literallayout class="monospaced">
                   NAME
	Signal -- signal a task

   SYNOPSIS
	Signal(task, signals)
	       A1    D0

	void Signal(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 *,ULONG);

   FUNCTION
	This function signals a task with the given signals.  If the task
	is currently waiting for one or more of these signals, it will be
	made ready and a reschedule will occur. If the task is not waiting
	for any of these signals, the signals will be posted to the task
	for possible later use. A signal may be sent to a task regardless
	of whether it is running, ready, or waiting.

	This function is considered "low level".  Its main purpose is to
	support multiple higher level functions like 
                <link linkend="n267">PutMsg</link>
                .

	This function is safe to call from interrupts.

   INPUT
	task - the task to be signalled
	signals - the signals to be sent

   SEE ALSO
	
                <link linkend="n299">Wait()</link>
                , 
                <link linkend="n287">SetSignal()</link>
                
            </literallayout>
        </section>
        <section id="n291">
            <title>exec.library/StackSwap</title>
            <literallayout class="monospaced">
                   NAME
	StackSwap - EXEC supported method of replacing task's stack      (V37)

   SYNOPSIS
	StackSwap(newStack)
	          A0

	VOID StackSwap(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">StackSwapStruct</ulink>
                 *);

   FUNCTION
	This function will, in an EXEC supported manner, swap the
	stack of your task with the given values in StackSwap.
	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">StackSwapStruct</ulink>
                 structure will then contain the values
	of the old stack such that the old stack can be restored.
	This function is new in V37.

   NOTE
	If you do a stack swap, only the new stack is set up.
	This function does not copy the stack or do anything else
	other than set up the new stack for the task.  It is
	generally required that you restore your stack before
	exiting.

   INPUTS
	newStack - A structure that contains the values for the
		new upper and lower stack bounds and the new stack
		pointer.  This structure will have its values
		replaced by those in you task such that you can
		restore the stack later.

   RESULTS
	newStack - The structure will now contain the old stack.
		This means that StackSwap(foo); StackSwap(foo);
		will effectively do nothing.

   SEE ALSO
	
                <link linkend="n199">AddTask()</link>
                , 
                <link linkend="n281">RemTask()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">exec/tasks.h</ulink>
                
            </literallayout>
        </section>
        <section id="n292">
            <title>exec.library/SumKickData</title>
            <literallayout class="monospaced">
                   NAME
	SumKickData -- compute the checksum for the Kickstart delta list

   SYNOPSIS
	checksum = SumKickData()
	D0

	ULONG SumKickData(void);

   FUNCTION
	The Amiga system has some ROM (or Kickstart) resident code that
	provides the basic functions for the machine.  This code is
	unchangeable by the system software.  This function is part of a
	support system to modify parts of the ROM.

	The ROM code is linked together at run time via ROMTags (also known
	as 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">Resident</ulink>
                 structures, defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/resident.h">exec/resident.h)</ulink>
                .  These tags tell
	Exec's low level boot code what subsystems exist in which regions of
	memory.  The current list of ROMTags is contained in the ResModules
	field of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                .  By default this list contains any ROMTags found
	in the address ranges $F80000-$FFFFFF and $F00000-$F7FFFF.

	There is also a facility to selectively add or replace modules to the
	ROMTag list.  These modules can exist in RAM, and the memory they
	occupy will be deleted from the memory free list during the boot
	process.  SumKickData() plays an important role in this run-time
	modification of the ROMTag array.

	Three variables in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 are used in changing the ROMTag array:
	KickMemPtr, KickTagPtr, and KickCheckSum. KickMemPtr points to a
	linked list of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemEntry</ulink>
                 structures. The memory that these 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemEntry</ulink>
                	structures reference will be allocated (via AllocAbs) at boot time.
	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemEntry</ulink>
                 structure itself must also be in the list.

	KickTagPtr points to a long-word array of the same format as the
	ResModules array.  The array has a series of pointers to ROMTag
	structures.  The array is either NULL terminated, or will have an
	entry with the most significant bit (bit 31) set.  The most
	significant bit being set says that this is a link to another
	long-word array of ROMTag entries.  This new array's address can be
	found by clearing bit 31.

	KickCheckSum has the result of SumKickData().  It is the checksum of
	both the KickMemPtr structure and the KickTagPtr arrays.  If the
	checksum does not compute correctly then both KickMemPtr and
	KickTagPtr will be ignored.

	If all the memory referenced by KickMemPtr can't be allocated then
	KickTagPtr will be ignored.

	There is one more important caveat about adding ROMTags. All this
	ROMTag magic is run very early on in the system -- before expansion
	memory is added to the system. Therefore any memory in this
	additional ROMTag area must be addressable at this time. This means
	that your ROMTag code, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemEntry</ulink>
                 structures, and resident arrays
	cannot be in expansion memory.  There are two regions of memory that
	are acceptable:  one is chip memory, and the other is "Ranger" memory
	(memory in the range between $C00000-$D80000).

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 that changing an existing ROMTag entry falls into the
	"heavy magic" category -- be very careful when doing it.  The odd are
	that you will blow yourself out of the water.

   NOTE
	SumKickData was introduced in the 1.2 release

   RESULT
	Value to be stuffed into ExecBase-&gt;KickCheckSum.

   WARNING
	After writing to KickCheckSum, you should push the data cache.
	This prevents potential problems with large copyback style caches.
	A call to 
                <link linkend="n213">CacheClearU</link>
                 will do fine.

   SEE ALSO
	
                <link linkend="n251">InitResident()</link>
                , 
                <link linkend="n238">FindResident()</link>
                
            </literallayout>
        </section>
        <section id="n293">
            <title>exec.library/SumLibrary</title>
            <literallayout class="monospaced">
                   NAME
	SumLibrary -- compute and check the checksum on a library

   SYNOPSIS
	SumLibrary(library)
		   A1

	void SumLibrary(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *);

   FUNCTION
	SumLibrary computes a new checksum on a library.  It can also be
	used to check an old checksum.	If an old checksum does not match,
	and the library has not been marked as changed, then the system
	will call 
                <link linkend="n200">Alert()</link>
                .

	This call could also be periodically made by some future
	system-checking task.

   INPUTS
	library - a pointer to the library to be changed

   NOTE
	An alert will occur if the checksum fails.

   SEE ALSO
	
                <link linkend="n285">SetFunction()</link>
                
            </literallayout>
        </section>
        <section id="n294">
            <title>exec.library/SuperState</title>
            <literallayout class="monospaced">
                   NAME
	SuperState -- enter supervisor state with user stack

   SYNOPSIS
	oldSysStack = SuperState()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 SuperState(void);

   FUNCTION
	Enter supervisor mode while running on the user's stack. The user
	still has access to user stack variables.  Be careful though, the
	user stack must be large enough to accommodate space for all
	interrupt data -- this includes all possible nesting of interrupts.
	This function does nothing when called from supervisor state.

   RESULTS
	oldSysStack - system stack pointer; save this.	It will come in
		      handy when you return to user state.  If the system
		      is already in supervisor mode, oldSysStack is zero.

   SEE ALSO
	
                <link linkend="n297">UserState()</link>
                , 
                <link linkend="n295">Supervisor()</link>
                
            </literallayout>
        </section>
        <section id="n295">
            <title>exec.library/Supervisor</title>
            <literallayout class="monospaced">
                   NAME
	Supervisor -- trap to a short supervisor mode function

   SYNOPSIS
	result = Supervisor(userFunc)
	Rx                   A5

	ULONG Supervisor(void *);

   FUNCTION
	Allow a normal user-mode program to execute a short assembly language
	function in the supervisor mode of the processor.  Supervisor() does
	not modify or save registers; the user function has full access to the
	register set.   All rules that apply to interrupt code must be
	followed.  In addition, no system calls are permitted.  The function
	must end with an RTE instruction.

   EXAMPLE
		;Obtain the Exception Vector base.  68010 or greater only!
		MOVECtrap:	movec.l	VBR,d0	;$4e7a,$0801
				rte

   INPUTS
	userFunc - A pointer to a short assembly language function ending
		   in RTE.  The function has full access to the register set.

   RESULTS
	result   - Whatever values the userFunc left in the registers.

   SEE ALSO
	
                <link linkend="n294">SuperState()</link>
                ,
                <link linkend="n297">UserState()</link>
                
            </literallayout>
        </section>
        <section id="n296">
            <title>exec.library/TypeOfMem</title>
            <literallayout class="monospaced">
                   NAME
	TypeOfMem -- determine attributes of a given memory address

   SYNOPSIS
	attributes = TypeOfMem(address)
	D0		       A1

	ULONG TypeOfMem(void *);

   FUNCTION
	Given a RAM memory address, search the system memory lists and
	return its memory attributes.  The memory attributes are similar to
	those specified when the memory was first allocated: (eg. MEMF_CHIP
	and MEMF_FAST).

	This function is usually used to determine if a particular block of
	memory is within CHIP space.

	If the address is not in known-space, a zero will be returned.
	(Anything that is not RAM, like the ROM or expansion area, will
	return zero.  Also the first few bytes of a memory area are used up
	by the MemHeader.)

   INPUT
	address - a memory address

   RESULT
	attributes - a long word of memory attribute flags.
	If the address is not in known RAM, zero is returned.

   SEE ALSO
	
                <link linkend="n204">AllocMem()</link>
                
            </literallayout>
        </section>
        <section id="n297">
            <title>exec.library/UserState</title>
            <literallayout class="monospaced">
                   NAME
	UserState -- return to user state with user stack

   SYNOPSIS
	UserState(sysStack)
		  D0

	void UserState(APTR);

   FUNCTION
	Return to user state with user stack, from supervisor state with
	user stack.  This function is normally used in conjunction with the
	
                <link linkend="n294">SuperState</link>
                 function above.

	This function must not be called from the user state.

   INPUT
	sysStack - supervisor stack pointer

   BUGS
	This function is broken in V33/34 Kickstart.  Fixed in V1.31 setpatch.

   SEE ALSO
	
                <link linkend="n294">SuperState()</link>
                , 
                <link linkend="n295">Supervisor()</link>
                
            </literallayout>
        </section>
        <section id="n298">
            <title>exec.library/Vacate</title>
            <literallayout class="monospaced">
                   NAME
	Vacate -- release a bitMessage from 
                <link linkend="n266">Procure()</link>
                                    (V39)

   SYNOPSIS
	Vacate(semaphore, bidMessage)
	       A0         A1

	void Vacate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SemaphoreMessage</ulink>
                 *);

   FUNCTION
	This function can be used to release a semaphore obtained via
	
                <link linkend="n266">Procure()</link>
                .  However, the main purpose for this call is to be
	able to remove a bid for a semaphore that has not yet responded.
	This is required when a 
                <link linkend="n266">Procure()</link>
                 was issued and the program
	no longer needs to get the semaphore and wishes to cancel the
	
                <link linkend="n266">Procure()</link>
                 request.  The canceled request will be replied with
	the ssm_Semaphore field set to NULL.  If you own the semaphore,
	the message was already replied and only the ssm_Semaphore field
	will be cleared.

	NOTE:  Pre-V39, 
                <link linkend="n266">Procure()</link>
                 and Vacate() did not work correctly.
	They also did not operate on 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 semaphores.
	Old (and broken) MessageSemaphore use as of V39 will no longer work.

   INPUT
	semaphore - The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SignalSemaphore</ulink>
                 that you wish to Vacate()
	bidMessage- The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/semaphores.h">SemaphoreMessage</ulink>
                 that you wish to abort.
		The message's ssm_Semaphore field will be cleared.
		The message will be replied if it is still on the waiting
		list.  If it is not on the waiting list, it is assumed
		that the semaphore is owned and it will be released.

   BUGS
	Before V39, 
                <link linkend="n266">Procure()</link>
                 and Vacate() used a different semaphore
	system that was very broken.  This new system is only available
	as of V39 even though the LVOs are the same.

   SEE ALSO
	
                <link linkend="n260">ObtainSemaphoreShared()</link>
                , 
                <link linkend="n252">InitSemaphore()</link>
                , 
                <link linkend="n269">ReleaseSemaphore()</link>
                ,
	
                <link linkend="n209">AttemptSemaphore()</link>
                , 
                <link linkend="n259">ObtainSemaphoreList()</link>
                , 
                <link linkend="n266">Procure()</link>
                , 
                <link linkend="n258">ObtainSemaphore()</link>
                
            </literallayout>
        </section>
        <section id="n299">
            <title>exec.library/Wait</title>
            <literallayout class="monospaced">
                   NAME
	Wait -- wait for one or more signals

   SYNOPSIS
	signals = Wait(signalSet)
	D0	       D0

	ULONG Wait(ULONG);

   FUNCTION
	This function will cause the current task to suspend waiting for
	one or more signals.  When one or more of the specified signals
	occurs, the task will return to the ready state, and those signals
	will be cleared.

	If a signal occurred prior to calling Wait(), the wait condition will
	be immediately satisfied, and the task will continue to run without
	delay.

   CAUTION
	This function cannot be called while in supervisor mode or
	interrupts!  This function will break the action of a 
                <link linkend="n241">Forbid()</link>
                 or
	
                <link linkend="n232">Disable()</link>
                 call.

   INPUT
	signalSet - The set of signals for which to wait.
		    Each bit represents a particular signal.

   RESULTS
	signals - the set of signals that were active

            </literallayout>
        </section>
        <section id="n300">
            <title>exec.library/WaitIO</title>
            <literallayout class="monospaced">
                   NAME
	WaitIO -- wait for completion of an I/O request

   SYNOPSIS
	error = WaitIO(iORequest)
	D0	       A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 WaitIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	This function waits for the specified I/O request to complete, then
	removes it from the replyport.	If the I/O has already completed,
	this function will return immediately.

	This function should be used with care, as it does not return until
	the I/O request completes; if the I/O never completes, this
	function will never return, and your task will hang.  If this
	situation is a possibility, it is safer to use the 
                <link linkend="n299">Wait()</link>
                 function.
	
                <link linkend="n299">Wait()</link>
                 will return return when any of a specified set of signal is
	received.  This is how I/O timeouts can be properly handled.

   WARNING
	If this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 was "Quick" or otherwise finished BEFORE this
	call, this function drops though immediately, with no call to
	
                <link linkend="n299">Wait()</link>
                .  A side effect is that the signal bit related the port may
	remain set.  Expect this.

	When removing a known complete 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 from a port, WaitIO() is the
	preferred method.  A simple 
                <link linkend="n276">Remove()</link>
                 would require a 
                <link linkend="n234">Disable/Enable</link>
                	pair!

   INPUTS
	iORequest - pointer to an I/O request block

   RESULTS
	error - zero if successful, else an error is returned
		(a sign extended copy of io_Error).

   SEE ALSO
	
                <link linkend="n233">DoIO()</link>
                , 
                <link linkend="n283">SendIO()</link>
                , 
                <link linkend="n218">CheckIO()</link>
                , 
                <link linkend="n188">AbortIO()</link>
                
            </literallayout>
        </section>
        <section id="n301">
            <title>exec.library/WaitPort</title>
            <literallayout class="monospaced">
                   NAME
	WaitPort -- wait for a given port to be non-empty

   SYNOPSIS
	message = WaitPort(port)
	D0		   A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 *WaitPort(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *);

   FUNCTION
	This function waits for the given port to become non-empty.  If
	necessary, the 
                <link linkend="n299">Wait()</link>
                 function will be called to wait for the port
	signal.  If a message is already present at the port, this function
	will return immediately.  The return value is always a pointer to
	the first message queued (but it is not removed from the queue).

   CAUTION
	More than one message may be at the port when this returns.  It is
	proper to call the 
                <link linkend="n249">GetMsg()</link>
                 function in a loop until all messages
	have been handled, then wait for more to arrive.

	To wait for more than one port, combine the signal bits from each
	port into one call to the 
                <link linkend="n299">Wait()</link>
                 function, then use a 
                <link linkend="n249">GetMsg()</link>
                 loop
	to collect any and all messages.  It is possible to get a signal
	for a port WITHOUT a message showing up.  Plan for this.

   INPUT
	port - a pointer to the message port

   RETURN
	message - a pointer to the first available message

   SEE ALSO
	
                <link linkend="n249">GetMsg()</link>
                
            </literallayout>
        </section>
        <section id="n302">
            <title>SAD/--Overview--</title>
            <literallayout class="monospaced">
                	Simple Amiga Debugging Kernel, known as "SAD"
	It is in EXEC starting in V39


		-- General description --

 The Simple Amiga Debugging Kernel (SAD) is a set of very simple control
 routines stored in the Kickstart ROM that would let debuggers control the
 Amiga's development enviroment from the outside.  These tools would make
 it possible to do remote machine development/debugging via just the
 on-board serial port.

 This set of control routines is very simple and yet completely flexible,
 thus making it possible to control the whole machine.


		-- Technical Issues --

 SAD will make use of the motherboard serial port that exists in all
 Amiga systems.  The connection via the serial port lets the system be
 able to execute SAD without needing any of the system software up and
 running. (SAD will play with the serial port directly)

 With some minor changes to the Amiga hardware, an NMI-like line could
 be hooked up to a pin on the serial port.  This would let external
 control of the machine and would let the external controller stop the
 machine no matter what state it is in.  (NMI is that way)

 In order to function correctly, SAD requires the some of the EXEC
 CPU control functions work and that 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 be valid.  Beyond that,
 SAD does not require the OS to be running.


		-- Command Overview --

 The basic commands needed to operate SAD are as follows:

 
                <link linkend="n136">Read</link>
                 and 
                <link linkend="n185">Write</link>
                 memory as byte, word, and longword.
 Get the register frame address (contains all registers)
 JSR to Address
 Return to system operation  (return from interrupt)

 These basic routines will let the system do whatever is needed.
 Since the JSR to address and memory read/write routines can be used
 to download small sections of code that could be used to do more
 complex things, this basic command set is thus flexible enough
 to even replace itself.

 Caches will automatically be flushed as needed after each write.
 (A call to 
                <link linkend="n213">CacheClearU()</link>
                 will be made after the write and before
 the command done sequence)


		-- Technical Command Descriptions --

 Since the communications with SAD is via a serial port, data formats
 have been defined for minimum overhead while still giving reasonable data
 reliability.  SAD will use the serial port at default 9600 baud but the
 external tools can change the serial port's data rate if it wishes.  It
 would need to make sure that it will be able to reconnect.  SAD sets
 the baud rate to 9600 each time it is entered.  However, while within
 SAD, a simple command to write a WORD to the SERPER register would
 change the baud rate.  This will remain in effect until you exit and
 re-enter SAD or until you change the register again.  (This can be usefull
 if you need to transfer a large amount of data)

 All commands have a basic format that they will follow.  All commands have
 both an ACK and a completion message.

 Basic command format is:

 SENDER:	$AF &lt;command byte&gt; [&lt;data bytes as needed by command&gt;]

 Receive:
 Command ACK:  $00 &lt;command byte&gt;

 Command Done: $1F &lt;command byte&gt; [&lt;data if needed&gt;]

 Waiting: $53 $41 $44 $BF

 Waiting when called from Debug():	$53 $41 $44 $3F

 Waiting when in dead-end crash:	$53 $41 $44 $21

 The data sequence will be that SAD will emit a $BF and then wait for a
 command. If no command is received within &lt;2&gt; seconds, it will emit $BF
 again and loop back.  (This is the "heart beat" of SAD)  When called from
 
                <link linkend="n228">Debug()</link>
                 and not the NMI hook, SAD will use $3F as the "heart beat"

 If SAD does not get a responce after &lt;10&gt; heartbeats, it will return to
 the system.  (Execute an RTS or RTE as needed)  This is to prevent a full
 hang.  The debugger at the other end can keep SAD happy by sending a
 NO-OP command.

 All I/O in SAD times out.  During the transmition of a command, if
 more than 2 seconds pass between bytes of data SAD will time out
 and return to the prompt.  This is mainly to help make sure that
 SAD can never get into an i-loop situation.


		-- Data Structure Issues --

 While executing in SAD, you may have full access to machine from the CPU
 standpoint.  However, this could also be a problem.  It is important to
 understand that when entered via NMI that many system lists may be in
 unstable state.  (NMI can happen in the middle of the 
                <link linkend="n204">AllocMem</link>
                 routine
 or task switch, etc)

 Also, since you are doing debugging, it is up to you to determin what
 operations can be done and what can not be done.  A good example is
 that if you want to write a WORD or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 that the address will need to
 be even on 68000 processors.  Also, if you read or write memory that does
 not exist, you may get a bus error.  Following system structures may
 require that you check the pointers at each step.

 When entered via 
                <link linkend="n228">Debug()</link>
                , you are now running as a "task" so you will
 be able to assume some things about system structures.  This means that
 you are in supervisor state and that you can assume that the
 system is at least not between states.  However, remember that since
 you are debugging the system, some bad code could cause data structures
 to be invalid.  Again, standard debugging issues are in play.  SAD just
 gives you the hooks to do whatever you need.

 Note:  When SAD prompts with $BF you will be in full disable/forbid
 state.  When $3F prompting, SAD will only do a 
                <link linkend="n241">Forbid()</link>
                .  It is possible
 for you to then disable interrupts as needed.  This is done such that it
 is possible to "run" the system from SAD when called with 
                <link linkend="n228">Debug()</link>
                .


		-- Data Frames and the Registers --

 SAD generates a special data frame that can be used to read what
 registers contain and to change the contents of the registers.
 See the entry for 
                <link linkend="n306">GET_CONTEXT_FRAME</link>
                 for more details

 ----------------------------------------------------------------------------
-

 BUGS
	In V39 EXEC, the 
                <link linkend="n317">WRITE_BYTE</link>
                 command was not connected and this
	caused all of the command numbers to be off-by-one.  For example,
	the 
                <link linkend="n311">READ_WORD</link>
                 command is listed as command $05 but in V39 is $04.
	However, the ACK of the commands are still correct.

	Also, in V39 EXEC, the 
                <link linkend="n311">READ_WORD</link>
                 command would return the wrong
	data.

	To determin if you are in V39 or V40 SAD, you can issue a simple
	SAD command at the start of the session.  By sending a 
                <link linkend="n311">READ_WORD</link>
                	command, you may either get a 
                <link linkend="n311">READ_WORD</link>
                 (V40) or a 
                <link linkend="n310">READ_LONG</link>
                 (V39)
	ACK'ed back.  So the data stream for a safe test would be:

	Send: $AF $05 $00 $F8 $00 $00               ; 
                <link linkend="n136">Read</link>
                 start of ROM...
	Recv: $00 $05 ....   You have V40 SAD
	Recv: $00 $06 ....   You have V39 SAD

	Note that you should be ready to read either 2 or 4 bytes of
	result depending on the ACK sent by the system.

            </literallayout>
        </section>
        <section id="n303">
            <title>SAD/ALLOCATE_MEMORY</title>
            <literallayout class="monospaced">
                 ALLOCATE MEMORY

 Command:	$AF $0A
 Data:		$qq $rr $ss $tt $hh $ii $jj $kk

 
                <link linkend="n202">Allocate</link>
                 a chunk of memory that is &lt;$qqrrsstt&gt; bytes in size.  Note
 that this call is only safe when SAD is in $3F prompting mode (called
 from 
                <link linkend="n228">Debug()</link>
                ) and even then may be unsafe if the system is in bad shape.
 (You are debugging after all)  The returned address will be available to
 you until you release it.  (It is obtained via a call to 
                <link linkend="n208">AllocVec()</link>
                )  The
 type of memory allocated is &lt;$hhiijjkk&gt;.  Note that the allocation may
 fail. In that case, the address returned will be $00000000.

 Command ACK:	$00 $0A
 Command DONE:	$1F $0A $ww $xx $yy $zz


            </literallayout>
        </section>
        <section id="n304">
            <title>SAD/CALL_ADDRESS</title>
            <literallayout class="monospaced"> CALL ADDRESS - JSR to the given address.

 Command:	$AF $07
 Data:		$ww $xx $yy $zz

 Call the following address as a subroutine.  No registers will be
 set up but the context frame will exist.  Standard calling
 conventions apply (d0/d1/a0/a1 are available, rest must be saved)
 The command will be ACK'ed when received.
 Command ACK:	$00 $07
 Command DONE:	$1F $07

</literallayout>
        </section>
        <section id="n305">
            <title>SAD/FREE_MEMORY</title>
            <literallayout class="monospaced">
                 FREE MEMORY

 Command:	$AF $0B
 Data:		$ww $xx $yy $zz

 Free the memory allocated with the ALLOCATE MEMORY command.  This command
 has the same restrictions as ALLOCATE MEMORY.  Memory is released by
 calling 
                <link linkend="n247">FreeVec()</link>
                 on the address &lt;$wwxxyyzz&gt;

 Command ACK:	$00 $0B
 Command DONE:	$1F $0B


            </literallayout>
        </section>
        <section id="n306">
            <title>SAD/GET_CONTEXT_FRAME</title>
            <literallayout class="monospaced">
                 GET CONTEXT FRAME

 Command:	$AF $09
 Data:		&lt;none&gt;

 This command will return a pointer to the saved context.  This will be
 a pointer to all of the registers that were saved on the stack along
 with some other details.  Returns frame address &lt;$wwxxyyzz&gt;

 The pointer returned is to the following structure:

 STRUCTURE	SAD_FRAME,0
	; The first three are READ-ONLY...  Mainly used to make it
	; easier to understand what is going on in the system.
	ULONG	SAD_VBR		; Current VBR (always 0 on 68000 CPUs)
	ULONG	SAD_AttnFlags	; ULONG copy of the flags (UPPER WORD==0)
	ULONG	SAD_ExecBase	; 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                	; These fields are the user registers...  The registers are
	; restored from these fields on exit from SAD...
	; Note that USP is only valid if SR was *NOT* supervisor...
	ULONG	SAD_USP		; User stack pointer
	ULONG	SAD_D0		; User register d0
	ULONG	SAD_D1		; User register d1
	ULONG	SAD_D2		; User register d2
	ULONG	SAD_D3		; User register d3
	ULONG	SAD_D4		; User register d4
	ULONG	SAD_D5		; User register d5
	ULONG	SAD_D6		; User register d6
	ULONG	SAD_D7		; User register d7
	ULONG	SAD_A0		; User register a0
	ULONG	SAD_A1		; User register a1
	ULONG	SAD_A2		; User register a2
	ULONG	SAD_A3		; User register a3
	ULONG	SAD_A4		; User register a4
	ULONG	SAD_A5		; User register a5
	ULONG	SAD_A6		; User register a6
	; This is for SAD internal use...  It is the prompt that
	; SAD is using...  Changing this will have no effect on SAD.
	ULONG	SAD_PROMPT	; SAD Prompt Longword...  (internal use)
	; From here on down is the standard exception frame
	; The first two entries (SR and PC) are standard on all 680x0 CPUs
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                	SAD_SR		; Status register (part of exception frame)
	ULONG	SAD_PC		; Return address (part of exception frame)


 Command ACK:	$00 $09
 Command DONE:	$1F $09 $ww $xx $yy $zz


            </literallayout>
        </section>
        <section id="n307">
            <title>SAD/NOP</title>
            <literallayout class="monospaced"> NO-OP - Do nothing other than tell SAD you are still there...

 Command:	$AF $00
 Data:		&lt;none&gt;

 This just tells SAD you are still there.  Required so that timeouts do
 not exit SAD while you are not doing anything.

 This command will *NOT* be ACK'ed.  It will just cause the timeout to
 be restarted.

</literallayout>
        </section>
        <section id="n308">
            <title>SAD/READ_ARRAY</title>
            <literallayout class="monospaced">
                 READ ARRAY - 
                <link linkend="n136">Read</link>
                 a range of bytes

 Command:	$AF $0F
 Data:		$ww $xx $yy $zz $qq $rr $ss $tt

 
                <link linkend="n136">Read</link>
                 a range of bytes from address &lt;$wwxxyyzz&gt; for &lt;$qqrrsstt&gt; bytes
 Will return that number of bytes...

 Command will be ACK'ed when received.
 Command ACK:	$00 $0F
 Command DONE:	$1F $0F $uu [$uu ...]


            </literallayout>
        </section>
        <section id="n309">
            <title>SAD/READ_BYTE</title>
            <literallayout class="monospaced">
                 READ 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 - 
                <link linkend="n136">Read</link>
                 a byte from the given address

 Command:	$AF $04
 Data:		$ww $xx $yy $zz

 
                <link linkend="n136">Read</link>
                 a byte from address &lt;$wwxxyyzz&gt;  Returns &lt;$qq&gt; as result

 Command will be ACK'ed when received.
 Command ACK:	$00 $04
 Command DONE:	$1F $04 $qq


            </literallayout>
        </section>
        <section id="n310">
            <title>SAD/READ_LONG</title>
            <literallayout class="monospaced">
                 READ 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 - 
                <link linkend="n136">Read</link>
                 a long from the given address

 Command:	$AF $06
 Data:		$ww $xx $yy $zz

 
                <link linkend="n136">Read</link>
                 a long from address &lt;$wwxxyyzz&gt;  Returns &lt;$qqrrsstt&gt; as result

 Command will be ACK'ed when received.
 Command ACK:	$00 $06
 Command DONE:	$1F $06 $qq $rr $ss $tt


            </literallayout>
        </section>
        <section id="n311">
            <title>SAD/READ_WORD</title>
            <literallayout class="monospaced">
                 READ WORD - 
                <link linkend="n136">Read</link>
                 a word from the given address		(V40 SAD)

 Command:	$AF $05
 Data:		$ww $xx $yy $zz

 
                <link linkend="n136">Read</link>
                 a word from address &lt;$wwxxyyzz&gt;  Returns &lt;$qqrr&gt; as result

 Command will be ACK'ed when received.
 Command ACK:	$00 $05
 Command DONE:	$1F $05 $qq $rr

 BUGS
	This command does not return correct values in pre-V40 EXEC.

            </literallayout>
        </section>
        <section id="n312">
            <title>SAD/RESET</title>
            <literallayout class="monospaced"> RESET - Reset the computer...

 Command:	$AF $10
 Data:		$FF $FF $FF $FF

 This command will reset the computer.  the $FFFFFFFF value is there
 mainly to prevent false reset.  This command will only be ACK'ed as
 the computer will be reset afterwards...

 Command will be ACK'ed when received.
 Command ACK:	$00 $10

</literallayout>
        </section>
        <section id="n313">
            <title>SAD/RETURN_TO_SYSTEM</title>
            <literallayout class="monospaced"> RETURN TO SYSTEM

 Command:	$AF $08
 Data:		$00 $00 $00 $00

 This command will return &lt;exit&gt; from SAD back to whatever started it.
 The 4 $00 are required as a "safty" to this command.  The command
 will be ACK'ed only as it will have lost control of the system.

 Command ACK:	$00 $08

</literallayout>
        </section>
        <section id="n314">
            <title>SAD/TURN_OFF_SINGLE</title>
            <literallayout class="monospaced"> TURN OFF SINGLE STEPPING

 Command:	$AF $0D
 Data:		$ww $xx $yy $zz

 This command will turn off SAD single stepping mode.  You need to pass
 to it the address returned from the call to turn on single stepping mode.

 Command ACK:	$00 $0D
 Command DONE:	$1F $0D

</literallayout>
        </section>
        <section id="n315">
            <title>SAD/TURN_ON_SINGLE</title>
            <literallayout class="monospaced"> TURN ON SINGLE STEPPING

 Command:	$AF $0C
 Data:		&lt;none&gt;

 This command will turn on SAD single stepping mode.  This means that SAD
 will single step (via 68000 trace mode) the system.  SAD will take over
 the TRACE exception vector during this time.  This command will return
 the contents of the vector such that you can return this value when
 you wish to turn off single stepping mode.  Note that turning on single
 stepping mode while in $BF prompting will cause the step to be taken
 and then SAD will execute in $3F mode (non-NMI)
 The command returns &lt;$wwxxyyzz&gt; which you must use when turning off
 the single-step mode.

 Command ACK:	$00 $0C
 Command DONE:	$1F $0C $ww $xx $yy $zz

</literallayout>
        </section>
        <section id="n316">
            <title>SAD/WRITE_ARRAY</title>
            <literallayout class="monospaced">
                 WRITE ARRAY - 
                <link linkend="n185">Write</link>
                 a range of bytes

 Command:	$AF $0E
 Data:		$ww $xx $yy $zz $qq $rr $ss $tt

 
                <link linkend="n185">Write</link>
                 a range of bytes to address &lt;$wwxxyyzz&gt; for &lt;$qqrrsstt&gt; bytes
 After the computer sends the ACK, you must then send the byte stream...

 Command will be ACK'ed when received.
 Command ACK:	$00 $0E
 Command DONE:	$1F $0E


            </literallayout>
        </section>
        <section id="n317">
            <title>SAD/WRITE_BYTE</title>
            <literallayout class="monospaced">
                 WRITE 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 - 
                <link linkend="n185">Write</link>
                 the given data to the address given	(V40 SAD)

 Command:	$AF $01
 Data:		$ww $xx $yy $zz $qq

 
                <link linkend="n185">Write</link>
                 the byte &lt;$qq&gt; to address &lt;$wwxxyyzz&gt;

 Command will be ACK'ed when received.
 Command ACK:	$00 $01
 Command DONE:	$1F $01

 BUGS
	This command does not exists in pre-V40 EXEC.
	This command can be emulated with the 
                <link linkend="n316">WRITE_ARRAY</link>
                 command with
	a length of 1.

            </literallayout>
        </section>
        <section id="n318">
            <title>SAD/WRITE_LONG</title>
            <literallayout class="monospaced">
                 WRITE 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 - 
                <link linkend="n185">Write</link>
                 the given data to the address given

 Command:	$AF $03
 Data:		$ww $xx $yy $zz $qq $rr $ss $tt

 
                <link linkend="n185">Write</link>
                 the long &lt;$qqrrsstt&gt; to address &lt;$wwxxyyzz&gt;

 Command will be ACK'ed when received.
 Command ACK:	$00 $03
 Command DONE:	$1F $03


            </literallayout>
        </section>
        <section id="n319">
            <title>SAD/WRITE_WORD</title>
            <literallayout class="monospaced">
                 WRITE WORD - 
                <link linkend="n185">Write</link>
                 the given data to the address given

 Command:	$AF $02
 Data:		$ww $xx $yy $zz $qq $rr

 
                <link linkend="n185">Write</link>
                 the word &lt;$qqrr&gt; to address &lt;$wwxxyyzz&gt;

 Command will be ACK'ed when received.
 Command ACK:	$00 $02
 Command DONE:	$1F $02


            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>intuition</title>
        <section id="n320">
            <title>intuition.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n321"> ActivateGadget() </link>
                    
                <link linkend="n322"> ActivateWindow() </link>
                    
                <link linkend="n323"> AddClass() </link>
                    
                <link linkend="n324"> AddGadget() </link>
                    
                <link linkend="n325"> AddGList() </link>
                    
                <link linkend="n326"> AllocRemember() </link>
                    
                <link linkend="n327"> AllocScreenBuffer() </link>
                    
                <link linkend="n328"> AutoRequest() </link>
                    
                <link linkend="n329"> BeginRefresh() </link>
                    
                <link linkend="n330"> BuildEasyRequestArgs() </link>
                    
                <link linkend="n331"> BuildSysRequest() </link>
                    
                <link linkend="n332"> ChangeScreenBuffer() </link>
                    
                <link linkend="n333"> ChangeWindowBox() </link>
                    
                <link linkend="n334"> ClearDMRequest() </link>
                    
                <link linkend="n335"> ClearMenuStrip() </link>
                    
                <link linkend="n336"> ClearPointer() </link>
                    
                <link linkend="n337"> CloseScreen() </link>
                    
                <link linkend="n338"> CloseWindow() </link>
                    
                <link linkend="n339"> CloseWorkBench() </link>
                    
                <link linkend="n340"> CurrentTime() </link>
                    
                <link linkend="n341"> DisplayAlert() </link>
                    
                <link linkend="n342"> DisplayBeep() </link>
                    
                <link linkend="n343"> DisposeObject() </link>
                    
                <link linkend="n344"> DoGadgetMethodA() </link>
                    
                <link linkend="n345"> DoubleClick() </link>
                    
                <link linkend="n346"> DrawBorder() </link>
                    
                <link linkend="n347"> DrawImage() </link>
                    
                <link linkend="n348"> DrawImageState() </link>
                    
                <link linkend="n349"> EasyRequestArgs() </link>
                    
                <link linkend="n350"> EndRefresh() </link>
                    
                <link linkend="n351"> EndRequest() </link>
                    
                <link linkend="n352"> EraseImage() </link>
                    
                <link linkend="n353"> FreeClass() </link>
                    
                <link linkend="n354"> FreeRemember() </link>
                    
                <link linkend="n355"> FreeScreenBuffer() </link>
                    
                <link linkend="n356"> FreeScreenDrawInfo() </link>
                    
                <link linkend="n357"> FreeSysRequest() </link>
                    
                <link linkend="n358"> GadgetMouse() </link>
                    
                <link linkend="n359"> GetAttr() </link>
                    
                <link linkend="n360"> GetDefaultPubScreen() </link>
                    
                <link linkend="n361"> GetDefPrefs() </link>
                    
                <link linkend="n362"> GetPrefs() </link>
                    
                <link linkend="n363"> GetScreenData() </link>
                    
                <link linkend="n364"> GetScreenDrawInfo() </link>
                    
                <link linkend="n365"> HelpControl() </link>
                    
                <link linkend="n366"> InitRequester() </link>
                    
                <link linkend="n367"> IntuiTextLength() </link>
                    
                <link linkend="n368"> ItemAddress() </link>
                    
                <link linkend="n369"> LendMenus() </link>
                    
                <link linkend="n370"> LockIBase() </link>
                    
                <link linkend="n371"> LockPubScreen() </link>
                    
                <link linkend="n372"> LockPubScreenList() </link>
                    
                <link linkend="n373"> MakeClass() </link>
                    
                <link linkend="n374"> MakeScreen() </link>
                    
                <link linkend="n375"> ModifyIDCMP() </link>
                    
                <link linkend="n376"> ModifyProp() </link>
                    
                <link linkend="n377"> MoveScreen() </link>
                    
                <link linkend="n378"> MoveWindow() </link>
                    
                <link linkend="n379"> MoveWindowInFrontOf() </link>
                    
                <link linkend="n380"> NewModifyProp() </link>
                    
                <link linkend="n381"> NewObject() </link>
                    
                <link linkend="n382"> NextObject() </link>
                    
                <link linkend="n383"> NextPubScreen() </link>
                    
                <link linkend="n384"> ObtainGIRPort() </link>
                    
                <link linkend="n385"> OffGadget() </link>
                    
                <link linkend="n386"> OffMenu() </link>
                    
                <link linkend="n387"> OnGadget() </link>
                    
                <link linkend="n388"> OnMenu() </link>
                    
                <link linkend="n389"> OpenScreen() </link>
                    
                <link linkend="n390"> OpenScreenTagList() </link>
                    
                <link linkend="n391"> OpenWindow() </link>
                    
                <link linkend="n392"> OpenWindowTagList() </link>
                    
                <link linkend="n393"> OpenWorkBench() </link>
                    
                <link linkend="n394"> PointInImage() </link>
                    
                <link linkend="n395"> PrintIText() </link>
                    
                <link linkend="n396"> PubScreenStatus() </link>
                    
                <link linkend="n397"> QueryOverscan() </link>
                    
                <link linkend="n398"> RefreshGadgets() </link>
                    
                <link linkend="n399"> RefreshGList() </link>
                    
                <link linkend="n400"> RefreshWindowFrame() </link>
                    
                <link linkend="n401"> ReleaseGIRPort() </link>
                    
                <link linkend="n402"> RemakeDisplay() </link>
                    
                <link linkend="n403"> RemoveClass() </link>
                    
                <link linkend="n404"> RemoveGadget() </link>
                    
                <link linkend="n405"> RemoveGList() </link>
                    
                <link linkend="n406"> ReportMouse() </link>
                    
                <link linkend="n407"> Request() </link>
                    
                <link linkend="n408"> ResetMenuStrip() </link>
                    
                <link linkend="n409"> RethinkDisplay() </link>
                    
                <link linkend="n410"> ScreenDepth() </link>
                    
                <link linkend="n411"> ScreenPosition() </link>
                    
                <link linkend="n412"> ScreenToBack() </link>
                    
                <link linkend="n413"> ScreenToFront() </link>
                    
                <link linkend="n414"> ScrollWindowRaster() </link>
                    
                <link linkend="n415"> SetAttrsA() </link>
                    
                <link linkend="n416"> SetDefaultPubScreen() </link>
                    
                <link linkend="n417"> SetDMRequest() </link>
                    
                <link linkend="n418"> SetEditHook() </link>
                    
                <link linkend="n419"> SetGadgetAttrsA() </link>
                    
                <link linkend="n420"> SetMenuStrip() </link>
                    
                <link linkend="n421"> SetMouseQueue() </link>
                    
                <link linkend="n422"> SetPointer() </link>
                    
                <link linkend="n423"> SetPrefs() </link>
                    
                <link linkend="n424"> SetPubScreenModes() </link>
                    
                <link linkend="n425"> SetWindowPointerA() </link>
                    
                <link linkend="n426"> SetWindowTitles() </link>
                    
                <link linkend="n427"> ShowTitle() </link>
                    
                <link linkend="n428"> SizeWindow() </link>
                    
                <link linkend="n429"> SysReqHandler() </link>
                    
                <link linkend="n430"> TimedDisplayAlert() </link>
                    
                <link linkend="n431"> UnlockIBase() </link>
                    
                <link linkend="n432"> UnlockPubScreen() </link>
                    
                <link linkend="n433"> UnlockPubScreenList() </link>
                    
                <link linkend="n434"> ViewAddress() </link>
                    
                <link linkend="n435"> ViewPortAddress() </link>
                    
                <link linkend="n436"> WBenchToBack() </link>
                    
                <link linkend="n437"> WBenchToFront() </link>
                    
                <link linkend="n438"> WindowLimits() </link>
                    
                <link linkend="n439"> WindowToBack() </link>
                    
                <link linkend="n440"> WindowToFront() </link>
                    
                <link linkend="n441"> ZipWindow() </link>
            </literallayout>
        </section>
        <section id="n321">
            <title>intuition.library/ActivateGadget</title>
            <literallayout class="monospaced">
                    NAME
	ActivateGadget -- Activate a (string or custom) gadget.

    SYNOPSIS
	Success = ActivateGadget( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <link linkend="n407">Request</link>
                 )
	D0			  A0      A1      A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ActivateGadget( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 * );

    FUNCTION
	Activates a string or custom gadget.  If successful, this means
	that the user does not need to click in the gadget before typing.

	The window parameter must point to the window which contains the gadget.
	If the gadget is actually in a requester, the window must contain
	the requester, and a pointer to the requester must also be
	passed.	The requester parameter must only be valid if the gadget
	has the	GTYP_REQGADGET flag set, a requirement for all requester
	gadgets.

	The success of this function depends on a rather complex set
	of conditions.  The intent is that the user is never interrupted from
	what interactions he may have underway.

	The current set of conditions includes:
	-   The window must be active.  If you are opening a new window
	    and want an active gadget in it, it is not sufficient to
	    assume that the WFLG_ACTIVATE flag has taken effect by the time
	    
                <link linkend="n391">OpenWindow()</link>
                 returns, even if you insert a delay of some
	    finite amount of time.  Use the IDCMP_ACTIVEWINDOW 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiMessage</ulink>
                	    to tell when your window really becomes active.  Many
	    programs use an event loop that calls ActivateGadget()
	    whenever they receive the IDCMP_ACTIVEWINDOW message, and also
	    the IDCMP_MOUSEBUTTONS messages, and so on, to keep the
	    gadget active until it is used (or the user selects some
	    other "Cancel" gadget).

	-   No other gadgets may be in use.  This includes system gadgets,
	    such as those for window sizing, dragging, etc.
	-   If the gadget is in a requester, that requester must
	    be active. (Use IDCMP_REQSET and IDCMP_REQCLEAR).
	-   The right mouse button cannot be held down (e.g. menus)

	NOTE: Don't try to activate a gadget which is disabled or
	not attached to a window or requester.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = pointer to the gadget that you want activated.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a window structure containing the gadget.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to a requester (may by NULL if this isn't
           a requester gadget (i.e. GTYP_REQGADGET is not set)).

    RESULT
	If the conditions above are met, and the gadget is in fact a string
	gadget, then this function will return TRUE, else FALSE.

    BUGS
	At present, this function will not return FALSE if a custom
	gadget declines to be activated.

    SEE ALSO

            </literallayout>
        </section>
        <section id="n322">
            <title>intuition.library/ActivateWindow</title>
            <literallayout class="monospaced">
                    NAME
	ActivateWindow -- Activate an Intuition window.

    SYNOPSIS
	ActivateWindow( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
	                A0

	VOID ActivateWindow( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Activates an Intuition window.

	Note that this call may have its action deferred: you cannot assume
	that when this call is made the selected window has become active.
	This action will be postponed while the user plays with gadgets and
	menus, or sizes and drags windows.  You may detect when the window
	actually has become active by the IDCMP_ACTIVEWINDOW IDCMP message.

	This call is intended to provide flexibility but not to confuse the
	user.  Please call this function synchronously with some action
	by the user.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure

    RESULT
	None.

    BUGS
	Some versions of the documentation claimed that this function
	had a meaningful return value under V36 and higher.  That is
	not true.

	Calling this function in a tight loop can blow out Intuition's
	deferred action queue.

    SEE ALSO
	
                <link linkend="n391">OpenWindow()</link>
                , and the WFLG_ACTIVATE window flag
            </literallayout>
        </section>
        <section id="n323">
            <title>intuition.library/AddClass</title>
            <literallayout class="monospaced">
                    NAME
	AddClass -- Make a public class available (V36)

    SYNOPSIS
	AddClass( Class )
	          A0

	VOID AddClass( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 * );

    FUNCTION
	Adds a public boopsi class to the internal list of classes available
	for public consumption.

	You must call this function after you call 
                <link linkend="n373">MakeClass()</link>
                .

    INPUTS
	Class = pointer returned by 
                <link linkend="n373">MakeClass()</link>
                    RESULT
	Nothing returned.

    NOTES

    BUGS
	Although there is some protection against creating classes
	with the same name as an existing class, this function
	does not do any checking or other dealings with like-named
	classes.  Until this is rectified, only officially registered
	names can be used for public classes, and there is no
	"class replacement" policy in effect.

    SEE ALSO
	
                <link linkend="n373">MakeClass()</link>
                , 
                <link linkend="n353">FreeClass()</link>
                , 
                <link linkend="n403">RemoveClass()</link>
                	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.
            </literallayout>
        </section>
        <section id="n324">
            <title>intuition.library/AddGadget</title>
            <literallayout class="monospaced">
                    NAME
	AddGadget -- Add a gadget to the gadget list of a window.

    SYNOPSIS
	RealPosition = AddGadget( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , Position )
	D0			  A0      A1      D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                  AddGadget( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	Adds the specified gadget to the gadget list of the given window,
	linked in at the position in the list specified by the position
	argument (that is, if Position == 0, the gadget will be inserted
	at the head of the list, and if Position == 1 then the gadget will
	be inserted after the first gadget and before the second).  If the
	position you specify is greater than the number of gadgets in the
	list, your gadget will be added to the end of the list.

	Calling AddGadget() does not cause your gadget to be redisplayed.
	The benefit of this is that you may add several gadgets without
	having the gadget list redrawn every time.

	This procedure returns the position at which your gadget was added.

	NOTE:  A relatively safe way to add the gadget to the end of the
	list is to specify a position of -1 (i.e., (UWORD) ~0).  That way,
	only the 65536th (and multiples of it) will be inserted at the wrong
	position.  The return value of the procedure will tell you where it was
	actually inserted.

	NOTE:  The system window gadgets are initially added to the
	front of the gadget list.  The reason for this is:  If you position
	your own gadgets in some way that interferes with the graphical
	representation of the system gadgets, the system's ones will be "hit"
	first by user.  If you then start adding gadgets to the front of the
	list, you will disturb this plan, so beware.  On the other hand, if
	you don't violate the design rule of never overlapping your gadgets,
	there's no problem.

	NOTE:  You may not add your own gadgets to a screen.  Gadgets may
	be added to backdrop windows, however, which can be visually similar,
	but also provide an IDCMP channel for gadget input messages.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window to get your gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = pointer to the new gadget
	Position = integer position in the list for the new gadget (starting
	    from zero as the first position in the list)

    RESULT
	Returns the position of where the gadget was actually added.

    BUGS

    SEE ALSO
	
                <link linkend="n325">AddGList()</link>
                , 
                <link linkend="n404">RemoveGadget()</link>
                , 
                <link linkend="n405">RemoveGList()</link>
            </literallayout>
        </section>
        <section id="n325">
            <title>intuition.library/AddGList</title>
            <literallayout class="monospaced">
                    NAME
	AddGList -- Add a linked list of gadgets to a window or requester.

    SYNOPSIS
	RealPosition = AddGList( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , Position, Numgad, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 )
	D0                       A0      A1      D0        D1      A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 AddGList( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , WORD,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 * );

    FUNCTION
	Adds the list of gadgets to the gadget list of the given window
	or requester linked in at the position in the list specified by
	the position argument.

	See 
                <link linkend="n324">AddGadget()</link>
                 for more information about gadget list position,
	and more information about gadgets in general.

	The requester parameter will be ignored unless the GTYP_REQGADGET
	bit is set in the GadgetType field of the first gadget in the list.
	In that case, the gadget list is added to the requester gadgets.
	NOTE: be sure that GTYP_REQGADGET is either set or cleared consistently
	for all gadgets in the list.  NOTE ALSO: The window parameter
	should point to the window that the requester (will) appear in.

	Will add 'Numgad' gadgets from gadget list linked by the field
	NextGadget, or until some NextGadget field is found to be NULL.  Does
	not assume that the Numgad'th gadget has NextGadget equal to NULL.

	NOTE WELL: In order to link your gadget list in, the NextGadget
	field of the Numgad'th (or last) gadget will be modified.  Thus, if
	you are adding the first 3 gadgets from a linked list of five gadgets,
	this call will sever the connection between your third and fourth
	gadgets.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window to get your gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = pointer to the first gadget to be added
	Position = integer position in the list for the new gadget
	    (starting from zero as the first position in the list)
	Numgad = the number of gadgets from the linked list to be added
	    if Numgad equals -1, the entire null-terminated list of
	    gadgets will be added.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = the requester the gadgets will be added to if the
	    GTYP_REQGADGET GadgetType flag is set for the first gadget
	    in the list

    RESULT
	Returns the position of where the first gadget in the list was actually
	added.

    BUGS

    SEE ALSO
	
                <link linkend="n324">AddGadget()</link>
                , 
                <link linkend="n404">RemoveGadget()</link>
                , 
                <link linkend="n405">RemoveGList()</link>
            </literallayout>
        </section>
        <section id="n326">
            <title>intuition.library/AllocRemember</title>
            <literallayout class="monospaced">
                    NAME
	AllocRemember -- 
                <link linkend="n204">AllocMem()</link>
                 with tracking to make freeing easy.

    SYNOPSIS
	MemBlock = AllocRemember( RememberKey, Size, Flags )
	D0			  A0	       D0    D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 AllocRemember( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 **, ULONG, ULONG );

    FUNCTION
	This routine calls the Exec 
                <link linkend="n204">AllocMem()</link>
                 function for you, but also links
	the parameters of the allocation into a master list, so that
	you can simply call the Intuition routine 
                <link linkend="n354">FreeRemember()</link>
                 at a later
	time to deallocate all allocated memory without being required to
	remember the details of the memory you've allocated.

	This routine will have two primary uses:
       -   Let's say that you're doing a long series of allocations in a
           procedure.  If any one of the allocations fails, your program
	    may need to abort the procedure.  Abandoning ship correctly
	    involves freeing up what memory you've already allocated.  This
	    procedure allows you to free up that memory easily, without being
	    required to keep track of how many allocations you've already done,
	    what the sizes of the allocations were, or where the memory was
	    allocated.

       -   Also, in the more general case, you may do all of the allocations
           in your entire program using this routine.  Then, when your
           program is exiting, you can free it all up at once with a
           simple call to 
                <link linkend="n354">FreeRemember()</link>
                .

	You create the "anchor" for the allocation master list by creating
	a variable that's a pointer to struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                , and initializing
	that pointer to NULL.  This is called the RememberKey.  Whenever
	you call AllocRemember(), the routine actually does two memory
	allocations, one for the memory you want and the other for a copy
	of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 structure.  The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 structure is filled in
	with data describing your memory allocation, and it's linked
	into the master list pointed to by your RememberKey.  Then, to
	free up any memory that's been allocated, all you have to do is
	call 
                <link linkend="n354">FreeRemember()</link>
                 with your RememberKey.

	Please read the 
                <link linkend="n354">FreeRemember()</link>
                 function description, too.  As you will
	see, you can select either to free just the link nodes and keep all the
	allocated memory for yourself, or to free both the nodes and your memory
	buffers.


    INPUTS
	RememberKey = the address of a pointer to struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                .  Before the
	very first call to AllocRemember, initialize this pointer to NULL.

	Size = the size in bytes of the memory allocation.  Please refer to the
	    
                <link linkend="n204">exec.library/AllocMem()</link>
                 function for details.
	Flags = the specifications for the memory allocation.  Please refer to
	    the 
                <link linkend="n204">exec.library/AllocMem()</link>
                 function for details.

    EXAMPLE
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 *RememberKey;
	RememberKey = NULL;
	buffer = AllocRemember(&amp;RememberKey, BUFSIZE, MEMF_CHIP);
	if (buffer)
	{
	    /* Use the buffer */
	    ...
	}
	FreeRemember(&amp;RememberKey, TRUE);

    RESULT
	If the memory allocation is successful, this routine returns the byte
	address of your requested memory block.  Also, the node to your block
	will be linked into the list pointed to by your RememberKey variable.
	If the allocation fails, this routine returns NULL and the list pointed
	to by RememberKey, if any, will be unchanged.

    BUGS
	This function makes two allocations for each memory buffer
	you request.  This is neither fast nor good for memory
	fragmentation.

	This function should use the exec AllocPool() function internally,
	at least for the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 headers.

    SEE ALSO
	
                <link linkend="n354">FreeRemember()</link>
                , 
                <link linkend="n204">exec.library/AllocMem()</link>
            </literallayout>
        </section>
        <section id="n327">
            <title>intuition.library/AllocScreenBuffer</title>
            <literallayout class="monospaced">
                    NAME
	AllocScreenBuffer -- Get a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 for double-buffering. (V39)

    SYNOPSIS
	sbuffer = AllocScreenBuffer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                , flags )
	D0                           A0      A1      D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 *AllocScreenBuffer( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *,
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *, ULONG );

    FUNCTION
	Allocates a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 structure and usually a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .  This
	structure can be used for double (or multiple) buffering in
	Intuition screens.  You may use this call to obtain a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                	structure for the screen's initial 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                , or for other BitMaps
	you intend to swap in.

	AllocScreenBuffer() also allocates a graphics.library 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                	structure.  The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 structure this call returns contains
	a pointer to that 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                 structure, which is free for your use.
	See 
                <link linkend="n585">graphics.library/AllocDBufInfo()</link>
                 for full details on using
	this structure to achieve notification of when it is safe to
	render into an old buffer and when it is right to switch again.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to the screen to double-buffer
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 = For CUSTOMBITMAP screens, you may pre-allocate
		a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 matching the screen's BitMap's properties, and
		pass that in, to get a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 referring to that
		
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .  Set this parameter to NULL if you'd prefer
		that Intuition allocate the alternate buffer.  This parameter
		must be NULL for non-CUSTOMBITMAP screens.
	Flags = Set a combination of these flags:
	    For non-CUSTOMBITMAP screens, set SB_SCREEN_BITMAP in order to
		get a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 referring to the screen's actual 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .
		(For CUSTOMBITMAP screens, just set the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 parameter
		to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 you passed to 
                <link linkend="n389">OpenScreen()</link>
                ).
	    Set SB_COPY_BITMAP if you would like the screen's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                		copied into this ScreenBuffer's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .  This is required
		to get any menu-bar or gadget imagery into each
		ScreenBuffer's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .  If the screen has no Intuition
		rendering, you may omit this flag.  Also, when allocating
		a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 for the screen's initial 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                , this flag
		should not be set.

    RESULT
	Pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 structure, or NULL if failure.
	You may render into the resulting 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 as appropriate.
	You may use the sb_DBufInfo field to access graphics.library
	ViewPort-buffering features such as learning when it is safe
	to reuse the previous 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .  If not, you risk writing into
	the on-screen 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                , which can damage menu or gadget rendering!

    NOTES

	The role of SB_SCREEN_BITMAP is to wrap a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 around
	the actual current 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 used by the non-CUSTOMBITMAP screen.
	The words actual or current are used instead of initial, since
	an application could do some double-buffering, leave the
	non-initial buffer installed into the screen, free up the
	others, then re-allocate 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 structures to do more
	double-buffering.  In that case, the actual screen 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 is
	not necessarily the initial one.

	The role of SB_COPY_BITMAP is to say "please put whatever
	imagery is currently on-screen into this new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 too".
	That's how the screen titlebar and other imagery get copied
	over into each buffer.

    BUGS

    SEE ALSO
	
                <link linkend="n355">FreeScreenBuffer()</link>
                , 
                <link linkend="n332">ChangeScreenBuffer()</link>
                ,
	
                <link linkend="n585">graphics.library/AllocDBufInfo()</link>
                , 
                <link linkend="n613">graphics.library/ChangeVPBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n328">
            <title>intuition.library/AutoRequest</title>
            <literallayout class="monospaced">
                    NAME
	AutoRequest -- Automatically build and get response from a requester.

    SYNOPSIS
	Response = AutoRequest( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , BodyText, PosText, NegText,
	D0                      A0      A1        A2       A3
			PosFlags, NegFlags, Width, Height )
			D0        D1        D2     D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AutoRequest( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 *,
		ULONG, ULONG, WORD, WORD );

    FUNCTION
	This procedure automatically builds a requester for you and then
	waits for a response from the user, or for the system to satisfy your
	request.  If the response is positive, this procedure returns TRUE.
	If the response is negative, this procedure returns FALSE.

	An IDCMPFlag specification is created by bitwise "or'ing" your
	PosFlags, NegFlags, and the IDCMP classes IDCMP_GADGETUP and
	IDCMP_RAWKEY.  You may specify zero flags for either the PosFlags
	or NegFlags arguments.

	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 arguments, and the width and height values, are
	passed directly to the 
                <link linkend="n331">BuildSysRequest()</link>
                 procedure along with
	your window pointer and the IDCMP flags.  Please refer to
	
                <link linkend="n331">BuildSysRequest()</link>
                 for a description of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 that you are
	expected to supply when calling this routine.  It's an important
	but long-winded description that need not be duplicated here.

	If the 
                <link linkend="n331">BuildSysRequest()</link>
                 procedure does not return a pointer
	to a window, it will return TRUE or FALSE (not valid structure
	pointers) instead, and these 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 values will be returned to
	you immediately.

	On the other hand, if a valid window pointer is returned, that
	window will have had its IDCMP ports and flags initialized according
	to your specifications.  AutoRequest() then waits for IDCMP messages
	on the UserPort, which satisfies one of four requirements:
	-   either the message is of a class that matches
	    one of your PosFlags arguments (if you've supplied
	    any), in which case this routine returns TRUE.  Or
	-   the message class matches one of your NegFlags
	    arguments (if you've supplied any), in which case
	    this routine returns FALSE.  Or
	-   the IDCMP message is of class IDCMP_GADGETUP, which means that
	    one of the two gadgets, as provided with the PosText and NegText
	    arguments, was selected by the user.  If the TRUE gadget
	    was selected, TRUE is returned.  If the FALSE gadget was
	    selected, FALSE is returned.
	-   Lastly, two IDCMP_RAWKEY messages may satisfy the request: those
	    for the V and B keys with the left Amiga key depressed.
	    These keys, satisfy the gadgets on the left or right side of
	    the requester--TRUE or FALSE--, respectively.

	    NOTE: For V36, these two keys left-Amiga-B and V are processed
	    through the default keymap.

	When the dust has settled, this routine calls 
                <link linkend="n357">FreeSysRequest()</link>
                 if
	necessary to clean up the requester and any other allocated memory.

	NOTE: For V36, this function now switches the processor stack
	to ensure sufficient stack space for the function to succeed.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure.  See 
                <link linkend="n331">BuildSysRequest()</link>
                	    for a full discussion.
	BodyText = pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure
	PosText = pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure, may by NULL.
	NegText = pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure, MUST be valid!
	PosFlags = flags for the IDCMP
	NegFlags = flags for the IDCMP
	Width, Height = the sizes to be used for the rendering of the requester

	NOTE for V36: The width and height parameters are ignored, as
	are several other specifications in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                , to make
	AutoRequest() requesters retroactively conform to the new look
	designed for EasyRequest().

    RESULT
	The return value is either TRUE or FALSE.  See the text above for a
	complete description of the chain of events that might lead to either
	of these values being returned.

    NOTES
	When DOS brings up AutoRequests() on your process (eg.
	"Please insert volume XXX in any drive", they normally come
	up on the Workbench screen.  If you set your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 pr_WindowPtr
	field to point to one of your windows, then DOS will bring its
	requesters up on the same screen as that window.  A pr_WindowPtr
	of -1 prevents requesters from coming up at all.
	(Some FileSystem requesters cannot be redirected or supressed).

    BUGS
	The requester no longer devolves into a call to 
                <link linkend="n341">DisplayAlert()</link>
                	if there is not enough memory for the requester.

    SEE ALSO
	
                <link linkend="n349">EasyRequestArgs()</link>
                , 
                <link linkend="n331">BuildSysRequest()</link>
                , 
                <link linkend="n429">SysReqHandler()</link>
            </literallayout>
        </section>
        <section id="n329">
            <title>intuition.library/BeginRefresh</title>
            <literallayout class="monospaced">
                    NAME
	BeginRefresh -- Sets up a window for optimized refreshing.

    SYNOPSIS
	BeginRefresh( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		      A0

	VOID BeginRefresh( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	This routine sets up your window for optimized refreshing.

	Its role is to provide Intuition integrated access to the Layers
	library function 
                <link linkend="n747">BeginUpdate()</link>
                .  Its additional contribution is
	to be sure that locking protocols for layers are followed, by
	locking both layers of a WFLG_GIMMEZEROZERO window only after the
	parent 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 has been locked.  Also, the WFLG_WINDOWREFRESH
	flag is set in your window, for your information.

	The purpose of 
                <link linkend="n747">BeginUpdate()</link>
                , and hence BeginRefresh(), is to
	restrict rendering in a window (layer) to the region that needs
	refreshing after an operation such as window sizing or uncovering.
	This restriction to the "damage region" persists until you call
	
                <link linkend="n350">EndRefresh()</link>
                .

	For instance, if you have a WFLG_SIMPLE_REFRESH window which is
	partially concealed and the user brings it to the front, you can
	receive an IDCMP_REFRESHWINDOW message asking you to refresh your
	display.  If you call BeginRefresh() before doing any of the
	rendering, then the layer that underlies your window will be arranged
	so that the only rendering that will actually take place will be that
	which goes to the newly-revealed areas.  This is very performance-
	efficient, and visually attractive.

	After you have performed your refresh of the display, you should call
	
                <link linkend="n350">EndRefresh()</link>
                 to reset the state of the layer and the window.  Then you
	may proceed with rendering to the entire window as usual.

	You learn that your window needs refreshing by receiving either a
	message of class IDCMP_REFRESHWINDOW through the IDCMP, or an input
	event of class IECLASS_REFRESHWINDOW through the Console device.
	Whenever you are told that your window needs refreshing, you should
	call BeginRefresh() and 
                <link linkend="n350">EndRefresh()</link>
                 to clear the refresh-needed
	state, even if you don't plan on doing any rendering.  You may relieve
	yourself of even this burden by setting the WFLG_NOCAREREFRESH flag
	when opening your window.

    NOTES
	WARNING: You should only perform simple graphics refreshing
	operations between BeginRefresh() and 
                <link linkend="n350">EndRefresh()</link>
                .  These include
	any graphics.library drawing functions or the simple Intuition
	rendering functions (DrawImage(), 
                <link linkend="n395">PrintIText()</link>
                , 
                <link linkend="n346">DrawBorder()</link>
                , and
	so on).  In particular, do not call 
                <link linkend="n398">RefreshGadgets()</link>
                , 
                <link linkend="n399">RefreshGList()</link>
                ,
	
                <link linkend="n400">RefreshWindowFrame()</link>
                , etc., since any of the complex Intuition
	functions run the risk of creating a deadlock.  Also avoid any
	other high-level calls in Intuition or ones that might invoke
	Intuition.  This means no calling 
                <link linkend="n422">SetPointer()</link>
                , no calling
	
                <link linkend="n370">LockIBase()</link>
                , no dos.library functions (since an EasyRequest()
	might result), etc.  Keep it simple.

	By the time the application receives its IDCMP_REFRESHWINDWOW
	message, Intuition has already repaired any damaged regions
	of the window border or the gadgets in the window, so attempts
	to redraw gadgets or borders are as unnecessary as they are
	dangerous.

	ANOTHER WARNING: The concept of multiple refresh passes using
	EndRefresh( w, FALSE ) is not completely sound without further
	protection.  The reason is that between two sessions, more
	damage can occur to your window.  Your final EndRefresh( w, TRUE )
	will dispose of all damage, including the new, and your
	initial refreshing pass will never get the chance to refresh
	the new damage.

	To avoid this, you must protect your session using 
                <link linkend="n763">LockLayerInfo()</link>
                	which will prevent Intuition from performing window operations
	or anything else which might cause further damage from occurring.
	Again, while holding the LayerInfo lock make no Intuition
	function calls dealing with gadgets; just render.

	You can, however, call 
                <link linkend="n759">InstallClipRegion()</link>
                 for the different
	refresh passes, if you have two clip regions.

	SIMILAR WARNING: Your program and Intuition "share" your window
	layer's DamageList.  BeginRefresh() helps arbitrate this
	sharing, but the lower-level function 
                <link linkend="n747">layers.library/BeginUpdate()</link>
                	does not.  It isn't really supported to use 
                <link linkend="n747">BeginUpdate()</link>
                 on
	a window's layer, but if you do--for whatever reason--it is
	critical that you first acquire the LayerInfo lock as in
	the above example: even if you only have one pass of refresh
	rendering to do.  Otherwise, the refreshing of your window's
	borders and gadgets can be incomplete, and the problem might
	occur only under certain conditions of task priority and
	system load.

    EXAMPLE
	Code fragment for "two pass" window refreshing, in response
	to an IDCMP_REFRESHWINDOW message:
	switch ( imsg-&gt;Class )
	{
	...
	case IDCMP_REFRESHWINDOW:
	    window = imsg-&gt;IDCMPWindow;

	    /* this lock only needed for "two-pass" refreshing */
	    LockLayerInfo( &amp;window-&gt;WScreen-&gt;LayerInfo );

	    /* refresh pass for region 1 */
	    origclip = InstallClipRegion( window-&gt;WLayer, region1 );
	    BeginRefresh( window );
	    myRefreshRegion1( window );
	    EndRefresh( window, FALSE );

	    /* refresh pass for region 2 */
	    InstallClipRegion( window-&gt;WLayer, region2 );
	    BeginRefresh( window );
	    myRefreshRegion2( window );
	    EndRefresh( window, TRUE );		/* and dispose damage list */

	    /* restore and unlock */
	    InstallClipRegion( window-&gt;WLayer, origclip );
	    UnlockLayerInfo( &amp;window-&gt;WScreen-&gt;LayerInfo );
	    break;
	...
	}


    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window structure which needs refreshing

    RESULT
	None

    BUGS
	This function should check the return code of
	
                <link linkend="n747">layers.library/BeginUpdate()</link>
                , and abort if that function fails.

    SEE ALSO
       
                <link linkend="n350">EndRefresh()</link>
                , 
                <link linkend="n747">layers.library/BeginUpdate()</link>
                , 
                <link linkend="n391">OpenWindow()</link>
                	
                <link linkend="n759">layer.library/InstallClipRegion()</link>
                , 
                <link linkend="n763">layers.library/LockLayerInfo()</link>
                	The "Windows" chapter of the Intuition Reference Manual
            </literallayout>
        </section>
        <section id="n330">
            <title>intuition.library/BuildEasyRequestArgs</title>
            <literallayout class="monospaced">
                    NAME
	BuildEasyRequestArgs -- Simple creation of system request. (V36)
	BuildEasyRequest -- Varargs stub for BuildEasyRequestArgs(). (V36)

    SYNOPSIS
	ReqWindow = BuildEasyRequestArgs( RefWindow, easyStruct, IDCMP, Args )
	D0                                A0         A1          D0     A3

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *BuildEasyRequestArgs( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 *, ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 );

	ReqWindow = BuildEasyRequest( RefWindow, easyStruct, IDCMP, Arg1, ... )

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *BuildEasyRequest( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 *, ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , ... );

    FUNCTION
	This function is to EasyRequest() as 
                <link linkend="n331">BuildSysRequest()</link>
                 is to
	AutoRequest(): it returns a pointer to the system requester
	window.  The input from that window can then be processed
	under application control.

	It is recommended that this processing be done with
	
                <link linkend="n429">SysReqHandler()</link>
                , so that future enhancement to the
	processing will be enjoyed.

	After you have determined that the requester is satisfied or
	cancelled, you must free this requester using 
                <link linkend="n357">FreeSysRequest()</link>
                .

	Please see the autodoc for EasyRequest().

	NOTE: This function switches the processor stack to ensure
	sufficient stack space for the function to complete.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = reference window for requester: determines the
	    requester window title and screen.
	easyStruct = pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 structure, as described
	    in the EasyRequest() autodocs.
	IDCMP = (NOT A POINTER) provided application specific IDCMP
	    flags for the system requester window.
	Args = see 
                <link linkend="n349">EasyRequestArgs()</link>
                    RESULT
	A pointer to the system request window opened.  In the event
	of problems, you may also be returned the value '0' which
	is to be interpreted as the "FALSE, Cancel" choice, or
	(if you have a second gadget defined) the value '1', which
	is to be taken to mean the equivalent of your corresponding
	left-most gadget.

	If there is a problem creating the window, a recoverable alert may
	be substituted for the requester, and the result, either 0 or 1,
	returned.

    BUGS
	Does not put up alternative alert.
	See also BUGS listed for 
                <link linkend="n349">EasyRequestArgs()</link>
                .

    SEE ALSO
	
                <link linkend="n349">EasyRequestArgs()</link>
                , 
                <link linkend="n357">FreeSysRequest()</link>
                , 
                <link linkend="n429">SysReqHandler()</link>
                ,
	
                <link linkend="n331">BuildSysRequest()</link>
                , 
                <link linkend="n328">AutoRequest()</link>
            </literallayout>
        </section>
        <section id="n331">
            <title>intuition.library/BuildSysRequest</title>
            <literallayout class="monospaced">
                    NAME
	BuildSysRequest -- Build and display a system requester.

    SYNOPSIS
	ReqWindow = BuildSysRequest( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , BodyText, PosText, NegText,
	D0                           A0      A1        A2       A3
		           IDCMPFlags, Width, Height )
			   D0          D1     D2

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *BuildSysRequest( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 *, ULONG, WORD, WORD );

    FUNCTION
	This procedure builds a system requester based on the supplied
	information.  If all goes well and the requester is constructed,
	this procedure returns a pointer to the window in which the requester
	appears.  That window will have its IDCMP initialized to reflect the
	flags found in the IDCMPFlags argument.  You may then wait on those
	ports to detect the user's response to your requester, which response
	may include either selecting one of the gadgets or causing some other
	event to be noticed by Intuition (like IDCMP_DISKINSERTED, for
	instance).  After the requester is satisfied, you should call the
	
                <link linkend="n357">FreeSysRequest()</link>
                 procedure to remove the requester and free up
	any allocated memory.

	See the autodoc for 
                <link linkend="n429">SysReqHandler()</link>
                 for more information on the
	how to handle the IntuiMessages this window will receive.

	The requester used by this function has the NOISYREQ flag bit set,
	which means that the set of IDCMPFlags that may be used here
	include IDCMP_RAWKEY, IDCMP_MOUSEBUTTONS, and others.

	In release previous to V36, if the requester could not be built,
	this function would try to call 
                <link linkend="n341">DisplayAlert()</link>
                 with the same
	information, with more or less favorable results.  In V36,
	the requesters themselves require less memory (SIMPLEREQ), but
	there is no alert attempt.

	The function may return TRUE (1) or FALSE if it cannot post
	the requester.  (V36 will always return FALSE, but be sure to
	test for TRUE in case somebody reinstates the fallback alert.)

	If the window argument you supply is equal to NULL, a new window will
	be created for you in the Workbench screen, or the default
	public screen, for V36.  If you want the requester
	created by this routine to be bound to a particular window (i.e.,
	to appear in the same screen as the window), you should
	not supply a window argument of NULL.

	New for V36: if you pass a NULL window pointer, the system requester
	will appear on the default public screen, which is not always
	the Workbench.

	The text arguments are used to construct the display.  Each is a
	pointer to an instance of the structure 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                .

	The BodyText argument should be used to describe the nature of
	the requester.  As usual with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 data, you may link several
	lines of text together, and the text may be placed in various
	locations in the requester.  This 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 pointer will be stored
	in the ReqText variable of the new requester.

	The PosText argument describes the text that you want associated
	with the user choice of "Yes,  TRUE,  Retry,  Good."  If the requester
	is successfully opened, this text will be rendered in a gadget in
	the lower-left of the requester, which gadget will have the
	GadgetID field set to TRUE.  If the requester cannot be opened and
	the 
                <link linkend="n341">DisplayAlert()</link>
                 mechanism is used, this text will be rendered in
	the lower-left corner of the alert display with additional text
	specifying that the left mouse button will select this choice.  This
	pointer can be set to NULL, which specifies that there is no TRUE
	choice that can be made.

	The NegText argument describes the text that you want associated
	with the user choice of "No,  FALSE,  Cancel,  Bad."  If the requester
	is successfully opened, this text will be rendered in a gadget in
	the lower-right of the requester, which gadget will have the
	GadgetID field set to FALSE.  If the requester cannot be opened and
	the 
                <link linkend="n341">DisplayAlert()</link>
                 mechanism is used, this text will be rendered in
	the lower-right corner of the alert display with additional text
	specifying that the right mouse button will select this choice.  This
	pointer cannot be set to NULL.  There must always be a way for the
	user to cancel this requester.

	The Positive and Negative Gadgets created by this routine have
	the following features:
          - GTYP_BOOLGADGET
          - GACT_RELVERIFY
          - GTYP_REQGADGET
          - GACT_TOGGLESELECT

	When defining the text for your gadgets, you may find it convenient
	to use the special constants used by Intuition for the construction
	of the gadgets.  These include defines like AUTODRAWMODE, AUTOLEFTEDGE,
	AUTOTOPEDGE and AUTOFRONTPEN.  You can find these in your local
	intuition.h (or intuition.i) file.

	These hard-coded constants are not very resolution or font
	sensitive, but V36 will override them to provide more modern
	layout.

	New for V36, linked lists of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 are not correctly supported
	for gadget labels.

	The width and height values describe the size of the requester.  All
	of your BodyText must fit within the width and height of your
	requester.  The gadgets will be created to conform to your sizes.

	VERY IMPORTANT NOTE:  for this release of this procedure, a new window
	is opened in the same screen as the one containing your window.
	Future alternatives may be provided as a function distinct from this
	one.

	NOTE: This function will pop the screen the requester and its
	window appears in to the front of all screens.  New for V36,
	if the user doesn't perform any other screen arrangement before
	finishing with the requester, a popped screen will be pushed
	back behind.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure
	BodyText = pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure
	PosText = pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure
	NegText = pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure
	IDCMPFlags = the IDCMP flags you want used for the initialization of the
           IDCMP of the window containing this requester
	Width, Height = the size required to render your requester

	NOTE for V36: the width and height you pass are ignored, as
	are some of the parameters of your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                , so that Intuition
	can make the Requesters real nice for the new look.

    RESULT
	If the requester was successfully created, the value
	returned by this procedure is a pointer to the window in which the
	requester is rendered.  If the requester could not be created,
	this routine might have called 
                <link linkend="n341">DisplayAlert()</link>
                 before returning
	(it depends on the version) and will pass back TRUE if the user
	pressed the left mouse button and FALSE if the user pressed the
	right mouse button.   If the version of Intuition doesn't
	call 
                <link linkend="n341">DisplayAlert()</link>
                , or if it does, and there's not enough
	memory for the alert, the value of FALSE is returned.

    BUGS
	This procedure currently opens a window in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 which
	contains the window which is passed as a parameter, or the
	default public screen, if that parameter is NULL.  Although
	not as originally envisioned, this will probably always be the
	behavior of this function.

	
                <link linkend="n341">DisplayAlert()</link>
                 is not called in version V36.

	It's almost impossible to make complete, correct account
	of different system fonts, window border dimensions, and
	screen resolution to get the layout of a System 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                	just right using this routine.  For V36, we recommend the
	automatic layout implemented in 
                <link linkend="n330">BuildEasyRequestArgs()</link>
                 and
	
                <link linkend="n349">EasyRequestArgs()</link>
                .

    SEE ALSO
	
                <link linkend="n357">FreeSysRequest()</link>
                , 
                <link linkend="n341">DisplayAlert()</link>
                , 
                <link linkend="n375">ModifyIDCMP()</link>
                , 
                <link linkend="n299">exec.library/Wait()</link>
                ,
	
                <link linkend="n407">Request()</link>
                , 
                <link linkend="n328">AutoRequest()</link>
                , 
                <link linkend="n349">EasyRequestArgs()</link>
                , 
                <link linkend="n330">BuildEasyRequestArgs()</link>
            </literallayout>
        </section>
        <section id="n332">
            <title>intuition.library/ChangeScreenBuffer</title>
            <literallayout class="monospaced">
                    NAME
	ChangeScreenBuffer -- Swap the screen's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                . (V39)

    SYNOPSIS
	success = ChangeScreenBuffer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 )
	D0                            A0      A1

	ULONG ChangeScreenBuffer( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 * );

    FUNCTION
	Performs double (or multiple) buffering on an Intuition screen
	in an Intuition-cooperative manner.  The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 associated
	with the supplied 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 will be installed in the
	specified screen, if possible.  The previously-installed 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                	is available for re-use upon receiving a signal from
	graphics.library.  See the graphics.library autodocs for
	
                <link linkend="n585">graphics.library/AllocDBufInfo()</link>
                 and 
                <link linkend="n613">graphics.library/ChangeVPBitMap()</link>
                	for details.

    INPUTS
	Screen: pointer to the screen whose bitmap is to be swapped.
	ScreenBuffer: pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 structure obtained from
	    
                <link linkend="n327">AllocScreenBuffer()</link>
                .

    RESULT
	Returns non-zero if the operation succeeded.  Returns zero
	if the operation cannot be performed.  This function will
	fail if Intuition's state cannot permit it, for example the
	user is playing with menus or gadgets.

    NOTES
	It is not required to restore the original 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                	before closing the screen. Simply 
                <link linkend="n355">FreeScreenBuffer()</link>
                 each
	buffer (including the original and the currently-installed one)
	then close the screen.	Of course, you cannot call
	ChangeScreenBuffer() after freeing the currently-installed one.

    BUGS

    SEE ALSO
	
                <link linkend="n327">AllocScreenBuffer()</link>
                , 
                <link linkend="n355">FreeScreenBuffer()</link>
                ,
	
                <link linkend="n613">graphics.library/ChangeVPBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n333">
            <title>intuition.library/ChangeWindowBox</title>
            <literallayout class="monospaced">
                    NAME
	ChangeWindowBox -- Change window position and dimensions. (V36)

    SYNOPSIS
	ChangeWindowBox( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , Left, Top, Width, Height )
			 A0	 D0    D1   D2     D3

	VOID ChangeWindowBox( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, WORD, WORD, WORD, WORD );

    FUNCTION
	Makes simultaneous changes in window position and dimensions,
	in absolute (not relative) coordinates.

	Like 
                <link linkend="n378">MoveWindow()</link>
                 and 
                <link linkend="n428">SizeWindow()</link>
                , the effect of this function
	is deferred until the next input comes along.  Unlike these
	functions, ChangeWindowBox() specifies absolute window position
	and dimensions, not relative.  This makes for more reliable
	results considering that the action is deferred, so this
	function is typically preferable to 
                <link linkend="n378">MoveWindow()</link>
                 and 
                <link linkend="n428">SizeWindow()</link>
                	paired.

	You can detect that this operation has completed by receiving
	the IDCMP_CHANGEWINDOW IDCMP message

	The dimensions are limited to legal range, but you should still
	take care to specify sensible inputs based on the window's dimension
	limits and the size of its screen.

	This function limits the position and dimensions to legal
	values.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = the window to change position/dimension
	Left, Top, Width, Height = new position and dimensions

    RESULT
	Position and dimension are changed to your specification,
	or as close as possible.
	Returns nothing.

    BUGS

    SEE ALSO
	
                <link linkend="n378">MoveWindow()</link>
                , 
                <link linkend="n428">SizeWindow()</link>
                , 
                <link linkend="n441">ZipWindow()</link>
                ,
	
                <link linkend="n767">layers.library/MoveSizeLayer()</link>
            </literallayout>
        </section>
        <section id="n334">
            <title>intuition.library/ClearDMRequest</title>
            <literallayout class="monospaced">
                    NAME
	ClearDMRequest -- Clear (detaches) the DMRequest of the window.

    SYNOPSIS
	Response = ClearDMRequest( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
	D0			   A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ClearDMRequest( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Attempts to clear the DMRequest from the specified window,
	that is detaches the special requester that you attach to
	the double-click of the menu button which the user can then
	bring up on demand.  This routine WILL NOT clear the DMRequest
	if it's active (in use by the user). The IDCMP message class
	IDCMP_REQCLEAR can be used to detect that the requester is not in use,
	but that message is sent only when the last of perhaps several
	requesters in use in a window is terminated.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window from which the DMRequest is to be cleared.

    RESULT
	If the DMRequest was not currently in use, detaches the DMRequest
	from the window and returns TRUE.

	If the DMRequest was currently in use, doesn't change anything
	and returns FALSE.

    BUGS

    SEE ALSO
	
                <link linkend="n417">SetDMRequest()</link>
                , 
                <link linkend="n407">Request()</link>
            </literallayout>
        </section>
        <section id="n335">
            <title>intuition.library/ClearMenuStrip</title>
            <literallayout class="monospaced">
                    NAME
	ClearMenuStrip -- Clear (detach) the menu strip from the window.

    SYNOPSIS
	ClearMenuStrip( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		        A0

	VOID ClearMenuStrip( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Detaches the current menu strip from the window; menu strips
	are attached to windows using the 
                <link linkend="n420">SetMenuStrip()</link>
                 function
	(or, for V36, 
                <link linkend="n408">ResetMenuStrip()</link>
                 ).

	If the menu is in use (for that matter if any menu is in use)
	this function will block (Wait()) until the user has finished.

	Call this function before you make any changes to the data
	in a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">MenuItem</ulink>
                 structure which is part of a menu
	strip linked into a window.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a window structure

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n420">SetMenuStrip()</link>
                , 
                <link linkend="n408">ResetMenuStrip()</link>
            </literallayout>
        </section>
        <section id="n336">
            <title>intuition.library/ClearPointer</title>
            <literallayout class="monospaced">
                    NAME
	ClearPointer -- Clear the mouse pointer definition from a window.

    SYNOPSIS
	ClearPointer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		      A0

	VOID ClearPointer( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Clears the window of its own definition of the Intuition mouse pointer.
	After calling ClearPointer(), every time this window is the active
	one the default Intuition pointer will be the pointer displayed
	to the user.  If your window is the active one when this routine
	is called, the change will take place immediately.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/custom.h">Custom</ulink>
                 definitions of the mouse pointer which this function clears
	are installed by a call to 
                <link linkend="n422">SetPointer()</link>
                .

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window to be cleared of its pointer definition

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n425">SetWindowPointerA()</link>
                , 
                <link linkend="n422">SetPointer()</link>
            </literallayout>
        </section>
        <section id="n337">
            <title>intuition.library/CloseScreen</title>
            <literallayout class="monospaced">
                    NAME
	CloseScreen -- 
                <link linkend="n49">Close</link>
                 an Intuition screen.

    SYNOPSIS
	Success = CloseScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 )
	D0 (V36)               A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 CloseScreen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 * );
	/* returns 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 in V36 and greater */

    FUNCTION
	Unlinks the screen, unlinks the viewport, deallocates everything that
	Intuition allocated when the screen was opened (using 
                <link linkend="n389">OpenScreen()</link>
                ).
	Doesn't care whether or not there are still any windows attached to the
	screen.  Doesn't try to close any attached windows; in fact, ignores
	them altogether (but see below for changes in V36).

	If this is the last screen to go, attempts to reopen Workbench.

	New for V36: this function will refuse to close the screen
	if there are windows open on the screen or if there are any
	outstanding screen locks (see 
                <link linkend="n371">LockPubScreen()</link>
                ) when
	CloseScreen() is called.  This avoids the almost certain crash
	when a screen is closed out from under a window.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to the screen to be closed.

    RESULT
	New for V36: returns TRUE (1) if screen is closed,
	returns FALSE (0) if screen had open windows when
	called.

    BUGS

    SEE ALSO
	
                <link linkend="n389">OpenScreen()</link>
            </literallayout>
        </section>
        <section id="n338">
            <title>intuition.library/CloseWindow</title>
            <literallayout class="monospaced">
                    NAME
	CloseWindow -- 
                <link linkend="n49">Close</link>
                 an Intuition window.

    SYNOPSIS
	CloseWindow( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		     A0

	VOID CloseWindow( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Closes an Intuition window.  Unlinks it from the system, deallocates
	its memory, and makes it disappear.

	When this function is called, all IDCMP messages which have been sent
	to your window are deallocated.  If the window had shared a message
	Port with other windows, you must be sure that there are no unreplied
	messages for this window in the message queue.  Otherwise, your program
	will try to make use of a linked list (the queue) which contains free
	memory (the old messages).  This will give you big problems.
	See the code fragment CloseWindowSafely(), below.

	NOTE:  If you have added a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 strip to this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 (via
	a call to 
                <link linkend="n420">SetMenuStrip()</link>
                ) you must be sure to remove that 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 strip
	(via a call to 
                <link linkend="n335">ClearMenuStrip()</link>
                ) before closing your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                .

	NOTE: This function may block until it is safe to de-link and free
	your window.  Your program may thus be suspended while the user
	plays with gadgets, menus, or window sizes and position.

	New for V36: If your window is a "Visitor Window" (see OpenWindow)
	CloseWindow will decrement the "visitor count" in the public screen
	on which the window was open.  When the last visitor window is
	closed, a signal will be sent to the public screen task, if this
	was pre-arranged (see OpenScreen).

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n391">OpenWindow()</link>
                , 
                <link linkend="n389">OpenScreen()</link>
                , 
                <link linkend="n337">CloseScreen()</link>
                    EXAMPLE
    /*	CloseWindowSafely */

	/* these functions close an Intuition window
	 * that shares a port with other Intuition
	 * windows or IPC customers.
	 *
	 * We are careful to set the UserPort to
	 * null before closing, and to free
	 * any messages that it might have been
	 * sent.
	 */
	#include "exec/types.h"
	#include "exec/nodes.h"
	#include "exec/lists.h"
	#include "exec/ports.h"
	#include "intuition/intuition.h"

	CloseWindowSafely( win )
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *win;
	{
	    /* we forbid here to keep out of race conditions with Intuition */
	    Forbid();

	    /* send back any messages for this window
	     * that have not yet been processed
	     */
	    StripIntuiMessages( win-&gt;UserPort, win );

	    /* clear UserPort so Intuition will not free it */
	    win-&gt;UserPort = NULL;

	    /* tell Intuition to stop sending more messages */
	    ModifyIDCMP( win, 0L );

	    /* turn multitasking back on */
	    Permit();

	    /* and really close the window */
	    CloseWindow( win );
	}

	/* remove and reply all IntuiMessages on a port that
	 * have been sent to a particular window
	 * (note that we don't rely on the ln_Succ pointer
	 *  of a message after we have replied it)
	 */
	StripIntuiMessages( mp, win )
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *mp;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *win;
	{
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiMessage</ulink>
                 *msg;
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 *succ;

	    msg = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiMessage</ulink>
                 *) mp-&gt;mp_MsgList.lh_Head;

	    while( succ =  msg-&gt;ExecMessage.mn_Node.ln_Succ ) {

		if( msg-&gt;IDCMPWindow ==  win ) {

		    /* Intuition is about to free this message.
		     * Make sure that we have politely sent it back.
		     */
		    Remove( msg );

		    ReplyMsg( msg );
		}

		msg = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiMessage</ulink>
                 *) succ;
	    }
	}
            </literallayout>
        </section>
        <section id="n339">
            <title>intuition.library/CloseWorkBench</title>
            <literallayout class="monospaced">
                    NAME 
	CloseWorkBench -- Closes the Workbench screen.

    SYNOPSIS 
	Success = CloseWorkBench()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 CloseWorkBench( VOID );

    FUNCTION 
	This routine attempts to close the Workbench screen:
       -   Test whether or not any applications have opened windows on the
           Workbench, and return FALSE if so.  Otherwise ...
       -   Clean up all special buffers
       -   
                <link linkend="n49">Close</link>
                 the Workbench screen
       -   Make the Workbench program mostly inactive (it will still
           monitor disk activity)
       -   Return TRUE

    INPUTS 
	None

    RESULT 
	TRUE if the Workbench screen closed successfully
	FALSE if the Workbench was not open, or if it has windows
	    open which are not Workbench drawers.

   NOTES
	This routine has been drastically rewritten for V36.
	It is much more solid, although we haven't eliminated
	all the problem cases yet.

    BUGS 
	The name of this function is improperly spelled.  It ought
	to have been CloseWorkbench().

	It might be more convenient to have it return TRUE if the
	Workbench wasn't opened when called.  The idea as it is now
	is probably this: if you want to free up the memory of the
	Workbench screen when your program begins, you can call
	CloseWorkBench().  The return value of that call indicates
	whether you should call 
                <link linkend="n393">OpenWorkBench()</link>
                 when your program
	exits: if FALSE, that means either the the Workbench existed
	but you could not close it, or that it wasn't around to
	begin with, and you should not try to re-open it.

	We would prefer that you provide a user selection to attempt
	to open or close the Workbench screen from within your application,
	rather than your making assumptions like these.

    SEE ALSO 
	
                <link linkend="n393">OpenWorkBench()</link>
            </literallayout>
        </section>
        <section id="n340">
            <title>intuition.library/CurrentTime</title>
            <literallayout class="monospaced">
                    NAME
	CurrentTime -- Get the current time values.

    SYNOPSIS
	CurrentTime( Seconds, Micros )
		     A0       A1

	VOID CurrentTime( ULONG *, ULONG * );

    FUNCTION
	Puts copies of the current time into the supplied argument pointers.

	This time value is not extremely accurate, nor is it of a very fine
	resolution.  This time will be updated no more than sixty times a
	a second, and will typically be updated far fewer times a second.

    INPUTS
	Seconds = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 variable to receive the current seconds
	    value
	Micros = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 variable for the current microseconds value

    RESULT
	Puts the time values into the memory locations specified by the
	    arguments
	Return value is not defined.

    BUGS

    SEE ALSO
	
                <link linkend="n544">timer.device/TR_GETSYSTIME</link>
            </literallayout>
        </section>
        <section id="n341">
            <title>intuition.library/DisplayAlert</title>
            <literallayout class="monospaced">
                    NAME
	DisplayAlert -- Create the display of an alert message.

    SYNOPSIS
	Response = DisplayAlert( AlertNumber, String, Height )
	D0			 D0           A0      D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 DisplayAlert( ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	Creates an alert display with the specified message.

	If the system can recover from this alert, it's a RECOVERY_ALERT and
	this routine waits until the user presses one of the mouse buttons,
	after which the display is restored to its original state and a
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 value is returned by this routine to specify whether or not
	the user pressed the LEFT mouse button.

	If the system cannot recover from this alert, it's a DEADEND_ALERT
	and this routine returns immediately upon creating the alert display.
	The return value is FALSE.

	NOTE: Starting with V33, if Intuition can't get enough
	memory for a RECOVERY_ALERT, the value FALSE will be returned.

	AlertNumber is a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 value, historically related to the value
	sent to the 
                <link linkend="n200">Alert()</link>
                 routine.  But the only bits that are pertinent to
	this routine are the ALERT_TYPE bit(s).  These bits must be set to
	either RECOVERY_ALERT for alerts from which the system may safely
	recover, or DEADEND_ALERT for those fatal alerts.  These states are
	described in the paragraph above.   There is a third type of
	alert, the DAISY_ALERT, which is used only by the Exec.

	The string argument points to an AlertMessage string.  The AlertMessage
	string is comprised of one or more substrings, each of which is
	composed of the following components:
           - first, a 16-bit x-coordinate and an 8-bit y-coordinate,
             describing where on the alert display you want this string
             to appear.  The y-coordinate describes the offset to the
             baseline of the text.
           - then, the bytes of the string itself, which must be
             null-terminated (end with a byte of zero)
           - lastly, the continuation byte, which specifies whether or
             not there's another substring following this one.  If the
             continuation byte is non-zero, there IS another substring
             to be processed in this alert message.  If the continuation
             byte is zero, this is the last substring in the message.

	The last argument, Height, describes how many video lines tall you
	want the alert display to be.

	New for V36: Alerts are always rendered in Topaz 8 (80 column font),
	regardless of the system default font.  Also, RECOVERY_ALERTs are
	displayed in amber, while DEADEND_ALERTs are still red.  Alerts
	no longer push down the application screens to be displayed.  Rather,
	they appear alone in a black display.

	Also new for V36: Alerts block each other out, and input
	during an alert is deprived of the rest of the system.  Internal
	input buffers still cause alert clicks to be processed by
	applications sometimes.

    INPUTS
	AlertNumber = the number of this alert message.  The only pertinent
	    bits of this number are the ALERT_TYPE bit(s).  The rest of the
           number is ignored by this routine.
	String = pointer to the alert message string, as described above
	Height = minimum display lines required for your message

    RESULT
	A 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 value of TRUE or FALSE.  If this is a DEADEND_ALERT, FALSE
	is always the return value.  If this is a RECOVERY_ALERT. The return
	value will be TRUE if the user presses the left mouse button in
	response to your message, and FALSE if the user presses the right hand
	button is response to your text, or if the alert could not
	be posted.

    BUGS
	If the system is worse off than you think, the level of your alert
	may become DEADEND_ALERT without you ever knowing about it.  This
	will NOT happen due simply to low memory.  Rather, the alert
	display will be skipped, and FALSE will be returned.

	The left and right button clicks satisfying the alerts are
	unfortunately passed to	the normal applications, because of
	some internal system input buffering.

    SEE ALSO
	
                <link linkend="n430">TimedDisplayAlert()</link>
                
            </literallayout>
        </section>
        <section id="n342">
            <title>intuition.library/DisplayBeep</title>
            <literallayout class="monospaced">
                    NAME
	DisplayBeep -- Flash the video display.

    SYNOPSIS
	DisplayBeep( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 )
		     A0

	VOID DisplayBeep( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 * );

    FUNCTION
	"Beeps" the video display by flashing the background color of the
	specified screen.  If the screen argument is NULL, every screen
	in the display will be beeped.  Flashing everyone's screen is not
	a polite thing to do, so this should be reserved for dire
	circumstances.

	The reason such a routine is supported is because the Amiga has
	no internal bell or speaker.  When the user needs to know of
	an event that is not serious enough to require the use of a requester,
	the DisplayBeep() function may be called.

	New for V36:  Intuition now calls DisplayBeep through the
	external library vector.  This means that if you call 
                <link linkend="n285">SetFunction()</link>
                	to replace DisplayBeep with an audible beep, for example, then
	your change will affect even Intuition's calls to DisplayBeep.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to a screen.  If NULL, every screen in the display
           will be flashed

    RESULT
	None

    NOTES
	Since this function changes color zero of the affected screen(s),
	surprising results could occur if the screen's owner reading
	colors or perhaps cycling them.

    BUGS

    SEE ALSO

            </literallayout>
        </section>
        <section id="n343">
            <title>intuition.library/DisposeObject</title>
            <literallayout class="monospaced">
                    NAME
	DisposeObject -- Deletes a 'boopsi' object. (V36)

    SYNOPSIS
	DisposeObject( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 )
	               A0

	VOID DisposeObject( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 );

    FUNCTION
	Deletes a boopsi object and all of it auxiliary data.
	These objects are all created by 
                <link linkend="n381">NewObject()</link>
                .  Objects
	of certain classes "own" other objects, which will also
	be deleted when the object is passed to DisposeObject().
	
                <link linkend="n136">Read</link>
                 the per-class documentation carefully to be aware
	of these instances.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 = abstract pointer to a boopsi object returned by 
                <link linkend="n381">NewObject()</link>
                .
		The pointer may be NULL, in which case this function has
		no effect.

    NOTES
	This function invokes the OM_DISPOSE method.

    RESULT
	None.

    BUGS

    SEE ALSO
	
                <link linkend="n381">NewObject()</link>
                , SetAttrs(), 
                <link linkend="n359">GetAttr()</link>
                , 
                <link linkend="n373">MakeClass()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.
            </literallayout>
        </section>
        <section id="n344">
            <title>intuition.library/DoGadgetMethodA</title>
            <literallayout class="monospaced">
                    NAME
	DoGadgetMethodA -- Invoke method on a boopsi gadget. (V39)
	DoGadgetMethod -- Varargs stub for DoGadgetMethodA(). (V39)

    SYNOPSIS
	result = DoGadgetMethodA( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 )
	D0		          A0      A1      A2         A3

	ULONG DoGadgetMethodA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Msg</ulink>
                 );

	result = DoGadgetMethod( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                , MethodID, ...)

	ULONG DoGadgetMethod( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, ULONG, ... );

    FUNCTION
	Same as the 
                <link linkend="n511">DoMethod()</link>
                 function of amiga.lib, but provides context
	information and arbitration for classes which implement custom
	Intuition gadgets.

	You should use this function for boopsi gadget objects,
	or for "models" which propagate information to gadgets.

	Unlike 
                <link linkend="n511">DoMethod()</link>
                , this function provides a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                 pointer
	(if possible) when invoking the method.  Some classes may
	require or benefit from this.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = abstract pointer to a boopsi gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = window gadget has been added to using 
                <link linkend="n325">AddGList()</link>
                 or 
                <link linkend="n324">AddGadget()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = for REQGADGETs, requester containing the gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Msg</ulink>
                 = the boopsi message to send

    RESULT
	The object does whatever it wants with the message you sent,
	which might include updating its gadget visuals.

	The return value is defined per-method.

    NOTES
	This function invokes the specified method with a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                	derived from the 'Window' and 'Requester' pointers.  The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                	is passed as the second parameter of the message, except for
	OM_NEW, OM_SET, OM_NOTIFY, and OM_UPDATE, where the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                	is passed as the third parameter.

	Implementers of new gadget methods should ensure that the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                 is the second long-word of their message!

    SEE ALSO
	
                <link linkend="n381">NewObject()</link>
                , 
                <link linkend="n343">DisposeObject()</link>
                , 
                <link linkend="n359">GetAttr()</link>
                , 
                <link linkend="n373">MakeClass()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.
            </literallayout>
        </section>
        <section id="n345">
            <title>intuition.library/DoubleClick</title>
            <literallayout class="monospaced">
                    NAME
	DoubleClick -- Test two time values for double-click timing.

    SYNOPSIS
	IsDouble = DoubleClick( StartSecs, StartMicros,
	D0                      D0         D1
		CurrentSecs, CurrentMicros )
		D2           D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 DoubleClick( ULONG, ULONG, ULONG, ULONG );

    FUNCTION
	Compares the difference in the time values with the double-click
	timeout range that the user has set (using the "Preferences" tool) or
	some other program has configured into the system.  If the
	difference between the specified time values is within the current
	double-click time range, this function returns TRUE, else it
	returns FALSE.

       These time values can be found in input events and IDCMP messages.
       The time values are not perfect; however, they are precise enough for
       nearly all applications.

    INPUTS
	StartSeconds, StartMicros = the timestamp value describing the start of
          the double-click time period you are considering
	CurrentSeconds, CurrentMicros = the timestamp value describing
          the end of the double-click time period you are considering

    RESULT
	If the difference between the supplied timestamp values is within the
	double-click time range in the current set of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                , this
	function returns TRUE, else it returns FALSE

    BUGS

    SEE ALSO
	
                <link linkend="n340">CurrentTime()</link>
            </literallayout>
        </section>
        <section id="n346">
            <title>intuition.library/DrawBorder</title>
            <literallayout class="monospaced">
                    NAME
	DrawBorder -- 
                <link linkend="n629">Draw</link>
                 the specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Border</ulink>
                 structure into a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

    SYNOPSIS
	DrawBorder( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Border</ulink>
                , LeftOffset, TopOffset )
		    A0        A1      D0          D1

	VOID DrawBorder( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Border</ulink>
                 *, WORD, WORD );

    FUNCTION
	First, sets up the draw mode and pens in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 according to the
	arguments of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Border</ulink>
                 structure.  Then, draws the vectors of
	the border argument into the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , offset by the left and top
	offsets.

	As with all graphics rendering routines, the border will be clipped to
	to the boundaries of the RastPort's layer, if it exists.  This is
	the case with window RastPorts.

	This routine will draw all borders in the NULL-terminated list linked
	by the NextBorder field of the border argument.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to receive the border rendering
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Border</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Border</ulink>
                 structure
	LeftOffset = the offset to be added to each vector's x coordinate
	TopOffset = the offset to be added to each vector's y coordinate

    RESULT
	None

    BUGS

    SEE ALSO

            </literallayout>
        </section>
        <section id="n347">
            <title>intuition.library/DrawImage</title>
            <literallayout class="monospaced">
                    NAME
	DrawImage -- 
                <link linkend="n629">Draw</link>
                 the specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 structure into a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

    SYNOPSIS
	DrawImage( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                , LeftOffset, TopOffset )
		   A0        A1     D0          D1

	VOID DrawImage( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                	*, WORD, WORD );

    FUNCTION
	First, sets up the draw mode and pens in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 according to the
	arguments of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 structure.  Then, moves the image data of
	the image argument into the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , offset by the left and top
	offsets.

	This routine does window layer clipping if you pass your window's
	(layered) 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 -- if you draw an image outside of your window,
	your imagery will be clipped at the window's edge.  If you pass
	a (non-layered) screen 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , you MUST be sure your image is
	wholly contained within the rastport bounds.

	If the NextImage field of the image argument is non-NULL,
	the next image is rendered as well, and so on until some
	NextImage field is found to be NULL.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to receive image rendering
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 = pointer to an image structure
	LeftOffset = the offset which will be added to the image's x coordinate
	TopOffset = the offset which will be added to the image's y coordinate

    RESULT
	None

    NOTES
	Intuition always has and will continue to assume there are
	at least as many planes of data pointed to by ImageData as there
	are '1' bits in the PlanePick field.  Please ensure that
	this is so.  (See the intuition.h include file for full details
	on using PlanePick).

    BUGS

    SEE ALSO
	
                <link linkend="n348">DrawImageState()</link>
                , 
                <link linkend="n352">EraseImage()</link>
            </literallayout>
        </section>
        <section id="n348">
            <title>intuition.library/DrawImageState</title>
            <literallayout class="monospaced">
                   NAME	
	DrawImageState -- 
                <link linkend="n629">Draw</link>
                 an (extended) Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 with
		special visual state. (V36)

   SYNOPSIS
	DrawImageState( RPort, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                , LeftOffset, TopOffset, State, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 )
			A0     A1     D0          D1         D2     A2

	VOID DrawImageState( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 *,
		WORD, WORD, ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 * );

   FUNCTION
	This function draws an Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 structure in a variety of
	"visual states," which are defined by constants in
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/imageclass.h">intuition/imageclass.h</ulink>
                .  These include:
	IDS_NORMAL		- like 
                <link linkend="n347">DrawImage()</link>
                	IDS_SELECTED		- represents the "selected state" of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                	IDS_DISABLED		- the "ghosted state" of a gadget
	IDS_BUSY		- for future functionality
	IDS_INDETERMINATE	- for future functionality
	IDS_INACTIVENORMAL	- for gadgets in window border
	IDS_INACTIVESELECTED	- for gadgets in window border
	IDS_INACTIVEDISABLED	- for gadgets in window border

	Only IDS_NORMAL will make sense for traditional 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 structures,
	this function is more useful when applied to new custom images
	or "object-oriented image classes."

	Each class of custom images is responsible for documenting which
	visual states it supports, and you typically want to use images
	which support the appropriate states with your custom gadgets.

	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 parameter provides information invaluable to
	"rendered" images, such as pen color and resolution.  Each
	image class must document whether this parameter is required.

   INPUTS
 	RPort	- 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 for rendering
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                	- pointer to a (preferably custom) image
	LeftOffset,RightOffset - positional offsets in pixels
	State	- visual state selected from above
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 - pointer to packed of pen selections and resolution.

   RESULT
 	None.

   EXAMPLE
	Provided separately in the DevCon '90 disk set.

   NOTES


   BUGS


   SEE ALSO
	
                <link linkend="n347">DrawImage()</link>
                , 
                <link linkend="n364">GetScreenDrawInfo()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/imageclass.h">intuition/imageclass.h</ulink>
                
            </literallayout>
        </section>
        <section id="n349">
            <title>intuition.library/EasyRequestArgs</title>
            <literallayout class="monospaced">
                    NAME
	EasyRequestArgs -- Easy alternative to 
                <link linkend="n328">AutoRequest()</link>
                . (V36)
	EasyRequest -- Varargs stub for EasyRequestArgs(). (V36)

    SYNOPSIS
	num = EasyRequestArgs( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , easyStruct, IDCMP_ptr, ArgList )
	D0                     A0      A1          A2         A3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 EasyRequestArgs( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 *,
		ULONG *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 );

	num = EasyRequest( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , easyStruct, IDCMP_ptr, Arg1, Arg2, ... )

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 EasyRequest( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 *,
		ULONG *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , ... );

	( from intuition.h )
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 {
	    ULONG	es_StructSize;
	    ULONG	es_Flags;
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                	*es_Title;
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                	*es_TextFormat;
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                	*es_GadgetFormat;
	};

    FUNCTION
	This function provides a simpler method of using a 'System
	Requester' than provided by 
                <link linkend="n328">AutoRequest()</link>
                .  It performs layout
	and size calculations sensitive to the current font and screen
	resolution.

	It provides for the descriptive 'body' text and the gadget
	text to be constructed from 'printf' style format strings.

	It also provides a general way for the requester to be
	sensitive to particular IDCMP messages.

	The first function listed is the actual Intuition library
	function.  It is passed the arguments for the formatting
	operations as a pointer to the first argument.

	The second function uses a C-style variable number of argument
	(varargs) calling convention.  It should be implemented as
	a call to the first function, and might be supplied by your
	compiler vendor, in amiga.lib, or using the first example below,
	for most C compilers.

	NOTE: The formatting is done by 
                <link linkend="n268">exec.library/RawDoFmt()</link>
                , so
	be aware that to display a 32-bit integer argument, for
	example, you must say "%ld", not "%d", since 
                <link linkend="n268">RawDoFmt()</link>
                 is
	"word-oriented."

	NOTE: This function switches the processor stack to ensure
	sufficient stack space for the function to complete.

    EXAMPLES
	/* varargs interface works for most C compilers */
	EasyRequest( w, es, ip, arg1 )
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                	*w;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 *es;
	ULONG		  *ip;
	int		  arg1;
	{
	    return ( EasyRequestArgs( w, es, ip, &amp;arg1 ) );
	}

	/*********************************************/

	/* typical use */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 volumeES = {
	    sizeof (struct EasyStruct),
	    0,
	    "Volume Request",
	    "Please insert volume %s in any drive.",
	    "Retry|Cancel",
	};
	#define CANCEL	(0)

	Volume	*
	getVolume( volname )
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                	*volname;
	{
	    Volume	*vptr;
	    Volume	*findVolume();
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                	reply;
	    ULONG	iflags;

	    iflags = IDCMP_DISKINSERTED;

	while ( ((vptr = findVolume( volname )) == NULL) &amp;&amp;
	 (EasyRequest( w, &amp;volumeES, &amp;iflags, volname ) != CANCEL) )
		/* loop */ ;

	    /* note that in some circumstances, you will have to
	       re-initialize the value of 'iflags'.  Here, it
	       is either unchanged, or returned as the single
	       IDCMPFlag value IDCMP_DISKINSERTED.  If you combine
	       multiple  IDCMPFlag values in 'iflags,' only
	       one will be returned, so you must reinitialize
	       'iflags' to be the combination.
	      */
	    return ( vptr );
	}

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = Reference window pointer, determines the screen and
	    title of the requester window.  This can be NULL, which
	    means the requester is to appear on the Workbench screen,
	    or default public screen, if defined.
	IDCMP_ptr = Pointer to IDCMP flags that you want to terminate
		the requester.  This pointer may be NULL.
	easyStruct = Pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 structure with fields
		interpreted as follows:

	es_StructSize = sizeof (struct EasyStruct), for future extension.
	es_Flags = 0 for now, in the future may specify other options.
	es_Title = Title of system requester window.  If this is NULL,
	    the title will be taken to be the same as the title of 'Window',
	    if provided, or else "System Request."
	es_TextFormat = 
                <link linkend="n83">Format</link>
                 string, a la 
                <link linkend="n268">RawDoFmt()</link>
                , for message in
	    requester body.  Lines are separated by the newline character.
	    This character is represented in C by '\n', in the Amiga Shell
	    by "*N", etc.  Formatting '%' functions are supported exactly
	    as in 
                <link linkend="n268">RawDoFmt()</link>
                .
	es_GadgetFormat = 
                <link linkend="n83">Format</link>
                 string for gadgets.  
                <link linkend="n730">Text</link>
                 for separate
	    gadgets is separated by '|'.  
                <link linkend="n83">Format</link>
                 functions are supported.
	    You MUST specify at least one gadget.

	ArgList = Arguments for format commands.   Arguments for
	    GadFmt follow arguments for TextFmt.

    RESULT
	0, 1, ..., N = Successive GadgetID values, for the gadgets
	    you specify for the requester.  NOTE: The numbering
	    from left to right is actually: 1, 2, ..., N, 0.
	    This is for compatibility with 
                <link linkend="n328">AutoRequest()</link>
                , which has
	    FALSE for the rightmost gadget.

	-1 = Means that one of the caller-supplied IDCMPFlags occurred.
	    The IDCMPFlag value is in the longword pointed to by IDCMP_ptr.

    NOTES
	When DOS brings up EasyRequests() on your process (eg.
	"Please insert volume XXX in any drive", they normally come
	up on the default public screen, which is usually the Workbench
	screen.  If you set your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 pr_WindowPtr field to point to
	one of your windows, then DOS will bring its requesters up on the
	same screen as that window.  A pr_WindowPtr of -1 prevents
	requesters from coming up at all.
	(Some FileSystem requesters cannot be redirected or supressed).

    BUGS
	Does not fall back to a recoverable alert if the requester
	 cannot be created.

	Does not handle case when gadgets don't fit or window title
	is too long, although it does trim trailing spaces from the
	title for calculating dimensions.

    PLANS
	Possible enhancements include: centering of text, size-sensitive
	layout,  window-relative requester, vertical gadget layout,
	window placement, more keyboard shortcuts.

	We also reserve the use of the newline character ('\n') in
	gadget format strings for future use as a line separator.

    SEE ALSO
	
                <link linkend="n268">exec.library/RawDoFmt()</link>
                , 
                <link linkend="n330">BuildEasyRequestArgs()</link>
                , 
                <link linkend="n429">SysReqHandler()</link>
                ,
	
                <link linkend="n328">AutoRequest()</link>
                , 
                <link linkend="n331">BuildSysRequest()</link>
            </literallayout>
        </section>
        <section id="n350">
            <title>intuition.library/EndRefresh</title>
            <literallayout class="monospaced">
                    NAME
	EndRefresh -- End the optimized refresh state of the window.

    SYNOPSIS
	EndRefresh( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , Complete )
		    A0      D0

	VOID EndRefresh( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 );

    FUNCTION
	This function gets you out of the special refresh state of your
	window.  It is called following a call to 
                <link linkend="n329">BeginRefresh()</link>
                , which
	routine puts you into the special refresh state.  While your window
	is in the refresh state, the only rendering that will be wrought in
	your window will be to those areas which were recently revealed and
	need to be refreshed.

	After you've done all the refreshing you want to do for this window,
	you should call this routine to restore the window to its
	non-refreshing state.  Then all rendering will go to the entire
	window, as usual.

	The 'Complete' argument is a boolean TRUE or FALSE value used to
	describe whether or not the refreshing you've done was all the
	refreshing that needs to be done at this time.  Most often, this
	argument will be TRUE.  But if, for instance, you have multiple
	tasks or multiple procedure calls which must run to completely
	refresh the window, then each can call its own Begin/EndRefresh()
	pair with a Complete argument of FALSE, and only the last calls
	with a Complete argument of TRUE.

	WARNING:  Passing this function the value of FALSE has its
	pitfalls.  Please see the several caveats in the autodoc for
	
                <link linkend="n329">BeginRefresh()</link>
                .

	For your information, this routine calls the Layers library function
	
                <link linkend="n756">EndUpdate()</link>
                , unlocks your layers (calls 
                <link linkend="n734">UnlockLayerRom()</link>
                ), clears
	the LAYERREFRESH bit in your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 Flags, and clears the
	WFLG_WINDOWREFRESH bit in your window Flags.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window currently in optimized-refresh mode
	Complete = Boolean TRUE or FALSE describing whether or not this
           window is completely refreshed

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n329">BeginRefresh()</link>
                , 
                <link linkend="n756">layers.library/EndUpdate()</link>
                ,
	
                <link linkend="n734">graphics.library/UnlockLayerRom()</link>
            </literallayout>
        </section>
        <section id="n351">
            <title>intuition.library/EndRequest</title>
            <literallayout class="monospaced">
                    NAME
	EndRequest -- 
                <link linkend="n276">Remove</link>
                 a currently active requester.

   SYNOPSIS
	EndRequest( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		    A0         A1

	VOID EndRequest( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Ends the request by erasing the requester and decoupling it from
	the window.

	Note that this doesn't necessarily clear all requesters from the window,
	only the specified one.  If the window labors under other requesters,
	they will remain in the window.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to the requester to be removed
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure with which this requester
           is associated

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n407">Request()</link>
            </literallayout>
        </section>
        <section id="n352">
            <title>intuition.library/EraseImage</title>
            <literallayout class="monospaced">
                   NAME	
	EraseImage -- Erases an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                . (V36)

   SYNOPSIS
	EraseImage( RPort, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                , LeftOffset, TopOffset )
	            A0     A1     D0          D1

	VOID EraseImage( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 *, WORD, WORD );

   FUNCTION
	Erases an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                .  For a normal 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 structure, this will
	call the graphics function 
                <link linkend="n632">EraseRect()</link>
                 (clear using layer
	backfill, if any) for the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 box (LeftEdge/TopEdge/Width/Height).

	For custom image, the exact behavior is determined by the
	custom image class.

   INPUTS
 	RPort	- 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to erase a part of
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                	- custom or standard image
	LeftOffset,RightOffset - pixel offsets of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 position

   RESULT
 	None.

   EXAMPLE


   NOTES


   BUGS


   SEE ALSO
	
                <link linkend="n632">graphics.library/EraseRect()</link>
                .

            </literallayout>
        </section>
        <section id="n353">
            <title>intuition.library/FreeClass</title>
            <literallayout class="monospaced">
                    NAME
	FreeClass -- Frees a boopsi class created by 
                <link linkend="n373">MakeClass()</link>
                . (V36)

    SYNOPSIS
	success = FreeClass( ClassPtr )
	D0                   A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 FreeClass( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 * );

    FUNCTION
	For class implementors only.

	Tries to free a boopsi class created by 
                <link linkend="n373">MakeClass()</link>
                .  This
	won't always succeed: classes with outstanding objects or
	with subclasses cannot be freed.  You cannot allow the code
	which implements the class to be unloaded in this case.

	For public classes, this function will *always* remove
	the class (see 
                <link linkend="n403">RemoveClass()</link>
                 ) making it unavailable, whether
	it succeeds or not.

	If you have a dynamically allocated data for your class (hanging
	off of cl_UserData), try to free the class before you free the
	user data, so you don't get stuck with a half-freed class.

    INPUTS
	ClassPtr - pointer to a class created by 
                <link linkend="n373">MakeClass()</link>
                .

    RESULT
	Returns FALSE if the class could not be freed.  Reasons include,
	but will not be limited to, having non-zero cl_ObjectCount or
	cl_SubclassCount.

	Returns TRUE if the class could be freed.

	Calls 
                <link linkend="n403">RemoveClass()</link>
                 for the class in either case.

    EXAMPLE
	Freeing a private class with dynamically allocated user data:

	freeMyClass( cl )
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                	*cl;
	{
	    struct MyPerClassData	*mpcd;

	    mpcd = (struct MyPerClassData *) cl-&gt;cl_UserData;
	    if ( FreeClass( cl ) )
	    {
		FreeMem( mpcd, sizeof mpcd );
		return ( TRUE );
	    }
	    else
	    {
		return ( FALSE );
	    }
	}

    BUGS

    SEE ALSO
	
                <link linkend="n373">MakeClass()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.

            </literallayout>
        </section>
        <section id="n354">
            <title>intuition.library/FreeRemember</title>
            <literallayout class="monospaced">
                    NAME
	FreeRemember -- Free memory allocated by calls to 
                <link linkend="n326">AllocRemember()</link>
                .

    SYNOPSIS
	FreeRemember( RememberKey, ReallyForget )
		      A0           D0

	VOID FreeRemember( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 **, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 );

    FUNCTION
	This function frees up memory allocated by the 
                <link linkend="n326">AllocRemember()</link>
                 function.
	It will either free up just the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 structures, which supply the
	link nodes that tie your allocations together, or it will deallocate
	both the link nodes AND your memory buffers too.

	If you want to deallocate just the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 structure link nodes,
	you should set the ReallyForget argument to FALSE.  However, if you
	want FreeRemember to really deallocate all the memory, including
	both the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 structure link nodes and the buffers you requested
	via earlier calls to 
                <link linkend="n326">AllocRemember()</link>
                , then you should set the
	ReallyForget argument to TRUE.

	NOTE WELL: Once you call this function passing it FALSE, the
	linkages between all the memory chunks are lost, and you
	cannot subsequently use FreeRemember() to free them.

    INPUTS
	RememberKey = the address of a pointer to struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                .  This
           pointer should either be NULL or set to some value (possibly
           NULL) by a call to 
                <link linkend="n326">AllocRemember()</link>
                .
	ReallyForget = a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 FALSE or TRUE describing, respectively,
           whether you want to free up only the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 nodes or
           if you want this procedure to really forget about all of
           the memory, including both the nodes and the memory buffers
           referenced by the nodes.

    EXAMPLE
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 *RememberKey;
	RememberKey = NULL;
	AllocRemember(&amp;RememberKey, BUFSIZE, MEMF_CHIP);
	FreeRemember(&amp;RememberKey, TRUE);

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n326">AllocRemember()</link>
                , 
                <link linkend="n243">exec.library/FreeMem()</link>
            </literallayout>
        </section>
        <section id="n355">
            <title>intuition.library/FreeScreenBuffer</title>
            <literallayout class="monospaced">
                    NAME
	FreeScreenBuffer -- Free a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 structure. (V39)

    SYNOPSIS
	FreeScreenBuffer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 )
	                  A0      A1

	VOID FreeScreenBuffer( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 * );

    FUNCTION
	Frees a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 structure you got from 
                <link linkend="n327">AllocScreenBuffer()</link>
                ,
	and releases associated resources.  You must call FreeScreenBuffer()
	before you close your screen.

    INPUTS
	Screen: pointer to the screen this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 is associated with.
	ScreenBuffer: pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 structure obtained from
	    
                <link linkend="n327">AllocScreenBuffer()</link>
                .  It is safe to call this function with
	    a NULL argument.  It will have no effect.

    RESULT
	None.

    NOTES
	Originally, FreeScreenBuffer() did not 
                <link linkend="n737">WaitBlit()</link>
                 before freeing
	a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .  The intent was that the application should do this.
	However, as this sort of thing is easily forgotten, 
                <link linkend="n737">WaitBlit()</link>
                	was added in V40.  Application writers should ensure that freeing
	the buffer is safe by calling 
                <link linkend="n737">WaitBlit()</link>
                 themselves.

	The SB_SCREEN_BITMAP flag instructs 
                <link linkend="n327">AllocScreenBuffer()</link>
                 to provide
	a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 referring to the screen's actual bitmap.  When
	you are done changing screen buffers, you must FreeScreenBuffer()
	the currently-installed 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                 before you close the screen.
	Intuition will recognize when FreeScreenBuffer() is called for
	the currently-installed 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ScreenBuffer</ulink>
                , and will know to free the
	supporting structures but not the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .  
                <link linkend="n337">CloseScreen()</link>
                 will
	take care of that.

    BUGS

    SEE ALSO
	
                <link linkend="n327">AllocScreenBuffer()</link>
                , 
                <link linkend="n332">ChangeScreenBuffer()</link>
                ,
	
                <link linkend="n613">graphics.library/ChangeVPBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n356">
            <title>intuition.library/FreeScreenDrawInfo</title>
            <literallayout class="monospaced">
                   NAME	
 	FreeScreenDrawInfo -- Finish using a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 structure. (V36)

   SYNOPSIS
	FreeScreenDrawInfo( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , DrInfo )
			    A0      A1

	VOID FreeScreenDrawInfo( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 * );

   FUNCTION
	Declares that you are finished with the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 structure
	returned by 
                <link linkend="n364">GetScreenDrawInfo()</link>
                .

   INPUTS
 	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 - pointer to screen passed to 
                <link linkend="n364">GetScreenDrawInfo()</link>
                .
	DrInfo - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 returned by 
                <link linkend="n364">GetScreenDrawInfo()</link>
                .
	    A NULL 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 pointer is a valid parameter, signifying
	    "do nothing".

   RESULT
 	None

   NOTES
	This function, and 
                <link linkend="n364">GetScreenDrawInfo()</link>
                , don't really do much, but
	they provide an upward compatibility path.  That means that
	if you misuse them today, they probably won't cause a problem,
	although they may someday later.  So, please be very careful
	only to use the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 structure between calls to
	
                <link linkend="n364">GetScreenDrawInfo()</link>
                 and FreeScreenDrawInfo(), and be sure
	that you don't forget FreeScreenDrawInfo().

   BUGS

   SEE ALSO
	
                <link linkend="n364">GetScreenDrawInfo()</link>
                
            </literallayout>
        </section>
        <section id="n357">
            <title>intuition.library/FreeSysRequest</title>
            <literallayout class="monospaced">
                    NAME
	FreeSysRequest -- Free resources gotten by a call to 
                <link linkend="n331">BuildSysRequest()</link>
                .

    SYNOPSIS
	FreeSysRequest( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		        A0

	VOID FreeSysRequest( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	This routine frees up all memory allocated by a successful call to
	the 
                <link linkend="n331">BuildSysRequest()</link>
                 procedure.  If 
                <link linkend="n331">BuildSysRequest()</link>
                 returned a
	pointer to a window, then you are able to wait on the message port
	of that window to detect an event which satisfies the requester.
	When you want to remove the requester, you call this procedure.  It
	ends the requester and deallocates any memory used in the creation
	of the requester.  It also closes the special window that was opened
	for your system requester.

	For V36: It's OK if you pass a NULL or a TRUE (1) value to
	this function.  Also, this function properly disposes of
	requesters gotten using 
                <link linkend="n330">BuildEasyRequestArgs()</link>
                .

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = value of the window pointer returned by a successful call to
           the 
                <link linkend="n331">BuildSysRequest()</link>
                 procedure

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n331">BuildSysRequest()</link>
                , 
                <link linkend="n328">AutoRequest()</link>
                , 
                <link linkend="n338">CloseWindow()</link>
            </literallayout>
        </section>
        <section id="n358">
            <title>intuition.library/GadgetMouse</title>
            <literallayout class="monospaced">
                    NAME
	GadgetMouse -- Calculate gadget-relative mouse position. (V36)

    SYNOPSIS
	GadgetMouse( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , GInfo, MousePoint )
		     A0      A1     A2

	VOID GadgetMouse( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                 *, WORD * );

    FUNCTION
	Determines the current location of the mouse pointer relative
	to the upper-left corner of a custom gadget.  Typically used
	only in the GM_HANDLEINPUT and GM_GOACTIVE custom gadget hook
	routines.

	NEWS FLASH!!: These two hook routines are now passed the mouse
	coordinates, so this function has no known usefulness.

	We recommend that you don't call it.

	Note that this function calculates the mouse position taking
	"gadget relativity" (GFLG_RELRIGHT, GFLG_RELBOTTOM) into
	consideration.  If your custom gadget intends to ignore these
	properties, then you should either enjoin or inhibit your users
	from setting those bits, since Intuition won't ask if you respect
	them.

    INPUTS
	GInfo = A pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                 structure as passed to the
		custom gadget hook routine.
	MousePoint = address of two WORDS, or a pointer to a structure of
		type Point.

    RESULT
	Returns nothing.  Fills in the two words pointed to by
	MousePoint with the gadget-relative mouse position.

    BUGS
	Useless, since equivalent information is now passed to every
	function that might have a use for this.

    SEE ALSO

            </literallayout>
        </section>
        <section id="n359">
            <title>intuition.library/GetAttr</title>
            <literallayout class="monospaced">
                    NAME
	GetAttr -- Inquire the value of some attribute of an object. (V36)

    SYNOPSIS
	attr = GetAttr( AttrID, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                , StoragePtr )
	D0		D0	A0	A1

	ULONG GetAttr( ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , ULONG * );

    FUNCTION
	Inquires from the specified object the value of the specified attribute.

	You always pass the address of a long variable, which will
	receive the same value that would be passed to SetAttrs() in
	the ti_Data portion of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 element.  See the documentation
	for the class for exceptions to this general rule.

	Not all attributes will respond to this function.  Those that
	will are documented on a class-by-class basis.

    INPUTS
	AttrID = the attribute tag ID understood by the object's class
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 = abstract pointer to the boopsi object you are interested in
	StoragePtr = pointer to appropriate storage for the answer

    RESULT
	Returns FALSE (0) if the inquiries of attribute are not provided
	by the object's class.

    NOTES
	This function invokes the OM_GET method of the object.

    BUGS

    SEE ALSO
	
                <link linkend="n381">NewObject()</link>
                , 
                <link linkend="n343">DisposeObject()</link>
                , SetAttrs(), 
                <link linkend="n373">MakeClass()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.

            </literallayout>
        </section>
        <section id="n360">
            <title>intuition.library/GetDefaultPubScreen</title>
            <literallayout class="monospaced">
                    NAME
	GetDefaultPubScreen -- Get name of default public screen. (V36)

    SYNOPSIS
	GetDefaultPubScreen( Namebuff )
			     A0

	VOID GetDefaultPubScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 * );

    FUNCTION
	Provides the name of the current default public screen.
	Only anticipated use is for Public 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 Manager utilities,
	since it is easy to open a visitor window on the default
	public screen without specifying the name.

    INPUTS
	Namebuff = a buffer of MAXPUBSCREENNAME.  This can be NULL.

    RESULT
	None.  Will provide the string "Workbench" in Namebuff if there
	is no current default public screen.

    NOTES
	This function actually "returns" in register D0 a pointer
	to the public screen.  Unfortunately, the lifespan of
	this pointer is not ensured; the screen could be closed
	at any time.  The *ONLY* legitimate use we can see for
	this return value is to compare for identity with the pointer
	to a public screen you either have a window open in, or
	a lock on using 
                <link linkend="n371">LockPubScreen()</link>
                , to determine if that
	screen is in fact the default screen.

	Also note that if there no default public screen has been set,
	the return value of this function will be zero, and not a pointer
	to the Workbench screen.

    BUGS
	The function prototype does not reflect the return value.

    SEE ALSO
	
                <link linkend="n416">SetDefaultPubScreen()</link>
                , 
                <link linkend="n391">OpenWindow()</link>
            </literallayout>
        </section>
        <section id="n361">
            <title>intuition.library/GetDefPrefs</title>
            <literallayout class="monospaced">
                    NAME
	GetDefPrefs -- Get a copy of the the Intuition default 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                .

    SYNOPSIS
	Prefs = GetDefPrefs( PrefBuffer, Size )
	D0		     A0          D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 *GetDefPrefs( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 *, WORD );

    FUNCTION
	Gets a copy of the Intuition default preferences data.  Writes the
	data into the buffer you specify.  The number of bytes you want
	copied is specified by the size argument.

	The default preferences are those that Intuition uses when it
	is first opened.  If no preferences file is found, these are
	the preferences that are used.  These would also be the startup
	preferences in an AmigaDOS-less environment.

	It is legal to take a partial copy of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure.
	The more pertinent preferences variables have been grouped near
	the top of the structure to facilitate the memory conservation
	that can be had by taking a copy of only some of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                	structure.

    INPUTS
	PrefBuffer = pointer to the memory buffer to receive your copy of the
                Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure
	Size = the number of bytes in your PrefBuffer, the number of bytes
          you want copied from the system's internal Preference settings

    RESULT
	Returns your parameter PrefBuffer.

    BUGS

    SEE ALSO
	
                <link linkend="n362">GetPrefs()</link>
            </literallayout>
        </section>
        <section id="n362">
            <title>intuition.library/GetPrefs</title>
            <literallayout class="monospaced">
                    NAME
	GetPrefs -- Get the current Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure.

    SYNOPSIS
	Prefs = GetPrefs( PrefBuffer, Size )
	D0		  A0          D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 *GetPrefs( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 *, WORD );

    FUNCTION
	Gets a copy of the current Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure.
	Writes the data into the buffer you specify.  The number of bytes you
	want copied is specified by the size argument.

	It is legal to take a partial copy of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure.
	The more pertinent preferences variables have been grouped near
	the top of the structure to facilitate the memory conservation
	that can be had by taking a copy of only some of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                	structure.

	New for V36:  A new and more extensible method for supplying
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 has been introduced in V36, and relies on file
	system notification.  The Intuition preferences items rely
	also on the IPrefs program.  Certain elements of the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure have been superseded by this new method.
	As much as possible, the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure returned by
	GetPrefs() reflect the current state of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                .  However,
	it is impossible to represent some of the V36-style preferences
	items using the existing 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure.

    INPUTS
	PrefBuffer = pointer to the memory buffer to receive your copy of the
           Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                	Size = the number of bytes in your PrefBuffer, the number of bytes
           you want copied from the system's internal Preference settings

    RESULT
	Returns your parameter PrefBuffer.

    BUGS

    SEE ALSO
	
                <link linkend="n361">GetDefPrefs()</link>
                , 
                <link linkend="n423">SetPrefs()</link>
            </literallayout>
        </section>
        <section id="n363">
            <title>intuition.library/GetScreenData</title>
            <literallayout class="monospaced">
                    NAME 
	GetScreenData -- Get copy of a screen data structure.

    SYNOPSIS 
	Success = GetScreenData( Buffer, Size, Type, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 )
	D0                       A0      D0    D1    A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 GetScreenData( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 * );

    FUNCTION 
	This function copies into the caller's buffer data from a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                	structure.  Typically, this call will be used to find the size, title
	bar height, and other values for a standard screen, such as the
	Workbench screen.

	To get the data for the Workbench screen, one would call:
	    GetScreenData(buff, sizeof(struct Screen), WBENCHSCREEN, NULL)

	NOTE: if the requested standard screen is not open, this function
	will have the effect of opening it.

	This function has been useful for two basic types of things:
	1) Determining information about the Workbench screen, in
	   preparation for opening a window on it.
	2) Attempts at discerning the user's preferences in a working
	   screen, for "cloning" the Workbench modes and dimensions
	   when opening a similar custom screen.

	Providing compatibility with both of these goals has proven
	difficult, as we introduce new display modes and screen scrolling
	in V36.  
                <link linkend="n136">Read</link>
                 carefully the somewhat involved exceptions we
	elected to implement ...

	Changes as of V36:

	For V36 and later, the function 
                <link linkend="n371">LockPubScreen()</link>
                 is an improvement
	over this function, in that it doesn't copy the screen data
	but returns a pointer and a guarantee that the screen will not
	be closed.

	If the global public screen SHANGHAI mode is in effect (see
	
                <link linkend="n424">SetPubScreenModes()</link>
                 ), this function will actually report on
	the default public screen, where "Workbench" windows will
	actually open.

	For V36 and later, this function does some "compatibility tricks"
	when you inquire about the WBENCHSCREEN.  To keep programs from
	"stumbling" into modes they don't understand, and because an NTSC
	machine may be running a PAL Workbench or PRODUCTIVITY, for example,
	the following "false" information is returned.

	The Screen.ViewPort.Modes field will either be HIRES or HIRES+LACE
	(with the SPRITES flag also set, as usual).  HIRES+LACE is
	used if the display mode selected for the Workbench screen
	is an interlaced screen of any type.

	The dimensions returned will be the *smaller* of the OSCAN_TEXT
	dimensions for the returned mode, and the actual dimensions
	of the Workbench screen.

	EXCEPTION: For specific compatibility considerations, if the
	Workbench is in one of the A2024 modes, the mode returned
	in Screen.ViewPort.Modes will be HIRES+LACE (with perhaps
	some "special" bits also set for future improvement), but
	with dimensions equal to the actual A2024-mode Workbench screen.
	This will favor programs which open windows on the A2024
	Workbench, but will cause some problems for programs which
	try to "clone" the Workbench screen using this function.

	If you want the real information about the modern Workbench
	screen, call LockPubScreen( "Workbench" ) and acquire its
	display mode ID by inquiring of the actual 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 (using
	
                <link linkend="n661">graphics.library/GetVPModeID()</link>
                 ).

	You may then use the information you get to clone as many of
	the properties of the Workbench screen that you wish.

	In the long run, it's probably better to provide your user
	with a screen mode selection option, and skip all this.

    INPUTS 
	Buffer = pointer to a buffer into which data can be copied
	Size   = the size of the buffer provided, in bytes
	Type   = the screen type, as specified in 
                <link linkend="n391">OpenWindow()</link>
                 (WBENCHSCREEN,
	    CUSTOMSCREEN, ...)
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = ignored, unless type is CUSTOMSCREEN, which results only in
	    copying 'size' bytes from 'screen' to 'buffer'

    RESULT 
	TRUE if successful
	FALSE if standard screen of Type 'type' could not be opened.

    BUGS 
	You cannot support the new V36 display modes using this function.

    SEE ALSO 
	
                <link linkend="n391">OpenWindow()</link>
                , 
                <link linkend="n371">LockPubScreen()</link>
                , 
                <link linkend="n661">graphics.library/GetVPModeID()</link>
                ,
	
                <link linkend="n424">SetPubScreenModes()</link>
                , 
                <link linkend="n389">OpenScreen()</link>
            </literallayout>
        </section>
        <section id="n364">
            <title>intuition.library/GetScreenDrawInfo</title>
            <literallayout class="monospaced">
                   NAME	
	GetScreenDrawInfo -- Get pointer to rendering information. (V36)

   SYNOPSIS
	DrInfo = GetScreenDrawInfo( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 )
	D0	  		    A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 *GetScreenDrawInfo( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 * );

   FUNCTION
	Returns a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 structure derived from the
	screen passed.  This data structure is READ ONLY.  The field
	dri_Version identifies which version of struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 you
	are given a pointer to.

   INPUTS
 	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                        - pointer to a valid, open screen.

   RESULT
 	DrInfo - pointer to a system-allocated 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 structure,
	as defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">intuition/screens.h</ulink>
                .

   NOTES
	Some information in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 structure may in the future
	be calculated the first time this function is called for a
	particular screen.

	You must call 
                <link linkend="n356">FreeScreenDrawInfo()</link>
                 when you are done using the
	returned pointer.

	This function does not prevent a screen from closing.  Apply it
	only to the screens you opened yourself, or apply a protocol
	such as 
                <link linkend="n371">LockPubScreen()</link>
                .

	WARNING: Until further notice, the pointer returned does not
	remain valid after the screen is closed.

	This function and 
                <link linkend="n356">FreeScreenDrawInfo()</link>
                 don't really do much now,
	but they provide an upward compatibility path.  That means that
	if you misuse them today, they probably won't cause a problem,
	although they may someday later.  So, please be very careful
	only to use the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 structure between calls to
	GetScreenDrawInfo() and 
                <link linkend="n356">FreeScreenDrawInfo()</link>
                , and be sure
	that you don't forget 
                <link linkend="n356">FreeScreenDrawInfo()</link>
                .

   BUGS
	Does not reflect to changes in screen modes, depth, or pens.

   SEE ALSO
	
                <link linkend="n356">FreeScreenDrawInfo()</link>
                , 
                <link linkend="n371">LockPubScreen()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">intuition/screens.h</ulink>
                
            </literallayout>
        </section>
        <section id="n365">
            <title>intuition.library/HelpControl</title>
            <literallayout class="monospaced">
                    NAME 
	HelpControl -- Enable/disable Gadget-Help feature. (V39)

    SYNOPSIS 
	HelpControl( window, flags )
	             A0      D0

	VOID HelpControl( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, ULONG );

    FUNCTION 
	This function can be used to turn Gadget-Help on or off for
	your window.  Gadget-Help will also be enabled/disabled
	accordingly for all other windows which share the same
	help-group.  This allows Gadget-Help to be well-behaved
	for multiple-window applications.

    INPUTS 
	window - Pointer to the window you wish to affect.  (Other windows
	    will also be affected, as explained above.
	flags - Currently, HC_GADGETHELP or zero are the allowed values.

    RESULT 
	One or more windows will have Gadget-Help turned on or off.

    NOTES
	You must use 
                <link linkend="n460">utility.library/GetUniqueID()</link>
                 to get a help-group
	identifier.  Never ever supply your own!

    SEE ALSO 
	WA_HelpGroup

            </literallayout>
        </section>
        <section id="n366">
            <title>intuition.library/InitRequester</title>
            <literallayout class="monospaced">
                    NAME
	InitRequester -- Initialize a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 structure.

    SYNOPSIS
	InitRequester( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 )
		       A0

	VOID InitRequester( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 * );

    FUNCTION
	Initializes a requester for general use.  After calling InitRequester,
	you need fill in only those 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 values that fit your needs.
	The other values are set to NULL--or zero--states.

	Note that the example in the early versions of the Intuition
	Reference Manual is flawed because the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 structure is
	initialized BEFORE InitRequester is called.  Be sure to
	perform your initialization AFTER calling InitRequester.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 structure

    RESULT
	None

    BUGS
	Since the publication of the first Intuition Manual to this
	day, most people haven't used this function, and for
	compatibility reasons, we'll never be able to assume that
	they do.  Thus, this function is useless.

    SEE ALSO

            </literallayout>
        </section>
        <section id="n367">
            <title>intuition.library/IntuiTextLength</title>
            <literallayout class="monospaced">
                    NAME
	IntuiTextLength -- Return the length (pixel-width) of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                .

    SYNOPSIS
	Length = IntuiTextLength( IText )
	D0                        A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 IntuiTextLength( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 * );

    FUNCTION
	This routine accepts a pointer to an instance of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure,
	and returns the length (the pixel-width) of the string which that
	instance of the structure represents.

	NOTE: if the Font pointer of your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure is set to NULL,
	you'll get the pixel-width of your text in terms of the current system
	default font.  You may wish to be sure that the field IText-&gt;ITextFont
	for 'default font' text is equal to the Font field of the screen it is
	being measured for.

    INPUTS
	IText = pointer to an instance of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure

    RESULT
	Returns the pixel-width of the text specified by the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 data

    BUGS
	Would do better to take a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 as argument, so that a NULL in
	the Font pointer would lead automatically to the font for the
	intended target 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , rather than the system default font.

    SEE ALSO
	
                <link linkend="n389">OpenScreen()</link>
            </literallayout>
        </section>
        <section id="n368">
            <title>intuition.library/ItemAddress</title>
            <literallayout class="monospaced">
                    NAME
	ItemAddress -- Returns the address of the specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">MenuItem</ulink>
                .

    SYNOPSIS
	Item = ItemAddress( MenuStrip, MenuNumber )
	D0		    A0         D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">MenuItem</ulink>
                 *ItemAddress( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	This routine feels through the specified menu strip and returns the
	address of the item specified by the menu number.  Typically,
	you will use this routine to get the address of a menu item from
	a menu number sent to you by Intuition after user has chosen from
	a window's menus.

       This routine requires that the arguments are well-defined.
	MenuNumber may be equal to MENUNULL, in which case this routine returns
	NULL.  If MenuNumber doesn't equal MENUNULL, it's presumed to be a
	valid item number selector for your menu strip, which includes:
           - a valid menu number
           - a valid item number
           - if the item specified by the above two components has a
             sub-item, the menu number may have a sub-item component, too.

	Note that there must be BOTH a menu number and an item number.
	Because a sub-item specifier is optional, the address returned by
	this routine may point to either an item or a sub-item.

    INPUTS
	MenuStrip = a pointer to the first menu in your menu strip
	MenuNumber = the value which contains the packed data that selects
           the menu and item (and sub-item).  See the Intuition Reference
	    Manual for information on menu numbers.

    RESULT
	If MenuNumber == MENUNULL, this routine returns NULL,
	else this routine returns the address of the menu item specified
	by MenuNumber.

    BUGS

    SEE ALSO
	The "Menus" chapter of the Intuition Reference Manual,
	or the Amiga ROM Kernel Manual
            </literallayout>
        </section>
        <section id="n369">
            <title>intuition.library/LendMenus</title>
            <literallayout class="monospaced">
                    NAME
	LendMenus -- Lend window's menu action to another window. (V39)

    SYNOPSIS
	LendMenus( fromWindow, toWindow )
	           A0          A1

	VOID LendMenus( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	This function is used to "lend" the menus of one window to
	another.  This means that menu events (for example, the user
	presses the mouse menu button) will take place in another
	window's menu (using that other window's menu strip and screen).

	The sole intended use of this function is to unify two
	windows on different screens that are attached.  (See
	SA_Parent, SA_FrontChild, SA_BackChild).  An example would
	be a program with a full-sized parent screen which has a
	short control panel screen attached in the front.  Pressing the
	menu button even when the control panel window of the canvas
	screen is active can now cause the menus of the parent screen
	to appear.

    INPUTS
	fromWindow = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure whose menu actions
	    are to go to another window.
	toWindow = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure whose menus are to
	    be displayed in place of the fromWindow's.  If NULL, turns
	    off menu-lending from the fromWindow.

    RESULT
	None.

    BUGS
	The current behavior is such that the toWindow is temporarily
	activated.  This may not continue to be the case.  Be prepared
	to handle this!

    SEE ALSO
	
                <link linkend="n420">SetMenuStrip()</link>
                , 
                <link linkend="n335">ClearMenuStrip()</link>
            </literallayout>
        </section>
        <section id="n370">
            <title>intuition.library/LockIBase</title>
            <literallayout class="monospaced">
                    NAME
	LockIBase -- Invoke semaphore arbitration of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuitionbase.h">IntuitionBase</ulink>
                .

    SYNOPSIS
	
                <link linkend="n110">Lock</link>
                 = LockIBase( LockNumber )
	D0                D0

	ULONG LockIBase( ULONG );

    FUNCTION
	Grabs Intuition internal semaphore so that caller may examine
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuitionbase.h">IntuitionBase</ulink>
                 safely.  This function is not a magic "fix all my
	race conditions" panacea.

	The idea here is that you can get the locks Intuition needs before
	such 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuitionbase.h">IntuitionBase</ulink>
                 fields as ActiveWindow and FirstScreen are
	changed, or linked lists of windows and screens are changed.

	Do Not Get Tricky with this entry point, and do not hold these locks
	for long, as all Intuition input processing will wait for you to
	surrender the lock by a call to 
                <link linkend="n431">UnlockIBase()</link>
                .

	NOTE WELL: A call to this function MUST be paired with a subsequent
	call to 
                <link linkend="n431">UnlockIBase()</link>
                , and soon, please.

	NOTE WELL: Do not call any Intuition functions (nor any graphics,
	layers, dos, or other high-level system function) while
	holding this lock.

    INPUTS
	A long unsigned integer, LockNumber, specifies which of Intuition's
	internal locks you want to get.  This parameter should be zero for all
	forseeable uses of this function, which will let you examine active
	fields and linked lists of screens and windows with safety.

    RESULT
	Returns another ULONG which should be passed to 
                <link linkend="n431">UnlockIBase()</link>
                 to
	surrender the lock gotten by this call.

    BUGS
	This function must not be called while holding any other system locks
	such as layer or LayerInfo locks.

    SEE ALSO
	
                <link linkend="n431">UnlockIBase()</link>
                , 
                <link linkend="n763">layers.library/LockLayerInfo()</link>
                ,
	
                <link linkend="n258">exec.library/ObtainSemaphore()</link>
            </literallayout>
        </section>
        <section id="n371">
            <title>intuition.library/LockPubScreen</title>
            <literallayout class="monospaced">
                    NAME
	LockPubScreen -- Prevent a public screen from closing. (V36)

    SYNOPSIS
	screen = LockPubScreen( Name )
	D0                      A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *LockPubScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 * );

    FUNCTION
	Prevents a public screen (or the Workbench) from closing
	while you examine it in preparation of opening a visitor window.

	The sequence you use to open a visitor window that needs to
	examine fields in the screen it is about to open on is:
		LockPubScreen()
		... examine fields ...
		
                <link linkend="n391">OpenWindow()</link>
                 on public screen
		
                <link linkend="n432">UnlockPubScreen()</link>
                		... use your window ...
		
                <link linkend="n338">CloseWindow()</link>
                    NOTE 
	You needn't hold the "pubscreen lock" for the duration that
	your window is opened.  LockPubScreen() basically has the
	same effect as an open visitor window: it prevents the
	screen from being closed.

	If you pass the string "Workbench" or you pass NULL and there
	is no default public screen, the Workbench screen will
	be automatically opened if it is not already present.

    INPUTS
	Name = name string for public screen or NULL for default public
	screen.  The string "Workbench" indicates the Workbench
	screen.

    RESULT
	Returns pointer to a screen, if successful, else NULL.
	The call can fail for reasons including that the named
	public screen doesn't exist or is in private state.

    BUGS

    SEE ALSO
	
                <link linkend="n391">OpenWindow()</link>
                , 
                <link linkend="n432">UnlockPubScreen()</link>
                , 
                <link linkend="n363">GetScreenData()</link>
            </literallayout>
        </section>
        <section id="n372">
            <title>intuition.library/LockPubScreenList</title>
            <literallayout class="monospaced">
                    NAME
	LockPubScreenList -- Prevent changes to the system list. (V36)

    SYNOPSIS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 = LockPubScreenList()
	D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *LockPubScreenList( VOID );

    FUNCTION
	Arbitrates access to public screen list	while you quickly
	make a copy of it for display to the user.

	Note that this is intended only for the Public 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 Manager
	program.

    NOTES
	The nodes on the list are 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">PubScreenNode</ulink>
                 structures.
	Act quickly while holding this lock.  The restrictions
	on 
                <link linkend="n370">LockIBase()</link>
                 apply here as well.

    INPUTS
	None.

    RESULT
	A pointer to the public screen list.

    BUGS

    SEE ALSO
	
                <link linkend="n433">UnlockPubScreenList()</link>
                , 
                <link linkend="n389">OpenScreen()</link>
                , Intuition V36 update documentation
            </literallayout>
        </section>
        <section id="n373">
            <title>intuition.library/MakeClass</title>
            <literallayout class="monospaced">
                    NAME
	MakeClass -- Create and initialize a boopsi class. (V36)

    SYNOPSIS
	iclass = MakeClass( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">ClassID</ulink>
                , SuperClassID, SuperClassPtr,
	D0                  A0       A1            A2
		InstanceSize, Flags )
	        D0            D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *MakeClass( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *,
		
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , ULONG );

    FUNCTION
	For class implementors only.

	This function creates a new public or private boopsi class.
	The superclass should be defined to be another boopsi class:
	all classes are descendants of the class "rootclass".

	Superclasses can be public or private.  You provide a name/ID
	for your class if it is to be a public class (but you must
	have registered your class name and your attribute ID's with
	Commodore before you do this!).  For a public class, you would
	also call 
                <link linkend="n323">AddClass()</link>
                 to make it available after you have
	finished your initialization.

	Returns pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 data structure for your
	class.  You then initialize the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 cl_Dispatcher for
	your class methods code.  You can also set up special data
	shared by all objects in your class, and point cl_UserData at it.
	The last step for public classes is to call 
                <link linkend="n323">AddClass()</link>
                .

	You dispose of a class created by this function by calling
	
                <link linkend="n353">FreeClass()</link>
                .

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">ClassID</ulink>
                 = NULL for private classes, the name/ID string for public
		classes
	SuperClassID = name/ID of your new class's superclass.  NULL if
		superclass is a private class
	SuperClassPtr = pointer to private superclass.  Only used if
		SuperClassID is NULL.  You are required never to provide
		a NULL superclass.
	InstanceSize = the size of the instance data that your class's
		objects will require, beyond that data defined for
		your superclass's objects.
	Flags = for future enhancement, including possible additional
		parameters.  Provide zero for now.

    RESULT
	Pointer to the resulting class, or NULL if not possible:
	- no memory for class data structure
	- public superclass not found
	- public class of same name/ID as this one already exists

    NOTES

    EXAMPLE
	Creating a private subclass of a public class:

    /* per-object instance data defined by my class	*/
    struct MyInstanceData {
	ULONG	mid_SomeData;
    };

    /* some useful table I'll share use for all objects */
    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 myTable[] = {
	5, 4, 3, 2, 1, 0
    };

    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                	*
    initMyClass()
    {
	ULONG __saveds	myDispatcher();
	ULONG	hookEntry();	/* asm-to-C interface glue	*/
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                	*cl;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                	*MakeClass();

	if ( cl =  MakeClass( NULL,
		    SUPERCLASSID, NULL,		/* superclass is public      */
		    sizeof (struct MyInstanceData),
		    0 ))
	{
	    /* initialize the cl_Dispatcher 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                	*/
	    cl-&gt;cl_Dispatcher.h_Entry = hookEntry;
	    cl-&gt;cl_Dispatcher.h_SubEntry = myDispatcher;
	    cl-&gt;cl_Dispatcher.h_Data = (VOID *) 0xFACE;	/* unused */

	    cl-cl_UserData = (ULONG) myTable;
	}
	return ( cl );
    }

    BUGS
	The typedef 'Class' isn't consistently used.  Class pointers
	used blindly should be 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , or struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 for class implementors.

    SEE ALSO
	
                <link linkend="n353">FreeClass()</link>
                , 
                <link linkend="n323">AddClass()</link>
                , 
                <link linkend="n403">RemoveClass()</link>
                , 
                <link linkend="n381">NewObject()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.
            </literallayout>
        </section>
        <section id="n374">
            <title>intuition.library/MakeScreen</title>
            <literallayout class="monospaced">
                    NAME
	MakeScreen -- Do an Intuition-integrated 
                <link linkend="n679">MakeVPort()</link>
                 of a screen.

    SYNOPSIS
	failure = MakeScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 )
	D0 (V39)              A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 MakeScreen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 * );
	/* Returns 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 in V39 and greater */

    FUNCTION
	This procedure allows you to do a 
                <link linkend="n679">MakeVPort()</link>
                 for the viewport of your
	custom screen in an Intuition-integrated way.  This way you can
	do your own screen manipulations without worrying about interference
	with Intuition's usage of the same viewport.

	The operation of this function is as follows:
	    - Block until the Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure is not in being changed.
	    - Set the view modes correctly to reflect if there is a (visible)
	      interlaced screen.
	    - call 
                <link linkend="n679">MakeVPort()</link>
                , passing the Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 and your screen's
	      
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .
	    - Unlocks the Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                .

	After calling this routine, you should call 
                <link linkend="n409">RethinkDisplay()</link>
                 to
	incorporate the new viewport of your custom screen into the
	Intuition display.

	NOTE: Intuition may determine that because of a change in global
	interlace needs that all viewports need to be remade, so
	it may effectively call 
                <link linkend="n402">RemakeDisplay()</link>
                .

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = address of the custom screen structure

    RESULT
	Starting with V39, returns zero for success, non-zero for failure.
	Probable cause of failure is failure of 
                <link linkend="n679">graphics.library/MakeVPort()</link>
                .
	Prior to V39, the return code is invalid.  Do not interpret it when
	running on pre-V39 systems!

    BUGS

    SEE ALSO
	
                <link linkend="n409">RethinkDisplay()</link>
                , 
                <link linkend="n402">RemakeDisplay()</link>
                , 
                <link linkend="n679">graphics.library/MakeVPort()</link>
            </literallayout>
        </section>
        <section id="n375">
            <title>intuition.library/ModifyIDCMP</title>
            <literallayout class="monospaced">
                    NAME
	ModifyIDCMP -- Modify the state of a window's IDCMPFlags.

    SYNOPSIS
	Success = ModifyIDCMP( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , IDCMPFlags )
	D0 (V37)               A0      D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ModifyIDCMP( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, ULONG );
	/* returns 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 in V37 and greater */

    FUNCTION
	This routine modifies the state of your window's IDCMP (Intuition
	Direct Communication 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 Port).  The state is modified to reflect
	your desires as described by the flag bits in the value IDCMPFlags.

	The four actions that might be taken are:

       - if there is currently no IDCMP in the given window, and IDCMPFlags
         is zero, nothing happens
       - if there is currently no IDCMP in the given window, and any of the
         IDCMPFlags is selected (set), then the IDCMP of the window is
         created, including allocating and initializing the message ports
         and allocating a signal bit for your port.  See the "Input and
         
                <link linkend="n128">Output</link>
                 Methods" chapter of the Intuition Reference Manual for full
	  details
       - if the IDCMP for the given window exists, and the
         IDCMPFlags argument is zero, this says that you want
         Intuition to close the ports, free the buffers and free
         your signal bit.  You MUST be the same task that was active
         when this signal bit was allocated (either by ModifyIDCMP()
	  or 
                <link linkend="n391">OpenWindow()</link>
                 ).
       - if the IDCMP for the given window is opened, and the IDCMPFlags
         argument is not zero, this means that you want to change the
         state of which events will be broadcast to you through the IDCMP

	NOTE:  You can set up the Window-&gt;UserPort to any port of your own
	before you call ModifyIDCMP().  If IDCMPFlags is non-null but
	your UserPort is already initialized, Intuition will assume that
	it's a valid port with task and signal data preset and Intuition
	won't disturb your set-up at all, Intuition will just allocate
	the Intuition message port half of it.  The converse is true
	as well:  if UserPort is NULL when you call here with
	IDCMPFlags == NULL, Intuition will deallocate only the Intuition
	side of the port.

	This allows you to use a port that you already have allocated:
       - 
                <link linkend="n391">OpenWindow()</link>
                 with IDCMPFlags equal to NULL (open no ports)
       - set the UserPort variable of your window to any valid port of your
         own choosing
       - call ModifyIDCMP with IDCMPFlags set to what you want
       - then, to clean up later, set UserPort equal to NULL before calling
         
                <link linkend="n338">CloseWindow()</link>
                 (leave IDCMPFlags alone)  BUT FIRST: you must make
	  sure that no messages sent your window are queued at the port,
	  since they will be returned to the memory free pool.

	For an example of how to close a window with a shared IDCMP,
	see the description for 
                <link linkend="n338">CloseWindow()</link>
                .


    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure containing the IDCMP ports
	IDCMPFlags = the flag bits describing the new desired state of
		the IDCMP.  The flags are:

	    - IDCMP_REQVERIFY is the flag which, like IDCMP_SIZEVERIFY and ...

	    - IDCMP_MENUVERIFY (see immediately below), specifies that you
	      want to make sure that your graphical state is quiescent
	      before something extraordinary happens.  In this case, the
	      extraordinary event is that a rectangle of graphical data is
	      about to be blasted into your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                .  If you're drawing
	      directly into its screen, you probably will wish to make sure
	      that you've ceased drawing before the user is allowed to bring
	      up the DMRequest you've set up, and the same for when system
	      has a request for the user.  Set this flag to ask for that
	      verification step.

	    - IDCMP_REQCLEAR is the flag you set to hear a message whenever
	      a requester is cleared from your window.  If you are using
	      IDCMP_REQVERIFY to arbitrate access to your screen's bitmap, it
	      is safe to start your output once you have heard an
	      IDCMP_REQCLEAR for each IDCMP_REQSET.

	    - IDCMP_REQSET is a flag that you set to receive a broadcast
	      for each requester that is opened in your window.  Compare
	      this with IDCMP_REQCLEAR above.  This function is distinct
	      from IDCMP_REQVERIFY.  This functions merely tells you that a
	      requester has opened, whereas IDCMP_REQVERIFY requires you to
	      respond before the requester is opened.

	    - IDCMP_MENUVERIFY is the flag you set to have Intuition stop
	      and wait for you to finish all graphical output to your
	      window before rendering the menus.  Menus are currently
	      rendered in the most memory-efficient way, which involves
	      interrupting output to all windows in the screen before the
	      menus are drawn.  If you need to finish your graphical
	      output before this happens, you can set this flag to make
	      sure that you do.

	    - IDCMP_SIZEVERIFY means that you will be doing output to your
	      window which depends on a knowledge of the current size of the
	      window.  If the user wants to resize the window,  you may want
	      to make sure that any queued output completes before the sizing
	      takes place (critical text, for instance).  If this is the
	      case, set this flag.   Then, when the user wants to size,
	      Intuition will send you the IDCMP_SIZEVERIFY message and 
                <link linkend="n299">Wait()</link>
                	      until you reply that it's OK to proceed with the sizing. NOTE:
	      when we say that Intuition will 
                <link linkend="n299">Wait()</link>
                 until you reply, what
	      we're really saying is that user will WAIT until you reply, which
	      suffers the great negative potential of User-Unfriendliness.
	      So remember:  use this flag sparingly, and, as always with any
	      IDCMP 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 you receive, reply to it promptly!  Then, after
	      user has sized the window, you can find out about it using
	      IDCMP_NEWSIZE.

	    With all the "VERIFY" functions, it is not save to leave them
	    enabled at any time when your task may not be able to respond
	    for a long period.

	    It is NEVER safe to call AmigaDOS, directly or indirectly, when
	    a "VERIFY" function is active.  If AmigaDOS needs to put up a
	    disk requester for you, your task might end up waiting for the
	    requester to be satisfied, at the same time as Intuition is
	    waiting for your response.  The result is a complete machine
	    lockup.  USE ModifyIDCMP() TO TURN OFF ANY VERIFY MESSAGES
	    BEFORE CALLING dos.library!!

	    For V36: If you do not respond to the verification IntuiMessages
	    within the user specified timeout duration, Intuition will abort
	    the operation.  This eliminates the threat of these easy
	    deadlocks, but can result in a confused user.  Please try
	    hard to continue to avoid "logical deadlocks".

	    - IDCMP_NEWSIZE is the flag that tells Intuition to send an IDCMP
	      message to you after the user has resized your window.  At
	      this point, you could examine the size variables in your
	      window structure to discover the new size of the window.
	      See also the IDCMP_CHANGEWINDOW IDCMP flag.

	    - IDCMP_REFRESHWINDOW when set will cause a message to be sent
	      whenever your window needs refreshing.  This flag makes
	      sense only with WFLG_SIMPLE_REFRESH and WFLG_SMART_REFRESH
	      windows.

	    - IDCMP_MOUSEBUTTONS will get reports about mouse-button up/down
	      events broadcast to you (Note:  only the ones that
	      don't mean something to Intuition.  If the user clicks the
	      select button over a gadget, Intuition deals with it and you
	      don't find out about it through here).

	    - IDCMP_MOUSEMOVE will work only if you've set the
	      WFLG_REPORTMOUSE flag above, or if one of your gadgets has the
	      GACT_FOLLOWMOUSE flag set.  Then all mouse movements will be
	      reported here, providing your window is active.

	    - IDCMP_GADGETDOWN means that when the User "selects" a gadget
	      you've created with the GACT_IMMEDIATE flag set, the fact
	      will be broadcast through the IDCMP.

	    - IDCMP_GADGETUP means that when the user "releases" a gadget that
	      you've created with the GACT_RELVERIFY flag set, the fact
	      will be broadcast through the IDCMP.  This message is
	      only generated if the release is "good", such as releasing
	      the select button over a Boolean gadget, or typing ENTER
	      in a string gadget.

	    - IDCMP_MENUPICK selects that menu number data will be sent via
	      the IDCMP.

	    - IDCMP_CLOSEWINDOW means broadcast the IDCMP_CLOSEWINDOW event
	      through the IDCMP rather than the console.

	    - IDCMP_RAWKEY selects that all IDCMP_RAWKEY events are
	      transmitted via the IDCMP.  Note that these are absolutely RAW
	      keycodes, which you will have to translate before using.
	      Setting this and the MOUSE flags effectively eliminates the need
	      to open a Console device to get input from the keyboard and
	      mouse.  Of course, in exchange you lose all of the console
	      features, most notably the "cooking" of input data and
	      the systematic output of text to your window.

	    - IDCMP_VANILLAKEY is for developers who don't want the hassle
	      of IDCMP_RAWKEYS.  This flag will return all the keycodes after
	      translation via the current country-dependent keymap.  When
	      you set this flag, you will get IntuiMessages where the Code
	      field has a decoded ANSI character code representing the key
	      struck on the keyboard.  Only codes that map to a single
	      character are returned: you can't read such keys as HELP or
	      the function keys with IDCMP_VANILLAKEY.

	      NEW FOR V36: If you have both IDCMP_RAWKEY and IDCMP_VANILLAKEY
	      set, Intuition will send an IDCMP_RAWKEY event for those
	      *downstrokes* which do not map to single-byte characters
	      ("non-vanilla" keys).  In this way you can easily detect cursor
	      keys, function keys, and the Help key without sacrificing the
	      convenience of IDCMP_VANILLAKEY.  NB: A side-effect of having
	      both IDCMP_RAWKEY and IDCMP_VANILLAKEY set is that you never
	      hear IDCMP_RAWKEY upstrokes, even for keys that caused
	      IDCMP_RAWKEY downstrokes.

	    - IDCMP_INTUITICKS gives you simple timer events from Intuition
	      when your window is the active one; it may help you avoid
	      opening and managing the timer device.  With this flag set,
	      you will get only one queued-up INTUITICKS message at a
	      time.  If Intuition notices that you've been sent an
	      IDCMP_INTUITICKS message and haven't replied to it, another
	      message will not be sent.  Intuition receives timer events and
	      considers sending you an IDCMP_INTUITICKS message approximately
	      ten times a second.

	    - IDCMP_DELTAMOVE gives raw (unscaled) input event delta X/Y
	      values.  This is so you can detect mouse motion regardless of
	      screen/window/display boundaries.  This works a little
	      strangely: if you set both IDCMP_MOUSEMOVE and IDCMP_DELTAMOVE.
	      IDCMPFlags, you will get IDCMP_MOUSEMOVE messages with delta
	      x/y values in the MouseX and MouseY fields of the
	      IDCMPMessage.

	    - IDCMP_NEWPREFS indicates you wish to be notified when the
	      system-wide 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 changes.  For V36, there is a new
	      environment mechanism to replace 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                , which we
	      recommend you consider using instead.

	    - Set IDCMP_ACTIVEWINDOW and IDCMP_INACTIVEWINDOW to get messages
	      when those events happen to your window.  Take care not to
	      confuse this "ACTIVEWINDOW" with the familiar sounding, but
	      totally different "WINDOWACTIVE" flag.  These two flags have
	      been supplanted by "IDCMP_ACTIVEWINDOW" and "WFLG_WINDOWACTIVE".
	      Use the new equivalent terms to avoid confusion.

	    - Set IDCMP_DISKINSERTED or IDCMP_DISKREMOVED to learn when
	      removable disks are inserted or removed, respectively.

	    - IDCMP_IDCMPUPDATE is a new class for V36 which is used as
	      a channel of communication from custom and boopsi gadgets
	      to your application.

	    - IDCMP_CHANGEWINDOW is a new class for V36 that will be sent
	      to your window whenever its dimensions or position are changed
	      by the user or the functions 
                <link linkend="n428">SizeWindow()</link>
                , 
                <link linkend="n378">MoveWindow()</link>
                ,
	      
                <link linkend="n333">ChangeWindowBox()</link>
                , or 
                <link linkend="n441">ZipWindow()</link>
                .

	    - IDCMP_MENUHELP is new for V37.  If you specify the WA_MenuHelp
	      tag when you open your window, then when the user presses the
	      HELP key on the keyboard during a menu session, Intuition will
	      terminate the menu session and issue this even in place of an
	      IDCMP_MENUPICK message.
		- NEVER follow the NextSelect link for MENUHELP messages.
		- You will be able to hear MENUHELP for ghosted menus.
		  (This lets you tell the user why the option is ghosted.)
		- Be aware that you can receive a MENUHELP message whose code
		  corresponds to a menu header or an item that has sub-items
		  (which does not happen for MENUPICK).  The code may also be
		  MENUNULL.
		- LIMITATION:  if the user extend-selects some checkmarked
		  items with the mouse, then presses MENUHELP, your
		  application will only hear the MENUHELP report.  You
		  must re-examine the state of your checkmarks when you
		  get a MENUHELP.
		- Availability of MENUHELP in V36 is not directly
		  controllable.  We apologize...

	    - IDCMP_GADGETHELP is new for V39.  If you turn on
	      gadget help for your window (using the 
                <link linkend="n365">HelpControl()</link>
                )
	      function, then Intuition will send IDCMP_GADGETHELP
	      messages when the mouse passes over certain gadgets or
	      your window.  The IntuiMessage-&gt;Code field is normally
	      ~0, but a boopsi gadget can return any word value it wishes.

	      Ordinarily, gadget help is only processed for the active
	      window.  When Intuition has determined that the mouse is
	      pointing at a gadget which has the GMORE_GADGETHELP
	      property, you will be sent an IDCMP_GADGETHELP message
	      whose IAddress points to the gadget.  When the mouse is
	      over your window but not over any help-aware gadget, you
	      will be sent a message whose IAddress is the window
	      itself.  When the mouse is not over your window,
	      Intuition sends a message whose IAddress is zero.

	      A multi-window application can use the WA_HelpGroup or
	      WA_HelpGroupWindow tags to indicate that all its windows
	      belong in a group.  (The help group identifier should be
	      obtained with utility.library/GetUniqueID().) This makes
	      Intuition test gadget help in all windows of the group
	      when any one of them is the active one.  Inactive windows
	      whose WA_HelpGroup matches the active window's receive
	      IDCMP_GADGETHELP messages when the mouse is over that
	      window or any of its help-aware gadgets.  The GADGETHELP
	      message with an IAddress of zero means the mouse is not
	      over the active window or any other window of the same
	      group.  It is always sent to the active window (which is
	      not necessarily the window in your group that last got a
	      message).

	      To maximize performance, gadget help is not checked
	      while the mouse is travelling quickly, or if it has not
	      moved at all since the last test.  As well, if Intuition
	      discovers that the mouse is still over same gadget and
	      that gadget does not wish to send a different
	      IntuiMessage-&gt;Code from the last message, no new
	      
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiMessage</ulink>
                 is sent.

    RESULT
	Starting in V37, this function returns NULL if it was unable
	to create the necessary message ports.  (The possibility of
	failure exists in earlier releases, but no return code was offered).
	Do not check the return code under V36 or earlier.

    BUGS

    SEE ALSO
	
                <link linkend="n392">OpenWindowTagList()</link>
                , 
                <link linkend="n391">OpenWindow()</link>
                , 
                <link linkend="n338">CloseWindow()</link>
            </literallayout>
        </section>
        <section id="n376">
            <title>intuition.library/ModifyProp</title>
            <literallayout class="monospaced">
                    NAME
	ModifyProp -- Modify the current parameters of a proportional gadget.

    SYNOPSIS
	ModifyProp( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                ,
		    A0	    A1	    A2
           	    Flags, HorizPot, VertPot, HorizBody, VertBody )
		    D0	   D1	     D2	      D3	 D4

	VOID ModifyProp( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	Modifies the parameters of the specified proportional gadget.  The
	gadget's internal state is then recalculated and the imagery
	is redisplayed in the window or requester that contains the gadget.

	The requester variable can point to a requester structure.  If the
	gadget has the GTYP_REQGADGET flag set, the gadget is in a requester
	and the window pointer must point to the window of the requester.
	If this is not the gadget of a requester, the requester argument may
	be NULL.

	NOTE: this function causes all gadgets from the proportional
	gadget to the end of the gadget list to be refreshed, for
	reasons of compatibility.
	For more refined display updating, use 
                <link linkend="n380">NewModifyProp()</link>
                .

	New for V36: ModifyProp() refreshing consists of redrawing gadgets
	completely.  
                <link linkend="n380">NewModifyProp()</link>
                 has changed this behavior (see
	
                <link linkend="n380">NewModifyProp()</link>
                ).

    INPUTS
	PropGadget = pointer to a proportional gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window containing the gadget or the window
	    containing the requester containing the gadget.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to a requester (may be NULL if this isn't
	    a requester gadget)
	Flags = value to be stored in the Flags field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	HorizPot = value to be stored in the HorizPot field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	VertPot = value to be stored in the VertPot field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	HorizBody = value to be stored in the HorizBody field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	VertBody = value to be stored in the VertBody field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n380">NewModifyProp()</link>
                	The Intuition Reference Manual and Amiga ROM Kernel Manual contain
	more information on Proportional Gadgets.
            </literallayout>
        </section>
        <section id="n377">
            <title>intuition.library/MoveScreen</title>
            <literallayout class="monospaced">
                    NAME
	MoveScreen -- Attempt to move the screen by the increments provided.

    SYNOPSIS
	MoveScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , DeltaX, DeltaY )
		    A0      D0      D1

	VOID MoveScreen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, WORD, WORD );

    FUNCTION
	Moves the screen the specified increment, specified in screen
	pixel resolution coordinates.

	New for V36: 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 movement limits have been greatly relaxed,
	to support screen scrolling.  In particular, negative values
	for screen LeftEdge and TopEdge may now be valid.

       If the DeltaX and DeltaY variables you specify would move the screen
       in a way that violates any restrictions, the screen will be moved
       as far as possible.  You may examine the LeftEdge and TopEdge fields
	of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 structure after this function returns to see where
	the screen really ended up.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 structure
	DeltaX = amount to move the screen on the x-axis
		Note that DeltaX no longer (V36) need be set to zero
	DeltaY = amount to move the screen on the y-axis
		Note that these coordinates are in the same resolution
		as the screen (such as HIRES or INTERLACE)

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n411">ScreenPosition()</link>
                , 
                <link linkend="n409">RethinkDisplay()</link>
            </literallayout>
        </section>
        <section id="n378">
            <title>intuition.library/MoveWindow</title>
            <literallayout class="monospaced">
                    NAME
	MoveWindow -- Ask Intuition to move a window.

    SYNOPSIS
	MoveWindow( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , DeltaX, DeltaY )
		    A0      D0      D1

	VOID MoveWindow( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, WORD, WORD );

    FUNCTION
	This routine sends a request to Intuition asking to move the window
	the specified distance.  The delta arguments describe how far to
	move the window along the respective axes.

	Note that the window will not be moved immediately, but rather
	will be moved the next time Intuition receives an input event,
	which happens currently at a minimum rate of ten times per second,
	and a maximum of sixty times a second.

	Interactions with other arbitration of Intuition data structures
	may defer this operation longer.  For V36, you can use the new
	IDCMP class IDCMP_CHANGEWINDOW to detect when this operation has
	completed.

	New for V36: Intuition now will do validity checking on the final
	position.  To send absolute movements, or to move and size a
	window in one step, use 
                <link linkend="n333">ChangeWindowBox()</link>
                .

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the structure of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 to be moved
	DeltaX = how far to move the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 on the x-axis
	DeltaY = how far to move the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 on the y-axis

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n333">ChangeWindowBox()</link>
                , 
                <link linkend="n428">SizeWindow()</link>
                , 
                <link linkend="n440">WindowToFront()</link>
                , 
                <link linkend="n439">WindowToBack()</link>
            </literallayout>
        </section>
        <section id="n379">
            <title>intuition.library/MoveWindowInFrontOf</title>
            <literallayout class="monospaced">
                    NAME
	MoveWindowInFrontOf -- Arrange the relative depth of a window. (V36)

    SYNOPSIS
	MoveWindowInFrontOf( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , BehindWindow )
			     A0      A1

	VOID MoveWindowInFrontOf( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Depth-arranges a window in front of an another window.
	Brings out the layers.library 
                <link linkend="n766">MoveLayerInFrontOf()</link>
                 to the
	Intuition user.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 =  window to re-position in front of another window
	BehindWindow =  window to re-position in front of

    RESULT
	Repositions window.

    BUGS
	Doesn't respect backdrop windows.

    SEE ALSO
	
                <link linkend="n440">WindowToFront()</link>
                , 
                <link linkend="n439">WindowToBack()</link>
                , 
                <link linkend="n766">layers.library/MoveLayerInFrontOf()</link>
            </literallayout>
        </section>
        <section id="n380">
            <title>intuition.library/NewModifyProp</title>
            <literallayout class="monospaced">
                    NAME
	NewModifyProp -- 
                <link linkend="n376">ModifyProp()</link>
                , but with selective refresh.

    SYNOPSIS
	NewModifyProp( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                , Flags,
		       A0      A1      A2         D0
		HorizPot, VertPot, HorizBody, VertBody, NumGad )
		D1        D2       D3         D4        D5

	VOID NewModifyProp( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , WORD );

    FUNCTION
	Performs the function of 
                <link linkend="n376">ModifyProp()</link>
                , but refreshes
	gadgets in the list as specified by the NumGad parameter.
	With NumGad = -1, this function is identical to 
                <link linkend="n376">ModifyProp()</link>
                .

	New for V36: When NumGad = 1, this function will now perform
	an incremental update of the proportional gadget knob image,
	rather than refreshing the entire gadget.  This means much
	less flashing when programmatically scrolling a proportional
	gadget.

    INPUTS
	PropGadget = pointer to a proportional gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window containing the gadget or the window
	    containing the requester containing the gadget.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to a requester (may be NULL if this isn't
	    a requester gadget)
	Flags = value to be stored in the Flags field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	HorizPot = value to be stored in the HorizPot field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	VertPot = value to be stored in the VertPot field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	HorizBody = value to be stored in the HorizBody field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	VertBody = value to be stored in the VertBody field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">PropInfo</ulink>
                	NumGad = number of gadgets to be refreshed after propgadget internals
	    have been adjusted.  -1 means "to end of list."

    RESULT
	None

    BUGS

    SEE ALSO 
	
                <link linkend="n376">ModifyProp()</link>
                	The Intuition Reference Manual contains more information on
	Proportional Gadgets.
            </literallayout>
        </section>
        <section id="n381">
            <title>intuition.library/NewObject</title>
            <literallayout class="monospaced">
                    NAME
	NewObjectA -- Create an object from a class. (V36)
	NewObject -- Varargs stub for NewObjectA(). (V36)

    SYNOPSIS
	object = NewObjectA( class, classID, tagList )
	D0                   A0     A1       A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 NewObjectA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	object = NewObject( class, classID, Tag1, ... )

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 NewObject( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, ULONG, ... );

    FUNCTION
	This is the general method of creating objects from 'boopsi' classes.
	('Boopsi' stands for "basic object-oriented programming system for
	Intuition".)

	You specify a class either as a pointer (for a private class) or
	by its ID string (for public classes).  If the class pointer
	is NULL, then the classID is used.

	You further specify initial "create-time" attributes for the
	object via a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 list, and they are applied to the resulting
	generic data object that is returned.  The attributes, their meanings,
	attributes applied only at create-time, and required attributes
	are all defined and documented on a class-by-class basis.

    INPUTS
	class = abstract pointer to a boopsi class gotten via 
                <link linkend="n373">MakeClass()</link>
                .
	classID = the name/ID string of a public class.  This parameter is
		only used if 'class' is NULL.
	tagList = pointer to array of TagItems containing attribute/value
		pairs to be applied to the object being created

    RESULT
	A boopsi object, which may be used in different contexts such
	as a gadget or image, and may be manipulated by generic functions.
	You eventually free the object using 
                <link linkend="n343">DisposeObject()</link>
                .

    NOTES
	This function invokes the OM_NEW "method" for the class specified.

    BUGS
	Typedef's for 'Object' and 'Class' are defined in the include
	files but not used consistently.  The generic type 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 is
	probably best used for object and class "handles", with the
	type (UBYTE *) used for classID strings.

    SEE ALSO
	
                <link linkend="n343">DisposeObject()</link>
                , SetAttrs(), 
                <link linkend="n359">GetAttr()</link>
                , 
                <link linkend="n373">MakeClass()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.

            </literallayout>
        </section>
        <section id="n382">
            <title>intuition.library/NextObject</title>
            <literallayout class="monospaced">
                    NAME
	NextObject -- iterate through the object on an Exec list. (V36)

    SYNOPSIS
	object = NextObject( objectPtrPtr )
	D0                   A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 NextObject( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 );

    FUNCTION
	This function is for boopsi class implementors only.

	When you collect a set of boopsi objects on an Exec 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                	structure by invoking their OM_ADDMEMBER method, you
	can (only) retrieve them by iterations of this function.

	Works even if you remove and dispose the returned list
	members in turn.

    INPUTS
	Initially, you set a pointer variable to equal the
	lh_Head field of the list (or mlh_Head field of a MinList).
	You pass the *address* of that pointer repeatedly
	to NextObject() until it returns NULL.

    EXAMPLE

	/* here is the OM_DISPOSE case of some class's dispatcher */
	case OM_DISPOSE:
	    /* dispose members	*/
	    object_state = mydata-&gt;md_CollectionList.lh_Head;
	    while ( member_object = NextObject( &amp;object_state ) )
	    {
		DoMethod( member_object, OM_REMOVE ); /* remove from list */
		DoMethodA( member, msg );	/* and pass along dispose	*/
	    }

    RESULT
	Returns pointers to each object in the list in turn, and NULL
	when there are no more.

    NOTES

    BUGS

    SEE ALSO
	
                <link linkend="n343">DisposeObject()</link>
                , SetAttrs(), 
                <link linkend="n359">GetAttr()</link>
                , 
                <link linkend="n373">MakeClass()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.
            </literallayout>
        </section>
        <section id="n383">
            <title>intuition.library/NextPubScreen</title>
            <literallayout class="monospaced">
                    NAME
	NextPubScreen -- Identify next public screen in the cycle. (V36)

    SYNOPSIS
	Buff = NextPubScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , NameBuff )
	D0                    A0      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *NextPubScreen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 * );

    FUNCTION
	Returns name of next public screen in system rotation, to
	allow visitor windows to provide function to "jump" among
	public-screens in a cycle.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to the screen your window is currently open in,
	  or NULL, if you don't have a pointer to a public screen.
	NameBuff = pointer to a buffer of MAXPUBSCREENNAME+1 characters,
	  for Intuition to fill in with the name of the next public
	  screen in rotation.

    RESULT
	Returns NULL if there are no public screens, otherwise a
	pointer to your NameBuff.

    NOTES
	There is no guarantee that the public screen whose name
	was returned by this function will exist or be in "public" state
	by the time you call 
                <link linkend="n371">LockPubScreen()</link>
                , etc.  You must handle
	cases where 
                <link linkend="n371">LockPubScreen()</link>
                , etc. will fail.

	Note that this function may return the name of a public screen
	which is open but in "private mode" (see 
                <link linkend="n396">PubScreenStatus()</link>
                 and
	PSNF_PRIVATE).

    BUGS
	Due to a bug, your buffer needs to be (MAXPUBSCREENNAME + 1)
	characters big, which is one more than originally documented.

	The starting screen and cycle order of the public screens isn't
	defined, so do not draw conclusions about the order you
	see in the current version of Intuition.  We reserve the
	right to add meaning to the ordering at a future time.

    SEE ALSO
	
                <link linkend="n389">OpenScreen()</link>
                , Intuition V36 update documentation
            </literallayout>
        </section>
        <section id="n384">
            <title>intuition.library/ObtainGIRPort</title>
            <literallayout class="monospaced">
                    NAME
	ObtainGIRPort -- Set up a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 for a custom gadget. (V36)

    SYNOPSIS
	RPort = ObtainGIRPort( GInfo )
	D0		       A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *ObtainGIRPort( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                 * );

    FUNCTION
	Sets up a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 for use (only) by custom gadget hook routines.
	This function must be called EACH time a hook routine needing
	to perform gadget rendering is called, and must be accompanied
	by a corresponding call to 
                <link linkend="n401">ReleaseGIRPort()</link>
                .

	Note that if a hook function passes you a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 pointer,
	e.g., GM_RENDER, you needn't call ObtainGIRPort() in that case.

    INPUTS
	A pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                 structure, as passed to each custom
	gadget hook function.

    RESULT
	A pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 that may be used for gadget rendering.
	This pointer may be NULL, in which case you should do no rendering.
	You may (optionally) pass a null return value to 
                <link linkend="n401">ReleaseGIRPort()</link>
                .

    BUGS

    SEE ALSO
	
                <link linkend="n401">ReleaseGIRPort()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/custom.h">Custom</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 documentation

            </literallayout>
        </section>
        <section id="n385">
            <title>intuition.library/OffGadget</title>
            <literallayout class="monospaced">
                    NAME
	OffGadget -- 
                <link linkend="n232">Disable</link>
                 the specified gadget.

    SYNOPSIS
	OffGadget( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 )
		   A0      A1      A2

	VOID OffGadget( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 * );

    FUNCTION
	This command disables the specified gadget.  When a gadget is
	disabled, these things happen:
	     - its imagery is displayed ghosted
	     - the GFLG_DISABLED flag is set
	     - the gadget cannot be selected by User

	The window parameter must point to the window which contains the
	gadget, or which contains the requester that contains the gadget.
	The requester parameter must only be valid if the gadget has the
	GTYP_REQGADGET flag set, a requirement for all requester gadgets.

       NOTE:  it's never safe to tinker with the gadget list yourself.  Don't
       supply some gadget that Intuition hasn't already processed in
       the usual way.

    	NOTE: for compatibility reasons, this function will refresh all
	gadgets in a requester, and all gadgets from gadget to the
	end of the gadget list if gadget is in a window.

	If you want to improve on this behavior, you may perform the
	equivalent operation yourself: remove a gadget or gadgets,
	change the state of their GFLG_DISABLED flag, replace the
	gadgets using 
                <link linkend="n325">AddGList()</link>
                , and selectively call 
                <link linkend="n399">RefreshGList()</link>
                .

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = pointer to the gadget that you want disabled
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a window structure containing the gadget or
	    containing the requester which contains the gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to a requester (may by NULL if this isn't
           a requester gadget (i.e. GTYP_REQGADGET is not set)).

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n387">OnGadget()</link>
                , 
                <link linkend="n324">AddGadget()</link>
                , 
                <link linkend="n398">RefreshGadgets()</link>
                
            </literallayout>
        </section>
        <section id="n386">
            <title>intuition.library/OffMenu</title>
            <literallayout class="monospaced">
                    NAME
	OffMenu -- 
                <link linkend="n232">Disable</link>
                 the given menu or menu item.

    SYNOPSIS
	OffMenu( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , MenuNumber )
		 A0      D0

	VOID OffMenu( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	This command disables a sub-item, an item, or a whole menu.
	This depends on the contents of the data packed into MenuNumber,
	which is described in the Intuition Reference Manual.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window
	MenuNumber = the menu piece to be disabled

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n388">OnMenu()</link>
                , 
                <link linkend="n408">ResetMenuStrip()</link>
            </literallayout>
        </section>
        <section id="n387">
            <title>intuition.library/OnGadget</title>
            <literallayout class="monospaced">
                    NAME
	OnGadget -- 
                <link linkend="n234">Enable</link>
                 the specified gadget.

    SYNOPSIS
	OnGadget( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 )
		  A0      A1      A2

	VOID OnGadget( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 * );

    FUNCTION
	This command enables the specified gadget.  When a gadget is
	enabled, these things happen:
        - its imagery is displayed normally (not ghosted)
        - the GFLG_DISABLED flag is cleared
        - the gadget can thereafter be selected by the user

	The window parameter must point to the window which contains the
	gadget, or which contains the requester that contains the gadget
	The requester parameter must only be valid if the gadget has the
	GTYP_REQGADGET flag set, a requirement for all requester gadgets.

       NOTE:  it's never safe to tinker with the gadget list yourself.  Don't
       supply some gadget that Intuition hasn't already processed in
       the usual way.

    	NOTE: for compatibility reasons, this function will refresh all
	gadgets in a requester, and all gadgets from gadget to the
	end of the gadget list if gadget is in a window.

	If you want to improve on this behavior, you may perform the
	equivalent operation yourself: remove a gadget or gadgets,
	change the state of their GFLG_DISABLED flag, replace the
	gadgets using 
                <link linkend="n325">AddGList()</link>
                , and selectively call 
                <link linkend="n399">RefreshGList()</link>
                .

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = pointer to the gadget that you want disabled
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a window structure containing the gadget or
	    containing the requester which contains the gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to a requester (may by NULL if this isn't
           a requester gadget (i.e. GTYP_REQGADGET is not set)).

    RESULT
	None

    BUGS
	Traditional gadgets are rendered very simply.  This can result
	in incomplete clearing away of the ghosting pattern when
	OnGadget() is used.  For example, a button whose imagery consists
	of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 inside a rectangular 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Border</ulink>
                 doesn't have the
	button interior cleared by OnGadget().  This is because OnGadget()
	clears the GFLG_DISABLED flag then redraws the gadget.  Redrawing
	this gadget consists of redrawing the border and text.  Nothing
	redraws the field.

	The solution to this type of problem is to either use a gadget
	whose imagery is a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 that covers the whole select area,
	or to manually remove the gadget, erase the gadget's select area
	(say using 
                <link linkend="n632">EraseRect()</link>
                ), then clear the GFLG_DISABLED flag,
	add the gadget back to the window, and refresh it.

    SEE ALSO
	
                <link linkend="n385">OffGadget()</link>
                
            </literallayout>
        </section>
        <section id="n388">
            <title>intuition.library/OnMenu</title>
            <literallayout class="monospaced">
                    NAME
	OnMenu -- 
                <link linkend="n234">Enable</link>
                 the given menu or menu item.

    SYNOPSIS
	OnMenu( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , MenuNumber )
	        A0      D0

	VOID OnMenu( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	This command enables a sub-item, an item, or a whole menu.
	This depends on the contents of the data packed into MenuNumber,
	which is described in the Intuition Reference Manual.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window
	MenuNumber = the menu piece to be enables

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n386">OffMenu()</link>
                , 
                <link linkend="n408">ResetMenuStrip()</link>
            </literallayout>
        </section>
        <section id="n389">
            <title>intuition.library/OpenScreen</title>
            <literallayout class="monospaced">
                    NAME
	OpenScreen -- 
                <link linkend="n126">Open</link>
                 an Intuition screen.

    SYNOPSIS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = OpenScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 )
	D0		     A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *OpenScreen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 * );

	or

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *OpenScreen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ExtNewScreen</ulink>
                 * );

    FUNCTION
	Opens an Intuition screen according to the specified parameters
	found in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure.

	Does all the allocations, sets up the screen structure and all
	substructures completely, and links this screen's viewport into
	Intuition's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure.

	Before you call OpenScreen(), you must initialize an instance of
	a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure.  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 is a structure that contains
	all of the arguments needed to open a screen.  The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                	structure may be discarded immediately after OpenScreen() returns.

	The SHOWTITLE flag is set to TRUE by default when a screen is opened.
	To change this, you must call the routine 
                <link linkend="n427">ShowTitle()</link>
                .

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 = pointer to an instance of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure.

	New for V36:
	In addition to the information contained in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure,
	Intuition now recognizes extended data passed in the form
	of an array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 structures (from 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                ),
	commonly called a "tag list."

	There are two ways to provide this array.  The first is to
	use the new Intuition entry point 
                <link linkend="n390">OpenScreenTagList()</link>
                 and
	pass the tag list as a parameter.  This is the recommended
	method, and has a convenient format variation for C programs
	using a variable number of arguments.

	An older way used for some V36 development uses the OpenScreen()
	entry point, and an extension of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure named
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ExtNewScreen</ulink>
                .  See the documentation of the flag NS_EXTENDED,
	below.

	While we recommend that you use 
                <link linkend="n390">OpenScreenTagList()</link>
                 rather than
	OpenScreen() when using the extension tag list, we document
	the tag ID values here, so that all parameters for opening
	a screen can be found in one place.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 is initialized with the following information:
	-------------------------------------------------------------
	Left = initial x-position of your screen (should be zero for
	releases prior to V36)

	Top = initial y-position of the opening screen
	(Note: Left and Top are specified relative to the Intuition's view,
	in same resolution as the screen pixels.)

	Width = the width for this screen's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	Height = the height for this screen's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , or the constant
		STDSCREENHEIGHT to get the current default height (at
		this time guaranteed to be at least 200 rows).  The normal
		width and height for a particular system is stored by
		the graphics.library in GfxBase-&gt;NormalDisplayRows and
		GfxBase-&gt;NormalDisplayColumns.  These values will be different
		depending on factors such as PAL video and overscan.

		For V36, a new constant STDSCREENWIDTH is introduced.  It
		serves the similar function for screen width.  Both
		STDSCREENWIDTH and STDSCREENHEIGHT indicate that your
		screen 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 is to be the same dimensions as your
		DisplayClip rectangle.  If you do not specify either a
		standard or custom DisplayClip, the OSCAN_TEXT region
		will be used, which corresponds to the standard dimensions
		of V35 and earlier.

		Furthermore, if you are using 
                <link linkend="n390">OpenScreenTagList()</link>
                , and you
		specify STDSCREENWIDTH, and you DO NOT provide a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                		pointer, and you DO NOT provide sA_Left, then Intuition
		will automatically set the LeftEdge of the screen to
		be the left edge of the screen's DisplayClip region.
		Likewise for STDSCREENHEIGHT and the screen's TopEdge.

	Depth = number of bitplanes

	DetailPen = pen number for details (like gadgets or text in title bar)
	    The common value for this pen is 0.

	BlockPen = pen number for block fills (like title bar)
	    The common value for this pen is 1.

	Type = screen type values
	    Set these flags as desired from the set:
	    CUSTOMSCREEN -- this is your own screen, not a system screen.
	    CUSTOMBITMAP -- this custom screen has bit maps supplied
		in the bitmap field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure.  Intuition is
		not to allocate any raster bitmaps.
	    SCREENBEHIND -- your screen will be created behind all other open
		screens.  This allows a program to prepare imagery in the
		screen, change its colors, and so on, bringing it to the
		front when it is presentable.
	    SCREENQUIET -- Intuition will not render system screen gadgets or
		screen title.  In concert with the WFLG_RMBTRAP flag on all
		your screen's windows, this flag will prevent Intuition from
		rendering into your screen's bitplanes.  Without WFLG_RMBTRAP
		(or using the IDCMP_MENUVERIFY facility to cancel menu
		operations), this flag will prevent Intuition from clearing
		your menu bar, which is probably unacceptable.  The menu bar
		layer may still overwrite  a portion of your screen bitmap
		when the screen is opened.  (V36: it won't clobber your bits
		any more.)
	    NS_EXTENDED for this screen to use extended attributes pointed
		to by the 'Extended' field, below.

	ViewModes = the appropriate argument for the data type ViewPort.Modes.
           These include:
           HIRES for this screen to be HIRES width.
           LACE for the display to switch to interlace.
           SPRITES for this screen to use sprites (the pointer
		sprite is always displayed)
           DUALPF for dual-playfield mode (not supported yet)
	    [For V36: The ViewModes field is superseded by a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 with
	    tag value SA_DisplayID.]

	Font = pointer to the default 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 structure for text in this
	    screen and all windows that open in this screen.  
                <link linkend="n730">Text</link>
                 that uses
	    this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 includes title bars of both screen and windows,
	    string gadgets, and menu titles.  Of course, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 that
	    specifies a NULL 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 field will use the screen/window default
	    fonts.  NOTE: Intuition will *NOT* call 
                <link linkend="n783">OpenDiskFont()</link>
                , so
	    the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 you supply must be in memory.  The ways to ensure
	    that are to either use a ROM font (Topaz 8 or 9) or first
	    call 
                <link linkend="n783">OpenDiskFont()</link>
                 to load the font, and don't close it
	    until after your screen is successfully opened.
	    [For V36: this is superseded by SA_Font and SA_SysFont.]

	DefaultTitle = pointer to a line of text that will be displayed along
	    the screen's title bar.  Null terminated, or just a NULL pointer
           to get no text
	    [For V36: superseded by SA_Title.]

	Gadgets = This field should be set to NULL, since no user gadgets may
	    be attached to a screen with the current versions of Intuition.

	CustomBitMap = if you're not supplying a custom bitmap, this value is
           ignored.  However, if you have your own display memory that you
           want used for this screen, the CustomBitMap field should point to
	    the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 structure that describes your display memory.  See the
           "Screens" chapter and the "Amiga ROM Kernel Manual" for more
           information about bitmaps.
	    [For V36: this is superseded by SA_BitMap.]

	[ All 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 extensions below are new for V36.]
	Extension = if NS_EXTENDED is set in NewScreen.Type, this pointer
	    should point to an array (or chain of arrays) of TagItems,
	    as defined in the include file 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                .   This
	    field is only defined in the structure 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ExtNewScreen</ulink>
                .
	    The values to use for TagItem.ti_Tag are defined below.  We
	    recommend that V36-specific applications use the new Intuition
	    entry point 
                <link linkend="n390">OpenScreenTagList()</link>
                , rather than using this field.
	    The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">ExtNewScreen</ulink>
                 structure is a convenient way to give V36
	    Intuition some information that V34 and earlier Intuition will
	    ignore.

	    Each 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 is an optional tagged data structure which identifies
	    an additional parameter to OpenScreen().  The applicable tag ID
	    values for TagItem.ti_Tag and their corresponding data follow.

	    Several of the tag items are alternative (and overriding) versions
	    to familiar fields in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                .  (Defaults only apply if
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 == NULL).  They are:

	SA_Left
	SA_Top
	SA_Width
	SA_Height
	    The defaults for the SA_Left, SA_Top, SA_Width, and
	    SA_Height tags end up being a bit complex.  If none of
	    these tags are specified, and no 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure is
	    used, then the left/top/width/height correctly match the
	    display clip of your screen (see SA_DClip and
	    SA_Overscan).

	    The difficulty comes with overscanned screens, because the
	    normal value of SA_Left or SA_Top for such a screen may be
	    non-zero.  If a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure is supplied, then the
	    left/top/width/height come originally from there.  If no
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure is supplied, but a non-default
	    SA_Width (SA_Height) is specified, then SA_Left (SA_Top)
	    defaults to zero instead.  In these cases, the left and
	    top edge may not be what you want.

	    If you need to specify explicit width or height, or supply
	    a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                , you must supply correct values for SA_Left
	    and SA_Top.  The correct normal values are the display
	    clip rectangle's MinX and MinY values respectively.  If
	    you are using the SA_DClip tag, then you already have a
	    rectangle to consult for these values.  If you are using
	    SA_Overscan to get one of the standard overscan types, you
	    may use 
                <link linkend="n397">QueryOverscan()</link>
                 to get a rectangle for that
	    overscan type.

	SA_Depth (defaults to 1)
	SA_DetailPen (defaults to 0)
	SA_BlockPen (defaults to 1)
	SA_Title (defaults to NULL)
	SA_Font (defaults to NULL, meaning user's preferred monospace font)
	SA_BitMap (whose existence also implies CUSTOMBITMAP).

	    Several tags are Booleans, which means that depending on whether
	    their corresponding ti_Data field is zero (FALSE) or non-zero
	    (TRUE), they specify Boolean attributes.  The ones corresponding
	    to Boolean flags in the NewScreen.Type field are:

	SA_ShowTitle (defaults to TRUE)
	SA_Behind (equiv. to SCREENBEHIND) (defaults to FALSE)
	SA_Quiet (equiv. to SCREENQUIET) (defaults to FALSE)

	    The following tags provide extended information to Intuition
	    when creating a screen:

	SA_Type: ti_Data corresponds to the SCREENTYPE bits of the
	    NewScreen.Type field.  This should be one of PUBLICSCREEN or
	    CUSTOMSCREEN.  The other bits of the NewScreen.Type field
	    must be set with the appropriate tags (SA_Behind, SA_Quiet,
	    etc.)

	SA_DisplayID: ti_Data is a 32-bit extended display mode ID, as
	  defined in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/modeid.h">&lt;graphics/modeid.h&gt;</ulink>
                 include file (V39 and up)
	  or in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">&lt;graphics/displayinfo.h&gt;</ulink>
                 (V37 and V38).

	SA_Overscan: ti_Data contains a defined constant specifying
	    one of the system standard overscan dimensions appropriate for
	    the display mode of the screen.  Used with the Width and
	    Height dimensions STDSCREENWIDTH and STDSCREEN, this makes
	    it trivial to open an overscanned or standard dimension
	    screen.  You may also hand-pick your various dimensions
	    for overscanned or other screens, by specifying screen position
	    and dimensions explicitly, and by using SA_DClip to explicitly
	    specify an overscanned DisplayClip region.

	    The values for ti_Data of this tag are as follows:

	    OSCAN_TEXT - 
                <link linkend="n730">Text</link>
                 Overscan region.  A region which is completely
	    on screen and readable ("text safe").  A preferences data
	    setting, this is backward equivalent with the old MoreRows,
	    and specifies the DisplayClip and default dimensions of the
	    Workbench screen.  This is the default.

	    OSCAN_STANDARD - Also a preferences setting, this specifies
	    a rectangle whose edges are "just out of view."  This yields
	    the most efficient position and dimensions of on-monitor
	    presentations, such as games and artwork.

	    OSCAN_MAX - This is the largest rectangular region that the
	    graphics library can handle "comfortably" for a given mode.
	    Screens can smoothly scroll (hardware pan) within this region,
	    and any DisplayClip or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 region within this rectangle
	    is also legal.  It is not a preferences item, but reflects
	    the limits of the graphics hardware and software.

	    OSCAN_VIDEO - This is the largest region that the graphics
	    library can display, comfortable or not.  There is no guarantee
	    that all smaller rectangles are valid.  This region is
	    typically out of sight on any monitor or TV, but provides our
	    best shot at "edge-to-edge" video generation.

	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                , using overscan drastically effects memory use and
	    chip memory bandwidth.  Always use the smallest (standard)
	    overscan region that works for your application.

	SA_DClip: ti_Data is a pointer to a rectangle which explicitly
	    defines a DisplayClip region for this screen.  See 
                <link linkend="n397">QueryOverscan()</link>
                	    for the role of the DisplayClip region.

	    Except for overscan display screens, this parameter is
	    unnecessary, and specifying a standard value using SA_Overscan
	    is normally an easier way to get overscan.

	SA_AutoScroll: this is a Boolean tag item, which specifies that
	    this screens is to scroll automatically when the mouse pointer
	    reaches the edge of the screen.  The operation of this requires
	    that the screen dimensions be larger than its DisplayClip
	    region.

	SA_PubName: If this field is present (and ti_Data is non-NULL),
	    it means that the screen is a public screen, and that
	    the public screen name string is pointed to by ti_Data.
	    Public screens are opened in "PRIVATE" mode and must
	    be made public using PubScreenStatus( screen, 0 ).

	SA_Pens: The ti_Data field (if non-NULL) points to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                	    array of pen specification, as defined for struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                .
	    This array will be used to initialize the screen's
	    DrawInfo.dri_Pens array.

	    SA_Pens is also used to decide that a screen is ready
	    to support the full-blown "new look" graphics.  If you
	    want the 3D embossed look, you must provide this tag,
	    and the ti_Data value cannot be NULL.  If it points
	    to a "minimal" array, containing just the terminator ~0,
	    you can specify "new look" without providing any values
	    for the pen array.

	    The way the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 pens are determined is Intuition
	    picks a default pen-array.  Then, any pens you supply with
	    SA_Pens override the defaults, up until the ~0 in your
	    array.

	    If the screen is monochrome or old-look, the default will
	    be the standard two-color pens.

	    If the screen is two or more planes deep, the default will
	    be the standard four-color pens, which now include the
	    new-look menu colors.

	    If the screen has the SA_LikeWorkbench property, the
	    default will be the user's preferred pen-array, changeable
	    through preferences.

	The following two tag items specify the task and signal to be issued
	to notify when the last "visitor" window closes on a public screen.
	This support is to assist envisioned public screen manager programs.

	SA_PubTask:  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 to be signalled.  If absent (and SA_PubSig is
	    valid), use the task which called OpenScreen() or
	    
                <link linkend="n390">OpenScreenTagList()</link>
                ).

	SA_PubSig:  Data is a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 signal number (not flag) used to notify
	    a task when the last visitor window closes on a public screen.

	SA_Colors: ti_Data points to an array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">ColorSpec</ulink>
                 structures
	    (terminated with ColorIndex = -1) which specify initial
	    values of the screen's color palette.

	SA_FullPalette: this is a Boolean attribute.  Prior to V36, there
	    were just 7 RGB color values that Intuition maintained
	    in its user preferences (playfield colors 0-3, and colors
	    17-19 for the sprite).  When opening a screen, the color
	    map for the screens viewport is first initialized by
	    graphics 
                <link linkend="n651">(graphics.library/GetColorMap()</link>
                ) then these
	    seven values are overridden to take the preferences values.

	    In V36, Intuition maintains a full set of 32 preferences colors.
	    If you specify TRUE for SA_FullPalette, Intuition will
	    override ALL color map entries with its full suite of
	    preferred colors.  (Defaults to FALSE).

	SA_ErrorCode: ti_Data points to a ULONG in which Intuition will
	    stick an extended error code if OpenScreen[TagList]() fails.
	    Values are of this include 0, for success, and:
	    OSERR_NOMONITOR	- monitor for display mode not available.
	    OSERR_NOCHIPS	- you need newer custom chips for display mode.
	    OSERR_NOMEM		- couldn't get normal memory
	    OSERR_NOCHIPMEM	- couldn't get chip memory
	    OSERR_PUBNOTUNIQUE	- public screen name already used
	    OSERR_UNKNOWNMODE	- don't recognize display mode requested
	    OSERR_TOODEEP	- screen too deep to be displayed on
				  this hardware (V39)
	    OSERR_ATTACHFAIL	- An illegal attachment of screens was
				  requested (V39)

	    NOTE: These values are not the same as some similar return
	    values defined in 
                <link linkend="n680">graphics.library/ModeNotAvailable()</link>
                .

	SA_SysFont: ti_Data selects one of the system standard fonts
	    specified in preferences.  This tag item overrides the
	    NewScreen.Font field and the SA_Font tag item.

	    Values recognized in ti_Data at present are:
		0 - old DefaultFont, fixed-width, the default.
		1 - Workbench screen preferred font.  You have to
		    be very font sensitive to handle a proportional or
		    larger than traditional screen font.

	    NOTE WELL: if you select sysfont 1, windows opened on
	    your screen will not inherit the screen font, but rather
	    the window 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 will be initialized to the old-style
	    DefaultFont (sysfont 0).

	Attached screen tags:  V39 supports attached screens, where
	    one or more child screens can be associated with a parent
	    screen.  Attached screens depth-arrange as a group, and
	    always remain adjacent depth-wise.  Independent
	    depth-arrangement of child screens is possible through
	    the V39 
                <link linkend="n410">ScreenDepth()</link>
                 call.  If a child screen is
	    made non-draggable through {SA_Draggable, FALSE}, then
	    it will drag exclusively with the parent.  Normal child
	    screens drag independently of the parent, but are pulled
	    down when the parent is.  Use the SA_Parent, SA_FrontChild,
	    and SA_BackChild tags to attach screens.

	SA_Parent:  If you wish to attach this screen to an
	    already-open parent screen, use this tag and set
	    ti_Data to point to the parent screen.  See also
	    SA_FrontChild and SA_BackChild.  (V39).

	SA_FrontChild:  If you wish to attach an already-open child
	    screen to this screen, set ti_Data to point to the child
	    screen.  The child screen will come to the front of the
	    family defined by the parent screen you are opening.  See
	    also SA_Parent and SA_BackChild.  (V39)

	SA_BackChild:  If you wish to attach an already-open child
	    screen to this screen, set ti_Data to point to the child
	    screen.  The child screen will go to the back of the family
	    defined by the parent screen you are opening.  See also
	    SA_Parent and SA_FrontChild.  (V39)

	SA_BackFill:  ti_Data is a pointer to a backfill hook for
	    the screen's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                .
	    (see layers.library/InstallLayerInfoHook()).  (V39).

	SA_Draggable:  ti_Data is a boolean.  Set to FALSE if you
	    wish your screen to be non-draggable.  This tag should be
	    used very sparingly!.  Defaults to TRUE.  For child screens
	    (see SA_Parent, SA_FrontChild, and SA_BackChild) this tag
	    has a slightly different meaning:  non-draggable child
	    screens are non-draggable with respect to their parent,
	    meaning they always drag exactly with the parent, as
	    opposed to having relative freedom.  Also see
	    
                <link linkend="n411">ScreenPosition()</link>
                .  (V39)

	SA_Exclusive:  ti_Data is a boolean.  Set to TRUE if you
	    never want your screen to share the display with another
	    screen.  This means that your screen can't be pulled down,
	    and will not appear behind other screens that are pulled
	    down.  Your screen may still be depth arranged, though.  Use
	    this tag sparingly!  Defaults to FALSE.  Starting with V40,
	    attached screens may be SA_Exclusive.  Setting SA_Exclusive
	    for each screen will produce an exclusive family.  (V39).

	SA_SharePens:  For those pens in the screen's
	    DrawInfo-&gt;dri_Pens, Intuition obtains them in shared mode
	    (see graphics.library/ObtainPen()).  For compatibility,
	    Intuition obtains the other pens of a public screen as
	    PENF_EXCLUSIVE.  Screens that wish to manage the pens
	    themselves should generally set this tag to TRUE.  This
	    instructs Intuition to leave the other pens unallocated.
	    Defaults to FALSE.  (V39).

	SA_Colors32:  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 to set the screen's initial palette colors
	    at 32 bits-per-gun.  ti_Data is a pointer to a table to be
	    passed to the 
                <link linkend="n675">graphics.library/LoadRGB32()</link>
                 function.  This
	    format supports both runs of color registers and sparse
	    registers.  See the autodoc for that function for full
	    details.  Any color set here has precedence over the same
	    register set by SA_Colors.  (V39).

	SA_Interleaved:  ti_Data is a boolean.  Set to TRUE to
	    request an interleaved bitmap for your screen.  Defaults to
	    FALSE.  If the system cannot allocate an interleaved bitmap for
	    you, it will attempt to allocate a non-interleaved one (V39).

	SA_VideoControl:  ti_Data points to a taglist that will be
	    passed to 
                <link linkend="n736">VideoControl()</link>
                 after your screen is open.  You
	    might use this to turn on border-sprites, for example.
	    (V39).

	SA_ColorMapEntries:  ti_Data is the number of entries that
	    you wish Intuition to allocate for this screen's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                .
	    While Intuition allocates a suitable number for ordinary
	    use, certain graphics.library features require a
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 which is larger than default.  (The default value is
	    1&lt;&lt;depth, but not less than 32).  (V39)

	SA_LikeWorkbench:  ti_Data is boolean.  Set to TRUE to get
	    a screen just like the Workbench screen.  This is the
	    best way to inherit all the characteristics of the
	    Workbench, including depth, colors, pen-array, screen mode,
	    etc.  Individual attributes can be overridden through the
	    use of tags.  (SA_LikeWorkbench itself overrides things
	    specified in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure).  Attention
	    should be paid to hidden assumptions when doing this.  For
	    example, setting the depth to two makes assumptions about
	    the pen values in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 pens.  Note that this
	    tag requests that Intuition ATTEMPT to open the screen
	    to match the Workbench.  There are fallbacks in case
	    that fails, so it is not correct to make enquiries about
	    the Workbench screen then make strong assumptions about
	    what you're going to get.  (Defaults to FALSE).  (V39)

 	SA_MinimizeISG:  ti_Data is boolean.  For compatibility,
	    Intuition always ensures that the inter-screen gap is at
	    least three non-interlaced lines.  If your application
	    would look best with the smallest possible inter-screen
	    gap, set ti_Data to TRUE.  If you use the new graphics
	    
                <link linkend="n736">VideoControl()</link>
                 VC_NoColorPaletteLoad tag for your screen's
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                , you should also set this tag.  (V40)


    RESULT
	If all is well, returns the pointer to your new screen
	If anything goes wrong, returns NULL, with further error
	specification in the variable pointed to by the SA_ErrorCode
	data field (V36 and later).

    NOTES
	By default, AmigaDOS requesters related to your process are put on
	the Workbench screen (these are messages like "Disk Full").  If
	you wish them to show up on custom screens, DOS must be told.
	This fragment shows the procedure.  More information is available
	in the AmigaDOS manuals.  Sample code fragment:

	#include "libraries/dosextens.h"
		...
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                	*process;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                	*window;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                		temp;
		...
		process = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 *) FindTask(NULL);
		temp = process-&gt;pr_WindowPtr;	(save old value)
		process-&gt;pr_WindowPtr = (APTR) window;
		( use a pointer to any open window on your screen )
			...
		your code goes here
			...
		process-&gt;pr_WindowPtr = temp;
		( restore value BEFORE 
                <link linkend="n338">CloseWindow()</link>
                 )
		CloseWindow(window);

	A VERY IMPORTANT NOTE about the Screen-&gt;BitMap.  In the future,
	bitmaps will need to grow.  The embedded instance of a bitmap
	in the screen will no longer be large enough to hold the whole
	description of the bitmap.

	YOU ARE STRONGLY URGED to use Screen-&gt;RastPort.BitMap in place of
	&amp;Screen-&gt;BitMap whenever and whereever possible.

    BUGS

    SEE ALSO
	
                <link linkend="n390">OpenScreenTagList()</link>
                , 
                <link linkend="n391">OpenWindow()</link>
                , 
                <link linkend="n395">PrintIText()</link>
                , 
                <link linkend="n337">CloseScreen()</link>
                ,
	
                <link linkend="n397">QueryOverscan()</link>
                 
                <link linkend="n396">PubScreenStatus()</link>
                , The Intuition Reference Manual,
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">utility/tagitem.h</ulink>
                , 
                <link linkend="n680">graphics.library/ModeNotAvailable()</link>
                ,
	
                <link linkend="n783">diskfont.library/OpenDiskFont()</link>
                , 
                <link linkend="n651">graphics.library/GetColorMap()</link>
            </literallayout>
        </section>
        <section id="n390">
            <title>intuition.library/OpenScreenTagList</title>
            <literallayout class="monospaced">
                   NAME	
	OpenScreenTagList -- 
                <link linkend="n389">OpenScreen()</link>
                 with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 extension array. (V36)
	OpenScreenTags -- Varargs stub for OpenScreenTagList. (V36)

   SYNOPSIS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = OpenScreenTagList( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                , TagItems )
	D0	  		    A0         A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *OpenScreenTagList( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = OpenScreenTags( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                , Tag1, ... )

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *OpenScreenTags( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 *,
		ULONG, ... );

   FUNCTION
	Provides an extension to the parameters passed to 
                <link linkend="n389">OpenScreen()</link>
                .
	This extensions is in the form of (a pointer to) an array of
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 structures, which have to fields: ti_Tag, an ID identifying
	the meaning of the other field, ti_Data.  See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                .

	The tag items can supplement or override the values in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                .
	In fact, you can pass a NULL value of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 pointer.
	For that matter, if you pass NULL in both arguments, you'll get
	a screen with defaults in all fields, including display mode,
	depth, colors, dimension, title, and so on.  We ask that
	you at least supply a title when you open a screen.

	See 
                <link linkend="n389">OpenScreen()</link>
                 documentation for parameter specifications.

   INPUTS
 	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                     - (optional) pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure.
 	TagItems      - (optional) pointer to (an array of) 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                			structures, terminated by the value TAG_END.

   RESULT
 	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                	- an open Intuition screen.  See 
                <link linkend="n389">OpenScreen()</link>
                 for
		extended error codes when 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 is returned NULL.

   EXAMPLE
	The version using a variable number of arguments must be
	created for each particular compiler, and may not have
	an analogue in all versions.  For vanilla, 32-bit C
	parameter passing conventions, this works (and will
	appear in amiga.lib):

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                	*
	OpenScreenTags( ns, tag1 )
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                	*ns;
	ULONG			tag1;
	{
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                	*OpenScreenTagList();

	    return ( OpenScreenTagList( ns, (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *) &amp;tag1 ) );
	}

   NOTES
	We recommend this extension to 
                <link linkend="n389">OpenScreen()</link>
                 over using the
	field ExtNewScreen.Extension.  However, the ExtNewScreen.Extension
	is a convenient way to supply a few tags to V36 Intuition which
	will be ignored by V34 Intuition.  See 
                <link linkend="n389">OpenScreen()</link>
                 documentation
	for lots of details.

	A VERY IMPORTANT NOTE about the Screen-&gt;BitMap.  In the future,
	bitmaps will need to grow.  The embedded instance of a bitmap
	in the screen will no longer be large enough to hold the whole
	description of the bitmap.

	YOU ARE STRONGLY URGED to use Screen-&gt;RastPort.BitMap in place of
	&amp;Screen-&gt;BitMap whenever and whereever possible.

   BUGS


   SEE ALSO
	
                <link linkend="n389">OpenScreen()</link>
                
            </literallayout>
        </section>
        <section id="n391">
            <title>intuition.library/OpenWindow</title>
            <literallayout class="monospaced">
                    NAME
	OpenWindow -- 
                <link linkend="n126">Open</link>
                 an Intuition window.

    SYNOPSIS
   	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = OpenWindow( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 )
	D0                   A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *OpenWindow( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 * );

    FUNCTION
	Opens an Intuition window of the given dimensions and position,
	with the properties specified in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 structure.
	Allocates everything you need to get going.

	New for V36: there is an extensive discussion of public Screens
	and visitor windows at the end of this section.  Also,
	you can provide extensions to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 parameters using
	and array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 structures.  See the discussion below,
	and the documentation for the function 
                <link linkend="n390">OpenScreenTagList()</link>
                .

	Before you call OpenWindow(), you must initialize an instance of
	a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 structure.  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 is a structure that contains
	all of the arguments needed to open a window.  The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                	structure may be discarded immediately after it is used to open
	the window.

	If Type == CUSTOMSCREEN, you must have opened your own screen
	already via a call to 
                <link linkend="n389">OpenScreen()</link>
                .  Then Intuition uses your screen
	argument for the pertinent information needed to get your window
	going.  On the other hand, if type == one of the Intuition's standard
	screens, your screen argument is ignored.  Instead,
	Intuition will check to see whether or not that screen
	already exists:  if it doesn't, it will be opened first before
	Intuition opens your window in the standard screen.

	New for V36: If you specify Type == WBENCHSCREEN, then your
	window will appear on the Workbench screen, unless the global
	public screen mode SHANGHAI is set, in which case your window
	will be "hijacked" to the default public screen.  See also
	
                <link linkend="n424">SetPubScreenModes()</link>
                .

	New for V36: If the WFLG_NW_EXTENDED flag is set, it means that the
	field 'ExtNewWindow-&gt;Extension' points to an array of TagItems, as
	defined in intuition/tagitem.h.  This provides an extensible means
	of providing extra parameters to OpenWindow.  For compatibility
	reasons, we could not add the 'Extension' field to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                	structure, so we have define a new structure 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">ExtNewWindow</ulink>
                , which
	is identical to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 with the addition of the Extension field.

	We recommend that rather than using ExtNewWindow.Extension, you
	use the new Intuition function 
                <link linkend="n392">OpenWindowTagList()</link>
                 and its
	varargs equivalent OpenWindowTags().  We document the window
	attribute tag ID's (ti_Tag values) here, rather than in
	
                <link linkend="n392">OpenWindowTagList()</link>
                , so that you can find all the parameters
	for a new window defined in one place.

	If the WFLG_SUPER_BITMAP flag is set, the bitmap variable must point
	to your own bitmap.

	The DetailPen and the BlockPen are used for system rendering; for
	instance, the title bar is first filled using the BlockPen, and then
	the gadgets and text are rendered using DetailPen.  You can either
	choose to supply special pens for your window, or, by setting either
	of these arguments to -1, the screen's pens will be used instead.

	Note for V36: The DetailPen and BlockPen no longer determine
	what colors will be used for window borders, if your window
	opens on a "full-blown new look screen."

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 = pointer to an instance of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 structure.  That
               structure is initialized with the following data:
   -------------------------------------------------------------------------
	Left = the initial x-position for your window
	Top = the initial y-position for your window
	Width = the initial width of this window
	Height = the initial height of this window

	DetailPen = pen number (or -1) for the rendering of window details
         (like gadgets or text in title bar)
	BlockPen = pen number (or -1) for window block fills (like title bar)
	[For V36: Title bar colors are determined otherwise.]

	Flags = specifiers for your requirements of this window, including:
	     which system gadgets you want attached to your window:

	    - WFLG_DRAGBAR allows this window to be dragged
	    - WFLG_DEPTHGADGET lets the user depth-arrange this window
	    - WFLG_CLOSEGADGET attaches the standard close gadget
	    - WFLG_SIZEGADGET allows this window to be sized.

	    If you ask for the WFLG_SIZEGADGET gadget, you must specify one or
	    both of the flags WFLG_SIZEBRIGHT and WFLG_SIZEBBOTTOM below; if
	    you don't, the default is WFLG_SIZEBRIGHT.  See the following items
	    WFLG_SIZEBRIGHT and WFLG_SIZEBBOTTOM for more details.

	    - WFLG_SIZEBRIGHT is a special system gadget flag that
	      you set to specify whether or not you want the
	      RIGHT border adjusted to account for the physical size
	      of the sizing gadget.  The sizing gadget must, after
	      all, take up room in either the right or bottom border
	      (or both, if you like) of the window.  Setting either
	      this or the WFLG_SIZEBBOTTOM flag selects which edge
	      will take up the slack.  This will be particularly
	      useful to applications that want to use the extra space
	      for other gadgets (like a proportional gadget and two
	      Booleans done up to look like scroll bars) or, for
	      for instance, applications that want every possible
	      horizontal bit and are willing to lose lines vertically.
	      NOTE:  if you select WFLG_SIZEGADGET, you must select
	      either WFLG_SIZEBRIGHT or WFLG_SIZEBBOTTOM or both.  If
	      you select neither, the default is WFLG_SIZEBRIGHT.
	    - WFLG_SIZEBBOTTOM is a special system gadget flag that
	      you set to specify whether or not you want the
	      BOTTOM border adjusted to account for the physical size
	      of the sizing gadget.  For details, refer to
	      WFLG_SIZEBRIGHT above.

	    - WFLG_GIMMEZEROZERO for easy but expensive output

	    what type of window layer you want, either:
	    - WFLG_SIMPLE_REFRESH
	    - WFLG_SMART_REFRESH
	    - WFLG_SUPER_BITMAP

	    - WFLG_BACKDROP for whether or not you want this window to be one
	      of Intuition's special backdrop windows.  See WFLG_BORDERLESS
	      as well.

	    - WFLG_REPORTMOUSE for whether or not you want to "listen" to
	      mouse movement events whenever your window is the active
	      one.  After you've opened your window, if you want to change
	      you can later change the status of this via a call to
	      
                <link linkend="n406">ReportMouse()</link>
                .  Whether or not your window is listening to
	      mouse is affected by gadgets too, since they can cause you
	      to start getting reports too if you like.  The mouse move
	      reports (either InputEvents or messages on the IDCMP) that
	      you get will have the x/y coordinates of the current mouse
	      position, relative to the upper-left corner of your window
	      (WFLG_GIMMEZEROZERO notwithstanding).  This flag can work in
	      conjunction with the IDCMP Flag called IDCMP_MOUSEMOVE, which
	      allows you to listen via the IDCMP.

	    - WFLG_BORDERLESS should be set if you want a window with no
	      border padding.  Your window may have the border variables
	      set anyway, depending on what gadgetry you've requested for
	      the window, but you won't get the standard border lines and
	      spacing that comes with typical windows.

	      This is a good way to take over the entire screen, since you
	      can have a window cover the entire width of the screen using
	      this flag.  This will work particularly well in conjunction
	      with the WFLG_BACKDROP flag (see above), since it allows you
	      to open a window that fills the ENTIRE screen.  NOTE:  this is
	      not a flag that you want to set casually, since it may cause
	      visual confusion on the screen.  The window borders are the
	      only dependable visual division between various windows and
	      the background screen.  Taking away that border takes away
	      that visual cue, so make sure that your design doesn't need
	      it at all before you proceed.

	    - WFLG_ACTIVATE is the flag you set if you want this window to
	      automatically become the active window.  The active
	      window is the one that receives input from the keyboard and
	      mouse.  It's usually a good idea to to have the window you
	      open when your application first starts up be an ACTIVATED
	      one, but all others opened later not be ACTIVATED (if the
	      user is off doing something with another screen, for
	      instance, your new window will change where the input is
	      going, which would have the effect of yanking the input rug
	      from under the user).  Please use this flag thoughtfully and
	      carefully.

	      Some notes: First, your window may or may not be active
	      by the time this function returns.  Use the IDCMP_ACTIVEWINDOW
	      IDCMP message to know when your window has become active.
	      Also, be very careful not to mistakenly specify the
	      obsolete flag names WINDOWACTIVE or ACTIVEWINDOW.  These are
	      used in other contexts, and their values unintentionally added
	      to your flags can cause most unfortunate results.  To avoid
	      confusion, they are now know as WFLG_WINDOWACTIVE and
	      IDCMP_ACTIVEWINDOW.

	    - WFLG_RMBTRAP, when set, causes the right mouse button events
	      to be trapped and broadcast as events.  You can receive
	      these events through either the IDCMP or the console.

	    - WFLG_NOCAREREFRESH indicates that you do not wish to
	      be responsible for calling 
                <link linkend="n329">BeginRefresh()</link>
                 and 
                <link linkend="n350">EndRefresh()</link>
                	      when your window has exposed regions (i.e., when the
	      IDCMP_REFRESHWINDOW message would be generated).  See also
	      the descriptions of these two functions.

	    - WFLG_NW_EXTENDED (V36) indicates that 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 in fact points
	      to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">ExtNewWindow</ulink>
                 structure, and that the 'Extension'
	      field points to an array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 structures, with
	      meaning described below.

	    - WFLG_NEWLOOKMENUS (V39) Requests new-look menu treatment.
	      
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 colors are derived from the screen 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 BARDETAILPEN,
	      BARBLOCKPEN, and BARTRIMPEN, instead of window detail and
	      block pens.  Also requests that a suitably scaled and colored
	      Amiga-key symbol and checkmark symbol be used in the menus.
	      Applications using WFLG_NEWLOOKMENUS need to use the new screen
	      
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 pens to color their 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">MenuItem</ulink>
                 and SubItem imagery.
	      If your application uses GadTools, the {GTMN_NewLookMenus,TRUE}
	      tag-item should be passed to the menu layout calls.

	      (NB: For the menus to actually appear with improved colors,
	      the screen's opener must supply suitable values for the
	      new menu pens in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                .  If this is not the case,
	      then an application requesting NewLookMenus will get the
	      scaled Amiga-key and checkmark but in V37-compatible colors.
	      Note that the screen's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 will always contain valid
	      values for the new pens;  they just may correspond to the
	      "old look").

	IDCMPFlags = IDCMP is the acronym for Intuition Direct Communications
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 Port.  (It's Intuition's sole acronym.) If any of the
	    IDCMP Flags is selected, Intuition will create a pair of
	    message ports and use them for direct communications with the
	    task opening this window (as compared with broadcasting
	    information via the Console device).  See the "Input and
	    
                <link linkend="n128">Output</link>
                 Methods" chapter of the Intuition Reference Manual for
	    complete details.

	    You request an IDCMP by setting any of these flags.  Except
	    for the special VERIFY flags, every other flag you set tells
	    Intuition that if a given event occurs which your program
	    wants to know about, it is to broadcast the details of that
	    event through the IDCMP rather than via the Console device.
	    This allows a program to interface with Intuition directly,
	    rather than going through the Console device.

	    Many programs have elected to use IDCMP communication
	    exclusively, and not to associate a console with their
	    windows at all.  Some operations, such as IDCMP_MENUVERIFY,
	    can ONLY be achieved using IDCMP.

           The IDCMP flags you can set are described in the
	    
                <link linkend="n375">ModifyIDCMP()</link>
                 autodoc.

	Gadgets = the pointer to the first of a linked list of the your own
	      Gadgets which you want attached to this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                .  Can be NULL
	      if you have no Gadgets of your own

       CheckMark = a pointer to an instance of the struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 where can
	      be found the imagery you want used when any of your
	      menu items is to be checkmarked.  If you don't want to
	      supply your own imagery and you want to just use
	      Intuition's own checkmark, set this argument to NULL

       
                <link linkend="n730">Text</link>
                 = a null-terminated line of text to appear on the title bar of
	      your window (may be null if you want no text)

       Type = the screen type for this window.  If this equal CUSTOMSCREEN,
	      you must have already opened a CUSTOMSCREEN (see text above).
	      Types available include:
		  - WBENCHSCREEN
		  - CUSTOMSCREEN
		  - PUBLICSCREEN (new for V36, see text below)

       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = if your type is one of Intuition's standard screens, then
	      this argument is ignored.  However, if Type == CUSTOMSCREEN,
	      this must point to the structure of your own screen

       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 = if you have specified WFLG_SUPER_BITMAP as the type of
	       refreshing you want for this window, then this value points to a
	       instance of the struct bitmap.  However, if the refresh type
	       is NOT WFLG_SUPER_BITMAP, this pointer is ignored.

       MinWidth, MinHeight, MaxWidth, MaxHeight = the size limits for this
	      window.  These must be reasonable values, which is to say that
	      the minimums cannot be greater than the current size, nor can
	      the maximums be smaller than the current size.  If they are,
	      they're ignored.  Any one of these can be initialized to zero,
	      which means that that limit will be set to the current
	      dimension of that axis.  The limits can be changed after the
	      
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 is opened by calling the 
                <link linkend="n438">WindowLimits()</link>
                 routine.

	      NOTE: ORIGINALLY, we stated that:

	      "If you haven't requested the WFLG_SIZEGADGET option, these
	      variables are ignored so you don't have to initialize them."

	      It is now clear that a variety of programs take it upon
	      themselves to call 
                <link linkend="n428">SizeWindow()</link>
                 (or 
                <link linkend="n333">ChangeWindowBox()</link>
                ) without
	      your program's consent or consulting your WFLG_SIZEGADGE
	      option.  To protect yourself against the results, we strongly
	      urge that if you supply suitable values for these fields even
	      if you do not specify WFLG_SIZEGADGET.

	      The maximums may be LARGER than the current size, or even
	      larger than the current screen.  The maximums should be set to
	      the highest value your application can handle.  This allows
	      users with larger display devices to take full advantage of
	      your software.  If there is no good reason to limit the size,
	      then don't.  -1 or ~0 indicates that the maximum size is only
	      limited by the size of the window's screen.

	      See also the docs on the function 
                <link linkend="n438">WindowLimits()</link>
                 for more
	      information.

       Extension (New for V36) = a pointer to an array (or chain of arrays)
	    of TagItems to specify additional parameters to OpenWindow().
	    TagItems in general are described in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">utility/tagitem.h</ulink>
                ,
	    and the OpenWindow tags are defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">intuition/intuition.h</ulink>
                	    and described here.  For items pertaining to Public Screens
	    and visitor windows, please see below.

	Here are the TagItem.ti_Tag values that are defined for OpenWindow
	(and 
                <link linkend="n392">OpenWindowTagList()</link>
                ).

	Certain tags simply override equivalent values in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                ,
	and allow you to open a window using 
                <link linkend="n392">OpenWindowTagList()</link>
                 without
	having a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 structure at all.  In each case, cast
	the corresponding data to ULONG and put it in ti_Data.

	The compatible tag items include:

	WA_Left
	WA_Top
	WA_Width
	WA_Height
	WA_DetailPen	- NOTE: only overrides NewWindow.DetailPen of -1!
	WA_BlockPen	- NOTE: only overrides NewWindow.BlockPen of -1!
	WA_IDCMP
	WA_Flags	- initial values for Flags before looking at other
			  Boolean component 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 values
	WA_Gadgets
	WA_Title
	WA_CustomScreen	- also implies CUSTOMSCREEN property
	WA_SuperBitMap	- also implies WFLG_SUPER_BITMAP refresh mode.
	WA_MinWidth
	WA_MinHeight
	WA_MaxWidth
	WA_MaxHeight

	These Boolean tag items are alternatives to the NewWindow.Flags
	Boolean attributes with similar names.

	WA_SizeGadget		- equivalent to WFLG_SIZEGADGET
	WA_DragBar		- equivalent to WFLG_DRAGBAR
	WA_DepthGadget		- equivalent to WFLG_DEPTHGADGET
	WA_CloseGadget		- equivalent to WFLG_CLOSEGADGET
	WA_Backdrop		- equivalent to WFLG_BACKDROP
	WA_ReportMouse		- equivalent to WFLG_REPORTMOUSE
	WA_NoCareRefresh	- equivalent to WFLG_NOCAREREFRESH
	WA_Borderless		- equivalent to WFLG_BORDERLESS
	WA_Activate		- equivalent to WFLG_ACTIVATE
	WA_RMBTrap		- equivalent to WFLG_RMBTRAP
	WA_WBenchWindow		- equivalent to WFLG_WBENCHWINDOW
				  (system PRIVATE)
	WA_SimpleRefresh 	- only specify if TRUE
	WA_SmartRefresh 	- only specify if TRUE
	WA_SizeBRight		- equivalent to WFLG_SIZEBRIGHT
	WA_SizeBBottom		- equivalent to WFLG_SIZEBBOTTOM
	WA_GimmeZeroZero 	- equivalent to WFLG_GIMMEZEROZERO
	WA_NewLookMenus		- equivalent to WFLG_NEWLOOKMENUS

	The following tag items specify new attributes of a window.

	WA_ScreenTitle - You can specify the screen title associated
	    with your window this way, and avoid a call to 
                <link linkend="n426">SetWindowTitles()</link>
                	    when your window opens.

	WA_AutoAdjust - a Boolean attribute which says that it's OK
	    to move or even shrink the dimensions of this window
	    to fit it on the screen, within the dimension
	    limits specified by MinWidth and MinHeight.
	    Someday, this processing might be sensitive to the
	    currently visible portion of the screen the window
	    will be opening on, so don't draw too many conclusions
	    about the auto-adjust algorithms.
	    (Normally, this attribute defaults to FALSE.  However,
	    if you call OpenWindowTags() or 
                <link linkend="n392">OpenWindowTagList()</link>
                	    with a NULL 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 pointer, this attribute defaults
	    to TRUE).

	WA_InnerWidth
	WA_InnerHeight - You can specify the dimensions of the interior
	    region of your window, independent of what the border
	    thicknesses will be.  You probably want to specify
	    WA_AutoAdjust to allow Intuition to move your window
	    or even shrink it so that it is completely on screen.

	    Note: using these tags puts some reasonable restrictions
	    on the gadgets you can specify as "border" gadgets when
	    you open your window.  Since border gadgets determine
	    the border dimensions and hence the overall dimensions of
	    your window, those dimensions cannot be used calculating
	    the position or dimensions of border gadgets.

	    Here's the complete list of restrictions:
	    - GACT_LEFTBORDER gadgets cannot be GFLG_RELWIDTH if
	      WA_InnerWidth is used.
	    - GACT_RIGHTBORDER gadgets MUST be GFLG_RELRIGHT if
	      WA_InnerWidth is used.
	    - GACT_TOPBORDER gadgets cannot be GFLG_RELHEIGHT if
	      WA_InnerHeight is used.
	    - GACT_BOTTOMBORDER gadgets MUST be GFLG_RELBOTTOM if
	      WA_InnerHeight is used.

	WA_PubScreenName - This tag item declares that you want your window
	    to open as a visitor window on the public screen whose name
	    is pointed to by (UBYTE *) ti_Data.

	WA_PubScreen - 
                <link linkend="n126">Open</link>
                 as a visitor window on the public screen
	    whose address if provided as (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *) ti_Data.
	    To ensure that this screen remains open long enough, you
	    must either:
		1) Be the screen's owner
		2) have another window already open on the screen
		3) use 
                <link linkend="n371">LockPubScreen()</link>
                	    Using 
                <link linkend="n241">exec.library/Forbid()</link>
                 is not sufficient.

	    You can provide ti_Data to be NULL (zero), without any
	    of the above precautions, to specify the default public screen.

	WA_PubScreenFallBack - This Boolean attribute specifies that a
	    visitor window should "fall back" to opening on the default
	    public screen if the explicitly specify public screen is not
	    available.

	WA_WindowName - this visionary specification of a window
	    rendezvous name string is not yet implemented.

	WA_Colors - this equally great idea about associating a palette
	    specification with the active window may not ever be implemented.

	WA_Zoom - ti_Data points to an array of four WORD's to be used
	    as the initial Left/Top/Width/Height of the "alternate
	    Zoom position and dimensions."  The presence of this tag
	    item implies that you want a Zoom gadget, even though you
	    might not have a sizing gadget.
	    New for V39: if the initial zoom-box left and top are
	    both set to ~0, then Intuition will give your window
	    "size-only" zooming, meaning that zooming the window
	    will not affect the left/top unless the window needs
	    to be moved on-screen.

	WA_MouseQueue - This tag specifies a limit for the number
	    of outstanding IDCMP_MOUSEMOVE IntuiMessages that Intuition
	    will send to your window.  You can change the value of this
	    limit after the window is open using 
                <link linkend="n421">SetMouseQueue()</link>
                .

	WA_RptQueue - This tag specifies a limit for the number of
	    outstanding repeated-IDCMP_RAWKEY, repeated-IDCMP_VANILLAKEY,
	    and repeated-IDCMP_IDCMPUPDATE IntuiMessages that Intuition will
	    send to your window.  Currently, there is no function to adjust
	    the repeat-key queue.

	WA_BackFill - ti_Data is a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 structure that
	    the Layers library will call when your window needs
	    "backfilling."  See 
                <link linkend="n760">layers.library/InstallLayerHook()</link>
                .

 	WA_MenuHelp - ti_Data is a boolean.  If true, enables the MenuHelp
	    feature for this window.  See IDCMP_MENUHELP above.  (V37)

	WA_NotifyDepth - ti_Data is a boolean.  Set to true if you
	    would also like IDCMP_CHANGEWINDOW events sent to your window
	    when it is depth-arranged.  Normally, such events are only
	    sent for movement or resizing of the window.
	    IDCMP_CHANGEWINDOW events originating from
	    depth-arrangement have a Code equal to CWCODE_DEPTH, as
	    opposed to CWCODE_MOVESIZE.  (V39)

	WA_Checkmark - (ti_Data is struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 *) 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 to use as a
	    checkmark in menus.  Prior to V39, or if WA_NewLookMenus
	    is not specified, the default will be the traditional
	    checkmark in the original colors.  Under V39 and higher,
	    if you have requested WA_NewLookMenus then the default will
	    be an appropriately colored checkmark scaled to the screen's
	    font.  Alternately, you can provide a custom one, which you
	    can design yourself or get from sysiclass (use this if
	    your menu-font is different from the screen's font).

	WA_AmigaKey - (ti_Data is struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 *) 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 to use as
	    the Amiga-key symbol in menus.  If WA_NewLookMenus is not
	    specified, the default will be the traditional Amiga-key
	    symbol in the original colors.  If you've requested
	    WA_NewLookMenus, then the default will be an appropriately
	    colored Amiga-key scaled to the screen's font.
	    Alternately, you can provide a custom one, which you can
	    design yourself or get from sysiclass (use this if your
	    menu-font is different from the screen's font).  (V39)

	WA_Pointer - (APTR) The pointer you wish to associate with
	    your window.  If NULL, you are requesting the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                	    default pointer.  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/custom.h">Custom</ulink>
                 pointers should be allocated by
	    performing a 
                <link linkend="n381">NewObject()</link>
                 on "pointerclass".  (See
	    &lt;intuition/pointerclass.h&gt;).  Defaults to NULL.  This tag is
	    also recognized by 
                <link linkend="n425">SetWindowPointerA()</link>
                .  (V39)

	WA_BusyPointer (BOOL) - Set to TRUE to request the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                	    busy-pointer.  If FALSE, your pointer will be as requested
	    by WA_Pointer.  Defaults to FALSE.  This tag is also
	    recognized by 
                <link linkend="n425">SetWindowPointerA()</link>
                .  (V39)

	WA_PointerDelay - (BOOL) Set to TRUE to defer changing your
	    pointer for a brief instant.  This is typically used along
	    with setting the busy pointer, especially when the
	    application knows it may be busy for a very short while.  If
	    the application clears the pointer or sets another pointer
	    before the delay expires, the pending pointer change is
	    cancelled.  This reduces short flashes of the busy pointer.
	    This tag is also recognized by 
                <link linkend="n425">SetWindowPointerA()</link>
                .  (V39)

	WA_HelpGroup - (ULONG) Normally, only the active window can
	    receive IDCMP_GADGETHELP messages.  However, an application
	    with multiple windows will want all its windows to be able
	    to receive help when any of them are active.  First obtain a
	    unique help ID with 
                <link linkend="n460">utility.library/GetUniqueID()</link>
                , then
	    pass it as ti_Data of this tag to all your windows.  See
	    
                <link linkend="n365">HelpControl()</link>
                .  (V39)

	WA_HelpGroupWindow - (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *) Instead of using
	    WA_HelpGroup, you can pass a pointer to another window
	    whose HelpGroup you wish this window to belong to.  (V39)

	WA_TabletMessages - (BOOL) Set to TRUE to request extended
	    IntuiMessages for your window.  If a tablet driver is
	    generating IESUBCLASS_NEWTABLET input events, you will be
	    able to receive extended tablet information with most
	    IntuiMessages.  See the eim_TabletData field of the
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">ExtIntuiMessage</ulink>
                 structure.  Defaults to FALSE.  (V39)

   NOTES
	Regarding Public Screens, you can specify a window to be a
	"visitor window" on a public screen in one of several ways.
	In each case, you must be sure not to specify a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                	type of CUSTOMSCREEN.  You should use the value PUBLICSCREEN.

	There are actually several ways you can specify which screen
	you want a visitor window to be opened on:

	    1) Specify the name of the public screen WA_PubScreenName,
	    or a NULL pointer, in ti_Data.  The name might have been
	    provided by the user.  A NULL pointer means to use the
	    default public screen.

	    If the named screen cannot be found, the default public screen
	    will be used if the Boolean attribute WA_PubScreenFallBack
	    is TRUE.

	    2) Specify a pointer to a public screen using the
	    WA_PubScreen tag item.  The WA_PubScreenFallBack
	    attribute has no effect.  You can specify the default
	    public screen by providing a NULL pointer.

	    You can also specify the pointer by setting NewWindow.Type
	    to PUBLICSCREEN, and specifying the public screen pointer
	    in NewWindow.Screen.  The WA_PubScreen tag item has precedent
	    over this technique.

	    Unless NULL, the screen pointer provided MUST be a valid
	    public screen.  You may ensure this several ways:

	    - Be the owner of the screen.
	    - Have a window already open on the screen.
	    - Use 
                <link linkend="n371">LockPubScreen()</link>
                 to prevent the screen from closing.
	    - specifying the WFLG_VISITOR bit in NewWindow.Flags is not
	      supported.

	    It is anticipated that the last will be the most common method
	    of opening public screens because you often want to examine
	    properties of the screen your window will be using in order
	    to compensate for differences in dimension, depth, and font.

	    The standard sequence for this method is as follows:
	    
                <link linkend="n371">LockPubScreen()</link>
                	- obtain a pointer and a promise
	    layout window	- adapt your window to the screen you will use
	    OpenWindow()	- using the pointer you specify
	    
                <link linkend="n432">UnlockPubScreen()</link>
                	- once your window is open, you can let go
				  of the lock on the public screen
	    ... normal window even processing ...
	    
                <link linkend="n338">CloseWindow()</link>
                .

	Regarding "service" windows, such as those opened for a system
	requester or file requester associated with a given "client"window.
	These windows should NOT be "visitor" windows.  
                <link linkend="n126">Open</link>
                 them
	using NewWindow.Type = CUSTOMSCREEN and NewWindow.Screen
	equal to the screen of the client window (window-&gt;WScreen).
	You can also use WA_CustomScreen, which has precedence.

	This ensures that the requester service window will be allowed to
	open on the same screen as the client window, even if that
	screen is not a public screen, or has private status.

	This has an implication for service/client protocol: when you
	pass a window pointer to any system requester routine or
	to a routine which creates some other other service window,
	you MUST keep your window open until the client window
	is closed.

	If a requester service will allow a NULL client window, this
	should indicate to open the service window on the default public
	screen (probably Workbench).  The correct way to get a pointer
	to this screen is to call LockPubScreen( NULL ).  In this
	case, you want to open as a visitor window, which means you
	should use either PUBLICSCREEN or WA_PubScreen, described above.
	You should call 
                <link linkend="n432">UnlockPubScreen()</link>
                 after your visitor window is open.

	As of V36, gadgets in the right and bottom border
	(specified with GACT_RIGHTBORDER and GACT_BOTTOMBORDER) only
	contribute to the dimensions of the borders if they are also
	GFLG_RELRIGHT and GFLG_RELBOTTOM, respectively.

    RESULT
	If all is well, returns the pointer to your new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                	If anything goes wrong, returns NULL

    BUGS
	When you open a window, Intuition will set the font of
	the window's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to the font of the window's screen.
	This does not work right for GimmeZeroZero windows: the
	BorderRPort 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 has the font set correctly, but
	Window.RPort is set up with the system default font.
	For compatibility reasons, we won't be fixing this problem.

	Also, there is a compatibility trick going on with the
	default font of your window's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 if the screen's
	font is "fancy."  See the SA_SysFont attribute described
	under 
                <link linkend="n389">OpenScreen()</link>
                .

	Unless you arrange otherwise, each window you open will allocate
	a signal for your task from the 16 "user signals."
	If no signal is available, your window will not be able
	to be opened.  In early V36 versions and before, Intuition didn't
	check this condition, but just left you with an unusable port.

    SEE ALSO
       
                <link linkend="n392">OpenWindowTagList()</link>
                , 
                <link linkend="n389">OpenScreen()</link>
                , 
                <link linkend="n375">ModifyIDCMP()</link>
                , 
                <link linkend="n426">SetWindowTitles()</link>
                ,
	
                <link linkend="n371">LockPubScreen()</link>
                , 
                <link linkend="n416">SetDefaultPubScreen()</link>
                , 
                <link linkend="n441">ZipWindow()</link>
                ,
	
                <link linkend="n760">layers.library/InstallLayerHook()</link>
                , 
                <link linkend="n424">SetPubScreenModes()</link>
            </literallayout>
        </section>
        <section id="n392">
            <title>intuition.library/OpenWindowTagList</title>
            <literallayout class="monospaced">
                   NAME	
	OpenWindowTagList -- 
                <link linkend="n391">OpenWindow()</link>
                 with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 extension. (V36)
	OpenWindowTags -- Varargs stub for OpenWindowTagList (V36)

   SYNOPSIS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = OpenWindowTagList( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                , TagItems )
	D0	  		    A0         A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *OpenWindowTagList( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = OpenWindowTags( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                , Tag1, ... )

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *OpenWindowTags( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 *, ULONG, ... );

   FUNCTION
	A variation of 
                <link linkend="n391">OpenWindow()</link>
                 that allow direct specification of
	a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 array of extension data.  Recommended over using the
	ExtNewWindow.Extension field.

	If you omit the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 (pass NULL), a set of defaults
	are used, and overridden by the tag items.  Even without
	any tag items at all, a reasonable window opens on the Workbench
	or default public screen.

	See 
                <link linkend="n391">OpenWindow()</link>
                 for all the details.

   INPUTS
 	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 - (optional) pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">NewWindow</ulink>
                 structure.
	TagItems - (optional) pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 array, with tag
		values as described under the description for
		
                <link linkend="n391">OpenWindow()</link>
                .

   RESULT
 	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 - newly created window, per your specifications.

   EXAMPLE
	See 
                <link linkend="n390">OpenScreenTagList()</link>
                 for an example of how to create
	a "varargs" version of this function for convenient C
	language programming.

   NOTES


   BUGS


   SEE ALSO
	
                <link linkend="n391">OpenWindow()</link>
                
            </literallayout>
        </section>
        <section id="n393">
            <title>intuition.library/OpenWorkBench</title>
            <literallayout class="monospaced">
                    NAME 
	OpenWorkBench -- 
                <link linkend="n126">Open</link>
                 the Workbench screen.

    SYNOPSIS 
	WBScreen = OpenWorkBench()
	D0

	ULONG OpenWorkBench( VOID );

    FUNCTION 
	This routine attempts to reopen the Workbench.  The actions taken are:
	    - general good stuff and nice things, and then return a non-null
	      pointer to the Workbench screen.
	    - find that something has gone wrong, and return NULL

	The return value, if not NULL, is indeed the address of the Workbench
	screen, although you should not use it as such.  This is because the
	Workbench may be closed by other programs, which can invalidate
	the address at any time.  We suggest that you regard the return
	value as a ULONG indication that the routine has succeeded, if
	you pay any attention to it at all.

    INPUTS 
	None

    RESULT 
	non-zero if Workbench screen opened successfully, or was already
		opened
	zero if anything went wrong and the Workbench screen isn't out there

    BUGS 
	The name of this routine is spelled wrong: it ought to have been
	OpenWorkbench().

    SEE ALSO 

            </literallayout>
        </section>
        <section id="n394">
            <title>intuition.library/PointInImage</title>
            <literallayout class="monospaced">
                   NAME	
	PointInImage -- Tests whether an image "contains" a point. (V36)

   SYNOPSIS
	DoesContain = PointInImage( Point, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 )
	D0	  		    D0     A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 PointInImage( struct Point, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 * );

   FUNCTION
	Tests whether a point is properly contained in an image.
	The intention of this is to provide custom gadgets a means
	to delegate "image mask" processing to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                , where
	it belongs (superseding things like BOOLMASK).  After all,
	a rounded rect image with a drop shadow knows more about
	what points are inside it than anybody else should.

	For traditional Intuition Images, this routine checks if
	the point is in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 box (LeftEdge/RightEdge/Width/Height).

   INPUTS
 	Point	- Two words, X/Y packed into a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , with high word
		containing 'X'.  This is what you get if you pass
		a Point structure (not a pointer!) using common
		C language parameter conventions.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 - a pointer to a standard or custom 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 data object.
	    NOTE: If 'Image' is NULL, this function returns TRUE.

   RESULT
 	DoesContain - Boolean result of the test.

   EXAMPLE


   NOTES


   BUGS
	Only applies to the first image, does not follow NextImage
	linked list.  This might be preferred.

   SEE ALSO


            </literallayout>
        </section>
        <section id="n395">
            <title>intuition.library/PrintIText</title>
            <literallayout class="monospaced">
                    NAME
	PrintIText -- Print text described by the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 argument.

    SYNOPSIS
	PrintIText( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , IText, LeftOffset, TopOffset )
		    A0        A1     D0          D1

	VOID PrintIText( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 *, WORD, WORD );

    FUNCTION
	Prints the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 into the specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .  Sets up the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	as specified by the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 values, then prints the text into the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 at the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 x/y coordinates offset by the left/top
	arguments.  Note, though, that the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 structure itself
	may contain further text position coordinates: those coordinates
	and the Left/TopOffsets are added to obtain the true position of
	the text to be rendered.

	This routine does window layer clipping as appropriate -- if you
	print text outside of your window, your characters will be
	clipped at the window's edge, providing you pass your window's
	(layered) 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

	If the NextText field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 argument is non-NULL,
	the next 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 is rendered as well, and so on until some
	NextText field is NULL.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 with the ITextFont field NULL are displayed in the
	font of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .  If the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 font is also NULL, the
	system default font, as set via the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 tool, will be used.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 = the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 destination of the text
	IText = pointer to an instance of the structure 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                	LeftOffset = left offset of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 into the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	TopOffset = top offset of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiText</ulink>
                 into the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                    RESULT
	None

    BUGS

    SEE ALSO

            </literallayout>
        </section>
        <section id="n396">
            <title>intuition.library/PubScreenStatus</title>
            <literallayout class="monospaced">
                    NAME
	PubScreenStatus -- Change status flags for a public screen. (V36)

    SYNOPSIS
	ResultFlags = PubScreenStatus( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , StatusFlags )
	D0		   	       A0      D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 PubScreenStatus( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	Changes status flags for a given public screen.  The only
	flag bit currently defined is PSNF_PRIVATE.  Thus,
	PubScreenStatus( screen, PSNF_PRIVATE ) makes a screen
	private, while PubScreenStatus( screen, 0 ) makes it public.

	Do not apply this function to a screen if your program
	isn't the screen's "owner", in particular, don't call
	this function for the Workbench screen.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to public screen
	StatusFlags = Any of the PSNF_ flags (only PSNF_PRIVATE is
	    currently defined).

    RESULT
	Returns 0 in the lowest order bit of the return value
	if the screen wasn't public, or because it can not be taken
	private because visitors are open in it.

	All other bits in the return code are reserved for future
	enhancement.

    BUGS

    SEE ALSO
	
                <link linkend="n389">OpenScreen()</link>
                , Intuition V36 update documentation
            </literallayout>
        </section>
        <section id="n397">
            <title>intuition.library/QueryOverscan</title>
            <literallayout class="monospaced">
                    NAME
	QueryOverscan -- Inquire about a standard overscan region. (V36)

    SYNOPSIS
	success = QueryOverscan( DisplayID, Rect, OScanType )
	D0                       A0         A1    D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 QueryOverscan( ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 *, WORD );

    FUNCTION
	This function fills in a rectangle with one of the system
	overscan dimensions, scaled appropriately for the mode of
	the DisplayID it is passed.

	There are three types of system overscan values:
	OSCAN_TEXT: completely visible, by user preference.  Used
	  for Workbench screen and screen dimensions STDSCREENWIDTH
	  and STDSCREENHEIGHT.  Left/Top is always 0,0.
	OSCAN_STANDARD: just beyond visible bounds of monitor, by
	  user preference.  Left/Top may be negative.
	OSCAN_MAX: The largest region we can display, AND display
	  any smaller region (see note below).
	OSCAN_VIDEO: The absolute largest region that the graphics.library
	  can display.  This region must be used as-is.


    INPUTS
	DisplayID -- A 32-bit identifier for a display mode, as defined
	  in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/modeid.h">&lt;graphics/modeid.h&gt;</ulink>
                 include file (V39 and up) or in
	  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">&lt;graphics/displayinfo.h&gt;</ulink>
                 (V37/V38).

	  NOTE: If you only intend to use one of the four standard
	  overscan dimensions as is, and open your screen to exactly
	  the DisplayClip dimensions, you can specify one of
	  the OSCAN_ values using the SA_Overscan tag to the
	  
                <link linkend="n390">OpenScreenTagList()</link>
                 function and omit all of SA_Left, SA_Top,
	  SA_Width, and SA_Height.  This also requires that you do
	  not supply a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure, since it always contains
	  left/top/width/height information.

	  If you wish to supply a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 structure, then you are
	  supplying left/top/width/height information.  This information
	  can be taken from the rectangle resulting from this function:
		NewScreen.LeftEdge = Rect.MinX;
		NewScreen.TopEdge = Rect.MinY;
		NewScreen.Width = STDSCREENWIDTH;
			/* or ( Rect.MaxX - Rect.MinX + 1 ) */
		NewScreen.Height = STDSCREENHEIGHT;
			/* or ( Rect.MaxY - Rect.Miny + 1 ) */

	Rect -- pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 structure which this function
	  will fill out with its return values.  Note that to convert
	  a rectangle to a screen "Height" you do (MaxY - MinY + 1), and
	  similarly for "Width."  The rectangle may be passed directly
	  to 
                <link linkend="n389">OpenScreen()</link>
                 as a DisplayClip region (SA_DClip).

    RESULT
	0 (FALSE) if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">NewScreen</ulink>
                 requests
	does not exist.  Non-zero (TRUE) if it does.

    BUGS
	Change in parameter V36.A17 might cause problems for some.

    SEE ALSO
	
                <link linkend="n389">OpenScreen()</link>
                , Intuition V36 update documentation
            </literallayout>
        </section>
        <section id="n398">
            <title>intuition.library/RefreshGadgets</title>
            <literallayout class="monospaced">
                    NAME
	RefreshGadgets -- Refresh (redraw) the gadget display.

    SYNOPSIS
	RefreshGadgets( Gadgets, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 )
		        A0       A1      A2

	VOID RefreshGadgets( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 * );

    FUNCTION
	Refreshes (redraws) all of the gadgets in the gadget list starting
	from the specified gadget.

	The window parameter must point to the window which contains the
	gadget, or which contains the requester that contains the gadget
	The requester parameter must only be valid if the gadget has the
	GTYP_REQGADGET flag set, a requirement for all requester gadgets.

	The Pointer argument points to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure.

	The two main reasons why you might want to use this routine are:
	first, that you've modified the imagery of the gadgets in your
	display and you want the new imagery to be displayed; secondly,
	if you think that some graphic operation you just performed
	trashed the gadgetry of your display, this routine will refresh
	the imagery for you.

	Note that to modify the imagery of a gadget, you must first remove
	that gadget from the window's gadget list, using 
                <link linkend="n404">RemoveGadget()</link>
                 (or
	RemoveGList()).  After changing the image, border, text (including
	text for a string gadget), the gadget is replaced in the gadget list
	(using 
                <link linkend="n324">AddGadget()</link>
                 or 
                <link linkend="n325">AddGList()</link>
                ).  Adding gadgets does not cause
	them to be displayed (refreshed), so this function, or 
                <link linkend="n399">RefreshGList()</link>
                	is typically called.

	A common technique is to set or reset the GFLG_SELECTED flag of a
	Boolean gadget and then call RefreshGadgets() to see it displayed
	highlighted if and only if GFLG_SELECTED is set.  If you wish to do
	this and be completely proper, you must 
                <link linkend="n404">RemoveGadget()</link>
                , change the
	GFLG_SELECTED flag, 
                <link linkend="n324">AddGadget()</link>
                , and RefreshGadgets(), or the
	equivalent.

	The gadgets argument can be a copy of the FirstGadget variable in
	the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure that you want refreshed:
	the effect of this will be that all gadgets will be redrawn.
	However, you can selectively refresh just some of the gadgets
	by starting the refresh part-way into the list:  for instance,
	redrawing your window non-GTYP_GZZGADGET gadgets only, which you've
	conveniently grouped at the end of your gadget list.

	Even more control is available using the 
                <link linkend="n399">RefreshGList()</link>
                 routine which
	enables you to refresh a single gadget, or number of your choice.

	NOTE:  It's never safe to tinker with the gadget list yourself.  Don't
	supply some gadget list that Intuition hasn't already processed in
	the usual way.

    INPUTS
	Gadgets = pointer to the first in the list of gadgets wanting
	    refreshment
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window containing the gadget or its requester
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to a requester (ignored if gadget is not attached
	    to a requester).

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n399">RefreshGList()</link>
                , 
                <link linkend="n404">RemoveGadget()</link>
                , 
                <link linkend="n405">RemoveGList()</link>
                , 
                <link linkend="n324">AddGadget()</link>
                , 
                <link linkend="n325">AddGList()</link>
            </literallayout>
        </section>
        <section id="n399">
            <title>intuition.library/RefreshGList</title>
            <literallayout class="monospaced">
                    NAME
	RefreshGList -- Refresh (redraw) a chosen number of gadgets.

    SYNOPSIS
	RefreshGList( Gadgets, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                , NumGad )
		      A0       A1      A2         D0

	VOID RefreshGList( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, WORD );

    FUNCTION
	Refreshes (redraws) gadgets in the gadget list starting
	from the specified gadget.  At most NumGad gadgets are redrawn.
	If NumGad is -1, all gadgets until a terminating NULL value
	in the NextGadget field is found will be refreshed, making this
	routine a superset of 
                <link linkend="n398">RefreshGadgets()</link>
                .

	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 parameter can point to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 structure.  If
	the first gadget in the list has the GTYP_REQGADGET flag set, the
	gadget list refers to gadgets in a requester and the pointer
	must necessarily point to a window.  If these are not the gadgets
	of a requester, the requester argument may be NULL.

	Be sure to see the 
                <link linkend="n398">RefreshGadgets()</link>
                 function description, as this
	function is simply an extension of that.

    INPUTS
	Gadgets = pointer to the first in the list of gadgets wanting
	    refreshment
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window containing the gadget or its requester
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to a requester (ignored if 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 is not attached
	    to a Requester).
	NumGad  = maximum number of gadgets to be refreshed.  A value of -1
	  will cause all gadgets to be refreshed from gadget to the
	  end of the list.  A value of -2 will also do this, but if 'Gadgets'
	  points to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 (GTYP_REQGADGET) ALL gadgets in the
	  requester will be refreshed (this is a mode compatible with v1.1
	  RefreshGadgets().)

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n398">RefreshGadgets()</link>
            </literallayout>
        </section>
        <section id="n400">
            <title>intuition.library/RefreshWindowFrame</title>
            <literallayout class="monospaced">
                    NAME
	RefreshWindowFrame -- Ask Intuition to redraw your window border.

    SYNOPSIS
	RefreshWindowFrame( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
			    A0

	VOID RefreshWindowFrame( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Refreshes the border of a window, including title region and all
	of the window's gadgets.

	You may use this call if you wish to update the display of your borders.
	The expected use of this is to correct unavoidable corruption.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure

    RESULT
	None

    BUGS

    SEE ALSO

            </literallayout>
        </section>
        <section id="n401">
            <title>intuition.library/ReleaseGIRPort</title>
            <literallayout class="monospaced">
                    NAME
	ReleaseGIRPort -- Release a custom gadget 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                . (V36)

    SYNOPSIS
	ReleaseGIRPort( RPort )
			A0

	VOID ReleaseGIRPort( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 * );

    FUNCTION
	The corresponding function to 
                <link linkend="n384">ObtainGIRPort()</link>
                , it releases
	arbitration used by Intuition for gadget RastPorts.

    INPUTS
	Pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 returned by 
                <link linkend="n384">ObtainGIRPort()</link>
                .
	This pointer can be NULL, in which case nothing happens.

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n384">ObtainGIRPort()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/custom.h">Custom</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 documentation
            </literallayout>
        </section>
        <section id="n402">
            <title>intuition.library/RemakeDisplay</title>
            <literallayout class="monospaced">
                    NAME
	RemakeDisplay -- Remake the entire Intuition display.

    SYNOPSIS
	failure = RemakeDisplay()
	D0 (V39)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 RemakeDisplay( VOID );
	/* Returns 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 in V39 and greater */

    FUNCTION
	This is the big one.

	This procedure remakes the entire 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure for the
	Intuition display.  It does the equivalent of 
                <link linkend="n374">MakeScreen()</link>
                 for
	every screen in the system, and then it calls the internal
	equivalent of 
                <link linkend="n409">RethinkDisplay()</link>
                .

	WARNING:  This routine can take many milliseconds to run, so
	do not use it lightly.

	Calling 
                <link linkend="n374">MakeScreen()</link>
                 followed by 
                <link linkend="n409">RethinkDisplay()</link>
                 is typically
	a more efficient method for affecting changes to a single
	screen's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .

    INPUTS
	None

    RESULT
	Starting with V39, returns zero for success, non-zero for failure.
	Probable cause of failure is failure of 
                <link linkend="n679">graphics.library/MakeVPort()</link>
                	or of 
                <link linkend="n683">graphics.library/MrgCop()</link>
                .
	Prior to V39, the return code is invalid.  Do not interpret it when
	running on pre-V39 systems!

    BUGS

    SEE ALSO
	
                <link linkend="n374">MakeScreen()</link>
                , 
                <link linkend="n409">RethinkDisplay()</link>
                , 
                <link linkend="n679">graphics.library/MakeVPort()</link>
                	
                <link linkend="n683">graphics.library/MrgCop()</link>
                , 
                <link linkend="n677">graphics.library/LoadView()</link>
            </literallayout>
        </section>
        <section id="n403">
            <title>intuition.library/RemoveClass</title>
            <literallayout class="monospaced">
                    NAME
	RemoveClass -- Make a public boopsi class unavailable. (V36)

    SYNOPSIS
	RemoveClass( classPtr )
		     A0

	VOID RemoveClass( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 * );

    FUNCTION
	Makes a public class unavailable for public consumption.
	It's OK to call this function for a class which is not
	yet in the internal public class list, or has been
	already removed.

    INPUTS
	ClassPtr = pointer to *public* class created by 
                <link linkend="n373">MakeClass()</link>
                ,
		may be NULL.

    RESULT
	None.

    NOTES

    BUGS

    SEE ALSO
	
                <link linkend="n373">MakeClass()</link>
                , 
                <link linkend="n353">FreeClass()</link>
                , 
                <link linkend="n323">AddClass()</link>
                	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.

            </literallayout>
        </section>
        <section id="n404">
            <title>intuition.library/RemoveGadget</title>
            <literallayout class="monospaced">
                    NAME
	RemoveGadget -- 
                <link linkend="n276">Remove</link>
                 a gadget from a window.

    SYNOPSIS
	Position = RemoveGadget( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 )
	D0			 A0      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 RemoveGadget( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 * );

    FUNCTION
	Removes the given gadget from the gadget list of the specified
	window.  Returns the ordinal position of the removed gadget.

	If the gadget is in a requester attached the the window, this
	routine will look for it and remove it if it is found.

	If the gadget pointer points to a gadget that isn't in the
	appropriate list, -1 is returned.  If there aren't any gadgets in the
	list, -1 is returned.  If you remove the 65535th gadget from the list
	-1 is returned.

    NOTES
	New with V37: If one of the gadgets you wish to remove
	is the active gadget, this routine will wait for the user
	to release the mouse button before deactivating and removing
	the gadget.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window containing the gadget or the requester
	    containing the gadget to be removed.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = pointer to the gadget to be removed.  The gadget itself
	    describes whether this is a gadget that should be removed from the
	    window or some requester.

    RESULT
	Returns the ordinal position of the removed gadget.  If the gadget
	wasn't found in the appropriate list, or if there are no gadgets in
	the list, returns -1.

    BUGS

    SEE ALSO
	
                <link linkend="n324">AddGadget()</link>
                , 
                <link linkend="n325">AddGList()</link>
                , 
                <link linkend="n405">RemoveGList()</link>
            </literallayout>
        </section>
        <section id="n405">
            <title>intuition.library/RemoveGList</title>
            <literallayout class="monospaced">
                    NAME
	RemoveGList -- 
                <link linkend="n276">Remove</link>
                 a sublist of gadgets from a window.

    SYNOPSIS
	Position = RemoveGList( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , Numgad )
	D0			A0	A1	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 RemoveGList( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, WORD );

    FUNCTION
	Removes 'Numgad' gadgets from the gadget list of the specified
	window.  Will remove gadgets from a requester if the first
	gadget's GadgetType flag GTYP_REQGADGET is set.

	Otherwise identical to 
                <link linkend="n404">RemoveGadget()</link>
                .

    NOTE
	The last gadget in the list does NOT have its link zeroed.
	New with V36: OK, last gadget's NextGadget field is set to NULL.

	New with V37: If one of the gadgets you wish to remove
	is the active gadget, this routine will wait for the user
	to release the mouse button before deactivating and removing
	the gadget.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window containing the gadget or the requester
	    containing the gadget to be removed.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = pointer to the gadget to be removed.  The gadget itself
           describes whether this is a gadget that should be removed
           from the window or some requester.
	Numgad = number of gadgets to be removed.  If -1, remove all gadgets
	    to end of window gadget list

    RESULT
	Returns the ordinal position of the removed gadget.  If the gadget
	wasn't found in the appropriate list, or if there are no gadgets in
	the list, returns -1.

    BUGS

    SEE ALSO
	
                <link linkend="n404">RemoveGadget()</link>
                , 
                <link linkend="n324">AddGadget()</link>
                , 
                <link linkend="n325">AddGList()</link>
            </literallayout>
        </section>
        <section id="n406">
            <title>intuition.library/ReportMouse</title>
            <literallayout class="monospaced">
                    NAME
	ReportMouse -- Tell Intuition whether to report mouse movement.

    SYNOPSIS
	ReportMouse( Boolean, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		     D0       A0	&lt;-note

	VOID ReportMouse( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    SPECIAL NOTE
	Some compilers and link files switch the arguments to this function
	about in unpredictable ways.  We apologize for this confusion
	wrapped around an error enclosing a mistake.
	The call will take one of two forms:

		ReportMouse(Boolean, Window);
			-or-
		ReportMouse(Window, (ULONG)Boolean);

	The first form is the one that corresponds to the amiga.lib supplied
	by Commodore.  The linker libraries and "pragmas" of some compilers
	supply the alternate form.

	A key point to remember is that the form of the function in ROM
	has always been the same, so there has always been object code
	compatibility.  However some care should be taken when switching
	compilers or switching between stubs and pragmas.

	From assembler the interface has always been:
		Boolean in D0, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 in A0

	Also, it is still endorsed to simply set the WFLG_REPORTMOUSE flag bit
	in Window-&gt;Flags, or reset it, on your own.  Make the operation
	an atomic assembly instruction (OR.W #WFLG_REPORTMOUSE,wd_Flags+2(A0)
	where A0 contains your window pointer).  Most compilers will produce
	an atomic operation when faced with:
			Window-&gt;Flags |= WFLG_REPORTMOUSE;
			Window-&gt;Flags &amp;=~WFLG_REPORTMOUSE;
	or else bracket the operation between 
                <link linkend="n265">Forbid()/Permit()</link>
                .

    FUNCTION
	Tells Intuition whether or not to broadcast mouse-movement events to
	your window when it's the active one.  The Boolean value specifies
	whether to start or stop broadcasting position information of
	mouse-movement.  If the window is the active one, mouse-movement reports
	start coming immediately afterwards.  This same routine will change
	the current state of the GACT_FOLLOWMOUSE function of a
	currently-selected gadget too.

	Note that calling ReportMouse() when a gadget is selected will only
	temporarily change whether or not mouse	movements are reported while
	that gadget remains selected; the next time the gadget is selected, its
	GACT_FOLLOWMOUSE flag is examined anew.

	Note also that calling ReportMouse() when no gadget is currently
	selected will change the state of the window's WFLG_REPORTMOUSE flag,
	but will have no effect on any gadget that may be subsequently
	selected. (This is all fixed in V36.)

	The ReportMouse() function is first performed when 
                <link linkend="n391">OpenWindow()</link>
                	is first called; if the flag WFLG_REPORTMOUSE is included among
	the options, then all mouse-movement events are reported
	to the opening task and will continue to be reported
	until ReportMouse() is called with a Boolean value of FALSE.
	If WFLG_REPORTMOUSE is not set, then no mouse-movement reports will
	be broadcast until ReportMouse() is called with a Boolean of TRUE.

	Note that the WFLG_REPORTMOUSE flag, as managed by this routine,
	determines IF mouse messages are to be broadcast.  Determining HOW
	they are to be broadcast is determined by the IDCMP_MOUSEMOVE
	IDCMPFlag.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure associated with this request
	Boolean = TRUE or FALSE value specifying whether to turn this
             function on or off

    RESULT
	None

    BUGS
	See above

    SEE ALSO
	The 
                <link linkend="n103">Input</link>
                 and 
                <link linkend="n128">Output</link>
                 section of the Intuition Reference Manual
            </literallayout>
        </section>
        <section id="n407">
            <title>intuition.library/Request</title>
            <literallayout class="monospaced">
                    NAME
	Request -- Activate a requester.

    SYNOPSIS
	Success = Request( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
	D0		   A0         A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Request( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Links in and displays a requester into the specified window.

	This routine ignores the window's IDCMP_REQVERIFY flag.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = pointer to the requester to be displayed
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window into which this requester goes

	New for V36: the POINTREL flag now has meaning if the requester
	is not a DMR (Double-Menu Requester):
	If POINTREL is set this requester should be placed in the center
	of the window, offset by Requester.RelLeft and Requester.RelTop.
	If the requester doesn't fit in the window, its position will be
	adjusted to show the upper-left corner.

    RESULT
	If the requester is successfully opened, TRUE is returned.  Otherwise,
	if the requester could not be opened, FALSE is returned.

    BUGS
	It turns out that the return code of this function is not
	always correct under V34 and prior.  If your requester does
	not have an ENDGADGET, then you can examine window-&gt;FirstRequest
	to see if your requester successfully opened.  (A requester with
	an ENDGADGET can go away all by itself before you get the chance
	to look).  Under V36 and higher, the return code from this routine
	is fine.

	There is a maximum of 8 requesters that are supported in
	a window that can be changed in size, position, or depth.

    SEE ALSO
	The Requesters section of the Intuition Reference Manual
            </literallayout>
        </section>
        <section id="n408">
            <title>intuition.library/ResetMenuStrip</title>
            <literallayout class="monospaced">
                    NAME
	ResetMenuStrip -- Re-attach a menu strip to a window. (V36)

    SYNOPSIS
	Success = ResetMenuStrip( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 )
	D0		          A0      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ResetMenuStrip( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 * );

    FUNCTION
	This function is simply a "fast" version of 
                <link linkend="n420">SetMenuStrip()</link>
                 that
	doesn't perform the precalculations of menu page sizes that
	
                <link linkend="n420">SetMenuStrip()</link>
                 does.

	You may call this function ONLY IF the menu strip and all items
	and sub-items have not changed since the menu strip was passed to
	
                <link linkend="n420">SetMenuStrip()</link>
                , with the following exceptions:

	- You may change the CHECKED flag to turn a checkmark on or off.
	- You may change the ITEMENABLED flag to enable/disable some
	  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">MenuItem</ulink>
                 or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 structures.

	In all other ways, this function performs like 
                <link linkend="n420">SetMenuStrip()</link>
                .

	The new sequence of events you can use is:
	- 
                <link linkend="n391">OpenWindow()</link>
                	- 
                <link linkend="n420">SetMenuStrip()</link>
                	zero or more iterations of:
	    - 
                <link linkend="n335">ClearMenuStrip()</link>
                	    - change CHECKED or ITEMENABLED flags
	    - ResetMenuStrip()
	- 
                <link linkend="n335">ClearMenuStrip()</link>
                	- 
                <link linkend="n338">CloseWindow()</link>
                    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 = pointer to the first menu in the menu strip

    RESULT
	TRUE always.

    BUGS

    SEE ALSO
	
                <link linkend="n420">SetMenuStrip()</link>
                , 
                <link linkend="n335">ClearMenuStrip()</link>
            </literallayout>
        </section>
        <section id="n409">
            <title>intuition.library/RethinkDisplay</title>
            <literallayout class="monospaced">
                    NAME
	RethinkDisplay -- Grand manipulation of the entire Intuition display.

    SYNOPSIS
	failure = RethinkDisplay()
	D0 (V39)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 RethinkDisplay( VOID );
	/* Returns 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 in V39 and greater */

    FUNCTION
	This function performs the Intuition global display reconstruction.
	This includes rethinking about all of the  ViewPorts and their
	relationship to one another and reconstructing the entire display
	based on the results of this rethinking.

	Specifically, and omitting many internal details, the operation
	consists of this:

	    Determine which ViewPorts are invisible and set their VP_HIDE
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 Mode flag. VP_HIDE flags are also set for screens that
	    may not be simultaneously displayed with the frontmost (V36).

	    If a change to a viewport height, or changing interlace or
	    monitor scan rates require, 
                <link linkend="n679">MakeVPort()</link>
                 is called for specific
	    screen viewports.  After this phase, the intermediate Copper lists
	    for each screen's viewport are correctly set up.

	    
                <link linkend="n683">MrgCop()</link>
                 and 
                <link linkend="n677">LoadView()</link>
                 are then called to get these Copper lists
	    in action, thus establishing the new state of the Intuition
	    display.

	You may perform a 
                <link linkend="n374">MakeScreen()</link>
                 on your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/custom.h">Custom</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 before calling
	this routine.  The results will be incorporated in the new display, but
	changing the INTERLACE 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 mode for one screens must be reflected
	in the Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                , which is left to Intuition.

	WARNING:  This routine can take several milliseconds to run, so
	do not use it lightly.

	New for V36: This routine is substantially changed to support
	new screen modes.  In particular, if screen rearrangement has
	caused a change in interlace mode or scan rate, this routine
	will remake the copper lists for each screen's viewport.

    INPUTS
	None

    RESULT
	Starting with V39, returns zero for success, non-zero for failure.
	Probable cause of failure is failure of 
                <link linkend="n679">graphics.library/MakeVPort()</link>
                	or of 
                <link linkend="n683">graphics.library/MrgCop()</link>
                .
	Prior to V39, the return code is invalid.  Do not interpret it when
	running on pre-V39 systems!

    BUGS
	In V35 and earlier, an interlaced screen coming to the front
	may not trigger a complete remake as required when the global
	interlace state is changed.  In some cases, this can be compensated
	for by setting the viewport DHeight field to 0 for hidden screens.

    SEE ALSO
	
                <link linkend="n402">RemakeDisplay()</link>
                , 
                <link linkend="n679">graphics.library/MakeVPort()</link>
                , 
                <link linkend="n683">graphics.library/MrgCop()</link>
                ,
	
                <link linkend="n677">graphics.library/LoadView()</link>
                , 
                <link linkend="n374">MakeScreen()</link>
            </literallayout>
        </section>
        <section id="n410">
            <title>intuition.library/ScreenDepth</title>
            <literallayout class="monospaced">
                    NAME
	ScreenDepth -- Depth arrange a screen with extra control. (V39)

    SYNOPSIS
	ScreenDepth( screen, flags, reserved )
	             A0      D0     A1

	VOID ScreenDepth( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 );

    FUNCTION
	Brings the specified screen to the front or back, based on
	the supplied flags.  Also allows control of screen
	depth-arranging within screen families.

    INPUTS
	screen = a pointer to the screen to move
	flags = one of SDEPTH_TOFRONT or SDEPTH_TOBACK (bringing the
	    screen to front or back respectively).  If the screen
	    is an attached screen, then you may also specify
	    SDEPTH_INFAMILY to move the screen within the screen
	    family.  If the screen is an attached screen and
	    SDEPTH_INFAMILY is not specified, then the whole family
	    will move, which is also the behavior of the 
                <link linkend="n413">ScreenToFront()</link>
                	    and 
                <link linkend="n412">ScreenToBack()</link>
                 functions, as well as the user-interface
	    controls.
	reserved = must be NULL for now.

    RESULT
	None

    NOTES
	ONLY the application which owns the screen should use
	SDEPTH_INFAMILY.  It is incorrect style (and against the
	intentions of the screen opener) for programs such as
	commodities or mouse-helpers to move child screens around
	in their family.  (Note that this is a style-behavior
	requirement;  there is no technical requirement that the
	task calling this function need be the task which opened
	the screen).

    BUGS

    SEE ALSO
	
                <link linkend="n413">ScreenToFront()</link>
                , 
                <link linkend="n412">ScreenToBack()</link>
                ,
	SA_Parent, SA_FrontChild, SA_BackChild

            </literallayout>
        </section>
        <section id="n411">
            <title>intuition.library/ScreenPosition</title>
            <literallayout class="monospaced">
                    NAME
	ScreenPosition -- 
                <link linkend="n681">Move</link>
                 screens with greater control. (V39)

    SYNOPSIS
	ScreenPosition( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , flags, x1, y1, x2, y2 )
	                A0      D0     D1  D2  D3  D4

	VOID ScreenPosition( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 );

    FUNCTION
	Moves the screen to the specified position or by the specified
	increment, in screen pixel resolution coordinates.

	If the x1 and y1 variables you specify would move the screen in
	a way that violates any restrictions, the screen will be moved
	as far as possible.  You may examine the LeftEdge and TopEdge
	fields of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 structure after this function returns to
	see where the screen really ended up.

	Note that negative values for screen LeftEdge and TopEdge are
	valid for screens bigger than their display clip.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 structure
	flags = Set to one of SPOS_RELATIVE, SPOS_ABSOLUTE, or
		SPOS_MAKEVISIBLE.   You may additionally set SPOS_FORCEDRAG
		if you need.  Use SPOS_RELATIVE (zero) for normal use
		(move screen a relative amount expressed by x1,y1).  Set
		the SPOS_ABSOLUTE flag if you wish x1 and y1 to be absolute
		coordinates to move the screen to.  Set SPOS_MAKEVISIBLE to
		position an oversized scrolling screen so that the rectangle
		described by (x1,y1)-(x2,y2) is on the visible part of
		the display. (A word-processor may wish to support
		autoscrolling as the user types.  In that case, it could
		call ScreenPosition() with the SPOS_MAKEVISIBLE flag and
		a rectangle that encompasses the cursor with some space
		around it.

		In addition to any one of the above choices, you can
		additionally set SPOS_FORCEDRAG if you wish to reposition
		a screen that was opened with the {SA_Draggable,FALSE}
		attribute.

	x1,y1 = Absolute position or change in position you wish to apply
		to the screen, when using SPOS_ABSOLUTE or SPOS_RELATIVE.
		When using SPOS_MAKEVISIBLE, these variables describe
		the upper-left corner of the rectangle you would like to
		ensure is on the visible part of a scrolling screen.
	x2,y2 = Ignored when using SPOS_ABSOLUTE or SPOS_RELATIVE.
		When using SPOS_MAKEVISIBLE, these variables describe
		the lower-right corner of the rectangle you would like to
		ensure is on the visible part of a scrolling screen.

		Note that these coordinates are in the same resolution
		as the screen (such as HIRES or INTERLACE)

    RESULT
	None

    NOTES
	ONLY the owner of the screen should use SPOS_FORCEDRAG.
	It is incorrect style (and against the intentions of the
	screen opener) for programs such as commodities or
	mouse-helpers to move non-draggable screens.


    BUGS

    SEE ALSO
	
                <link linkend="n377">MoveScreen()</link>
                , 
                <link linkend="n409">RethinkDisplay()</link>
            </literallayout>
        </section>
        <section id="n412">
            <title>intuition.library/ScreenToBack</title>
            <literallayout class="monospaced">
                    NAME
	ScreenToBack -- Send the specified screen to the back of the display.

    SYNOPSIS
	ScreenToBack( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 )
		      A0

	VOID ScreenToBack( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 * );

    FUNCTION
	Sends the specified screen to the back of the display.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 structure

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n410">ScreenDepth()</link>
                , 
                <link linkend="n413">ScreenToFront()</link>
            </literallayout>
        </section>
        <section id="n413">
            <title>intuition.library/ScreenToFront</title>
            <literallayout class="monospaced">
                    NAME
	ScreenToFront -- Make the specified screen the frontmost.

    SYNOPSIS
	ScreenToFront( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 )
		       A0

	VOID ScreenToFront( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 * );

    FUNCTION
	Brings the specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 to the front of the display.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 structure

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n410">ScreenDepth()</link>
                , 
                <link linkend="n412">ScreenToBack()</link>
            </literallayout>
        </section>
        <section id="n414">
            <title>intuition.library/ScrollWindowRaster</title>
            <literallayout class="monospaced">
                   NAME
        ScrollWindowRaster -- Intuition-friendly 
                <link linkend="n707">ScrollRasterBF()</link>
                 (V39)

   SYNOPSIS
        ScrollWindowRaster(win, dx, dy, xmin, ymin, xmax, ymax)
                           A1   D0  D1  D2    D3    D4    D5

        void ScrollWindowRaster(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, WORD, WORD,
            WORD, WORD, WORD, WORD);

   FUNCTION
        Calls 
                <link linkend="n707">graphics.library/ScrollRasterBF()</link>
                , which moves
        the bits in the raster by (dx,dy) towards (0,0)
        The space vacated is filled by calling 
                <link linkend="n632">EraseRect()</link>
                .
        NOTE: that vacated space is _not_ considered damage!
        The scroll operation is limited to the rectangle defined
        by (xmin,ymin)-(xmax,ymax). Bits outside will not be
        affected. If (xmax,ymax) is outside the rastport then use
        the lower right corner of the rastport.

        If a window is partly obscured, then it is possible for
        ScrollWindowRaster() to scroll some of the obscured
        area into view.  If the window is simple-refresh, then
        the formerly obscured area is damage, and the application
        needs to repair it.  If Intuition detects damage as a result
        of ScrollWindowRaster(), it will send an IDCMP_REFRESHWINDOW
        event to the application's window.  This handling of damage
        is the principal reason ScrollWindowRaster() is preferred
        to 
                <link linkend="n706">ScrollRaster()</link>
                 and 
                <link linkend="n707">ScrollRasterBF()</link>
                .

   INPUTS
        win - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure
        dx,dy are integers that may be postive, zero, or negative
        xmin,ymin - upper left of bounding rectangle
        xmax,ymax - lower right of bounding rectangle

   NOTES
        This call uses 
                <link linkend="n707">ScrollRasterBF()</link>
                , which calls 
                <link linkend="n632">EraseRect()</link>
                        when clearing the newly exposed area. This allows use of
        a custom layer backfill hook.

        IMPORTANT:  boopsi gadgets should use 
                <link linkend="n706">ScrollRaster()</link>
                 or
        
                <link linkend="n707">ScrollRasterBF()</link>
                 directly!  Never call ScrollWindowRaster()
        from inside a boopsi gadget's method handler.  Note that
        Intuition will detect and handle damage caused by such use
        of 
                <link linkend="n706">ScrollRaster()</link>
                 or 
                <link linkend="n707">ScrollRasterBF()</link>
                , for gadgets with
        the GMORE_SCROLLRASTER property.

        VERY IMPORTANT:  if you have any gadgets in your simple-refresh
        window with the GMORE_SCROLLRASTER property, you must use
        ScrollWindowRaster() instead of 
                <link linkend="n706">ScrollRaster()</link>
                 or 
                <link linkend="n707">ScrollRasterBF()</link>
                .
        Handling of gadget scroll damage is incompatible with continued
        use of these graphics functions in an Intuition window.
        NB:  If you're using a gadget class whose source code you do
        not control, that class might be using GMORE_SCROLLRASTER or
        might start to in a future version.  For that reason, you
        should use ScrollWindowRaster() if you are using any such gadgets.

   BUGS
        In intuition.library V39 and V40 ScrollWindowRaster() must
        be considered unsafe in connection with gadget event handling
        and windows which do not have the WA_NoCareRefresh attribute set.
        A race condition may occur which will cause write accesses
        to unallocated memory and keep the IDCMP_REFRESHWINDOW message
        from getting delivered.

        The recommended workaround for this problem is to use
        ScrollWindowRaster() only in SMART_REFRESH windows which have
        the WA_NoCareRefresh attribute set. Of course, which such
        windows there will be no difference in functionality between
        ScrollWindowRaster() and 
                <link linkend="n707">ScrollRasterBF()</link>
                .

   SEE ALSO
        
                <link linkend="n706">graphics.library/ScrollRaster()</link>
                , 
                <link linkend="n707">graphics.library/ScrollRasterBF()</link>
                        
                <link linkend="n632">graphics.library/EraseRect()</link>
                , WA_BackFill

            </literallayout>
        </section>
        <section id="n415">
            <title>intuition.library/SetAttrsA</title>
            <literallayout class="monospaced">
                    NAME
	SetAttrsA -- Specify attribute values for an object. (V36)
	SetAttrs -- Varargs stub for SetAttrsA(). (V36)

    SYNOPSIS
	result = SetAttrsA( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                , TagList )
	D0                  A0      A1

	ULONG SetAttrsA( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	result = SetAttrs( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                , Tag1, ... )

	ULONG SetAttrs( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , ULONG, ... );

    FUNCTION
	Specifies a set of attribute/value pairs with meaning as
	defined by a 'boopsi' object's class.

	This function does not provide enough context information or
	arbitration for boopsi gadgets which are attached to windows
	or requesters.  For those objects, use SetGadgetAttrs().

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 = abstract pointer to a boopsi object.
	TagList = array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 structures with attribute/value pairs.

    RESULT
	The object does whatever it wants with the attributes you provide.
	The return value tends to be non-zero if the changes would require
	refreshing gadget imagery, if the object is a gadget.

    NOTES
	This function invokes the OM_SET method with a NULL 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                	parameter.

    BUGS

    SEE ALSO
	
                <link linkend="n381">NewObject()</link>
                , 
                <link linkend="n343">DisposeObject()</link>
                , 
                <link linkend="n359">GetAttr()</link>
                , 
                <link linkend="n373">MakeClass()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.
            </literallayout>
        </section>
        <section id="n416">
            <title>intuition.library/SetDefaultPubScreen</title>
            <literallayout class="monospaced">
                    NAME
	SetDefaultPubScreen -- Choose a new default public screen. (V36)

    SYNOPSIS
	SetDefaultPubScreen( Name )
			     A0

	VOID SetDefaultPubScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 * );

    FUNCTION
	Establishes a new default public screen for visitor windows.

	This screen is used by windows asking for a named public screen
	that doesn't exist and the FALLBACK option is selected, and for
	windows asking for the default public screen directly.

    INPUTS
	Name = name of chosen public screen to be the new default.
	A value of NULL means that the Workbench screen is to
	be the default public screen.

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n391">OpenWindow()</link>
                , 
                <link linkend="n389">OpenScreen()</link>
                , Intuition V36 update documentation
            </literallayout>
        </section>
        <section id="n417">
            <title>intuition.library/SetDMRequest</title>
            <literallayout class="monospaced">
                    NAME
	SetDMRequest -- Set the DMRequest of a window.

    SYNOPSIS
	success = SetDMRequest( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , DMRequest )
	D0                      A0      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetDMRequest( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 * );

    FUNCTION
	Attempts to set the DMRequest into the specified window.
	The DMRequest is the special requester that you attach to
	the double-click of the menu button which the user can then
	bring up on demand.  This routine WILL NOT change the DMRequest
	if it's already set and is currently active (in use by the user).
	After having called SetDMRequest(), if you want to change the
	DMRequest, the correct way to start is by calling 
                <link linkend="n334">ClearDMRequest()</link>
                	until it returns a value of TRUE; then you can call SetDMRequest()
	with the new DMRequest.

	If the POINTREL flag is set in the DMRequest, the DMR will open as
	close to the pointer as possible.  The RelLeft/Top fields are
	for fine-tuning the position.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window from which the DMRequest is to be set
	DMRequest = a pointer to a requester

    RESULT
	If the current DMRequest was not in use, sets the DMRequest
	    pointer into the window and returns TRUE.
	If the DMRequest was currently in use, doesn't change the pointer
	    and returns FALSE

    BUGS

    SEE ALSO
	
                <link linkend="n334">ClearDMRequest()</link>
                , 
                <link linkend="n407">Request()</link>
            </literallayout>
        </section>
        <section id="n418">
            <title>intuition.library/SetEditHook</title>
            <literallayout class="monospaced">
                    NAME
	SetEditHook -- Set global processing for string gadgets. (V36)

    SYNOPSIS
	OldHook = SetEditHook( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 )
	D0                     A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *SetEditHook( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 * );

    FUNCTION
	Sets new global editing hook for string gadgets.

	WARNING: The use and integration of this function has not
	been explored, and thus should be considered a risky function.
	Do *NOT* use this in a commercial product until further notice.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 -- A pointer to a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 which determines a function
	  in your code to be called every time the user types a key.
	  This is done before control is passed to the gadget custom
	  editing hook, so affects ALL string gadgets.

    RESULT
	Returns previous global edit hook structure.  You may need this
	hook if you wish to invoke the previous edit hook's behavior
	in addition to your own.

    NOTES
	There are a few key differences between a global edit hook and the
	more famililar per-gadget StringExtend-&gt;EditHook field.  In the
	case of the latter, the hook's creator supplies a WorkBuffer.
	Intuition's idea of the result of a keystroke is stored in
	the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/sghooks.h">SGWork</ulink>
                 structure (which references the WorkBuffer).  The
	state of the gadget before Intuition's hook acted is available in
	the StringInfo-&gt;Buffer, -&gt;BufferPos, and -&gt;NumChars fields.

	In the case of a global editing hook, your hook _becomes_
	Intuition's hook, which affects all gadgets, most of which
	do not have a WorkBuffer.  This means that if you invoke
	Intuition's original hook (which you got as the result of this
	function), there isn't any easy way for you to "undo" that after
	the fact.  This means that if Intuition's behavior for certain
	keystrokes is incompatible with your hook's objectives, then
	you must avoid calling Intuition's hook for those keys.  One
	approach is to run through your hook's code first, acting on
	those keys you wish to recognize.  Then, call Intuition's
	hook for those keys you do not recognize, or for those keys
	whose default actions you wish to add to.

	Do not forget to set SGA_REDISPLAY when needed (see sghooks.h),
	and please be sure to give the SGWork-&gt;EditOp field a value
	which is as meaningful as possible.

	Currently, only SGH_KEY messages are sent to the global edit
	hook, though custom edit hooks do receive SGH_CLICK messages
	in addition.

	Finally, there is currently no arbitration between a global
	edit hook and a custom edit hook as to ownership of keystrokes.
	It would be fair to expect that a custom edit hook would be
	written to match the current Intuition edit hook.  If your
	global edit hook acts on (say) up and down arrow keystrokes,
	an undesirable result may occur if some string gadget's custom
	hook also acts on these keystrokes.  There is currently
	no easy way to resolve this issue.

    BUGS

    SEE ALSO

            </literallayout>
        </section>
        <section id="n419">
            <title>intuition.library/SetGadgetAttrsA</title>
            <literallayout class="monospaced">
                    NAME
	SetGadgetAttrsA -- Specify attribute values for a boopsi gadget. (V36)
	SetGadgetAttrs -- Varargs stub for SetGadgetAttrsA(). (V36)

    SYNOPSIS
	result = SetGadgetAttrsA( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                , TagList )
	D0		          A0      A1      A2         A3

	ULONG SetGadgetAttrsA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	result = SetGadgetAttrs( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                , Tag1, ...)

	ULONG SetGadgetAttrs( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 *, ULONG, ... );

    FUNCTION
	Same as SetAttrs(), but provides context information and
	arbitration for classes which implement custom Intuition gadgets.

	You should use this function for boopsi gadget objects which have
	already been added to a requester or a window, or for "models" which
	propagate information to gadget already added.

	Typically, the gadgets will refresh their visuals to reflect
	changes to visible attributes, such as the value of a slider,
	the text in a string-type gadget, the selected state of a button.

	You can use this as a replacement for SetAttrs(), too, if you
	specify NULL for the 'Window' and 'Requester' parameters.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Gadget</ulink>
                 = abstract pointer to a boopsi gadget
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = window gadget has been added to using 
                <link linkend="n325">AddGList()</link>
                 or 
                <link linkend="n324">AddGadget()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Requester</ulink>
                 = for REQGADGETs, requester containing the gadget
	TagList = array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 structures with attribute/value pairs.

    RESULT
	The object does whatever it wants with the attributes you provide,
	which might include updating its gadget visuals.

	The return value tends to be non-zero if the changes would require
	refreshing gadget imagery, if the object is a gadget.

    NOTES
	This function invokes the OM_SET method with a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/cghooks.h">GadgetInfo</ulink>
                	derived from the 'Window' and 'Requester' pointers.

    BUGS
	Prior to V39, this function ran with inadequate locking against
	the calls that Intuition's input task makes to the gadgets.
	To run properly prior to V39, this function, input processing,
	and and the gadget's dispatcher must be mutually re-entrant.

    SEE ALSO
	
                <link linkend="n381">NewObject()</link>
                , 
                <link linkend="n343">DisposeObject()</link>
                , 
                <link linkend="n359">GetAttr()</link>
                , 
                <link linkend="n373">MakeClass()</link>
                ,
	Document "Basic Object-Oriented Programming System for Intuition"
	and the "boopsi Class Reference" document.
            </literallayout>
        </section>
        <section id="n420">
            <title>intuition.library/SetMenuStrip</title>
            <literallayout class="monospaced">
                    NAME
	SetMenuStrip -- Attach a menu strip to a window.

    SYNOPSIS
	Success = SetMenuStrip( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 )
	D0		        A0      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 SetMenuStrip( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 * );

    FUNCTION
	Attaches the menu strip to the window.  After calling this routine,
	if the user presses the menu button, this specified menu strip
	will be displayed and accessible by the user.

	Menus with zero menu items are not allowed.

	NOTE:  You should always design your menu strip changes to be a
	two-way operation, where for every menu strip you add to your
	window you should always plan to clear that strip sometime.  Even
	in the simplest case, where you will have just one menu strip for
	the lifetime of your window, you should always clear the menu strip
	before closing the window.  If you already have a menu strip attached
	to this window, the correct procedure for changing to a new menu
	strip involves calling 
                <link linkend="n335">ClearMenuStrip()</link>
                 to clear the old first.

	The sequence of events should be:
	- 
                <link linkend="n391">OpenWindow()</link>
                	- zero or more iterations of:
      	- SetMenuStrip()
      	- 
                <link linkend="n335">ClearMenuStrip()</link>
                	- 
                <link linkend="n338">CloseWindow()</link>
                    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Menu</ulink>
                 = pointer to the first menu in the menu strip

    RESULT
	TRUE if there were no problems.  TRUE always, since this routine
	will wait until it is OK to proceed.

    BUGS

    SEE ALSO
	
                <link linkend="n335">ClearMenuStrip()</link>
                , 
                <link linkend="n408">ResetMenuStrip()</link>
            </literallayout>
        </section>
        <section id="n421">
            <title>intuition.library/SetMouseQueue</title>
            <literallayout class="monospaced">
                    NAME
	SetMouseQueue -- Change limit on pending mouse messages. (V36)

    SYNOPSIS
	oldQueueLength = SetMouseQueue( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , QueueLength )
	D0                              A0      D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SetMouseQueue( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	Changes the number of mouse messages that Intuition will allow
	to be outstanding for your window.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = your window
	QueueLength = the new value of outstanding mouse movement messages
	  you wish to allow.

    RESULT
	-1 if 'Window' is not known
	Otherwise the previous value of the queue limit.
	The corresponding function for changing the repeat key
	queue limit is not yet implemented.

    BUGS

    SEE ALSO
	
                <link linkend="n391">OpenWindow()</link>
            </literallayout>
        </section>
        <section id="n422">
            <title>intuition.library/SetPointer</title>
            <literallayout class="monospaced">
                    NAME
	SetPointer -- Specify a pointer sprite image for a window.

    SYNOPSIS
	SetPointer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , Pointer, Height, Width, XOffset, YOffset )
		    A0      A1       D0      D1     D2       D3

	VOID SetPointer( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 *, WORD, WORD, WORD, WORD );

    FUNCTION
	Sets up the window with the sprite definition for the pointer.
	Then, whenever the window is the active one, the pointer
	image will change to the window's version.  If the window is
	the active one when this routine is called, the change takes
	place immediately.

	The XOffset and YOffset parameters are used to offset the
	upper-left corner of the hardware sprite image from what Intuition
	regards as the current position of the pointer.  Another way of
	describing it is as the offset from the "hot spot" of the pointer
	to the top-left corner of the sprite.  For instance, if you specify
	offsets of zero, zero, then the top-left corner of your sprite
	image will be placed at the mouse position.  On the other hand,
	if you specify an XOffset of -7 (remember, sprites are 16 pixels
	wide) then your sprite will be centered over the mouse position.
	If you specify an XOffset of -15, the right-edge of the sprite
	will be over the mouse position.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window to receive this pointer definition
	Pointer = pointer to the data definition of a sprite
	Height = the height of the pointer
	Width = the width of the sprite (must be less than or equal to sixteen)
	XOffset = the offset for your sprite from the mouse position
	YOffset = the offset for your sprite from the mouse position

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n425">SetWindowPointerA()</link>
                , 
                <link linkend="n336">ClearPointer()</link>
                , ROM Kernel Manual: Libraries

            </literallayout>
        </section>
        <section id="n423">
            <title>intuition.library/SetPrefs</title>
            <literallayout class="monospaced">
                    NAME
	SetPrefs -- Set Intuition preferences data.

    SYNOPSIS
	Prefs = SetPrefs( PrefBuffer, Size, Inform )
	D0		  A0          D0    D1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 *SetPrefs( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 );

    FUNCTION
	Sets new preferences values.  Copies the first 'Size' bytes
	from your preferences buffer to the system preferences table,
	and puts them into effect.

	The 'Inform' parameter, if TRUE, indicates that an IDCMP_NEWPREFS
	message is to be sent to all windows that have the IDCMP_NEWPREFS
	IDCMPFlag set.

	It is legal to set a partial copy of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure.
	The most frequently changed values are grouped at the beginning
	of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure.

	New for V36:  A new and more extensible method for supplying
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 has been introduced in V36, and relies on file
	system notification.  The Intuition preferences items rely
	also on the IPrefs program.  Certain elements of the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 structure have been superseded by this new method.
	(Elements are generally superseded as new hardware or software
	features demand more information than fits in struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                .
	Parts of struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 must be ignored so that applications
	calling 
                <link linkend="n362">GetPrefs()</link>
                , modifying some other part of struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                ,
	then calling SetPrefs(), don't end up truncating the extended
	data).

	Pointer Preferences:  Starting with V36, pointer changes
	submitted through SetPrefs() are only heeded until the first
	time IPrefs informs Intuition of a V36-style pointer preferences
	file.  In V39 and higher, only the pointer from the initial
	SetPrefs() (i.e. devs:system-configuration) is heeded.

	Palette Preferences:  Starting with V39, color changes submitted
	through SetPrefs() are ignored after the first time IPrefs sends
	Intuition new style palette preferences.

	FontHeight and LaceWB:  These are only respected from
	devs:system-configuration.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 centering and size:  Changes to ViewX/YOffset and
	Row/ColumnSizeChange only apply to the default monitor
	(NTSC or PAL), and not to other monitors such as Productivity.

	Other fields may be superseded in the future.

    INPUTS
	PrefBuffer = pointer to the memory buffer which contains your
	    desired settings for Intuition preferences
	Size = the number of bytes in your PrefBuffer, the number of bytes
           you want copied to the system's internal preference settings
	Inform = whether you want the information of a new preferences
	    setting propagated to all windows.

    NOTES
	Unless you are responding to a user's explicit request to
	change 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 (for example, you are writing a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                	editor), you should probably avoid using this function.
	The user's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 should be respected, not overridden.

    RESULT
	Returns your parameter PrefBuffer.

    BUGS

    SEE ALSO
	
                <link linkend="n361">GetDefPrefs()</link>
                , 
                <link linkend="n362">GetPrefs()</link>
            </literallayout>
        </section>
        <section id="n424">
            <title>intuition.library/SetPubScreenModes</title>
            <literallayout class="monospaced">
                    NAME
	SetPubScreenModes -- Establish global public screen behavior. (V36)

    SYNOPSIS
	OldModes = SetPubScreenModes( Modes )
	D0                            D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 SetPubScreenModes( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
    	Sets GLOBAL Intuition public screen modes.	

    INPUTS
	Modes = new global modes flags.  Values for flag bits are:
	  SHANGHAI: workbench windows are to be opened on the
		default public screen
	  POPPUBSCREEN: when a visitor window is opened, the public
		screen it opens on is to be brought to the front.

    RESULT
	OldModes = previous global mode settings

    BUGS

    SEE ALSO
	
                <link linkend="n389">OpenScreen()</link>
                , Intuition V36 update documentation
            </literallayout>
        </section>
        <section id="n425">
            <title>intuition.library/SetWindowPointerA</title>
            <literallayout class="monospaced">
                    NAME
	SetWindowPointerA -- Select a pointer for your window. (V39)
	SetWindowPointer -- Varargs stub for SetWindowPointerA(). (V39)

    SYNOPSIS
	SetWindowPointerA( window, taglist )
	                   A0      A1

	VOID SetWindowPointerA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	SetWindowPointer( window, tag1, ... )

	VOID SetWindowPointer( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, ULONG tag1, ... );

    FUNCTION
	Allows you to set the pointer image associated with the
	specified window.  Whenever the window is the active one,
	the pointer image will change to the window's version.
	If the window is the active one when this routine is
	called, the change takes place immediately.

    INPUTS
	window = pointer to the window to receive this pointer definition
	taglist = pointer to a taglist describing your pointer

    TAGS
	The same three tags are also accepted by 
                <link linkend="n392">OpenWindowTagList()</link>
                ,
	which allows you to establish the initial pointer at the
	time you open your window.

	WA_Pointer (APTR) - The pointer you wish to associate with
	    your window.  If NULL, you are requesting the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                	    default pointer.  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/custom.h">Custom</ulink>
                 pointers should be allocated
	    by performing a 
                <link linkend="n381">NewObject()</link>
                 on "pointerclass".
	    (See &lt;intuition/pointerclass.h&gt;).  Defaults to NULL.

	WA_BusyPointer (BOOL) - Set to TRUE to request the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                	    busy-pointer.  If FALSE, your pointer will be as requested
	    by WA_Pointer.  Defaults to FALSE.

	WA_PointerDelay (BOOL) - Set to TRUE to defer changing your
	    pointer for a brief instant.  This is typically used
	    along with setting the busy pointer, especially when
	    the application knows it may be busy for a very short
	    while.  If the application clears the pointer or sets
	    another pointer before the delay expires, the pending
	    pointer change is cancelled.  This reduces short
	    flashes of the busy pointer.

    RESULT
	None

    EXAMPLE
	This example sets the standard busy pointer with pointer-delay,
	does a bit of work, then clears the pointer:

		/* Put up the busy pointer, with pointer-delay */
		SetWindowPointer( win,
		    WA_BusyPointer, TRUE,
		    WA_PointerDelay, TRUE,
		    TAG_DONE );

		/* Do busy stuff here */

		/* No tags means "clear the pointer" */
		SetWindowPointer( win,
		    TAG_DONE );

    BUGS

    SEE ALSO
	
                <link linkend="n422">SetPointer()</link>
                , 
                <link linkend="n336">ClearPointer()</link>
                , ROM Kernel Manual: Libraries

            </literallayout>
        </section>
        <section id="n426">
            <title>intuition.library/SetWindowTitles</title>
            <literallayout class="monospaced">
                    NAME
	SetWindowTitles -- Set the window's titles for both window and screen.

    SYNOPSIS
	SetWindowTitles( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , WindowTitle, ScreenTitle )
			 A0      A1           A2

	VOID SetWindowTitles( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 * );

    FUNCTION
	Allows you to set the text which appears in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 and/or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                	title bars.

	The window title appears at all times along the window title bar.
	The window's screen title appears at the screen title bar whenever
	this window is the active one.

	When this routine is called, your window title will be changed
	immediately.  If your window is the active one when this routine is
	called, the screen title will be changed immediately.

	You can specify a value of -1 (i.e. (UBYTE *) ~0) for either of
	the title pointers.  This designates that you want Intuition to leave
	the current setting of that particular title alone, and modify
	only the other one.  Of course, you could set both to -1.

	Furthermore, you can set a value of 0 (zero) for either of the
	title pointers.  Doing so specifies that you want no title to
	appear (the title bar will be blank).

	Both of the titles are rendered in the default font of the window's
	screen, as set using 
                <link linkend="n389">OpenScreen()</link>
                .

	In setting the window's title, Intuition may do some other rendering
	in the top border of your window.  If your own rendering sometimes
	appears in your window border areas, you may want to restore the entire
	window border frame.  The function SetWindowTitles() does not do this
	in the newer versions.  The function 
                <link linkend="n400">RefreshWindowFrame()</link>
                 is provided
	to do this kind of thing for you.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to your window structure
	WindowTitle = pointer to a null-terminated text string, or set to
           either the value of -1 (negative one) or 0 (zero)
	ScreenTitle = pointer to a null-terminated text string, or set to
           either the value of -1 (negative one) or 0 (zero)

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n391">OpenWindow()</link>
                , 
                <link linkend="n400">RefreshWindowFrame()</link>
                , 
                <link linkend="n389">OpenScreen()</link>
            </literallayout>
        </section>
        <section id="n427">
            <title>intuition.library/ShowTitle</title>
            <literallayout class="monospaced">
                    NAME
	ShowTitle -- Set the screen title bar display mode.

    SYNOPSIS
	ShowTitle( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , ShowIt )
		   A0      D0

	VOID ShowTitle( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 );

    FUNCTION
	This routine sets the SHOWTITLE flag of the specified screen, and
	then coordinates the redisplay of the screen and its windows.

	The screen title bar can appear either in front of or behind
	WFLG_BACKDROP windows.  This is contrasted with the fact that
	non-WFLG_BACKDROP windows always appear in front of the screen title
	bar.  You specify whether you want the screen title bar to be in front
	of or behind the screen's WFLG_BACKDROP windows by calling this
	routine.

	The ShowIt argument should be set to either TRUE or FALSE.  If TRUE,
       the screen's title bar will be shown in front of WFLG_BACKDROP windows
.
       If FALSE, the title bar will be rendered behind all windows.

       When a screen is first opened, the default setting of the SHOWTITLE
       flag is TRUE.

    INPUTS
       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 structure
       ShowIt = Boolean TRUE or FALSE describing whether to show or hide the
           screen title bar

    RESULT
       None

    BUGS

    SEE ALSO

            </literallayout>
        </section>
        <section id="n428">
            <title>intuition.library/SizeWindow</title>
            <literallayout class="monospaced">
                    NAME
	SizeWindow -- Ask Intuition to size a window.

    SYNOPSIS
	SizeWindow( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , DeltaX, DeltaY )
		    A0      D0      D1

	VOID SizeWindow( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, WORD, WORD );

    FUNCTION
	This routine sends a request to Intuition asking to size the window
	the specified amounts.  The delta arguments describe how much to
	size the window along the respective axes.

	Note that the window will not be sized immediately, but rather
	will be sized the next time Intuition receives an input event,
	which happens currently at a minimum rate of ten times per second,
	and a maximum of sixty times a second.  You can discover when
	you window has finally been sized by setting the IDCMP_NEWSIZE flag
	of the IDCMP of your window.  See the "Input and Output Methods"
	chapter of The Intuition Reference Manual for description of the IDCMP.

	New for V36: Intuition now will do validity checking on the final
	dimensions.  To change to new absolute dimensions, or to move and
	size a window in one step, use 
                <link linkend="n333">ChangeWindowBox()</link>
                .

	However, limit checking against window MinWidth, MinHeight,
	MaxWidth, and MaxHeight was not done prior to V36, and
	these fields are still ignored (as documented) if you have
	no sizing gadget (WFLG_SIZEGADGET is not set).  The *are*
	respected now (V36) if WFLG_SIZEGADGET is set.

	New for V36: you can determine when the change in size has
	taken effect by receiving the IDCMP_CHANGEWINDOW IDCMP message.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the structure of the window to be sized
	DeltaX = signed value describing how much to size the window
	 on the x-axis
	DeltaY = signed value describing how much to size the window
	 on the y-axis

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n333">ChangeWindowBox()</link>
                , 
                <link linkend="n378">MoveWindow()</link>
                , 
                <link linkend="n440">WindowToFront()</link>
                , 
                <link linkend="n439">WindowToBack()</link>
            </literallayout>
        </section>
        <section id="n429">
            <title>intuition.library/SysReqHandler</title>
            <literallayout class="monospaced">
                    NAME
	SysReqHandler -- Handle system requester input. (V36)

    SYNOPSIS
	num = SysReqHandler( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , IDCMPFlagsPtr, WaitInput )
	D0                   A0      A1             D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SysReqHandler( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, ULONG *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 );

    FUNCTION
	Handles input for a window returned by either 
                <link linkend="n331">BuildSysRequest()</link>
                	or BuildEasyRequest().  These functions with SysReqHandler()
	you can perform an "asynchronous" EasyRequest() or 
                <link linkend="n328">AutoRequest()</link>
                .
	That is to say, you can perform other processing while you
	wait for the requester to be satisfied.

	Each time this function is called, it will process all
	IDCMPMessages that the window has received.  If the parameter
	'WaitInput' is non-zero, SysReqHandler() will wait for input
	(by calling 
                <link linkend="n301">WaitPort()</link>
                ) if there are no IDCMP messages.

	SysReqHandler() returns the same values as EasyRequest(): A gadget
	ID greater than equal to 0, and  -1 if one of the other IDCMP
	events were received.

	An additional value of -2 is returned if the input processed
	does not satisfy the requester.  In this case, you might
	perform some processing and call SysReqHandler() again.

	Note: this function does NOT terminate the system request.
	Not only must you call 
                <link linkend="n357">FreeSysRequest()</link>
                 to eliminate the request,
	but you may also continue processing after an event which would
	normally terminate a normal call to EasyRequest().

    EXAMPLE
	Implementation of EasyRequest() input loop:

	window = BuildEasyRequest( ... )
	while ( (retval = SysReqHandler( window, idcmp_ptr, TRUE )) == -2 )
	{
	    /* loop	*/;
	}
	FreeSysRequest( window );

    EXAMPLE
	
                <link linkend="n407">Request</link>
                 a volume, but don't remove the requester when the
	user inserts the wrong disk:

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">EasyStruct</ulink>
                 volumeES = {
	    sizeof (struct EasyStruct),
	    0,
	    "Volume Request",
	    "Please insert volume %s in any drive.",
	    "Cancel"
	};

	Volume *
	getVolume( volname )
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                	*volname;
	{
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                	*window;
	    Volume		*volume = NULL;
	    Volume		*findVolume();
	    int			retval;

	    window = BuildEasyRequest( NULL, &amp;volumeES, IDCMP_DISKINSERTED,
	    	      volname );

	    while ( (retval = SysReqHandler( window, NULL, TRUE )) != 0 )
	    {
	    	/* not cancelled yet	*/

	    	/* when IDCMP_DISKINSERTED, check for volume */
	    	if (( retval == -1 ) &amp;&amp; (volume = findVolume( volname )))
		    break;
	    }
	    FreeSysRequest( window );
	    return ( volume );
	}

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 pointer returned from 
                <link linkend="n331">BuildSysRequest()</link>
                 or
		BuildEasyRequest().  Those functions can also return
		values '0' or '1', and these values may also be
		passed to SysReqHandler(), which will immediately
		return the same value.

	IDCMPFlagsPtr = If you passed application specific IDCMP
		flags to 
                <link linkend="n331">BuildSysRequest()</link>
                 or BuildEasyRequest(),
		SysReqHandler() will return -1 if that IDCMP message
		is received.  If IDCMPFlagsPtr is non-null, it
		points to a ULONG where the IDCMP class received
		will be copied for your examination.

		This pointer can be NULL if you have provided no
		application specific IDCMP flags or if you do
		not need to know which application specific IDCMP
		event occurred.

		If you provide more than on flag in the flags variable
		this pointer points to, you will have to refresh
		the variable whenever -1 is returned, since the
		variable will have been changed to show just the
		single IDCMP Class bit that caused the return.

	WaitInput = Specifies that you want SysReqHandler() to
	        to wait for IDCMP input if there is none pending.

    RESULT
	0, 1, ..., N = Successive GadgetID values, for the gadgets
	    you specify for the requester.  NOTE: The numbering
	    from left to right is actually: 1, 2, ..., N, 0.
	    This is for compatibility with AutoRequests which has
	    FALSE for the rightmost gadget.

	-1 = Means that one of the caller-supplied IDCMPFlags occurred.
	    The IDCMPFlag value is in the longword pointed to by UDCMP_ptr.

	-2 = input processed did not satisfy the requester. One example
	    is a keystroke that does not satisfy the requester.  Another
	    example is if there is no input pending and you specified
	    FALSE for WaitInput.

    BUGS

    SEE ALSO
	
                <link linkend="n301">exec.library/WaitPort()</link>
            </literallayout>
        </section>
        <section id="n430">
            <title>intuition.library/TimedDisplayAlert</title>
            <literallayout class="monospaced">
                    NAME
	TimedDisplayAlert -- Display an alert with automatic time-out. (V39)

    SYNOPSIS
	Response = TimedDisplayAlert( AlertNumber, String, Height, Time )
	D0                            D0           A0      D1      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 TimedDisplayAlert( ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , ULONG );

    FUNCTION
	This function is equivalent to 
                <link linkend="n341">DisplayAlert()</link>
                , except that if
	the user fails to respond in a given time, the alert comes
	down automatically.  See the autodoc for 
                <link linkend="n341">DisplayAlert()</link>
                 for
	full details.

    INPUTS
	AlertNumber = the number of this alert message.  The only pertinent
	    bits of this number are the ALERT_TYPE bit(s).  The rest of the
           number is ignored by this routine.
	String = pointer to the alert message string, as described above
	Height = minimum display lines required for your message
	Time = length of time the alert should wait for the user to
	    respond.  This time is the number of video frames the
	    alert should remain up for.

    RESULT
	A 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 value of TRUE or FALSE.  If this is a DEADEND_ALERT, FALSE
	is always the return value.  If this is a RECOVERY_ALERT. The return
	value will be TRUE if the user presses the left mouse button in
	response to your message, and FALSE if the user presses the right hand
	button is response to your text, or if the alert could not
	be posted.  If the alert times out, the return value will be FALSE.

    BUGS

    SEE ALSO
	
                <link linkend="n341">DisplayAlert()</link>
                
            </literallayout>
        </section>
        <section id="n431">
            <title>intuition.library/UnlockIBase</title>
            <literallayout class="monospaced">
                    NAME
	UnlockIBase -- Surrender an Intuition lock gotten by 
                <link linkend="n370">LockIBase()</link>
                .

    SYNOPSIS
	UnlockIBase( 
                <link linkend="n110">Lock</link>
                 )
		     A0

	VOID UnlockIBase( ULONG );

    FUNCTION

	Surrenders lock gotten by 
                <link linkend="n370">LockIBase()</link>
                .

	Calling this function when you do not own the specified lock will
	immediately crash the system.

    INPUTS
	The value returned by 
                <link linkend="n370">LockIBase()</link>
                 should be passed to this function,
	to specify which internal lock is to be freed.

	Note that the parameter is passed in A0, not D0, for historical reasons.

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n370">LockIBase()</link>
            </literallayout>
        </section>
        <section id="n432">
            <title>intuition.library/UnlockPubScreen</title>
            <literallayout class="monospaced">
                    NAME
	UnlockPubScreen -- Release lock on a public screen. (V36)

    SYNOPSIS
	UnlockPubScreen( Name, [Screen] )
			 A0    A1

	VOID UnlockPubScreen( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 * );

    FUNCTION
	Releases lock gotten by 
                <link linkend="n371">LockPubScreen()</link>
                .
	It is best to identify the locked public screen by
	the pointer returned from 
                <link linkend="n371">LockPubScreen()</link>
                .  To do this,
	supply a NULL 'Name' pointer and the screen pointer.

	In rare circumstances where it would be more convenient to pass
	a non-NULL pointer to the public screen name string, the
	'Screen' parameter is ignored.

    INPUTS
	Name = pointer to name of public screen.  If Name is NULL,
	    then argument 'Screen' is used as a direct pointer to
	    a public screen.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 = pointer to a public screen.  Used only if Name
	    is NULL.  This pointer MUST have been returned
	    by 
                <link linkend="n371">LockPubScreen()</link>
                .
	    It is safe to call UnlockPubScreen() with NULL Name
	    and 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 (the function will have no effect).

    RESULT

    BUGS

    SEE ALSO
	
                <link linkend="n371">LockPubScreen()</link>
            </literallayout>
        </section>
        <section id="n433">
            <title>intuition.library/UnlockPubScreenList</title>
            <literallayout class="monospaced">
                    NAME
	UnlockPubScreenList -- Release public screen list semaphore. (V36)

    SYNOPSIS
	UnlockPubScreenList()

	VOID UnlockPubScreenList( VOID );

    FUNCTION
	Releases lock gotten by 
                <link linkend="n372">LockPubScreenList()</link>
                .

    INPUTS
	None.

    RESULT
	None.

    BUGS

    SEE ALSO
	
                <link linkend="n372">LockPubScreenList()</link>
            </literallayout>
        </section>
        <section id="n434">
            <title>intuition.library/ViewAddress</title>
            <literallayout class="monospaced">
                    NAME
	ViewAddress -- Return the address of the Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure.

    SYNOPSIS
	view = ViewAddress()
	D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 *ViewAddress( VOID );

    FUNCTION
	Returns the address of the Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure.  If you
	want to use any of the graphics, text, or animation primitives
	in your window and that primitive requires a pointer to a view,
	this routine will return the address of the view for you.

    INPUTS
	None

    RESULT
	Returns the address of the Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure

    BUGS

    SEE ALSO
	graphics.library
            </literallayout>
        </section>
        <section id="n435">
            <title>intuition.library/ViewPortAddress</title>
            <literallayout class="monospaced">
                    NAME
	ViewPortAddress -- Return the address of a window's viewport.

    SYNOPSIS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 = ViewPortAddress( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
	D0                          A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *ViewPortAddress( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Returns the address of the viewport associated with the specified
	window.  The viewport is actually the viewport of the screen within
	which the window is displayed.  If you want to use any of the graphics,
	text, or animation primitives in your window and that primitive
	requires a pointer to a viewport, you can use this call.

	This pointer is only valid as long as your window's screen remains
	open, which is ensured by keeping your window open.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the window for which you want the viewport address

    RESULT
	Returns the address of the Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure for
	your window's screen .

    BUGS
	This routine is unnecessary: you can just use the expression
	&amp;Window-&gt;WScreen-&gt;ViewPort.

    SEE ALSO
	graphics.library
            </literallayout>
        </section>
        <section id="n436">
            <title>intuition.library/WBenchToBack</title>
            <literallayout class="monospaced">
                    NAME 
	WBenchToBack -- Send the Workbench screen in back of all screens.

    SYNOPSIS 
	Success = WBenchToBack()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 WBenchToBack( VOID );

    FUNCTION 
	Causes the Workbench screen, if it's currently opened, to go behind
	all other screens.  This does not 'move' the screen up or down,
	instead only affects the depth-arrangement of the screens.

    INPUTS 
	None

    RESULT 
	If the Workbench screen was opened, this function returns TRUE,
	otherwise it returns FALSE.

    BUGS 

    SEE ALSO 
	
                <link linkend="n437">WBenchToFront()</link>
                , 
                <link linkend="n413">ScreenToFront()</link>
            </literallayout>
        </section>
        <section id="n437">
            <title>intuition.library/WBenchToFront</title>
            <literallayout class="monospaced">
                    NAME 
	WBenchToFront -- Bring the Workbench screen in front of all screens.

    SYNOPSIS 
	Success = WBenchToFront()
	D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 WBenchToFront( VOID );

    FUNCTION 
	Causes the Workbench 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                , if it's currently opened, to come to
	the foreground.  This does not 'move' the screen up or down, instead
	only affects the depth-arrangement of the screen.

    INPUTS 
	None

    RESULT 
	If the Workbench screen was opened, this function returns TRUE,
	otherwise it returns FALSE.

    BUGS 

    SEE ALSO 
	
                <link linkend="n436">WBenchToBack()</link>
                , 
                <link linkend="n412">ScreenToBack()</link>
            </literallayout>
        </section>
        <section id="n438">
            <title>intuition.library/WindowLimits</title>
            <literallayout class="monospaced">
                    NAME
	WindowLimits -- Set the minimum and maximum limits of a window.

    SYNOPSIS
	Success = WindowLimits( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , MinWidth, MinHeight, MaxWidth,
	D0		        A0      D0        D1         D2
	                        MaxHeight )
	                        D3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 WindowLimits( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *, WORD, WORD, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

    FUNCTION
	Sets the minimum and maximum limits of the window's size.  Until this
	routine is called, the window's size limits are equal to the initial
	values established in the 
                <link linkend="n391">OpenWindow()</link>
                 function.

	After a call to this routine, the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 will be able to be sized
	to any dimensions within the specified limits.

	If you don't want to change any one of the dimensions, set the limit
	argument for that dimension to zero.  If any of the limit arguments
	is equal to zero, that argument is ignored and the initial setting
	of that parameter remains undisturbed.

	If any of the arguments is out of range (minimums greater than the
	current size, maximums less than the current size), that limit
	will be ignored, though the others will still take effect if they
	are in range.  If any are out of range, the return value from this
	procedure will be FALSE.  If all arguments are valid, the return
	value will be TRUE.

	If you want your window to be able to become "as large as possible"
	you may put -1 (i.e. ~0) in either or both Max arguments.  But
	please note: screen sizes may vary for several reasons, and you
	must be able to handle any possible size of window you might end
	up with if you use this method.  Note that you can use the function
	
                <link linkend="n371">LockPubScreen()</link>
                 to find out how big the screen your window will
	appear in is.  You may also refer to the WScreen field in your
	window structure, providing that your window remains open,
	which will ensure that the screen remains open, and thus the
	pointer remains valid.

	If the user is currently sizing this window, the new limits will
	not take effect until after the sizing is completed.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 structure
	MinWidth, MinHeight, MaxWidth, MaxHeight = the new limits for the size
            of this window.  If any of these is set to zero, it will
            be ignored and that setting will be unchanged.

    RESULT
	Returns TRUE if everything was in order.  If any of the parameters was
	out of range (minimums greater than current size, maximums less than
	current size), FALSE is returned and the errant limit request is
	not fulfilled (though the valid ones will be).

    BUGS

    SEE ALSO
	
                <link linkend="n371">LockPubScreen()</link>
            </literallayout>
        </section>
        <section id="n439">
            <title>intuition.library/WindowToBack</title>
            <literallayout class="monospaced">
                    NAME
	WindowToBack -- Ask Intuition to send a window behind others.

    SYNOPSIS
	WindowToBack( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		      A0

	VOID WindowToBack( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	This routine sends a request to Intuition asking to send the window
	in back of all other windows in the screen.

	Note that the window will not be depth-arranged immediately, but rather
	will be arranged the next time Intuition receives an input event,
	which happens currently at a minimum rate of ten times per second,
	and a maximum of sixty times a second.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 that WFLG_BACKDROP windows cannot be depth-arranged.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the structure of the window to be sent to the back

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n378">MoveWindow()</link>
                , 
                <link linkend="n428">SizeWindow()</link>
                , 
                <link linkend="n440">WindowToFront()</link>
                , 
                <link linkend="n379">MoveWindowInFrontOf()</link>
            </literallayout>
        </section>
        <section id="n440">
            <title>intuition.library/WindowToFront</title>
            <literallayout class="monospaced">
                    NAME
	WindowToFront -- Ask Intuition to bring a window to the front.

    SYNOPSIS
	WindowToFront( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
	               A0

	VOID WindowToFront( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	This routine sends a request to Intuition asking to bring the window
	in front of all other windows in the screen.

	Note that the window will not be depth-arranged immediately, but rather
	will be arranged the next time Intuition receives an input event,
	which happens currently at a minimum rate of ten times per second,
	and a maximum of sixty times a second.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 that WFLG_BACKDROP windows cannot be depth-arranged.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 = pointer to the structure of the window to be brought to front

    RESULT
	None

    BUGS

    SEE ALSO
	
                <link linkend="n378">MoveWindow()</link>
                , 
                <link linkend="n428">SizeWindow()</link>
                , 
                <link linkend="n439">WindowToBack()</link>
                , 
                <link linkend="n379">MoveWindowInFrontOf()</link>
            </literallayout>
        </section>
        <section id="n441">
            <title>intuition.library/ZipWindow</title>
            <literallayout class="monospaced">
                    NAME
	ZipWindow -- Change window to "alternate" position and
	             dimensions. (V36)

    SYNOPSIS
	ZipWindow( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 )
		   A0

	VOID ZipWindow( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 * );

    FUNCTION
	Changes the position and dimension of a window to the values
	at the last occasion of ZipWindow being called (or invoked
	via the "zoom" gadget).

	Typically this is used to snap between a normal, large, working
	dimension of the window to a smaller, more innocuous position
	and dimension.

	Like 
                <link linkend="n378">MoveWindow()</link>
                , 
                <link linkend="n428">SizeWindow()</link>
                , and 
                <link linkend="n333">ChangeWindowBox()</link>
                , the action of
	this function is deferred to the Intuition input handler.

	More tuning needs to be done to establish initial values for
	the first invocation of this function for a window.  You can
	provide initial values using the 
                <link linkend="n391">OpenWindow()</link>
                 tag item
	WA_Zoom.

	It could also use a new name, but "ZoomWindow" is misleading,
	since "Zoom" normally implies "scale."

	The zoom gadget will appear (in the place of the old "toback"
	gadget) when you open your window if you either specify a
	sizing gadget or use WA_Zoom.

	You can detect that this function has taken effect by receiving
	an IDCMP_CHANGEWINDOW IDCMP message.

    INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 -- window to be changed.

    RESULT
	None

    BUGS
	
                <link linkend="n391">OpenWindow()</link>
                 assumes that the proper default "other" dimensions
	are "full size."

    SEE ALSO
	
                <link linkend="n333">ChangeWindowBox()</link>
                , 
                <link linkend="n378">MoveWindow()</link>
                , 
                <link linkend="n428">SizeWindow()</link>
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>utility</title>
        <section id="n442">
            <title>utility.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n443"> AddNamedObject() </link>
                    
                <link linkend="n444"> AllocateTagItems() </link>
                    
                <link linkend="n445"> AllocNamedObjectA() </link>
                    
                <link linkend="n446"> Amiga2Date() </link>
                    
                <link linkend="n447"> ApplyTagChanges() </link>
                    
                <link linkend="n448"> AttemptRemNamedObject() </link>
                    
                <link linkend="n449"> CallHookPkt() </link>
                    
                <link linkend="n450"> CheckDate() </link>
                    
                <link linkend="n451"> CloneTagItems() </link>
                    
                <link linkend="n452"> Date2Amiga() </link>
                    
                <link linkend="n453"> FilterTagChanges() </link>
                    
                <link linkend="n454"> FilterTagItems() </link>
                    
                <link linkend="n455"> FindNamedObject() </link>
                    
                <link linkend="n456"> FindTagItem() </link>
                    
                <link linkend="n457"> FreeNamedObject() </link>
                    
                <link linkend="n458"> FreeTagItems() </link>
                    
                <link linkend="n459"> GetTagData() </link>
                    
                <link linkend="n460"> GetUniqueID() </link>
                    
                <link linkend="n461"> MapTags() </link>
                    
                <link linkend="n462"> NamedObjectName() </link>
                    
                <link linkend="n463"> NextTagItem() </link>
                    
                <link linkend="n464"> PackBoolTags() </link>
                    
                <link linkend="n465"> PackStructureTags() </link>
                    
                <link linkend="n466"> RefreshTagItemClones() </link>
                    
                <link linkend="n467"> ReleaseNamedObject() </link>
                    
                <link linkend="n468"> RemNamedObject() </link>
                    
                <link linkend="n469"> SDivMod32() </link>
                    
                <link linkend="n470"> SMult32() </link>
                    
                <link linkend="n471"> SMult64() </link>
                    
                <link linkend="n472"> Stricmp() </link>
                    
                <link linkend="n473"> Strnicmp() </link>
                    
                <link linkend="n474"> TagInArray() </link>
                    
                <link linkend="n475"> ToLower() </link>
                    
                <link linkend="n476"> ToUpper() </link>
                    
                <link linkend="n477"> UDivMod32() </link>
                    
                <link linkend="n478"> UMult32() </link>
                    
                <link linkend="n479"> UMult64() </link>
                    
                <link linkend="n480"> UnpackStructureTags() </link>
            </literallayout>
        </section>
        <section id="n443">
            <title>utility.library/AddNamedObject</title>
            <literallayout class="monospaced">
                   NAME
	AddNamedObject -- add a named object to the given namespace. (V39)

   SYNOPSIS
	success = AddNamedObject(nameSpace, object);
	D0			 A0         A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AddNamedObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *);

   FUNCTION
	Adds a new item to a NameSpace.  If the NameSpace doesn't support
	duplicate names, a search for a duplicate will be made, and
	0 (failure) will be returned.  Otherwise, the entry will be
	Enqueue()ed to the NameSpace.

   INPUTS
	nameSpace - the name space to add to (NULL for root namespace)
	object - the object to add  (If NULL, will return failure)

   RESULT
	success - whether the operation succeeded.  Check this always!

   SEE ALSO
	
                <link linkend="n448">AttemptRemNamedObject()</link>
                , 
                <link linkend="n468">RemNamedObject()</link>
                
            </literallayout>
        </section>
        <section id="n444">
            <title>utility.library/AllocateTagItems</title>
            <literallayout class="monospaced">
                   NAME
	AllocateTagItems -- allocate a tag list. (V36)

   SYNOPSIS
	tagList = AllocateTagItems(numTags);
	D0		           D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *AllocateTagItems(ULONG);

   FUNCTION
	Allocates the specified number of usable TagItems slots.

	Note that to access the TagItems in 'tagList', you should use
	the function 
                <link linkend="n463">NextTagItem()</link>
                . This will insure you respect any
	chaining (TAG_MORE) and secret hiding places (TAG_IGNORE) that
	this function might generate.

   INPUTS
	numTags - the number of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 slots you want to allocate.

   RESULTS
	tagList	- the allocated chain of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 structures, or NULL if
	          there was not enough memory. An allocated tag list must
	          eventually be freed using 
                <link linkend="n458">FreeTagItems()</link>
                .

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n458">FreeTagItems()</link>
                , 
                <link linkend="n451">CloneTagItems()</link>
                
            </literallayout>
        </section>
        <section id="n445">
            <title>utility.library/AllocNamedObjectA</title>
            <literallayout class="monospaced">
                   NAME
	AllocNamedObjectA -- allocate a named object. (V39)

   SYNOPSIS
	object = AllocNamedObjectA(name, tagList);
	D0                         A0    A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *AllocNamedObjectA(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	object = AllocNamedObject(name, Tag1, ...);

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *AllocNamedObject(STRPTR, ULONG, ...);

   FUNCTION
	Allocates a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 and initializes it as needed to the
	name given. This object can then be used as an object in the
	namespaces. Tags can be given to make an object contain a
	namespace such that nested namespaces can be built.
	When the object is allocated, it automatically has one use.
	If you later wish to release this object such that others may
	remove it from the namespace you must do a 
                <link linkend="n467">ReleaseNamedObject()</link>
                .

   INPUTS
	name - name for the object (must not be NULL)
	tagList - tags with additional information for the allocation or NULL

   TAGS
	ANO_NameSpace - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 tag, default FALSE.  If this tag is
	                TRUE, the named object will also have a
	                name space attached to it.
	ANO_UserSpace - ULONG tag, default 0.  If this tag is non-NULL
	                it defines the size (in bytes) of the user
	                space to be allocated with the named object
	                and that will be pointed to by the no_Object
	                pointer.  This memory is long-word aligned.
	                If no space is defined, no_Object will be NULL.
	ANO_Priority  - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 tag, default 0.  This tag lets you pick
	                a priority for the named object for when it is
	                placed into a name space.
	ANO_Flags     - ULONG tag, default 0.  This tag lets you set
	                the flags of the NameSpace (if you allocated
	                one)  There currently are only TWO flags.
	                Do *NOT* set *any* other bits as they are for
	                future use!!!  (You can't read them anyway)
	                The flags are:
	                NSF_NODUPS	- Name space must be unique.
	                NSF_CASE	- Name space is case sensitive

   RESULT
	object - the object allocated, or NULL for failure. The object
	         is defined as a pointer to a pointer.  You can do what you
	         wish with the pointer. (It may be NULL or contain a pointer
	         to memory that you had asked for in the tags.)

   SEE ALSO
	
                <link linkend="n457">FreeNamedObject()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">&lt;utility/name.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n446">
            <title>utility.library/Amiga2Date</title>
            <literallayout class="monospaced">
                   NAME
	Amiga2Date -- fill in a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure based on a system
		      time stamp (V36)

   SYNOPSIS
	Amiga2Date(seconds,result);
	           D0      A0

	VOID Amiga2Date(ULONG,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 *);

   FUNCTION
	Fills in a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure with the date and time calculated
	from a ULONG containing the number of seconds from 01-Jan-1978
	to the date.

   INPUTS
	seconds - the number of seconds from 01-Jan-1978.
	result - a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure that will be altered
		 by this function

   SEE ALSO
	
                <link linkend="n450">CheckDate()</link>
                , 
                <link linkend="n452">Date2Amiga()</link>
                
            </literallayout>
        </section>
        <section id="n447">
            <title>utility.library/ApplyTagChanges</title>
            <literallayout class="monospaced">
                   NAME
	ApplyTagChanges -- change a tag list based on a second tag list. (V39)

   SYNOPSIS
	ApplyTagChanges(list,changeList);
			A0   A1

	VOID ApplyTagChanges(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	For any tag that appears in both 'list' and 'changeList', this
	function will change the ti_Data field of the tag in 'list' to
	match the ti_Data field of the tag in 'changeList'. In effect,
	'changeList' contains a series of new values for tags already in
	'list'. Any tag in 'changeList' that is not in 'list' is ignored.

   INPUTS
	list - a list of existing tags (may be NULL)
	changeList - a list of tags to modify 'list' with (may be NULL)

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n453">FilterTagChanges()</link>
                
            </literallayout>
        </section>
        <section id="n448">
            <title>utility.library/AttemptRemNamedObject</title>
            <literallayout class="monospaced">
                   NAME
	AttemptRemNamedObject -- attempt to remove a named object. (V39)

   SYNOPSIS
	result = AttemptRemNamedObject(object);
	D0                             A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AttemptRemNamedObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *);

   FUNCTION
	Attempts to remove an object from whatever NameSpace it's in.
	You must have found the object first (in order to get a use count)
	before trying to remove it.  If the object is in use or is
	in the process of being removed, this function will return
	a failure code.  If the object is fully removed, the object will
	then be available to be 
                <link linkend="n457">FreeNamedObject()</link>
                .

   INPUTS
	object - the object to attempt to remove  The object must be valid

   RESULT
	success - FALSE if object is still in use (somewhere)
	          TRUE if object was removed

   SEE ALSO
	
                <link linkend="n468">RemNamedObject()</link>
                , 
                <link linkend="n443">AddNamedObject()</link>
                , 
                <link linkend="n467">ReleaseNamedObject()</link>
                
            </literallayout>
        </section>
        <section id="n449">
            <title>utility.library/CallHookPkt</title>
            <literallayout class="monospaced">
                   NAME
	CallHookPkt -- invoke a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 function callback. (V36)

   SYNOPSIS
	return = CallHookPkt(hook,object,message);
	D0		     A0   A2	 A1

	ULONG CallHookPkt(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                ,APTR);

   FUNCTION
	Performs the callback standard defined by a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 structure.
	This function is really very simple; it effectively performs
	a JMP to Hook-&gt;h_Entry.

	It is probably just as well to do this operation in an
	assembly language function linked in to your program, possibly
	from a compiler supplied library or a builtin function.

	It is anticipated that C programs will often call a 'varargs'
	variant of this function which will be named 
                <link linkend="n491">CallHook</link>
                . This
	function must be provided in a compiler specific library, but
	an example of use would be:

	result = CallHook(hook,dataobject,COMMAND_ID,param1,param2);

	The function 
                <link linkend="n491">CallHook()</link>
                 can be implemented in many C compilers
	like this:

	ULONG CallHook(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 object, ULONG command, ... )
	{
	    return(CallHookPkt(hook,object,(APTR)&amp;command));
	}

   INPUTS
	hook - pointer to an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 structure as defined in
	       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">&lt;utility/hooks.h&gt;</ulink>
                	object - useful data structure in the particular context the hook is
		 being used for.
	message - pointer to a message to be passed to the hook. This is not
		  an Exec 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 structure, but is a message in the OOP sense.

   RESULTS
	return - the value returned by the hook function.

   WARNING
	The functions called through this function should follow normal
	register conventions unless EXPLICITLY documented otherwise (and
	they have a good reason too).

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">&lt;utility/hooks.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n450">
            <title>utility.library/CheckDate</title>
            <literallayout class="monospaced">
                   NAME
	CheckDate -- checks a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure for legal date. (V36)

   SYNOPSIS
	seconds = CheckDate(date);
	D0                  A0

	ULONG CheckDate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 *);

   FUNCTION
	Determines if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure contains legal date information
	and returns the number of seconds from 01-Jan-1978 to that date, or 0
	if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure contains illegal data.

   INPUTS
	date - a filled-in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure

   RESULTS
	seconds	- 0 if date is invalid, otherwise the number of seconds from
		  01-Jan-1978 to the date

   BUGS
	The wday field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure is not checked.

   SEE ALSO
	
                <link linkend="n446">Amiga2Date()</link>
                , 
                <link linkend="n452">Date2Amiga()</link>
                
            </literallayout>
        </section>
        <section id="n451">
            <title>utility.library/CloneTagItems</title>
            <literallayout class="monospaced">
                   NAME
	CloneTagItems -- copy a tag list. (V36)

   SYNOPSIS
	clone = CloneTagItems(original);
	D0		      A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *CloneTagItems(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	Copies the essential contents of a tag list into a new tag list.

	The cloning is such that calling 
                <link linkend="n456">FindTagItem()</link>
                 with a given tag on
	the original or cloned tag lists will always return the same
	tag value. That is, the ordering of the tags is maintained.

   INPUTS
	original - tag list to clone. May be NULL, in which case an
		   empty tag list is returned.

   RESULTS
	clone - copy of the original tag list, or NULL if there was not enough
		memory. This tag list must eventually by freed by calling
		
                <link linkend="n458">FreeTagItems()</link>
                .

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n444">AllocateTagItems()</link>
                , 
                <link linkend="n458">FreeTagItems()</link>
                ,
	
                <link linkend="n466">RefreshTagItemClones()</link>
                
            </literallayout>
        </section>
        <section id="n452">
            <title>utility.library/Date2Amiga</title>
            <literallayout class="monospaced">
                   NAME
	Date2Amiga -- calculate seconds from 01-Jan-1978. (V36)

   SYNOPSIS
	seconds = Date2Amiga(date);
	D0                   A0

	ULONG Date2Amiga(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 *);

   FUNCTION
	Calculates the number of seconds from 01-Jan-1978 to the date
	specified in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure.

   INPUTS
	date - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                 structure containing the date of
	       interest.

   RESULTS
	seconds	- the number of seconds from 01-Jan-1978 to the date specified.

   WARNING
	This function does no sanity checking of the data in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/date.h">ClockData</ulink>
                	structure.

   SEE ALSO
	
                <link linkend="n446">Amiga2Date()</link>
                , 
                <link linkend="n450">CheckDate()</link>
                
            </literallayout>
        </section>
        <section id="n453">
            <title>utility.library/FilterTagChanges</title>
            <literallayout class="monospaced">
                   NAME
	FilterTagChanges -- eliminate tags which specify no change. (V36)

   SYNOPSIS
	FilterTagChanges(changeList,originalList,apply);
			 A0	    A1           D0

	VOID FilterTagChanges(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *, ULONG);

   FUNCTION
	This function goes through changeList. For each item found in
	changeList, if the item is also present in originalList, and their
	data values are identical, then the tag is removed from changeList.
	If the two tag's data values are different and the 'apply' value is
	non-zero, then the tag data in originalList will be updated to match
	the value from changeList.

   INPUTS
	changeList - list of new tags (may be NULL)
	originalList - a list of existing tags (may be NULL)
	apply - boolean specification as to whether the data values in
		originalList are to be updated to the data values in
		changeList.

   EXAMPLE
	Assume you have an attribute list for an object (originalList)
	which looks like this:

		{ATTR_Size,  "large"},
		{ATTR_Color, "orange"},
		{ATTR_Shape, "square"}

	If you receive a new tag list containing some changes (changeList),
	which looks like this:

		{ATTR_Size,  "large"},
		{ATTR_Shape, "triangle"}

	If you call FilterTagChanges(), changeList will be modified to
	contain only those attributes which are different from those
	in originalList. All other items will have their tag values set to
	TAG_IGNORE. The resulting changeList will become:

		{TAG_IGNORE, "large"},
		{ATTR_Shape, "triangle"}

	If 'apply' was set to 0, originalList would be unchanged. If 'apply'
	was non-zero, originalList would be changed to:

		{ATTR_Size,  "large"},
		{ATTR_Color, "orange"},
		{ATTR_Shape, "triangle"}

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n447">ApplyTagChanges()</link>
                
            </literallayout>
        </section>
        <section id="n454">
            <title>utility.library/FilterTagItems</title>
            <literallayout class="monospaced">
                   NAME
	FilterTagItems -- remove selected items from a tag list. (V36)

   SYNOPSIS
	numValid = FilterTagItems(tagList,filterArray,logic);
	D0		          A0	  A1	      D0

	ULONG FilterTagItems(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 *,ULONG);

   FUNCTION
	Removes tag items from a tag list (by changing ti_Tag to
	TAG_IGNORE) depending on whether its ti_Tag value is
	found in an array of tag values.

	If the 'logic' parameter is TAGFILTER_AND, then all items
	not appearing in 'tagArray' are excluded from 'tagList'.

	If 'logic' is TAGFILTER_NOT, then items not found in 'tagArray'
	are preserved, and the ones in the array are cast out.

   INPUTS
	tagList	- input list of tag items which is to be filtered by having
		  selected items changed to TAG_IGNORE.
	filterArray - an array of tag values, terminated by TAG_DONE, as
		      specified in the documentation for 
                <link linkend="n474">TagInArray()</link>
                .
	logic - specification whether items in 'tagArray' are to be included
		or excluded in the filtered result.

   RESULTS
	numValid - number of valid items left in resulting filtered list.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n474">TagInArray()</link>
                
            </literallayout>
        </section>
        <section id="n455">
            <title>utility.library/FindNamedObject</title>
            <literallayout class="monospaced">
                   NAME
	FindNamedObject -- find the next object of a given name. (V39)

   SYNOPSIS
	object = FindNamedObject(nameSpace, name, lastObject);
	D0                       A0         A1    A2

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *FindNamedObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,
					    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *);

   FUNCTION
	Finds an object and adds to the open count of the object. The
	object is guaranteed not to be freed until 
                <link linkend="n467">ReleaseNamedObject()</link>
                 is
	called. The name comparison is caseless, using the current
	locale string comparison routines.

	If name is NULL, then all objects will be matched.

	If lastObject is non-NULL, it must be an object from the same
	NameSpace found on a previous call to FindNamedObject(). It
	will not be freed by this call. The search will start at the
	node after lastobject, if non-NULL.

	nameSpace is the name space from the named object given
	or the root name space if NULL is given.

   INPUTS
	nameSpace - the name space to search
	name - the name of the object to search for
	lastObject - the starting point for the search or NULL

   RESULT
	object - the first match found, or NULL for no match

   SEE ALSO
	
                <link linkend="n467">ReleaseNamedObject()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">&lt;utility/name.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n456">
            <title>utility.library/FindTagItem</title>
            <literallayout class="monospaced">
                   NAME
	FindTagItem -- scan a tag list for a specific tag. (V36)

   SYNOPSIS
	tag = FindTagItem(tagValue,tagList);
	D0		  D0	   A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *FindTagItem(Tag,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	Scans a tag list and returns a pointer to the first item with
	ti_Tag matching the 'tagValue' parameter.

   INPUTS
	tagValue - tag value to search for
	tagList	- tag item list to search (may be NULL)

   RESULTS
	tag - a pointer to the item with ti_Tag matching 'tagValue' or NULL
	      if no match was found.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n459">GetTagData()</link>
                , 
                <link linkend="n464">PackBoolTags()</link>
                , 
                <link linkend="n463">NextTagItem()</link>
                
            </literallayout>
        </section>
        <section id="n457">
            <title>utility.library/FreeNamedObject</title>
            <literallayout class="monospaced">
                   NAME
	FreeNamedObject -- frees a name object. (V39)

   SYNOPSIS
	FreeNamedObject(object);
			A0

	VOID FreeNamedObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *);

   FUNCTION
	Free one of a number of structures used by utility.library.
	The item must not be a member of any NameSpace, and no one
	may have it open other than yourself. If the object also
	contained a NameSpace, that namespace must be empty.
	Any additional space allocated via the datasize parameter
	for AllocNamedObject() is also released.

   INPUTS
	object - the object to be freed

   SEE ALSO
	
                <link linkend="n445">AllocNamedObjectA()</link>
                
            </literallayout>
        </section>
        <section id="n458">
            <title>utility.library/FreeTagItems</title>
            <literallayout class="monospaced">
                   NAME
	FreeTagItems -- free an allocated tag list. (V36)

   SYNOPSIS
	FreeTagItems(tagList);
		     A0

	VOID FreeTagItems(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	Frees the memory of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 list allocated either by
	
                <link linkend="n444">AllocateTagItems()</link>
                 or 
                <link linkend="n451">CloneTagItems()</link>
                .

   INPUTS
	tagList - list to free, must have been obtained from
		  
                <link linkend="n444">AllocateTagItems()</link>
                 or 
                <link linkend="n451">CloneTagItems()</link>
                 (may be NULL)

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n444">AllocateTagItems()</link>
                , 
                <link linkend="n451">CloneTagItems()</link>
                
            </literallayout>
        </section>
        <section id="n459">
            <title>utility.library/GetTagData</title>
            <literallayout class="monospaced">
                   NAME
	GetTagData -- obtain the data corresponding to a tag. (V36)

   SYNOPSIS
	value = GetTagData(tagValue,defaultVal,tagList);
	D0		   D0	    D1	       A0

	ULONG GetTagData(Tag,ULONG,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	Searches a tag list for a matching tag, and returns the
	corresponding ti_Data value for the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 found. If no match is
	found, this function returns the value passed in as 'default'.

   INPUTS
	tagValue - tag value to search for.
	defaultVal - value to be returned if tagValue is not found.
	tagList - the tag list to search.

   RESULTS
	value - the ti_Data value for the first matching 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                , or 'default'
		if a ti_Tag matching 'Tag' is not found.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n456">FindTagItem()</link>
                , 
                <link linkend="n464">PackBoolTags()</link>
                , 
                <link linkend="n463">NextTagItem()</link>
                
            </literallayout>
        </section>
        <section id="n460">
            <title>utility.library/GetUniqueID</title>
            <literallayout class="monospaced">   NAME
	GetUniqueID -- return a relatively unique number. (V39)

   SYNOPSIS
	id = GetUniqueID();
	D0

	ULONG GetUniqueID(VOID);

   FUNCTION
	Returns a unique value each time it is called. This is useful for
	things that need unique ID such as the GadgetHelp ID, etc.
	Note that this is only unique for 4,294,967,295 calls to this
	function. Under normal use this is not a problem.
	This function is safe in interrupts.

   RESULT
	id - a 32-bit value that is unique.
</literallayout>
        </section>
        <section id="n461">
            <title>utility.library/MapTags</title>
            <literallayout class="monospaced">
                   NAME
	MapTags	-- convert ti_Tag values in a list via map pairing. (V36)

   SYNOPSIS
	MapTags(tagList,mapList,mapType);
		A0	A1      D0

	VOID MapTags(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *,ULONG);

   FUNCTION
	Apply a "mapping list" mapList to tagList.

	If the ti_Tag field of an item in tagList appears as ti_Tag in some
	item in mapList, overwrite ti_Tag with the corresponding ti_Data
	from the map list.

	The mapType parameter specifies how the mapping operation is to
	proceed, with the following available types:

		MAP_REMOVE_NOT_FOUND
		If a tag in tagList does not appear in the mapList, remove
		it from tagList.

		MAP_KEEP_NOT_FOUND
		To have items which do not appear in the mapList survive the
		mapping process as-is.

	MapTags() is central to BOOPSI gadget interconnections where you want
	to convert the tag values from one space (the sender) to another (the
	receiver).

	The procedure will change the values of the input tag list
	tagList (but not mapList).

	You can "filter" a list by passing MAP_REMOVE_NOT_FOUND as mapType,
	and having the data items in mapList equal the corresponding tags.

	You can perform the inverse filter ("everything but") by passing
	a mapType of MAP_KEEP_NOT_FOUND, and creating a map item for every tag
	you want to filter out, pairing it with a mapped data value of
	TAG_IGNORE.

	For safety and "order independence" of tag item arrays, if you
	attempt to map some tag to the value TAG_DONE, the value TAG_IGNORE
	will be substituted instead.

   INPUTS
	tagList	- input list of tag items which is to be mapped to tag values
		  as specified in mapList.
	mapList - a "mapping list" tag list which pairs tag values expected to
		  appear in tagList with new values to be substituted in the
		  ti_Tag fields of tagList (may be NULL)
	mapType - one of the available mapping types as defined in
		  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                   EXAMPLE
	/* Consider this source list: */
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 list[] =
	    {
		{MY_SIZE, 	71},
		{MY_WEIGHT, 	200},
		{TAG_DONE,	}
           };

	/* And the mapping list: */
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 map[] =
	    {
		{MY_SIZE, 	HIS_TALL},
		{TAG_DONE,	}
	    };

	/* Then after MapTags(list,map,MAP_REMOVE_NOT_FOUND), 'list' will
	   become: */
		{HIS_TALL,71},
		{TAG_IGNORE,},
		{TAG_DONE,}

	/* Or after MapTags(list,map,MAP_KEEP_NOT_FOUND), 'list' will
	   become: */
		{HIS_TALL,  71},
		{MY_WEIGHT, 200},
		{TAG_DONE,  }

   BUGS
	Prior to V39, the mapType parameter did not work. The function
	always behaved as if the parameter was set to MAP_KEEP_NOT_FOUND.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n447">ApplyTagChanges()</link>
                , 
                <link linkend="n453">FilterTagChanges()</link>
                
            </literallayout>
        </section>
        <section id="n462">
            <title>utility.library/NamedObjectName</title>
            <literallayout class="monospaced">
                   NAME
	NamedObjectName -- return the name of the object. (V39)

   SYNOPSIS
	name = NamedObjectName(object);
	D0                     A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 NamedObjectName(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *);

   FUNCTION
	Returns the name of the object passed in...
	Note that the name string is passed back as just a pointer to
	a read-only name. If the object goes away, so does the name.

   INPUTS
	object - the object, may be NULL in which case this function
		 returns NULL.

   RESULT
	name - pointer to the name string, or NULL if 'object' is NULL.

   SEE ALSO
	
                <link linkend="n455">FindNamedObject()</link>
                , 
                <link linkend="n468">RemNamedObject()</link>
                
            </literallayout>
        </section>
        <section id="n463">
            <title>utility.library/NextTagItem</title>
            <literallayout class="monospaced">
                   NAME
	NextTagItem -- iterate through a tag list. (V36)

   SYNOPSIS
	tag = NextTagItem(tagItemPtr);
	D0		  A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *NextTagItem(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 **);

   FUNCTION
	Iterates through a tag list, skipping and chaining as dictated by
	system tags. TAG_SKIP will cause it to skip the entry and a number
	of following tags as specified in ti_Data. TAG_IGNORE ignores that
	single entry, and TAG_MORE has a pointer to another array of tags (and
	terminates the current array!). TAG_DONE also terminates the current
	array. Each call returns either the next tagitem you should examine,
	or NULL when the end of the list has been reached.

   INPUTS
	tagItemPtr - doubly-indirect reference to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 structure.
		     The pointer will be changed to keep track of the
		     iteration.

   RESULTS
	nextTag	- each 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 in the array or chain of arrays that should be
		  processed according to system tag values defined in
		  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                ) is returned in turn with successive
		  calls.

   EXAMPLE
	Iterate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);
	{
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tstate;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tag;

	    tstate = tags;
	    while (tag = NextTagItem(&amp;tstate))
	    {
		switch (tag-&gt;ti_Tag)
		{
 		    case TAG1: ...
			       break;

 		    case TAG2: ...
			       break;

		    ...
		}
	    }
   	}

   WARNING
	Do NOT use the value of *tagItemPtr, but rather use the pointer
	returned by NextTagItem().

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n459">GetTagData()</link>
                , 
                <link linkend="n464">PackBoolTags()</link>
                , 
                <link linkend="n456">FindTagItem()</link>
                
            </literallayout>
        </section>
        <section id="n464">
            <title>utility.library/PackBoolTags</title>
            <literallayout class="monospaced">
                   NAME
	PackBoolTags -- builds a "flag" word from a tag list. (V36)

   SYNOPSIS
	flags = PackBoolTags(initialFlags,tagList,boolMap);
	D0		     D0		  A0      A1

	ULONG PackBoolTags(ULONG,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	Picks out the boolean tag items in a tag list and converts
	them into bit-flag representations according to a correspondence
	defined by the tag list 'boolMap'.

	A boolean tag item is one where only the logical value of
	the ti_Data is relevant. If this field is 0, the value is
	FALSE, otherwise TRUE.

   INPUTS
	initialFlags - a starting set of bit-flags which will be changed
		       by the processing of TRUE and FALSE boolean tags
		       in tagList.
	tagList	- a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 list which may contain several tag items defined to
		  be boolean by their presence in boolMap. The logical value of
		  ti_Data determines whether a tag item causes the bit-flag
		  value related by boolMap to be set or cleared in the returned
		  flag longword.
	boolMap	- a tag list defining the boolean tags to be recognized, and
		  the bit (or bits) in the returned longword that are to be set
		  or cleared when a boolean 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 is found to be TRUE or FALSE in
		  tagList.

   RESULTS
	flags - the accumulated longword of bit-flags, starting with
		initialFlags and modified by each boolean tag item
		encountered.

   EXAMPLE
	/* define some nice user tag values ... */
	enum mytags { tag1 = TAG_USER+1, tag2, tag3, tag4, tag5 };

	/* this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 list defines the correspondence between boolean tags
	 * and bit-flag values.
	 */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 boolMap[] =
	{
	    {tag1,     0x0001},
	    {tag2,     0x0002},
	    {tag3,     0x0004},
	    {tag4,     0x0008},
	    {TAG_DONE, }
	};

	/* You are probably passed these by some client, and you want
	 * to "collapse" the boolean content into a single longword.
	 */

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 boolExample[] =
	{
	    {tag1,     TRUE},
	    {tag2,     FALSE},
	    {tag5,     Irrelevant},
	    {tag3,     TRUE},
	    {TAG_DONE, }
	};

	/* Perhaps 'boolFlags' already has a current value of 0x800002. */
	boolFlags = PackBoolTags(boolFlags,boolExample,boolMap);

	/* The resulting new value of 'boolFlags' will be 0x80005. /*

   WARNING
	In a case where there is duplication of a tag in tagList, the
	last of the identical tags will hold sway.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n459">GetTagData()</link>
                , 
                <link linkend="n456">FindTagItem()</link>
                , 
                <link linkend="n463">NextTagItem()</link>
                
            </literallayout>
        </section>
        <section id="n465">
            <title>utility.library/PackStructureTags</title>
            <literallayout class="monospaced">
                   NAME
	PackStructureTags -- pack a structure with values from taglist. (V39)

   SYNOPSIS
	num = PackStructureTags(pack,packTable,tagList);
	D0                      A0   A1        A2

	ULONG PackStructureTags(APTR,ULONG *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	For each table entry, a 
                <link linkend="n456">FindTagItem()</link>
                 will be done and if the
	matching tag is found in the taglist, the data field will be
	packed into the given structure based on the packtable
	definition.

   INPUTS
	pack - a pointer to the data area to fill in.
	packTable - a pointer to the packing information table.
		    See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/pack.h">&lt;utility/pack.h&gt;</ulink>
                 for definition and macros.
	tagList - a pointer to the taglist to pack into the structure

   RESULTS
	num - the number of tag items packed

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/pack.h">&lt;utility/pack.h&gt;</ulink>
                , 
                <link linkend="n456">FindTagItem()</link>
                , 
                <link linkend="n480">UnpackStructureTags()</link>
                
            </literallayout>
        </section>
        <section id="n466">
            <title>utility.library/RefreshTagItemClones</title>
            <literallayout class="monospaced">
                   NAME
	RefreshTagItemClones -- rejuvenate a clone from the original. (V36)

   SYNOPSIS
	RefreshTagItemClones(clone,original)
			     A0	   A1

	VOID RefreshTagItemClones(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	If (and only if) the tag list 'clone' was created from 'original' by
	
                <link linkend="n451">CloneTagItems()</link>
                , and if 'original' has not been changed in any way,
	you can reset the clone list to its original state by using this
	function.

   INPUTS
	clone - return value from CloneTagItems(original)
	original - a tag list that hasn't changed since 
                <link linkend="n451">CloneTagItems()</link>
                   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n451">CloneTagItems()</link>
                , 
                <link linkend="n444">AllocateTagItems()</link>
                ,
	
                <link linkend="n458">FreeTagItems()</link>
                , 
                <link linkend="n447">ApplyTagChanges()</link>
                
            </literallayout>
        </section>
        <section id="n467">
            <title>utility.library/ReleaseNamedObject</title>
            <literallayout class="monospaced">
                   NAME
	ReleaseNamedObject -- free a named object. (V39)

   SYNOPSIS
	ReleaseNamedObject(object);
			   A0

	VOID ReleaseNamedObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *);

   FUNCTION
	Decrements the open count of the object. If the object has been
	removed, and the count goes to 0, the remover will be notified
	that the object is now free.

   INPUTS
	object - the object to release.  (No action if NULL)

   SEE ALSO
	
                <link linkend="n455">FindNamedObject()</link>
                , 
                <link linkend="n468">RemNamedObject()</link>
                
            </literallayout>
        </section>
        <section id="n468">
            <title>utility.library/RemNamedObject</title>
            <literallayout class="monospaced">
                   NAME
	RemNamedObject -- remove a named object. (V39)

   SYNOPSIS
	RemNamedObject(object, message);
	               A0      A1

	VOID RemNamedObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 *);

   FUNCTION
	This function will post a request to release the object
	from whatever NameSpace it is in.  It will reply the message
	when the object is fully removed.  The message.mn_Node.ln_Name
	field will contain the object pointer or NULL if the object
	was removed by another process.

	This function will effectively do a 
                <link linkend="n467">ReleaseNamedObject()</link>
                	thus you must have "found" the object first.

   INPUTS
	object - the object to remove: Must be a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/name.h">NamedObject</ulink>
                .
	message - message to 
                <link linkend="n282">ReplyMsg()</link>
                 (must be supplied)

   RESULT
	The message is replied with the ln_Name field either being
	the object or NULL. If it contains the object, the object
	is completely removed.

   SEE ALSO
	
                <link linkend="n448">AttemptRemNamedObject()</link>
                , 
                <link linkend="n443">AddNamedObject()</link>
                , 
                <link linkend="n467">ReleaseNamedObject()</link>
                
            </literallayout>
        </section>
        <section id="n469">
            <title>utility.library/SDivMod32</title>
            <literallayout class="monospaced">
                   NAME
	SDivMod32 -- signed 32 by 32 bit division and modulus. (V36)

   SYNOPSIS
	quotient:remainder = SDivMod32(dividend,divisor);
	D0       D1                    D0       D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG:LONG</ulink>
                 SDivMod32(LONG,LONG);

   FUNCTION
	Divides the signed 32 bit dividend by the signed 32 bit divisor
	and returns a signed 32 bit quotient and remainder.

   INPUTS
	dividend - signed 32 bit dividend.
	divisor - signed 32 bit divisor.

   RESULTS
	quotient - signed 32 quotient of the division.
	remainder - signed 32 remainder of the division.

   NOTES
	Unlike other Amiga library function calls, the utility.library
	32 bit math routines do NOT require A6 to be loaded with a
	pointer to the library base. A6 can contain anything the application
	wishes. This is in order to avoid overhead in calling them.

	In addition, the utility.library math routines preserve all
	address registers including A0 and A1

   SEE ALSO
	
                <link linkend="n470">SMult32()</link>
                , 
                <link linkend="n477">UDivMod32()</link>
                , 
                <link linkend="n478">UMult32()</link>
                , 
                <link linkend="n471">SMult64()</link>
                , 
                <link linkend="n479">UMult64()</link>
                
            </literallayout>
        </section>
        <section id="n470">
            <title>utility.library/SMult32</title>
            <literallayout class="monospaced">
                   NAME
	SMult32 -- signed 32 by 32 bit multiply with 32 bit result. (V36)

   SYNOPSIS
	result = SMult32(arg1,arg2);
	D0               D0   D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SMult32(LONG,LONG);

   FUNCTION
	Returns the signed 32 bit result of multiplying arg1 by arg2.

   INPUTS
	arg1, arg2 - numbers to multiply

   RESULTS
	result - the signed 32 bit result of multiplying arg1 by arg2.

   NOTES
	Unlike other Amiga library function calls, the utility.library
	32 bit math routines do NOT require A6 to be loaded with a
	pointer to the library base. A6 can contain anything the application
	wishes. This is in order to avoid overhead in calling them.

	In addition, the utility.library math routines preserve all
	address registers including A0 and A1

   SEE ALSO
	
                <link linkend="n469">SDivMod32()</link>
                , 
                <link linkend="n477">UDivMod32()</link>
                , 
                <link linkend="n478">UMult32()</link>
                , 
                <link linkend="n471">SMult64()</link>
                , 
                <link linkend="n479">UMult64()</link>
                
            </literallayout>
        </section>
        <section id="n471">
            <title>utility.library/SMult64</title>
            <literallayout class="monospaced">
                   NAME
	SMult64 -- signed 32 by 32 bit multiply with 64 bit result. (V39)

   SYNOPSIS
	result = SMult64(arg1,arg2);
	D0:D1            D0   D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SMult64(LONG,LONG);

   FUNCTION
	Returns the signed 64 bit result of multiplying arg1 by arg2.

   INPUTS
	arg1, arg2 - numbers to multiply

   RESULTS
	result - the signed 64 bit result of multiplying arg1 by arg2.

   NOTES
	Unlike other Amiga library function calls, the utility.library
	32 bit math routines do NOT require A6 to be loaded with a
	pointer to the library base. A6 can contain anything the application
	wishes. This is in order to avoid overhead in calling them.

	In addition, the utility.library math routines preserve all
	address registers including A0 and A1

   SEE ALSO
	
                <link linkend="n469">SDivMod32()</link>
                , 
                <link linkend="n477">UDivMod32()</link>
                , 
                <link linkend="n478">UMult32()</link>
                , 
                <link linkend="n479">UMult64()</link>
                
            </literallayout>
        </section>
        <section id="n472">
            <title>utility.library/Stricmp</title>
            <literallayout class="monospaced">
                   NAME
	Stricmp	-- case-insensitive string comparison. (V37)

   SYNOPSIS
	result = Stricmp(string1,string2);
	D0		 A0      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 Stricmp(STRPTR,STRPTR);

   FUNCTION
	This function compares two strings, ignoring case using a generic
	case conversion routine. If the strings have different lengths,
	the shorter is treated as if it were extended with zeros.

   INPUTS
	string1, string2 - strings to be compared

   RESULTS
	result - relationship between string1 and string2
			&lt;0 means string1 &lt; string2
			=0 means string1 = string2
			&gt;0 means string1 &gt; string2

   NOTES
	Whenever locale.library is installed in a system, this function is
	replaced by language-specific code. This means that depending on
	which language the user has currently selected, identical pairs of
	strings may return different values when passed to this function.
	This fact must be taken into consideration when using this function.

   SEE ALSO
	
                <link linkend="n473">Strnicmp()</link>
                , 
                <link linkend="n578">locale.library/StrnCmp()</link>
                
            </literallayout>
        </section>
        <section id="n473">
            <title>utility.library/Strnicmp</title>
            <literallayout class="monospaced">
                   NAME
	Strnicmp -- length-limited case-insensitive string compare. (V37)

   SYNOPSIS
	result = Strnicmp(string1,string2,length);
	D0		  A0      A1	  D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 Strnicmp(STRPTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,LONG);

   FUNCTION
	This function compares two strings, ignoring case using a generic
	case conversion routine. If the strings have different lengths,
	the shorter is treated as if it were extended with zeros. This function
	never compares more than 'length' characters.

   INPUTS
	string1, string2 - strings to be compared
	length - maximum number of characters to examine

   RESULTS
	result - relationship between string1 and string2
			&lt;0 means string1 &lt; string2
			=0 means string1 = string2
			&gt;0 means string1 &gt; string2

   NOTES
	Whenever locale.library is installed in a system, this function is
	replaced by language-specific code. This means that depending on
	which language the user has currently selected, identical pairs of
	strings may return different values when passed to this function.
	This fact must be taken into consideration when using this function.

   SEE ALSO
	
                <link linkend="n472">Stricmp()</link>
                , 
                <link linkend="n578">locale.library/StrnCmp()</link>
                
            </literallayout>
        </section>
        <section id="n474">
            <title>utility.library/TagInArray</title>
            <literallayout class="monospaced">
                   NAME
	TagInArray -- check if a tag value appears in an array of tag values.
		      (V36)

   SYNOPSIS
	result = TagInArray(tagValue,tagArray);
	D0	            D0	     A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 TagInArray(Tag,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 *);

   FUNCTION
	Performs a quick scan to see if a tag value appears in an array
	terminated with TAG_DONE. Returns TRUE if the value is found.

	The 'tagArray' must be terminated by TAG_DONE. Note that this is an
	array of tag values, NOT an array of TagItems.

   INPUTS
	tagValue - tag value to search array for in array.
	tagArray - a simple array of tag values terminated by TAG_DONE.

   RESULTS
	result - TRUE if tagValue was found in tagArray.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">&lt;utility/tagitem.h&gt;</ulink>
                , 
                <link linkend="n454">FilterTagItems()</link>
                
            </literallayout>
        </section>
        <section id="n475">
            <title>utility.library/ToLower</title>
            <literallayout class="monospaced">
                   NAME
	ToLower -- convert a character to lower case. (V37)

   SYNOPSIS
	char = ToLower(char);
	D0	       D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 ToLower(UBYTE);

   FUNCTION
	Converts a character to lower case, handling international character
	sets.

   INPUTS
	char - character to be converted.

   RESULTS
	char - lower case version of the input character.

   NOTES
	Whenever locale.library is installed in a system, this function is
	replaced by language-specific code. This means that depending on
	which language the user has currently selected, a given character may
	return different results when passed to this function. This fact must
	be taken into consideration when using this function.

   SEE ALSO
	
                <link linkend="n476">ToUpper()</link>
                , 
                <link linkend="n567">locale.library/ConvToLower()</link>
                
            </literallayout>
        </section>
        <section id="n476">
            <title>utility.library/ToUpper</title>
            <literallayout class="monospaced">
                   NAME
	ToUpper -- convert a character to upper case. (V37)

   SYNOPSIS
	char = ToUpper(char);
	D0	       D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 ToUpper(UBYTE);

   FUNCTION
	Converts a character to upper case, handling international character
	sets.

   INPUTS
	char - character to be converted.

   RESULTS
	char - upper case version of input character.

   NOTES
	Whenever locale.library is installed in a system, this function is
	replaced by language-specific code. This means that depending on
	which language the user has currently selected, a given character may
	return different results when passed to this function. This fact must
	be taken into consideration when using this function.

   SEE ALSO
	ToUpper(), 
                <link linkend="n567">locale.library/ConvToLower()</link>
                
            </literallayout>
        </section>
        <section id="n477">
            <title>utility.library/UDivMod32</title>
            <literallayout class="monospaced">
                   NAME
	UDivMod32 -- unsigned 32 by 32 bit division and modulus. (V36)

   SYNOPSIS
	quotient:remainder = UDivMod32(dividend,divisor);
	D0       D1                    D0       D1

	ULONG:ULONG UDivMod32(ULONG,ULONG);

   FUNCTION
	Divides the unsigned 32 bit dividend by the unsigned 32 bit divisor
	and returns an unsigned 32 bit quotient and remainder.

   INPUTS
	dividend - unsigned 32 bit dividend.
	divisor - unsigned 32 bit divisor.

   RESULTS
	quotient - unsigned 32 quotient of the division.
	remainder - unsigned 32 remainder of the division.

   NOTES
	Unlike other Amiga library function calls, the utility.library
	32 bit math routines do NOT require A6 to be loaded with a
	pointer to the library base. A6 can contain anything the application
	wishes. This is in order to avoid overhead in calling them.

	In addition, the utility.library math routines preserve all
	address registers including A0 and A1

   SEE ALSO
	
                <link linkend="n469">SDivMod32()</link>
                , 
                <link linkend="n470">SMult32()</link>
                , 
                <link linkend="n478">UMult32()</link>
                
            </literallayout>
        </section>
        <section id="n478">
            <title>utility.library/UMult32</title>
            <literallayout class="monospaced">
                   NAME
	UMult32 -- unsigned 32 by 32 bit multiply with 32 bit result. (V36)

   SYNOPSIS
	result = UMult32(arg1,arg2);
	D0               D0   D1

	ULONG UMult32(ULONG,ULONG);

   FUNCTION
	Returns the unsigned 32 bit result of multiplying arg1 by arg2.

   INPUTS
	arg1, arg2 - numbers to multiply

   RESULTS
	result - the unsigned 32 bit result of multiplying arg1 by arg2.

   NOTES
	Unlike other Amiga library function calls, the utility.library
	32 bit math routines do NOT require A6 to be loaded with a
	pointer to the library base. A6 can contain anything the application
	wishes. This is in order to avoid overhead in calling them.

	In addition, the utility.library math routines preserve all
	address registers including A0 and A1

   SEE ALSO
	
                <link linkend="n469">SDivMod32()</link>
                , 
                <link linkend="n470">SMult32()</link>
                , 
                <link linkend="n477">UDivMod32()</link>
                , 
                <link linkend="n471">SMult64()</link>
                , 
                <link linkend="n479">UMult64()</link>
                
            </literallayout>
        </section>
        <section id="n479">
            <title>utility.library/UMult64</title>
            <literallayout class="monospaced">
                   NAME
	UMult64 -- unsigned 32 by 32 bit multiply with 64 bit result. (V39)

   SYNOPSIS
	result = UMult64(arg1,arg2);
	D0:D1               D0   D1

	ULONG UMult64(ULONG,ULONG);

   FUNCTION
	Returns the unsigned 64 bit result of multiplying arg1 by arg2.

   INPUTS
	arg1, arg2 - numbers to multiply

   RESULTS
	result - the unsigned 64 bit result of multiplying arg1 by arg2.

   NOTES
	Unlike other Amiga library function calls, the utility.library
	32 bit math routines do NOT require A6 to be loaded with a
	pointer to the library base. A6 can contain anything the application
	wishes. This is in order to avoid overhead in calling them.

	In addition, the utility.library math routines preserve all
	address registers including A0 and A1

   SEE ALSO
	
                <link linkend="n469">SDivMod32()</link>
                , 
                <link linkend="n470">SMult32()</link>
                , 
                <link linkend="n477">UDivMod32()</link>
                , 
                <link linkend="n471">SMult64()</link>
                
            </literallayout>
        </section>
        <section id="n480">
            <title>utility.library/UnpackStructureTags</title>
            <literallayout class="monospaced">
                   NAME
	UnpackStructureTags -- unpack a structure to values in taglist. (V39)

   SYNOPSIS
	num = UnpackStructureTags(pack,packTable,tagList);
	D0                        A0   A1        A2

	ULONG UnpackStructureTags(APTR,ULONG *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

   FUNCTION
	For each table entry, a 
                <link linkend="n456">FindTagItem()</link>
                 will be done and if the
	matching tag is found in the taglist, the data in the structure
	will be placed into the memory pointed to by the tag's ti_Data.
	ti_Data *must* point to a LONGWORD.

   INPUTS
	pack - a pointer to the data area to be unpacked
	packTable - a pointer to the packing information table.
		    See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/pack.h">&lt;utility/pack.h&gt;</ulink>
                 for definition and macros
	tagList - a pointer to the taglist to unpack into

   RESULTS
	num - the number of tag items unpacked

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/pack.h">&lt;utility/pack.h&gt;</ulink>
                , 
                <link linkend="n456">FindTagItem()</link>
                , 
                <link linkend="n465">PackStructureTags()</link>
                
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>amiga_lib</title>
        <section id="n481">
            <title>amiga_lib.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n482"> ACrypt() </link>
                    
                <link linkend="n483"> AddTOF() </link>
                    
                <link linkend="n484"> afp() </link>
                    
                <link linkend="n485"> ArgArrayDone() </link>
                    
                <link linkend="n486"> ArgArrayInit() </link>
                    
                <link linkend="n487"> ArgInt() </link>
                    
                <link linkend="n488"> ArgString() </link>
                    
                <link linkend="n489"> arnd() </link>
                    
                <link linkend="n490"> BeginIO() </link>
                    
                <link linkend="n491"> CallHook() </link>
                    
                <link linkend="n492"> CallHookA() </link>
                    
                <link linkend="n493"> CheckRexxMsg() </link>
                    
                <link linkend="n494"> CoerceMethod() </link>
                    
                <link linkend="n495"> CoerceMethodA() </link>
                    
                <link linkend="n496"> CreateExtIO() </link>
                    
                <link linkend="n497"> CreatePort() </link>
                    
                <link linkend="n498"> CreateStdIO() </link>
                    
                <link linkend="n499"> CreateTask() </link>
                    
                <link linkend="n500"> CxCustom() </link>
                    
                <link linkend="n501"> CxDebug() </link>
                    
                <link linkend="n502"> CxFilter() </link>
                    
                <link linkend="n503"> CxSender() </link>
                    
                <link linkend="n504"> CxSignal() </link>
                    
                <link linkend="n505"> CxTranslate() </link>
                    
                <link linkend="n506"> dbf() </link>
                    
                <link linkend="n507"> DeleteExtIO() </link>
                    
                <link linkend="n508"> DeletePort() </link>
                    
                <link linkend="n509"> DeleteStdIO() </link>
                    
                <link linkend="n510"> DeleteTask() </link>
                    
                <link linkend="n511"> DoMethod() </link>
                    
                <link linkend="n512"> DoMethodA() </link>
                    
                <link linkend="n513"> DoSuperMethod() </link>
                    
                <link linkend="n514"> DoSuperMethodA() </link>
                    
                <link linkend="n515"> FastRand() </link>
                    
                <link linkend="n516"> fpa() </link>
                    
                <link linkend="n517"> FreeIEvents() </link>
                    
                <link linkend="n518"> GetRexxVar() </link>
                    
                <link linkend="n519"> HookEntry() </link>
                    
                <link linkend="n520"> HotKey() </link>
                    
                <link linkend="n521"> InvertString() </link>
                    
                <link linkend="n522"> LibAllocPooled() </link>
                    
                <link linkend="n523"> LibCreatePool() </link>
                    
                <link linkend="n524"> LibDeletePool() </link>
                    
                <link linkend="n525"> LibFreePooled() </link>
                    
                <link linkend="n526"> NewList() </link>
                    
                <link linkend="n527"> printf() </link>
                    
                <link linkend="n528"> RangeRand() </link>
                    
                <link linkend="n529"> RemTOF() </link>
                    
                <link linkend="n530"> SetRexxVar() </link>
                    
                <link linkend="n531"> SetSuperAttrs() </link>
                    
                <link linkend="n532"> sprintf() </link>
                    
                <link linkend="n533"> stdio() </link>
                    
                <link linkend="n534"> TimeDelay() </link>
            </literallayout>
        </section>
        <section id="n482">
            <title>amiga.lib/ACrypt</title>
            <literallayout class="monospaced">
                   NAME
	ACrypt -- Encrypt a password

   SYNOPSIS
	newpass = ACrypt( buffer, password, username )

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *ACrypt( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *) ;

   FUNCTION
	This function takes a buffer of at least 12 characters in length,
	an unencrypted password and the user's name (as known to the host
	system) and returns an encrypted password in the passed buffer.
	This is a one-way encryption. Normally, the user's encrypted
	password is stored in a file for future password comparison.

   INPUTS
	buffer     - a pointer to a buffer at least 12 bytes in length.
	password   - a pointer to an unencrypted password string.
	username   - a pointer to the user's name.

   RESULT
	newpass    - a pointer to the passed buffer if successful, NULL
	             upon failure. The encrypted password placed in the
	             buffer will be be eleven (11) characters in length
	             and will be NULL-terminated.

   EXAMPLE

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *pw, *getpassword() ;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *user = "alf"
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *newpass ;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 buffer[16] ;         /* size &gt;= 12 */

	pw = getpassword() ;   /* your own function */

	if((newpass = ACrypt(buffer, pw, user)) != NULL)
	{
		printf("pw = %s\n", newpass) ; /* newpass = &amp;buffer[0] */
	}
	else
	{
		printf("ACrypt failed\n") ;
	}

            </literallayout>
        </section>
        <section id="n483">
            <title>amiga.lib/AddTOF</title>
            <literallayout class="monospaced">
                   NAME
	AddTOF - add a task to the VBlank interrupt server chain.

   SYNOPSIS
	AddTOF(i,p,a);

	VOID AddTOF(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/graphint.h">Isrvstr</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , APTR);

   FUNCTION
	Adds a task to the vertical-blanking interval interrupt server
	chain. This prevents C programmers from needing to write an
	assembly language stub to do this function.

   INPUTS
	i - pointer to an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/graphint.h">Isrvstr</ulink>
                 structure
	p - pointer to the C-code routine that this server is to call each
	    time TOF happens
	a - pointer to the first longword in an array of longwords that
	    is to be used as the arguments passed to your routine
	    pointed to by p.

   SEE ALSO
	
                <link linkend="n529">RemTOF()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/graphint.h">&lt;graphics/graphint.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n484">
            <title>amiga.lib/afp</title>
            <literallayout class="monospaced">   NAME
	afp - Convert ASCII string variable into fast floating point

   SYNOPSIS
	ffp_value = afp(string);

    FUNCTION
	Accepts the address of the ASCII string in C format that is
	converted into an FFP floating point number.

	The string is expected in this Format:
	{S}{digits}{'.'}{digits}{'E'}{S}{digits}
	&lt;*******MANTISSA*******&gt;&lt;***EXPONENT***&gt;


	Syntax rules:
	Both signs are optional and are '+' or '-'. The mantissa must be
	present. The exponent need not be present. The mantissa may lead
	with a decimal point. The mantissa need not have a decimal point.
	Examples: All of these values represent the number fourty-two.
		     42 	   .042e3
		     42.	  +.042e+03
		    +42.	  0.000042e6
		0000042.00	 420000e-4
			     420000.00e-0004

	Floating point range:
	Fast floating point supports the value zero and non-zero values
	within the following bounds -
			18			       20
	 9.22337177 x 10   &gt; +number &gt;	5.42101070 x 10
			18			       -20
	-9.22337177 x 10   &gt; -number &gt; -2.71050535 x 10

	Precision:
	This conversion results in a 24 bit precision with guaranteed
	error less than or equal to one-half least significant bit.

	INPUTS
	string - Pointer to the ASCII string to be converted.


	OUTPUTS
	string - points to the character which terminated the scan
	equ - fast floating point equivalent</literallayout>
        </section>
        <section id="n485">
            <title>amiga.lib/ArgArrayDone</title>
            <literallayout class="monospaced">
                   NAME
	ArgArrayDone -- release the memory allocated by a previous call
			to 
                <link linkend="n486">ArgArrayInit()</link>
                . (V36)

   SYNOPSIS
	ArgArrayDone();

	VOID ArgArrayDone(VOID);

   FUNCTION
	This function frees memory and does cleanup required after a
	call to 
                <link linkend="n486">ArgArrayInit()</link>
                . Don't call this until you are done using
	the ToolTypes argument strings.

   SEE ALSO
	
                <link linkend="n486">ArgArrayInit()</link>
                
            </literallayout>
        </section>
        <section id="n486">
            <title>amiga.lib/ArgArrayInit</title>
            <literallayout class="monospaced">
                   NAME
	ArgArrayInit -- allocate and initialize a tooltype array. (V36)

   SYNOPSIS
	ttypes = ArgArrayInit(argc,argv);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 **ArgArrayInit(LONG,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 **);

   FUNCTION
	This function returns a null-terminated array of strings
	suitable for sending to 
                <link linkend="n791">icon.library/FindToolType()</link>
                . This array will
	be the ToolTypes array of the program's icon, if it was started from
	Workbench. It will just be 'argv' if the program was started from
	a shell.

	Pass ArgArrayInit() your startup arguments received by main().

	ArgArrayInit() requires that icon.library be open (even if the caller
	was started from a shell, so that the function 
                <link linkend="n791">FindToolType()</link>
                 can be
	used) and may call 
                <link linkend="n795">GetDiskObject()</link>
                , so clean up is necessary when
	the strings are no longer needed. The function 
                <link linkend="n485">ArgArrayDone()</link>
                 does
	just that.

   INPUTS
	argc - the number of arguments in argv, 0 when started from Workbench
	argv - an array of pointers to the program's arguments, or the
	       Workbench startup message when started from WB.

   RESULTS
	ttypes - the initialized argument array or NULL if it could not be
	         allocated

   EXAMPLE
	Use of these routines facilitates the use of ToolTypes or command-
	line arguments to control end-user parameters in Commodities
	applications. For example, a filter used to trap a keystroke for
	popping up a window might be created by something like this:

    		char   *ttypes  = ArgArrayInit(argc, argv);
    		
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                   *filter = UserFilter(ttypes, "POPWINDOW", "alt f1");

               ... with ...

               
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *UserFilter(char **tt, char *action_name,
				  char *default_descr)
		{
		char *desc;

		    desc = FindToolType(tt,action_name);

		    return(CxFilter((ULONG)(desc? desc: default_descr)));
		}

	In this way the user can assign "alt f2" to the action by
	entering a tooltype in the program's icon of the form:

		POPWINDOW=alt f2

	or by starting the program from the CLI like so:

		myprogram "POPWINDOW=alt f2"

   NOTE
	Your program must open icon.library and set up IconBase before calling
	this routine. In addition IconBase must remain valid until after
	
                <link linkend="n485">ArgArrayDone()</link>
                 has been called!

   SEE ALSO
	
                <link linkend="n485">ArgArrayDone()</link>
                , 
                <link linkend="n488">ArgString()</link>
                , 
                <link linkend="n487">ArgInt()</link>
                , 
                <link linkend="n791">icon.library/FindToolType()</link>
                
            </literallayout>
        </section>
        <section id="n487">
            <title>amiga.lib/ArgInt</title>
            <literallayout class="monospaced">
                   NAME
	ArgInt -- return an integer value from a ToolTypes array. (V36)

   SYNOPSIS
	value = ArgInt(tt,entry,defaultval)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ArgInt(UBYTE **,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,LONG);

   FUNCTION
	This function looks in the ToolTypes array 'tt' returned
	by 
                <link linkend="n486">ArgArrayInit()</link>
                 for 'entry' and returns the value associated
	with it. 'tt' is in standard ToolTypes format such as:

		ENTRY=Value

	The Value string is passed to atoi() and the result is returned by
	this function.

	If 'entry' is not found, the integer 'defaultval' is returned.

   INPUTS
	tt - a ToolTypes array as returned by 
                <link linkend="n486">ArgArrayInit()</link>
                	entry - the entry in the ToolTypes array to search for
	defaultval - the value to return in case 'entry' is not found within
		     the ToolTypes array

   RESULTS
	value - the value associated with 'entry', or defaultval if 'entry'
		is not in the ToolTypes array

   NOTES
	This function requires that dos.library V36 or higher be opened.

   SEE ALSO
	
                <link linkend="n486">ArgArrayInit()</link>
                
            </literallayout>
        </section>
        <section id="n488">
            <title>amiga.lib/ArgString</title>
            <literallayout class="monospaced">
                   NAME
	ArgString -- return a string pointer from a ToolTypes array. (V36)

   SYNOPSIS
	string = ArgString(tt,entry,defaultstring)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 ArgString(UBYTE **,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,STRPTR);

   FUNCTION
	This function looks in the ToolTypes array 'tt' returned
	by 
                <link linkend="n486">ArgArrayInit()</link>
                 for 'entry' and returns the value associated
	with it. 'tt' is in standard ToolTypes format such as:

		ENTRY=Value

	This function returns a pointer to the Value string.

	If 'entry' is not found, 'defaultstring' is returned.

   INPUTS
	tt - a ToolTypes array as returned by 
                <link linkend="n486">ArgArrayInit()</link>
                	entry - the entry in the ToolTypes array to search for
	defaultstring - the value to return in case 'entry' is not found within
		        the ToolTypes array

   RESULTS
	value - the value associated with 'entry', or defaultstring if 'entry'
		is not in the ToolTypes array

   SEE ALSO
	
                <link linkend="n486">ArgArrayInit()</link>
                
            </literallayout>
        </section>
        <section id="n489">
            <title>amiga.lib/arnd</title>
            <literallayout class="monospaced">  NAME
	arnd - ASCII round of the provided floating point string

   SYNOPSIS
	arnd(place, exp, &amp;string[0]);

   FUNCTION
	Accepts an ASCII string representing an FFP floating point
	number, the binary representation of the exponent of said
	floating point number and the number of places to round to.
	A rounding process is initiated, either to the left or right
	of the decimal place and the result placed back at the
	input address defined by &amp;string[0].

   INPUTS
	place - integer representing number of decimal places to round to
	exp - integer representing exponent value of the ASCII string
	&amp;string[0] - address where rounded ASCII string is to be placed
		     (16 bytes)

   RESULT
	&amp;string[0] - rounded ASCII string

   BUGS
	None</literallayout>
        </section>
        <section id="n490">
            <title>amiga.lib/BeginIO</title>
            <literallayout class="monospaced">
                   NAME
	BeginIO -- initiate asynchronous device I/O

   SYNOPSIS
	BeginIO(ioReq)

	VOID BeginIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	This function takes an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                , and passes it directly to the
	"BeginIO" vector of the proper device.  This is equivalent to
	
                <link linkend="n283">SendIO()</link>
                , except that io_Flags is not cleared. A good understanding
	of Exec device I/O is required to properly use this function.

	This function does not wait for the I/O to complete.

   INPUTS
	ioReq - an initialized and opened 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 structure with the
	        io_Flags field set to a reasonable value (set to 0 if you do
		not require io_Flags).

   SEE ALSO
	
                <link linkend="n233">exec.library/DoIO()</link>
                , 
                <link linkend="n283">exec.library/SendIO()</link>
                , 
                <link linkend="n300">exec.library/WaitIO()</link>
                
            </literallayout>
        </section>
        <section id="n491">
            <title>amiga.lib/CallHook</title>
            <literallayout class="monospaced">
                   NAME
	CallHook -- Invoke a hook given a message on the stack.

   SYNOPSIS
	result = CallHook( hookPtr, obj, ... )

	ULONG CallHook( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, ... );

   FUNCTION
	Like 
                <link linkend="n492">CallHookA()</link>
                , CallHook() invoke a hook on the supplied
	hook-specific data (an "object") and a parameter packet ("message").
	However, CallHook() allows you to build the message on your stack.

   INPUTS
	hookPtr - A system-standard hook
	obj - hook-specific data object
	... - The hook-specific message you wish to send.  The hook is
	    expecting a pointer to the message, so a pointer into your
	    stack will be sent.

   RESULT
	result - a hook-specific result.

   NOTES
	This function first appeared in the V37 release of amiga.lib.
	However, it does not depend on any particular version of the OS,
	and works fine even in V34.

   EXAMPLE
	If your hook's message was

	    struct myMessage
	    {
		ULONG mm_FirstGuy;
		ULONG mm_SecondGuy;
		ULONG mm_ThirdGuy;
	    };

	You could write:

	    result = CallHook( hook, obj, firstguy, secondguy, thirdguy );

	as a shorthand for:

	    struct myMessage msg;

	    msg.mm_FirstGuy = firstguy;
	    msg.mm_SecondGuy = secondguy;
	    msg.mm_ThirdGuy = thirdguy;

	    result = CallHookA( hook, obj, &amp;msg );

   SEE ALSO
	
                <link linkend="n492">CallHookA()</link>
                , 
                <link linkend="n449">utility.library/CallHookPkt()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">&lt;utility/hooks.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n492">
            <title>amiga.lib/CallHookA</title>
            <literallayout class="monospaced">
                   NAME
	CallHookA -- Invoke a hook given a pointer to a message.

   SYNOPSIS
	result = CallHookA( hookPtr, obj, message )

	ULONG CallHook( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 );

   FUNCTION
	Invoke a hook on the supplied hook-specific data (an "object")
	and a parameter packet ("message").  This function is equivalent
	to 
                <link linkend="n449">utility.library/CallHookPkt()</link>
                .

   INPUTS
	hookPtr - A system-standard hook
	obj - hook-specific data object
	message - The hook-specific message you wish to send

   RESULT
	result - a hook-specific result.

   NOTES
	This function first appeared in the V37 release of amiga.lib.
	However, it does not depend on any particular version of the OS,
	and works fine even in V34.

   SEE ALSO
	
                <link linkend="n491">CallHook()</link>
                , 
                <link linkend="n449">utility.library/CallHookPkt()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">&lt;utility/hooks.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n493">
            <title>amiga.lib/CheckRexxMsg</title>
            <literallayout class="monospaced">
                   NAME
	CheckRexxMsg - Check if a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/rexx/storage.h">RexxMsg</ulink>
                 is from ARexx

   SYNOPSIS
	result = CheckRexxMsg(message)
	D0                    A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 CheckRexxMsg(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/rexx/storage.h">RexxMsg</ulink>
                 *);

   FUNCTION
	This function checks to make sure that the message is from ARexx
	directly.  It is required when using the Rexx Variable Interface
	routines (RVI) that the message be from ARexx.

	While this function is new in the V37 amiga.lib, it is safe to
	call it in all versions of the operating system.  It is also
	PURE code, thus usable in resident/pure executables.

   NOTE
	This is a stub in amiga.lib.  It is only available via amiga.lib.
	The stub has two labels.  One, _CheckRexxMsg, takes the arguments
	from the stack.  The other, CheckRexxMsg, takes the arguments in
	registers.

   EXAMPLE
	if (CheckRexxMsg(rxmsg))
	{
		/* 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 is one from ARexx */
	}

   INPUTS
	message		A pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/rexx/storage.h">RexxMsg</ulink>
                 in question

   RESULTS
	result		A boolean - TRUE if message is from ARexx.

   SEE ALSO
	
                <link linkend="n518">GetRexxVar()</link>
                , 
                <link linkend="n530">SetRexxVar()</link>
                
            </literallayout>
        </section>
        <section id="n494">
            <title>amiga.lib/CoerceMethod</title>
            <literallayout class="monospaced">
                   NAME
	CoerceMethod -- Perform method on coerced object.

   SYNOPSIS
	result = CoerceMethod( cl, obj, MethodID, ... )

	ULONG CoerceMethod( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, ULONG, ... );

   FUNCTION
	Boopsi support function that invokes the supplied message
	on the specified object, as though it were the specified
	class.  Equivalent to 
                <link linkend="n495">CoerceMethodA()</link>
                , but allows you to
	build the message on the stack.

   INPUTS
	cl - pointer to boopsi class to receive the message
	obj - pointer to boopsi object
	... - method-specific message built on the stack

   RESULT
	result - class and message-specific result.

   NOTES
	This function first appears in the V37 release of amiga.lib.
	While it intrinsically does not require any particular release
	of the system software to operate, it is designed to work with
	the boopsi subsystem of Intuition, which was only introduced
	in V36.

   SEE ALSO
	
                <link linkend="n495">CoerceMethodA()</link>
                , 
                <link linkend="n512">DoMethodA()</link>
                , 
                <link linkend="n514">DoSuperMethodA()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">&lt;intuition/classusr.h&gt;</ulink>
                	ROM Kernel Manual boopsi section

            </literallayout>
        </section>
        <section id="n495">
            <title>amiga.lib/CoerceMethodA</title>
            <literallayout class="monospaced">
                   NAME
	CoerceMethodA -- Perform method on coerced object.

   SYNOPSIS
	result = CoerceMethodA( cl, obj, msg )

	ULONG CoerceMethodA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Msg</ulink>
                 );

   FUNCTION
	Boopsi support function that invokes the supplied message
	on the specified object, as though it were the specified
	class.

   INPUTS
	cl - pointer to boopsi class to receive the message
	obj - pointer to boopsi object
	msg - pointer to method-specific message to send

   RESULT
	result - class and message-specific result.

   NOTES
	This function first appears in the V37 release of amiga.lib.
	While it intrinsically does not require any particular release
	of the system software to operate, it is designed to work with
	the boopsi subsystem of Intuition, which was only introduced
	in V36.
	Some early example code may refer to this function as CM().

   SEE ALSO
	
                <link linkend="n494">CoerceMethod()</link>
                , 
                <link linkend="n512">DoMethodA()</link>
                , 
                <link linkend="n514">DoSuperMethodA()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">&lt;intuition/classusr.h&gt;</ulink>
                	ROM Kernel Manual boopsi section

            </literallayout>
        </section>
        <section id="n496">
            <title>amiga.lib/CreateExtIO</title>
            <literallayout class="monospaced">
                   NAME
	CreateExtIO -- create an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 structure

   SYNOPSIS
	ioReq = CreateExtIO(port,ioSize);

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *CreateExtIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *, ULONG);

   FUNCTION
	Allocates memory for and initializes a new IO request block
	of a user-specified number of bytes. The number of bytes
	MUST be the size of a legal 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 (or extended IORequest)
	or very nasty things will happen.

   INPUTS
	port - an already initialized message port to be used for this IO
	       request's reply port. If this is NULL this function fails.
	ioSize - the size of the IO request to be created.

   RESULT
	ioReq - a new IO 
                <link linkend="n407">Request</link>
                 block, or NULL if there was not enough memory

   EXAMPLE
	if (ioReq = CreateExtIO(CreatePort(NULL,0),sizeof(struct IOExtTD)))

   SEE ALSO
	
                <link linkend="n507">DeleteExtIO()</link>
                , 
                <link linkend="n497">CreatePort()</link>
                , 
                <link linkend="n225">exec.library/CreateMsgPort()</link>
                
            </literallayout>
        </section>
        <section id="n497">
            <title>amiga.lib/CreatePort</title>
            <literallayout class="monospaced">
                   NAME
	CreatePort - 
                <link linkend="n202">Allocate</link>
                 and initialize a new message port

   SYNOPSIS
	port = CreatePort(name,pri)

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *CreatePort(STRPTR,LONG);

   FUNCTION
	Allocates and initializes a new message port. The message list
	of the new port will be prepared for use (via NewList).  A signal
	bit will be allocated, and the port will be set to signal your
	task when a message arrives (PA_SIGNAL).

	You *must* use 
                <link linkend="n508">DeletePort()</link>
                 to delete ports created with
	CreatePort()!

   INPUTS
	name - public name of the port, or NULL if the port is not named.
	       The name string is not copied. Most ports do not need names,
	       see notes below on this.
	pri  - Priority used for insertion into the public port list,
	       normally 0.

   RESULT
	port - a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 structure ready for use, or NULL if the port
	       could not be created due to not enough memory or no available
	       signal bit.

   NOTE
	In most cases, ports should not be named. Named ports are used for
	rendez-vous between tasks. Everytime a named port needs to be located,
	the list of all named ports must be traversed. The more named
	ports there are, the longer this list traversal takes. Thus, unless
	you really need to, do not name your ports, which will keep them off
	of the named port list and improve system performance.

   BUGS
	With versions of amiga.lib prior to V37.14, this function would
	not fail even though it couldn't allocate a signal bit. The port
	would be returned with no signal allocated.

   SEE ALSO
	
                <link linkend="n508">DeletePort()</link>
                , 
                <link linkend="n237">exec.library/FindPort()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">&lt;exec/ports.h&gt;</ulink>
                ,
	
                <link linkend="n225">exec.library/CreateMsgPort()</link>
                
            </literallayout>
        </section>
        <section id="n498">
            <title>amiga.lib/CreateStdIO</title>
            <literallayout class="monospaced">
                   NAME
	CreateStdIO -- create an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IOStdReq</ulink>
                 structure

   SYNOPSIS
	ioReq = CreateStdIO(port);

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IOStdReq</ulink>
                 *CreateStdIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *)

   FUNCTION
	Allocates memory for and initializes a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IOStdReq</ulink>
                 structure.

   INPUTS
	port - an already initialized message port to be used for this IO
	       request's reply port. If this is NULL this function fails.

   RESULT
	ioReq - a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IOStdReq</ulink>
                 structure, or NULL if there was not enough
		memory

   SEE ALSO
	
                <link linkend="n509">DeleteStdIO()</link>
                , 
                <link linkend="n496">CreateExtIO()</link>
                , 
                <link linkend="n224">exec.library/CreateIORequest()</link>
                
            </literallayout>
        </section>
        <section id="n499">
            <title>amiga.lib/CreateTask</title>
            <literallayout class="monospaced">
                   NAME
	CreateTask -- Create task with given name, priority, stacksize

   SYNOPSIS
	task = CreateTask(name,pri,initPC,stackSize)

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 *CreateTask(STRPTR,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,funcEntry,ULONG);

   FUNCTION
	This function simplifies program creation of sub-tasks by
	dynamically allocating and initializing required structures
	and stack space, and adding the task to Exec's task list
	with the given name and priority. A tc_MemEntry list is provided
	so that all stack and structure memory allocated by CreateTask()
	is automatically deallocated when the task is removed.

	An Exec task may not call dos.library functions or any function
	which might cause the loading of a disk-resident library, device,
	or file (since such functions are indirectly calls to dos.library).
	Only AmigaDOS Processes may call AmigaDOS; see the
	
                <link linkend="n53">dos.library/CreateProc()</link>
                 or the 
                <link linkend="n52">dos.library/CreateNewProc()</link>
                	functions for more information.

	If other tasks or processes will need to find this task by name,
	provide a complex and unique name to avoid conflicts.

	If your compiler provides automatic insertion of stack-checking
	code, you may need to disable this feature when compiling sub-task
	code since the stack for the subtask is at a dynamically allocated
	location.  If your compiler requires 68000 registers to contain
	particular values for base relative addressing, you may need to
	save these registers from your main process, and restore them
	in your initial subtask code.

	The function entry initPC is generally provided as follows:

	In C:
	extern void functionName();
	char *tname = "unique name";
	task = CreateTask(tname, 0L, functionName, 4000L);

	In assembler:
		PEA	startLabel

   INPUTS
	name - a null-terminated name string
	pri - an Exec task priority between -128 and 127, normally 0
	funcEntry - the address of the first executable instruction
		    of the subtask code
	stackSize - size in bytes of stack for the subtask. Don't cut it
		    too close - system function stack usage may change.

   RESULT
	task - a pointer to the newly created task, or NULL if there was not
	       enough memory.

   BUGS
	Under exec.library V37 or beyond, the 
                <link linkend="n199">AddTask()</link>
                 function used
	internally by CreateTask() can fail whereas it couldn't fail in
	previous versions of Exec. Prior to amiga.lib V37.14, this function
	did not check for failure of 
                <link linkend="n199">AddTask()</link>
                 and thus might return a
	pointer to a task structure even though the task was not actually
	added to the system.

	Prior to amiga.lib V40.20 low memory conditions could cause
	CreateTask() to malfunction. The implementation checked whether the
	initial 
                <link linkend="n203">AllocEntry()</link>
                 call would fail, but would use an inappropriate
	test condition.

   SEE ALSO
	
                <link linkend="n510">DeleteTask()</link>
                , 
                <link linkend="n240">exec/FindTask()</link>
                
            </literallayout>
        </section>
        <section id="n500">
            <title>amiga.lib/CxCustom</title>
            <literallayout class="monospaced">
                   NAME
	CxCustom -- create a custom commodity object. (V36)

   SYNOPSIS
	customObj = CxCustom(action,id);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *CxCustom(LONG(*)(),LONG);

   FUNCTION
	This function creates a custom commodity object. The action
	of this object on receiving a commodity message is to call a
	function of the application programmer's choice.

	The function provided ('action') will be passed a pointer to
	the actual commodities message (in commodities private data
	space), and will actually execute as part of the input handler
	system task. Among other things, the value of 'id' can be
	recovered from the message by using the function 
                <link linkend="n814">CxMsgID()</link>
                .

	The purpose of this function is two-fold. First, it allows
	programmers to create Commodities Exchange objects with
	functionality that was not imagined or chosen for inclusion
	by the designers. Secondly, this is the only way to act
	synchronously with Commodities.

	This function is a C-language macro for 
                <link linkend="n811">CreateCxObj()</link>
                , defined
	in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .

   INPUTS
	action - a function to call whenever a message reaches the object
	id - a message id to assign to the object

   RESULTS
	customObj - a pointer to the new custom object, or NULL if it could
		    not be created.

  SEE ALSO
	
                <link linkend="n811">commodities.library/CreateCxObj()</link>
                , 
                <link linkend="n814">commodities.library/CxMsgID()</link>
                
            </literallayout>
        </section>
        <section id="n501">
            <title>amiga.lib/CxDebug</title>
            <literallayout class="monospaced">
                   NAME
	CxDebug -- create a commodity debug object. (V36)

   SYNOPSIS
	debugObj = CxDebug(id);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *CxDebug(LONG);

   FUNCTION
	This function creates a Commodities debug object. The action of this
	object on receiving a Commodities message is to print out information
	about the Commodities message through the serial port (using the
	kprintf() routine). The value of 'id' will also be displayed.

	Note that this is a synchronous occurrence (the printing is done by
	the input device task). If screen or file output is desired, using a
	sender object instead of a debug object is necessary, since such
	output is best done by your application process.

	This function is a C-language macro for 
                <link linkend="n811">CreateCxObj()</link>
                , defined
	in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .

   INPUTS
	id - the id to assign to the debug object, this value is output
	     whenever the debug object sends data to the serial port.

   RESULTS
	debugObj - a pointer to the debug object, or NULL if it could
		   not be created.

   SEE ALSO
	
                <link linkend="n811">commodities.library/CreateCxObj()</link>
                , 
                <link linkend="n503">CxSender()</link>
                , debug.lib/kprintf()

            </literallayout>
        </section>
        <section id="n502">
            <title>amiga.lib/CxFilter</title>
            <literallayout class="monospaced">
                   NAME
	CxFilter -- create a commodity filter object. (V36)

   SYNOPSIS
	filterObj = CxFilter(description);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *CxFilter(STRPTR)

   FUNCTION
	Creates an input event filter object that matches the
	'description' string. If 'description' is NULL, the filter will not
	match any messages.

	A filter may be modified by the functions 
                <link linkend="n830">SetFilter()</link>
                , using
	a description string, and 
                <link linkend="n831">SetFilterIX()</link>
                , which takes a
	binary 
                <link linkend="n103">Input</link>
                 Expression as a parameter.

	This function is a C-language macro for 
                <link linkend="n811">CreateCxObj()</link>
                , defined
	in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .

   INPUTS
	description - the description string in the same format as strings
		      expected by 
                <link linkend="n830">commodities.library/SetFilter()</link>
                   RESULTS
	filterObj - a pointer to the filter object, or NULL if there
		    was not enough memory. If there is a problem in the
		    description string, the internal error code of the filter
		    object will be set to so indicate. This error code may be
		    interrogated using the function 
                <link linkend="n816">CxObjError()</link>
                .

   SEE ALSO
	
                <link linkend="n811">commodities.library/CreateCxObj()</link>
                , 
                <link linkend="n830">commodities.library/SetFilter()</link>
                ,
	
                <link linkend="n831">commodities.library/SetFilterIX()</link>
                , 
                <link linkend="n816">commodities.library/CxObjError()</link>
                
            </literallayout>
        </section>
        <section id="n503">
            <title>amiga.lib/CxSender</title>
            <literallayout class="monospaced">
                   NAME
	CxSender -- create a commodity sender object. (V36)

   SYNOPSIS
	senderObj = CxSender(port,id)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *CxSender(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *,LONG);

   FUNCTION
	This function creates a Commodities sender object. The action
	of this object on receiving a Commodities message is to copy the
	Commodities message into a standard Exec 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                , to put the value
	'id' in the message as well, and to send the message off to the
	message port 'port'.

	The value 'id' is used so that an application can monitor
	messages from several senders at a single port. It can be retrieved
	from the Exec message by using the function 
                <link linkend="n814">CxMsgID()</link>
                . The value can
	be a simple integer ID, or a pointer to some application data
	structure.

	Note that Exec messages sent by sender objects arrive
	asynchronously at the destination port. Do not assume anything about
	the status of the Commodities message which was copied into the Exec
	message you received.

	All Exec messages sent to your ports must be replied. Messages may be
	replied after the sender object has been deleted.

	This function is a C-language macro for 
                <link linkend="n811">CreateCxObj()</link>
                , defined
	in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .

   INPUTS
	port - the port for the sender to send messages to
	id - the id of the messages sent by the sender

   RESULTS
	senderObj - a pointer to the sender object, or NULL if it could
		    not be created.

   SEE ALSO
	
                <link linkend="n811">commodities.library/CreateCxObj()</link>
                , 
                <link linkend="n814">commodities.library/CxMsgID()</link>
                ,
	
                <link linkend="n267">exec.library/PutMsg()</link>
                , 
                <link linkend="n282">exec.library/ReplyMsg()</link>
                
            </literallayout>
        </section>
        <section id="n504">
            <title>amiga.lib/CxSignal</title>
            <literallayout class="monospaced">
                   NAME
	CxSignal -- create a commodity signaller object. (V36)

   SYNOPSIS
	signalerObj = CxSignal(task,signal);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *CxSignal(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 *,LONG);

   FUNCTION
	This function creates a Commodities signal object. The action
	of this object on receiving a Commodities message is to
	send the 'signal' to the 'task'. The caller is responsible
	for allocating the signal and determining the proper task ID.

	Note that 'signal' is the signal value as returned by 
                <link linkend="n206">AllocSignal()</link>
                ,
	not the mask made from that value.

	This function is a C-language macro for 
                <link linkend="n811">CreateCxObj()</link>
                , defined
	in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .

   INPUTS
	task - the task for the signaller to signal
	signal - the signal bit number for the signaller to send

   RESULTS
	signallerObj - a pointer to the signaller object, or NULL if it could
		       not be created.

   SEE ALSO
	
                <link linkend="n811">commodities.library/CreateCxObj()</link>
                , 
                <link linkend="n240">exec.library/FindTask()</link>
                	
                <link linkend="n290">exec.library/Signal()</link>
                , 
                <link linkend="n206">exec.library/AllocSignal()</link>
                ,

            </literallayout>
        </section>
        <section id="n505">
            <title>amiga.lib/CxTranslate</title>
            <literallayout class="monospaced">
                   NAME
	CxTranslate -- create a commodity translator object. (V36)

   SYNOPSIS
	translatorObj = CxTranslate(ie);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *CxTranslate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 *);

   FUNCTION
	This function creates a Commodities 'translator' object.
	The action of this object on receiving a Commodities message is to
	replace that message in the commodities network with a chain of
	Commodities input messages.

	There is one new Commodities input message generated for each input
	event in the linked list starting at 'ie' (and NULL terminated). The
	routing information of the new input messages is copied from the input
	message they replace.

	The linked list of input events associated with a translator object
	can be changed using the 
                <link linkend="n832">SetTranslate()</link>
                 function.

	If 'ie' is NULL, the null translation occurs: that is, the original
	commodities input message is disposed, and no others are created to
	take its place.

	This function is a C-language macro for 
                <link linkend="n811">CreateCxObj()</link>
                , defined
	in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .

   INPUTS
	ie - the input event list used as replacement by the translator

   RESULTS
	translatorObj - a pointer to the translator object, or NULL if it could
		        not be created.

   SEE ALSO
	
                <link linkend="n811">commodities.library/CreateCxObj()</link>
                , 
                <link linkend="n832">commodities.library/SetTranslate()</link>
                
            </literallayout>
        </section>
        <section id="n506">
            <title>amiga.lib/dbf</title>
            <literallayout class="monospaced">   NAME
	dbf - convert FFP dual-binary number to FFP format

   SYNOPSIS
	fnum = dbf(exp, mant);

   FUNCTION
	Accepts a dual-binary format (described below) floating point
	number and converts it to an FFP format floating point number.
	The dual-binary format is defined as:

		exp bit  16	= sign (0=&gt;positive, 1=&gt;negative)
		exp bits 15-0	= binary integer representing the base
					  ten (10) exponent
		man		= binary integer mantissa

   INPUTS
	exp - binary integer representing sign and exponent
	mant - binary integer representing the mantissa

   RESULT
	fnum - converted FFP floating point format number

   BUGS
	None</literallayout>
        </section>
        <section id="n507">
            <title>amiga.lib/DeleteExtIO</title>
            <literallayout class="monospaced">
                   NAME
	DeleteExtIO - return memory allocated for extended IO request

   SYNOPSIS
	DeleteExtIO(ioReq);

	VOID DeleteExtIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 *);

   FUNCTION
	Frees up an IO request as allocated by 
                <link linkend="n496">CreateExtIO()</link>
                .

   INPUTS
	ioReq - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 block to be freed, or NULL.

   SEE ALSO
	
                <link linkend="n496">CreateExtIO()</link>
                
            </literallayout>
        </section>
        <section id="n508">
            <title>amiga.lib/DeletePort</title>
            <literallayout class="monospaced">
                   NAME
	DeletePort - free a message port created by 
                <link linkend="n497">CreatePort()</link>
                   SYNOPSIS
	DeletePort(port)

	VOID DeletePort(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *);

   FUNCTION
	Frees a message port created by 
                <link linkend="n497">CreatePort</link>
                . All messages that
	may have been attached to this port must have already been
	replied before this function is called.

   INPUTS
	port - message port to delete

   SEE ALSO
	
                <link linkend="n497">CreatePort()</link>
                
            </literallayout>
        </section>
        <section id="n509">
            <title>amiga.lib/DeleteStdIO</title>
            <literallayout class="monospaced">
                   NAME
	DeleteStdIO - return memory allocated for 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IOStdReq</ulink>
                   SYNOPSIS
	DeleteStdIO(ioReq);

	VOID DeleteStdIO(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IOStdReq</ulink>
                 *);

   FUNCTION
	Frees up an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IOStdReq</ulink>
                 as allocated by 
                <link linkend="n498">CreateStdIO()</link>
                .

   INPUTS
	ioReq - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 block to be freed, or NULL.

   SEE ALSO
	
                <link linkend="n498">CreateStdIO()</link>
                , 
                <link linkend="n507">DeleteExtIO()</link>
                , 
                <link linkend="n224">exec.library/CreateIORequest()</link>
                
            </literallayout>
        </section>
        <section id="n510">
            <title>amiga.lib/DeleteTask</title>
            <literallayout class="monospaced">
                   NAME
	DeleteTask -- delete a task created with 
                <link linkend="n499">CreateTask()</link>
                   SYNOPSIS
	DeleteTask(task)

	VOID DeleteTask(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/tasks.h">Task</ulink>
                 *);

   FUNCTION
	This function simply calls 
                <link linkend="n281">exec.library/RemTask()</link>
                , deleting a task
	from the Exec task lists and automatically freeing any stack and
	structure memory allocated for it by 
                <link linkend="n499">CreateTask()</link>
                .

	Before deleting a task, you must first make sure that the task is
	not currently executing any system code which might try to signal
	the task after it is gone.

	This can be accomplished by stopping all sources that might reference
	the doomed task, then causing the subtask to execute a Wait(0L).
	Another option is to have the task call 
                <link linkend="n281">DeleteTask()/RemTask()</link>
                 on
	itself.

   INPUTS
	task - task to remove from the system

   NOTE
	This function simply calls 
                <link linkend="n281">exec.library/RemTask()</link>
                , so you can call
	
                <link linkend="n281">RemTask()</link>
                 directly instead of calling this function.

   SEE ALSO
	
                <link linkend="n499">CreateTask()</link>
                , 
                <link linkend="n281">exec.library/RemTask()</link>
                
            </literallayout>
        </section>
        <section id="n511">
            <title>amiga.lib/DoMethod</title>
            <literallayout class="monospaced">
                   NAME
	DoMethod -- Perform method on object.

   SYNOPSIS
	result = DoMethod( obj, MethodID, ... )

	ULONG DoMethod( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, ULONG, ... );

   FUNCTION
	Boopsi support function that invokes the supplied message
	on the specified object.  The message is invoked on the
	object's true class.  Equivalent to 
                <link linkend="n512">DoMethodA()</link>
                , but allows
	you to build the message on the stack.

   INPUTS
	obj - pointer to boopsi object
	MethodID - which method to send (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">&lt;intuition/classusr.h&gt;</ulink>
                )
	... - method-specific message built on the stack

   RESULT
	result - specific to the message and the object's class.

   NOTES
	This function first appears in the V37 release of amiga.lib.
	While it intrinsically does not require any particular release
	of the system software to operate, it is designed to work with
	the boopsi subsystem of Intuition, which was only introduced
	in V36.

   SEE ALSO
	
                <link linkend="n512">DoMethodA()</link>
                , 
                <link linkend="n495">CoerceMethodA()</link>
                , 
                <link linkend="n514">DoSuperMethodA()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">&lt;intuition/classusr.h&gt;</ulink>
                	ROM Kernel Manual boopsi section

            </literallayout>
        </section>
        <section id="n512">
            <title>amiga.lib/DoMethodA</title>
            <literallayout class="monospaced">
                   NAME
	DoMethodA -- Perform method on object.

   SYNOPSIS
	result = DoMethodA( obj, msg )

	ULONG DoMethodA( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Msg</ulink>
                 );

   FUNCTION
	Boopsi support function that invokes the supplied message
	on the specified object.  The message is invoked on the
	object's true class.

   INPUTS
	obj - pointer to boopsi object
	msg - pointer to method-specific message to send

   RESULT
	result - specific to the message and the object's class.

   NOTES
	This function first appears in the V37 release of amiga.lib.
	While it intrinsically does not require any particular release
	of the system software to operate, it is designed to work with
	the boopsi subsystem of Intuition, which was only introduced
	in V36.
	Some early example code may refer to this function as DM().

   SEE ALSO
	
                <link linkend="n511">DoMethod()</link>
                , 
                <link linkend="n495">CoerceMethodA()</link>
                , 
                <link linkend="n514">DoSuperMethodA()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">&lt;intuition/classusr.h&gt;</ulink>
                	ROM Kernel Manual boopsi section

            </literallayout>
        </section>
        <section id="n513">
            <title>amiga.lib/DoSuperMethod</title>
            <literallayout class="monospaced">
                   NAME
	DoSuperMethod -- Perform method on object coerced to superclass.

   SYNOPSIS
	result = DoSuperMethod( cl, obj, MethodID, ... )

	ULONG DoSuperMethod( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, ULONG, ... );

   FUNCTION
	Boopsi support function that invokes the supplied message
	on the specified object, as though it were the superclass
	of the specified class.  Equivalent to 
                <link linkend="n514">DoSuperMethodA()</link>
                ,
	but allows you to build the message on the stack.

   INPUTS
	cl - pointer to boopsi class whose superclass is to
	    receive the message
	obj - pointer to boopsi object
	... - method-specific message built on the stack

   RESULT
	result - class and message-specific result.

   NOTES
	This function first appears in the V37 release of amiga.lib.
	While it intrinsically does not require any particular release
	of the system software to operate, it is designed to work with
	the boopsi subsystem of Intuition, which was only introduced
	in V36.

   SEE ALSO
	
                <link linkend="n495">CoerceMethodA()</link>
                , 
                <link linkend="n512">DoMethodA()</link>
                , 
                <link linkend="n514">DoSuperMethodA()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">&lt;intuition/classusr.h&gt;</ulink>
                	ROM Kernel Manual boopsi section

            </literallayout>
        </section>
        <section id="n514">
            <title>amiga.lib/DoSuperMethodA</title>
            <literallayout class="monospaced">
                   NAME
	DoSuperMethodA -- Perform method on object coerced to superclass.

   SYNOPSIS
	result = DoSuperMethodA( cl, obj, msg )

	ULONG DoSuperMethodA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Msg</ulink>
                 );

   FUNCTION
	Boopsi support function that invokes the supplied message
	on the specified object, as though it were the superclass
	of the specified class.

   INPUTS
	cl - pointer to boopsi class whose superclass is to
	    receive the message
	obj - pointer to boopsi object
	msg - pointer to method-specific message to send

   RESULT
	result - class and message-specific result.

   NOTES
	This function first appears in the V37 release of amiga.lib.
	While it intrinsically does not require any particular release
	of the system software to operate, it is designed to work with
	the boopsi subsystem of Intuition, which was only introduced
	in V36.
	Some early example code may refer to this function as DSM().

   SEE ALSO
	
                <link linkend="n495">CoerceMethodA()</link>
                , 
                <link linkend="n512">DoMethodA()</link>
                , 
                <link linkend="n513">DoSuperMethod()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">&lt;intuition/classusr.h&gt;</ulink>
                	ROM Kernel Manual boopsi section

            </literallayout>
        </section>
        <section id="n515">
            <title>amiga.lib/FastRand</title>
            <literallayout class="monospaced">
                   NAME
	FastRand - quickly generate a somewhat random integer

   SYNOPSIS
	number = FastRand(seed);

	ULONG FastRand(ULONG);

   FUNCTION
	Seed value is taken from stack, shifted left one position,
	exclusive-or'ed with hex value $1D872B41 and returned.

   INPUTS
	seed - a 32-bit integer

   RESULT
	number - new random seed, a 32-bit value

   SEE ALSO
	
                <link linkend="n528">RangeRand()</link>
                
            </literallayout>
        </section>
        <section id="n516">
            <title>amiga.lib/fpa</title>
            <literallayout class="monospaced">   NAME
	fpa - convert fast floating point into ASCII string equivalent

   SYNOPSIS
	exp = fpa(fnum, &amp;string[0]);

   FUNCTION
	Accepts an FFP number and the address of the ASCII string where it's
	converted output is to be stored.  The number is converted to a NULL
	terminated ASCII string in and stored at the address provided.
	Additionally, the base ten (10) exponent in binary form is returned.

   INPUTS
	fnum	   - Motorola Fast Floating Point number
	&amp;string[0] - address for output of converted ASCII character string
		     (16 bytes)

   RESULT
	&amp;string[0] - converted ASCII character string
	exp	   - integer exponent value in binary form

   BUGS
	None</literallayout>
        </section>
        <section id="n517">
            <title>amiga.lib/FreeIEvents</title>
            <literallayout class="monospaced">
                   NAME
	FreeIEvents -- free a chain of input events allocated by
		       
                <link linkend="n521">InvertString()</link>
                . (V36)

   SYNOPSIS
	FreeIEvents(events)

	VOID FreeIEvents(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 *);

   FUNCTION
	This function frees a linked list of input events as obtained from
	
                <link linkend="n521">InvertString()</link>
                .

   INPUTS
       events - the list of input events to free, may be NULL.

   SEE ALSO
	
                <link linkend="n521">InvertString()</link>
                
            </literallayout>
        </section>
        <section id="n518">
            <title>amiga.lib/GetRexxVar</title>
            <literallayout class="monospaced">
                   NAME
	GetRexxVar - Gets the value of a variable from a running ARexx program

   SYNOPSIS
	error = GetRexxVar(message,varname,bufpointer)
	D0,A1              A0      A1      (C-only)

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 GetRexxVar(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/rexx/storage.h">RexxMsg</ulink>
                 *,char *,char **);

   FUNCTION
	This function will attempt to extract the value of the symbol
	varname from the ARexx script that sent the message.  When called
	from C, a pointer to the extracted value will be placed in the
	pointer pointed to by bufpointer.  (*bufpointer will be the pointer
	to the value)

	When called from assembly, the pointer will be returned in A1.

	The value string returned *MUST* *NOT* be modified.

	While this function is new in the V37 amiga.lib, it is safe to
	call it in all versions of the operating system.  It is also
	PURE code, thus usable in resident/pure executables.

   NOTE
	This is a stub in amiga.lib.  It is only available via amiga.lib.
	The stub has two labels.  One, _GetRexxVar, takes the arguments
	from the stack.  The other, GetRexxVar, takes the arguments in
	registers.

	This routine does a 
                <link linkend="n493">CheckRexxMsg()</link>
                 on the message.

   EXAMPLE

	char	*value;

	/* 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 is one from ARexx */
	if (!GetRexxVar(rxmsg,"TheVar",&amp;value))
	{
		/* The value was gotten and now is pointed to by value */
		printf("Value of TheVar is %s\n",value);
	}

   INPUTS
	message		A message gotten from an ARexx script
	varname		The name of the variable to extract
	bufpointer	(For C only) A pointer to a string pointer.

   RESULTS
	error		0 for success, otherwise an error code.
			(Other codes may exists, these are documented)
			3  == Insufficient Storage
			9  == String too long
			10 == invalid message

	A1		(Assembly only)  Pointer to the string.

   SEE ALSO
	
                <link linkend="n530">SetRexxVar()</link>
                , 
                <link linkend="n493">CheckRexxMsg()</link>
                
            </literallayout>
        </section>
        <section id="n519">
            <title>amiga.lib/HookEntry</title>
            <literallayout class="monospaced">
                   NAME
	HookEntry -- Assembler to HLL conversion stub for hook entry.

   SYNOPSIS
	result = HookEntry( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 )
	D0                  A0             A2        A1

   FUNCTION
	By definition, a standard hook entry-point must receive the
	hook in A0, the object in A2, and the message in A1.  If your
	hook entry-point is written in a high-level language and is
	expecting its parameters on the stack, then HookEntry() will
	put the three parameters on the stack and invoke the function
	stored in the hook h_SubEntry field.

	This function is only useful to hook implementers, and is
	never called from C.

   INPUTS
	hook - pointer to hook being invoked
	object - pointer to hook-specific data
	msg - pointer to hook-specific message

   RESULT
	result - a hook-specific result.

   NOTES
	This function first appeared in the V37 release of amiga.lib.
	However, it does not depend on any particular version of the OS,
	and works fine even in V34.

   EXAMPLE
	If your hook dispatcher is this:

	dispatch( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hookPtr, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *obj, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 msg )
	{
	    ...
	}

	Then when you initialize your hook, you would say:

	myhook.h_Entry = HookEntry;	/* amiga.lib stub */
	myhook.h_SubEntry = dispatch;	/* HLL entry */

   SEE ALSO
	
                <link linkend="n491">CallHook()</link>
                , 
                <link linkend="n492">CallHookA()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">&lt;utility/hooks.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n520">
            <title>amiga.lib/HotKey</title>
            <literallayout class="monospaced">
                   NAME
	HotKey -- create a commodity triad. (V36)

   SYNOPSIS
	filterObj = Hotkey(description,port,id);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *HotKey(STRPTR,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *,LONG);

   FUNCTION
	This function creates a triad of commodity objects to accomplish a
	high-level function.

	The three objects are a filter, which is created to match by the call
	CxFilter(description), a sender created by the call CxSender(port,id),
	and a translator which is created by CxTranslate(NULL), so that it
	swallows any commodity input event messages that are passed down by
	the filter.

	This is the simple way to get a message sent to your program when the
	user performs a particular input action.

	It is strongly recommended that the ToolTypes environment be used to
	allow the user to specify the input descriptions for your application's
	hotkeys.

   INPUTS
	description - the description string to use for the filter in the same
		      format as accepted by 
                <link linkend="n830">commodities.library/SetFilter()</link>
                	port - port for the sender to send messages to.
	id - id of the messages sent by the sender

   RESULTS
	filterObj - a pointer to a filter object, or NULL if it could
		    not be created.

   SEE ALSO
	
                <link linkend="n502">CxFilter()</link>
                , 
                <link linkend="n503">CxSender()</link>
                , 
                <link linkend="n505">CxTranslate()</link>
                ,
	
                <link linkend="n816">commodities.library/CxObjError()</link>
                , 
                <link linkend="n830">commodities.library/SetFilter()</link>
                
            </literallayout>
        </section>
        <section id="n521">
            <title>amiga.lib/InvertString</title>
            <literallayout class="monospaced">
                   NAME
	InvertString -- produce input events that would generate the
			given string. (V36)

   SYNOPSIS
	events = InvertString(str,km)

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 *InvertString(STRPTR,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">KeyMap</ulink>
                 *);

   FUNCTION
	This function returns a linked list of input events which would
	translate into the string using the supplied keymap (or the system
	default keymap if 'km' is NULL).

	'str' is null-terminated and may contain:
	   - ANSI character codes
	   - backslash escaped characters:
		\n   -   CR
		\r   -   CR
		\t   -   TAB
		\0   -   illegal, do not use!
		\   -   backslash
	   - a text description of an input event as used by 
                <link linkend="n826">ParseIX()</link>
                ,
	     enclosed in angle brackets.

	An example is:
          abc&lt;alt f1&gt;\nhi there.

   INPUTS
	str - null-terminated string to convert to input events
	km - keymap to use for the conversion, or NULL to use the default
	     keymap.

   RESULTS
	events - a chain of input events, or NULL if there was a problem. The
		 most likely cause of failure is an illegal description
		 enclosed in angled brackets.

		 This chain should eventually be freed using 
                <link linkend="n517">FreeIEvents()</link>
                .

   SEE ALSO
	
                <link linkend="n826">commodities.library/ParseIX()</link>
                , 
                <link linkend="n517">FreeIEvents()</link>
                
            </literallayout>
        </section>
        <section id="n522">
            <title>amiga.lib/LibAllocPooled</title>
            <literallayout class="monospaced">
                    NAME
	LibAllocPooled -- 
                <link linkend="n202">Allocate</link>
                 memory with the pool manager (V33)

    SYNOPSIS
	memory=LibAllocPooled(poolHeader,memSize)
	d0                    a0         d0

	void *LibAllocPooled(void *,ULONG);

    FUNCTION
	This function is a copy of the pool functions in V39 and up of
	EXEC.  In fact, if you are running in V39, this function will
	notice and call the EXEC function.  This function works in
	V33 and up (1.2) Amiga system.

	The C code interface is _LibAllocPooled() and takes its arguments
	from the stack just like the C code interface for 
                <link linkend="n205">AllocPooled()</link>
                	in amiga.lib.  The assembly code interface is with the symbol
	_AsmAllocPooled: and takes the parameters in registers with the
	additional parameter of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 being in a6 which can be used
	from SAS/C 6 by a prototype of:

	void * __asm AsmAllocPooled(register __a0 void *,
	                            register __d0 ULONG,
	                            register __a6 struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 *);

	
                <link linkend="n202">Allocate</link>
                 memSize bytes of memory, and return a pointer. NULL is
	returned if the allocation fails.

	Doing a 
                <link linkend="n524">LibDeletePool()</link>
                 on the pool will free all of the puddles
	and thus all of the allocations done with LibAllocPooled() in that
	pool.  (No need to 
                <link linkend="n525">LibFreePooled()</link>
                 each allocation)

    INPUTS
	memSize - the number of bytes to allocate
	poolHeader - a specific private pool header.

    RESULT
	A pointer to the memory, or NULL.
	The memory block returned is long word aligned.

    NOTES
	The pool function do not protect an individual pool from
	multiple accesses.  The reason is that in most cases the pools
	will be used by a single task.  If your pool is going to
	be used by more than one task you must Semaphore protect
	the pool from having more than one task trying to allocate
	within the same pool at the same time.  Warning:  
                <link linkend="n241">Forbid()</link>
                	protection *will not work* in the future.  *Do NOT* assume
	that we will be able to make it work in the future.  LibAllocPooled()
	may well break a 
                <link linkend="n241">Forbid()</link>
                 and as such can only be protected
	by a semaphore.

	To track sizes yourself, the following code can be used:
	*Assumes a6=ExecBase*

	;
	; Function to do AllocVecPooled(Pool,memSize)
	;
	AllocVecPooled:	addq.l	#4,d0		; Get space for tracking
			move.l	d0,-(sp)	; Save the size
			jsr	LibAllocPooled	; Call pool...
			move.l	(sp)+,d1	; Get size back...
			tst.l	d0		; Check for error
			beq.s	avp_fail	; If NULL, failed!
			move.l	d0,a0		; Get pointer...
			move.l	d1,(a0)+	; Store size
			move.l	a0,d0		; Get result
	avp_fail:	rts			; return

	;
	; Function to do LibFreeVecPooled(pool,memory)
	;
	FreeVecPooled:	move.l	-(a1),d0	; Get size / ajust pointer
			jmp	
                <link linkend="n525">LibFreePooled</link>
                    SEE ALSO
	
                <link linkend="n244">FreePooled()</link>
                , 
                <link linkend="n226">CreatePool()</link>
                , 
                <link linkend="n231">DeletePool()</link>
                ,
	
                <link linkend="n525">LibFreePooled()</link>
                , 
                <link linkend="n523">LibCreatePool()</link>
                , 
                <link linkend="n524">LibDeletePool()</link>
                
            </literallayout>
        </section>
        <section id="n523">
            <title>amiga.lib/LibCreatePool</title>
            <literallayout class="monospaced">
                    NAME
	LibCreatePool -- Generate a private memory pool header (V33)

    SYNOPSIS
	newPool=LibCreatePool(memFlags,puddleSize,threshSize)
	a0                    d0       d1         d2

	void *LibCreatePool(ULONG,ULONG,ULONG);

    FUNCTION
	This function is a copy of the pool functions in V39 and up of
	EXEC.  In fact, if you are running in V39, this function will
	notice and call the EXEC function.  This function works in
	V33 and up (1.2) Amiga system.

	The C code interface is _LibCreatePool() and takes its arguments
	from the stack just like the C code interface for 
                <link linkend="n226">CreatePool()</link>
                	in amiga.lib.  The assembly code interface is with the symbol
	_AsmCreatePool: and takes the parameters in registers with the
	additional parameter of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 being in a6 which can be used
	from SAS/C 6 by a prototype of:

	void * __asm AsmCreatePool(register __d0 ULONG,
	                           register __d1 ULONG,
	                           register __d2 ULONG,
	                           register __a6 struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 *);

	
                <link linkend="n202">Allocate</link>
                 and prepare a new memory pool header.	Each pool is a
	separate tracking system for memory of a specific type.  Any number
	of pools may exist in the system.

	Pools automatically expand and shrink based on demand.	Fixed sized
	"puddles" are allocated by the pool manager when more total memory
	is needed.  Many small allocations can fit in a single puddle.
	Allocations larger than the threshSize are allocation in their own
	puddles.

	At any time individual allocations may be freed.  Or, the entire
	pool may be removed in a single step.

    INPUTS
	memFlags - a memory flags specifier, as taken by 
                <link linkend="n204">AllocMem</link>
                .
	puddleSize - the size of Puddles...
	threshSize - the largest allocation that goes into normal puddles
	             This *MUST* be less than or equal to puddleSize
	             (LibCreatePool() will fail if it is not)

    RESULT
	The address of a new pool header, or NULL for error.

    SEE ALSO
	
                <link linkend="n231">DeletePool()</link>
                , 
                <link linkend="n205">AllocPooled()</link>
                , 
                <link linkend="n244">FreePooled()</link>
                , exec/memory.i,
	
                <link linkend="n524">LibDeletePool()</link>
                , 
                <link linkend="n522">LibAllocPooled()</link>
                , 
                <link linkend="n525">LibFreePooled()</link>
                
            </literallayout>
        </section>
        <section id="n524">
            <title>amiga.lib/LibDeletePool</title>
            <literallayout class="monospaced">
                    NAME
	LibDeletePool --  Drain an entire memory pool (V33)

    SYNOPSIS
	LibDeletePool(poolHeader)
	              a0

	void LibDeletePool(void *);

    FUNCTION
	This function is a copy of the pool functions in V39 and up of
	EXEC.  In fact, if you are running in V39, this function will
	notice and call the EXEC function.  This function works in
	V33 and up (1.2) Amiga system.

	The C code interface is _LibDeletePool() and takes its arguments
	from the stack just like the C code interface for 
                <link linkend="n231">DeletePool()</link>
                	in amiga.lib.  The assembly code interface is with the symbol
	_AsmDeletePool: and takes the parameters in registers with the
	additional parameter of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 being in a6 which can be used
	from SAS/C 6 by a prototype of:

	void __asm AsmDeletePool(register __a0 void *,
	                         register __a6 struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 *);

	Frees all memory in all puddles of the specified pool header, then
	deletes the pool header.  Individual free calls are not needed.

    INPUTS
	poolHeader - as returned by 
                <link linkend="n523">LibCreatePool()</link>
                .

    SEE ALSO
	
                <link linkend="n226">CreatePool()</link>
                , 
                <link linkend="n205">AllocPooled()</link>
                , 
                <link linkend="n244">FreePooled()</link>
                ,
	
                <link linkend="n523">LibCreatePool()</link>
                , 
                <link linkend="n522">LibAllocPooled()</link>
                , 
                <link linkend="n525">LibFreePooled()</link>
                
            </literallayout>
        </section>
        <section id="n525">
            <title>amiga.lib/LibFreePooled</title>
            <literallayout class="monospaced">
                    NAME
	LibFreePooled -- Free pooled memory  (V33)

    SYNOPSIS
	LibFreePooled(poolHeader,memory,memSize)
		      a0         a1     d0

	void LibFreePooled(void *,void *,ULONG);

    FUNCTION
	This function is a copy of the pool functions in V39 and up of
	EXEC.  In fact, if you are running in V39, this function will
	notice and call the EXEC function.  This function works in
	V33 and up (1.2) Amiga system.

	The C code interface is _LibFreePooled() and takes its arguments
	from the stack just like the C code interface for 
                <link linkend="n244">FreePooled()</link>
                	in amiga.lib.  The assembly code interface is with the symbol
	_AsmFreePooled: and takes the parameters in registers with the
	additional parameter of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 being in a6 which can be used
	from SAS/C 6 by a prototype of:

	void __asm AsmFreePooled(register __a0 void *,
	                         register __a1 void *,
	                         register __d0 ULONG,
	                         register __a6 struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 *);

	Deallocates memory allocated by 
                <link linkend="n522">LibAllocPooled()</link>
                .  The size of the
	allocation *MUST* match the size given to 
                <link linkend="n522">LibAllocPooled()</link>
                .
	The reason the pool functions do not track individual allocation
	sizes is because many of the uses of pools have small allocation
	sizes and the tracking of the size would be a large overhead.

	Only memory allocated by 
                <link linkend="n522">LibAllocPooled()</link>
                 may be freed with this
	function!

	Doing a 
                <link linkend="n524">LibDeletePool()</link>
                 on the pool will free all of the puddles
	and thus all of the allocations done with 
                <link linkend="n522">LibAllocPooled()</link>
                 in that
	pool.  (No need to LibFreePooled() each allocation)

    INPUTS
	memory - pointer to memory allocated by 
                <link linkend="n205">AllocPooled</link>
                .
	poolHeader - a specific private pool header.

    NOTES
	The pool function do not protect an individual pool from
	multiple accesses.  The reason is that in most cases the pools
	will be used by a single task.  If your pool is going to
	be used by more than one task you must Semaphore protect
	the pool from having more than one task trying to allocate
	within the same pool at the same time.  Warning:  
                <link linkend="n241">Forbid()</link>
                	protection *will not work* in the future.  *Do NOT* assume
	that we will be able to make it work in the future.  LibFreePooled()
	may well break a 
                <link linkend="n241">Forbid()</link>
                 and as such can only be protected
	by a semaphore.

	To track sizes yourself, the following code can be used:
	*Assumes a6=ExecBase*

	;
	; Function to do AllocVecPooled(Pool,memSize)
	;
	AllocVecPooled:	addq.l	#4,d0		; Get space for tracking
			move.l	d0,-(sp)	; Save the size
			jsr	
                <link linkend="n522">LibAllocPooled</link>
                	; Call pool...
			move.l	(sp)+,d1	; Get size back...
			tst.l	d0		; Check for error
			beq.s	avp_fail	; If NULL, failed!
			move.l	d0,a0		; Get pointer...
			move.l	d1,(a0)+	; Store size
			move.l	a0,d0		; Get result
	avp_fail:	rts			; return

	;
	; Function to do LibFreeVecPooled(pool,memory)
	;
	FreeVecPooled:	move.l	-(a1),d0	; Get size / ajust pointer
			jmp	LibFreePooled

    SEE ALSO
	
                <link linkend="n205">AllocPooled()</link>
                , 
                <link linkend="n226">CreatePool()</link>
                , 
                <link linkend="n231">DeletePool()</link>
                ,
	
                <link linkend="n522">LibAllocPooled()</link>
                , 
                <link linkend="n523">LibCreatePool()</link>
                , 
                <link linkend="n524">LibDeletePool()</link>
                
            </literallayout>
        </section>
        <section id="n526">
            <title>amiga.lib/NewList</title>
            <literallayout class="monospaced">
                   NAME
	NewList -- prepare a list structure for use

   SYNOPSIS
	NewList(list)

	VOID NewList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *);
	VOID NewList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">MinList</ulink>
                 *);

   FUNCTION
	Perform the magic needed to prepare a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 header structure for
	use; the list will be empty and ready to use.  (If the list is the
	full featured type, you may need to initialize lh_Type afterwards)

	Assembly programmers may want to use the NEWLIST macro instead.

   INPUTS
	list - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">MinList</ulink>
                .

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">&lt;exec/lists.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n527">
            <title>amiga.lib/printf</title>
            <literallayout class="monospaced">
                   NAME
	printf - print a formatted output line to the standard output.

   SYNOPSIS
	printf(formatstring [,value [,values] ] );

   FUNCTION
	
                <link linkend="n83">Format</link>
                 the output in accordance with specifications in the format
	string.

   INPUTS
	formatString - a C-language-like NULL-terminated format string,
		       with the following supported % options:

	  %[flags][width][.limit][length]type

	    $     - must follow the arg_pos value, if specified
	  flags   - only one allowed. '-' specifies left justification.
	  width   - field width. If the first character is a '0', the
	            field is padded with leading 0s.
	    .     - must precede the field width value, if specified
	  limit   - maximum number of characters to output from a string.
	            (only valid for %s or %b).
	  length  - size of input data defaults to word (16-bit) for types c,
		    d, u and x, 'l' changes this to long (32-bit).
	  type    - supported types are:
	                  b - BSTR, data is 32-bit 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 to byte count followed
	                      by a byte string. A NULL 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 is treated as an
			      empty string. (V36)
	                  d - signed decimal
			  u - unsigned decimal
	                  x - hexadecimal with hex digits in uppercase
			  X - hexadecimal with hex digits in lowercase
	                  s - string, a 32-bit pointer to a NULL-terminated
	                      byte string. A NULL pointer is treated
	                      as an empty string.
	                  c - character

	value(s) - numeric variables or addresses of null-terminated strings
	           to be added to the format information.

   NOTE
	The global "_stdout" must be defined, and contain a pointer to
	a legal AmigaDOS file handle. Using the standard Amiga startup
	module sets this up. In other cases you will need to define
	stdout, and assign it to some reasonable value (like what the
	
                <link linkend="n128">dos.library/Output()</link>
                 call returns). This code would set it up:

		ULONG stdout;
		stdout=Output();

   BUGS
	This function will crash if the resulting stream after
	parameter substitution is longer than 140 bytes.

            </literallayout>
        </section>
        <section id="n528">
            <title>amiga.lib/RangeRand</title>
            <literallayout class="monospaced">
                   NAME
	RangeRand - generate a random number within a specific integer range

   SYNOPSIS
	number = RangeRand(maxValue);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 RangeRand(UWORD);

   FUNCTION
	RangeRand() accepts a value from 0 to 65535, and returns a value
	within that range.

	maxValue is passed on stack as a 32-bit integer but used as though
	it is only a 16-bit integer. Variable named RangeSeed is available
	beginning with V33 that contains the global seed value passed from
	call to call and thus can be changed in a program by declaring:

	  extern ULONG RangeSeed;

   INPUTS
	maxValue - the returned random number will be in the range
	           [0..maxValue-1]

   RESULT
	number - pseudo random number in the range of [0..maxValue-1].

   SEE ALSO
	
                <link linkend="n515">FastRand()</link>
                
            </literallayout>
        </section>
        <section id="n529">
            <title>amiga.lib/RemTOF</title>
            <literallayout class="monospaced">
                   NAME
	RemTOF - remove a task from the VBlank interrupt server chain.

   SYNOPSIS
	RemTOF(i);

	VOID RemTOF(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/graphint.h">Isrvstr</ulink>
                 *);

   FUNCTION
	Removes a task from the vertical-blanking interval interrupt server
	chain.

   INPUTS
	i - pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/graphint.h">Isrvstr</ulink>
                 structure

   SEE ALSO
	
                <link linkend="n483">AddTOF()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/graphint.h">&lt;graphics/graphint.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n530">
            <title>amiga.lib/SetRexxVar</title>
            <literallayout class="monospaced">
                   NAME
	SetRexxVar - Sets the value of a variable of a running ARexx program

   SYNOPSIS
	error = SetRexxVar(message,varname,value,length)
	D0                 A0      A1      D0    D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SetRexxVar(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/rexx/storage.h">RexxMsg</ulink>
                 *,char *,char *,ULONG);

   FUNCTION
	This function will attempt to the the value of the symbol
	varname in the ARexx script that sent the message.

	While this function is new in the V37 amiga.lib, it is safe to
	call it in all versions of the operating system.  It is also
	PURE code, thus usable in resident/pure executables.

   NOTE
	This is a stub in amiga.lib.  It is only available via amiga.lib.
	The stub has two labels.  One, _SetRexxVar, takes the arguments
	from the stack.  The other, SetRexxVar, takes the arguments in
	registers.

	This routine does a 
                <link linkend="n493">CheckRexxMsg()</link>
                 on the message.

   EXAMPLE

	char	*value;

	/* 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 is one from ARexx */
	if (!SetRexxVar(rxmsg,"TheVar","25 Dollars",10))
	{
		/* The value of TheVar will now be "25 Dollars" */
	}

   INPUTS
	message		A message gotten from an ARexx script
	varname		The name of the variable to set
	value		A string that will be the new value of the variable
	length		The length of the value string


   RESULTS
	error		0 for success, otherwise an error code.
			(Other codes may exists, these are documented)
			3  == Insufficient Storage
			9  == String too long
			10 == invalid message

   SEE ALSO
	SetRexxVar(), 
                <link linkend="n493">CheckRexxMsg()</link>
                
            </literallayout>
        </section>
        <section id="n531">
            <title>amiga.lib/SetSuperAttrs</title>
            <literallayout class="monospaced">
                   NAME
	SetSuperAttrs -- Invoke OM_SET method on superclass with varargs.

   SYNOPSIS
	result = SetSuperAttrs( cl, obj, tag, ... )

	ULONG SetSuperAttrs( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classes.h">IClass</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">Object</ulink>
                 *, ULONG, ... );

   FUNCTION
	Boopsi support function which invokes the OM_SET method on the
	superclass of the supplied class for the supplied object.  Allows
	the ops_AttrList to be supplied on the stack (i.e. in a varargs
	way).  The equivalent non-varargs function would simply be

	    DoSuperMethod( cl, obj, OM_SET, taglist, NULL );

   INPUTS
	cl - pointer to boopsi class whose superclass is to
	    receive the OM_SET message
	obj - pointer to boopsi object
	tag - list of tag-attribute pairs, ending in TAG_DONE

   RESULT
	result - class and message-specific result.

   NOTES
	This function first appears in the V37 release of amiga.lib.
	While it intrinsically does not require any particular release
	of the system software to operate, it is designed to work with
	the boopsi subsystem of Intuition, which was only introduced
	in V36.

   SEE ALSO
	
                <link linkend="n495">CoerceMethodA()</link>
                , 
                <link linkend="n512">DoMethodA()</link>
                , 
                <link linkend="n514">DoSuperMethodA()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/classusr.h">&lt;intuition/classusr.h&gt;</ulink>
                	ROM Kernel Manual boopsi section

            </literallayout>
        </section>
        <section id="n532">
            <title>amiga.lib/sprintf</title>
            <literallayout class="monospaced">
                   NAME
	sprintf - format a C-like string into a string buffer.

   SYNOPSIS
	sprintf(destination formatstring [,value [, values] ] );

   FUNCTION
	Performs string formatting identical to 
                <link linkend="n527">printf</link>
                , but directs the output
	into a specific destination in memory. This uses the ROM version
	of 
                <link linkend="n527">printf</link>
                 
                <link linkend="n268">(exec.library/RawDoFmt()</link>
                ), so it is very small.

	Assembly programmers can call this by placing values on the
	stack, followed by a pointer to the formatstring, followed
	by a pointer to the destination string.

   INPUTS
	destination - the address of an area in memory into which the
		      formatted output is to be placed.
	formatstring - pointer to a null terminated string describing the
	               desired output formatting (see 
                <link linkend="n527">printf()</link>
                 for a
		       description of this string).
	value(s) - numeric information to be formatted into the output
		   stream.

   SEE ALSO
	 
                <link linkend="n527">printf()</link>
                , 
                <link linkend="n268">exec.library/RawDoFmt()</link>
                
            </literallayout>
        </section>
        <section id="n533">
            <title>amiga.lib/stdio</title>
            <literallayout class="monospaced">
                   NAMES
	fclose	- close a file
	fgetc	- get a character from a file
	fprintf	- format data to file (see 
                <link linkend="n527">printf()</link>
                )
	fputc	- put character to file
	fputs	- write string to file
	getchar	- get a character from stdin
	
                <link linkend="n527">printf</link>
                	- put format data to stdout (see exec.library/RawDoFmt)
	putchar	- put character to stdout
	puts	- put string to stdout, followed by newline

   FUNCTION
	These functions work much like the standard C functions of the same
	names. The file I/O functions all use non-buffered AmigaDOS
	files, and must not be mixed with the file I/O of any C
	compiler. The names of these functions match those found in many
	standard C libraries, when a name conflict occurs, the function is
	generally taken from the FIRST library that was specified on the
	linker's command line.  Thus to use these functions, specify
	the amiga.lib library first.

	To get a suitable AmigaDOS 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">FileHandle</ulink>
                , the 
                <link linkend="n126">dos.library/Open()</link>
                 or
	
                <link linkend="n128">dos.library/Output()</link>
                 functions must be used.

	All of the functions that write to stdout expect an appropriate
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">FileHandle</ulink>
                 to have been set up ahead of time. Depending on
	your C compiler and options, this may have been done by the
	startup code.  Or it can be done manually

	From C:
		extern ULONG stdout;
		/* 
                <link linkend="n276">Remove</link>
                 the extern if startup code did not define stdout */
		stdout=Output();

	From assembly:
		XDEF	_stdout
		DC.L	_stdout	;&lt;- Place result of 
                <link linkend="n128">dos.library/Output()</link>
                 here.

            </literallayout>
        </section>
        <section id="n534">
            <title>amiga.lib/TimeDelay</title>
            <literallayout class="monospaced">
                   NAME
	TimeDelay -- Return after a period of time has elapsed.

   SYNOPSIS
	Error = TimeDelay( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Unit</ulink>
                , Seconds, MicroSeconds )
	D0                 D0    D1       D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 TimeDelay( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , ULONG, ULONG );

   FUNCTION
	Waits for the period of time specified before returning to the
	the caller.

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Unit</ulink>
                 -- timer.device unit to open for this command.
	Seconds -- The seconds field of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                 is filled with
	    this value. Check the documentation for what a particular
	    timer.device unit expects there.
	MicroSeconds -- The microseconds field of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                 is
	    filled with this value. Check the documentation for what
	    a particular timer.device units expects there.

   RESULTS
	Error -- will be zero if all went well; otherwise, non-zero.

   NOTES
	Two likely reasons for failures are invalid unit numbers or
	no more free signal bits for this task.

	While this function first appears in V37 amiga.lib, it works
	on Kickstart V33 and higher.

   SEE ALSO
	
                <link linkend="n543">timer.device/TR_ADDREQUEST</link>
                ,
	timer.device/TR_WAITUNTIL,
	timer.device/WaitUnitl()

   BUGS

            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>timer</title>
        <section id="n535">
            <title>timer.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n536"> --background-- </link>
                    
                <link linkend="n537"> AbortIO() </link>
                    
                <link linkend="n538"> AddTime() </link>
                    
                <link linkend="n539"> CmpTime() </link>
                    
                <link linkend="n540"> GetSysTime() </link>
                    
                <link linkend="n541"> ReadEClock() </link>
                    
                <link linkend="n542"> SubTime() </link>
                    
                <link linkend="n543"> TR_ADDREQUEST </link>
                    
                <link linkend="n544"> TR_GETSYSTIME </link>
                    
                <link linkend="n545"> TR_SETSYSTIME </link>
            </literallayout>
        </section>
        <section id="n536">
            <title>timer.device/--background--</title>
            <literallayout class="monospaced">
                   TIMER REQUEST
	A time request is a non standard IO 
                <link linkend="n407">Request</link>
                .  It has an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                	followed by a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure or an eclockval structure.

   TIMEVAL
	A 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure consists of two longwords.  The first is
	the number of seconds, the latter is the fractional number
	of microseconds.  The microseconds must always be "normalized"
	e.g. the longword must be between 0 and one million.

   ECLOCKVAL
	A eclockval structure consists of two longwords.  The first is
	the high order 32 bits of a 64 bit number and the second is the
	the low order 32 bits.  The 64 bit number is a count of "E" clock
	ticks.  The "E" clock frequency is related to the master clock
	frequency of the machine and can be determined by calling the
	
                <link linkend="n541">ReadEClock()</link>
                 library like call.

   UNITS
	The timer contains five units -- two designed to accuratly measure
	short intervals, one that has little system overhead and is very
	stable over time, and two that work like an alarm clock.

   UNIT_MICROHZ
	This unit uses the programmable timers in the 8520s to keep track
	of its time.  It has precision down to about 2 microseconds, but
	will drift as system load increases.  The accuracy of this unit
	is the same as that of the master clock of the machine.  This unit
	uses a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 in its 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                .

   UNIT_VBLANK
	This unit uses a strobe from the power supply to keep track of its
	time or the "E" clock on machines without power supply strobes.
	It is very stable over time, but only has a resolution of that of
	the vertical blank interrupt.  This unit is very cheap to use, and
	should be used by those who are waiting for long periods of time
	(typically 1/2 second or more).  This unit uses a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 in its
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                .

   UNIT_ECLOCK
	This unit is exacly the same as UNIT_MICROHZ except that it uses
	an eclockval instead of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 in its 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                .

   UNIT_WAITUNTIL
	This unit waits until the systime is greater than or equal to the
	time in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                .  This unit has the same
	resolution and accuracy as that of UNIT_VBLANK.

   UNIT_WAITECLOCK
	This unit waits until the E-Clock value as returned by 
                <link linkend="n541">ReadEClock()</link>
                	is greater than or equal to the eclockval in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                . This
	unit has the same resolution and accuracy as that of UNIT_ECLOCK.

   LIBRARY
	In addition to the normal device calls, the timer also supports
	several direct, library like calls.

   BUGS
	In the V1.2/V1.3 release, the timer device has problems with
	very short time requests.  When one of these is made, other
	timer requests may be finished inaccurately.  A side effect
	is that AmigaDOS requests such as "Delay(0);" or
	"WaitForChar(x,0);" are unreliable.

            </literallayout>
        </section>
        <section id="n537">
            <title>timer.device/AbortIO</title>
            <literallayout class="monospaced">
                   NAME
	AbortIO -- 
                <link linkend="n276">Remove</link>
                 an existing timer request.

   SYNOPSIS
	error = AbortIO( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                 )
	D0               A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AbortIO( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                 * );

   FUNCTION
	This is an exec.library call.

	This routine removes a timerquest from the timer.  It runs in
	the context of the caller.

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                 - the timer request to be aborted

   RETURNS
	0  if the request was aborted, io_Error will also be set to
	    IOERR_ABORTED.
	-1 otherwise

   NOTES
	This function may be called from interrupts.

   SEE ALSO
	exec.library/AbortIO()

   BUGS

            </literallayout>
        </section>
        <section id="n538">
            <title>timer.device/AddTime</title>
            <literallayout class="monospaced">
                   NAME
	AddTime -- Add one time request to another.

   SYNOPSIS
	AddTime( Dest, Source )
	         A0    A1

	void AddTime( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 *);

   FUNCTION
	This routine adds one 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure to another.  The
	results are stored in the destination (Dest + Source -&gt; Dest)

	A0 and A1 will be left unchanged

   INPUTS
	Dest, Source -- pointers to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structures.

   NOTES
	This function may be called from interrupts.

   SEE ALSO
	
                <link linkend="n539">timer.device/CmpTime()</link>
                ,
	
                <link linkend="n542">timer.device/SubTime()</link>
                   BUGS

            </literallayout>
        </section>
        <section id="n539">
            <title>timer.device/CmpTime</title>
            <literallayout class="monospaced">
                   NAME
	CmpTime -- Compare two 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structures.

   SYNOPSIS
	result = CmpTime( Dest, Source )
	D0                A0    A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 CmpTime( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 *);

   FUNCTION
	This routine compares 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structures

	A0 and A1 will be left unchanged

   INPUTS
	Dest, Source -- pointers to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structures.

   RESULTS
	result will be   0 if Dest has same time as source
	                -1 if Dest has more time than source
	                +1 if Dest has less time than source

   NOTES
	This function may be called from interrupts.

   SEE ALSO
	
                <link linkend="n538">timer.device/AddTime()</link>
                ,
	
                <link linkend="n542">timer.device/SubTime()</link>
                   BUGS
	Older version of this document had the sense of the return
	codes wrong; the code hasn't changed but the document has.

            </literallayout>
        </section>
        <section id="n540">
            <title>timer.device/GetSysTime</title>
            <literallayout class="monospaced">
                   NAME
	GetSysTime -- Get the system time. (V36)

   SYNOPSIS
	GetSysTime( Dest )
	            A0

	void GetSysTime( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 * );

   FUNCTION
	Ask the system what time it is.  The system time starts off at
	zero at power on, but may be initialized via the 
                <link linkend="n545">TR_SETSYSTIME</link>
                	timer.device command.

	System time is monotonocally increasing and guarenteed to be
	unique (except when the system time is set back).

	A0 will be left unchanged.

	This function is less expensive to use than the 
                <link linkend="n544">TR_GETSYSTIME</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                .

   INPUTS
	Dest -- pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure to hold the system time.

   RESULTS
	Dest -- the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure will contain the system time.

   NOTES
	This function may be called from interrupts.

   SEE ALSO
	
                <link linkend="n544">timer.device/TR_GETSYSTIME</link>
                ,
	
                <link linkend="n545">timer.device/TR_SETSYSTIME</link>
                ,

   BUGS

            </literallayout>
        </section>
        <section id="n541">
            <title>timer.device/ReadEClock</title>
            <literallayout class="monospaced">
                   NAME
	ReadEClock -- Get the current value of the E-Clock. (V36)

   SYNOPSIS
	E_Freq = ReadEClock( Dest )
	D0                   A0

	ULONG ReadEClock ( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">EClockVal</ulink>
                 * );

   FUNCTION
	This routine calculates the current 64 bit value of the E-Clock
	and stores it in the destination 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">EClockVal</ulink>
                 structure. The count
	rate of the E-Clock is also returned.

	A0 will be left unchanged

	This is a low overhead function designed so that very short
	intervals may be timed.

   INPUTS
	Dest -- pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">EClockVal</ulink>
                 structure.

   RETURNS
	Dest -- the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">EClockVal</ulink>
                 structure will contain the E-Clock time
	E_Freq -- The count rate of the E-Clock (tics/sec).

   NOTES
	This function may be called from interrupts.

   SEE ALSO

   BUGS

            </literallayout>
        </section>
        <section id="n542">
            <title>timer.device/SubTime</title>
            <literallayout class="monospaced">
                   NAME
	SubTime -- Subtract one time request from another.

   SYNOPSIS
	SubTime( Dest, Source )
	         A0    A1

	void SubTime( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 *);

   FUNCTION
	This routine subtracts one 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure from another.  The
	results are stored in the destination (Dest - Source -&gt; Dest)

	A0 and A1 will be left unchanged

   INPUTS
	Dest, Source -- pointers to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structures.

   NOTES
	This function may be called from interrupts.

   SEE ALSO
	
                <link linkend="n538">timer.device/AddTime()</link>
                ,
	
                <link linkend="n539">timer.device/CmpTime()</link>
                   BUGS

            </literallayout>
        </section>
        <section id="n543">
            <title>timer.device/TR_ADDREQUEST</title>
            <literallayout class="monospaced">
                   NAME
	TR_ADDREQUEST -- Submit a request to wait a period of time.

   FUNCTION
	Ask the timer to wait a specified amount of time before
	replying the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                .

	The message may be forced to finish early with an
	
                <link linkend="n300">AbortIO()/WaitIO()</link>
                 pair.

   TIMER REQUEST
	io_Message      mn_ReplyPort initialized
	io_Device       preset by timer in 
                <link linkend="n557">OpenDevice</link>
                	io_Unit         preset by timer in 
                <link linkend="n557">OpenDevice</link>
                	io_Command      TR_ADDREQUEST
	io_Flags        IOF_QUICK permitted (but ignored)
	tr_time         a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure specifying how long the
	                    device will wait before replying

   RESULTS
	tr_time         will be zeroed

   NOTES
	This function may be called from interrupts.

	Previous to 2.0, the tr_time field was documented as containing
	junk when the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timerequest</ulink>
                 was returned.

   SEE ALSO
	
                <link linkend="n537">timer.device/AbortIO()</link>
                ,
	
                <link linkend="n534">timer.device/TimeDelay()</link>
                ,

   BUGS

            </literallayout>
        </section>
        <section id="n544">
            <title>timer.device/TR_GETSYSTIME</title>
            <literallayout class="monospaced">
                   NAME
	TR_GETSYSTIME -- get the system time.

   FUNCTION
	Ask the system what time it is.  The system time starts off at
	zero at power on, but may be initialized via the 
                <link linkend="n545">TR_SETSYSTIME</link>
                	call.

	System time is monotonically increasing, and guaranteed to be
	unique (except when the system time is set backwards).

   TIMER REQUEST
	io_Message      mn_ReplyPort initialized
	io_Device       preset by timer in 
                <link linkend="n557">OpenDevice</link>
                	io_Unit         preset by timer in 
                <link linkend="n557">OpenDevice</link>
                	io_Command      TR_GETSYSTIME
	io_Flags        IOF_QUICK permitted

   RESULTS
	tr_time         a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure with the current system
	                    time

   NOTES
	This function may be called from interrupts.

   SEE ALSO
	
                <link linkend="n545">timer.device/TR_SETSYSTIME</link>
                ,
	
                <link linkend="n540">timer.device/GetSysTime()</link>
                ,

   BUGS

            </literallayout>
        </section>
        <section id="n545">
            <title>timer.device/TR_SETSYSTIME</title>
            <literallayout class="monospaced">
                   NAME
	TR_SETSYSTIME -- Set the system time.

   FUNCTION
	Set the system idea of what time it is.  The system starts out
	at time "zero" so it is safe to set it forward to the real
	time.  However, care should be taken when setting the time
	backwards.  System time is generally expected to monotonically
	increasing.

   TIMER REQUEST
	io_Message      mn_ReplyPort initialized
	io_Device       preset by timer in 
                <link linkend="n557">OpenDevice</link>
                	io_Unit         preset by timer in 
                <link linkend="n557">OpenDevice</link>
                	io_Command      
                <link linkend="n544">TR_GETSYSTIME</link>
                	io_Flags        IOF_QUICK permitted
	tr_time         a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/timer.h">timeval</ulink>
                 structure with the current system
	                    time

   RESULTS
	tr_time         will contain junk

   NOTES
	This function may be called from interrupts.

   SEE ALSO
	
                <link linkend="n544">timer.device/TR_GETSYSTIME</link>
                ,
	
                <link linkend="n540">timer.device/GetSysTime()</link>
                ,

   BUGS

            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>serial</title>
        <section id="n546">
            <title>serial.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n547"> AbortIO() </link>
                    
                <link linkend="n548"> BeginIO() </link>
                    
                <link linkend="n549"> CloseDevice() </link>
                    
                <link linkend="n550"> CMD_CLEAR </link>
                    
                <link linkend="n551"> CMD_FLUSH </link>
                    
                <link linkend="n552"> CMD_READ </link>
                    
                <link linkend="n553"> CMD_RESET </link>
                    
                <link linkend="n554"> CMD_START </link>
                    
                <link linkend="n555"> CMD_STOP </link>
                    
                <link linkend="n556"> CMD_WRITE </link>
                    
                <link linkend="n557"> OpenDevice() </link>
                    
                <link linkend="n558"> SDCMD_BREAK </link>
                    
                <link linkend="n559"> SDCMD_QUERY </link>
                    
                <link linkend="n560"> SDCMD_SETPARAMS </link>
            </literallayout>
        </section>
        <section id="n547">
            <title>serial.device/AbortIO</title>
            <literallayout class="monospaced">
                   NAME
       AbortIO(ioRequest) -- abort an I/O request
               A1

   FUNCTION
      This is an exec.library call.

      This function attempts to aborts a specified read or write request.
      If the request is active, it is stopped immediately. If the request is
      queued, it is painlessly removed.  The request will be returned
      in the same way any completed request it.

      After AbortIO(), you must generally do a 
                <link linkend="n300">WaitIO()</link>
                .

   INPUTS
      iORequest  -- pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 Block that is to be aborted.

   RESULTS
       io_Error -- if the Abort succeded, then io_Error will be #IOERR_ABORTED

           (-2) and the request will be flagged as aborted (bit 5 of
           io_Flags is set).  If the Abort failed, then the Error will be zero.

   BUGS
       Previous to version 34, the serial.device would often hang when
       aborting CTS/RTS handshake requests.  This was the cause of the
       incorrect assumption that AbortIO() does not need to be followed
       by a wait for a reply (or a WaitIO()).

            </literallayout>
        </section>
        <section id="n548">
            <title>serial.device/BeginIO</title>
            <literallayout class="monospaced">
                   NAME
       BeginIO(ioRequest),deviceNode -- start up an I/O process
                A1        A6
   FUNCTION
       This is a direct function call to the device.  It is intended for
       more advanced programmers.  See exec's 
                <link linkend="n233">DoIO()</link>
                 and 
                <link linkend="n283">SendIO()</link>
                 for
       the normal method of calling devices.

       This function initiates a I/O request made to the serial
       device. Other than read or write, the functions are performed
       synchronously, and do not depend on any interrupt handling
       logic (or it's associated discontinuities), and hence should
       be performed as IO_QUICK.
       With some exceptions, reads and writes are merely initiated by
       BeginIO, and thusly return to the caller as begun, not completed.
       Completion is signalled via the standard 
                <link linkend="n282">ReplyMsg</link>
                 routine.
       Multiple requests are handled via FIFO queueing.
       One exception to this non-QUICK handling of reads and writes
       is for READS when:
         - IO_QUICK bit is set
         - There are no pending read requests
         - There is already enough data in the input buffer to satisfy
           this I/O 
                <link linkend="n407">Request</link>
                 immediately.
       In this case, the IO_QUICK flag is not cleared, and the request
       is completed by the time it returns to the caller. There is no
       
                <link linkend="n282">ReplyMsg</link>
                 or signal bit activity in this case.

   INPUTS
       ioRequest  -- pointer to an I/O 
                <link linkend="n407">Request</link>
                 Block of size
           io_ExtSerSize (see serial.i for size/definition),
           containing a valid command in io_Command to process,
           as well as the command's other required parameters.
       deviceNode -- pointer to the "serial.device", as found in
           the IO_DEVICE of the ioRequest.

   RESULTS
       io_Error -- if the BeginIO succeded, then Error will be null.
           If the BeginIO failed, then the Error will be non-zero.
           I/O errors won't be reported until the io completes.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/serial.h">devices/serial.h</ulink>
                
            </literallayout>
        </section>
        <section id="n549">
            <title>serial.device/CloseDevice</title>
            <literallayout class="monospaced">
                   NAME
       CloseDevice -- close the serial port

   SYNOPSIS
       CloseDevice(deviceNode)
                    A1
   FUNCTION
       This is an exec call that terminates communication with the
       serial device.  Upon closing, the device's input buffer is freed.

       Note that all IORequests MUST be complete before closing.
	If any are pending, your program must 
                <link linkend="n547">AbortIO()</link>
                 then 
                <link linkend="n300">WaitIO()</link>
                       to complete them.

   INPUTS
       deviceNode - pointer to the device node, set by 
                <link linkend="n126">Open</link>
                   SEE ALSO
       
                <link linkend="n557">serial.device/OpenDevice()</link>
                
            </literallayout>
        </section>
        <section id="n550">
            <title>serial.device/CMD_CLEAR</title>
            <literallayout class="monospaced">
                   NAME
       Clear -- clear the serial port buffers

   FUNCTION
       This command resets the serial port's read buffer pointers.

   IO REQUEST
       io_Message      mn_ReplyPort initialized
       io_Device       set by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         set by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      CMD_CLEAR

   RESULTS
       Error -- If the Clear succeded, then io_Error will be null.
                If the Clear failed, then the io_Error will be non-zero.

            </literallayout>
        </section>
        <section id="n551">
            <title>serial.device/CMD_FLUSH</title>
            <literallayout class="monospaced">
                   NAME
       
                <link linkend="n82">Flush</link>
                 -- clear all queued I/O requests for the serial port

   FUNCTION
       This command purges the read and write request queues for the
       serial device. 
                <link linkend="n82">Flush</link>
                 will not affect active requests.

   IO REQUEST
       io_Message      mn_ReplyPort initialized
       io_Device       set by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         set by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      CMD_FLUSH

   RESULTS
       Error -- if the 
                <link linkend="n82">Flush</link>
                 succeded, then io_Error will be null.
           	 If the 
                <link linkend="n82">Flush</link>
                 failed, then the io_Error will be non-zero.

            </literallayout>
        </section>
        <section id="n552">
            <title>serial.device/CMD_READ</title>
            <literallayout class="monospaced">
                   NAME
       
                <link linkend="n136">Read</link>
                 -- read input from serial port

   FUNCTION
	This command causes a stream of characters to be read in from
	the serial port buffer.  The number of characters is specified
	in io_Length.

	The Query function can be used to check how many characters
	are currently waiting in the serial port buffer.  If more characters
	are requested than are currently available, the ioRequest
	will be queued until it can be satisfied.


	The best way to handle reads is to first Query to get the number
	of characters currently in the buffer.  Then post a read request
	for that number of characters (or the maximum size of your buffer).

	If zero characters are in the buffer, post a request
	for 1 character.  When at least one is ready, the device will return
	it.  Now start over with another Query.

	Before the program exits, it must be sure to 
                <link linkend="n547">AbortIO()</link>
                 then 
                <link linkend="n300">WaitIO()</link>
                	any outstanding ioRequests.

   IO REQUEST
       io_Message      A mn_ReplyPort is required
       io_Device       set by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         set by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      CMD_READ
       io_Flags        If the IOB_QUICK bit is set, read will try
			to complete the IO quickly
       io_Length       number of characters to receive.
       io_Data         pointer to buffer

   RESULTS
       Error -- if the 
                <link linkend="n136">Read</link>
                 succeded, then io_Error will be null.
           If the 
                <link linkend="n136">Read</link>
                 failed, then io_Error will be non-zero.
	     io_Error will indicate problems such as parity mismatch,
	     break, and buffer overrun.

   SEE ALSO
	
                <link linkend="n559">serial.device/SDCMD_QUERY</link>
                	
                <link linkend="n560">serial.device/SDCMD_SETPARAMS</link>
                   BUGS
	Having multiple outstanding read IORequests at any one time will
	probably fail.

	Old documentation mentioned a mode where io_Length was set to -1.
	If you want a NULL terminated read, use the io_TermArray instead.

            </literallayout>
        </section>
        <section id="n553">
            <title>serial.device/CMD_RESET</title>
            <literallayout class="monospaced">
                   NAME
       Reset -- reinitializes the serial port

   FUNCTION
       This command resets the serial port to its freshly initialized
       condition. It aborts all I/O requests both queued and current,
       relinquishes the current buffer, obtains a new default sized
       buffer, and sets the port's flags and parameters to their
       boot-up time default values. The functions places the reset
       parameter values in the ioRequest block.

   IO REQUEST
       io_Message      mn_ReplyPort initialized
       io_Device       set by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         set by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      CMD_RESET

   RESULTS
       Error -- if the Reset succeded, then Error will be null.
           If the Reset failed, then the Error will be non-zero.

            </literallayout>
        </section>
        <section id="n554">
            <title>serial.device/CMD_START</title>
            <literallayout class="monospaced">
                   NAME
       Start -- restart paused I/O over the serial port

   FUNCTION
       This function restarts all current I/O on the serial port by
       sending an xON to the "other side", and submitting a "logical
       xON" to "our side", if/when appropriate to current activity.

   IO REQUEST
       io_Message      mn_ReplyPort initialized
       io_Device       set by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         set by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      CMD_START

   RESULTS

   SEE ALSO
       
                <link linkend="n555">serial.device/CMD_STOP</link>
                
            </literallayout>
        </section>
        <section id="n555">
            <title>serial.device/CMD_STOP</title>
            <literallayout class="monospaced">
                   NAME
       Stop -- pause all current I/O over the serial port

   FUNCTION
       This command halts all current I/O on the serial port by
       sending an xOFF to the "other side", and submitting a "logical
       xOFF" to "our side", if/when appropriate to current activity.

   IO REQUEST
       io_Message      mn_ReplyPort initialized
       io_Device       set by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         set by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      CMD_STOP

   RESULTS

   SEE ALSO
       
                <link linkend="n554">serial.device/CMD_START</link>
                
            </literallayout>
        </section>
        <section id="n556">
            <title>serial.device/CMD_WRITE</title>
            <literallayout class="monospaced">
                   NAME
       
                <link linkend="n185">Write</link>
                 -- send output to serial port

   FUNCTION
       This command causes a stream of characters to be written out
       the serial port. The number of characters is specified in
       io_Length, unless -1 is used, in which case output is sent until
       a null(0x00) is encountered.

   IO REQUEST
       io_Message      must have mn_ReplyPort initialized
       io_Device       set by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         set by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      CMD_WRITE
       io_Flags        Set IOF_QUICK to try quick I/O
       io_Length       number of characters to transmit, or if set
                       to -1 transmit until null encountered in buffer
       io_Data         pointer to block of data to transmit

   RESULTS
       Error -- if the 
                <link linkend="n185">Write</link>
                 succeded, then io_Error will be null.
           If the 
                <link linkend="n185">Write</link>
                 failed, then the io_Error will be non-zero.

   SEE ALSO
	
                <link linkend="n560">serial.device/SDCMD_SETPARAMS</link>
                
            </literallayout>
        </section>
        <section id="n557">
            <title>serial.device/OpenDevice</title>
            <literallayout class="monospaced">
                   NAME
       OpenDevice -- 
                <link linkend="n407">Request</link>
                 an opening of the serial device.

   SYNOPSIS
       error = OpenDevice("serial.device", unit, ioRequest, flags)
       D0                  A0              D0    A1         D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                 OpenDevice(STRPTR, ULONG, struct IOExtSer *, ULONG);

   FUNCTION
       This is an exec call.  Exec will search for the serial.device, and
       if found, will pass this call on to the device.

       Unless the shared-access bit (bit 5 of io_SerFlags) is set,
       exclusive use is granted and no other access to that unit is
       allowed until the owner closes it.  All the serial-specific fields
       in the ioRequest are initialized to their most recent values (or
       the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/preferences.h">Preferences</ulink>
                 default, for the first time open).

       If support of 7-wire handshaking (i.e. RS232-C CTS/RTS protocol)
       is required, use the 
                <link linkend="n560">serial.device/SDCMD_SETPARAMS</link>
                 command.
	This feature should also be specified at inital OpenDevice() time.

   INPUTS
       "serial.device"	- pointer to literal string "serial.device"
       unit      	- Must be zero, or a user setable unit number.
			  (This field is used by multiple port controllers)
                         Zero specifies the default serial port.
       ioRequest 	- pointer to an ioRequest block of size io_ExtSerSize
                         to be initialized by the serial.device.
                   	  (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/serial.h">devices/serial.h</ulink>
                 for the definition)
                     	  NOTE use of io_SerFlags (see FUNCTION above)
		IMPORTANT: The ioRequest block MUST be of size io_ExtSerSize,
			   and zeroed (with the exeptions as noted)!
       flags     	- Must be zero for future compatibility

   RESULTS
       D0 	  - same as io_Error
       io_Error  - If the 
                <link linkend="n126">Open</link>
                 succeded, then io_Error will be null.
           	    If the 
                <link linkend="n126">Open</link>
                 failed, then io_Error will be non-zero.
       io_Device - A pointer to whatever device will handle the calls
                   for this unit.  This pointer may be different depending
                   on what unit is requested.

   BUGS
	If 7-wire handshaking is specified, a timeout "feature" is enabled.
	If the device holds off the computer for more than about 30-60
	seconds, the device will return the write request with the error
	SerErr_TimerErr.  Don't depend on this, however.  If you want a timeout,
	set up the timer.device and wait for either timer, or serial IO to
	complete.

	On open, the serial.device allocates the misc.resource for the
	serial port.  It does not return it until the serial.device is
	expunged from memory.  It should return it when no more openers
	exist.   This code can force a specified device to try and
	expunge.  Of course, if the device is in use nothing will happen:

	#include "exec/types.h"
	#include "exec/execbase.h"
	#include "proto/exec.h"

	void FlushDevice(char *);
	extern struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/execbase.h">ExecBase</ulink>
                 *SysBase;

	void main()
	{
		FlushDevice("serial.device");	/* or parallel.device */
	}

	/*
	 * Attempts to flush the named device out of memory.
	 * If it fails, no status is returned; examination of
	 * the problem will reveal that information has no
	 * valid use after the 
                <link linkend="n265">Permit()</link>
                .
	 */
	void FlushDevice(name)
	char  *name;
	{
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 *result;

	    Forbid();
	    if( result=(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/devices.h">Device</ulink>
                 *)FindName(&amp;SysBase-&gt;DeviceList,name) )
		RemDevice(result);
	    Permit();
	}


   SEE ALSO
	
                <link linkend="n549">serial.device/CloseDevice()</link>
                	
                <link linkend="n560">serial.device/SDCMD_SETPARAMS</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/serial.h">devices/serial.h</ulink>
                
            </literallayout>
        </section>
        <section id="n558">
            <title>serial.device/SDCMD_BREAK</title>
            <literallayout class="monospaced">
                   NAME
       Break -- send a break signal over the serial line

   FUNCTION
       This command sends a break signal (serial line held low for an
       extended period) out the serial port. For the built-in port,
       This is accomplished by setting the UARTBRK bit of regisrer ADKCON.

       After a duration (user specifiable via setparams, default 250000
       microseconds) the bit is reset and the signal discontinued.
       If the QUEUEDBRK bit of io_SerFlags is set in the io_Request
       block, the request is placed at the back of the write-request
       queue and executed in turn. If the QUEUEDBRK bit is not set,
       the break is started immediately, control returns to the
       caller, and the timer discontinues the signal after the
       duration is completed. Be aware that calling BREAK may
	affect other commands such as ABORT, FLUSH, STOP, START, etc...

   IO REQUEST
       io_Message      mn_ReplyPort initialized
       io_Device       set by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         set by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      SDCMD_BREAK
       io_Flags        set/reset IO_QUICK per above description

   RESULTS
       Error -- if the Break succeded, then Error will be null.
           If the Break failed, then the Error will be non-zero.

            </literallayout>
        </section>
        <section id="n559">
            <title>serial.device/SDCMD_QUERY</title>
            <literallayout class="monospaced">
                   NAME
       Query -- query serial port/line status

   FUNCTION
       This command return the status of the serial port lines and
       registers. The number of unread bytes in the serial device's
       read buffer is shown in io_Actual.

	The break send &amp; received flags are cleared by a query, and
	whenever a read 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/io.h">IORequest</ulink>
                 is returned with a error
	in io_Error.

   IO REQUEST
       io_Message      mn_ReplyPort initialized
       io_Device       preset by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         preset by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      SDCMD_QUERY

   RESULTS
       io_Status        BIT  ACTIVE  FUNCTION

              LSB       0    ---    reserved
                        1    ---    reserved
                        2    high   parallel "sel" on the A1000
                                    On the A500 &amp; A2000, "sel" is also
                                    connected to the serial port's
                                    "Ring Indicator".  Be cautious when
                                    making cables.
                        3    low    Data Set Ready
                        4    low    Clear To Send
                        5    low    Carrier Detect
                        6    low    Ready To Send
                        7    low    Data Terminal Ready
              MSB       8    high   hardware overrun
                        9    high   break sent (most recent output)
                       10    high   break received (as latest input)
                       11    high   transmit x-OFFed
                       12    high   receive x-OFFed
                    13-15    ---    reserved

       io_Actual       set to count of unread input characters

       io_Error -- Query will always succeded.

            </literallayout>
        </section>
        <section id="n560">
            <title>serial.device/SDCMD_SETPARAMS</title>
            <literallayout class="monospaced">
                   NAME
       SetParams -- change parameters for the serial port

   FUNCTION
       This command allows the caller to change parameters for the
       serial device. Except for xON-xOFF enable/disable, it will
       reject a setparams call if any reads or writes are active
       or pending.
          Note specifically:

    1. Valid input for io_Baud is between 112 and 292000 baud inclusive;
       asynchronous i/o above 32KB (especially on a busy system) may
       be ambitious.
    2. The EOFMODE and QUEUEDBRK bits of io_SerFlags can be set/reset
       in the io_Rqst block without a call to SetParams. The SHARED
       and 7WIRE bits of io_SerFlags can be used in 
                <link linkend="n557">OpenDevice</link>
                 calls.
       ALL OTHER PARAMETERS CAN ONLY BE CHANGED BY THE SetParams
       COMMAND.
    3. RBufLen must be at least 64.  The buffer may be any multiple of
	64 bytes.
    4. If not used, io_ExtFlags MUST be set to zero.
    5. xON-xOFF is by default enabled. The XDISABLED bit is the only
       parameter that can be changed via a SetParams call while the
       device is active. Note that this will return the value
       SerErr_DevBusy in the io_Error field.

	xON/xOFF handshaking is inappropriate for certain binary transfer
	protocalls, such as Xmodem.  The binary data might contain the
	xON (ASCII 17) and xOFF (ASCII 19) characters.

    6. If trying to run MIDI, you should set the RAD_BOOGIE bit of
       io_SerFlags to eliminate unneeded overhead. Specifically, this skips
       checks for parity, x-OFF handling, character lengths other than
       8 bits, and testing for a break signal. Setting RAD_BOOGIE will
       also set the XDISABLED bit.
       Note that writing data (that's already in MIDI format) at MIDI rates
       is easily accomplished. Using this driver alone for MIDI reads may,
       however, may not be reliable, due to MIDI timestamping requirements,
       and possibility of overruns in a busy multitasking and/or display
       intensive environment.
    7. If you select mark or space parity (see io_ExtFlags in serial.h),
       this will cause the SERB_PARTY_ON bit to be set, and the setting
       of SERB_PARTY_ODD to be ignored.
    8. For best results, set the RAD_BOOGIE flag whenever possible.  See
	#6 for details.
    9. Note that at this time parity is *not* calculated for the xON-xOFF
	characters.  If you have a system that is picky about the parity of
	these, you must set your own xON-xOFF characters in io_CtlChar.
   10. 7WIRE (CTS/RTS) handshake is bi-directional.  The external side
	is expected to drop CTS several character times before the external
	buffer is full.  The Amiga will drop RTS several character times
	before the Amiga's buffer is full.


   IO REQUEST
       io_Message      mn_ReplyPort initialized
       io_Device       preset by 
                <link linkend="n557">OpenDevice</link>
                       io_Unit         preset by 
                <link linkend="n557">OpenDevice</link>
                       io_Command      SDCMD_SETPARAMS (0x0B)
  			NOTE that the following fields are filled in by 
                <link linkend="n126">Open</link>
                                       to reflect the serial device's current configuration.
       io_CtlChar      a longword containing byte values for the
                       xON,xOFF,INQ,ACK fields (respectively)
                       (INQ/ACK not used at this time)
       io_RBufLen      length in bytes of input buffer
  			NOTE that any change in buffer size causes the
                       current buffer to be deallocated and a new,
                       correctly sized one to be allocated. Thusly,
                       the CONTENTS OF THE OLD BUFFER ARE LOST.
       io_ExtFlags     additional serial flags (bitdefs in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/serial.h">devices/serial.h)</ulink>
                			mark &amp; space parity may be specified here.
       io_Baud         baud rate for reads AND writes. (See 1 above)
       io_BrkTime      duration of break signal in MICROseconds
       io_TermArray    ASCII descending-ordered 8-byte array of
                       termination characters. If less than 8 chars
                       used, fill out array w/lowest valid value.
                       Terminators are checked only if EOFMODE bit of
                       io_Serflags is set. (e.g. x512F040303030303 )
       io_ReadLen      number of bits in read word (1-8) not including parity
       io_WriteLen     number of bits in write word (1-8) "      "       "
       io_StopBits     number of stop bits (0, 1 or 2)
       io_SerFlags     see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/serial.h">devices/serial.h</ulink>
                 for bit equates, NOTE that x00
                       yields exclusive access, xON/OFF-enabled, no
                       parity checking, 3-wire protocol and TermArray
                       inactive.

   RESULTS
       Error -- if the SetParams succeded, then Error will be null.
           If the SetParams failed, then the Error will be non-zero.

   SEE ALSO
	
                <link linkend="n557">exec/OpenDevice()</link>
                
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>locale</title>
        <section id="n561">
            <title>locale.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n562"> --environment_vars-- </link>
                    
                <link linkend="n563"> --rexxhost-- </link>
                    
                <link linkend="n564"> --structures-- </link>
                    
                <link linkend="n565"> CloseCatalog() </link>
                    
                <link linkend="n566"> CloseLocale() </link>
                    
                <link linkend="n567"> ConvToLower() </link>
                    
                <link linkend="n568"> ConvToUpper() </link>
                    
                <link linkend="n569"> FormatDate() </link>
                    
                <link linkend="n570"> FormatString() </link>
                    
                <link linkend="n571"> GetCatalogStr() </link>
                    
                <link linkend="n572"> GetLocaleStr() </link>
                    
                <link linkend="n573"> IsXXXX() </link>
                    
                <link linkend="n574"> OpenCatalog() </link>
                    
                <link linkend="n575"> OpenLocale() </link>
                    
                <link linkend="n576"> ParseDate() </link>
                    
                <link linkend="n577"> StrConvert() </link>
                    
                <link linkend="n578"> StrnCmp() </link>
            </literallayout>
        </section>
        <section id="n562">
            <title>locale.library/--environment_vars--</title>
            <literallayout class="monospaced">
                	Starting with V40, locale.library maintains a global environment
	variable called "Language" which contains the name of the current
	default language as used in the system. This is the name of the
	language associated with the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 structure returned by
	OpenLocale(NULL).

   EXAMPLE
	From a shell:

		Echo "The system language currently is: $Language"

	will print the name of the current system language ("english",
	"français", etc)

            </literallayout>
        </section>
        <section id="n563">
            <title>locale.library/--rexxhost--</title>
            <literallayout class="monospaced">
                   HOST INTERFACE
	locale.library provides an ARexx function host interface that enables
	ARexx programs to take advantage of system localization. The
	functions provided by the interface are directly related to the
	functions described herein, with the differences mostly being
	in the way they are called.

	The function host library vector is located at offset -30 from the
	library. This is the value you provide to ARexx in the AddLib()
	function call.

   FUNCTIONS
	
                <link linkend="n565">CloseCatalog</link>
                 (CATALOG/N/A)
	
                <link linkend="n567">ConvToLower</link>
                 (CHARACTER/A)
	
                <link linkend="n568">ConvToUpper</link>
                 (CHARACTER/A)
	
                <link linkend="n571">GetCatalogStr</link>
                 (CATALOG/A,STRING/N/A,DEFAULT/A)
	IsAlNum (CHARACTER/A)
	IsAlpha (CHARACTER/A)
	IsCntrl (CHARACTER/A)
	IsDigit (CHARACTER/A)
	IsGraph (CHARACTER/A)
	IsLower (CHARACTER/A)
	IsPrint (CHARACTER/A)
	IsPunct (CHARACTER/A)
	IsSpace (CHARACTER/A)
	IsUpper (CHARACTER/A)
	IsXDigit (CHARACTER/A)
	
                <link linkend="n574">OpenCatalog</link>
                 (NAME/A,BUILTINLANGUAGE/A,VERSION/N/A)
	Strncmp (STRING1/A,STRING2/A,TYPE/N/A)

   EXAMPLE
	/* localetest.rexx */

	/* Make sure locale is loaded as a function host */
	IF ~SHOW(L,'locale.library') THEN DO
	  CALL ADDLIB('locale.library',0,-30)
	END;

	say ConvToLower("A");
	say ConvToUpper("b");
	say IsAlpha("1");

	catalog = OpenCatalog("sys/workbench.catalog","english",0);
	say GetCatalogStr(catalog,34,"default");
	say CloseCatalog(catalog);
	say StrnCmp("test","test",2);

            </literallayout>
        </section>
        <section id="n564">
            <title>locale.library/--structures--</title>
            <literallayout class="monospaced">
                	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 structure is the main public structure provided by
	locale.library. The structure is defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">&lt;libraries/locale.h&gt;</ulink>
                	and consists of the following fields:

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_LocaleName
	    Locale's name.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_LanguageName
	    The language of the driver bound to this locale.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_PrefLanguages[10]
	    The ordered list of preferred languages for this locale.

	ULONG loc_Flags
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 flags. Currently always 0.

	ULONG loc_CodeSet
	    Specifies the code set required by this locale. Currently, this
	    value is always 0.

	ULONG loc_CountryCode
	    The international country code.

	ULONG loc_TelephoneCode
	    The international telephone code for the country.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 loc_GMTOffset
	    The offset in minutes of the current location from GMT.
	    Positive indicates a Westerly direction from GMT,
	    negative Easterly.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MeasuringSystem
	    The measuring system being used.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_DateTimeFormat
	    The date and time format string, ready to pass to 
                <link linkend="n569">FormatDate()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_DateFormat
	    The date format string.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_TimeFormat
	    The time format string.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_ShortDateTimeFormat
	    The short date and time format string, ready to pass to
	    
                <link linkend="n569">FormatDate()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_ShortDateFormat
	    The short date format string.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_ShortTimeFormat
	    The short time format string.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_DecimalPoint
	    The decimal point character used to format non-monetary quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_GroupSeparator
	    The characters used to separate groups of digits before the
	    decimal-point character in formatted non-monetary quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_FracGroupSeparator
	    The characters used to separate groups of digits after the
	    decimal-point character in formatted non-monetary quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_Grouping
	    A string whose elements indicate the size of each group of digits
	    before the decimal-point character in formatted non-monetary
	    quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_FracGrouping
	    A string whose elements indicate the size of each group of digits
	    after the decimal-point character in formatted non-monetary
	    quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonDecimalPoint
	    The decimal-point used to format monetary quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonGroupSeparator
	    The separator for groups of digits before the decimal-point in
	    monetary quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonFracGroupSeparator
	    The separator for groups of digits after the decimal-point in
	    monetary quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonGrouping
	    A string whose elements indicate the size of each group of digits
	    before the decimal-point character in monetary quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonFracGrouping
	    A string whose elements indicate the size of each group of digits
	    after the decimal-point character in monetary quantities.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MonFracDigits
	    The number of fractional digits (those after the decimal-point)
	    to be displayed in a formatted monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MonIntFracDigits
	    The number of fractional digits (those after the decimal-point)
	    to be displayed in an internationally formatted monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonCS
	    The local currency symbol applicable to the current locale.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonSmallCS
	    The currency symbol for small amounts.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonIntCS
	    The international currency symbol applicable to the current
	    locale. The first three characters contain the alphabetic
	    international currency symbol in accordance with those specified
	    in ISO 4217 Codes for the Representation of Currency and Funds.
	    The fourth character (immediately preceding the NULL) is the
	    character used to separate the international currency symbol from
	    the monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonPositiveSign
	    The string used to indicate a non-negative monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MonPositiveSpaceSep
	    Specifies the number of spaces separating the currency symbol from
	    the non-negative monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MonPositiveSignPos
	    Set to a value indicating the positioning of loc_MonPositiveSign
	    for a non-negative monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MonPositiveCSPos
	    Set to 1 or 0 if loc_MonCS respectively precedes or succeeds
	    the value for a non-negative monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 loc_MonNegativeSign
	    The string used to indicate a negative monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MonNegativeSpaceSep
	    Specifies the number of spaces separating the currency symbol from
	    the negative monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MonNegativeSignPos
	    Set to a value indicating the positioning of loc_MonNegativeSign
	    for a negative monetary quantity.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 loc_MonNegativeCSPos
	    Set to 1 or 0 if loc_MonCS respectively precedes or succeeds
	    the value for a negative monetary quantity.


	The grouping tables pointed to by loc_Grouping, loc_FracGrounping,
	loc_MonGrouping, and loc_MonFracGrouping contain a stream of bytes
	with the following values:

	    255		No further grouping is to be performed.

	    0		The previous element is to be repeatedly used for the
			remainder of the digits.

	    1..254	The integer value is the number of digits that comprise
			the current group. The next element is examined to
			determine the size of the next group of digits before
			the current group.

	The values of loc_MonPositiveSignPos and loc_MonNegativeSignPos are
	interpreted according to the following:

	    0		Parentheses surround the quantity and currency symbol

	    1		The sign string precedes the quantity and
			currency symbol

	    2		The sign string succeeds the quantity and
			currency symbol

	    3		The sign string immediately precedes the
			currency symbol

	    4		The sign string immediately succeeds the
			currency symbol.

            </literallayout>
        </section>
        <section id="n565">
            <title>locale.library/CloseCatalog</title>
            <literallayout class="monospaced">
                   NAME
	CloseCatalog -- close a message catalog. (V38)

   SYNOPSIS
	CloseCatalog(catalog);
	             A0

	VOID CloseCatalog(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Catalog</ulink>
                 *);

   FUNCTION
	Concludes access to a message catalog. The usage count of the
	catalog is decremented. When this count reaches 0, the catalog
	can be expunged from system memory whenever a memory panic occurs.

   INPUTS
	catalog - the message catalog to close. A NULL catalog is a valid
		  parameter and is simply ignored.

   SEE ALSO
	
                <link linkend="n574">OpenCatalog()</link>
                , 
                <link linkend="n571">GetCatalogStr()</link>
                
            </literallayout>
        </section>
        <section id="n566">
            <title>locale.library/CloseLocale</title>
            <literallayout class="monospaced">
                   NAME
	CloseLocale -- close a locale. (V38)

   SYNOPSIS
	CloseLocale(locale);
	            A0

	VOID CloseLocale(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *);

   FUNCTION
	Concludes access to a locale.

   INPUTS
	locale - an opened locale. A NULL locale is a valid
		 parameter and is simply ignored.

   SEE ALSO
	
                <link linkend="n575">OpenLocale()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">&lt;libraries/locale.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n567">
            <title>locale.library/ConvToLower</title>
            <literallayout class="monospaced">
                   NAME
	ConvToLower -- convert a character to lower case. (V38)

   SYNOPSIS
	char = ConvToLower(locale,character);
	D0	           A0     D0

	ULONG ConvToLower(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,ULONG);

   FUNCTION
	This function tests if the character specified is upper case. If it is
	then the lower case version of that character is returned, and if it
	isn't then the original character is returned.

   INPUTS
	locale - the locale to use for the conversion
	character - the character to convert

   RESULT
	char - a (possibly) converted character

   NOTE
	This function requires a full 32-bit character be passed-in in order
	to support multi-byte character sets.

            </literallayout>
        </section>
        <section id="n568">
            <title>locale.library/ConvToUpper</title>
            <literallayout class="monospaced">
                   NAME
	ConvToUpper -- convert a character to upper case. (V38)

   SYNOPSIS
	char = ConvToUpper(locale,character);
	D0	           A0     D0

	ULONG ConvToUpper(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,ULONG);

   FUNCTION
	This function tests if the character specified is lower case. If it is
	then the upper case version of that character is returned, and if it
	isn't then the original character is returned.

   INPUTS
	locale - the locale to use for the conversion
	character - the character to convert

   RESULT
	char - a (possibly) converted character

   NOTE
	This function requires a full 32-bit character be passed-in in order
	to support multi-byte character sets.

            </literallayout>
        </section>
        <section id="n569">
            <title>locale.library/FormatDate</title>
            <literallayout class="monospaced">
                   NAME
	FormatDate -- generate a date string based on a date formatting
		      template. (V38)

   SYNOPSIS
	FormatDate(locale,fmtTemplate,date,putCharFunc);
	           A0     A1          A2   A3

	VOID FormatDate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 *,
	                struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *);

   FUNCTION
	This function processes a formatting template and generates
	a stream of bytes that's sent one character at a time to the
	putCharFunc callback hook.

   INPUTS
	locale - the locale to use for the formatting
	fmtTemplate - the NULL-terminated template describing the desired
		      format for the date. This is constructed just like
		      C-language 
                <link linkend="n527">printf()</link>
                 statements, except that different
		      formatting codes are used. Just like in C, formatting
		      codes start with a % followed by the formatting command.
		      The following commands are accepted by this function:

	                %a - abbreviated weekday name
	                %A - weekday name
	                %b - abbreviated month name
	                %B - month name
	                %c - same as "%a %b %d %H:%M:%S %Y"
	                %C - same as "%a %b %e %T %Z %Y"
	                %d - day number with leading 0s
	                %D - same as "%m/%d/%y"
	                %e - day number with leading spaces
	                %h - abbreviated month name
	                %H - hour using 24-hour style with leading 0s
	                %I - hour using 12-hour style with leading 0s
	                %j - julian date
	                %m - month number with leading 0s
	                %M - the number of minutes with leading 0s
	                %n - insert a linefeed
	                %p - AM or PM strings
	                %q - hour using 24-hour style
	                %Q - hour using 12-hour style
	                %r - same as "%I:%M:%S %p"
	                %R - same as "%H:%M"
	                %S - number of seconds with leadings 0s
	                %t - insert a tab character
	                %T - same as "%H:%M:%S"
	                %U - week number, taking Sunday as first day of week
	                %w - weekday number
	                %W - week number, taking Monday as first day of week
	                %x - same as "%m/%d/%y"
	                %X - same as "%H:%M:%S"
	                %y - year using two digits with leading 0s
	                %Y - year using four digits with leading 0s

	              If the template parameter is NULL, a single NULL byte
		      is sent to putCharFunc.
	date - the date to format into a string
	putCharFunc - a callback hook invoked for every character generated,
		      including for the terminating NULL character. The hook
		      is called with:

		 	A0 - address of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 structure
			A1 - character for hook to process (not a pointer!)
	                A2 - locale pointer

   SEE ALSO
	
                <link linkend="n576">ParseDate()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">&lt;libraries/locale.h&gt;</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n570">
            <title>locale.library/FormatString</title>
            <literallayout class="monospaced">
                   NAME
	FormatString -- format data into a character stream. (V38)

   SYNOPSIS
	next = FormatString(locale,fmtTemplate,dataStream,putCharFunc);
	D0                  A0     A1          A2         A3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 FormatString(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                ,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *);

   FUNCTION
	This function performs C-language-like formatting of a data stream,
	outputting the result a character at a time. Where % formatting
	commands are found in the formatting template, they are replaced with
	the corresponding elements in 'dataStream'. %% must be used in the
	string if a % is desired in the output.

	An extension to the standard C-language 
                <link linkend="n527">printf()</link>
                 conventions used
	by FormatString() is argument position specification. Specifying the
	argument position lets the order of the % commands change while the
	arguments provided remain the same. Using the C 
                <link linkend="n527">printf()</link>
                 call as an
	example:
	    printf("%d eyes, %d feet and %d ears",eyes,feet,ears);
	    printf("%3$d ears, %1$d eyes and %2$d feet",eyes,feet,ears);
	These two statements would produce the following output:
	    "2 eyes, 3 feet and 4 ears" for the first
	    "4 ears, 2 eyes and 3 feet" for the second

	The argument positioning feature lets you change the format string
	being processed while keeping the data stream the same. This is
	an invaluable tool when translating strings to different languages.

   INPUTS
	locale - the locale to use for the formatting
	fmtTemplate - a C-language-like NULL-terminated format string,
		      with the following supported % options:

	  %[arg_pos$][flags][width][.limit][length]type

	  arg_pos - ordinal position of the argument for this command within
		    the array of arguments pointed to by 'dataStream'
	    $     - must follow the arg_pos value, if specified
	  flags   - only one allowed. '-' specifies left justification.
	  width   - field width. If the first character is a '0', the
	            field is padded with leading 0s.
	    .     - must precede the field limit value, if specified
	  limit   - maximum number of characters to output from a string.
	            (only valid for %s or %b).
	  length  - size of input data defaults to word (16-bit) for types c,
		    d, u and x, 'l' changes this to long (32-bit).
	  type    - supported types are:
	                  b - BSTR, data is 32-bit 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 to byte count followed
	                      by a byte string. A NULL 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 is treated as an
			      empty string.
	                  d - signed decimal
			  D - signed decimal using the locale's formatting
			      conventions
			  u - unsigned decimal
			  U - unsigned decimal using the locale's formatting
			      conventions
	                  x - hexadecimal with hex digits in uppercase
			  X - hexadecimal with hex digits in lowercase
	                  s - string, a 32-bit pointer to a NULL-terminated
	                      byte string. A NULL pointer is treated
	                      as an empty string.
	                  c - character

	              If the formatting template parameter is NULL, the
		      function returns without outputting anything. Note the
		      meaning of %x and %X are swapped with respect to
		      standard C conventions. This is for compatibility with
		      
                <link linkend="n268">exec.library/RawDoFmt()</link>
                .

	dataStream - a stream of data that is interpreted according to
		     the format string. Often this is a pointer into
		     the task's stack.
	putCharFunc - a callback hook invoked for every character generated,
		      including for the terminating NULL character. The hook
		      is called with:

		 	A0 - address of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 structure
			A1 - character for hook to process (not a pointer!)
	                A2 - locale pointer

		     the function is called with a NULL char at the end of
		     the format string.

   RESULT
	next - A pointer to beyond the last data element used in 'dataStream'
	       (the next argument that would have been processed).
	       This allows multiple formatting passes to be made using the
	       same data.

   WARNING
	This function formats word values in the data stream. If your compiler
	defaults to longs, you must add an "l" to your specifications. This
	can get strange for characters, which might look like "%lc".

   SEE ALSO
	
                <link linkend="n268">exec.library/RawDoFmt()</link>
                
            </literallayout>
        </section>
        <section id="n571">
            <title>locale.library/GetCatalogStr</title>
            <literallayout class="monospaced">
                   NAME
	GetCatalogStr -- get a string from a message catalog. (V38)

   SYNOPSIS
	string = GetCatalogStr(catalog,stringNum,defaultString);
	D0                     A0      D0        A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 GetCatalogStr(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Catalog</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,STRPTR);

   FUNCTION
	This function returns a specific string within a message catalog.
	If the catalog parameter is NULL, or the requested message does not
	exist, then defaultString is returned.

   INPUTS
	catalog - a message catalog as obtained from 
                <link linkend="n574">OpenCatalog()</link>
                , or NULL
	stringNum - a message number within the catalog
	defaultString - string to return in case "catalog" is NULL or
	                "stringNum" can't be found

   RESULT
	string - a pointer to a NULL-terminated string. The returned string
		 is READ-ONLY, do NOT modify! This string pointer is valid
		 only as long as the catalog remains open.

   SEE ALSO
	
                <link linkend="n574">OpenCatalog()</link>
                , 
                <link linkend="n565">CloseCatalog()</link>
                
            </literallayout>
        </section>
        <section id="n572">
            <title>locale.library/GetLocaleStr</title>
            <literallayout class="monospaced">
                   NAME
	GetLocaleStr -- get a standard string from a locale. (V38)

   SYNOPSIS
	string = GetLocaleStr(locale,stringNum);
	D0                    A0     D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 GetLocaleStr(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,ULONG);

   FUNCTION
	This function returns a specific string associated with the given
	locale.

   INPUTS
	locale - a valid locale
	stringNum - the number of the string to get a pointer to. See the
		    constants defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">&lt;libraries/locale.h&gt;</ulink>
                 for the
		    possible values.

   RESULT
	string - a pointer to a NULL-terminated string, or NULL if the
		 requested string number was out of bounds. The returned
		 string is READ-ONLY, do NOT modify! This string pointer
		 is valid only as long as the locale remains open.

   SEE ALSO
	
                <link linkend="n575">OpenLocale()</link>
                , 
                <link linkend="n566">CloseLocale()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">&lt;libraries/locale.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n573">
            <title>locale.library/IsXXXX</title>
            <literallayout class="monospaced">
                   NAME
	IsXXXX -- determine whether a character is of a certain type. (V38)

   SYNOPSIS
	state = IsXXXX(locale,character);
	D0	       A0     D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 IsXXXX(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,ULONG);

   FUNCTION
	These functions determine whether the character specified is of a
	certain type, according to the supplied locale.

	IsAlNum() - test if alphanumeric character
	IsAlpha() - test if alphabetical character
	IsCntrl() - test if control character
	IsDigit() - test if decimal digit character
	IsGraph() - test if visible character
	IsLower() - test if lower case character
	IsPrint() - test if blank
	IsPunct() - test if punctuation character
	IsSpace() - test if white space character
	IsUpper() - test if upper case character
	IsXDigit() - test if hexadecimal digit

   INPUTS
	locale - the locale to use for the test
	character - the character to test

   RESULT
	state - TRUE if the character is of the required type, FALSE otherwise

   NOTE
	These functions require full 32-bit characters be passed-in in order
	to support multi-byte character sets.

            </literallayout>
        </section>
        <section id="n574">
            <title>locale.library/OpenCatalog</title>
            <literallayout class="monospaced">
                   NAME
	OpenCatalogA -- open a message catalog. (V38)
	OpenCatalog -- varargs stub for OpenCatalogA(). (V38)

   SYNOPSIS
	catalog = OpenCatalogA(locale,name,tagList);
	D0                     A0     A1   A2

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Catalog</ulink>
                 *OpenCatalogA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	catalog = OpenCatalog(locale,name,firstTag, ...);

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Catalog</ulink>
                 *OpenCatalog(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                , ...);

   FUNCTION
	This function opens a message catalog. Catalogs contain all the
	text strings that an application uses. These strings can easily
	be replaced by strings in a different language, which causes the
	application to magically start operating in that new language.

	Catalogs originally come from disk files. This function searches for
	them in the following places:

		PROGDIR:Catalogs/languageName/name
		LOCALE:Catalogs/languageName/name

	where languageName is the name of the language associated with the
	locale parameter. So assuming an application called WizPaint:

		catalog = OpenCatalog(NULL,
				      "WizPaint.catalog",
				      OC_BuiltInLanguage,"english",
				      TAG_DONE);

	Passing NULL as first parameter to OpenCatalog() indicates you
	wish to use the system's default locale. Assuming the default locale
	specifies "deutsch" as language, OpenCatalog() tries to open the
	catalog as:

		PROGDIR:Catalogs/deutsch/WizPaint.catalog

	and if that file is not found, then OpenCatalog() tries to open it
	as:

		LOCALE:Catalogs/deutsch/WizPaint.catalog

	PROGDIR: is not always checked before LOCALE: is. If the volume which
	PROGDIR: is assigned to is NOT currently mounted, and if the one
	which LOCALE: is assigned to IS mounted, then LOCALE: is checked
	first, followed by PROGDIR: if needed. This is done in order to
	minimize the number of disk swaps on floppy systems.

	The OC_BuiltInLanguage tag specifies the language of the strings
	that are built into the application. If the language of the
	built-in strings matches that of the locale, then no catalog
	need be loaded from disk and the built-in strings can be used
	directly.

	locale.library caches text catalogs in order to minimize disk
	access. As such, OpenCatalog() may or may not cause disk access.
	This fact should be taken into consideration. Unused catalogs are
	automatically flushed from the system when there is not enough
	memory. When there is disk access, it is possible a DOS requester
	may be opened asking for a volume to be inserted. You can avoid this
	requester opening by setting your process' pr_WindowPtr field to -1.

   INPUTS
	locale - the locale for which the catalog should be opened, or NULL.
		 When NULL, then the system's default locale is used. This
		 should generally be NULL
	name - the NULL-terminated name of the catalog to open, typically
	       the application name with a ".catalog" extension
	tagList - pointer to an array of tags providing optional extra
		  parameters, or NULL

   TAGS
	OC_BuiltInLanguage (STRPTR) - language of built-in strings of the
				      application. That is, this tag identifies
				      the language used for the "defaultString"
				      parameter used in the 
                <link linkend="n571">GetCatalogStr()</link>
                				      function. Default is "english". Providing
				      this tag and setting its value to NULL
				      indicates that there are no built-in
				      strings.

	OC_BuiltInCodeSet (ULONG) - code set of built-in strings. Default is 0.
				    THIS TAG SHOULD ALWAYS BE SET TO 0 FOR NOW.

	OC_Language (STRPTR) - language explicitly requested for the catalog.
			       A catalog of this language will be returned if
			       possible, otherwise a catalog in one of the
			       user's preferred languages. This tag should
			       normally not be provided as it overrides the
			       user's preferences.

	OC_Version (UWORD) - catalog version number required. Default is 0
			     which means to accept any version of the catalog
			     that is found. Note that if a version is
			     specified, the catalog's version much match it
			     exactly. This is different from version numbers
			     used by 
                <link linkend="n263">OpenLibrary()</link>
                .

   RESULT
	catalog - a message catalog to use with 
                <link linkend="n571">GetCatalogStr()</link>
                 or NULL.
		  A NULL result does not necessarily indicate an error.
		  If OpenCatalog() determines that the built-in strings of
		  the application can be used instead of an external catalog
		  from disk, then NULL is returned. To determine whether
		  a NULL result actually indicates an error, look at the
		  return value of 
                <link linkend="n106">dos.library/IoErr()</link>
                . 0 means no error.

		  
                <link linkend="n571">GetCatalogStr()</link>
                 interprets a NULL catalog as meaning to use
		  the built-in strings.

   NOTE
	In most cases, failing to open a catalog should not be considered a
	fatal error, and the application should continue operating and
	simply use the built-in set of strings instead of the disk-based
	catalog. Note that 
                <link linkend="n571">GetCatalogStr()</link>
                 accepts a NULL catalog pointer for
	this very reason.

	Also note that displaying an error message when a catalog fails to
	open can be a meaningless endeavor as the message is likely in a
	language the user does not understand.

   SEE ALSO
	
                <link linkend="n565">CloseCatalog()</link>
                , 
                <link linkend="n571">GetCatalogStr()</link>
                
            </literallayout>
        </section>
        <section id="n575">
            <title>locale.library/OpenLocale</title>
            <literallayout class="monospaced">
                   NAME
	OpenLocale -- open a locale. (V38)

   SYNOPSIS
	locale = OpenLocale(name);
	D0                  A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *OpenLocale(STRPTR);

   FUNCTION
	This function opens a named locale. Locales contain many parameters
	that an application needs to consider when being integrated into
	different languages, territories and customs. Using the information
	stored in a locale instead of hard-coding it into an application,
	lets the application dynamically adapt to the user's environment.

	Locales originally come from disk files which are created by the
	user using the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 preferences editor. Passing a NULL instead of
	a name causes this function to return the current default locale.
	This is what most applications will do.

	Every locale specifies a language, and special language drivers
	must be loaded from disk depending on which language is being used.
	These files include for example:

		LOCALE:Languages/français.language
		LOCALE:Languages/dansk.language
		LOCALE:Languages/italiano.language

   INPUTS
	name - the NULL-terminated name of the locale to open, or NULL to open
	       the current default locale. This should generally be NULL. The
	       name you supply must be a pathname leading to a locale
	       preferences file. This is an IFF PREF file as saved by
	       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 prefs, that can contain both LCLE and CTRY chunks.
	       See 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/prefs/locale.h">&lt;prefs/locale.h&gt;</ulink>
                 for definitions.

   RESULT
	locale - a pointer to an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 structure, or NULL if the
		 locale could not be loaded. In the case of a NULL return, the
		 DOS 
                <link linkend="n106">IoErr()</link>
                 function can be called to obtain more information
		 on the failure.

		 When passing a NULL name parameter to this function, you are
		 guaranteed a valid return.

   SEE ALSO
	
                <link linkend="n566">CloseLocale()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">&lt;libraries/locale.h&gt;</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/prefs/locale.h">&lt;prefs/locale.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n576">
            <title>locale.library/ParseDate</title>
            <literallayout class="monospaced">
                   NAME
	ParseDate -- interpret a string according to the date formatting
		     template and convert it into a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                . (V38)

   SYNOPSIS
	state = ParseDate(locale,date,fmtTemplate,getCharFunc);
	D0	          A0     A1   A2          A3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ParseDate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *);

   FUNCTION
	This function converts a stream of characters into an AmigaDOS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">DateStamp</ulink>
                 structure. The characters are obtained from the
	getCharFunc callback hook and the formatting template is used
	to direct the parse.

   INPUTS
	locale - the locale to use for the formatting
	date - place to put the converted date, this may be NULL in which
	       case this routine can be used to simply validate a date
	fmtTemplate - the date template describing the expected format of the
		      data. See 
                <link linkend="n569">FormatDate()</link>
                 documentation for a description of
		      date templates. The following formatting controls from
		      
                <link linkend="n569">FormatDate()</link>
                 can be used in ParseDate():
	                %a %A %b %B %d %e %h %H %I %m %M %p %S %y %Y
	getCharFunc - a callback hook invoked whenever a character is required.
		      The hook should return the next character to process,
		      with a NULL character to indicate the end of the string.
		      The hook is called with:

		 	A0 - address of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 structure
	                A1 - locale pointer
			A2 - NULL

	              The hook returns the character to process in D0. Note
		      that a complete 32-bit result is expected in D0, not
		      just 8 bits.

   RESULT
	state - TRUE if the parsing went OK, or FALSE if the input did not
		match the template

   SEE ALSO
	
                <link linkend="n569">FormatDate()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">&lt;dos/dos.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n577">
            <title>locale.library/StrConvert</title>
            <literallayout class="monospaced">
                   NAME
	StrConvert -- transform a string according to collation information.
		      (V38)

   SYNOPSIS
	length = StrConvert(locale,string,buffer,bufferSize,type);
	D0                  A0     A1     A2     D0         D1

	ULONG StrConvert(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                ,ULONG,ULONG);

   FUNCTION
	This function transforms the passed string and places the resulting
	into the supplied buffer. No more than bufferSize bytes are copied
	into the buffer.

	The transformation is such that if the C strcmp() function is applied
	to two transformed strings, it returns a value corresponding to
	the result returned by the 
                <link linkend="n578">StrnCmp()</link>
                 function applied to the two
	original strings.

   INPUTS
	locale - the locale to use for the transformation
	string - NULL-terminated string to transform
	buffer - buffer where to put the transformed string
	bufferSize - maximum number of bytes to deposit in the buffer
	             StrConvert() may require more storage than
		     the unconverted string does
	type - describes how the transformation is to be performed. See
	       the documentation on 
                <link linkend="n578">StrnCmp()</link>
                 for more information on the
	       comparison types available

   RESULT
	length - length of the transformed string which is the number of bytes
		 deposited in the buffer minus 1 (since strings are NULL-
		 terminated)

   SEE ALSO
	
                <link linkend="n578">StrnCmp()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">&lt;libraries/locale.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n578">
            <title>locale.library/StrnCmp</title>
            <literallayout class="monospaced">
                   NAME
	StrnCmp -- localized string comparison. (V38)

   SYNOPSIS
	result = StrnCmp(locale,string1,string2,length,type);
	D0               A0     A1      A2      D0     D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 StrnCmp(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/locale.h">Locale</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                ,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,ULONG);

   FUNCTION
	Compares string1 to string2 according to the collation information
	provided by the locale and returns an integer greater than,
	equal to, or less than zero, accordingly as the string pointed to
	by string1 is greater than, equal to, or less than the string
	pointed to by string2.

	The length parameter specifies how many characters to compare, or if
	the length is specified as -1 then the strings are compared until
	a NULL is encountered.

	The type parameter dictates how the comparison is to be performed.

   INPUTS
	locale - the locale to use for this comparison
	string1	- NULL-terminated string
	string2	- NULL-terminated string
	length - the maximum number of characters to be compared, or -1 to
		 compare all characters until a NULL is encountered
	type - describes how the comparison is to be performed. The following
	       values can be passed:
		 SC_ASCII causes an ASCII-based case-insensitive comparison
		 to be performed. SC_ASCII is the fastest of the comparison
		 types, but it uses ASCII ordering and considers accented
		 characters different than their non-accented counterparts.

		 SC_COLLATE1 causes the characters to be compared using their
		 primary sorting order. This effectively produces a comparison
		 that ignores letter case and diacritical marks. That is,
		 letters such as "e" and "é" are treated as if they were both
		 "e".

		 SC_COLLATE2 causes the characters to be compared using both
		 their primary and secondary sorting order. SC_COLLATE2 is
		 slower than SC_COLLATE1. This is the type of comparison to
		 use when sorting data to be presented to the user. It operates
		 in two passes. First it performs a comparison equivalent to
		 SC_COLLATE1. If both strings compare the same, then a second
		 pass is made using the secondary sorting order, which gives
		 finer resolution to the comparison. For example, SC_COLLATE1
		 would return the following strings as identical:
		    "père"  and  "pere"
		 since SC_COLLATE1 ignores diacritical marks. SC_COLLATE2
		 would make a second pass over the string comparing
		 diacritical marks instead of actual characters.

   RESULT
	result - relationship between string1 and string2
			&lt;0 means string1 &lt; string2
			=0 means string1 = string2
			&gt;0 means string1 &gt; string2

   SEE ALSO
	
                <link linkend="n575">OpenLocale()</link>
                , 
                <link linkend="n566">CloseLocale()</link>
                , 
                <link linkend="n577">StrConvert()</link>
                
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>graphics</title>
        <section id="n579">
            <title>graphics.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n580"> AddAnimOb() </link>
                    
                <link linkend="n581"> AddBob() </link>
                    
                <link linkend="n582"> AddFont() </link>
                    
                <link linkend="n583"> AddVSprite() </link>
                    
                <link linkend="n584"> AllocBitMap() </link>
                    
                <link linkend="n585"> AllocDBufInfo() </link>
                    
                <link linkend="n586"> AllocRaster() </link>
                    
                <link linkend="n587"> AllocSpriteDataA() </link>
                    
                <link linkend="n588"> AndRectRegion() </link>
                    
                <link linkend="n589"> AndRegionRegion() </link>
                    
                <link linkend="n590"> Animate() </link>
                    
                <link linkend="n591"> AreaCircle() </link>
                    
                <link linkend="n592"> AreaDraw() </link>
                    
                <link linkend="n593"> AreaEllipse() </link>
                    
                <link linkend="n594"> AreaEnd() </link>
                    
                <link linkend="n595"> AreaMove() </link>
                    
                <link linkend="n596"> AskFont() </link>
                    
                <link linkend="n597"> AskSoftStyle() </link>
                    
                <link linkend="n598"> AttachPalExtra() </link>
                    
                <link linkend="n599"> AttemptLockLayerRom() </link>
                    
                <link linkend="n600"> BestModeIDA() </link>
                    
                <link linkend="n601"> BitMapScale() </link>
                    
                <link linkend="n602"> BltBitMap() </link>
                    
                <link linkend="n603"> BltBitMapRastPort() </link>
                    
                <link linkend="n604"> BltClear() </link>
                    
                <link linkend="n605"> BltMaskBitMapRastPort() </link>
                    
                <link linkend="n606"> BltPattern() </link>
                    
                <link linkend="n607"> BltTemplate() </link>
                    
                <link linkend="n608"> CalcIVG() </link>
                    
                <link linkend="n609"> CBump() </link>
                    
                <link linkend="n610"> CEND </link>
                    
                <link linkend="n611"> ChangeExtSpriteA() </link>
                    
                <link linkend="n612"> ChangeSprite() </link>
                    
                <link linkend="n613"> ChangeVPBitMap() </link>
                    
                <link linkend="n614"> CINIT </link>
                    
                <link linkend="n615"> ClearEOL() </link>
                    
                <link linkend="n616"> ClearRectRegion() </link>
                    
                <link linkend="n617"> ClearRegion() </link>
                    
                <link linkend="n618"> ClearScreen() </link>
                    
                <link linkend="n619"> ClipBlit() </link>
                    
                <link linkend="n620"> CloseFont() </link>
                    
                <link linkend="n621"> CloseMonitor() </link>
                    
                <link linkend="n622"> CMOVE </link>
                    
                <link linkend="n623"> CoerceMode() </link>
                    
                <link linkend="n624"> CopySBitMap() </link>
                    
                <link linkend="n625"> CWAIT </link>
                    
                <link linkend="n626"> DisownBlitter() </link>
                    
                <link linkend="n627"> DisposeRegion() </link>
                    
                <link linkend="n628"> DoCollision() </link>
                    
                <link linkend="n629"> Draw() </link>
                    
                <link linkend="n630"> DrawEllipse() </link>
                    
                <link linkend="n631"> DrawGList() </link>
                    
                <link linkend="n632"> EraseRect() </link>
                    
                <link linkend="n633"> ExtendFont() </link>
                    
                <link linkend="n634"> FindColor() </link>
                    
                <link linkend="n635"> FindDisplayInfo() </link>
                    
                <link linkend="n636"> Flood() </link>
                    
                <link linkend="n637"> FontExtent() </link>
                    
                <link linkend="n638"> FreeBitMap() </link>
                    
                <link linkend="n639"> FreeColorMap() </link>
                    
                <link linkend="n640"> FreeCopList() </link>
                    
                <link linkend="n641"> FreeCprList() </link>
                    
                <link linkend="n642"> FreeDBufInfo() </link>
                    
                <link linkend="n643"> FreeGBuffers() </link>
                    
                <link linkend="n644"> FreeRaster() </link>
                    
                <link linkend="n645"> FreeSprite() </link>
                    
                <link linkend="n646"> FreeSpriteData() </link>
                    
                <link linkend="n647"> FreeVPortCopLists() </link>
                    
                <link linkend="n648"> GetAPen() </link>
                    
                <link linkend="n649"> GetBitMapAttr() </link>
                    
                <link linkend="n650"> GetBPen() </link>
                    
                <link linkend="n651"> GetColorMap() </link>
                    
                <link linkend="n652"> GetDisplayInfoData() </link>
                    
                <link linkend="n653"> GetDrMd() </link>
                    
                <link linkend="n654"> GetExtSpriteA() </link>
                    
                <link linkend="n655"> GetGBuffers() </link>
                    
                <link linkend="n656"> GetOPen() </link>
                    
                <link linkend="n657"> GetRGB32() </link>
                    
                <link linkend="n658"> GetRGB4() </link>
                    
                <link linkend="n659"> GetRPAttrA() </link>
                    
                <link linkend="n660"> GetSprite() </link>
                    
                <link linkend="n661"> GetVPModeID() </link>
                    
                <link linkend="n662"> GfxAssociate() </link>
                    
                <link linkend="n663"> GfxFree() </link>
                    
                <link linkend="n664"> GfxLookUP() </link>
                    
                <link linkend="n665"> GfxNew() </link>
                    
                <link linkend="n666"> InitArea() </link>
                    
                <link linkend="n667"> InitBitMap() </link>
                    
                <link linkend="n668"> InitGels() </link>
                    
                <link linkend="n669"> InitGMasks() </link>
                    
                <link linkend="n670"> InitMasks() </link>
                    
                <link linkend="n671"> InitRastPort() </link>
                    
                <link linkend="n672"> InitTmpRas() </link>
                    
                <link linkend="n673"> InitView() </link>
                    
                <link linkend="n674"> InitVPort() </link>
                    
                <link linkend="n675"> LoadRGB32() </link>
                    
                <link linkend="n676"> LoadRGB4() </link>
                    
                <link linkend="n677"> LoadView() </link>
                    
                <link linkend="n678"> LockLayerRom() </link>
                    
                <link linkend="n679"> MakeVPort() </link>
                    
                <link linkend="n680"> ModeNotAvailable() </link>
                    
                <link linkend="n681"> Move() </link>
                    
                <link linkend="n682"> MoveSprite() </link>
                    
                <link linkend="n683"> MrgCop() </link>
                    
                <link linkend="n684"> NewRegion() </link>
                    
                <link linkend="n685"> NextDisplayInfo() </link>
                    
                <link linkend="n686"> ObtainBestPenA() </link>
                    
                <link linkend="n687"> ObtainPen() </link>
                    
                <link linkend="n688"> OpenFont() </link>
                    
                <link linkend="n689"> OpenMonitor() </link>
                    
                <link linkend="n690"> OrRectRegion() </link>
                    
                <link linkend="n691"> OrRegionRegion() </link>
                    
                <link linkend="n692"> OwnBlitter() </link>
                    
                <link linkend="n693"> PolyDraw() </link>
                    
                <link linkend="n694"> QBlit() </link>
                    
                <link linkend="n695"> QBSBlit() </link>
                    
                <link linkend="n696"> ReadPixel() </link>
                    
                <link linkend="n697"> ReadPixelArray8() </link>
                    
                <link linkend="n698"> ReadPixelLine8() </link>
                    
                <link linkend="n699"> RectFill() </link>
                    
                <link linkend="n700"> ReleasePen() </link>
                    
                <link linkend="n701"> RemBob() </link>
                    
                <link linkend="n702"> RemFont() </link>
                    
                <link linkend="n703"> RemIBob() </link>
                    
                <link linkend="n704"> RemVSprite() </link>
                    
                <link linkend="n705"> ScalerDiv() </link>
                    
                <link linkend="n706"> ScrollRaster() </link>
                    
                <link linkend="n707"> ScrollRasterBF() </link>
                    
                <link linkend="n708"> ScrollVPort() </link>
                    
                <link linkend="n709"> SetABPenDrMd() </link>
                    
                <link linkend="n710"> SetAPen() </link>
                    
                <link linkend="n711"> SetBPen() </link>
                    
                <link linkend="n712"> SetChipRev() </link>
                    
                <link linkend="n713"> SetCollision() </link>
                    
                <link linkend="n714"> SetDrMd() </link>
                    
                <link linkend="n715"> SetFont() </link>
                    
                <link linkend="n716"> SetMaxPen() </link>
                    
                <link linkend="n717"> SetOPen() </link>
                    
                <link linkend="n718"> SetOutlinePen() </link>
                    
                <link linkend="n719"> SetRast() </link>
                    
                <link linkend="n720"> SetRGB32() </link>
                    
                <link linkend="n721"> SetRGB32CM() </link>
                    
                <link linkend="n722"> SetRGB4() </link>
                    
                <link linkend="n723"> SetRGB4CM() </link>
                    
                <link linkend="n724"> SetRPAttrA() </link>
                    
                <link linkend="n725"> SetSoftStyle() </link>
                    
                <link linkend="n726"> SetWriteMask() </link>
                    
                <link linkend="n727"> SortGList() </link>
                    
                <link linkend="n728"> StripFont() </link>
                    
                <link linkend="n729"> SyncSBitMap() </link>
                    
                <link linkend="n730"> Text() </link>
                    
                <link linkend="n731"> TextExtent() </link>
                    
                <link linkend="n732"> TextFit() </link>
                    
                <link linkend="n733"> TextLength() </link>
                    
                <link linkend="n734"> UnlockLayerRom() </link>
                    
                <link linkend="n735"> VBeamPos() </link>
                    
                <link linkend="n736"> VideoControl() </link>
                    
                <link linkend="n737"> WaitBlit() </link>
                    
                <link linkend="n738"> WaitBOVP() </link>
                    
                <link linkend="n739"> WaitTOF() </link>
                    
                <link linkend="n740"> WriteChunkyPixels() </link>
                    
                <link linkend="n741"> WritePixel() </link>
                    
                <link linkend="n742"> WritePixelArray8() </link>
                    
                <link linkend="n743"> WritePixelLine8() </link>
                    
                <link linkend="n744"> XorRectRegion() </link>
                    
                <link linkend="n745"> XorRegionRegion() </link>
            </literallayout>
        </section>
        <section id="n580">
            <title>graphics.library/AddAnimOb</title>
            <literallayout class="monospaced">
                   NAME
	AddAnimOb  --  Add an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 to the linked list of AnimObs.

   SYNOPSIS
	AddAnimOb(anOb, anKey, rp)
	          A0    A1     A2

	void AddAnimOb(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 **, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	Links this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 into the current list pointed to by animKey.
	Initializes all the Timers of the AnimOb's components.
	Calls 
                <link linkend="n581">AddBob</link>
                 with each component's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                .
	rp-&gt;GelsInfo must point to an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">GelsInfo</ulink>
                 structure.

   INPUTS
	anOb  = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 structure to be added to the list
	anKey = address of a pointer to the first 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 in the list
	        (anKey = NULL if there are no AnimObs in the list so far)
	rp    = pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n590">Animate()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
            </literallayout>
        </section>
        <section id="n581">
            <title>graphics.library/AddBob</title>
            <literallayout class="monospaced">
                   NAME
	AddBob -- Adds a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 to current gel list.

   SYNOPSIS
	AddBob(Bob, rp)
	       A0   A1

	void AddBob(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	Sets up the system 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 flags, then links this gel into the list
	via 
                <link linkend="n583">AddVSprite</link>
                .

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 structure to be added to the gel list
	rp  = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <link linkend="n583">AddVSprite()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n582">
            <title>graphics.library/AddFont</title>
            <literallayout class="monospaced">
                   NAME
	AddFont -- add a font to the system list

   SYNOPSIS
	AddFont(textFont)
	        A1

	void AddFont(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *);

   FUNCTION
	This function adds the text font to the system, making it
	available for use by any application.  The font added must be
	in public memory, and remain until successfully removed.

   INPUTS
	textFont - a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 structure in public ram.

   RESULT

   NOTES
	This function will set the tf_Accessors to 0.

   BUGS

   SEE ALSO
	
                <link linkend="n715">SetFont()</link>
                  
                <link linkend="n702">RemFont()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n583">
            <title>graphics.library/AddVSprite</title>
            <literallayout class="monospaced">
                   NAME
	AddVSprite -- Add a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 to the current gel list.

   SYNOPSIS
	AddVSprite(vs, rp)
	           A0  A1

	void AddVSprite(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	Sets up the system 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 flags
	Links this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 into the current gel list using its Y,X

   INPUTS
	vs = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 structure to be added to the gel list
	rp = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                
            </literallayout>
        </section>
        <section id="n584">
            <title>graphics.library/AllocBitMap</title>
            <literallayout class="monospaced">
                   NAME
	AllocBitMap -- 
                <link linkend="n202">Allocate</link>
                 a bitmap and attach bitplanes to it. (V39)


   SYNOPSIS
	bitmap=AllocBitMap(sizex,sizey,depth, flags, friend_bitmap)
	                   d0    d1    d2     d3       a0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *AllocBitMap(ULONG,ULONG,ULONG,ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *);

   FUNCTION
	Allocates and initializes a bitmap structure. Allocates and initializes
	bitplane data, and sets the bitmap's planes to point to it.

   INPUTS
	sizex = the width (in pixels) desired for the bitmap data.

	sizey = the height (in pixels) desired.

	depth = the number of bitplanes deep for the allocation.
		Pixels with AT LEAST this many bits will be allocated.

	flags = BMF_CLEAR to specify that the allocated raster should be
	        filled with color 0.

	        BMF_DISPLAYABLE to specify that this bitmap data should
	        be allocated in such a manner that it can be displayed.
	        Displayable data has more severe alignment restrictions
	        than non-displayable data in some systems.

	        BMF_INTERLEAVED tells graphics that you would like your
	        bitmap to be allocated with one large chunk of display
	        memory for all bitplanes. This minimizes color flashing
	        on deep displays. If there is not enough contiguous RAM
		for an interleaved bitmap, graphics.library will fall
		back to a non-interleaved one.

	        BMF_MINPLANES causes graphics to only allocate enough space
	        in the bitmap structure for "depth" plane pointers. This
		is for system use and should not be used by applications use
		as it is inefficient, and may waste memory.

	friend_bitmap = pointer to another bitmap, or NULL. If this pointer
	        is passed, then the bitmap data will be allocated in
	        the most efficient form for blitting to friend_bitmap.

   BUGS

   NOTES
	When allocating using a friend bitmap, it is not safe to assume
	anything about the structure of the bitmap data if that friend
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 might not be a standard amiga bitmap (for instance, if
	the workbench is running on a non-amiga display device, its
	Screen-&gt;RastPort-&gt;BitMap won't be in standard amiga format.
	The only safe operations to perform on a non-standard 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 are:

	        - blitting it to another bitmap, which must be either a standard
	          Amiga bitmap, or a friend of this bitmap.

	        - blitting from this bitmap to a friend bitmap or to a standard
	          Amiga bitmap.

	        - attaching it to a rastport and making rendering calls.

	Good arguments to pass for the friend_bitmap are your window's
	RPort-&gt;BitMap, and your screen's RastPort-&gt;BitMap.
	Do NOT pass &amp;(screenptr-&gt;BitMap)!

	BitMaps not allocated with BMF_DISPLAYABLE may not be used as
	Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/custom.h">Custom</ulink>
                 BitMaps or as RasInfo-&gt;BitMaps.  They may be blitted
	to a BMF_DISPLAYABLE 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                , using one of the 
                <link linkend="n602">BltBitMap()</link>
                 family of
	functions.

   SEE ALSO
	
                <link linkend="n638">FreeBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n585">
            <title>graphics.library/AllocDBufInfo</title>
            <literallayout class="monospaced">
                   NAME
       AllocDBufInfo -- 
                <link linkend="n202">Allocate</link>
                 structure for multi-buffered animation (V39)

   SYNOPSIS
       AllocDBufInfo(vp)
		      a0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                 * AllocDBufInfo(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *)

   FUNCTION
	Allocates a structure which is used by the 
                <link linkend="n613">ChangeVPBitMap()</link>
                	routine.

   INPUTS
       vp  =  A pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure.

   BUGS

   NOTES
	Returns 0 if there is no memory available or if the display mode
	of the viewport does not support double-buffering.

	The only fields of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                 structure which can be used by application
	programs are the dbi_SafeMessage, dbi_DispMessage, dbi_UserData1 and
	dbi_UserData2 fields.

	dbi_SafeMessage and dbi_DispMessage are standard exec message structures
	which may be used for synchronizing your animation with the screen update.

	dbi_SafeMessage is a message which is replied to when it is safe to write to
	the old 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 (the one which was installed when you called ChangeVPBitMap).

	dbi_DispMessage is replied to when it is safe to call 
                <link linkend="n613">ChangeVPBitMap</link>
                 again
	and be certain that the new frame has been seen at least once.

	The dbi_UserData1 and dbi_UserData2 fields, which are stored after each
	message, are for your application to stuff any data into that it may need
	to examine when looking at the reply coming into the ReplyPort for either
	of the embedded 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">Message</ulink>
                 structures.

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                 structures MUST be allocated with this function. The size of
	the structure will grow in future releases.

	The following fragment shows proper double buffering synchronization:

	int SafeToChange=TRUE, SafeToWrite=TRUE, CurBuffer=1;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *ports[2];    /* reply ports for DispMessage and SafeMessage
*/
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *BmPtrs[2];
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                 *myDBI;

	... allocate bitmap pointers, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                , set up viewports, etc.

	myDBI-&gt;dbi_SafeMessage.mn_ReplyPort=ports[0];
	myDBI-&gt;dbi_DispMessage.mn_ReplyPort=ports[1];
	while (! done)
	{
	    if (! SafeToWrite)
		while(! GetMsg(ports[0])) Wait(1l&lt;&lt;(ports[0]-&gt;mp_SigBit));
	    SafeToWrite=TRUE;

	    ... render to bitmap # CurBuffer.

	    if (! SafeToChange)
		while(! GetMsg(ports[1])) Wait(1l&lt;&lt;(ports[1]-&gt;mp_SigBit));
	    SafeToChange=TRUE;
	    WaitBlit();         /* be sure rendering has finished */
	    ChangeVPBitMap(vp,BmPtrs[CurBuffer],myDBI);
	    SafeToChange=FALSE;
	    SafeToWrite=FALSE;
	    CurBuffer ^=1;	/* toggle current buffer */
	}
       if (! SafeToChange)	/* cleanup pending messages */
	    while(! GetMsg(ports[1])) Wait(1l&lt;&lt;(ports[1]-&gt;mp_SigBit));
       if (! SafeToWrite)	/* cleanup */
	    while(! GetMsg(ports[0])) Wait(1l&lt;&lt;(ports[0]-&gt;mp_SigBit));

   SEE ALSO
	
                <link linkend="n642">FreeDBufInfo()</link>
                 
                <link linkend="n613">ChangeVPBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n586">
            <title>graphics.library/AllocRaster</title>
            <literallayout class="monospaced">
                   NAME
	AllocRaster -- 
                <link linkend="n202">Allocate</link>
                 space for a bitplane.

   SYNOPSIS
	planeptr = AllocRaster( width, height )
	   d0                    d0     d1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">PLANEPTR</ulink>
                 AllocRaster(ULONG,ULONG);

   FUNCTION
	This function calls the memory allocation routines
	to allocate memory space for a bitplane "width" bits
	wide and "height" bits high.

   INPUTS
	width	- number of columns in bitplane
	height	- number of rows in bitplane

   RESULT
	planeptr - pointer to first word in bitplane, or NULL if
		   it was not possible to allocate the desired
		   amount of memory.

   NOTES
	In order to assure proper alignment of display memory, the
	
                <link linkend="n584">AllocBitMap()</link>
                 function should be used instead of AllocRaster
	when you wish to allocate display memory (rasters which are
	attached to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 or Screen).

   BUGS

   SEE ALSO
	
                <link linkend="n644">FreeRaster()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n587">
            <title>graphics.library/AllocSpriteDataA</title>
            <literallayout class="monospaced">
                   NAME
	AllocSpriteDataA -- allocate sprite data and convert from a bitmap. (V39)
	AllocSpriteData -- varargs stub for AllocSpriteData(). (V39)

   SYNOPSIS
	SpritePtr | 0 = AllocSpriteDataA(bitmap,taglist)
	 d0	 	                 a2      a1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 *AllocSpriteDataA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	extsprite=AllocSpriteData(bitmap,tags,...TAG_END)

    FUNCTION
	
                <link linkend="n202">Allocate</link>
                 memory to hold a sprite image, and convert the passed-in
	bitmap data to the appropriate format. The tags allow specification
	of width, scaling, and other options.

   INPUTS
	bitmap - ptr to a bitmap. This bitmap provides the source data for the
		sprite image.

	tags -
		SPRITEA_Width specifies how many pixels wide you desire
		the sprite to be. Specifying a width wider than the hardware
		can handle will cause the function to return failure. If the
		bitmap passed in is narrower than the width asked for, then
		it will be padded on the right with transparent pixels.
		Defaults to 16.

		SPRITEA_XReplication controls the horizontal pixel replication factor
		used when converting the bitmap data. Valid values are:
			0 - perform a 1 to 1 conversion
			1 - each pixel from the source is replicated twice
			    in the output.
			2 - each pixel is replicated 4 times.
		       -1 - skip every other pixel in the source bitmap
		       -2 - only include every fourth pixel from the source.

			This tag is useful for converting data from one resolution
		to another. For instance, hi-res bitmap data can be correctly
		converted for a lo-res sprite by using an x replication factor
		of -1. Defaults to 0.

		SPRITEA_YReplication controls the vertical pixel replication factor
		in the same manner as SPRITEA_XReplication controls the horizontal.

		SPRITEA_OutputHeight specifies how tall the resulting sprite
		should be. Defaults to the bitmap height. The bitmap MUST be at
		least as tall as the output height.

		SPRITEA_Attached tells the function that you wish to convert
		the data for the second sprite in an attached sprite pair.
		This will cause AllocSpriteData() to take its data from the
		3rd and 4th bitplanes of the passed in bitmap.


	Bitplane data is not required to be in chip ram for this function.


   RESULTS
	SpritePtr = a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 structure, or 0 if there is
	a failure. You should pass this pointer to 
                <link linkend="n646">FreeSpriteData()</link>
                 when finished
	with the sprite.

   BUGS
		Under V39, the appropriate attach bits would not be set in the sprite
	data.
		The work-around is to set the bits manually. Bit 7 of the second
	word should be set. On a 32 bit sprite, bit 7 of the 3rd word should
	also be set. For a 64 bit sprite, bit 7 of the 5th word should also be
	set. This should NOT be done under V40, as the bug is fixed.

   SEE ALSO
	
                <link linkend="n646">FreeSpriteData()</link>
                 
                <link linkend="n645">FreeSprite()</link>
                 
                <link linkend="n612">ChangeSprite()</link>
                 
                <link linkend="n682">MoveSprite()</link>
                 
                <link linkend="n654">GetExtSpriteA()</link>
                	
                <link linkend="n584">AllocBitMap()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">graphics/sprite.h</ulink>
                
            </literallayout>
        </section>
        <section id="n588">
            <title>graphics.library/AndRectRegion</title>
            <literallayout class="monospaced">
                   NAME
	AndRectRegion -- Perform 2d AND operation of rectangle
			 with region, leaving result in region.

   SYNOPSIS
	AndRectRegion(region,rectangle)
 			a0	a1

	void AndRectRegion( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 * );

   FUNCTION
	Clip away any portion of the region that exists outside
	of the rectangle. Leave the result in region.

   INPUTS
	region - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure
	rectangle - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 structure

   NOTES
	Unlike the other rect-region primitives, AndRectRegion() cannot
	fail.

   BUGS

   SEE ALSO
	
                <link linkend="n589">AndRegionRegion()</link>
                 
                <link linkend="n690">OrRectRegion()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n589">
            <title>graphics.library/AndRegionRegion</title>
            <literallayout class="monospaced">
                   NAME 
       AndRegionRegion -- Perform 2d AND operation of one region
                       with second region, leaving result in second region.

   SYNOPSIS 
       status = AndRegionRegion(region1,region2)
          d0                       a0      a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AndregionRegion(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 * );

   FUNCTION 
       
                <link linkend="n276">Remove</link>
                 any portion of region2 that is not in region1.

   INPUTS 
       region1 - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure
       region2 - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure to use and for result

   RESULTS
	status - return TRUE if successful operation
		 return FALSE if ran out of memory

   BUGS 

   SEE ALSO
	
                <link linkend="n691">OrRegionRegion()</link>
                 
                <link linkend="n588">AndRectRegion()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n590">
            <title>graphics.library/Animate</title>
            <literallayout class="monospaced">
                   NAME
	Animate  --  Processes every 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 in the current animation list.

   SYNOPSIS
	Animate(anKey, rp)
	        A0     A1

	void Animate(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 **, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	For every 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 in the list
	    - update its location and velocities
	    - call the AnimOb's special routine if one is supplied
	    - for each component of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                	        - if this sequence times out, switch to the new one
	        - call this component's special routine if one is supplied
	        - set the sequence's VSprite's y,x coordinates based
	          on whatever these routines cause

   INPUTS
	ankey = address of the variable that points to the head 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                	rp    = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n580">AddAnimOb()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n591">
            <title>graphics.library/AreaCircle</title>
            <literallayout class="monospaced">
                    NAME
	AreaCircle -- add a circle to areainfo list for areafill.


    SYNOPSIS
	error = (int) AreaCircle( rp,  cx,  cy, radius)
	D0			  A1   D0   D1	D2

	ULONG AreaCircle(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, WORD, WORD, UWORD);

    FUNCTION
	Add circle to the vector buffer. It will be drawn to the rastport when
	
                <link linkend="n594">AreaEnd</link>
                 is executed.

    INPUTS
	rp	 - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure

	cx, cy   - the coordinates of the center of the desired circle.

	radius	 - is the radius of the circle to draw around the centerpoint.

    RESULTS
	0 if no error
	-1 if no space left in vector list

    NOTES
	This function is actually a macro which calls
	    AreaEllipse(rp,cx,cy,radius,radius).

    SEE ALSO
	
                <link linkend="n595">AreaMove()</link>
                 
                <link linkend="n592">AreaDraw()</link>
                 AreaCircle() 
                <link linkend="n666">InitArea()</link>
                 
                <link linkend="n594">AreaEnd()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxmacros.h">graphics/gfxmacros.h</ulink>
                
            </literallayout>
        </section>
        <section id="n592">
            <title>graphics.library/AreaDraw</title>
            <literallayout class="monospaced">
                   NAME
	AreaDraw -- Add a point to a list of end points for areafill.


   SYNOPSIS
	error = AreaDraw( rp,  x,     y)
	  d0	          A1 D0:16 D1:16

	ULONG AreaDraw( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , SHORT);

   FUNCTION
	Add point to the vector buffer.


   INPUTS
	rp	- points to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.
	x,y	- are coordinates of a point in the raster.

   RESULT
	error	- zero for success, else -1 if no there was no space
		  left in the vector list.

   BUGS

   SEE ALSO
	
                <link linkend="n595">AreaMove()</link>
                 
                <link linkend="n666">InitArea()</link>
                 
                <link linkend="n594">AreaEnd()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n593">
            <title>graphics.library/AreaEllipse</title>
            <literallayout class="monospaced">
                    NAME
	AreaEllipse -- add a ellipse to areainfo list for areafill.


    SYNOPSIS
	error = AreaEllipse( rp, cx,   cy,   a,    b    )
	d0		     a1  d0:16 d1:16 d2:16 d3:16

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AreaEllipse( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , SHORT)

    FUNCTION
	Add an ellipse to the vector buffer. It will be draw when 
                <link linkend="n594">AreaEnd()</link>
                 is
	called.

    INPUTS
	rp - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	cx - x coordinate of the centerpoint relative to the rastport.
	cy - y coordinate of the centerpoint relative to the rastport.
	a  - the horizontal radius of the ellipse (note: a must be &gt; 0)
	b  - the vertical radius of the ellipse (note: b must be &gt; 0)

    RESULT
	error - zero for success, or -1 if there is no space left in the
		vector list

    SEE ALSO
	
                <link linkend="n595">AreaMove()</link>
                 
                <link linkend="n592">AreaDraw()</link>
                 
                <link linkend="n591">AreaCircle()</link>
                 
                <link linkend="n666">InitArea()</link>
                 
                <link linkend="n594">AreaEnd()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n594">
            <title>graphics.library/AreaEnd</title>
            <literallayout class="monospaced">
                   NAME
	AreaEnd -- 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 table of vectors and ellipses and produce areafill.


   SYNOPSIS
	error = AreaEnd(rp)
	  d0  	        A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AreaEnd( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 * );

   FUNCTION
	Trigger the filling operation.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 the vector buffer and generate required
	fill into the raster planes. After the fill is complete, reinitialize
	for the next 
                <link linkend="n595">AreaMove</link>
                 or 
                <link linkend="n593">AreaEllipse</link>
                . Use the raster set up by
	
                <link linkend="n672">InitTmpRas</link>
                 when generating an areafill mask.

   RESULT
	error - zero for success, or -1 if an error occurred anywhere.

   INPUTS
	rp - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure which specifies where the filled
	     regions will be rendered to.

   BUGS

   SEE ALSO
	
                <link linkend="n666">InitArea()</link>
                 
                <link linkend="n595">AreaMove()</link>
                 
                <link linkend="n592">AreaDraw()</link>
                 
                <link linkend="n593">AreaEllipse()</link>
                  
                <link linkend="n672">InitTmpRas()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n595">
            <title>graphics.library/AreaMove</title>
            <literallayout class="monospaced">
                   NAME
	AreaMove -- Define a new starting point for a new
	            shape in the vector list.


   SYNOPSIS
	error =  AreaMove( rp,   x,     y)
	 d0                a1  d0:16  d1:16

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AreaMove( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                 );

   FUNCTION
	
                <link linkend="n49">Close</link>
                  the last polygon and start another polygon
	at  (x,y). Add the necessary  points  to  vector
	buffer. Closing a polygon may result in the generation
	of another 
                <link linkend="n592">AreaDraw()</link>
                 to close previous polygon.
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 to have an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">AreaInfo</ulink>
                 structure attached
	to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   INPUTS
	rp  - points to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	x,y - positions in the raster

   RETURNS
	error - zero for success, or -1 if there is no space left in the
	vector list

   BUGS

   SEE ALSO
	
                <link linkend="n666">InitArea()</link>
                 
                <link linkend="n592">AreaDraw()</link>
                 
                <link linkend="n593">AreaEllipse()</link>
                 
                <link linkend="n594">AreaEnd()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n596">
            <title>graphics.library/AskFont</title>
            <literallayout class="monospaced">
                   NAME
	AskFont -- get the text attributes of the current font

   SYNOPSIS
	AskFont(rp, textAttr)
	        A1  A0

	void AskFont(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 *);

   FUNCTION
	This function fills the text attributes structure with the
	attributes of the current font in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   INPUTS
	rp       - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 from which the text attributes are
	           extracted
	textAttr - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 structure to be filled.  Note that
	           there is no support for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TTextAttr</ulink>
                .

   RESULT
	The textAttr structure is filled with the RastPort's text
	attributes.

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n597">
            <title>graphics.library/AskSoftStyle</title>
            <literallayout class="monospaced">
                   NAME
	AskSoftStyle -- Get the soft style bits of the current font.

   SYNOPSIS
	enable = AskSoftStyle(rp)
	D0                    A1

	ULONG AskSoftStyle(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	This function returns those style bits of the current font
	that are not intrinsic in the font itself, but
	algorithmically generated.  These are the bits that are
	valid to set in the enable mask for 
                <link linkend="n725">SetSoftStyle()</link>
                .

   INPUTS
	rp - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 from which the font and style	are extracted.

   RESULTS
	enable - those bits in the style algorithmically generated.
	         Style bits that are not defined are also set.

   BUGS

   SEE ALSO
	
                <link linkend="n725">SetSoftStyle()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n598">
            <title>graphics.library/AttachPalExtra</title>
            <literallayout class="monospaced">
                   NAME
       AttachPalExtra -- 
                <link linkend="n202">Allocate</link>
                 and attach a palette sharing structure to a

	                  colormap. (V39)


   SYNOPSIS
       status=AttachPalExtra( cm, vp)
	                       a0  a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AttachPalExtra( Struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *);

   FUNCTION
	Allocates and attaches a PalExtra structure to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                .
	This is necessary for color palette sharing to work. The
	PalExtra structure will be freed by 
                <link linkend="n639">FreeColorMap()</link>
                .
	The set of available colors will be determined by the mode
	and depth of the viewport.

   INPUTS
	cm  =  A pointer to a color map created by 
                <link linkend="n651">GetColorMap()</link>
                .

	vp   = A pointer to the viewport structure associated with
	       the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                .

   RESULTS
	status - 0 if sucessful, else an error number. The only currently
	         defined error number is out of memory (1).

   BUGS

   NOTES
	This function is for use with custom ViewPorts and custom ColorMaps,
	as Intuition attaches a PalExtra to all of its Screens.
	If there is already a PalExtra associated with the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                , then
	this function will do nothing.

   SEE ALSO
	
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n639">FreeColorMap()</link>
                 
                <link linkend="n687">ObtainPen()</link>
                 
                <link linkend="n686">ObtainBestPenA()</link>
                
            </literallayout>
        </section>
        <section id="n599">
            <title>graphics.library/AttemptLockLayerRom</title>
            <literallayout class="monospaced">
                                           *
   NAME
	AttemptLockLayerRom -- Attempt to 
                <link linkend="n110">Lock</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure
					 by ROM(gfx lib) code

   SYNOPSIS
	gotit = AttemptLockLayerRom( layer )
	 d0			      a5

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AttempLockLayerRom( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 * );

   FUNCTION
	Query the current state of the lock on this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                . If it is
	already locked then return FALSE, could not lock. If the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 was not locked then lock it and return TRUE.
	This call does not destroy any registers.
	This call nests so that callers in this chain will not lock
	themselves out.

   INPUTS
	layer - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure

   RESULT
	gotit - TRUE or FALSE depending on whether the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 was
		successfully locked by the caller.

   SEE ALSO
	
                <link linkend="n678">LockLayerRom()</link>
                 
                <link linkend="n734">UnlockLayerRom()</link>
                
            </literallayout>
        </section>
        <section id="n600">
            <title>graphics.library/BestModeIDA</title>
            <literallayout class="monospaced">
                   NAME
	BestModeIDA -- calculate the best ModeID with given parameters (V39)
	BestModeID  -- varargs stub for BestModeIDA()

   SYNOPSIS
	ID = BestModeIDA(TagItems)
	d0               a0

	ULONG BestModeIDA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	ID = BestModeID(Tag1, ...)

	ULONG BestModeID(ULONG, ...);

   FUNCTION
	To determine the best ModeID to fit the parameters set in the TagList.

   INPUTS
	TagItems - A pointer to an array of TagItems.

   TAGS
	BIDTAG_DIPFMustHave (ULONG) - Mask of DIPF_ flags
	       (from DisplayInfo-&gt;PropertyFlags) that the returned ModeID
	       must have.
	       Default - NULL

	BIDTAG_DIPFMustNotHave (ULONG) - Mask of DIPF_ flags that the
	       returned ModeID must not have.
	       Default - SPECIAL_FLAGS

	BIDTAG_ViewPort (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *) - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 for which a best-fit
	       ModeID is sought.
	       Default - NULL

	BIDTAG_NominalWidth (UWORD),
	BIDTAG_NominalHeight (UWORD) - together make the aspect ratio.
	       These values override the vp-&gt;DWidth and vp-&gt;DHeight values
	       in the given 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .
	       Default - SourceID NominalDimensionInfo if BIDTAG_SourceID is
	       passed, or vp-&gt;DWidth and vp-&gt;DHeight if BIDTAG_ViewPort is
	       passed, or 640 x 200.

	BIDTAG_DesiredWidth (UWORD),
	BIDTAG_DesiredHeight (UWORD) - Used to distinguish between two
	       mode IDs with identical aspect ratios.
	       Default - same values as NominalWidth and NominalHeight.

	BIDTAG_Depth (UBYTE) - minimum the returned ModeID must support.
	       Default - vp-&gt;RasInfo-&gt;BitMap-&gt;Depth if BIDTAG_ViewPort is
	       passed, else 1.

	BIDTAG_MonitorID (ULONG) - returned ModeID must use this monitor.
	       Default - will not restrict the search to any particular monitor

	BIDTAG_SourceID (ULONG) - Use this ModeID instead of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .
	       If specified, the DIPFMustHave mask is made up of the
	       ((DisplayInfo-&gt;PropertyFlags of this ID &amp; SPECIAL_FLAGS) |
	        DIPFMustHave flags).
	       Default - VPModeID(vp) if BIDTAG_ViewPort was passed, else the
	       DIPFMustHave and DIPFMustNotHave masks are left unchanged.

	BIDTAG_RedBits (UBYTE),
	BIDTAG_BlueBits (UBYTE),
	BIDTAG_Greenits (UBYTE) - Minimum bits per gun the resultant
	       ModeID must support.
	       Default - 4 bits per gun.

   RESULTS
	ID      - ID of the best mode to use, or INVALID_ID if a match could
	          not be found.

   NOTES
	This function takes into account the Compatability of the Monitor
	being matched to, and the source 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 or ModeID.
	Incompatibilitys will cause a result of INVALID_ID.

	BIDTAG_NominalWidth, BIDTAG_NominalHeight,
	BIDTAG_DesiredWidth, BIDTAG_DesiredHeight, must all be non-0.

	The comparisons are made against the DimensionInfo-&gt;Nominal values.
	ie, this will not return a best fit against overscan dimensions.

   EXAMPLE
	IFF Display Program with a HAM image, to be displayed in the same
	monitor type as the Workbench 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .

	ID = BestModeID(BIDTAG_NominalWidth, IFFImage-&gt;Width,
	                BIDTAG_NominalHeight, IFFImage-&gt;Height,
	                BIDTAG_Depth, IFFImage-&gt;Depth,
	                BIDTAG_DIPFMustHave, DIPF_IS_HAM,
	                BIDTAG_MonitorID, (GetVPModeID(WbVP) &amp; MONITOR_ID_MASK),
	                TAG_END);

	To make an interlace version of a ViewPort:

	ID = BestModeID(BIDTAG_ViewPort, ThisViewPort,
	                BIDTAG_MustHave, DIFP_IS_LACE,
	                TAG_END);

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/modeid.h">&lt;graphics/modeid.h&gt;</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">&lt;graphics/displayinfo.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n601">
            <title>graphics.library/BitMapScale</title>
            <literallayout class="monospaced">
                   NAME
	BitMapScale -- Perform raster scaling on a bit map. (V36)

   SYNOPSIS
	BitMapScale(bitScaleArgs)
	            A0

	void BitMapScale(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/scale.h">BitScaleArgs</ulink>
                 *);

   FUNCTION
	Scale a source bit map to a non-overlapping destination
	bit map.

   INPUTS
	bitScaleArgs - structure of parameters describing scale:
	    bsa_SrcX, bsa_SrcY - origin of the source bits.
	    bsa_SrcWidth, bsa_SrcHeight - number of bits to scale from in x
	    and y.
	    bsa_DestX, bsa_DestY - origin of the destination.
	    bsa_DestWidth, bsa_DestHeight - resulting number of bits in x
	    and y.  NOTE: these values are set by this function.
	    bsa_XSrcFactor:bsa_XDestFactor - equivalent to the ratio
	        srcWidth:destWidth, but not necessarily the same
	        numbers.  Each must be in the range 1..16383.
	    bsa_YSrcFactor:bsa_YDestFactor - equivalent to the ratio
	        srcHeight:destHeight, but not necessarily the same
	        numbers.  Each must be in the range 1..16383.
	    bsa_SrcBitMap - source of the bits to scale.
	    bsa_DestBitMap - destination for the bits to scale.  This had
	        better be big enough!
	    bsa_Flags - future scaling options.  Set it to zero!
	    bsa_XDDA, bsa_YDDA - for future use.  Need not be set by user.
	    bsa_Reserved1, bsa_Reserved2 - for future use.  Need not be set.

   RESULT
	The destWidth, destHeight fields are set by this function as
	described above.

   NOTES
	o   This function may use the blitter.
	o   Overlapping source and destination bit maps are not
	    supported.
	o   No check is made to ensure destBitMap is big enough: use
	    
                <link linkend="n705">ScalerDiv</link>
                 to calculate a destination dimension.

   BUGS
	o   This function does not use the HighRes Agnus 'Big Blit'
	    facility. You should not use XSrcFactor == XDestFactor,
	    where SrcWidth or DestWidth &gt; 1024.

	o   Also, the blitter is used when expanding in the Y direction.
	    You should not expand in the Y direction if
	    ((DestX &amp; 0xf) + DestWidth) &gt;= 1024 pixels. (Up to 1008 pixels
	    is always safe).

   SEE ALSO
	
                <link linkend="n705">ScalerDiv()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/scale.h">graphics/scale.h</ulink>
                
            </literallayout>
        </section>
        <section id="n602">
            <title>graphics.library/BltBitMap</title>
            <literallayout class="monospaced">
                   NAME
	BltBitMap -- 
                <link linkend="n681">Move</link>
                 a rectangular region of bits in a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .

   SYNOPSIS
	planecnt = BltBitMap(SrcBitMap, SrcX, SrcY, DstBitMap,
	D0                   A0         D0:16 D1:16 A1
	    DstX, DstY, SizeX, SizeY, Minterm, Mask [, TempA])
	    D2:16 D3:16 D4:16  D5:16  D6:8     D7:8   [A2]

	ULONG BltBitMap(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *, WORD, WORD, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *,
	    WORD, WORD, WORD, WORD, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 *);

   FUNCTION
	Perform non-destructive blits to move a rectangle from one
	area in a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 to another area, which can be on a different
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .
	This blit is assumed to be friendly: no error conditions (e.g.
	a rectangle outside the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 bounds) are tested or reported.

   INPUTS
	SrcBitMap, DstBitMap - the BitMap(s) containing the
	      rectangles
	    - the planes copied from the source to the destination are
	      only those whose plane numbers are identical and less
	      than the minimum Depth of either 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 and whose Mask
	      bit for that plane is non-zero.
	    - as a special case, if a plane pointer in the SrcBitMap
	      is zero, it acts as a pointer to a plane of all zeros, and
	      if the plane pointer is 0xffffffff, it acts as a pointer
	      to a plane of all ones.  (Note: new for V36)
	    - SrcBitMap and DstBitMap can be identical if they point
	      to actual planes.
	SrcX, SrcY - the x and y coordinates of the upper left corner
	    of the source rectangle.  Valid range is positive
	    signed integer such that the raster word's offset
	    0..(32767-Size)
	DstX, DstY - the x and y coordinates of the upper left
	    corner of the destination for the rectangle.  Valid
	    range is as for Src.
	SizeX, SizeY - the size of the rectangle to be moved.  Valid
	    range is (X: 1..976; Y: 1..1023 such that final raster
	    word's offset is 0..32767)
	Minterm - the logic function to apply to the rectangle when
	    A is non-zero (i.e. within the rectangle).  B is the
	    source rectangle and C, D is the destination for the
	    rectangle.
	    - $0C0 is a vanilla copy
	    - $030 inverts the source before the copy
	    - $050 ignores the source and inverts the destination
	    - see the hardware reference manual for other combinations
	Mask - the write mask to apply to this operation.  Bits set
	    indicate the corresponding planes (if not greater than
	    the minimum plane count) are to participate in the
	    operation.  Typically this is set to 0xff.
	TempA - If the copy overlaps exactly to the left or right
	    (i.e. the scan line addresses overlap), and TempA is
	    non-zero, it points to enough chip accessible memory
	    to hold a line of A source for the blit (ie CHIP RAM).
	    BltBitMap will allocate (and free) the needed TempA if
	    none is provided and one is needed.  Blit overlap is
	    determined from the relation of the first non-masked
	    planes in the source and destination bit maps.

   RESULTS
	planecnt - the number of planes actually involved in the blit.

   NOTES
	o   This function may use the blitter.

   SEE ALSO
	
                <link linkend="n619">ClipBlit()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/blit.h">hardware/blit.h</ulink>
                
            </literallayout>
        </section>
        <section id="n603">
            <title>graphics.library/BltBitMapRastPort</title>
            <literallayout class="monospaced">
                   NAME
	BltBitMapRastPort -- Blit from source bitmap to destination rastport.

   SYNOPSIS
	error = BltBitMapRastPort
	        (srcbm, srcx, srcy, destrp, destX, destY, sizeX, sizeY, minterm)
	 D0      A0     D0    D1    A1      D2     D3     D4     D5     D6

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 BltBitMapRastPort
	     (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *, WORD, WORD, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, WORD, WORD,
	      WORD, WORD, UBYTE);

   FUNCTION
	Blits from source bitmap to position specified in destination rastport
	using minterm.

   INPUTS
	srcbm   - a pointer to the source bitmap
	srcx    - x offset into source bitmap
	srcy    - y offset into source bitmap
	destrp  - a pointer to the destination rastport
	destX   - x offset into dest rastport
	destY   - y offset into dest rastport
	sizeX   - width of blit in pixels
	sizeY   - height of blit in rows
	minterm - minterm to use for this blit

   RESULT
	TRUE

   BUGS

   SEE ALSO
	
                <link linkend="n605">BltMaskBitMapRastPort()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n604">
            <title>graphics.library/BltClear</title>
            <literallayout class="monospaced">   NAME   

	BltClear - Clear a block of memory words to zero.

   SYNOPSIS
	BltClear( memBlock, bytecount, flags )
		    a1         d0       d1

	void BltClear( void *, ULONG, ULONG );

   FUNCTION
	For memory that is local and blitter accessible, the most
	efficient way to clear a range of memory locations is
       to use the system's most efficient data mover, the blitter.
       This command accepts the starting location and count and clears
       that block to zeros.

   INPUTS
	memBloc	- pointer to local memory to be cleared
		  memBlock is assumed to be even.
	flags	- set bit 0 to force function to wait until
		  the blit is done.
		  set bit 1 to use row/bytesperrow.

	bytecount - if (flags &amp; 2) == 0 then
				even number of bytes to clear.
			else
				low 16 bits is taken as number of bytes
				per row and upper 16 bits taken as
				number of rows.

	This function is somewhat hardware dependent. In the rows/bytesperrow
	mode (with the pre-ECS blitter) rows must be &lt;- 1024. In bytecount mode
	multiple runs of the blitter may be used to clear all the memory.

	Set bit 2 to use the upper 16 bits of the Flags as the data to fill
	memory with instead of 0 (V36).

   RESULT
	The block of memory is initialized.

   BUGS

   SEE ALSO
</literallayout>
        </section>
        <section id="n605">
            <title>graphics.library/BltMaskBitMapRastPort</title>
            <literallayout class="monospaced">
                   NAME
	BltMaskBitMapRastPort -- blit from source bitmap to destination rastport
	with masking of source image.

   SYNOPSIS
	BltMaskBitMapRastPort
	    (srcbm, srcx, srcy, destrp, destX, destY, sizeX, sizeY,
	     A0     D0    D1    A1      D2     D3     D4     D5
	     minterm, bltmask)
	     D6       A2

	void BltMaskBitMapRastPort
	     (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *, WORD, WORD, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, WORD, WORD,
	      WORD, WORD, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                , APTR);

   FUNCTION
	Blits from source bitmap to position specified in destination rastport
	using bltmask to determine where source overlays destination, and
	minterm to determine whether to copy the source image "as is" or
	to "invert" the sense of the source image when copying. In either
	case, blit only occurs where the mask is non-zero.

   INPUTS
	srcbm   - a pointer to the source bitmap
	srcx    - x offset into source bitmap
	srcy    - y offset into source bitmap
	destrp  - a pointer to the destination rastport
	destX   - x offset into dest rastport
	destY   - y offset into dest rastport
	sizeX   - width of blit in pixels
	sizeY   - height of blit in rows
	minterm - either (ABC|ABNC|ANBC) if copy source and blit thru mask
	          or     (ANBC)          if invert source and blit thru mask
	bltmask - pointer to the single bit-plane mask, which must be the
	          same size and dimensions as the planes of the
	          source bitmap.

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n603">BltBitMapRastPort()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n606">
            <title>graphics.library/BltPattern</title>
            <literallayout class="monospaced">
                   NAME
	BltPattern --  Using standard drawing rules for areafill,
					 blit through a mask.

   SYNOPSIS
       BltPattern(rp, mask, xl, yl, maxx, maxy, bytecnt)
                  a1,  a0   d0  d1   d2   d3     d4

	void BltPattern
	   (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, void *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , SHORT);

   FUNCTION
       Blit using drawmode,areafill pattern, and mask
       at position rectangle (xl,yl) (maxx,maxy).

   INPUTS
       rp    -  points to the destination 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 for the blit.
       mask  -  points to 2 dimensional mask if needed
                if mask == NULL then use a rectangle.
       xl,yl -  coordinates of upper left of rectangular region in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                       maxx,maxy - points to lower right of rectangular region in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                       bytecnt - BytesPerRow for mask

   RESULT

   SEE ALSO
	
                <link linkend="n594">AreaEnd()</link>
                
            </literallayout>
        </section>
        <section id="n607">
            <title>graphics.library/BltTemplate</title>
            <literallayout class="monospaced">
                   NAME
	BltTemplate -- Cookie cut a shape in a rectangle to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SYNOPSIS
	BltTemplate(SrcTemplate, SrcX, SrcMod, rp,
	            A0           D0:16  D1:16  A1
	    DstX,  DstY, SizeX, SizeY)
	    D2:16  D3:16 D4:16  D5:16

	void BltTemplate(UWORD *, WORD, WORD, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *,
	     WORD, WORD, WORD, WORD);

   FUNCTION
	This function draws the image in the template into the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 in the current color and drawing mode at the
	specified position.  The template is assumed not to overlap
	the destination.
	If the template falls outside the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 boundary, it is
	truncated to that boundary.

	Note: the SrcTemplate pointer should point to the "nearest" word
	   (rounded down) of the template mask. Fine alignment of the mask
	   is achieved by setting the SrcX bit offseet within the range
	   of 0 to 15 decimal.

   INPUTS
	SrcTemplate  - pointer to the first (nearest) word of the template mask.
	SrcX         - x bit offset into the template mask (range 0..15).
	SrcMod       - number of bytes per row in template mask.
	rp           - pointer to destination 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .
	DstX, DstY   - x and y coordinates of the upper left
	               corner of the destination for the blit.
	SizeX, SizeY - size of the rectangle to be used as the
	               template.

   NOTES
	o   This function may use the blitter.

   SEE ALSO
	
                <link linkend="n602">BltBitMap()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n608">
            <title>graphics.library/CalcIVG</title>
            <literallayout class="monospaced">
                   NAME
	CalcIVG -- Calculate the number of blank lines above a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 (V39)

   SYNOPSIS
	count = CalcIVG(View, ViewPort)
	 d0.w           a0    a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 CalcIVG(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *);

   FUNCTION
	To calculate the maximum number of blank lines above a viewport needed to
	load all the copper instructions, after accounting for the viewport
	bandwidth and size.

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                       - pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                   - pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 you are interested in.

   RESULT
	count      - the number of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 resolution scan lines needed to
	             execute all the copper instructions for 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                ,
	             or 0 if any error.

   NOTES
	The number of copper instructions comes from the vp-&gt;vp_DspIns list.
	Although there may be other copper instructions in the final list (from
	UCopIns, SprIns and ClrIns) they are currently ignored for this
	function. This also means that if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 has never been made
	(for example, the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 of an intuition screen was opened behind)
	then vp-&gt;vp_DspIns is NULL.

	Although CalcIVG() returns the true number of lines needed by the
	copper, intuition still maintains an inter-screen gap of 3 non-laced
	lines (6 interlaced). Therefore, for intuition screens use:
	MAX(CalcIVG(v, vp), (islaced ? 6 : 3))


   SEE ALSO
	
                <link linkend="n665">GfxNew()</link>
                  
                <link linkend="n736">VideoControl()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n609">
            <title>graphics.library/CBump</title>
            <literallayout class="monospaced">
                   NAME
	CBump -  increment user copper list pointer (bump to next position in list).

   SYNOPSIS
	CBump( c )
	      a1

	void CBump( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 * );

   FUNCTION
	Increment pointer to space for next instruction in user copper list.

   INPUTS
	c - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 structure

   RESULTS
	User copper list pointer is incremented to next position.
	Pointer is repositioned to next user copperlist instruction block
	if the current block is full.

	    Note: CBump is usually invoked for the programmer as part of the
	          macro definitions 
                <link linkend="n625">CWAIT</link>
                 or 
                <link linkend="n622">CMOVE</link>
                .

   BUGS

   SEE ALSO
	CINIT() CWAIT() CMOVE() CEND() 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">graphics/copper.h</ulink>
            </literallayout>
        </section>
        <section id="n610">
            <title>graphics.library/CEND</title>
            <literallayout class="monospaced">
                   NAME
	CEND -- Terminate user copper list.

   SYNOPSIS
	CEND( c )

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 *c;

   FUNCTION
	Add instruction to terminate user copper list.

   INPUTS
	c - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 structure

   RESULTS
	This is actually a macro that calls the macro CWAIT(c,10000,255)
	10000 is a magical number that the graphics.library uses.
	I hope display technology doesn't catch up too fast!

   BUGS

   SEE ALSO
	CINIT() CWAIT() CMOVE() 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">graphics/copper.h</ulink>
            </literallayout>
        </section>
        <section id="n611">
            <title>graphics.library/ChangeExtSpriteA</title>
            <literallayout class="monospaced">
                   NAME
       ChangeExtSpriteA -- Change the sprite image pointer. (V39)

   SYNOPSIS
       ChangeExtSpriteA( vp, oldsprite, newsprite, tags)
                     	  a0  a1   	 a2	    a3

	success=ChangeExtSpriteA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 *,
			struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 *, struct TagList *);

	success=ChangeExtSprite(vp,old_sp,new_sp,tag,....);

   FUNCTION 
	Attempt to change which sprite is displayed for a given
	sprite engine.

   INPUTS
       vp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure that this sprite is
		  relative to,  or 0 if relative only top of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                	oldsprite - pointer the old 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 structure
	newsprite - pointer to the new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 structure.

   RESULTS 
 	success - 0 if there was an error.
   BUGS 

   SEE ALSO
	
                <link linkend="n645">FreeSprite()</link>
                 
                <link linkend="n612">ChangeSprite()</link>
                 
                <link linkend="n682">MoveSprite()</link>
                 
                <link linkend="n587">AllocSpriteDataA()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">graphics/sprite.h</ulink>
                
            </literallayout>
        </section>
        <section id="n612">
            <title>graphics.library/ChangeSprite</title>
            <literallayout class="monospaced">
                   NAME
       ChangeSprite -- Change the sprite image pointer.

   SYNOPSIS
       ChangeSprite( vp, s, newdata)
                     a0  a1   a2

	void ChangeSprite(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 *, void * )

   FUNCTION 
	The sprite image is changed to use the data starting at newdata

   INPUTS
       vp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure that this sprite is
		  relative to,  or 0 if relative only top of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                	s - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 structure
	newdata	- pointer to data structure of the following form.
		struct spriteimage
		{
		    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                    posctl[2];	/* used by simple sprite machine*/
		    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                    data[height][2];   /* actual sprite image */
		    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                    reserved[2];	/* initialized to */
			                             /*  0x0,0x0 */
		};
	The programmer must initialize reserved[2].  Spriteimage must be
	in CHIP memory. The height subfield of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 structure
	must be set to reflect the height of the new spriteimage BEFORE
	calling ChangeSprite(). The programmer may allocate two sprites to
	handle a single attached sprite.  After 
                <link linkend="n660">GetSprite()</link>
                , ChangeSprite(),
	the programmer can set the SPRITE_ATTACHED bit in posctl[1] of the
	odd numbered sprite.
	If you need more than 8 sprites, look up VSprites in the
	graphics documentation.

   RESULTS 

   BUGS 

   SEE ALSO
	
                <link linkend="n645">FreeSprite()</link>
                 ChangeSprite() 
                <link linkend="n682">MoveSprite()</link>
                 
                <link linkend="n583">AddVSprite()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">graphics/sprite.h</ulink>
                
            </literallayout>
        </section>
        <section id="n613">
            <title>graphics.library/ChangeVPBitMap</title>
            <literallayout class="monospaced">
                   NAME
       ChangeVPBitMap -- change display memory address for multi-buffered
			  animation (V39)

   SYNOPSIS
       ChangeVPBitMap(vp,bm,db)
	               a0 a1 a2

	void ChangeVPBitMap(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                 *);

   FUNCTION
	Changes the area of display memory which will be displayed in a
	viewport. This can be used to implement double (or triple)
	buffering, a method of achieving smooth animation.

   INPUTS
	vp  =  a pointer to a viewport
       bm  = a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 structure. This 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 structure must be
	      of the same layout as the one attached to the viewport (same
	      depth, alignment, and BytesPerRow).
	db  =  A pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                .

   BUGS

   NOTES
	This will set the vp-&gt;RasInfo-&gt;BitMap field to the bm pointer which is
	passed.

	When using the synchronization features, you MUST carefully insure that
	all messages have been replied to before calling 
                <link linkend="n642">FreeDBufInfo</link>
                 or
	calling ChangeVPBitMap with the same 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                .


   SEE ALSO
	
                <link linkend="n585">AllocDBufInfo()</link>
                 
                <link linkend="n584">AllocBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n614">
            <title>graphics.library/CINIT</title>
            <literallayout class="monospaced">
                   NAME
	CINIT -- Initialize user copperlist to accept intermediate
		 user copper instructions.

   SYNOPSIS
 	cl = CINIT( ucl , n )

	cl = UCopperListInit( ucl , n )
			      a0    d0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">CopList</ulink>
                 *UCopperListInit( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

   FUNCTION
	Allocates and/or initialize copperlist structures/buffers
	internal to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 structure.

	This is a macro that calls UCopListInit. You must pass a
	(non-initialized) 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 to CINIT (CINIT will NOT allocate
	a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 if ucl==0 ). If (ucl != 0) it will initialize the
	intermediate data buffers internal to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                .

	The maximum number of intermediate copper list instructions
	that these internal 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">CopList</ulink>
                 data buffers contain is specified
	as the parameter n.

   INPUTS
	ucl - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 structure
	n - number of instructions buffer must be able to hold

   RESULTS
	cl- a pointer to a buffer which will accept n intermediate copper
	    instructions.

	NOTE: this is NOT a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 pointer, rather a pointer to the
	      UCopList's-&gt;FirstCopList sub-structure.

   BUGS
	CINIT will not actually allocate a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 if ucl==0.
	Instead you must allocate a block MEMF_PUBLIC|MEMF_CLEAR, the
	sizeof(struct UCopList) and pass it to this function.

	The system's 
                <link linkend="n647">FreeVPortCopLists</link>
                 function will take care of
	deallocating it if they are called.

	Prior to release V36 the  CINIT macro had { } braces surrounding
	the definition, preventing the proper return of the result value.
	These braces have been removed for the V36 include definitions.

   SEE ALSO
 	CINIT() CMOVE() CEND() 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">graphics/copper.h</ulink>
                
            </literallayout>
        </section>
        <section id="n615">
            <title>graphics.library/ClearEOL</title>
            <literallayout class="monospaced">
                   NAME
	ClearEOL -- Clear from current position to end of line.

   SYNOPSIS
	ClearEOL(rp)
	         A1

	void ClearEOL(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	Clear a rectangular swath from the current position to the
	right edge of the rastPort.  The height of the swath is taken
	from that of the current text font, and the vertical
	positioning of the swath is adjusted by the text baseline,
	such that text output at this position would lie wholly on
	this newly cleared area.
	Clearing consists of setting the color of the swath to zero,
	or, if the DrawMode is 2, to the BgPen.

   INPUTS
	rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure

   RESULT

   NOTES
	o   This function may use the blitter.

   SEE ALSO
	
                <link linkend="n730">Text()</link>
                  
                <link linkend="n618">ClearScreen()</link>
                  
                <link linkend="n719">SetRast()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n616">
            <title>graphics.library/ClearRectRegion</title>
            <literallayout class="monospaced">
                   NAME
	ClearRectRegion -- Perform 2d CLEAR operation of rectangle
			with region, leaving result in region.

   SYNOPSIS
	status = ClearRectRegion(region,rectangle)
	 d0	 	 	  a0 	  a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ClearRectRegion(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 * );

   FUNCTION
	Clip away any portion of the region that exists inside
	of the rectangle. Leave the result in region.

   INPUTS
	region - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure
	rectangle - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 structure

   RESULTS
	status - return TRUE if successful operation
		 return FALSE if ran out of memory

   BUGS

   SEE ALSO
	
                <link linkend="n588">AndRectRegion()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n617">
            <title>graphics.library/ClearRegion</title>
            <literallayout class="monospaced">
                   NAME 
       ClearRegion -- 
                <link linkend="n276">Remove</link>
                 all rectangles from region.

   SYNOPSIS 
       ClearRegion(region)
                     a0

	viod ClearRegion( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 * );

   FUNCTION 
       Clip away all rectangles in the region leaving nothing.

   INPUTS 
       region - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure

   BUGS 

   SEE ALSO
	
                <link linkend="n684">NewRegion()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n618">
            <title>graphics.library/ClearScreen</title>
            <literallayout class="monospaced">
                   NAME
	ClearScreen -- Clear from current position to end of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SYNOPSIS
	ClearScreen(rp)
	            A1

	void ClearScreen(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	Clear a rectangular swath from the current position to the
	right edge of the rastPort with 
                <link linkend="n615">ClearEOL</link>
                , then clear the rest
	of the screen from just beneath the swath to the bottom of
	the rastPort.
	Clearing consists of setting the color of the swath to zero,
	or, if the DrawMode is 2, to the BgPen.

   INPUTS
	rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure

   NOTES
	o   This function may use the blitter.

   SEE ALSO
	
                <link linkend="n615">ClearEOL()</link>
                  
                <link linkend="n730">Text()</link>
                  
                <link linkend="n719">SetRast()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n619">
            <title>graphics.library/ClipBlit</title>
            <literallayout class="monospaced">
                   NAME
	ClipBlit  --  Calls 
                <link linkend="n602">BltBitMap()</link>
                 after accounting for windows

   SYNOPSIS
	ClipBlit(Src, SrcX, SrcY, Dest, DestX, DestY, XSize, YSize, Minterm)
	         A0   D0    D1    A1    D2     D3     D4     D5     D6

	void ClipBlit
	     (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, WORD, WORD, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, WORD, WORD,
	      WORD, WORD, UBYTE);

   FUNCTION
	Performs the same function as 
                <link linkend="n602">BltBitMap()</link>
                , except that it
	takes into account the Layers and ClipRects of the layer library,
	all of which are (and should be) transparent to you.  So, whereas
	
                <link linkend="n602">BltBitMap()</link>
                 requires pointers to BitMaps, ClipBlit requires pointers to
	the RastPorts that contain the Bitmaps, Layers, etcetera.

	If you are going to blit blocks of data around via the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 of your
	Intuition 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                , you must call this routine (rather than 
                <link linkend="n602">BltBitMap()</link>
                ).

	Either the Src 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , the Dest 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , both, or neither, can have
	Layers. This routine takes care of all cases.

	See 
                <link linkend="n602">BltBitMap()</link>
                 for a thorough explanation.

   INPUTS
	Src          = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 of the source for your blit
	SrcX, SrcY   = the topleft offset into Src for your data
	Dest         = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to receive the blitted data
	DestX, DestY = the topleft offset into the destination 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	XSize        = the width of the blit (must be ta least 1)
	YSize        = the height of the blit (must be at least 1)
	Minterm      = the boolean blitter function, where SRCB is associated
	               with the Src 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 and SRCC goes to the Dest 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n602">BltBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n620">
            <title>graphics.library/CloseFont</title>
            <literallayout class="monospaced">
                   NAME
	CloseFont -- Release a pointer to a system font.

   SYNOPSIS
	CloseFont(font)
	          A1

	void CloseFont(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *);

   FUNCTION
	This function indicates that the font specified is no longer
	in use.  It is used to close a font opened by 
                <link linkend="n688">OpenFont</link>
                , so
	that fonts that are no longer in use do not consume system
	resources.

   INPUTS
	font -	a font pointer as returned by 
                <link linkend="n688">OpenFont()</link>
                 or 
                <link linkend="n783">OpenDiskFont()</link>
                   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n688">OpenFont()</link>
                  
                <link linkend="n783">diskfont.library/OpenDiskFont</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n621">
            <title>graphics.library/CloseMonitor</title>
            <literallayout class="monospaced">
                   NAME
	CloseMonitor -- close a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 (V36)

   SYNOPSIS
	error = CloseMonitor( monitor_spec )
	d0                    a0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 CloseMonitor( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 * );

   FUNCTION
	Relinquish access to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                .

   INPUTS
	monitor_spec - a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 opened via 
                <link linkend="n689">OpenMonitor()</link>
                ,
	or NULL.

   RESULTS
	error - FALSE if 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 closed uneventfully.
	        TRUE if 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 could not be closed.

   BUGS

   SEE ALSO
	
                <link linkend="n689">OpenMonitor()</link>
                
            </literallayout>
        </section>
        <section id="n622">
            <title>graphics.library/CMOVE</title>
            <literallayout class="monospaced">
                   NAME
	CMOVE -- append copper move instruction to user copper list.

   SYNOPSIS
	CMOVE( c , a , v )

	CMove( c , a , v )
	      a1  d0  d1
	CBump( c )
	      a1

	void CMove( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 *, void *, WORD );

   FUNCTION
	Add instruction to move value v to hardware register a.

   INPUTS
	c - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 structure
	a - hardware register
	v - 16 bit value to be written

   RESULTS
	This is actually a macro that calls CMove(c,&amp;a,v)
	and then calls CBump(c) to bump the local pointer
	to the next instruction. Watch out for macro side affects.

   BUGS

   SEE ALSO
	CINIT() CWAIT() CEND() 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">graphics/copper.h</ulink>
                
            </literallayout>
        </section>
        <section id="n623">
            <title>graphics.library/CoerceMode</title>
            <literallayout class="monospaced">
                   NAME
	CoerceMode -- calculate 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 mode coercion (V39)

   SYNOPSIS
	ID = CoerceMode(RealViewPort, MonitorID, Flags);
	d0              a0            d0         d1

	ULONG CoerceMode(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *, ULONG, ULONG);

   FUNCTION
	To determine the best mode in the MonitorID to coerce RealViewPort to,
	given the restrictions set in Flags.

   INPUTS
	RealViewPort - 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 to coerce
	MonitorID    - Montor number to coerce to (ie a mode masked with
	               MONITOR_ID_MASK).
	Flags        - PRESERVE_COLORS - keep the number of bitplanes
	               in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .
	               AVOID_FLICKER - do not coerce to an interlace mode

   RESULTS
	ID      - ID of the best mode to coerce to, or INVALID_ID if could not
	          coerce (see NOTES).

   NOTES
	This function takes into account the compatibility of the Monitor
	being coerced to, and the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 that is being coerced.
	Incompatibilities will cause a result of INVALID_ID.

   EXAMPLE
	newmode = CoerceMode(vp, VGA_MONITOR_ID, PRESERVE_COLORS);

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/coerce.h">&lt;graphics/coerce.h&gt;</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">&lt;graphics/displayinfo.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n624">
            <title>graphics.library/CopySBitMap</title>
            <literallayout class="monospaced">
                   NAME
       CopySBitMap --	Syncronize 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 window with contents of
						Super 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                   SYNOPSIS
       CopySBitMap( layer )
                     a0

	void CopySBitMap(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *);

   FUNCTION
	This is the inverse of 
                <link linkend="n729">SyncSBitMap</link>
                .
       Copy all bits from SuperBitMap to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 bounds.
	This is used for those functions that do not
	want to deal with the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 structures but do want
	to be able to work with a SuperBitMap 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                .

   INPUTS
	layer - pointer to a SuperBitMap 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                	    The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 must already be locked by the caller.

   BUGS

   SEE ALSO
	
                <link linkend="n678">LockLayerRom()</link>
                 
                <link linkend="n729">SyncSBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n625">
            <title>graphics.library/CWAIT</title>
            <literallayout class="monospaced">
                   NAME
	CWAIT -- Append copper wait instruction to user copper list.

   SYNOPSIS
	CWAIT( c , v , h )

	CWait( c , v , h )
	       a1  d0  d1
	CBump( c )
	      a1

	void CWait( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 *, WORD, WORD)

   FUNCTION
	Add instruction to wait for vertical beam position v and
	horizontal position h to this intermediate copper list.

   INPUTS
	c - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">UCopList</ulink>
                 structure
	v - vertical beam position (relative to top of viewport)
	h - horizontal beam position

   RESULTS
	this is actually a macro that calls CWait(c,v,h)
	and then calls CBump(c) to bump the local pointer
	to the next instruction.

   BUGS
	User waiting for horizontal values of greater than 222 decimal
	is illegal.

   SEE ALSO
 	CINIT() CMOVE() CEND() 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">graphics/copper.h</ulink>
                
            </literallayout>
        </section>
        <section id="n626">
            <title>graphics.library/DisownBlitter</title>
            <literallayout class="monospaced">
                   NAME
       DisownBlitter -- return blitter to free state.


   SYNOPSIS
       DisownBlitter()

	void DisownBlitter( void );

   FUNCTION
	Free blitter up for use by other blitter users.

   INPUTS

   RETURNS

   SEE ALSO
       
                <link linkend="n692">OwnBlitter()</link>
                
            </literallayout>
        </section>
        <section id="n627">
            <title>graphics.library/DisposeRegion</title>
            <literallayout class="monospaced">
                   NAME
       DisposeRegion -- Return all space for this region to free
			 memory pool.

   SYNOPSIS
       DisposeRegion(region)
                      a0

	void DisposeRegion( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 * );

   FUNCTION
       Free all RegionRectangles for this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 then
	free the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 itself.

   INPUTS
       region - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure

   BUGS

   SEE ALSO
	
                <link linkend="n684">NewRegion()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n628">
            <title>graphics.library/DoCollision</title>
            <literallayout class="monospaced">
                   NAME
	DoCollision -- Test every gel in gel list for collisions.

   SYNOPSIS
	DoCollision(rp)
	            A1

	void DoCollision(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	Tests each gel in gel list for boundary and gel-to-gel collisions.
	On detecting one of these collisions, the appropriate collision-
	handling routine is called. See the documentation for a thorough
	description of which collision routine is called. This routine
	expects to find the gel list correctly sorted in Y,X order.
	The system routine 
                <link linkend="n727">SortGList</link>
                 performs this function for the user.

   INPUTS
	rp = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <link linkend="n727">SortGList()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                
            </literallayout>
        </section>
        <section id="n629">
            <title>graphics.library/Draw</title>
            <literallayout class="monospaced">
                   NAME
       Draw -- Draw a line between the current pen position
                       and the new x,y position.

   SYNOPSIS
       Draw( rp,   x,     y)
             a1  d0:16  d1:16

	void Draw( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , SHORT);

   FUNCTION
       Draw a line from the current pen position to (x,y).

   INPUTS

	rp - pointer to the destination 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	x,y - coordinates of where in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to end the line.

   BUGS

   SEE ALSO
	
                <link linkend="n681">Move()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n630">
            <title>graphics.library/DrawEllipse</title>
            <literallayout class="monospaced">
                    NAME
	DrawEllipse -- 
                <link linkend="n629">Draw</link>
                 an ellipse centered at cx,cy with vertical
	   and horizontal radii of a,b respectively.

    SYNOPSIS
	DrawEllipse( rp, cx, cy, a, b )
		     a1  d0  d1  d2 d3

	void DrawEllipse( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , SHORT);

    FUNCTION
       Creates an elliptical outline within the rectangular region
	specified by the parameters, using the current foreground pen color.

    INPUTS
	rp - pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 into which the ellipse will be drawn.
	cx - x coordinate of the centerpoint relative to the rastport.
	cy - y coordinate of the centerpoint relative to the rastport.
	a - the horizontal radius of the ellipse (note: a must be &gt; 0)
	b - the vertical radius of the ellipse (note: b must be &gt; 0)

    BUGS

    NOTES
	this routine does not clip the ellipse to a non-layered rastport.

    SEE ALSO
	DrawCircle macro
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxmacros.h">graphics/gfxmacros.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n631">
            <title>graphics.library/DrawGList</title>
            <literallayout class="monospaced">
                   NAME
	DrawGList -- 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 the gel list, queueing VSprites, drawing Bobs.

   SYNOPSIS
	DrawGList(rp, vp)
	          A1  A0

	void DrawGList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *);

   FUNCTION
	Performs one pass of the current gel list.
	   - If nextLine and lastColor are defined, these are
	     initialized for each gel.
          - If it's a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                , build it into the copper list.
          - If it's a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                , draw it into the current raster.
          - Copy the save values into the "old" variables,
	     double-buffering if required.

   INPUTS
	rp = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 where Bobs will be drawn
	vp = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 for which VSprites will be created

   RESULT

   BUGS
	MUSTDRAW isn't implemented yet.

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n632">
            <title>graphics.library/EraseRect</title>
            <literallayout class="monospaced">
                   NAME

       EraseRect -- Fill a defined rectangular area using the current
		     	BackFill hook. (V36)

   SYNOPSIS
	EraseRect( rp, xmin, ymin, xmax, ymax)
                  a1  d0:16 d1:16 d2:16 d3:16

	void EraseRect(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , SHORT);

   FUNCTION
	Fill the rectangular region specified by the parameters with the
	BackFill hook. If non-layered, the rectangular region specified by
	the parameters is cleared. If layered the Layer-&gt;BackFill 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 is used.

   INPUTS
	rp	- pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	xmin	- x coordinate of the upper left corner of the region to fill.
	ymin	- y coordinate of the upper left corner of the region to fill.
	xmax	- x coordinate of the lower right corner of the region to fill.
	ymax	- y coordinate of the lower right corner of the region to fill.

   BUGS

   NOTES
	The following relation MUST be true:
	(xmax &gt;= xmin) and (ymax &gt;= ymin)

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n633">
            <title>graphics.library/ExtendFont</title>
            <literallayout class="monospaced">
                   NAME
	ExtendFont -- ensure tf_Extension has been built for a font (V36)

   SYNOPSIS
	success = ExtendFont(font, fontTags)
	D0                   A0    A1

	ULONG ExtendFont(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	success = ExtendFontTags(font, Tag1, ...)  (V39)

	ULONG ExtendFontTags(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *, ULONG, ...);

   FUNCTION
	To extend a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 structure.

   INPUTS
	font - The font to extend.
	fontTags - An optional taglist.  If NULL, then a default is used.
	           Currently, the only tag defined is TA_DeviceDPI.

   RESULT
	success - 1 if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 was properly extended, else 0.

   NOTES
	The varargs stub was missing from amiga.lib until V39.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n634">
            <title>graphics.library/FindColor</title>
            <literallayout class="monospaced">
                   NAME
	FindColor -- Find the closest matching color in a colormap. (V39)

   SYNOPSIS
	color = FindColor(  cm,  R,   G,    B , maxpen)
	                   a3   d1   d2    d3   d4

	ULONG FindColor( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, ULONG, ULONG, ULONG,LONG);

   INPUTS
	cm = colormap
	R = red level   (32 bit left justified fraction)
	G = green level (32 bit left justified fraction)
	B = blue level  (32 bit left justified fraction)
	MaxPen = the maximum entry in the color table to search. A value of
	        -1 will limt the search to only those pens which could be
	        rendered in (for instance, it will not examine the sprite
	        colors on a 4 color screen).


   RESULT
	The system will attempt to find the color in the passed colormap
	which most closely matches the RGB values passed. No new pens will
	be allocated, and you should not 
                <link linkend="n700">ReleasePen()</link>
                 the returned pen.
	This function is not sensitive to palette sharing issues. Its
	intended use is for:

	        (a) programs which pop up on public screens when those
	            screens are not using palette sharing. You might
	            use this function as a fallback when 
                <link linkend="n686">ObtainBestPenA()</link>
                	            says that there are no sharable pens.

	        (b) Internal color matching by an application which is
	            either running on a non-public screen, or which
	            wants to match colors to an internal color table
	            which may not be associated with any displayed screen.

   BUGS

   NOTES
	In order to use the MaxPen=-1 feature, you must have initialized
	palette sharing via 
                <link linkend="n598">AttachPalExtra()</link>
                 (all intuition screens do this).
	Otherwise, MaxPen=-1 will search all colors in the colormap.


   SEE ALSO
	
                <link linkend="n686">ObtainBestPenA()</link>
                 
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n687">ObtainPen()</link>
                 
                <link linkend="n700">ReleasePen()</link>
            </literallayout>
        </section>
        <section id="n635">
            <title>graphics.library/FindDisplayInfo</title>
            <literallayout class="monospaced">
                   NAME
	FindDisplayInfo -- search for a record identified by a specific key (V36)

   SYNOPSIS
	handle = FindDisplayInfo(ID)
	D0                       D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">DisplayInfoHandle</ulink>
                 FindDisplayInfo(ULONG);

   FUNCTION
	Given a 32-bit Mode Key, return a handle to a valid DisplayInfoRecord
	found in the graphics database.  Using this handle, you can obtain
	information about this Mode, including its default dimensions,
	properties, and whether it is currently available for use.

   INPUTS
	ID     - unsigned long identifier

   RESULT
	handle - handle to a displayinfo Record with that key
	         or NULL if no match.

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">graphics/displayinfo.h</ulink>
                
            </literallayout>
        </section>
        <section id="n636">
            <title>graphics.library/Flood</title>
            <literallayout class="monospaced">
                   NAME
	Flood -- Flood rastport like areafill.

   SYNOPSIS
	error = Flood( rp, mode, x, y)
        d0            a1   d2  d0  d1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 Flood(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, ULONG, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , SHORT);

   FUNCTION
	Search the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 starting at (x,y).
	Fill all adjacent pixels if they are:
	    Mode 0: not the same color as AOLPen
	    Mode 1: the same color as the pixel at (x,y)

	When actually doing the fill use the modes that apply to
	standard areafill routine such as drawmodes and patterns.

   INPUTS
	rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	(x,y) - coordinate in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 to start the flood fill at.
	mode -  0 fill all adjacent pixels searching for border.
		1 fill all adjacent pixels that have same pen number
		as the one at (x,y).

   NOTES
	In order to use Flood, the destination 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 must
	have a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">TmpRas</ulink>
                 raster whose size is as large as
	that of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SEE ALSO
	
                <link linkend="n594">AreaEnd()</link>
                 
                <link linkend="n672">InitTmpRas()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n637">
            <title>graphics.library/FontExtent</title>
            <literallayout class="monospaced">
                   NAME
	FontExtent -- get the font attributes of the current font (V36)

   SYNOPSIS
	FontExtent(font, fontExtent)
	           A0    A1

	void FontExtent(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextExtent</ulink>
                 *);

   FUNCTION
	This function fills the text extent structure with a bounding
	(i.e. maximum) extent for the characters in the specified font.

   INPUTS
	font       - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 from which the font metrics are extracted.
	fontExtent - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextExtent</ulink>
                 structure to be filled.

   RESULT
	fontExtent is filled.

   NOTES
	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                , not the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , is specified -- unlike
	
                <link linkend="n731">TextExtent()</link>
                , effect of algorithmic enhancements is not
	included, nor does te_Width include any effect of
	rp_TxSpacing.  The returned te_Width will be negative only
	when FPF_REVPATH is set in the tf_Flags of the font -- the
	effect of left-moving characters is ignored for the width of
	a normal font, and the effect of right-moving characters is
	ignored if a REVPATH font.  These characters will, however,
	be reflected in the bounding extent.

   SEE ALSO
	
                <link linkend="n731">TextExtent()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n638">
            <title>graphics.library/FreeBitMap</title>
            <literallayout class="monospaced">
                   NAME
	FreeBitMap -- free a bitmap created by 
                <link linkend="n584">AllocBitMap</link>
                 (V39)

   SYNOPSIS
	FreeBitMap(bm)
	           a0

	VOID FreeBitMap(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *)

   FUNCTION
	Frees bitmap and all associated bitplanes

   INPUTS
	bm  =  A pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 structure. Passing a NULL-pointer
	       (meaning "do nothing") is OK.

   BUGS

   NOTES
	Be careful to insure that any rendering done to the bitmap has
	completed (by calling 
                <link linkend="n737">WaitBlit()</link>
                ) before you call this function.

   SEE ALSO
	
                <link linkend="n584">AllocBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n639">
            <title>graphics.library/FreeColorMap</title>
            <literallayout class="monospaced">
                   NAME
       FreeColorMap -- Free the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 structure and return memory
						to free memory pool.

   SYNOPSIS
       FreeColorMap( colormap )
                       a0

	void FreeColorMap(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *);

   FUNCTION
	Return the memory to the free memory pool that was allocated
	with 
                <link linkend="n651">GetColorMap</link>
                .

   INPUTS
	colormap - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 allocated with 
                <link linkend="n651">GetColorMap</link>
                .

		  Passing a NULL pointer (meaning "do nothing") is
		  acceptable (V39).

   RESULT
	The space is made available for others to use.

   BUGS

   SEE ALSO
       
                <link linkend="n722">SetRGB4()</link>
                 
                <link linkend="n651">GetColorMap()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
            </literallayout>
        </section>
        <section id="n640">
            <title>graphics.library/FreeCopList</title>
            <literallayout class="monospaced">
                   NAME
	FreeCopList -- deallocate intermediate copper list

   SYNOPSIS
       FreeCopList(coplist)
		      a0

	void FreeCopList( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">CopList</ulink>
                 *);

   FUNCTION
	
                <link linkend="n227">Deallocate</link>
                 all memory associated with this copper list.

   INPUTS
       coplist	- pointer to structure 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">CopList</ulink>
                   RESULTS
	memory returned to memory manager

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">graphics/copper.h</ulink>
                
            </literallayout>
        </section>
        <section id="n641">
            <title>graphics.library/FreeCprList</title>
            <literallayout class="monospaced">
                   NAME
       FreeCprList -- deallocate hardware copper list

   SYNOPSIS
       FreeCprList(cprlist)
		      a0

	void FreeCprList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">cprlist</ulink>
                 *);

   FUNCTION
       return 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">cprlist</ulink>
                 to free memory pool

   INPUTS
       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">cprlist</ulink>
                 - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">cprlist</ulink>
                 structure

   RESULTS
	memory returned and made available to other tasks

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/copper.h">graphics/copper.h</ulink>
                
            </literallayout>
        </section>
        <section id="n642">
            <title>graphics.library/FreeDBufInfo</title>
            <literallayout class="monospaced">
                   NAME
       FreeDBufInfo -- free information for multi-buffered animation (V39)

   SYNOPSIS
       FreeDBufInfo(db)
	             a1

	void FreeDBufInfo(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                 *)

   FUNCTION
	Frees a structure obtained from 
                <link linkend="n585">AllocDBufInfo</link>
                   INPUTS
       db  =  A pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">DBufInfo</ulink>
                .

   BUGS

   NOTES
	FreeDBufInfo(NULL) is a no-op.

   SEE ALSO
	
                <link linkend="n585">AllocDBufInfo()</link>
                 
                <link linkend="n613">ChangeVPBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n643">
            <title>graphics.library/FreeGBuffers</title>
            <literallayout class="monospaced">
                   NAME
	FreeGBuffers -- 
                <link linkend="n227">Deallocate</link>
                 memory obtained by GetGBufers.

   SYNOPSIS
	FreeGBuffers(anOb, rp, db)
	             A0    A1  D0

	void FreeGBuffers(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, BOOL);

   FUNCTION
	For each sequence of each component of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                ,
	deallocate memory for:
	    SaveBuffer
	    BorderLine
	    CollMask and ImageShadow (point to same buffer)
	    if db is set (user had used double-buffering) deallocate:
	        
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">DBufPacket</ulink>
                	        BufBuffer

   INPUTS
	anOb = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 structure
	rp   = pointer to the current 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	db   = double-buffer indicator (set TRUE for double-buffering)

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n655">GetGBuffers()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n644">
            <title>graphics.library/FreeRaster</title>
            <literallayout class="monospaced">
                   NAME
       FreeRaster -- Release an allocated area to the system free memory pool
.


   SYNOPSIS
       FreeRaster( p, width, height)
		   a0   d0:16  d1:16

	void FreeRaster( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">PLANEPTR</ulink>
                , USHORT, USHORT);

   FUNCTION
	Return the memory associated with this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">PLANEPTR</ulink>
                 of size
	width and height to the MEMF_CHIP memory pool.

   INPUTS
       p  =  a pointer to a memory space  returned  as  a
             result of a call to 
                <link linkend="n586">AllocRaster</link>
                .

	width - the width in bits of the bitplane.
	height - number of rows in bitplane.

   BUGS

   NOTES
       Width and height should be the same values with which you
       called 
                <link linkend="n586">AllocRaster</link>
                 in the first place.

   SEE ALSO
	
                <link linkend="n586">AllocRaster()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n645">
            <title>graphics.library/FreeSprite</title>
            <literallayout class="monospaced">
                   NAME
       FreeSprite -- Return sprite for use by others and virtual
					  sprite machine.

   SYNOPSIS
       FreeSprite( pick )
                    d0

	void FreeSprite( WORD );

   FUNCTION
	Mark sprite as available for others to use.
       These sprite routines are provided to ease sharing of sprite
	hardware and to handle simple cases of sprite usage and
	movement.  It is assumed the programs that use these routines
	do want to be good citizens in their hearts. ie: they will
	not FreeSprite unless they actually own the sprite.
	The Virtual Sprite machine may ignore the simple sprite machine.

   INPUTS
       pick - number in range of 0-7

   RESULTS
	sprite made available for subsequent callers of 
                <link linkend="n660">GetSprite</link>
                	as well as use by Virtual Sprite Machine.

   BUGS

   SEE ALSO
       
                <link linkend="n660">GetSprite()</link>
                 
                <link linkend="n612">ChangeSprite()</link>
                 
                <link linkend="n682">MoveSprite()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">graphics/sprite.h</ulink>
                
            </literallayout>
        </section>
        <section id="n646">
            <title>graphics.library/FreeSpriteData</title>
            <literallayout class="monospaced">
                   NAME
	FreeSpriteData -- free sprite data allocated by AllocSpriteData() (V39)

   SYNOPSIS
	FreeSpriteData(extsp)
			a2

	void FreeSpriteData(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 *);


   FUNCTION

   INPUTS
	extsp - The extended sprite structure to be freed. Passing NULL is a
	NO-OP.

   SEE ALSO
	FreeSpriteData() 
                <link linkend="n645">FreeSprite()</link>
                 
                <link linkend="n612">ChangeSprite()</link>
                 
                <link linkend="n682">MoveSprite()</link>
                 GetExtSprite()
	
                <link linkend="n584">AllocBitMap()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">graphics/sprite.h</ulink>
                
            </literallayout>
        </section>
        <section id="n647">
            <title>graphics.library/FreeVPortCopLists</title>
            <literallayout class="monospaced">
                   NAME
       FreeVPortCopLists -- deallocate all intermediate copper lists and
       their headers from a viewport

   SYNOPSIS
       FreeVPortCopLists(vp)
                         a0

	void FreeVPortCopLists(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *);

   FUNCTION
       Search display, color, sprite, and user copper
       lists and call 
                <link linkend="n243">FreeMem()</link>
                 to deallocate them from memory

   INPUTS
       vp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure

   RESULTS
       The memory allocated to the various copper lists will be returned
	to the system's free memory pool, and the following fields in
	the viewport structure will be set to NULL:

		DspIns, Sprins, ClrIns, UCopIns

   BUGS
       none known

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n648">
            <title>graphics.library/GetAPen</title>
            <literallayout class="monospaced">
                   NAME
       GetAPen -- Get the A Pen value for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 (V39).


   SYNOPSIS
       pen = GetAPen  ( rp )
	 d0		 a0

	ULONG GetAPen(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *)

   FUNCTION
	Return the current value of the A pen for the rastport. This function
	should be used instead of peeking the structure directly, because future
	graphics devices may store it differently, for instance, using more bits.

   INPUTS
       rp  =  a pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.

   BUGS

   NOTES

   SEE ALSO
	
                <link linkend="n710">SetAPen()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n649">
            <title>graphics.library/GetBitMapAttr</title>
            <literallayout class="monospaced">
                   NAME
	GetBitMapAttr -- Returns information about a bitmap (V39)


   SYNOPSIS
	value=GetBitMapAttr(bitmap,attribute_number);
	  d0	                 a0       d1

	ULONG GetBitMapAttr(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *,ULONG);

   FUNCTION
	Determines information about a bitmap. This function should be used
	instead of reading the bitmap structure fields directly. This will
	provide future compatibility.

   INPUTS
	bm  =  A pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 structure.

	attribute_number = A number telling graphics which attribute
	                   of the bitmap should be returned:

	                BMA_HEIGHT returns the height in pixels
	                BMA_WIDTH  returns the width in pixels.
	                BMA_DEPTH  returns the depth. This is the number of
	                        bits which are required to store the information
	                        for one pixel in the bitmap.
	                BMA_FLAGS  returns a longword bitfield describing
	                        various attributes which the bitmap may have.
	                        Currently defined flags are BMF_DISPLAYABLE,
	                        BMF_INTERLEAVED (see AllocBitMap()). The flag
	                        BMF_STANDARD returns will be set if the
	                        bitmap is represented as planar data in Amiga
	                        Chip RAM.

   BUGS

   NOTES

	Unknown attributes are reserved for future use, and return zero.

	BMF_DISPLAYABLE will only be set if the source bitmap meets all of the
	required alignment restrictions. A bitmap which does not meet these
	restrictions may still be displayable at some loss of efficiency.

	Size values returned by this function may not exactly match the values
	which were passed to 
                <link linkend="n584">AllocBitMap()</link>
                , due to alignment restrictions.

   SEE ALSO
	
                <link linkend="n584">AllocBitMap()</link>
                
            </literallayout>
        </section>
        <section id="n650">
            <title>graphics.library/GetBPen</title>
            <literallayout class="monospaced">
                   NAME
       GetBPen -- Get the B Pen value for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 (V39).


   SYNOPSIS
       pen = GetBPen  ( rp )
	d0	   	 a0

	ULONG GetBPen(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *)

   FUNCTION
	Return the current value of the B pen for the rastport. This function
	should be used instead of peeking the structure directly, because future
	graphics devices may store it differently, using more bits.

   INPUTS
       rp  =  a pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.

   BUGS

   NOTES

   SEE ALSO
	
                <link linkend="n711">SetBPen()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n651">
            <title>graphics.library/GetColorMap</title>
            <literallayout class="monospaced">
                   NAME
       GetColorMap -- allocate and initialize Colormap


   SYNOPSIS
       cm = GetColorMap( entries )
       d0		    d0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *GetColorMap( ULONG);

   FUNCTION
       Allocates, initializes and returns a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                       data structure, later enabling calls to 
                <link linkend="n720">SetRGB4/SetRGB32</link>
                       and 
                <link linkend="n675">LoadRGB4/LoadRGB32</link>
                 to load colors for a view port. The
       ColorTable pointer in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 structure points to a
       hardware specific colormap data structure. You should not
       count on it being anything you can understand. Use
       
                <link linkend="n657">GetRGB4()/GetRGB32()</link>
                 to query it or 
                <link linkend="n721">SetRGB4CM/SetRGB32CM</link>
                       to set it directly.

   INPUTS
	entries - number of entries for this colormap

    RESULT
	The pointer value returned by this routine, if nonzero,
       may be stored into the ViewPort.ColorMap pointer.
       If a value of 0 is returned, the system was unable
       to allocate enough memory space for the required
       data structures.

   BUGS

   SEE ALSO
       
                <link linkend="n722">SetRGB4()</link>
                 
                <link linkend="n639">FreeColorMap()</link>
            </literallayout>
        </section>
        <section id="n652">
            <title>graphics.library/GetDisplayInfoData</title>
            <literallayout class="monospaced">
                   NAME
	GetDisplayInfoData -- query 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">DisplayInfo</ulink>
                 Record parameters (V36)

   SYNOPSIS
	result = GetDisplayInfoData(handle, buf, size, tagID, [ID])
	D0                          A0      A1   D0    D1     [D2]

	ULONG GetDisplayInfoData(DisplayInfoHandle, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, ULONG, ULONG, ULONG);

   FUNCTION
	GetDisplayInfoData() fills a buffer with data meaningful to the
	DisplayInfoRecord pointed at by your valid handle. The data type
	that you are interested in is indicated by a tagID for that chunk.
	The types of tagged information that may be available include:

	DTAG_DISP: (DisplayInfo)   - properties and availability information.
	DTAG_DIMS: (DimensionInfo) - default dimensions and overscan info.
	DTAG_MNTR: (MonitorInfo)   - type, position, scanrate, and compatibility
	DTAG_NAME: (NameInfo)      - a user friendly way to refer to this mode.

   INPUTS
	handle - displayinfo handle
	buf    - pointer to destination buffer
	size   - buffer size in bytes
	tagID  - data chunk type
	ID     - displayinfo identifier, optionally used if handle is NULL

   RESULT
	result - if positive, number of bytes actually transferred
	         if zero, no information for ID was available

   BUGS

   SEE ALSO
	
                <link linkend="n635">FindDisplayInfo()</link>
                , 
                <link linkend="n685">NextDisplayInfo()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">graphics/displayinfo.h</ulink>
                
            </literallayout>
        </section>
        <section id="n653">
            <title>graphics.library/GetDrMd</title>
            <literallayout class="monospaced">
                   NAME
       GetDrMd -- Get the draw mode value for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 (V39).


   SYNOPSIS
       mode = GetDrMd  ( rp )
	d0                a0

	ULONG GetDrMd(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *)

   FUNCTION
	Return the current value of the draw mode for the rastport. This function
	should be used instead of peeking the structure directly, because future
	graphics devices may store it differently.

   INPUTS
       rp  =  a pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.

   BUGS

   NOTES

   SEE ALSO
	
                <link linkend="n714">SetDrMd()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n654">
            <title>graphics.library/GetExtSpriteA</title>
            <literallayout class="monospaced">
                   NAME
	GetExtSpriteA -- Attempt to get a sprite for the extended sprite
					 manager. (V39)
	GetExtSprite -- varargs stub for GetExtSpriteA. (V39)

   SYNOPSIS
	Sprite_Number = GetExtSpriteA( sprite, tags )  (V39)
	    d0			        a2      a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 GetExtSpriteA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	spritenum=GetExtSprite(sprite,tags,...);

   FUNCTION
	Attempt to allocate one of the eight sprites for private use
	with the extended sprite manager.

   INPUTS
	sprite - ptr to programmer's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 (from AllocSpriteData()).
	tags - a standard tag list:

		GSTAG_SPRITE_NUM	specifies a specific sprite to get by number.

		GSTAG_ATTACHED specifies that you wish to get a sprite pair.
			the tag data field points to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">ExtSprite</ulink>
                 structure
			for the second sprite. You must free both sprites.


   RESULTS
	Sprite_number = a sprite number or -1 for an error.
		This call will fail if no sprites could be allocated, or
		if you try to allocate a sprite which would require
		a mode change when there are other sprites of incompatible
		modes in use.

   BUGS

	GSTAG_ATTACHED does not work in version 39. When running under V39,
	you should attach the second sprite with a separate GetExtSprite call.

   SEE ALSO
	
                <link linkend="n645">FreeSprite()</link>
                 
                <link linkend="n612">ChangeSprite()</link>
                 
                <link linkend="n682">MoveSprite()</link>
                 
                <link linkend="n660">GetSprite()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">graphics/sprite.h</ulink>
                
            </literallayout>
        </section>
        <section id="n655">
            <title>graphics.library/GetGBuffers</title>
            <literallayout class="monospaced">
                   NAME
	GetGBuffers -- Attempt to allocate ALL buffers of an entire 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                .

   SYNOPSIS
	status = GetGBuffers(anOb, rp, db)
	D0                   A0    A1  D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 GetGBuffers(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, BOOL);

   FUNCTION
	For each sequence of each component of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                , allocate memory for:
	    SaveBuffer
	    BorderLine
	    CollMask and ImageShadow (point to same buffer)
	    if db is set TRUE (user wants double-buffering) allocate:
	        
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">DBufPacket</ulink>
                	        BufBuffer

   INPUTS
	anOb = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 structure
	rp   = pointer to the current 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	db   = double-buffer indicator (set TRUE for double-buffering)

   RESULT
	status = TRUE if the memory allocations were all successful, else FALSE

   BUGS
	If any of the memory allocations fail it does not free the partial
	allocations that did succeed.

   SEE ALSO
	
                <link linkend="n643">FreeGBuffers()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                
            </literallayout>
        </section>
        <section id="n656">
            <title>graphics.library/GetOPen</title>
            <literallayout class="monospaced">
                   NAME
       GetOPen -- Get the O Pen value for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 (V39).


   SYNOPSIS
       pen = GetOPen  ( rp )
	d0		 a0

	ULONG GetOPen(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *)

   FUNCTION
	Return the current value of the O pen for the rastport. This function
	should be used instead of peeking the structure directly, because future
	graphics devices may store it differently, for instance, using more bits.

   INPUTS
       rp  =  a pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.

   BUGS

   NOTES

   SEE ALSO
	
                <link linkend="n718">SetOutlinePen()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n657">
            <title>graphics.library/GetRGB32</title>
            <literallayout class="monospaced">
                   NAME
	GetRGB32 -- Set a series of color registers for this Viewport. (V39)

   SYNOPSIS
	GetRGB32(  cm,  firstcolor, ncolors, table )
	           a0   d0   		d1    a1

       void GetRGB32( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, ULONG, ULONG, ULONG *);

   INPUTS
	cm = colormap
	firstcolor = the first color register to get
	ncolors = the number of color registers to set.
	table=a pointer to a series of 32-bit RGB triplets.

   RESULT
	The ULONG data pointed to by 'table' will be filled with the 32 bit
	fractional RGB values from the colormap.
   BUGS

   NOTES
	'Table' should point to at least ncolors*3 longwords.

   SEE ALSO
	
                <link linkend="n676">LoadRGB4()</link>
                 
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n675">LoadRGB32()</link>
                 
                <link linkend="n721">SetRGB32CM()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
            </literallayout>
        </section>
        <section id="n658">
            <title>graphics.library/GetRGB4</title>
            <literallayout class="monospaced">
                   NAME
       GetRGB4 -- Inquire value of entry in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                .

   SYNOPSIS
       value = GetRGB4( colormap, entry )
          d0              a0       d0

	ULONG GetRGB4(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, LONG);

   FUNCTION
	
                <link linkend="n136">Read</link>
                 and format a value from the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                .

   INPUTS
	colormap - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 structure
	entry - index into colormap

   RESULT
	returns -1 if no valid entry
	return 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 RGB value 4 bits per gun right justified

   NOTE
	Intuition's 
                <link linkend="n342">DisplayBeep()</link>
                 changes color 0. Reading Color 0 during a
	
                <link linkend="n342">DisplayBeep()</link>
                 will lead to incorrect results.

   BUGS

   SEE ALSO
       
                <link linkend="n722">SetRGB4()</link>
                 
                <link linkend="n676">LoadRGB4()</link>
                 
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n639">FreeColorMap()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
            </literallayout>
        </section>
        <section id="n659">
            <title>graphics.library/GetRPAttrA</title>
            <literallayout class="monospaced">
                   NAME
       GetRPAttrA -- examine rastport settings via a tag list
	GetRPAttrs  -- varargs stub for GetRPAttrA

   SYNOPSIS
       GetRPAttrA(rp,tags)
                  a0   a1

	void GetRPAttrA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	GetRPAttrs(rp,attr1,&amp;result1,...);

   FUNCTION
       
                <link linkend="n136">Read</link>
                 the settings of a rastport into variables. The
	ti_Tag field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 specifies which attribute
	should be read, and the ti_Data field points at the
	location where the result hsould be stored. All current
	tags store the return data as LONGs (32 bits).

	currently available tags are:

		RPTAG_Font		Font for 
                <link linkend="n730">Text()</link>
                		RPTAG_SoftStyle		style for text (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h)</ulink>
                		RPTAG_APen		Primary rendering pen
		RPTAG_BPen		Secondary rendering pen
		RPTAG_DrMd 		Drawing mode (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h)</ulink>
                		RPTAG_OutLinePen 	Area Outline pen
		RPTAG_WriteMask 	Bit Mask for writing.
		RPTAG_MaxPen 		Maximum pen to render (see 
                <link linkend="n716">SetMaxPen()</link>
                )
		RPTAG_DrawBounds	Determine the area that will be rendered
					into by rendering commands. Can be used
					to optimize window refresh. Pass a pointer
					to a rectangle in the tag data. On return,
					the rectangle's MinX will be greater than
					its MaxX if there are no active cliprects.

   INPUTS
	rp - pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to examine.
	tags - a standard tag list specifying the attributes to be read,
		and where to store their values.

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n648">GetAPen()</link>
                 
                <link linkend="n650">GetBPen()</link>
                 
                <link linkend="n653">GetDrMd()</link>
                 GetOutLinePen()
	
                <link linkend="n724">SetRPAttrA()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rpattr.h">graphics/rpattr.h</ulink>
                
            </literallayout>
        </section>
        <section id="n660">
            <title>graphics.library/GetSprite</title>
            <literallayout class="monospaced">
                   NAME
	GetSprite -- Attempt to get a sprite for the simple sprite manager.

   SYNOPSIS
	Sprite_Number = GetSprite( sprite, pick )
	    d0			    a0      d0

	WORD GetSprite( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 *, WORD );

   FUNCTION
	Attempt to allocate one of the eight sprites for private use
	with the simple sprite manager. This must be done before using
	further calls to the simple sprite machine. If the programmer
	wants to use 15 color sprites, they must allocate both sprites
	and set the 'SPRITE_ATTACHED' bit in the odd sprite's posctldata
	array.

   INPUTS
	sprite - ptr to programmers 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 structure.
	pick - number in the range of 0-7 or
	  -1 if programmer just wants the next one.

   RESULTS
	If pick is 0-7 attempt to allocate the sprite. If the sprite
	is already allocated then return -1.
	If pick -1 allocate the next sprite starting search at 0.
	If no sprites are available return -1 and fill -1 in num entry
	of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 structure.
	If the sprite is available for allocation, mark it allocated
	and fill in the 'num' entry of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 structure.
	If successful return the sprite number.

   BUGS

   SEE ALSO
	
                <link linkend="n645">FreeSprite()</link>
                 
                <link linkend="n612">ChangeSprite()</link>
                 
                <link linkend="n682">MoveSprite()</link>
                 GetSprite() 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">graphics/sprite.h</ulink>
                
            </literallayout>
        </section>
        <section id="n661">
            <title>graphics.library/GetVPModeID</title>
            <literallayout class="monospaced">
                   NAME
	GetVPModeID -- get the 32 bit DisplayID from a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                . (V36)

   SYNOPSIS
	modeID =  GetVPModeID( vp )
	d0		       a0

	ULONG GetVPModeID( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *);

   FUNCTION
	returns the normal display modeID, if one is currently  associated
	with this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .

   INPUTS
	vp -- pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure.

   RESULT

	modeID -- a 32 bit DisplayInfoRecord identifier associated with
		  this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                , or INVALID_ID.

   NOTES
	Test the return value of this function against INVALID_ID, not NULL.
	(INVALID_ID is defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">graphics/displayinfo.h)</ulink>
                .

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">graphics/displayinfo.h</ulink>
                , 
                <link linkend="n680">ModeNotAvailable()</link>
                
            </literallayout>
        </section>
        <section id="n662">
            <title>graphics.library/GfxAssociate</title>
            <literallayout class="monospaced">
                   NAME
	GfxAssociate -- associate a graphics extended node with a given pointer
	                (V36)

   SYNOPSIS
       GfxAssociate(pointer, node);
                    A0       A1

	void GfxAssociate(VOID *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 *);

   FUNCTION
	Associate a special graphics extended data structure (each of which
	begins with an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 structure)  with another structure via
	the other structure's pointer. Later, when you call GfxLookUp()
	with the other structure's pointer you may retrieve a pointer
	to this special graphics extended data structure, if it is
	available.

   INPUTS
	pointer = a pointer to a data structure.
	node = an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 structure to associate with the pointer

   RESULT
	an association is created between the pointer and the node such
	that given the pointer the node can be retrieved via GfxLookUp().

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">graphics/gfxnodes.h</ulink>
                 
                <link linkend="n665">GfxNew()</link>
                 
                <link linkend="n663">GfxFree()</link>
                 GfxLookUp()

            </literallayout>
        </section>
        <section id="n663">
            <title>graphics.library/GfxFree</title>
            <literallayout class="monospaced">
                   NAME
       GfxFree -- free a graphics extended data structure (V36)

   SYNOPSIS
       GfxFree( node );
       	      a0

	void GfxFree(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 *);

   FUNCTION
	Free a special graphics extended data structure (each of which
	begins with an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 structure).

   INPUTS
	node = pointer to a graphics extended data structure obtained via
	       
                <link linkend="n665">GfxNew()</link>
                .

   RESULT
	the node is deallocated from memory. graphics will disassociate
	this special graphics extended node from any associated data
	structures, if necessary, before freeing it (see 
                <link linkend="n662">GfxAssociate()</link>
                ).

   BUGS
	an 
                <link linkend="n200">Alert()</link>
                 will be called if you attempt to free any structure
	other than a graphics extended data structure obtained via GfxFree().

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">graphics/gfxnodes.h</ulink>
                 
                <link linkend="n665">GfxNew()</link>
                 
                <link linkend="n662">GfxAssociate()</link>
                 GfxLookUp()

            </literallayout>
        </section>
        <section id="n664">
            <title>graphics.library/GfxLookUP</title>
            <literallayout class="monospaced">
                   NAME
    	GfxLookUp -- find a graphics extended node associated with a 
		     given pointer (V36)

   SYNOPSIS
       result = GfxLookUp( pointer );
       d0		    a0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 *GfxLookUp( void *);

   FUNCTION
	Finds a special graphics extended data structure (if any) associated
	with the pointer to a data structure (eg: 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewExtra</ulink>
                 associated with
	a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure).

   INPUTS
	pointer = a pointer to a data structure which may have an
		  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 associated with it (typically a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 ).

   RESULT
	result = a pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 that has previously been
		 associated with the pointer.

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">graphics/gfxnodes.h</ulink>
                 
                <link linkend="n665">GfxNew()</link>
                 
                <link linkend="n663">GfxFree()</link>
                 
                <link linkend="n662">GfxAssociate()</link>
                
            </literallayout>
        </section>
        <section id="n665">
            <title>graphics.library/GfxNew</title>
            <literallayout class="monospaced">
                   NAME
       GfxNew -- allocate a graphics extended data structure (V36)

   SYNOPSIS
 	result = GfxNew( node_type );
	d0		 d0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 *GfxNew( ULONG);

   FUNCTION
	
                <link linkend="n202">Allocate</link>
                 a special graphics extended data structure (each of which
	begins with an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">ExtendedNode</ulink>
                 structure).  The type of structure to
	be allocated is specified by the node_type identifier.

   INPUTS
	node_type = which type of graphics extended data structure to allocate.
		    (see gfxnodes.h for identifier definitions.)

   RESULT
	result = a pointer to the allocated graphics node or NULL if the
		 allocation failed.

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxnodes.h">graphics/gfxnodes.h</ulink>
                 
                <link linkend="n663">GfxFree()</link>
                 
                <link linkend="n662">GfxAssociate()</link>
                 GfxLookUp()

            </literallayout>
        </section>
        <section id="n666">
            <title>graphics.library/InitArea</title>
            <literallayout class="monospaced">
                   NAME   

	InitArea -- Initialize vector collection matrix

   SYNOPSIS

   	InitArea( areainfo, buffer, maxvectors )
		    a0          a1      d0

	void InitArea(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">AreaInfo</ulink>
                 *, void *, SHORT);

   FUNCTION
	This function provides initialization for the vector collection matrix
	such that it has a size of (max vectors ).  The size of the region
	pointed to by buffer (short pointer) should be five (5) times as large
	as maxvectors. This size is in bytes.  Areafills done by using 
                <link linkend="n595">AreaMove</link>
                ,
	
                <link linkend="n592">AreaDraw</link>
                , and 
                <link linkend="n594">AreaEnd</link>
                 must have enough space allocated in this table to
	store all the points of the largest fill. 
                <link linkend="n593">AreaEllipse</link>
                 takes up two
	vectors for every call. If AreaMove/Draw/Ellipse detect too many
	vectors going into the buffer they will return -1.

   INPUTS
	areainfo - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">AreaInfo</ulink>
                 structure
	buffer - pointer to chunk of memory to collect vertices
	maxvectors - max number of vectors this buffer can hold

   RESULT
	Pointers are set up to begin storage of vectors done by
	
                <link linkend="n595">AreaMove</link>
                , 
                <link linkend="n592">AreaDraw</link>
                , and 
                <link linkend="n593">AreaEllipse</link>
                .

   BUGS

   SEE ALSO
	
                <link linkend="n594">AreaEnd()</link>
                 
                <link linkend="n595">AreaMove()</link>
                 
                <link linkend="n592">AreaDraw()</link>
                 
                <link linkend="n593">AreaEllipse()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n667">
            <title>graphics.library/InitBitMap</title>
            <literallayout class="monospaced">
                   NAME   

   	InitBitMap -- Initialize bit map structure with input values.

   SYNOPSIS
	InitBitMap( bm, depth, width, height )
		    a0   d0     d1      d2

	void InitBitMap( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 );

   FUNCTION
	Initialize various elements in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 structure to
	correctly reflect depth, width, and height.
	Must be used before use of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 in other graphics calls.
	The Planes[8] are not initialized and need to be set up
	by the caller.  The Planes table was put at the end of the
	structure so that it may be truncated to conserve space,
	as well as extended. All routines that use 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 should
	only depend on existence of depth number of bitplanes.
	The Flagsh and pad fields are reserved for future use and
	should not be used by application programs.

   INPUTS
	bm - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 structure (gfx.h)
	depth - number of bitplanes that this bitmap will have
	width - number of bits (columns) wide for this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                	height- number of bits (rows) tall for this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n668">
            <title>graphics.library/InitGels</title>
            <literallayout class="monospaced">
                   NAME
	InitGels -- initialize a gel list; must be called before using gels.

   SYNOPSIS
	InitGels(head, tail, GInfo)
	         A0    A1    A2

	void InitGels(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">GelsInfo</ulink>
                 *);

   FUNCTION
	Assigns the VSprites as the head and tail of the gel list in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxbase.h">GfxBase</ulink>
                .
	Links these two gels together as the keystones of the list.
	If the collHandler vector points to some memory array, sets
	the BORDERHIT vector to NULL.

   INPUTS
	head  = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 structure to be used as the gel list head
	tail  = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 structure to be used as the gel list tail
	GInfo = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">GelsInfo</ulink>
                 structure to be initialized

   RESULT

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n669">
            <title>graphics.library/InitGMasks</title>
            <literallayout class="monospaced">
                   NAME
	InitGMasks -- Initialize all of the masks of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                .

   SYNOPSIS
	InitGMasks(anOb)
	           A0

	void InitGMasks(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                 *);

   FUNCTION
	For every sequence of every component call 
                <link linkend="n670">InitMasks</link>
                .

   INPUTS
	anOb = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">AnimOb</ulink>
                   BUGS

   SEE ALSO
	
                <link linkend="n670">InitMasks()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                
            </literallayout>
        </section>
        <section id="n670">
            <title>graphics.library/InitMasks</title>
            <literallayout class="monospaced">
                   NAME
	InitMasks -- Initialize the BorderLine and CollMask masks of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                .

   SYNOPSIS
	InitMasks(vs)
	          A0

	void InitMasks(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 *);

   FUNCTION
	Creates the appropriate BorderLine and CollMask masks of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                .
	Correctly detects if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 is actually a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 definition, handles
	the image data accordingly.

   INPUTS
	vs = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 structure

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                
            </literallayout>
        </section>
        <section id="n671">
            <title>graphics.library/InitRastPort</title>
            <literallayout class="monospaced">
                   NAME
	InitRastPort -- Initialize raster port structure

   SYNOPSIS
   	InitRastPort( rp )
		      a1

	void InitRastPort(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *rp);

   FUNCTION
       Initialize a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure to standard values.

   INPUTS
	rp	= pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.

   RESULT
	all entries in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 get zeroed out, with the following exceptions:

	    Mask, FgPen, AOLPen, and LinePtrn are set to -1.
	    The DrawMode is set to JAM2
	    The font is set to the standard system font

   NOTES
	The struct Rastport describes a control structure
       for a write-able raster. The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
       describes how a complete single playfield display
       will be written into. A 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure is
       referenced whenever any drawing or filling
       operations are to be performed on a section of
       memory.

       The section of memory which is being used in this
       way may or may not be presently a part of the
       current actual onscreen display memory. The name
       of the actual memory section which is linked to
       the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 is referred to here as a "raster" or
       as a bitmap.

       NOTE: Calling the routine InitRastPort only
       establishes various defaults. It does NOT
       establish where, in memory, the rasters are
       located. To do graphics with this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 the user
	must set up the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 pointer in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   BUGS

   SEE ALSO
   	graphics/rastport.h

            </literallayout>
        </section>
        <section id="n672">
            <title>graphics.library/InitTmpRas</title>
            <literallayout class="monospaced">
                   NAME
	InitTmpRas -- Initialize area of local memory for usage by
			areafill, floodfill, text.

   SYNOPSIS
   	InitTmpRas(tmpras, buffer, size)
              	    a0	     a1     d0

	void InitTmpRas( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">TmpRas</ulink>
                 *, void *, ULONG );

   FUNCTION
	The area of memory pointed to by buffer is set up to be used
	by 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 routines that may need to get some memory for
	intermediate operations in preparation to putting the graphics
	into the final 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .
	Tmpras is used to control the usage of buffer.

   INPUTS
	tmpras - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">TmpRas</ulink>
                 structure to be linked into
		a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	buffer - pointer to a contiguous piece of chip memory.
	size - size in bytes of buffer

   RESULT
	makes buffer available for users of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   BUGS
	Would be nice if RastPorts could share one 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">TmpRas</ulink>
                .

   SEE ALSO
	
                <link linkend="n594">AreaEnd()</link>
                 
                <link linkend="n636">Flood()</link>
                 
                <link linkend="n730">Text()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n673">
            <title>graphics.library/InitView</title>
            <literallayout class="monospaced">
                   NAME   
   InitView - Initialize 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure.

   SYNOPSIS
	InitView( view )
		   a1

	void InitView( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 * );

   FUNCTION
	Initialize 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure to default values.

   INPUTS
	view - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure

   RESULT
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure set to all 0's. (1.0,1.1.1.2)
	Then values are put in DxOffset,DyOffset to properly position
	default display about .5 inches from top and left on monitor.
	InitView pays no attention to previous contents of view.

   BUGS

   SEE ALSO
 	
                <link linkend="n679">MakeVPort</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n674">
            <title>graphics.library/InitVPort</title>
            <literallayout class="monospaced">
                   NAME   
	InitVPort - Initialize 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure.

   SYNOPSIS
	InitVPort( vp )
		   a0

	void InitViewPort( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 * );

   FUNCTION
	Initialize 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure to default values.

   INPUTS
	vp - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure

   RESULT
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure set to all 0's. (1.0,1.1)
       New field added SpritePriorities, initialized to 0x24 (1.2)

   BUGS

   SEE ALSO
	
                <link linkend="n679">MakeVPort()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n675">
            <title>graphics.library/LoadRGB32</title>
            <literallayout class="monospaced">
                   NAME
	LoadRGB32 -- Set a series of color registers for this Viewport. (V39)

   SYNOPSIS
	LoadRGB32(  vp,  table )
	            a0   a1

	void LoadRGB32( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *, ULONG *);

   INPUTS
	vp = viewport
	table = a pointer to a series of records which describe which colors to
	        modify.
   RESULT
	The selected color registers are changed to match your specs.
   BUGS

   NOTES

	Passing a NULL "table" is ignored.
	The format of the table passed to this function is a series of records,
	each with the following format:

	        1 Word with the number of colors to load
	        1 Word with the first color to be loaded.
	        3 longwords representing a left justified 32 bit rgb triplet.
	        The list is terminated by a count value of 0.

	   examples:
	        ULONG table[]={1l&lt;&lt;16+0,0xffffffff,0,0,0} loads color register
	                0 with 100% red.
	        ULONG table[]={256l&lt;&lt;16+0,r1,g1,b1,r2,g2,b2,.....0} can be used
	                to load an entire 256 color palette.

	Lower order bits of the palette specification will be discarded,
	depending on the color palette resolution of the target graphics
	device. Use 0xffffffff for the full value, 0x7fffffff for 50%,
	etc. You can find out the palette range for your screen by
	querying the graphics data base.

	LoadRGB32 is faster than 
                <link linkend="n720">SetRGB32</link>
                , even for one color.

   SEE ALSO
	
                <link linkend="n676">LoadRGB4()</link>
                 
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n657">GetRGB32()</link>
                 
                <link linkend="n721">SetRGB32CM()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
            </literallayout>
        </section>
        <section id="n676">
            <title>graphics.library/LoadRGB4</title>
            <literallayout class="monospaced">
                   NAME
	LoadRGB4 -- Load RGB color values from table.

   SYNOPSIS
	LoadRGB4( vp, colors , count )
                 a0  	a1     d0:16

	void LoadRGB4( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 *, WORD);

   FUNCTION
   	load the count words of the colormap from table starting at
	entry 0.

   INPUTS
	vp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                , whose colors you wish to change
	colors - pointer to table of RGB values set up as an array
	         of USHORTS
		 	background--  0x0RGB
			color1	  --  0x0RGB
			color2    --  0x0RGB
			 etc.         
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 per value.
		The colors are interpreted as 15 = maximum intensity.
		                              0 = minimum intensity.
	count	= number of UWORDs in the table to load into the
	  colormap starting at color 0(background) and proceeding
	  to the next higher color number

   RESULTS
	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 should have a pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 to store
	the colors in.
	Updates the hardware copperlist to reflect the new colors.
	Updates the intermediate copperlist with the new colors.

   BUGS

	NOTE: Under V36 and up, it is not safe to call this function
	from an interrupt, due to semaphore protection of graphics
	copper lists.

   SEE ALSO
	
                <link linkend="n722">SetRGB4()</link>
                 
                <link linkend="n658">GetRGB4()</link>
                 
                <link linkend="n651">GetColorMap()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n677">
            <title>graphics.library/LoadView</title>
            <literallayout class="monospaced">
                   NAME
       LoadView -- Use a (possibly freshly created) coprocessor instruction
                   list to create the current display.

   SYNOPSIS
       LoadView( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 )
                  A1

	void LoadView( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 * );

   FUNCTION
	Install a new view to be displayed during the next display
	refresh pass.
       Coprocessor instruction list has been created by
       
                <link linkend="n674">InitVPort()</link>
                , 
                <link linkend="n679">MakeVPort()</link>
                , and 
                <link linkend="n683">MrgCop()</link>
                .

   INPUTS
       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 - a pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure which contains the
       pointer to the constructed coprocessor instructions list, or NULL.

   RESULT
	If the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 pointer is non-NULL, the new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 is displayed,
	according to your instructions.  The vertical blank routine
	will pick this pointer up and direct the copper to start
	displaying this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                .

	If the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 pointer is NULL, no 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 is displayed.

   NOTE
	Even though a LoadView(NULL) is performed, display DMA will still be
	active.  Sprites will continue to be displayed after a LoadView(NULL)
	unless an OFF_SPRITE is subsequently performed.

   BUGS

   SEE ALSO
       
                <link linkend="n674">InitVPort()</link>
                 
                <link linkend="n679">MakeVPort()</link>
                 
                <link linkend="n683">MrgCop()</link>
                 
                <link linkend="n409">intuition/RethinkDisplay()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n678">
            <title>graphics.library/LockLayerRom</title>
            <literallayout class="monospaced">
                   NAME
	LockLayerRom -- 
                <link linkend="n110">Lock</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure by ROM(gfx lib) code.

   SYNOPSIS
	LockLayerRom( layer )
		       a5

	void LockLayerRom( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 * );

   FUNCTION
	Return when the layer is locked and no other task may
	alter the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 structure in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure.
	This call does not destroy any registers.
	This call nests so that callers in this chain will not lock
	themselves out.
	Do not have the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 locked during a call to intuition.
	There is a potential deadlock problem here, if intuition
	needs to get other locks as well.
	Having the layer locked prevents other tasks from using the
	layer library functions, most notably intuition itself. So
	be brief.
	layers.library's 
                <link linkend="n762">LockLayer</link>
                 is identical to LockLayerRom.

   INPUTS
	layer - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure

   RESULTS
	The layer is locked and the task can render assuming the
	ClipRects will not change out from underneath it until
	an 
                <link linkend="n734">UnlockLayerRom</link>
                 is called.

   SEE ALSO
	
                <link linkend="n734">UnlockLayerRom()</link>
                 
                <link linkend="n762">layers.library/LockLayer()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n679">
            <title>graphics.library/MakeVPort</title>
            <literallayout class="monospaced">
                   NAME
	MakeVPort -- generate display copper list for a viewport.

   SYNOPSIS
	error =  MakeVPort( view, viewport )
	 d0                   a0     a1

	ULONG MakeVPort( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 * );

   FUNCTION
	Uses information in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                , ViewPort-&gt;RasInfo to
	construct and intermediate copper list for this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .

   INPUTS
	view - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 structure
	viewport - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure
		 The viewport must have valid pointer to a RasInfo.

   RESULTS
	constructs intermediate copper list and puts pointers in
	viewport.DspIns
	If the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 ptr in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 is NULL then it uses colors
	from the default color table.
	If DUALPF in Modes then there must be a second RasInfo pointed
	to by the first RasInfo

	From V39, MakeVPort can return a ULONG error value (previous versions
	returned void), to indicate that either not enough memory could be
	allocated for MakeVPort's use, or that the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 mode
	and bitplane alignments are incorrect for the bitplane's depth.

	You should check for these error values - they are defined in
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">&lt;graphics/view.h&gt;</ulink>
                .


   BUGS
	In V37 and earlier, narrow Viewports (whose righthand edge is
	less than 3/4 of the way across the display) do not work properly.

   SEE ALSO
	
                <link linkend="n674">InitVPort()</link>
                 
                <link linkend="n683">MrgCop()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                 
                <link linkend="n374">intuition.library/MakeScreen()</link>
                	
                <link linkend="n402">intuition.library/RemakeDisplay()</link>
                 
                <link linkend="n409">intuition.library/RethinkDisplay()</link>
                
            </literallayout>
        </section>
        <section id="n680">
            <title>graphics.library/ModeNotAvailable</title>
            <literallayout class="monospaced">
                   NAME
	ModeNotAvailable -- check to see if a DisplayID isn't available. (V36)

   SYNOPSIS
	error =  ModeNotAvailable( modeID )
	d0		           d0

	ULONG	ModeNotAvailable( ULONG);

   FUNCTION
	returns an error code, indicating why this modeID is not available,
	or NULL if there is no reason known why this mode should not be there.

   INPUTS
	modeID -- a 32 bit DisplayInfoRecord identifier.

   RESULT
	error -- a general indication of why this modeID is not available,
		 or NULL if there is no reason why it shouldn't be available.

   NOTE
	ULONG return values from this function are a proper superset of the
	DisplayInfo.NotAvailable field (defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">graphics/displayinfo.h)</ulink>
                .

	ModeNotAvailable() will return INVALID_ID when given a non-existant
	moe ID.

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">graphics/displayinfo.h</ulink>
                , 
                <link linkend="n661">GetVPModeID()</link>
                
            </literallayout>
        </section>
        <section id="n681">
            <title>graphics.library/Move</title>
            <literallayout class="monospaced">
                   NAME
	Move -- Move graphics pen position.

   SYNOPSIS
	Move( rp,   x,    y)
	      a1  d0:16 d1:16

	void Move( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                 );

   FUNCTION
	Move graphics pen position to (x,y) relative to upper left (0,0)
	of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                . This sets the starting point for subsequent 
                <link linkend="n629">Draw()</link>
                	and 
                <link linkend="n730">Text()</link>
                 calls.

   INPUTS
	rp - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	x,y - point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   RESULTS

   BUGS

   SEE ALSO
	
                <link linkend="n629">Draw()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n682">
            <title>graphics.library/MoveSprite</title>
            <literallayout class="monospaced">
                   NAME
	MoveSprite -- 
                <link linkend="n681">Move</link>
                 sprite to a point relative to top of viewport.

   SYNOPSIS
	MoveSprite(vp, sprite, x, y)
	           A0  A1      D0 D1

	void MoveSprite(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 *, WORD, WORD);

   FUNCTION
	
                <link linkend="n681">Move</link>
                 sprite image to new place on display.

   INPUTS
	vp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure
	     if vp = 0, sprite is positioned relative to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                .
	sprite - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">SimpleSprite</ulink>
                 structure
	(x,y)  - new position relative to top of viewport or view.

   RESULTS
	Calculate the hardware information for the sprite and
	place it in the posctldata array. During next video display
	the sprite will appear in new position.

   BUGS
	Sprites really appear one pixel to the left of the position you specify.
	This bug affects the apparent display position of the sprite on the
	screen,	but does not affect the numeric position relative to the
	viewport or view. This behaviour only applies to SimpleSprites,
	not to ExtSprites.


   SEE ALSO
	
                <link linkend="n645">FreeSprite()</link>
                  
                <link linkend="n612">ChangeSprite()</link>
                  
                <link linkend="n660">GetSprite()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/sprite.h">graphics/sprite.h</ulink>
                
            </literallayout>
        </section>
        <section id="n683">
            <title>graphics.library/MrgCop</title>
            <literallayout class="monospaced">
                   NAME
       MrgCop -- Merge together coprocessor instructions.

   SYNOPSIS
       error = MrgCop( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 )
       d0              A1

	ULONG MrgCop( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 * );

   FUNCTION
       Merge together the display, color, sprite and user coprocessor
       instructions into a single coprocessor instruction stream.  This
       essentially creates a per-display-frame program for the coprocessor.
       This function MrgCop is used, for example, by the graphics animation
       routines which effectively add information into an essentially
       static background display.  This changes some of the user
       or sprite instructions, but not those which have formed the
       basic display in the first place.  When all forms of coprocessor
       instructions are merged together, you will have a complete per-
       frame instruction list for the coprocessor.

       Restrictions:  Each of the coprocessor instruction lists MUST be
       internally sorted in min to max Y-X order.  The merge routines
       depend on this! Each list must be terminated using CEND(copperlist).

   INPUTS
       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">View</ulink>
                 - a pointer to the view structure whose coprocessor
              instructions are to be merged.

   RESULT
       The view structure will now contain a complete, sorted/merged
       list of instructions for the coprocessor, ready to be used by
       the display processor.  The display processor is told to use
       this new instruction stream through the instruction 
                <link linkend="n677">LoadView()</link>
                .

	From V39, MrgCop() can return a ULONG error value (previous versions
	returned void), to indicate that either there was insufficient memory
	to build the system copper lists, or that MrgCop() had no work to do
	if, for example, there were no ViewPorts in the list.

	You should check for these error values - they are defined in
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">&lt;graphics/view.h&gt;</ulink>
                .

   BUGS

   SEE ALSO
       
                <link linkend="n674">InitVPort()</link>
                 
                <link linkend="n679">MakeVPort()</link>
                 
                <link linkend="n677">LoadView()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                	
                <link linkend="n409">intuition.library/RethinkDisplay()</link>
                
            </literallayout>
        </section>
        <section id="n684">
            <title>graphics.library/NewRegion</title>
            <literallayout class="monospaced">
                   NAME 
       NewRegion -- Get an empty region.

   SYNOPSIS 
       region = NewRegion()
	d0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *NewRegion();

   FUNCTION 
	Create a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure, initialize it to empty, and return
	a pointer it.

   RESULTS
	region - pointer to initialized region. If it could not allocate
		required memory region = NULL.

   INPUTS 
	none

   BUGS 

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n685">
            <title>graphics.library/NextDisplayInfo</title>
            <literallayout class="monospaced">
                   NAME
	NextDisplayInfo -- iterate current displayinfo identifiers (V36)

   SYNOPSIS
	next_ID = NextDisplayInfo(last_ID)
	D0                        D0

	ULONG NextDisplayInfo(ULONG);

   FUNCTION
	The basic iteration function with which to find all records in the
	graphics database.  Using each ID in succession, you can then call
	
                <link linkend="n635">FindDisplayInfo()</link>
                 to obtain the handle associated with each ID.
	Each ID is a 32-bit Key which uniquely identifies one record.
	The INVALID_ID is special, and indicates the end-of-list.

   INPUTS
	last_ID - previous displayinfo identifier
	          or INVALID_ID if beginning iteration.

   RESULT
	next_ID - subsequent displayinfo identifier
	          or INVALID_ID if no more records.

   BUGS

   SEE ALSO
	
                <link linkend="n635">FindDisplayInfo()</link>
                , 
                <link linkend="n652">GetDisplayInfoData()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">graphics/displayinfo.h</ulink>
                
            </literallayout>
        </section>
        <section id="n686">
            <title>graphics.library/ObtainBestPenA</title>
            <literallayout class="monospaced">
                   NAME
	ObtainBestPenA --- Search for the closest color match, or allocate a
	                   new one. (V39)
	ObtainBestPen  --- varargs stub for ObtainBestPenA

   SYNOPSIS
	color | -1 =ObtainBestPenA(  cm,  R,   G,    B,    taglist)
	                             a0   d1   d2    d3       a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ObtainBestPenA( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, ULONG, ULONG,
			ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	color = ObtainBestPen(cm,r,g,b,tags....);

   INPUTS
	cm = colormap
	R = red level   (32 bit left justified fraction)
	G = green level (32 bit left justified fraction)
	B = blue level  (32 bit left justified fraction)
	taglist = a pointer to a standard tag list specifying the color
	          matching settings desired:

	        OBP_Precision - specifies the desired precision for the
	                match. Should be PRECISION_GUI, PRECISION_ICON, or
	                PRECISION_IMAGE or PRECISION_EXACT.
	                Defaults to PRECISION_IMAGE.

	        OBP_FailIfBad - specifies that you want ObtainBestPen to return
	                a failure value if there is not a color within the
	                given tolerance, instead of returning the closest color.
	                With OBP_FailIfBad==FALSE, ObtainBestPen will only fail
	                if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 contains no sharable colors.
	                Defaults to FALSE.


   FUNCTION
	This function can be used by applications to figure out
	what pen to use to represent a given color.

	The system will attempt to find the color in your viewport closest
	to the specified color. If there is no color within your tolerance,
	then a new one will be allocated, if available. If none is available,
	then the closest one found will be returned.

   RESULT
	The correct pen value, or -1 if no sharable palette entries are available.


   BUGS

   NOTES
	If this call succceeds, then you must call 
                <link linkend="n700">ReleasePen()</link>
                 when you are
	done with the color.

	The error metric used for ObtainBestPen() is based on the magnitude
	squared between the two RGB values, scaled by the percentage of free
	entries.

   SEE ALSO
	
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n687">ObtainPen()</link>
                 
                <link linkend="n700">ReleasePen()</link>
            </literallayout>
        </section>
        <section id="n687">
            <title>graphics.library/ObtainPen</title>
            <literallayout class="monospaced">
                   NAME
	ObtainPen -- Obtain a free palette entry for use by your program. (V39)


   SYNOPSIS
	n = ObtainPen( cm, n, r, g, b, flags)
	d0	       a0 d0  d1 d2 d3  d4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ObtainPen(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *,ULONG,ULONG,ULONG,ULONG,ULONG);

   FUNCTION
	Attempt to allocate an entry in the colormap for use by the application.
	If successful, you should 
                <link linkend="n700">ReleasePen()</link>
                 this entry after you have finished
	with it.

	Applications needing exclusive use of a color register (say for color
	cycling) will typically call this function with n=-1. Applications needing
	only the shared use of a color will typically use 
                <link linkend="n686">ObtainBestPenA()</link>
                 instead.
	Other uses of this function are rare.

   INPUTS
	cm  =  A pointer to a color map created by 
                <link linkend="n651">GetColorMap()</link>
                .
	n   =  The index of the desired entry, or -1 if any one is acceptable
	rgb =  The RGB values (32 bit left justified fractions) to set the new
	       palette entry to.
	flags= PEN_EXCLUSIVE - tells the system that you want exclusive
	       (non-shared) use of this pen value. Default is shared access.

	       PEN_NO_SETCOLOR - tells the system to not change the rgb values
	       for the selected pen. Really only makes sense for exclusive pens.


   RESULTS

	n   =  The allocated pen. -1 will be returned if there is no pen available
	       for you.

   BUGS

   NOTES
	When you allocate a palette entry in non-exclusive mode, you
	should not change it (via SetRGB32), because other programs on the
	same screen may be using it. With PEN_EXCLUSIVE mode, you can
	change the returned entry at will.

	To avoid visual artifacts, you should not free up a palette
	entry until you are sure that your application is not displaying
	any pixels in that color at the time you free it. Otherwise, another
	task could allocate and set that color index, thus changing the colors
	of your pixels.

	Generally, for shared access, you should use 
                <link linkend="n686">ObtainBestPenA()</link>
                	instead, since it will not allocate a new color if there is one
	"close enough" to the one you want already.
	If there is no Palextra attached to the colormap, then this
	routine will always fail.

   SEE ALSO
	
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n700">ReleasePen()</link>
                 
                <link linkend="n598">AttachPalExtra()</link>
                 
                <link linkend="n686">ObtainBestPenA()</link>
                
            </literallayout>
        </section>
        <section id="n688">
            <title>graphics.library/OpenFont</title>
            <literallayout class="monospaced">
                   NAME
	OpenFont -- Get a pointer to a system font.

   SYNOPSIS
	font = OpenFont(textAttr)
	D0              A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *OpenFont(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 *);

   FUNCTION
	This function searches the system font space for the graphics
	text font that best matches the attributes specified.  The
	pointer to the font returned can be used in subsequent
	
                <link linkend="n715">SetFont</link>
                 and 
                <link linkend="n620">CloseFont</link>
                 calls.  It is important to match this
	call with a corresponding 
                <link linkend="n620">CloseFont</link>
                 call for effective
	management of ram fonts.

   INPUTS
	textAttr - a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TTextAttr</ulink>
                 structure that describes the
	           text font attributes desired.

   RESULT
	font is zero if the desired font cannot be found.  If the named
	font is found, but the size and style specified are not
	available, a font with the nearest attributes is returned.

   BUGS
	Prior to V39 this function would return a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 pointer
	for any font which matched exactly in Y size, regardless of
	differences in DPI, or DotSize.

	As part of fixing this bug it is REQUIRED that you use pass the
	same 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 (or TTextAttr) to this function that was used when
	
                <link linkend="n783">OpenDiskFont()</link>
                 was called.

	OpenFont(), and 
                <link linkend="n783">OpenDiskFont()</link>
                 use WeighTAMatch() to measure
	how well two fonts match.  WeightTAMatch() was a public function
	in graphics.library V36-V37; it is now a system PRIVATE function
	as of V39.

   SEE ALSO
	
                <link linkend="n620">CloseFont()</link>
                  
                <link linkend="n715">SetFont()</link>
                	
                <link linkend="n783">diskfont.library/OpenDiskFont</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">intuition/intuition.h</ulink>
                
            </literallayout>
        </section>
        <section id="n689">
            <title>graphics.library/OpenMonitor</title>
            <literallayout class="monospaced">
                   NAME
       OpenMonitor -- open a named 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 (V36)

   SYNOPSIS
       mspc = OpenMonitor( monitor_name , display_id)
       d0                  a1		   d0

       struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 *OpenMonitor( char *, ULONG );

   FUNCTION
       Locate and open a named 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                .

   INPUTS
       monitor_name - a pointer to a null terminated string.
       display_id - an optional 32 bit monitor/mode identifier

   RESULTS
       mspc - a pointer to an open 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 structure.
              NULL if 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">MonitorSpec</ulink>
                 could not  be opened.

   NOTE
	if monitor_name is non-NULL, the monitor will be opened by name.
	if monitor_name is NULL the monitor will be opened by optional ID.
	if both monitor_name and display_id are NULL returns default monitor.

   BUGS

   SEE ALSO
       
                <link linkend="n621">CloseMonitor()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/monitor.h">graphics/monitor.h</ulink>
                
            </literallayout>
        </section>
        <section id="n690">
            <title>graphics.library/OrRectRegion</title>
            <literallayout class="monospaced">
                   NAME 
       OrRectRegion -- Perform 2d OR operation of rectangle
                       with region, leaving result in region.

   SYNOPSIS 
       status = OrRectRegion(region,rectangle)
         d0                    a0      a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 OrRectRegion( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 * );

   FUNCTION 
       If any portion of rectangle is not in the region then add
       that portion to the region.

   INPUTS 
       region - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure
       rectangle - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 structure

   RESULTS
	status - return TRUE if successful operation
		 return FALSE if ran out of memory

   BUGS 

   SEE ALSO
	
                <link linkend="n588">AndRectRegion()</link>
                 
                <link linkend="n691">OrRegionRegion()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n691">
            <title>graphics.library/OrRegionRegion</title>
            <literallayout class="monospaced">
                   NAME 
       OrRegionRegion -- Perform 2d OR operation of one region
                       with second region, leaving result in second region

   SYNOPSIS 
       status = OrRegionRegion(region1,region2)
         d0                       a0      a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 OrRegionRegion( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 * );

   FUNCTION 
       If any portion of region1  is not in the region then add
       that portion to the region2

   INPUTS 
       region1 - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure
       region2 - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure

   RESULTS
	status - return TRUE if successful operation
		 return FALSE if ran out of memory

   BUGS 

   SEE ALSO
 	
                <link linkend="n690">OrRectRegion()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n692">
            <title>graphics.library/OwnBlitter</title>
            <literallayout class="monospaced">
                   NAME
       OwnBlitter -- get the blitter for private usage

   SYNOPSIS
       OwnBlitter()

	void OwnBlitter( void );

   FUNCTION
	If blitter is available return immediately with the blitter
	locked for your exclusive use. If the blitter is not available
	put task to sleep. It will be awakened as soon as the blitter
	is available. When the task first owns the blitter the blitter
	may still be finishing up a blit for the previous owner. You
	must do a 
                <link linkend="n737">WaitBlit</link>
                 before actually using the blitter registers.

	Calls to OwnBlitter() do not nest. If a task that owns the
	blitter calls OwnBlitter() again, a lockup will result.
	(Same situation if the task calls a system function
	that tries to own the blitter).

   INPUTS
	NONE

   RETURNS
	NONE

   SEE ALSO
	
                <link linkend="n626">DisownBlitter()</link>
                 
                <link linkend="n737">WaitBlit()</link>
            </literallayout>
        </section>
        <section id="n693">
            <title>graphics.library/PolyDraw</title>
            <literallayout class="monospaced">
                   NAME
	PolyDraw -- 
                <link linkend="n629">Draw</link>
                 lines from table of (x,y) values.

   SYNOPSIS
	PolyDraw( rp, count , array )
		  a1   d0      a0

	void PolyDraw( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, WORD, WORD * );

   FUNCTION
	starting with the first pair in the array, draw connected lines to
	it and every successive pair.

   INPUTS
	rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	count -  number of (x,y) pairs in the array
	array - pointer to first (x,y) pair

   BUGS

   SEE ALSO
	
                <link linkend="n629">Draw()</link>
                 
                <link linkend="n681">Move()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n694">
            <title>graphics.library/QBlit</title>
            <literallayout class="monospaced">
                   NAME

	QBlit -- Queue up a request for blitter usage

   SYNOPSIS
	QBlit( bp )
	       a1

	void QBlit( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/blit.h">bltnode</ulink>
                 * );

   FUNCTION
	Link a request for the use of the blitter to the end of the
       current blitter queue.  The pointer bp points to a blit structure
       containing, among other things, the link information, and the
       address of your routine which is to be called when the blitter
       queue finally gets around to this specific request.  When your
       routine is called, you are in control of the blitter ... it is
       not busy with anyone else's requests.  This means that you can
       directly specify the register contents and start the blitter.
       See the description of the blit structure and the uses of QBlit
       in the section titled Graphics Support in the OS Kernel Manual.
       Your code must be written to run either in supervisor or user
       mode on the 68000.

   INPUTS
	bp - pointer to a blit structure

   RESULT
	Your routine is called when the blitter is ready for you.
	In general requests for blitter usage through this channel are
	put in front of those who use the blitter via 
                <link linkend="n692">OwnBlitter</link>
                 and
	
                <link linkend="n626">DisownBlitter</link>
                . However for small blits there is more overhead
	using the queuer than Own/Disown Blitter.

   NOTES
	Code which uses QBlit(), or 
                <link linkend="n695">QBSBlit()</link>
                 should make use of
	the pointer to a cleanup routine in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/blit.h">bltnode</ulink>
                 structure.
	The cleanup routine may be called on the context of an
	interrupt, therefore the routine may set a flag, and signal
	a task, but it may not call 
                <link linkend="n243">FreeMem()</link>
                 directly.  Use of
	the cleanup routine is the only safe way to signal that
	your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/blit.h">bltnode</ulink>
                 has completed.

   BUGS
	QBlit(), and 
                <link linkend="n695">QBSBlit()</link>
                 have been rewritten for V39 due to
	various long standing bugs in earlier versions of this code.

   SEE ALSO
	
                <link linkend="n695">QBSBlit()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/blit.h">hardware/blit.h</ulink>
                
            </literallayout>
        </section>
        <section id="n695">
            <title>graphics.library/QBSBlit</title>
            <literallayout class="monospaced">
                   NAME

	QBSBlit -- Synchronize the blitter request with the video beam.

   SYNOPSIS

	QBSBlit( bsp )
		 a1

	void QBSBlit( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/blit.h">bltnode</ulink>
                 * );

   FUNCTION
	Call a user routine for use of the blitter, enqueued separately from
       the 
                <link linkend="n694">QBlit</link>
                 queue.  Calls the user routine contained in the blit
       structure when the video beam is located at a specified position
       onscreen.   Useful when you are trying to blit into a visible part
       of the screen and wish to perform the data move while the beam is
       not trying to display that same area.  (prevents showing part of
       an old display and part of a new display simultaneously).  Blitter
       requests on the QBSBlit queue take precedence over those on the
       regular blitter queue. The beam position is specified in the blitnode.

   INPUTS
	bsp - pointer to a blit structure.  See description in the
             Graphics Support section of the manual for more info.

   RESULT
       User routine is called when the QBSBlit queue reaches this
       request AND the video beam is in the specified position.
       If there are lots of blits going on and the video beam
       has wrapped around back to the top it will call all the
       remaining bltnodes as fast as it can to try and catch up.

   NOTES
       
                <link linkend="n694">QBlit()</link>
                , and QBSBlit() have been rewritten for V39.  Queued
       blits are now handled in FIFO order.  Tasks trying to
       
                <link linkend="n692">OwnBlitter()</link>
                 are now given a fair share of the total
       blitter time available.  QBSBlit() is no longer queued
       separately from nodes added by 
                <link linkend="n694">QBlit()</link>
                .  This fixes the
       ordering dependencies listed under BUGS in prior autodoc
       notes.

   BUGS

   SEE ALSO
	
                <link linkend="n694">QBlit()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/blit.h">hardware/blit.h</ulink>
                
            </literallayout>
        </section>
        <section id="n696">
            <title>graphics.library/ReadPixel</title>
            <literallayout class="monospaced">
                   NAME
       ReadPixel -- read the pen number value of the pixel at a
                    specified x,y location within a certain 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SYNOPSIS
       penno = ReadPixel( rp,    x,    y )
         d0               a1  d0:16 d1:16

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ReadPixel( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                 );

   FUNCTION
       Combine the bits from each of the bit-planes used to describe
       a particular 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 into the pen number selector which that
       bit combination normally forms for the system hardware selection
       of pixel color.

   INPUTS
       rp -  pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
       (x,y) a point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   RESULT
       penno - the pen number of the pixel at (x,y) is returned.
		-1 is returned if the pixel cannot be read for some reason.

   BUGS

   SEE ALSO
       
                <link linkend="n741">WritePixel()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n697">
            <title>graphics.library/ReadPixelArray8</title>
            <literallayout class="monospaced">
                   NAME
	ReadPixelArray8 -- read the pen number value of a rectangular array
	of pixels starting at a specified x,y location and continuing
	through to another x,y location within a certain 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                . (V36)

   SYNOPSIS
	count = ReadPixelArray8(rp,xstart,ystart,xstop,ystop,array,temprp)
	D0                      A0 D0:16  D1:16  D2:16 D3:16 A2    A1

     
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ReadPixelArray8(struct  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                ,
	   
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	For each pixel in a rectangular region, combine the bits from each
	of the bit-planes used to describe a particular 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 into the pen
	number selector which that bit combination normally forms for the
	system hardware selection of pixel color.

   INPUTS
	rp    -  pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	(xstart,ystart) - starting point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	(xstop,ystop)   - stopping point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	array - pointer to an array of UBYTEs from which to fetch the pixel data
	        allocate at least ((((width+15)&gt;&gt;4)&lt;&lt;4)*(ystop-ystart+1)) bytes.
	temprp - temporary rastport (copy of rp with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 set == NULL,
	         temporary memory allocated for
	         temprp-&gt;BitMap with Rows set == 1,
	         temprp-&gt;BytesPerRow == (((width+15)&gt;&gt;4)&lt;&lt;1),
	         and temporary memory allocated for
	         temprp-&gt;BitMap-&gt;Planes[])

   RESULT
	For each pixel in the array:
	    Pen - (0..255) number at that position is returned
	count   - the number of pixels read.

   NOTE
	xstop must be &gt;= xstart
	ystop must be &gt;= ystart

   BUGS

   SEE ALSO
	
                <link linkend="n696">ReadPixel()</link>
                  
                <link linkend="n698">ReadPixelLine8()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n698">
            <title>graphics.library/ReadPixelLine8</title>
            <literallayout class="monospaced">
                   NAME
	ReadPixelLine8 -- read the pen number value of a horizontal line
	of pixels starting at a specified x,y location and continuing
	right for count pixels. (V36)

   SYNOPSIS
	count = ReadPixelLine8(rp,xstart,ystart,width,array,temprp)
	D0                     A0 D0:16  D1:16  D2    A2    A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ReadPixelLine8(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                ,
	     
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 * );

   FUNCTION
	For each pixel in a rectangular region, combine the bits from each
	of the bit-planes used to describe a particular 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 into the pen
	number selector which that bit combination normally forms for the
	system hardware selection of pixel color.

   INPUTS
	rp    - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	(x,y) - a point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	width - count of horizontal pixels to read
	array - pointer to an array of UBYTEs from which to fetch the pixel data
	        allocate at least (((width+15)&gt;&gt;4)&lt;&lt;4) bytes.
	temprp - temporary rastport (copy of rp with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 set == NULL,
	         temporary memory allocated for
	         temprp-&gt;BitMap with Rows set == 1,
	         temprp-&gt;BytesPerRow == (((width+15)&gt;&gt;4)&lt;&lt;1),
	         and temporary memory allocated for
	         temprp-&gt;BitMap-&gt;Planes[])

   RESULT
	For each pixel in the array:
	    Pen - (0..255) number at that position is returned
	count   - the number of pixels read.

   NOTE
	width must be non negative

   BUGS

   SEE ALSO
	
                <link linkend="n696">ReadPixel()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n699">
            <title>graphics.library/RectFill</title>
            <literallayout class="monospaced">
                   NAME
       RectFill -- Fill a rectangular region in a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SYNOPSIS

	RectFill( rp, xmin, ymin, xmax, ymax)
                 a1  d0:16 d1:16 d2:16 d3:16

	void RectFill( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                 );

   FUNCTION
	Fills  the  rectangular  region  specified  by  the
	parameters  with the chosen pen  colors,  areafill
	pattern, and drawing mode. If no areafill pattern is
	specified, fill the rectangular region with the FgPen
	color, taking into account the drawing mode.

   INPUTS
	rp - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	(xmin,ymin) (xmax,ymax) are the coordinates of the upper
		left corner and the lower right corner, respectively, of the
	        rectangle.
   NOTE

	The following relation MUST be true:
		(xmax &gt;= xmin) and (ymax &gt;= ymin)

   BUGS
	Complement mode with FgPen complements all bitplanes.

   SEE ALSO
	
                <link linkend="n594">AreaEnd()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n700">
            <title>graphics.library/ReleasePen</title>
            <literallayout class="monospaced">
                   NAME
	ReleasePen -- Release an allocated palette entry to the free pool. (V39)


   SYNOPSIS
	ReleasePen( cm, n)
	            a0 d0

	void ReleasePen( Struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, ULONG);

   FUNCTION
	Return the palette entry for use by other applications.
	If the reference count for this palette entry goes to zero,
	then it may be reset to another RGB value.

   INPUTS
       cm  =  A pointer to a color map created by 
                <link linkend="n651">GetColorMap()</link>
                .

	n   =  A palette index obtained via any of the palette allocation
	       functions. Passing a -1 will result in this call doing
	       nothing.

   BUGS

   NOTES
	This function works for both shared and exclusive palette entries.

   SEE ALSO
	
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n687">ObtainPen()</link>
                 
                <link linkend="n686">ObtainBestPenA()</link>
                
            </literallayout>
        </section>
        <section id="n701">
            <title>graphics.library/RemBob</title>
            <literallayout class="monospaced">
                   NAME
	RemBob -- Macro to remove a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 from the gel list.

   SYNOPSIS
	RemBob(bob)

	RemBob(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 *);

   FUNCTION
	Marks a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 as no-longer-required.  The gels internal code then
	removes the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 from the list of active gels the next time
	
                <link linkend="n631">DrawGList</link>
                 is executed. This is implemented as a macro.
	If the user is double-buffering the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                , it could take two
	calls to 
                <link linkend="n631">DrawGList</link>
                 before the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 actually disappears from
	the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 to be removed

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n703">RemIBob()</link>
                  
                <link linkend="n631">DrawGList()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxmacros.h">graphics/gfxmacros.h</ulink>
                
            </literallayout>
        </section>
        <section id="n702">
            <title>graphics.library/RemFont</title>
            <literallayout class="monospaced">
                   NAME
	RemFont -- 
                <link linkend="n276">Remove</link>
                 a font from the system list.

   SYNOPSIS
	RemFont(textFont)
	        A1

	void RemFont(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *);

   FUNCTION
	This function removes a font from the system, ensuring that
	access to it is restricted to those applications that
	currently have an active pointer to it: i.e. no new 
                <link linkend="n715">SetFont</link>
                	requests to this font are satisfied.

   INPUTS
	textFont - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 structure to remove.

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n715">SetFont()</link>
                  
                <link linkend="n582">AddFont()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n703">
            <title>graphics.library/RemIBob</title>
            <literallayout class="monospaced">
                   NAME
	RemIBob -- Immediately remove a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 from the gel list and the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SYNOPSIS
	RemIBob(bob, rp, vp)
	        A0   A1  A2

	void RemIBob(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *);

   FUNCTION
	Removes a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 immediately by uncoupling it from the gel list and
	erases it from the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   INPUTS
	bob = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 to be removed
	rp  = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">Bob</ulink>
                 is to be erased
	vp  = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 for beam-synchronizing

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <link linkend="n704">RemVSprite()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                
            </literallayout>
        </section>
        <section id="n704">
            <title>graphics.library/RemVSprite</title>
            <literallayout class="monospaced">
                   NAME
	RemVSprite -- 
                <link linkend="n276">Remove</link>
                 a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 from the current gel list.

   SYNOPSIS
	RemVSprite(vs)
	           A0

	void RemVSprite(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 *);

   FUNCTION
	Unlinks the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 from the current gel list.

   INPUTS
	vs = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">VSprite</ulink>
                 structure to be removed from the gel list

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <link linkend="n703">RemIBob()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                
            </literallayout>
        </section>
        <section id="n705">
            <title>graphics.library/ScalerDiv</title>
            <literallayout class="monospaced">
                   NAME
	ScalerDiv -- Get the scaling result that 
                <link linkend="n601">BitMapScale</link>
                 would. (V36)

   SYNOPSIS
	result = ScalerDiv(factor, numerator, denominator)
	D0                 D0      D1         D2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                 ScalerDiv(UWORD, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , UWORD);

   FUNCTION
	Calculate the expression (factor*numerator/denominator) such
	that the result is the same as the width of the destination
	result of 
                <link linkend="n601">BitMapScale</link>
                 when the factor here is the width of
	the source, and the numerator and denominator are the
	XDestFactor and XSrcFactor for 
                <link linkend="n601">BitMapScale</link>
                .

   INPUTS
	factor                 - a number in the range 0..16383
	numerator, denominator - numbers in the range 1..16383

   RESULT
	this returns factor*numerator/denominator

            </literallayout>
        </section>
        <section id="n706">
            <title>graphics.library/ScrollRaster</title>
            <literallayout class="monospaced">
                   NAME
   ScrollRaster -- Push bits in rectangle in raster around by
                   dx,dy towards 0,0 inside rectangle.
   SYNOPSIS
   ScrollRaster(rp, dx, dy, xmin, ymin, xmax, ymax)
                A1  D0  D1  D2    D3    D4    D5

   void ScrollRaster
        (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, WORD, WORD, WORD, WORD, WORD, WORD);

   FUNCTION
   
                <link linkend="n681">Move</link>
                 the bits in the raster by (dx,dy) towards (0,0)
   The space vacated is RectFilled with BGPen.
   Limit the scroll operation to the rectangle defined
   by (xmin,ymin)(xmax,ymax). Bits outside will not be
   affected. If xmax,ymax is outside the rastport then use
   the lower right corner of the rastport.
   If you are dealing with a SimpleRefresh layered 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 you
   should check rp-&gt;Layer-&gt;Flags &amp; LAYERREFRESH to see if
   there is any damage in the damage list.  If there is you should
   call the appropriate BeginRefresh(Intuition) or BeginUpdate(graphics)
   routine sequence.

   INPUTS
   rp - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
   dx,dy are integers that may be positive, zero, or negative
   xmin,ymin - upper left of bounding rectangle
   xmax,ymax - lower right of bounding rectangle

   EXAMPLE
   ScrollRaster(rp,0,1,minx,miny,maxx,maxy) /* shift raster up by one row */
   ScrollRaster(rp,-1,-1,minx,miny,maxx,maxy)
		  /* shift raster down and to the right by 1 pixel

   BUGS
   In 1.2/V1.3 if you ScrollRaster a SUPERBITMAP exactly left or 
   right, and there is no 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">TmpRas</ulink>
                 attached to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , the system
   will allocate one for you, but will never free it or record its 
   location. This bug has been fixed for V36.  The workaround for
   1.2/1.3 is to attach a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">TmpRas</ulink>
                 of size at least
   MAXBYTESPERROW to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 before the call.

   Beginning with V36 ScrollRaster adds the shifted areas into the 
   damage list for SIMPLE_REFRESH windows. Due to unacceptable 
   system overhead, the decision was made NOT to propagate this 
   shifted area damage for SMART_REFRESH windows.

   SEE ALSO
   
                <link linkend="n707">ScrollRasterBF()</link>
                 graphics/rastport.h

            </literallayout>
        </section>
        <section id="n707">
            <title>graphics.library/ScrollRasterBF</title>
            <literallayout class="monospaced">
                   NAME
   ScrollRasterBF -- Push bits in rectangle in raster around by
                   dx,dy towards 0,0 inside rectangle. Newly empty areas
   		will be filled via 
                <link linkend="n632">EraseRect()</link>
                . (V39)

   SYNOPSIS
   ScrollRasterBF(rp, dx, dy, xmin, ymin, xmax, ymax)
                A1  D0  D1  D2    D3    D4    D5

   void ScrollRasterBF
        (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, WORD, WORD, WORD, WORD, WORD, WORD);

   FUNCTION
   
                <link linkend="n681">Move</link>
                 the bits in the raster by (dx,dy) towards (0,0)
   The space vacated is filled by calling EraseRect().
   Limit the scroll operation to the rectangle defined
   by (xmin,ymin)(xmax,ymax). Bits outside will not be
   affected. If xmax,ymax is outside the rastport then use
   the lower right corner of the rastport.
   If you are dealing with a SimpleRefresh layered 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 you
   should check rp-&gt;Layer-&gt;Flags &amp; LAYERREFRESH to see if
   there is any damage in the damage list.  If there is you should
   call the appropriate BeginRefresh(Intuition) or BeginUpdate(graphics)
   routine sequence.

   INPUTS
   rp - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
   dx,dy are integers that may be positive, zero, or negative
   xmin,ymin - upper left of bounding rectangle
   xmax,ymax - lower right of bounding rectangle

   NOTES

   This call is exactly the same as 
                <link linkend="n706">ScrollRaster</link>
                , except that it calls
   
                <link linkend="n632">EraseRect()</link>
                 instead of 
                <link linkend="n699">RectFill()</link>
                 when clearing the newly exposed
   area. This allows use of a custom layer backfill hook.

   BUGS

   SEE ALSO
   
                <link linkend="n706">ScrollRaster()</link>
                 
                <link linkend="n632">EraseRect()</link>
                 
                <link linkend="n414">intuition.library/ScrollWindowRaster()</link>
                 
   graphics/rastport.h

            </literallayout>
        </section>
        <section id="n708">
            <title>graphics.library/ScrollVPort</title>
            <literallayout class="monospaced">
                   NAME
	ScrollVPort -- Reinterpret RasInfo information in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 to reflect
			the current Offset values.

   SYNOPSIS
	ScrollVPort( vp )
		     a0

	void ScrollVPort(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *vp);

   FUNCTION
	After the programmer has adjusted the Offset values in
	the RasInfo structures of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                , change the
	the copper lists to reflect the the Scroll positions.
	Changing the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 ptr in RasInfo and not changing the
	the Offsets will effect a double buffering affect.

   INPUTS
       vp - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure
	     that is currently be displayed.
   RESULTS
	modifies hardware and intermediate copperlists to reflect
	new RasInfo

   BUGS
       pokes not fast enough to avoid some visible hashing of display (V37)
	This function was re-written in V39 and is ~10 times faster than
	before.

   SEE ALSO
	
                <link linkend="n679">MakeVPort()</link>
                 
                <link linkend="n683">MrgCop()</link>
                 
                <link linkend="n677">LoadView()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n709">
            <title>graphics.library/SetABPenDrMd</title>
            <literallayout class="monospaced">
                   NAME   
 	SetABPenDrMd -- Set pen colors and draw mode for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                . (V39)

   SYNOPSIS
	SetABPenDrMd( rp, apen, bpen, mode )
		 		  a1  d0     d1    d2

	void SetABPenDrMd( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, ULONG, ULONG, ULONG );

   FUNCTION
	Set the pen values and drawing mode for lines, fills and text.
	Get the bit definitions from rastport.h

   INPUTS
	rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.
	apen - primary pen value
	bpen - secondary pen value
	mode - 0-255, some combinations may not make much sense.

   RESULT
	The mode set is dependent on the bits selected.
	Changes minterms to reflect new drawing mode and colors.
	Sets line drawer to restart pattern.

	NOTES
	This call is essentially the same as a sequence of
	SetAPen()/SetBPen()/SetDrMD() calls, except that it is
	significantly faster. The minterms will only be generated
	once, or not at all if nothing changed (warning to illegal
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 pokers!).

   BUGS

   SEE ALSO
	
                <link linkend="n710">SetAPen()</link>
                 
                <link linkend="n711">SetBPen()</link>
                 
                <link linkend="n714">SetDrMd()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n710">
            <title>graphics.library/SetAPen</title>
            <literallayout class="monospaced">
                   NAME   
	SetAPen -- Set the primary pen for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SYNOPSIS
	SetAPen( rp, pen )
		 a1  d0

	void SetAPen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 );

   FUNCTION
	Set the primary drawing pen for lines, fills, and text.

   INPUTS
	rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.
	pen - (0-255)

   RESULT
	Changes the minterms in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to reflect new primary pen.
	Sets line drawer to restart pattern.

   BUGS

   SEE ALSO
	
                <link linkend="n711">SetBPen()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n711">
            <title>graphics.library/SetBPen</title>
            <literallayout class="monospaced">
                   NAME   
	SetBPen -- Set secondary pen for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   SYNOPSIS
	SetBPen( rp, pen )
		 a1  d0

	void SetBPen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 );

   FUNCTION
	Set the secondary drawing pen for lines, fills, and text.

   INPUTS
	rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.
	pen - (0-255)

   RESULT
	Changes the minterms in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to reflect new secondary pen.
	Sets line drawer to restart pattern.

   BUGS

    SEE ALSO
	
                <link linkend="n710">SetAPen()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n712">
            <title>graphics.library/SetChipRev</title>
            <literallayout class="monospaced">
                   NAME
	SetChipRev -- turns on the features of a Chip Set  (V39)

   SYNOPSIS
	chiprevbits = SetChipRev(ChipRev)
	                           d0

	ULONG SetChipRev(ULONG);

   FUNCTION
	Enables the features of the requested Chip Set if available,
	and updates the graphics database accordingly.

   INPUTS
	ChipRev - Chip Rev that you would like to be enabled.

   RESULT
	chiprevbits - Actual bits set in GfxBase-&gt;ChipRevBits0.

   NOTES
	This routine should only be called once. It will be called by the system
	in the startup-sequence, but is included in the autodocs for authors
	of bootblock-games that wish to take advantage of post-ECS features.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxbase.h">&lt;graphics/gfxbase.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n713">
            <title>graphics.library/SetCollision</title>
            <literallayout class="monospaced">
                   NAME
	SetCollision -- Set a pointer to a user collision routine.

   SYNOPSIS
	SetCollision(num, routine, GInfo)
	             D0   A0       A1

	void SetCollision(ULONG, VOID (*)(), struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">GelsInfo</ulink>
                 *);

   FUNCTION
	Sets a specified entry (num) in the user's collision vectors table
	equal to the address of the specified collision routine.

   INPUTS
	num     = collision vector number
	routine = pointer to the user's collision routine
	GInfo   = pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">GelsInfo</ulink>
                 structure

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gels.h">graphics/gels.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n714">
            <title>graphics.library/SetDrMd</title>
            <literallayout class="monospaced">
                   NAME   
 	SetDrMd -- Set drawing mode for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   SYNOPSIS
	SetDrMd( rp, mode )
		 a1  d0:8

	void SetDrMd( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 );

   FUNCTION
	Set the drawing mode for lines, fills and text.
	Get the bit definitions from rastport.h

   INPUTS
	rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.
	mode - 0-255, some combinations may not make much sense.

   RESULT
	The mode set is dependent on the bits selected.
	Changes minterms to reflect new drawing mode.
	Sets line drawer to restart pattern.

   BUGS

   SEE ALSO
	
                <link linkend="n710">SetAPen()</link>
                 
                <link linkend="n711">SetBPen()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n715">
            <title>graphics.library/SetFont</title>
            <literallayout class="monospaced">
                   NAME
	SetFont -- Set the text font and attributes in a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SYNOPSIS
	SetFont(rp, font)
	        A1   A0

	void SetFont(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *);

   FUNCTION
	This function sets the font in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to that described
	by font, and updates the text attributes to reflect that
	change.  This function clears the effect of any previous
	soft styles.

   INPUTS
	rp   - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 in which the text attributes are to be changed
	font - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 structure returned from 
                <link linkend="n688">OpenFont()</link>
                	       or 
                <link linkend="n783">OpenDiskFont()</link>
                   RESULT

   NOTES
	This function had previously been documented that it would
	accept a null font.  This practice is discouraged.
	o   Use of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 with a null font with text routines has
	    always been incorrect and risked the guru.
	o   Keeping an obsolete font pointer in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 is no more
	    dangerous than keeping a zero one there.
	o   SetFont(rp, 0) causes spurious low memory accesses under
	    some system software releases.

	As of V36, the following Amiga font variants are no longer
	directly supported:
	    fonts with NULL tf_CharSpace and non-NULL tf_CharKern.
	    fonts with non-NULL tf_CharSpace and NULL tf_CharKern.
	    fonts with NULL tf_CharSpace and NULL tf_CharKern with
		a tf_CharLoc size component greater than tf_XSize.
	Attempts to SetFont these one of these font variants will
	cause the system to modify your font to make it acceptable.

   BUGS
	Calling SetFont() on in-code TextFonts (ie fonts not
	OpenFont()ed) will result in a loss of 24 bytes from
	the system as of V36.
	This can be resolved by calling 
                <link linkend="n728">StripFont()</link>
                .

   SEE ALSO
	
                <link linkend="n688">OpenFont()</link>
                  
                <link linkend="n728">StripFont()</link>
                	
                <link linkend="n783">diskfont.library/OpenDiskFont()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n716">
            <title>graphics.library/SetMaxPen</title>
            <literallayout class="monospaced">
                   NAME
       SetMaxPen -- set maximum pen value for a rastport (V39).


   SYNOPSIS
       SetMaxPen ( rp, maxpen)
   		    a0   d0

	void SetMaxPen(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *,ULONG)

   FUNCTION
	This will instruct the graphics library that the owner of the rastport
	will not be rendering in any colors whose index is &gt;maxpen. If there
	are any speed optimizations which the graphics device can make based
	on this fact (for instance, setting the pixel write mask), they will
	be done.

	Basically this call sets the rastport mask, if this would improve
	speed. On devices where masking would slow things down (like with
	chunky pixels), it will be a no-op.

   INPUTS
       rp  =  a pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.
	maxpen =  a longword pen value.

   BUGS

   NOTES
	The maximum pen value passed must take into account not only which
	colors you intend to render in the future, but what colors you will
	be rendering on top of.
	SetMaxPen(rp,0) doesn't make much sense.

   SEE ALSO
	
                <link linkend="n726">SetWriteMask()</link>
                
            </literallayout>
        </section>
        <section id="n717">
            <title>graphics.library/SetOPen</title>
            <literallayout class="monospaced">
                   NAME
	SetOPen -- Change the Area OutLine pen and turn on Outline
			mode for areafills.

   SYNOPSIS
	SetOPen(rp, pen)

	void SetOPen( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 );

   FUNCTION
	This is implemented as a c-macro.
	Pen is the pen number that will be used to draw a border
	around an areafill during 
                <link linkend="n594">AreaEnd()</link>
                .

   INPUTS
	rp = pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	pen = number  between 0-255

   BUGS

   SEE ALSO
	
                <link linkend="n594">AreaEnd()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxmacros.h">graphics/gfxmacros.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n718">
            <title>graphics.library/SetOutlinePen</title>
            <literallayout class="monospaced">
                   NAME
       SetOutlinePen -- Set the Outline Pen value for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 (V39).


   SYNOPSIS
       old_pen=SetOutlinePen  ( rp, pen )
	  d0	                 a0   d0

	ULONG SetOutlinePen(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *,ULONG)

   FUNCTION
	Set the current value of the O pen for the rastport and turn on area outline
	mode. This function should be used instead of poking the structure directly,
	because future graphics devices may store it differently, for instance,
	using more bits.

   INPUTS
       rp  =  a pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.
	pen =  a longword pen number

	returns the previous outline pen
   BUGS

   NOTES

   SEE ALSO
	
                <link linkend="n656">GetOPen()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxmacros.h">graphics/gfxmacros.h</ulink>
                
            </literallayout>
        </section>
        <section id="n719">
            <title>graphics.library/SetRast</title>
            <literallayout class="monospaced">
                   NAME
       SetRast - Set an entire drawing area to a specified color.

   SYNOPSIS
       SetRast( rp, pen )
                a1  d0

	void SetRast( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 );

   FUNCTION
       Set the entire contents of the specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to the
       specified pen.

   INPUTS
       rp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
       pen - the pen number (0-255) to jam into bitmap

   RESULT
       All pixels within the drawing area are set to the
	selected pen number.

   BUGS

   SEE ALSO
	
                <link linkend="n699">RectFill()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n720">
            <title>graphics.library/SetRGB32</title>
            <literallayout class="monospaced">
                   NAME
	SetRGB32 -- Set one color register for this Viewport. (V39)

   SYNOPSIS
	SetRGB32(  vp,  n,   r,    g,    b)
	           a0  d0   d1    d2    d3

	void SetRGB32( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *, ULONG, ULONG, ULONG, ULONG );

   INPUTS
	vp = viewport
	n = the number of the color register to set.
	r = red level   (32 bit left justified fraction)
	g = green level (32 bit left justified fraction)
	b = blue level  (32 bit left justified fraction)

   RESULT
	If there is a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 for this viewport, then the value will
	be stored in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                .
	The selected color register is changed to match your specs.
	If the color value is unused then nothing will happen.

   BUGS

   NOTES
	Lower order bits of the palette specification will be discarded,
	depending on the color palette resolution of the target graphics
	device. Use 0xffffffff for the full value, 0x7fffffff for 50%,
	etc. You can find out the palette range for your screen by
	querying the graphics data base.

   SEE ALSO
	
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n657">GetRGB32()</link>
                 
                <link linkend="n721">SetRGB32CM()</link>
                 
                <link linkend="n675">LoadRGB32()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
            </literallayout>
        </section>
        <section id="n721">
            <title>graphics.library/SetRGB32CM</title>
            <literallayout class="monospaced">
                   NAME
       SetRGB32CM -- Set one color register for this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                . (V39)

   SYNOPSIS
       SetRGB32CM(  cm,  n,   r,    g,    b)
                    a0  d0   d1    d2    d3

       void SetRGB4CM( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, ULONG, ULONG, ULONG , ULONG);

   INPUTS
	cm = colormap
       n = the number of the color register to set. Must not exceed the numbe
r of colors
	    allocated for the colormap.
       r = red level (32 bit unsigned left justified fraction)
       g = green level
       b = blue level

   RESULT
	Store the (r,g,b) triplet at index n of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 structure.
       This function can be used to set up a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 before before
	linking it into a viewport.

   BUGS

   SEE ALSO
       
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n657">GetRGB32()</link>
                 
                <link linkend="n720">SetRGB32()</link>
                 
                <link linkend="n723">SetRGB4CM()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
            </literallayout>
        </section>
        <section id="n722">
            <title>graphics.library/SetRGB4</title>
            <literallayout class="monospaced">
                    NAME
       SetRGB4 -- Set one color register for this viewport.

    SYNOPSIS
       SetRGB4(  vp, n,   r,    g,    b)
                 a0  d0  d1:4  d2:4  d3:4

	void SetRGB4( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 );

    FUNCTION
	Change the color look up table so that this viewport displays
	the color (r,g,b) for pen number n.

    INPUTS
	vp - pointer to  viewport structure
       n - the color number (range from 0 to 31)
       r - red level (0-15)
       g - green level (0-15)
       b - blue level (0-15)

    RESULT
	If there is a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 for this viewport, then the value will
	be stored in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                .
       The selected color register is changed to match your specs.
	If the color value is unused then nothing will happen.

    BUGS

	NOTE: Under V36 and up, it is not safe to call this function
	from an interrupt, due to semaphore protection of graphics
	copper lists.

    SEE ALSO
       
                <link linkend="n676">LoadRGB4()</link>
                 
                <link linkend="n658">GetRGB4()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
            </literallayout>
        </section>
        <section id="n723">
            <title>graphics.library/SetRGB4CM</title>
            <literallayout class="monospaced">
                   NAME
       SetRGB4CM -- Set one color register for this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                .

   SYNOPSIS
       SetRGB4CM(  cm,  n,   r,    g,    b)
                   a0  d0  d1:4  d2:4  d3:4

       void SetRGB4CM( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 );

   INPUTS
	cm = colormap
       n = the number of the color register to set. Ranges from 0 to 31
	    on current Amiga displays.
       r = red level (0-15)
       g = green level (0-15)
       b = blue level (0-15)

   RESULT
	Store the (r,g,b) triplet at index n of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 structure.
       This function can be used to set up a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 before before
	linking it into a viewport.

   BUGS

   SEE ALSO
       
                <link linkend="n651">GetColorMap()</link>
                 
                <link linkend="n658">GetRGB4()</link>
                 
                <link linkend="n722">SetRGB4()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
            </literallayout>
        </section>
        <section id="n724">
            <title>graphics.library/SetRPAttrA</title>
            <literallayout class="monospaced">
                   NAME
       SetRPAttrA -- modify rastport settings via a tag list
	SetRPAttrs  -- varargs stub for SetRPAttrA

   SYNOPSIS
       SetRPAttrA(rp,tags)
                  a0   a1

	void SetRPAttrA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	SetRPAttrs(rp,tag,...);

   FUNCTION
       Modify settings of a rastport, based on the taglist passed.
	currently available tags are:

		RPTAG_Font		Font for 
                <link linkend="n730">Text()</link>
                		RPTAG_SoftStyle		style for text (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h)</ulink>
                		RPTAG_APen		Primary rendering pen
		RPTAG_BPen		Secondary rendering pen
		RPTAG_DrMd 		Drawing mode (see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h)</ulink>
                		RPTAG_OutLinePen 	Area Outline pen
		RPTAG_WriteMask 	Bit Mask for writing.
		RPTAG_MaxPen 		Maximum pen to render (see 
                <link linkend="n716">SetMaxPen()</link>
                )

   INPUTS
	rp - pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to modify.
	tags - a standard tag list

   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n715">SetFont()</link>
                 
                <link linkend="n725">SetSoftStyle()</link>
                 
                <link linkend="n710">SetAPen()</link>
                 
                <link linkend="n711">SetBPen()</link>
                 
                <link linkend="n714">SetDrMd()</link>
                 SetOutLinePen()
	
                <link linkend="n726">SetWriteMask()</link>
                 
                <link linkend="n716">SetMaxPen()</link>
                 
                <link linkend="n659">GetRPAttrA()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rpattr.h">graphics/rpattr.h</ulink>
                
            </literallayout>
        </section>
        <section id="n725">
            <title>graphics.library/SetSoftStyle</title>
            <literallayout class="monospaced">
                   NAME
	SetSoftStyle -- Set the soft style of the current font.

   SYNOPSIS
	newStyle = SetSoftStyle(rp, style, enable)
	D0                      A1  D0     D1

	ULONG SetSoftStyle(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, ULONG, ULONG);

   FUNCTION
	This function alters the soft style of the current font.  Only
	those bits that are also set in enable are affected.  The
	resulting style is returned, since some style request changes
	will not be honored when the implicit style of the font
	precludes changing them.

   INPUTS
	rp     - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 from which the font and style
	         are extracted.
	style  - the new font style to set, subject to enable.
	enable - those bits in style to be changed.  Any set bits here
	         that would not be set as a result of 
                <link linkend="n597">AskSoftStyle</link>
                 will
	         be ignored, and the newStyle result will not be as
	         expected.

   RESULTS
	newStyle - the resulting style, both as a result of previous
	           soft style selection, the effect of this function,
	           and the style inherent in the set font.

   BUGS

   SEE ALSO
	
                <link linkend="n597">AskSoftStyle()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                
            </literallayout>
        </section>
        <section id="n726">
            <title>graphics.library/SetWriteMask</title>
            <literallayout class="monospaced">
                   NAME
       SetWriteMask -- Set the pixel write mask value for a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 (V39).


   SYNOPSIS
       success=SetWriteMask ( rp, msk )
	  d0	               a0   d0

	ULONG SetWriteMask(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *,ULONG)

   FUNCTION
	Set the current value of the bit write mask for the rastport.
	bits of the pixel with zeros in their mask will not be modified by
	subsequent drawing operations.

   INPUTS
       rp  =  a pointer to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure.
	msk =  a longword mask value.

	Graphics devices which do not support per-bit masking will
	return 0 (failure).
   BUGS

   NOTES

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxmacros.h">graphics/gfxmacros.h</ulink>
                
            </literallayout>
        </section>
        <section id="n727">
            <title>graphics.library/SortGList</title>
            <literallayout class="monospaced">
                   NAME
	SortGList -- Sort the current gel list, ordering its y,x coordinates.

   SYNOPSIS
	SortGList(rp)
	          A1

	void SortGList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	Sorts the current gel list according to the gels' y,x coordinates.
	This sorting is essential before calls to 
                <link linkend="n631">DrawGList</link>
                 or 
                <link linkend="n628">DoCollision</link>
                .

   INPUTS
	rp = pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure containing the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">GelsInfo</ulink>
                   RESULT

   BUGS

   SEE ALSO
	
                <link linkend="n668">InitGels()</link>
                  
                <link linkend="n628">DoCollision()</link>
                  
                <link linkend="n631">DrawGList()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n728">
            <title>graphics.library/StripFont</title>
            <literallayout class="monospaced">
                   NAME
	StripFont -- remove the tf_Extension from a font (V36)

   SYNOPSIS
	StripFont(font)
	          A0

	VOID StripFont(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *);

            </literallayout>
        </section>
        <section id="n729">
            <title>graphics.library/SyncSBitMap</title>
            <literallayout class="monospaced">
                   NAME
       SyncSBitMap --	Syncronize Super 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 with whatever is
			in the standard 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 bounds.

   SYNOPSIS
       SyncSBitMap( layer )
                      a0

	void SyncSBitMap( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 * );

   FUNCTION
       Copy all bits from ClipRects in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 into Super 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .  This is used for those functions that do not
	want to deal with the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 structures but do want
	to be able to work with a SuperBitMap 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                .

   INPUTS
	layer - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 that has a SuperBitMap
		The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 should already be locked by the caller.

   RESULT
	After calling this function, the programmer can manipulate
	the bits in the superbitmap associated with the layer.
	Afterwards, the programmer should call 
                <link linkend="n624">CopySBitMap</link>
                 to
	copy the bits back into the onscreen layer.

   BUGS

   SEE ALSO
	
                <link linkend="n624">CopySBitMap()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n730">
            <title>graphics.library/Text</title>
            <literallayout class="monospaced">
                   NAME
	Text -- 
                <link linkend="n185">Write</link>
                 text characters (no formatting).

   SYNOPSIS
	Text(rp, string, length)
	     A1  A0      D0-0:16

	void Text(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , WORD);

   FUNCTION
	This graphics function writes printable text characters to the
	specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 at the current position.  No control meaning
	is applied to any of the characters, thus only text on the
	current line is output.

	The current position in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 is updated to the next
	character position.
	If the characters displayed run past the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 boundary,
	the current position is truncated to the boundary, and
	thus does not equal the old position plus the text length.

   INPUTS
	rp     - a pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 which describes where the
	         text is to be output
	string - the address of string to output
	length - the number of characters in the string.
	         If zero, there are no characters to be output.

   NOTES
	o   This function may use the blitter.
	o   Changing the text direction with RastPort-&gt;TxSpacing is
	    not supported.

   BUGS
	For V34 and earlier:
	o   The maximum string length (in pixels) is limited to
	    (1024 - 16 = 1008) pixels wide.
	o   A text string whose last character(s) have a
	    tf_CharLoc size component that extends to the right of
	    the rightmost of the initial and final CP positions
	    will be (inappropriately) clipped.

   SEE ALSO
	
                <link linkend="n681">Move()</link>
                  
                <link linkend="n733">TextLength()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n731">
            <title>graphics.library/TextExtent</title>
            <literallayout class="monospaced">
                   NAME
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextExtent</ulink>
                 -- Determine raster extent of text data. (V36)

   SYNOPSIS
	TextExtent(rp, string, count, textExtent)
	           A1  A0      D0:16  A2

	void textExtent(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , WORD,
	     struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextExtent</ulink>
                 *);

   FUNCTION
	This function determines a more complete metric of the space
	that a text string would render into than the 
                <link linkend="n733">TextLength()</link>
                	function.

   INPUTS
	rp     - a pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 which describes where the
	         text attributes reside.
	string - the address of the string to determine the length of.
	count  - the number of characters in the string.
                If zero, there are no characters in the string.
	textExtent - a structure to hold the result.

   RESULTS
	textExtent is filled in as follows:
	    te_Width  - same as 
                <link linkend="n733">TextLength()</link>
                 result: the rp_cp_x
	                advance that rendering this text would cause.
	    te_Height - same as tf_YSize.  The height of the
	                font.
	    te_Extent.MinX - the offset to the left side of the
	                rectangle this would render into.  Often zero.
	    te_Extent.MinY - same as -tf_Baseline.  The offset
	                from the baseline to the top of the rectangle
	                this would render into.
	    te_Extent.MaxX - the offset of the left side of the
	                rectangle this would render into.  Often the
	                same as te_Width-1.
	    te_Extent.MaxY - same as tf_YSize-tf_Baseline-1.
	                The offset from the baseline to the bottom of
	                the rectangle this would render into.

   SEE ALSO
	
                <link linkend="n733">TextLength()</link>
                  
                <link linkend="n730">Text()</link>
                  
                <link linkend="n732">TextFit()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n732">
            <title>graphics.library/TextFit</title>
            <literallayout class="monospaced">
                   NAME
	TextFit - count characters that will fit in a given extent (V36)

   SYNOPSIS
	chars = TextFit(rastport, string, strLen, textExtent,
	D0              A1        A0      D0      A2
	        constrainingExtent, strDirection,
	        A3                  D1
	        constrainingBitWidth, constrainingBitHeight)
	        D2                    D3

	ULONG TextFit(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                ,
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextExtent</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextExtent</ulink>
                 *, WORD, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , UWORD);

   FUNCTION
	This function determines how many of the characters of the
	provided string will fit into the space described by the
	constraining parameters.  It also returns the extent of
	that number of characters.

   INPUTS
	rp     - a pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 which describes where the
	         text attributes reside.
	string - the address of string to determine the constraint of
	strLen - The number of characters in the string.
	         If zero, there are no characters in the string.
	textExtent - a structure to hold the extent result.
	constrainingExtent - the extent that the text must fit in.
	    This can be NULL, indicating only the constrainingBit
	    dimensions will describe the constraint.
	strDirection - the offset to add to the string pointer to
	    get to the next character in the string.  Usually 1.
	    Set to -1 and the string to the end of the string to
	    perform a TextFit() anchored at the end.  No other value
	    is valid.
	constrainingBitWidth - an alternative way to specify the
	    rendering box constraint width that is independent of
	    the rendering origin.  Range 0..32767.
	constrainingBitHeight - an alternative way to specify the
	    rendering box constraint height that is independent of
	    the rendering origin.  Range 0..32767.

   RESULTS
	chars - the number of characters from the origin of the
	        given string that will fit in both the constraining
	        extent (which specifies a CP bound and a rendering
	        box relative to the origin) and in the rendering width
	        and height specified.

   NOTES
	The result is zero chars and an empty textExtent when the fit
	cannot be performed.  This occurs not only when no text will
	fit in the provided constraints, but also when:
	-   the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 rp's rp_TxSpacing sign and magnitude is so
	    great it reverses the path of the text.
	-   the constrainingExtent does not include x = 0.


   BUGS
	Under V37, TextFit() would return one too few characters if the
	font was proportional. This can be worked around by passing
	(constrainingBitWidth + 1) for proportional fonts. This is fixed
	for V39.

   SEE ALSO
	
                <link linkend="n731">TextExtent()</link>
                  
                <link linkend="n733">TextLength()</link>
                  
                <link linkend="n730">Text()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n733">
            <title>graphics.library/TextLength</title>
            <literallayout class="monospaced">
                   NAME
	TextLength -- Determine raster length of text data.

   SYNOPSIS
	length = TextLength(rp, string, count)
	D0                  A1  A0      D0:16

	WORD TextLength(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , WORD);

   FUNCTION
	This graphics function determines the length that text data
	would occupy if output to the specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 with the
	current attributes.  The length is specified as the number of
	raster dots: to determine what the current position would be
	after a 
                <link linkend="n730">Text()</link>
                 using this string, add the length to cp_x
	(cp_y is unchanged by 
                <link linkend="n730">Text()</link>
                ).  Use the newer 
                <link linkend="n731">TextExtent()</link>
                 to
	get more information.

   INPUTS
	rp     - a pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 which describes where the
	         text attributes reside.
	string - the address of string to determine the length of
	count  - the string length.  If zero, there are no characters
	         in the string.

   RESULTS
	length - the number of pixels in x this text would occupy, not
	         including any negative kerning that may take place at
	         the beginning of the text string, nor taking into
	         account the effects of any clipping that may take
	         place.

   NOTES
	Prior to V36, the result length occupied only the low word of
	d0 and was not sign extended into the high word.

   BUGS
	A length that would overflow single word arithmetic is not
	calculated correctly.

   SEE ALSO
	
                <link linkend="n731">TextExtent()</link>
                  
                <link linkend="n730">Text()</link>
                  
                <link linkend="n732">TextFit()</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">graphics/text.h</ulink>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n734">
            <title>graphics.library/UnlockLayerRom</title>
            <literallayout class="monospaced">
                   NAME
	UnlockLayerRom -- Unlock 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure by ROM(gfx lib) code.

   SYNOPSIS
	UnlockLayerRom( layer )
			 a5

	void UnlockLayerRom( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 * );

   FUNCTION
	Release the lock on this layer. If the same task has called
	
                <link linkend="n678">LockLayerRom</link>
                 more than once than the same number of calls to
	UnlockLayerRom must happen before the layer is actually freed
	so that other tasks may use it.
	This call does destroy scratch registers.
	This call is identical to 
                <link linkend="n773">UnlockLayer</link>
                 (layers.library).

   INPUTS
	layer - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure

   BUGS

   SEE ALSO
	
                <link linkend="n678">LockLayerRom()</link>
                 
                <link linkend="n773">layers.library/UnlockLayer()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n735">
            <title>graphics.library/VBeamPos</title>
            <literallayout class="monospaced">
                   NAME   
	VBeamPos -- Get vertical beam position at this instant.

   SYNOPSIS
	pos = VBeamPos()
	 d0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 VBeamPos( void );

   FUNCTION
	Get the vertical beam position from the hardware.

   INPUTS
	none

   RESULT
	interrogates hardware for beam position and returns value.
	valid results in are the range of 0-511.
	Because of multitasking, the actual value returned may have
	no use. If you are the highest priority task then the value
	returned should be close, within 1 line.

   BUGS

   SEE ALSO


            </literallayout>
        </section>
        <section id="n736">
            <title>graphics.library/VideoControl</title>
            <literallayout class="monospaced">
                   NAME
	VideoControl -- Modify the operation of a ViewPort's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 (V36)
	VideoControlTags -- varargs stub for VideoControl (V36)
   SYNOPSIS
	error = VideoControl( cm , tags )
	d0                    a0   a1

	ULONG VideoControl( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * );

	error= VideoControlTags(cm, tags,...);


   FUNCTION
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                 the commands in the VideoControl command 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 buffer
	using cm as the target, with respect to its "attached" 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .

	viewport commands:

	VTAG_ATTACH_CM     [_SET        | _GET] -- set/get attached viewport
	VTAG_VIEWPORTEXTRA [_SET        | _GET] -- set/get attached vp_extra
	VTAG_NORMAL_DISP   [_SET        | _GET] -- set/get 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">DisplayInfoHandle</ulink>
                	                                           (natural mode)
	VTAG_COERCE_DISP   [_SET        | _GET] -- set/get 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/displayinfo.h">DisplayInfoHandle</ulink>
                	                                           (coerced mode)
	VTAG_PF1_BASE      [_SET        | _GET] -- set/get color base for
	                                           first playfield. (V39)
	VTAG_PF2_BASE      [_SET        | _GET] -- set/get color base for
	                                           second playfield. (V39)
	VTAG_SPODD_BASE    [_SET        | _GET] -- set/get color base for odd
	                                           sprites. (V39)
	VTAG_SPEVEN_BASE   [_SET        | _GET] -- set/get color base for even
	                                           sprites. (V39)
	VTAG_BORDERSPRITE  [_SET        | _GET] -- on/off/inquire sprites in
	                                           borders. (V39)
	VTAG_SPRITERESN    [_SET        | _GET] -- set/get sprite resolution
	              (legal values are SPRITERESN_ECS/_140NS/_70NS/_35NS.
	               see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h)</ulink>
                 (V39)
	VTAG_PF1_TO_SPRITEPRI [_SET     | _GET] -- set/get playfield1 priority
                                                  with respect to sprites (V3
9)
	VTAG_PF2_TO_SPRITEPRI [_SET     | _GET] -- set/get playfield2 priority
                                                  with respect to sprites (V3
9)
	(These two require that the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 is attached to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 to be
	 effective).

	genlock commands:

	VTAG_BORDERBLANK   [_SET | _CLR | _GET] -- on/off/inquire blanking
	VTAG_BORDERNOTRANS [_SET | _CLR | _GET] -- on/off/inquire notransparency
	VTAG_CHROMAKEY     [_SET | _CLR | _GET] -- on/off/inquire chroma mode
	VTAG_BITPLANEKEY   [_SET | _CLR | _GET] -- on/off/inquire bitplane mode
	VTAG_CHROMA_PEN    [_SET | _CLR | _GET] -- set/clr/get chromakey pen #
	VTAG_CHROMA_PLANE  [_SET |      | _GET] -- set/get bitplanekey plane #

	control commands:

	VTAG_IMMEDIATE	- normally, VideoControl changes do not occur until the
	        next 
                <link linkend="n679">MakeVPort</link>
                . Using this tag, some changes can be made to
	        happen immediately. The tag data is a pointer to a longword
	        flag variable which will be cleared if all changes happened
	        immediately. See the example. (V39)

	VTAG_FULLPALETTE   [_SET | _CLR | _GET] -- enable/disable loading of all
	        colors in the copper list.
	        Normally, graphics will only load the color which are necessary
	        for the viewport, based upon the screen depth and mode. In order
	        to use the color palette banking features, you may need to use
	        this tag to tell graphics to load ALL colors, regardless of
	        screen depth. (V39)

	VC_IntermediateCLUpdate
	VC_IntermediateCLUpdate_Query
	         When set, graphics will update the intermediate copper
		 lists on colour changes. When FALSE, graphics won't update
	         the intermediate copperlists, so 
                <link linkend="n708">ScrollVPort()</link>
                ,
	         
                <link linkend="n613">ChangeVPBitMap()</link>
                 and colour loading functions will be faster.
	         This value is TRUE by default. (V40)

	VC_NoColorPaletteLoad
	VC_NoColorPaletteLoad_Query
	         When set, only colour 0 will be loaded for this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                ,
	         hence the inter-ViewPort gap will be smaller. The colours for
	         this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 are inherited from the next higher 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                . The
		 results are undefined if this is the first or only 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 in
	         the display, and undefined when used in conjunction with
	         VTAG_FULLPALETTE (!?!).
	         This value is FALSE by default. (V40)

	VC_DUALPF_Disable
	VC_DUALPF_Disable_Query
		When set, disables the setting of the dual-playfield
		bit in bplcon0. When used with a dual-playfield mode
		screen, this allows using separate scroll and bitmaps
		for the odd and even bitplanes, without going through
		the normal dual-playfield priority and palette selection.
		With appropriate palette setup, this can be used for
		transparency effects, etc.

	copper commands

	VTAG_USERCLIP      [_SET | _CLR | _GET] -- on/off/inquire clipping of
	                                           UserCopperList at bottom
	                                           edge of ColorMap-&gt;cm_vp
	                                           (defaults to off)

	buffer commands:

	VTAG_NEXTBUF_CM                         -- link to more VTAG commands
	VTAG_END_CM                             -- terminate command buffer

	batch mode commands:

	(if you want your videocontrol taglist to be processed in "batch"
	 mode, that is, at the next 
                <link linkend="n679">MakeVPort()</link>
                 for the ColorMap-&gt;cm_vp;
	 you may install a static list of videocontrol TagItems into the
	 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 with the BATCH_ITEMS_SET command; and then enable/disable
	 batch mode processing of those items via the BATCH_CM control
	 command)

	VTAG_BATCH_CM      [_SET | _CLR | _GET] -- on/off/inquire batch mode
	VTAG_BATCH_ITEMS   [_SET | _ADD | _GET] -- set/add/get batched TagLists

	private commands (used internally by intuition -- do not call):

	VTAG_VPMODEID      [_SET | _CLR | _GET] -- force 
                <link linkend="n661">GetVPModeID()</link>
                 return


   INPUTS
	cm   = pointer to struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 obtained via 
                <link linkend="n651">GetColorMap()</link>
                .
	tags = pointer to a table of videocontrol tagitems.

   RESULT
	error = NULL if no error occurred in the control operation.
	(non-NULL if bad colormap pointer, no tagitems or bad tag)

	The operating characteristics of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ColorMap</ulink>
                 and its attached
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 are modified. The result will be incorporated into the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 when its copper lists are reassembled via 
                <link linkend="n679">MakeVPort()</link>
                .

	Note that you must NOT change colors in the viewport (via 
                <link linkend="n722">SetRGB4()</link>
                ,
	
                <link linkend="n676">LoadRGB4()</link>
                , 
                <link linkend="n722">SetRGB4()</link>
                , etc.) after changing any of the color palette
	offsets (VTAG_PF1_BASE, etc), without first remaking the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                .

   NOTES
	Sprite resolutions is controlled by two sets of tags, SPRITERESN
	and DEFSPRITERESN. If you don't set the sprite resolution, it will
	follow the intuition-controlled "default" sprite resolution. Setting
	the sprite resolution to one of the SPRITERESN_ values will allow the
	application to override intuition's control of it.

	This function will modify the contents of the TagList you pass to it by
	changing _GET tags to the corresponding _SET or _CLR tag. The
	exceptions to this rule are documented as such above (such as
	VTAG_IMMEDIATE).

	The new tags added for V40 have the prefix VC_ instead of VTAG_. These
	tags work in the same manner as all other tags in the system, and will
	not be modified by VideoControl().

   EXAMPLE
	must_remake=-1;
	error=VideoControl(myvp-&gt;ColorMap,VTAG_BORDERBLANK_SET,-1,
	                   (GFXBase-&gt;lib_Version&gt;=39)?VTAG_IMMEDIATE:TAG_IGNORE,
						&amp;must_remake);
	if (must_remake) { MakeVPort(myview,myvp); MrgCop(myview); }

   EXAMPLE
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 VCTags[] =
	{
	    {VTAG_BORDERBLANK_GET, NULL},
	    {VTAG_SPRITERESN_SET, SPRITERESN_35NS},
	    {TAG_DONE, NULL},
	};
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 bblank = FALSE;

	if (VideoControl(cm, VCTags) == NULL)
	{
	    bblank = (VCTags[0].ti_Tag == VTAG_BORDERBLANK_SET);
	}

   EXAMPLE
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 VCTags[] =
	{
	    {VC_NoColorPaletteLoad_Query, NULL},
	    {TAG_DONE},
	};
	ULONG query;

	VCTags[0].ti_Data = (ULONG)&amp;query;
	if (VideoControl(cm, VCTags) == NULL)
	{
	    printf("Palette loading is %s\n", (query ? "off" : "on"));
	}

   BUGS

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/videocontrol.h">graphics/videocontrol.h</ulink>
                , 
                <link linkend="n651">GetColorMap()</link>
                , 
                <link linkend="n639">FreeColorMap()</link>
                
            </literallayout>
        </section>
        <section id="n737">
            <title>graphics.library/WaitBlit</title>
            <literallayout class="monospaced">
                   NAME
       WaitBlit -- 
                <link linkend="n299">Wait</link>
                 for the blitter to be finished before proceeding
                   with anything else.

   SYNOPSIS
       WaitBlit()

	void WaitBlit( void );

   FUNCTION
	WaitBlit returns when the blitter is idle. This function should
	normally only be used when dealing with the blitter in a
	synchronous manner, such as when using 
                <link linkend="n692">OwnBlitter</link>
                 and 
                <link linkend="n626">DisownBlitter</link>
                .
	WaitBlit does not wait for all blits queued up using 
                <link linkend="n694">QBlit</link>
                 or
	
                <link linkend="n695">QBSBlit</link>
                . You should call WaitBlit if you are just about to modify or
	free some memory that the blitter may be using.

   INPUTS
       none

   RESULT
       Your program waits until the blitter is finished.
	This routine does not use any the CPU registers.
	do/d1/a0/a1 are preserved by this routine.
	It may change the condition codes though.

   BUGS
	When examining bits with the CPU right after a blit, or when freeing
	temporary memory used by the blitter, a WaitBlit() may be required.

	Note that many graphics calls fire up the blitter, and let it run.
	The CPU does not need to wait for the blitter to finish before
	returning.

	Because of a bug in Agnus (prior to all revisions of fat Agnus)
 	this code may return too soon when the blitter has, in fact, not
	started the blit yet, even though BltSize has been written.

	This most often occurs in a heavily loaded system with extended memory,
	HIRES, and 4 bitplanes.

	WaitBlit currently tries to avoid this Agnus problem by testing
	the BUSY bit multiple times to make sure the blitter has started.
	If the blitter is BUSY at first check, this function busy waits.

	This initial hardware bug was fixed as of the first "Fat Agnus" chip,
	as used in all A500 and A2000 computers.

	Because of a different bug in Agnus (currently all revisions thru ECS)
 	this code may return too soon when the blitter has, in fact, not
	stopped the blit yet, even though blitter busy has been cleared.

	This most often occurs in a heavily loaded system with extended memory,
	in PRODUCTIVITY mode, and 2 bitplanes.

	WaitBlit currently tries to avoid this Agnus problem by testing
	the BUSY bit multiple times to make sure the blitter has really
	written its final word of destination data.

   SEE ALSO
	
                <link linkend="n692">OwnBlitter()</link>
                 
                <link linkend="n626">DisownBlitter()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/hardware/blit.h">hardware/blit.h</ulink>
                
            </literallayout>
        </section>
        <section id="n738">
            <title>graphics.library/WaitBOVP</title>
            <literallayout class="monospaced">
                   NAME
	WaitBOVP -- 
                <link linkend="n299">Wait</link>
                 till vertical beam reached bottom of
		    this viewport.

   SYNOPSIS
	WaitBOVP( vp )
		  a0

	void WaitBOVP( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 * );

   FUNCTION
	Returns when the vertical beam has reached the bottom of this viewport

   INPUTS
	vp - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">ViewPort</ulink>
                 structure

   RESULT
	This function will return sometime after the beam gets beyond
	the bottom of the viewport.  Depending on the multitasking load
	of the system, the actual beam position may be different than
	what would be expected in a lightly loaded system.

   BUGS
	Horrors! This function currently busy waits waiting for the
	beam to get to the right place.  It should use the copper
	interrupt to trigger and send signals like 
                <link linkend="n739">WaitTOF</link>
                 does.

   SEE ALSO
	
                <link linkend="n739">WaitTOF()</link>
                 
                <link linkend="n735">VBeamPos()</link>
                
            </literallayout>
        </section>
        <section id="n739">
            <title>graphics.library/WaitTOF</title>
            <literallayout class="monospaced">
                   NAME
       WaitTOF -- 
                <link linkend="n299">Wait</link>
                 for the top of the next video frame.

   SYNOPSIS
       WaitTOF()

	void WaitTOF( void );

   FUNCTION
       
                <link linkend="n299">Wait</link>
                  for vertical blank to occur and all vertical blank
       interrupt routines to complete before returning to caller.

   INPUTS
       none

   RESULT
	Places this task on the TOF wait queue. When the vertical blank
	interrupt comes around, the interrupt service routine will fire off
	signals to all the tasks doing WaitTOF. The highest priority task
	ready will get to run then.

   BUGS

   SEE ALSO
	
                <link linkend="n299">exec.library/Wait()</link>
                 
                <link linkend="n290">exec.library/Signal()</link>
                
            </literallayout>
        </section>
        <section id="n740">
            <title>graphics.library/WriteChunkyPixels</title>
            <literallayout class="monospaced">
                   NAME
	WriteChunkyPixels -- write the pen number value of a rectangular array
	of pixels starting at a specified x,y location and continuing
	through to another x,y location within a certain 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                . (V40)

   SYNOPSIS
	WriteChunkyPixels(rp,xstart,ystart,xstop,ystop,array,bytesperrow)
	                  A0 D0     D1     D2    D3    A2     D4

	VOID WriteChunkyPixels(struct  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,
	     
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, LONG);

   FUNCTION
	For each pixel in a rectangular region, decode the pen number selector
	from a linear array of pen numbers into the bit-planes used to describe
	a particular rastport.

   INPUTS
	rp     -  pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	(xstart,ystart) -  starting point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	(xstop,ystop)   -  stopping point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	array  - pointer to an array of UBYTEs from which to fetch the
	         pixel data.
	bytesperrow - The number of bytes per row in the source array.
		This should be at least as large as the number of pixels
		being written per line.

   RESULT

   NOTE
	xstop must be &gt;= xstart
	ystop must be &gt;= ystart
	The source array can be in fast RAM.

   ===chunky-to-planar conversion HW:

   GfxBase-&gt;ChunkyToPlanarPtr is either NULL, or a pointer to a HW
   register used to aid in the process of converting 8-bit chunky 
   pixel data into the bit-plane format used by the Amiga custom
   display chips. If NULL, then such hardware is not present.

   If an expansion device provides hardware which operates compatibly,
   than it can install the HW address into this pointer at boot time,
   and the system will use it.

   This pointer may be used for direct access to the chunky-to-planar
   conversion HW, if more is desired than the straight chunky-pixel
   copy that is performed by WriteChunkyPixels().

   If using the hardware directly, it should only be accessed when
   the task using it has control of the blitter (via 
                <link linkend="n692">OwnBlitter()</link>
                ),
   since this is the locking used to arbitrate usage of this device.

   The hardware may be viewed as a device which accepts 32 8-bit
   chunky pixels and outputs 8 longwords of bitplane data.

   For proper operation, exactly 8 longwords (containing 32 pixels)
   of chunky data should be written to *(GfxBase-&gt;ChunkyToPlanarPtr).
   After the data is written, bitplane data (starting with plane 0)
   can be read back a longword at a time. There is no need to read
   back all 8 longwords if the high-order bitplanes are not needed.

   Since WriteChunkyPixels is not (currently) particularly fast on 
   systems without the chunky-to-planar hardware, time critical
   applications (games, etc) may want to use their own custom conversion
   routine if GfxBase-&gt;ChunkyToPlanarPtr is NULL, and call
   WriteChunkyPixels() otherwise.

   This pointer is only present in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxbase.h">GfxBase</ulink>
                 in versions of graphics.library
   &gt;= 40, so this should be checked before the pointer is read.

   BUGS
	Not very fast on systems without chunky-to-planar conversion
	hardware.

   SEE ALSO
	
                <link linkend="n741">WritePixel()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n741">
            <title>graphics.library/WritePixel</title>
            <literallayout class="monospaced">
                   NAME
       WritePixel -- Change the pen num of one specific pixel in a
                     specified 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   SYNOPSIS
       error = WritePixel(  rp, x,  y)
         d0                 a1 D0  D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 WritePixel( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">SHORT</ulink>
                 );

   FUNCTION
       Changes the pen number of the selected pixel in the specified
       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to that currently specified by PenA, the primary
       drawing pen. Obeys minterms in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .

   INPUTS
       rp - a pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
       (x,y) - point within the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 at which the selected
           pixel is located.

   RESULT
       error = 0 if pixel succesfully changed
	      = -1 if (x,y) is outside the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                   BUGS

   SEE ALSO
       
                <link linkend="n696">ReadPixel()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n742">
            <title>graphics.library/WritePixelArray8</title>
            <literallayout class="monospaced">
                   NAME
	WritePixelArray8 -- write the pen number value of a rectangular array
	of pixels starting at a specified x,y location and continuing
	through to another x,y location within a certain 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                . (V36)

   SYNOPSIS
	count = WritePixelArray8(rp,xstart,ystart,xstop,ystop,array,temprp)
	D0                       A0 D0:16  D1:16  D2:16 D3:16  A2   A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 WritePixelArray8(struct  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                ,
	     
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, struct  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	For each pixel in a rectangular region, decode the pen number selector
	from a linear array of pen numbers into the bit-planes used to describe
	a particular rastport.

   INPUTS
	rp     -  pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	(xstart,ystart) -  starting point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	(xstop,ystop)   -  stopping point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	array  - pointer to an array of UBYTEs from which to fetch the
	         pixel data. 
                <link linkend="n202">Allocate</link>
                 at least
	         ((((width+15)&gt;&gt;4)&lt;&lt;4)*(ystop-ystart+1)) bytes.
	temprp - temporary rastport (copy of rp with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 set == NULL,
	         temporary memory allocated for
	         temprp-&gt;BitMap with Rows set == 1,
	         temprp-&gt;BitMap with BytesPerRow == (((width+15)&gt;&gt;4)&lt;&lt;1),
	         and temporary memory allocated for
	         temprp-&gt;BitMap-&gt;Planes[])

   RESULT
	count will be set to the number of pixels plotted.

   NOTE
	xstop must be &gt;= xstart
	ystop must be &gt;= ystart

   BUGS

   SEE ALSO
	
                <link linkend="n741">WritePixel()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n743">
            <title>graphics.library/WritePixelLine8</title>
            <literallayout class="monospaced">
                   NAME
	WritePixelLine8 -- write the pen number value of a horizontal line
	of pixels starting at a specified x,y location and continuing
	right for count pixels. (V36)

   SYNOPSIS
	count = WritePixelLine8(rp,xstart,ystart,width,array,temprp)
	D0                      A0 D0:16  D1:16  D2    A2    A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 WritePixelLine8(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                ,
	     
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UWORD</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">UBYTE</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *);

   FUNCTION
	For each pixel in a horizontal region, decode the pen number selector
	from a linear array of pen numbers into the bit-planes used to describe
	a particular rastport.

   INPUTS
	rp    -  pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 structure
	(x,y) - a point in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	width - count of horizontal pixels to write
	array - pointer to an array of UBYTEs from which to fetch the pixel data
	        allocate at least (((width+15)&gt;&gt;4)&lt;&lt;4) bytes.
	temprp - temporary rastport (copy of rp with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 set == NULL,
	         temporary memory allocated for
	         temprp-&gt;BitMap with Rows set == 1,
	         temprp-&gt;BitMap BytesPerRow == (((width+15)&gt;&gt;4)&lt;&lt;1),
	         and temporary memory allocated for
	         temprp-&gt;BitMap-&gt;Planes[])

   RESULT
	Count will be set to the number of pixels plotted

   NOTE
	width must be non negative

   BUGS

   SEE ALSO
	
                <link linkend="n741">WritePixel()</link>
                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                
            </literallayout>
        </section>
        <section id="n744">
            <title>graphics.library/XorRectRegion</title>
            <literallayout class="monospaced">
                   NAME
       XorRectRegion -- Perform 2d XOR operation of rectangle
                       with region, leaving result in region

   SYNOPSIS
       status = XorRectRegion(region,rectangle)
         d0                     a0      a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 XorRectRegion( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 * );

   FUNCTION
	Add portions of rectangle to region if they are not in
	the region.
	
                <link linkend="n276">Remove</link>
                 portions of rectangle from region if they are
	in the region.

   INPUTS
       region - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure
       rectangle - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 structure

   RESULTS
	status - return TRUE if successful operation
		 return FALSE if ran out of memory

   BUGS

   SEE ALSO
	
                <link linkend="n691">OrRegionRegion()</link>
                 
                <link linkend="n589">AndRegionRegion()</link>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n745">
            <title>graphics.library/XorRegionRegion</title>
            <literallayout class="monospaced">
                   NAME 
       XorRegionRegion -- Perform 2d XOR operation of one region
                       with second region, leaving result in second region

   SYNOPSIS 
       status = XorRegionRegion(region1,region2)
         d0                        a0      a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 XorRegionRegion( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 * );

   FUNCTION 
	Join the regions together. If any part of region1 overlaps
	region2 then remove that from the new region.

   INPUTS 
       region1      = pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure
       region2      = pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 structure

   RESULTS
	status - return TRUE if successful operation
		 return FALSE if ran out of memory

   BUGS 


            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>layers</title>
        <section id="n746">
            <title>layers.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n747"> BeginUpdate() </link>
                    
                <link linkend="n748"> BehindLayer() </link>
                    
                <link linkend="n749"> CreateBehindHookLayer() </link>
                    
                <link linkend="n750"> CreateBehindLayer() </link>
                    
                <link linkend="n751"> CreateUpfrontHookLayer() </link>
                    
                <link linkend="n752"> CreateUpfrontLayer() </link>
                    
                <link linkend="n753"> DeleteLayer() </link>
                    
                <link linkend="n754"> DisposeLayerInfo() </link>
                    
                <link linkend="n755"> DoHookClipRects() </link>
                    
                <link linkend="n756"> EndUpdate() </link>
                    
                <link linkend="n757"> FattenLayerInfo() </link>
                    
                <link linkend="n758"> InitLayers() </link>
                    
                <link linkend="n759"> InstallClipRegion() </link>
                    
                <link linkend="n760"> InstallLayerHook() </link>
                    
                <link linkend="n761"> InstallLayerInfoHook() </link>
                    
                <link linkend="n762"> LockLayer() </link>
                    
                <link linkend="n763"> LockLayerInfo() </link>
                    
                <link linkend="n764"> LockLayers() </link>
                    
                <link linkend="n765"> MoveLayer() </link>
                    
                <link linkend="n766"> MoveLayerInFrontOf() </link>
                    
                <link linkend="n767"> MoveSizeLayer() </link>
                    
                <link linkend="n768"> NewLayerInfo() </link>
                    
                <link linkend="n769"> ScrollLayer() </link>
                    
                <link linkend="n770"> SizeLayer() </link>
                    
                <link linkend="n771"> SwapBitsRastPortClipRect() </link>
                    
                <link linkend="n772"> ThinLayerInfo() </link>
                    
                <link linkend="n773"> UnlockLayer() </link>
                    
                <link linkend="n774"> UnlockLayerInfo() </link>
                    
                <link linkend="n775"> UnlockLayers() </link>
                    
                <link linkend="n776"> UpfrontLayer() </link>
                    
                <link linkend="n777"> WhichLayer() </link>
            </literallayout>
        </section>
        <section id="n747">
            <title>layers.library/BeginUpdate</title>
            <literallayout class="monospaced">
                    NAME
	BeginUpdate -- Prepare to repair damaged layer.

    SYNOPSIS
	result = BeginUpdate( l )
	d0                    a0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 BeginUpdate( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *);

    FUNCTION
	Convert damage list to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 list and swap in for
	programmer to redraw through. This routine simulates
	the ROM library environment. The idea is to only render in the
	"damaged" areas, saving time over redrawing all of the layer.
	The layer is locked against changes made by the layer library.

    INPUTS
	l - pointer to a layer

    RESULTS
	result - TRUE if damage list converted to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 list successfully.
	         FALSE if list conversion aborted. (probably out of memory)

    BUGS
	If BeginUpdate returns FALSE, programmer must abort the attempt to
	refresh this layer and instead call EndUpdate( l, FALSE ) to restore
	original 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 and damage list.

    SEE ALSO
	
                <link linkend="n756">EndUpdate()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n748">
            <title>layers.library/BehindLayer</title>
            <literallayout class="monospaced">
                    NAME
	BehindLayer -- Put layer behind other layers.

    SYNOPSIS
	result = BehindLayer( dummy, l )
	d0                    a0     a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 BehindLayer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *);

    FUNCTION
	
                <link linkend="n681">Move</link>
                 this layer to the most behind position swapping bits
	in and out of the display with other layers.
	If other layers are REFRESH then collect their damage lists and
	set the LAYERREFRESH bit in the Flags fields of those layers that
	may be revealed.  If this layer is a backdrop layer then
	put this layer behind all other backdrop layers.
	If this layer is NOT a backdrop layer then put in front of the
	top backdrop layer and behind all other layers.

	Note: this operation may generate refresh events in other layers
	   associated with this layer's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure.

    INPUTS
	dummy - unused
	l - pointer to a layer

    RESULTS
	result - TRUE    if operation successful
	         FALSE   if operation unsuccessful (probably out of memory)

    BUGS

    SEE ALSO
       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n749">
            <title>layers.library/CreateBehindHookLayer</title>
            <literallayout class="monospaced">
                    NAME                                                              (V36)
	CreateBehindHookLayer -- Create a new layer behind all existing layers,
	                         using supplied callback BackFill hook.

    SYNOPSIS
	result = CreateBehindHookLayer(li,bm,x0,y0,x1,y1,flags,hook,[,bm2])
	d0                             a0 a1 d0 d1 d2 d3 d4    a3   [ a2 ]

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *CreateBehindHookLayer(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *,
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *, ... );

    FUNCTION
	Create a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 of position and size (x0,y0)-&gt;(x1,y1)
	Make this layer of type found in flags.
	Install Layer-&gt;BackFill callback 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                .
	If SuperBitMap, use bm2 as pointer to real SuperBitMap,
	and copy contents of Superbitmap into display layer.
	If this layer is a backdrop layer then place it behind all
	other layers including other backdrop layers. If this is
	not a backdrop layer then place it behind all nonbackdrop
	layers.

	Note: when using SUPERBITMAP, you should also set LAYERSMART flag.

    INPUTS
	li - pointer to LayerInfo structure
	bm - pointer to common 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 used by all Layers
	x0,y0 - upper left hand corner of layer
	x1,y1 - lower right hand corner of layer
	flags - various types of layers supported as bit sets.
	        (for bit definitions, see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                 )
	hook -  Layer-&gt;BackFill callback 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 (see 
                <link linkend="n760">InstallLayerHook()</link>
                )

	        If hook is LAYERS_BACKFILL, the default backfill is
	        used for the layer.  (Same as pre-2.0)

	        As of V39:
		If hook is LAYERS_NOBACKFILL, the layer will not be
	        backfilled (NO-OP).

	bm2 - pointer to optional Super 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                    RESULTS
	result - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure if successful
	         NULL if not successful

    BUGS

    SEE ALSO
	
                <link linkend="n760">InstallLayerHook()</link>
                , 
                <link linkend="n753">DeleteLayer()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                ,
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">utility/hooks.h</ulink>
                
            </literallayout>
        </section>
        <section id="n750">
            <title>layers.library/CreateBehindLayer</title>
            <literallayout class="monospaced">
                    NAME
	CreateBehindLayer -- Create a new layer behind all existing layers.

    SYNOPSIS
	result = CreateBehindLayer(li,bm,x0,y0,x1,y1,flags [,bm2])
	d0                         a0 a1 d0 d1 d2 d3   d4  [ a2 ]

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *CreateBehindLayer(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *,
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , ... );

    FUNCTION
	Create a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 of position and size (x0,y0)-&gt;(x1,y1)
	Make this layer of type found in flags.
	If SuperBitMap, use bm2 as pointer to real SuperBitMap,
	and copy contents of Superbitmap into display layer.
	If this layer is a backdrop layer then place it behind all
	other layers including other backdrop layers. If this is
	not a backdrop layer then place it behind all nonbackdrop
	layers.

	Note: when using SUPERBITMAP, you should also set LAYERSMART flag.

    INPUTS
	li - pointer to LayerInfo structure
	bm - pointer to common 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 used by all Layers
	x0,y0 - upper left hand corner of layer
	x1,y1 - lower right hand corner of layer
	flags - various types of layers supported as bit sets.
	        (for bit definitions, see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                 )
	bm2 - pointer to optional Super 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                    RESULTS
	result - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure if successful
	         NULL if not successful

    BUGS

    SEE ALSO
	
                <link linkend="n753">DeleteLayer()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n751">
            <title>layers.library/CreateUpfrontHookLayer</title>
            <literallayout class="monospaced">
                    NAME                                                              (V36)
	CreateUpfrontHookLayer -- Create a new layer on top of existing layers,
	                          using supplied callback BackFill hook.

    SYNOPSIS
	result = CreateUpfrontHookLayer(li,bm,x0,y0,x1,y1,flags,hook,[,bm2])
	d0                              a0 a1 d0 d1 d2 d3   d4  a3   [ a2 ]

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *CreateUpfrontHookLayer(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *,
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *, ... );

    FUNCTION
	Create a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 of position and size (x0,y0)-&gt;(x1,y1)
	and place it on top of all other layers.
	Make this layer of type found in flags
	Install Layer-&gt;BackFill callback hook.
	if SuperBitMap, use bm2 as pointer to real SuperBitMap.
	and copy contents of Superbitmap into display layer.

	Note: when using SUPERBITMAP, you should also set LAYERSMART flag.

    INPUTS
	li - pointer to LayerInfo structure
	bm - pointer to common 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 used by all Layers
	x0,y0 - upper left hand corner of layer
	x1,y1 - lower right hand corner of layer
	flags - various types of layers supported as bit sets.
	hook -  Layer-&gt;BackFill callback 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 (see 
                <link linkend="n760">InstallLayerHook()</link>
                )

	        If hook is LAYERS_BACKFILL, the default backfill is
	        used for the layer.  (Same as pre-2.0)

	        As of V39:
		If hook is LAYERS_NOBACKFILL, the layer will not be
	        backfilled (NO-OP).

	bm2 - pointer to optional Super 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                    RESULTS
	result - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure if successful
	         NULL if not successful

    BUGS

    SEE ALSO
	
                <link linkend="n760">InstallLayerHook()</link>
                , 
                <link linkend="n753">DeleteLayer()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                ,
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">utility/hooks.h</ulink>
                
            </literallayout>
        </section>
        <section id="n752">
            <title>layers.library/CreateUpfrontLayer</title>
            <literallayout class="monospaced">
                    NAME
	CreateUpfrontLayer -- Create a new layer on top of existing layers.

    SYNOPSIS
	result = CreateUpfrontLayer(li,bm,x0,y0,x1,y1,flags [,bm2])
	d0                          a0 a1 d0 d1 d2 d3   d4  [ a2 ]

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *CreateUpfrontLayer(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 *,
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , ... );

    FUNCTION
	Create a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 of position and size (x0,y0)-&gt;(x1,y1)
	and place it on top of all other layers.
	Make this layer of type found in flags
	if SuperBitMap, use bm2 as pointer to real SuperBitMap.
	and copy contents of Superbitmap into display layer.

	Note: when using SUPERBITMAP, you should also set LAYERSMART flag.

    INPUTS
	li - pointer to LayerInfo structure
	bm - pointer to common 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 used by all Layers
	x0,y0 - upper left hand corner of layer
	x1,y1 - lower right hand corner of layer
	flags - various types of layers supported as bit sets.
	bm2 - pointer to optional Super 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                    RESULTS
	result - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 structure if successful
	         NULL if not successful

    BUGS

    SEE ALSO
       
                <link linkend="n753">DeleteLayer()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">graphics/gfx.h</ulink>
                
            </literallayout>
        </section>
        <section id="n753">
            <title>layers.library/DeleteLayer</title>
            <literallayout class="monospaced">
                    NAME
	DeleteLayer -- delete layer from layer list.

    SYNOPSIS
	result = DeleteLayer( dummy, l )
	d0                    a0,    a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 DeleteLayer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *);

    FUNCTION
	
                <link linkend="n276">Remove</link>
                 this layer from the list of layers.  Release memory
	associated with it.  Restore other layers that may have been
	obscured by it.  Trigger refresh in those that may need it.
	If this is a superbitmap layer make sure SuperBitMap is current.
	The SuperBitMap is not removed from the system but is available
	for program use even though the rest of the layer information has
	been deallocated.

    INPUTS
	dummy - unused
	l - pointer to a layer

    RESULTS
	result - TRUE if this layer successfully deleted from the system
	         FALSE if layer not deleted. (probably out of memory )

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n754">
            <title>layers.library/DisposeLayerInfo</title>
            <literallayout class="monospaced">
                    NAME
	DisposeLayerInfo -- Return all memory for LayerInfo to memory pool

    SYNOPSIS
	DisposeLayerInfo( li )
	                  a0

	void DisposeLayerInfo( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *);

    FUNCTION
	return LayerInfo and any other memory attached to this LayerInfo
	to memory allocator.

	Note: if you wish to delete the layers associated with this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                	    structure, remember to call 
                <link linkend="n753">DeleteLayer()</link>
                 for each of the layers
	    before calling DisposeLayerInfo().

    INPUTS
	li - pointer to LayerInfo structure

    EXAMPLE

	-- delete the layers associated this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure --

	DeleteLayer(li,simple_layer);
	DeleteLayer(li,smart_layer);

	-- see documentation on 
                <link linkend="n753">DeleteLayer</link>
                 about deleting SuperBitMap layers --
	my_super_bitmap_ptr = super_layer-&gt;SuperBitMap;
	DeleteLayer(li,super_layer);

	-- now dispose of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure itself --
	DisposeLayerInfo(li);


    BUGS

    SEE ALSO
	
                <link linkend="n753">DeleteLayer()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n755">
            <title>layers.library/DoHookClipRects</title>
            <literallayout class="monospaced">
                    NAME
	DoHookClipRects - Do the given hook for each of the ClipRects    (V39)

    SYNOPSIS
	DoHookClipRects(hook,rport,rect)
	                a0   a1    a2

	void DoHookClipRects(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 *);

    FUNCTION
	This function will call the given hook for each cliprect in the
	layer that can be rendered into.  This is how the backfill hook
	in Layers is implemented.  This means that hidden simple-refresh
	cliprects will be ignored.  It will call the SuperBitMap cliprects,
	smart refresh off-screen cliprects, and all on screen cliprects.
	If the rect parameter is not NULL, the cliprects are bounded to
	the rectangle given.

    INPUTS
	hook - pointer to layer callback 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 which will be called
	       with object == (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *) result-&gt;RastPort
	       and message == [ (Layer *) layer, (struct Rectangle) bounds,
	                        (LONG) offsetx, (LONG) offsety ]

	       This hook should fill the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	       with the BackFill pattern appropriate for offset x/y.

	       If hook is LAYERS_BACKFILL, the default backfill is
	       used for the layer.

	       If hook is LAYERS_NOBACKFILL, the layer will not be
	       backfilled (NO-OP).

	rport- A pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 that is to be operated on.
	       This function will lock the layer if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 is
	       layered...
	       If the rport is non-layered your hook will be called with
	       the rectangle as passed, the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , and a NULL layer...

	rect - The bounding rectangle that should be used on the layer.
	       This rectangle "clips" the cliprects to the bound given.
	       If this is NULL, no bounding will take place.
	       *MUST* not be NULL if the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 is non-layered!

    NOTES
	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 you are passed back is the same one passed to the
	function.  You should *not* use "layered" rendering functions
	on this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .  Generally, you will wish to do 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 operations
	such as 
                <link linkend="n602">BltBitMap()</link>
                .  The callback is a raw, low-level rendering
	call-back.  If you need to call a rendering operation with a
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , make sure you use a copy of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 and NULL the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 pointer.

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">utility/hooks.h</ulink>
                
            </literallayout>
        </section>
        <section id="n756">
            <title>layers.library/EndUpdate</title>
            <literallayout class="monospaced">
                    NAME
	EndUpdate -- remove damage list and restore state of layer to normal.

    SYNOPSIS
	EndUpdate( l, flag )
	           a0  d0

	void EndUpdate( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *, UWORD);

    FUNCTION
	After the programmer has redrawn his picture he calls this
	routine to restore the ClipRects to point to his standard
	layer tiling. The layer is then unlocked for access by the
	layer library.

	Note: use flag = FALSE if you are only making a partial update.
	    You may use the other region functions (graphics functions such as
	    
                <link linkend="n690">OrRectRegion</link>
                , 
                <link linkend="n588">AndRectRegion</link>
                , and 
                <link linkend="n744">XorRectRegion</link>
                 ) to clip adjust
	    the DamageList to reflect a partial update.

    INPUTS
	l - pointer to a layer
	flag - use TRUE if update was completed. The damage list is cleared.
	       use FALSE if update not complete. The damage list is retained.

    EXAMPLE

	-- begin update for first part of two-part refresh --
	BeginUpdate(my_layer);

	-- do some refresh, but not all --
	my_partial_refresh_routine(my_layer);

	-- end update, false (not completely done refreshing yet) --
	EndUpdate(my_layer, FALSE);

	-- begin update for last part of refresh --
	BeginUpdate(my_layer);

	-- do rest of refresh --
	my_complete_refresh_routine(my_layer);

	-- end update, true (completely done refreshing now) --
	EndUpdate(my_layer, TRUE);

    BUGS

    SEE ALSO
	
                <link linkend="n747">BeginUpdate()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n757">
            <title>layers.library/FattenLayerInfo</title>
            <literallayout class="monospaced">
                    NAME
	FattenLayerInfo -- convert 1.0 LayerInfo to 1.1 LayerInfo
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE

    SYNOPSIS
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
	FattenLayerInfo( li )
	                 a0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 FattenLayerInfo( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *);
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE

    FUNCTION
	V1.1 software and any later releases need to have more info in the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure. To do this in a 1.0 supportable manner requires
	allocation and deallocation of the memory whenever most
	layer library functions are called.  To prevent unnecessary
	allocation/deallocation FattenLayerInfo will preallocate the
	necessary data structures and fake out the layer library into
	thinking it has a LayerInfo gotten from 
                <link linkend="n768">NewLayerInfo</link>
                .
	
                <link linkend="n768">NewLayerInfo</link>
                 is the approved method for getting this structure.
	When a program needs to give up the LayerInfo structure it
	must call 
                <link linkend="n772">ThinLayerInfo</link>
                 before freeing the memory. 
                <link linkend="n772">ThinLayerInfo</link>
                	is not necessary if 
                <link linkend="n754">New/DisposeLayerInfo</link>
                 are used however.

    INPUTS
	li - pointer to LayerInfo structure

    BUGS

    SEE ALSO

	
                <link linkend="n768">NewLayerInfo()</link>
                , 
                <link linkend="n772">ThinLayerInfo()</link>
                , 
                <link linkend="n754">DisposeLayerInfo()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n758">
            <title>layers.library/InitLayers</title>
            <literallayout class="monospaced">
                    NAME
	InitLayers -- Initialize 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE

    SYNOPSIS
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
	InitLayers( li )
	            a0

	void InitLayers( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *);
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE

    FUNCTION
	Initialize 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure in preparation to use
	other layer operations on this list of layers.
	Make the Layers unlocked (open), available to layer operations.

    INPUTS
	li - pointer to LayerInfo structure

    BUGS

    SEE ALSO
	
                <link linkend="n768">NewLayerInfo()</link>
                , 
                <link linkend="n754">DisposeLayerInfo()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n759">
            <title>layers.library/InstallClipRegion</title>
            <literallayout class="monospaced">
                    NAME
	InstallClipRegion -- Install clip region in layer

    SYNOPSIS
	oldclipregion = InstallClipRegion( l,  region )
	d0                                 a0  a1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *InstallClipRegion( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">Region</ulink>
                 *);

    FUNCTION
	Installs a transparent Clip region in the layer. All
	subsequent graphics calls will be clipped to this region.
	You MUST remember to call InstallClipRegion(l,NULL) before
	calling DeleteLayer(l) or the Intuition function 
                <link linkend="n338">CloseWindow()</link>
                 	if you have installed a non-NULL ClipRegion in l.

    INPUTS
	l - pointer to a layer
	region - pointer to a region

    RESULTS
	oldclipregion - The pointer to the previous ClipRegion that
	    was installed. Returns NULL if no previous ClipRegion installed.

	    Note: If the system runs out of memory while computing the
	        resulting ClipRects the LAYERS_CLIPRECTS_LOST bit will
	        be set in l-&gt;Flags.

    BUGS
	If the system runs out of memory during normal layer operations,
	the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 list may get swept away and not restored.
	As soon as there is enough memory and the layer library
	gets called again the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 list will be rebuilt.

    SEE ALSO
	
                <link linkend="n747">BeginUpdate()</link>
                 
                <link linkend="n756">EndUpdate()</link>
                ,
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/regions.h">graphics/regions.h</ulink>
                
            </literallayout>
        </section>
        <section id="n760">
            <title>layers.library/InstallLayerHook</title>
            <literallayout class="monospaced">
                    NAME
	InstallLayerHook -- safely install a new Layer-&gt;BackFill hook.    (V36)

    SYNOPSIS
	oldhook = InstallLayerHook( layer, hook )
	d0                          a0     a1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *InstallLayerHook( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *);

    FUNCTION
	Installs a new Layer-&gt;Backfill 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                , waiting until it is safe to do
	so. Locks the layer while substituting the new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 and removing the
	old one. If a new 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 is not provided, will install the default layer
	BackFill 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                .

    INPUTS
	layer - pointer to the layer in which to install the Backfill 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                .
	hook -  pointer to layer callback 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 which will be called
	        with object == (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *) result-&gt;RastPort
	        and message == [ (Layer *) layer, (struct Rectangle) bounds,
	                         (LONG) offsetx, (LONG) offsety ]

	        This hook should fill the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	        with the BackFill pattern appropriate for offset x/y.

	        If hook is LAYERS_BACKFILL, the default backfill is
	        used for the layer.  (Same as pre-2.0)

	        As of V39:
		If hook is LAYERS_NOBACKFILL, the layer will not be
	        backfilled (NO-OP).

    RESULTS
	oldhook - pointer to the Layer-&gt;BackFill 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 that was previously
	          active.  Returns NULL if it was the default hook.
		  In V39, it could return 1 if there was no hook.

    EXAMPLE
	The following hook is a very simple example that does rather little
	but gives the basis idea of what is going on.

	*
	* This is the code called by the layer hook...
	* Note that some other setup is required for this to work, including
	* the definition of the PrivateData structure (pd_...) and the
	* definition of the BitMapPattern structure (bmp_...)
	*
	CoolHook:	xdef	CoolHook
			movem.l	d2-d7/a3-a6,-(sp)	; Save these...
			move.l	h_SubEntry(a0),a4	; (my private data #1 here)
			move.l	h_Data(a0),a5		; Put data into address reg
	*
	* Now, we do the rendering...
	* Note that the layer may not be important...  But it is here...
	*
			move.l	(a1)+,a0		; Get the layer...
	*
	* a1 now points at the rectangle...
	*
			move.l	pd_GfxBase(a4),a6	; Point at 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfxbase.h">GfxBase</ulink>
                			move.l	bmp_Pattern(a5),d0	; Get PatternBitMap
			beq	SimpleCase		; None?  Simple (0) case
	*
	* Now do the complex case of a pattern...
	*
			move.l	a1,a3			; Pointer to rectangle
			addq.l	#8,a1			; Get past rectangle
			move.l	(a1)+,d2		; X Offset (For pattern)
			move.l	(a1)+,d3		; Y Offset
		;
		; Whatever complex blitting you would do in the complex case
		; goes here
		;
	*
	* No bitmap, so just do the simple (0) minterm case...
	*
	SimpleCase:	moveq.l	#0,d2			; Clear d2
			move.w	ra_MinX(a1),d2		; Get X pos
	*
			moveq.l	#0,d3
			move.w	ra_MinY(a1),d3		; Get Y pos
	*
			moveq.l	#0,d4
			move.w	ra_MaxX(a1),d4
			sub.l	d2,d4
			addq.l	#1,d4			; Get X size
	*
			moveq.l	#0,d5
			move.w	ra_MaxY(a1),d5
			sub.l	d3,d5
			addq.l	#1,d5			; Get Y size
	*
			move.l	d2,d0			; X Source
			move.l	d3,d1			; Y Source
			moveq.l	#0,d6			; NULL minterm
			moveq.l	#-1,d7			; FF mask
	*
			move.l	rp_BitMap(a2),a1	; Get bitmap
			move.l	a1,a0
			CALLSYS	
                <link linkend="n602">BltBitMap</link>
                		; Do the backfill-0
	*
	HookDone:	movem.l	(sp)+,d2-d7/a3-a6	; Restore
			rts

    NOTES
	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 you are passed back is the same one passed to the
	function.  You should *not* use "layered" rendering functions
	on this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .  Generally, you will wish to do 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 operations
	such as 
                <link linkend="n602">BltBitMap()</link>
                .  The callback is a raw, low-level rendering
	call-back.  If you need to call a rendering operation with a
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , make sure you use a copy of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 and NULL the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 pointer.

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">utility/hooks.h</ulink>
                
            </literallayout>
        </section>
        <section id="n761">
            <title>layers.library/InstallLayerInfoHook</title>
            <literallayout class="monospaced">
                    NAME
	InstallLayerInfoHook - Install a backfill hook for non-layer      (V39)

    SYNOPSIS
	oldhook=InstallLayerInfoHook(li,hook)
	d0                           a0 a1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *InstallLayerInfoHook(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *);

    FUNCTION
	This function will install a backfill hook for the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                	structure passed.  This backfill hook will be used to clear the
	background area where no layer exists.  The hook function is
	passed the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 and the bounds just like the layer backfill
	hook.  Note that this hook could be called for any layer.

    INPUTS
	li - pointer to LayerInfo structure

	hook -  pointer to layer callback 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 which will be called
	        with object == (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *) result-&gt;RastPort
	        and message == [ (ULONG) undefined, (struct Rectangle) bounds ]

	        This hook should fill the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                	        with the BackFill pattern appropriate for rectangle given.

	        If hook is LAYERS_BACKFILL, the default backfill is
	        used.  (Same as pre-2.0)

		If hook is LAYERS_NOBACKFILL, there will be no
	        backfill.  (NO-OP).

    RESULTS
	oldhook - Returns the backfill hook that was in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                .
	          Returns LAYERS_BACKFILL if the default was installed.
	          Returns LAYERS_NOBACKFILL if there was a NO-OP hook.
	          Returns -1 if there was some failure.

    EXAMPLE
	See the example in 
                <link linkend="n760">InstallLayerHook</link>
                .  Note that both the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                	pointer and the OffsetX/Y values are not available in the
	LayerInfo backfill hook.

    NOTES
	When the hook is first installed, it is *NOT* called.  It is up
	to the application to know if it is safe to fill in the area.
	Since the hook will be called when a layer is deleted, the easiest
	way to have layers call this hook is to create and delete a backdrop
	layer that is the size of the area.

	Also, note that currently the first long word of the hook message
	contains an undefined value.  This value may look like a layer pointer.
	It is *not* a layer pointer.

	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 you are passed back is the same one passed to the
	function.  You should *not* use "layered" rendering functions
	on this 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                .  Generally, you will wish to do 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 operations
	such as 
                <link linkend="n602">BltBitMap()</link>
                .  The callback is a raw, low-level rendering
	call-back.  If you need to call a rendering operation with a
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                , make sure you use a copy of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 and NULL the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 pointer.

    SEE ALSO
	
                <link linkend="n760">InstallLayerHook()</link>
                
            </literallayout>
        </section>
        <section id="n762">
            <title>layers.library/LockLayer</title>
            <literallayout class="monospaced">
                    NAME
	LockLayer -- 
                <link linkend="n110">Lock</link>
                 layer to make changes to ClipRects.

    SYNOPSIS
	LockLayer( dummy, l )
	           a0     a1

	void LockLayer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *);

    FUNCTION
	Make this layer unavailable for other tasks to use.
	If another task is already using this layer then wait for
	it to complete and then reserve the layer for your own use.
	(this function does the same thing as graphics.library/LockLayerRom)

	Note: if you wish to lock MORE THAN ONE layer at a time, you
	    must call 
                <link linkend="n763">LockLayerInfo()</link>
                 before locking those layers and
	    then call 
                <link linkend="n774">UnlockLayerInfo()</link>
                 when you have finished. This
	    is to prevent system "deadlocks".

	Further Note: while you hold the lock on a layer, Intuition will block
	    on operations such as windowsizing, dragging, menus, and depth
	    arranging windows in this layer's screen.  It is recommended that
	    YOU do not make Intuition function calls while the layer is locked.

    INPUTS
	dummy - unused
	l - pointer to a layer

    BUGS

    SEE ALSO
	
                <link linkend="n773">UnlockLayer()</link>
                , 
                <link linkend="n763">LockLayerInfo()</link>
                , 
                <link linkend="n774">UnlockLayerInfo()</link>
                ,
	
                <link linkend="n678">graphics.library/LockLayerRom()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n763">
            <title>layers.library/LockLayerInfo</title>
            <literallayout class="monospaced">
                    NAME
	LockLayerInfo -- 
                <link linkend="n110">Lock</link>
                 the LayerInfo structure.

    SYNOPSIS
	LockLayerInfo( li )
	               a0

	void LockLayerInfo( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *);

    FUNCTION
	Before doing an operation that requires the LayerInfo
	structure, make sure that no other task is also using the
	LayerInfo structure.  LockLayerInfo() returns when the
	LayerInfo belongs to this task.  There should be
	an 
                <link linkend="n774">UnlockLayerInfo</link>
                 for every LockLayerInfo.

	Note: All layer routines presently LockLayerInfo() when they
	start up and 
                <link linkend="n774">UnlockLayerInfo()</link>
                 as they exit.  Programmers
	will need to use these Lock/Unlock routines if they wish
	to do something with the LayerStructure that is not
	supported by the layer library.

    INPUTS
	li - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure

    BUGS

    SEE ALSO
	
                <link linkend="n774">UnlockLayerInfo()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n764">
            <title>layers.library/LockLayers</title>
            <literallayout class="monospaced">
                    NAME
	LockLayers -- lock all layers from graphics output.

    SYNOPSIS
	LockLayers( li )
	            a0

	void LockLayers( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *);

    FUNCTION
	First calls 
                <link linkend="n763">LockLayerInfo()</link>
                	Make all layers in this layer list locked.

    INPUTS
	li - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure

    BUGS

    SEE ALSO
	
                <link linkend="n762">LockLayer()</link>
                , 
                <link linkend="n763">LockLayerInfo()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n765">
            <title>layers.library/MoveLayer</title>
            <literallayout class="monospaced">
                    NAME
	MoveLayer -- 
                <link linkend="n681">Move</link>
                 layer to new position in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .

    SYNOPSIS
	result = MoveLayer( dummy, l, dx, dy )
	d0                  a0     a1 d0  d1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 MoveLayer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , LONG);

    FUNCTION
	
                <link linkend="n681">Move</link>
                 this layer to new position in shared 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .
	If any refresh layers become revealed, collect damage and
	set REFRESH bit in layer Flags.

    INPUTS
	dummy - unused
	l - pointer to a nonbackdrop layer
	dx - delta to add to current x position
	dy - delta to add to current y position

    RETURNS
	result - TRUE if operation successful
	         FALSE if failed (out of memory)

    BUGS
	May not handle (dx,dy) which attempts to move the layer outside the
	layer's RastPort-&gt;BitMap bounds .

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n766">
            <title>layers.library/MoveLayerInFrontOf</title>
            <literallayout class="monospaced">
                    NAME
	MoveLayerInFrontOf -- Put layer in front of another layer.

    SYNOPSIS
	result = MoveLayerInFrontOf( layertomove, targetlayer )
                                    a0           a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 MoveLayerInFrontOf( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *);

    FUNCTION
	
                <link linkend="n681">Move</link>
                 this layer in front of target layer, swapping bits
	in and out of the display with other layers.
	If this is a refresh layer then collect damage list and
	set the LAYERREFRESH bit in layer-&gt;Flags if redraw required.

	Note: this operation may generate refresh events in other layers
	    associated with this layer's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure.

    INPUTS
	layertomove - pointer to layer which should be moved
	targetlayer - pointer to target layer in front of which to move layer

    RESULTS
	result = TRUE    if operation successful
	         FALSE   if operation unsuccessful (probably out of memory)

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n767">
            <title>layers.library/MoveSizeLayer</title>
            <literallayout class="monospaced">
                    NAME                                                              (V36)
	MoveSizeLayer -- Position/Size layer

    SYNOPSIS
	result = MoveSizeLayer( layer, dx, dy, dw, dh )
	d0                      a0     d0  d1  d2  d3

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 MoveSizeLayer( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , LONG);

    FUNCTION
	Change upperleft and lower right position of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                .

    INPUTS
	dummy - unused
	l - pointer to a nonbackdrop layer
	dx,dy - change upper left corner by (dx,dy)
	dw,dy - change size by (dw,dh)

    RETURNS
	result - TRUE if operation successful
	         FALSE if failed (due to out of memory)
	         FALSE if failed (due to illegal layer-&gt;bounds)

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n768">
            <title>layers.library/NewLayerInfo</title>
            <literallayout class="monospaced">
                    NAME
	NewLayerInfo -- 
                <link linkend="n202">Allocate</link>
                 and Initialize full 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure.

    SYNOPSIS
	result = NewLayerInfo()
	d0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *NewLayerInfo( void );

    FUNCTION
	
                <link linkend="n202">Allocate</link>
                 memory required for full 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure.
	Initialize 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure in preparation to use
	other layer operations on this list of layers.
	Make the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 unlocked (open).

    INPUTS
	None

    RESULT
	result- pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure if successful
	        NULL if not enough memory

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n769">
            <title>layers.library/ScrollLayer</title>
            <literallayout class="monospaced">
                    NAME
	ScrollLayer -- Scroll around in a superbitmap, translate coordinates
                      in non-superbitmap layer.

    SYNOPSIS
	ScrollLayer( dummy, l, dx, dy )
	             a0     a1 d0  d1

	void ScrollLayer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , LONG);

    FUNCTION
	For a SuperBitMap Layer:
	Update the SuperBitMap from the layer display, then copy bits
	between 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 and SuperBitMap to reposition layer over different
	portion of SuperBitMap.
	For nonSuperBitMap layers, all (x,y) pairs are adjusted by
	the scroll(x,y) value in the layer.  To cause (0,0) to actually
	be drawn at (3,10) use ScrollLayer(-3,-10). This can be useful
	along with 
                <link linkend="n759">InstallClipRegion</link>
                 to simulate Intuition GZZWindows
	without the overhead of an extra layer.

    INPUTS
	dummy - unused
	l - pointer to a layer
	dx - delta to add to current x scroll value
	dy - delta to add to current y scroll value

    BUGS
	May not handle (dx,dy) which attempts to move the layer outside the
	layer's SuperBitMap bounds.

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n770">
            <title>layers.library/SizeLayer</title>
            <literallayout class="monospaced">
                    NAME
	SizeLayer -- Change the size of this nonbackdrop layer.

    SYNOPSIS
	result = SizeLayer( dummy, l, dx, dy )
	d0                  a0     a1 d0  d1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SizeLayer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , LONG);

    FUNCTION
	Change the size of this layer by (dx,dy). The lower right hand
	corner is extended to make room for the larger layer.
	If there is SuperBitMap for this layer then copy pixels into
	or out of the layer depending on whether the layer increases or
	decreases in size.  Collect damage list for those layers that may
	need to be refreshed if damage occurred.

    INPUTS
	dummy - unused
	l - pointer to a nonbackdrop layer
	dx - delta to add to current x size
	dy - delta to add to current y size

    RESULTS
	result - TRUE if operation successful
	         FALSE if failed (out of memory)

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n771">
            <title>layers.library/SwapBitsRastPortClipRectayers.library/SwapBitsRastPortClipRect</title>
            <literallayout class="monospaced">
                    NAME
	SwapBitsRastPortClipRect -- Swap bits between common bitmap
	                            and obscured 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                    SYNOPSIS
	SwapBitsRastPortClipRect( rp, cr )
	                          a0  a1

	void SwapBitsRastPortClipRect( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 *);

    FUNCTION
	Support routine useful for those that need to do some
	operations not done by the layer library.  Allows programmer
	to swap the contents of a small 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                 with a subsection of
	the display. This is accomplished without using extra memory.
	The bits in the display 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 are exchanged with the
	bits in the ClipRect's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                .

	Note: the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">ClipRect</ulink>
                 structures which the layer library allocates are
	actually a little bigger than those described in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                	include file.  So be warned that it is not a good idea to have
	instances of cliprects in your code.

    INPUTS
	rp - pointer to rastport
	cr - pointer to cliprect to swap bits with

    NOTE
	Because the blit operation started by this function is done asynchronously,
	it is imperative that a 
                <link linkend="n737">WaitBlit()</link>
                 be performed before releasing or using
	the processor to modify any of the associated structures.

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">graphics/rastport.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n772">
            <title>layers.library/ThinLayerInfo</title>
            <literallayout class="monospaced">
                    NAME
	ThinLayerInfo -- convert 1.1 LayerInfo to 1.0 LayerInfo.
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE

    SYNOPSIS
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
	ThinLayerInfo( li )
	               a0

	void ThinLayerInfo( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *);
	OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE

    FUNCTION
	return the extra memory needed that was allocated with
	
                <link linkend="n757">FattenLayerInfo</link>
                . This is must be done prior to freeing
	the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure itself. V1.1 software should be
	using 
                <link linkend="n754">DisposeLayerInfo</link>
                .

    INPUTS
	li - pointer to LayerInfo structure

    BUGS

    SEE ALSO
	
                <link linkend="n754">DisposeLayerInfo()</link>
                , 
                <link linkend="n757">FattenLayerInfo()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n773">
            <title>layers.library/UnlockLayer</title>
            <literallayout class="monospaced">
                    NAME
	UnlockLayer -- Unlock layer and allow graphics routines to use it.

    SYNOPSIS
	UnlockLayer( l )
	             a0

	void UnlockLayer( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *);

    FUNCTION
	When finished changing the ClipRects or whatever you were
	doing with this layer you must call UnlockLayer() to allow
	other tasks to proceed with graphic output to the layer.

    INPUTS
	l - pointer to a layer

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">graphics/clip.h</ulink>
                
            </literallayout>
        </section>
        <section id="n774">
            <title>layers.library/UnlockLayerInfo</title>
            <literallayout class="monospaced">
                    NAME
	UnlockLayerInfo -- Unlock the LayerInfo structure.

    SYNOPSIS
	UnlockLayerInfo( li )
	                 a0

	void UnlockLayerInfo( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *);

    FUNCTION
	After the operation is complete that required a 
                <link linkend="n763">LockLayerInfo</link>
                ,
	unlock the LayerInfo structure so that  other tasks may
	affect the layers.

    INPUTS
	li - pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure

     BUGS

     SEE ALSO
	
                <link linkend="n763">LockLayerInfo()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n775">
            <title>layers.library/UnlockLayers</title>
            <literallayout class="monospaced">
                    NAME
	UnlockLayers -- Unlock all layers from graphics output.
	                Restart graphics output to layers that have been waiting

    SYNOPSIS
	UnlockLayers( li )
	              a0

	void UnlockLayers( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 *);

    FUNCTION
	Make all layers in this layer list unlocked.
	Then call 
                <link linkend="n774">UnlockLayerInfo</link>
                    INPUTS
	li - pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure

    BUGS

    SEE ALSO
	
                <link linkend="n764">LockLayers()</link>
                , 
                <link linkend="n773">UnlockLayer()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n776">
            <title>layers.library/UpfrontLayer</title>
            <literallayout class="monospaced">
                    NAME
	UpfrontLayer -- Put layer in front of all other layers.

    SYNOPSIS
	result = UpfrontLayer( dummy, l )
	d0                     a0     a1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 UpfrontLayer( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *);

    FUNCTION
	
                <link linkend="n681">Move</link>
                 this layer to the most upfront position swapping bits
	in and out of the display with other layers.
	If this is a refresh layer then collect damage list and
	set the LAYERREFRESH bit in layer-&gt;Flags if redraw required.
	By clearing the BACKDROP bit in the layers Flags you may
	bring a Backdrop layer up to the front of all other layers.

	Note: this operation may generate refresh events in other layers
	   associated with this layer's 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">Layer_Info</ulink>
                 structure.

    INPUTS
	dummy - unused
	l - pointer to a nonbackdrop layer

    RESULTS
	result - TRUE   if operation successful
	         FALSE  if operation unsuccessful (probably out of memory)

    BUGS

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
        <section id="n777">
            <title>layers.library/WhichLayer</title>
            <literallayout class="monospaced">
                    NAME
	WhichLayer -- Which 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 is this point in?

    SYNOPSIS
	layer = WhichLayer( li, x, y )
	d0                  a0  d0 d1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/clip.h">Layer</ulink>
                 *WhichLayer(struct Layer_Info*, WORD, WORD);

    FUNCTION
	Starting at the topmost layer check to see if this point (x,y)
	    occurs in this layer.  If it does return the pointer to this
	    layer. Return NULL if there is no layer at this point.

    INPUTS
	li  = pointer to LayerInfo structure
	(x,y) = coordinate in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">BitMap</ulink>
                    RESULTS
	layer - pointer to the topmost layer that this point is in
	        NULL if this point is not in a layer

    SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/layers.h">graphics/layers.h</ulink>
                
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>diskfont</title>
        <section id="n778">
            <title>diskfont.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n779"> AvailFonts() </link>
                    
                <link linkend="n780"> DisposeFontContents() </link>
                    
                <link linkend="n781"> NewFontContents() </link>
                    
                <link linkend="n782"> NewScaledDiskFont() </link>
                    
                <link linkend="n783"> OpenDiskFont() </link>
            </literallayout>
        </section>
        <section id="n779">
            <title>diskfont.library/AvailFonts</title>
            <literallayout class="monospaced">
                   NAME
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFonts</ulink>
                 -- Inquire available memory &amp; disk fonts.

   SYNOPSIS
	error = AvailFonts(buffer, bufBytes, flags);
	                   A0      D0        D1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 AvailFonts( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFontsHeader</ulink>
                 *buffer, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 bufBytes
		ULONG flags );

   FUNCTION
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFonts</ulink>
                 fills a user supplied buffer with the structure,
	described below, that contains information about all the
	fonts available in memory and/or on disk.  Those fonts
	available on disk need to be loaded into memory and opened
	via 
                <link linkend="n783">OpenDiskFont</link>
                , those already in memory are accessed via
	
                <link linkend="n688">OpenFont</link>
                .  The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 structure required by the open calls
	is part of the information 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFonts</ulink>
                 supplies.

	When 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFonts</ulink>
                 fails, it returns the number of extra bytes
	it needed to complete the command.  Add this number to your
	current buffer size, allocate a new buffer, and try again.

   INPUTS
	buffer - memory to be filled with struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFontsHeader</ulink>
                		followed by an array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFonts</ulink>
                 elements, which
		contains entries for the available fonts and their
		names.

	bufBytes - the number of bytes in the buffer
	flags - AFF_MEMORY is set to search memory for fonts to fill
		the structure, AFF_DISK is set to search the disk for
		fonts to fill the structure.  AFF_SCALED is set to
		not filter out memory fonts that are not designed.
		AFF_BITMAP is set to filter out fonts that are not
		stored in Amiga font format, i.e. to filter out
		outline fonts.  Any combination may be specified.
		AFF_TAGGED is set to fill the buffer with 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">TAvailFonts</ulink>
                		elements instead of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFonts</ulink>
                 elements.

   RESULTS
	buffer - filled with struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFontsHeader</ulink>
                 followed by the
		[T]AvailFonts elements, There will be duplicate entries
		for fonts found both in memory and on disk, differing
		only by type.  The existance of a disk font in the
		buffer indicates that it exists as an entry in a font
		contents file -- the underlying font file has not been
		checked for validity, thus an 
                <link linkend="n783">OpenDiskFont</link>
                 of it may
		fail.
	error - if non-zero, this indicates the number of bytes needed
		for 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFonts</ulink>
                 in addition to those supplied.  Thus
		structure elements were not returned because of
		insufficient bufBytes.

   EXAMPLE
	int afShortage, afSize;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFontsHeader</ulink>
                 *afh;

	...

	afSize = 400;
	do {
	    afh = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFontsHeader</ulink>
                 *) AllocMem(afSize, 0);
	    if (afh) {
	        afShortage = AvailFonts(afh, afSize, AFF_MEMORY|AFF_DISK);
	        if (afShortage) {
	            FreeMem(afh, afSize);
	            afSize += afShortage;
	        }
	    }
	    else {
	        fail("AllocMem of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFonts</ulink>
                 buffer afh failed\n");
	        break;
	    }
	}
	    while (afShortage);

	/*
	 * if (afh) non-zero here, then:
	 * 1. it points to a valid 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">AvailFontsHeader</ulink>
                	 * 2. it must have FreeMem(afh, afSize) called for it after use
	 */

            </literallayout>
        </section>
        <section id="n780">
            <title>diskfont.library/DisposeFontContents</title>
            <literallayout class="monospaced">
                   NAME
	DisposeFontContents -- Free the result from 
                <link linkend="n781">NewFontContents</link>
                . (V34)

   SYNOPSIS
	DisposeFontContents(fontContentsHeader)
			    A1

	VOID DisposeFontContents( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">FontContentsHeader</ulink>
                 * );

   FUNCTION
	This function frees the array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">FontContents</ulink>
                 entries
	returned by 
                <link linkend="n781">NewFontContents</link>
                .

   INPUTS
	fontContentsHeader - a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">FontContentsHeader</ulink>
                 pointer
	    returned by 
                <link linkend="n781">NewFontContents</link>
                .

   EXCEPTIONS
 	This command was first made available as of version 34.

	A fontContentsHeader other than one acquired by a call
	
                <link linkend="n781">NewFontContents</link>
                 will crash.

   SEE ALSO
	
                <link linkend="n781">NewFontContents()</link>
                 to get structure freed here.

            </literallayout>
        </section>
        <section id="n781">
            <title>diskfont.library/NewFontContents</title>
            <literallayout class="monospaced">
                   NAME
	NewFontContents -- Create a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">FontContents</ulink>
                 image for a font. (V34)

   SYNOPSIS
	fontContentsHeader = NewFontContents(fontsLock,fontName)
       D0                                   A0        A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">FontContentsHeader</ulink>
                 *NewFontContents( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                , char * );

   FUNCTION
	This function creates a new array of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">FontContents</ulink>
                 entries
	that describe all the fonts associated with the fontName,
	specifically, all those in the font directory whose name
	is that of the font sans the ".font" suffix.

   INPUTS
	fontsLock - a DOS lock on the FONTS: directory (or other
	    directory where the font contents file and associated
	    font directory resides).
	fontName - the font name, with the ".font" suffix, which
	    is also the name of the font contents file.

   RESULT
	fontContentsHeader - a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">FontContentsHeader</ulink>
                 pointer.

   EXCEPTIONS
	This command was first made available as of version 34.

	D0 is zero if the fontName is does not have a ".font" suffix,
	if the fontName is too long, if a DOS error occurred, or if
	memory could not be allocated for the fontContentsHeader.

   SEE ALSO
	
                <link linkend="n780">DisposeFontContents()</link>
                 to free the structure acquired here.

            </literallayout>
        </section>
        <section id="n782">
            <title>diskfont.library/NewScaledDiskFont</title>
            <literallayout class="monospaced">
                   NAME
	NewScaledDiskFont -- Create a DiskFont scaled from another. (V36)

   SYNOPSIS
	header = NewScaledDiskFont(srcFont, destTextAttr)
	D0                         A0       A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">DiskFontHeader</ulink>
                 *NewScaledDiskFont( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 *,
		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TTextAttr</ulink>
                 * );

   INPUTS
	srcFont - the font from which the scaled font is to be
	    constructed.
	destTextAttr - the desired attributes for the new scaled
	    font.  This may be a structure of type 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 or
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TTextAttr</ulink>
                .

   RESULT
	header - a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">DiskFontHeader</ulink>
                 structure.  This is not
		being managed by the diskfont.library, however.

   NOTES
	o   This function may use the blitter.
	o   Fonts containing characters that render wholly outside
	    the character advance cell are currently not scalable.
	o   The font, and memory allocated for the scaled font can
	    can be freed by calling 
                <link linkend="n728">StripFont()</link>
                 on the font,
	    and then calling 
                <link linkend="n175">UnLoadSeg()</link>
                 on the segment created
	    by this function.

	    Both the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextFont</ulink>
                 structure, and segment pointer are contained
	    within the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">DiskFontHeader</ulink>
                 struct.  The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/diskfont/diskfont.h">DiskFontHeader</ulink>
                 structure
	    will also be freed as part of the 
                <link linkend="n175">UnLoadSeg()</link>
                 call.
	    
                <link linkend="n728">StripFont()</link>
                 is a new graphics.library call as of V36.

            </literallayout>
        </section>
        <section id="n783">
            <title>diskfont.library/OpenDiskFont</title>
            <literallayout class="monospaced">
                   NAME
       OpenDiskFont - load and get a pointer to a disk font.

   SYNOPSIS
       font = OpenDiskFont(textAttr)
       D0                  A0

   FUNCTION
       This function finds the font with the specified textAttr on
       disk, loads it into memory, and returns a pointer to the font
       that can be used in subsequent 
                <link linkend="n715">SetFont</link>
                 and 
                <link linkend="n620">CloseFont</link>
                 calls.
       It is important to match this call with a corresponding
       
                <link linkend="n620">CloseFont</link>
                 call for effective management of font memory.

       If the font is already in memory, the copy in memory is used.
       The disk copy is not reloaded.

   INPUTS
       textAttr - a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                 structure that describes the text font
               attributes desired.

   RESULTS
       D0 is zero if the desired font cannot be found.

   NOTES
       As of V36, OpenDiskFont() will automatically attempt to
       construct a font for you if:

               You have requested a font size which does not exist
               as a designed font, and

               You have not set the DESIGNED bit in the ta_Flags
               field of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TextAttr</ulink>
                , or 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/text.h">TTextAttr</ulink>
                 struct.

       Constructed fonts are created by scaling a designed font.
       A designed font is one which typically resides on disk,
       or in ROM (e.g., a font which has been designed by hand
       using a drawing tool).  Designed fonts generally look better
       than fonts constructed by the font scaler, but designed
       fonts also require disk space for each font size.

       Always set the DESIGNED bit if you do not want constructed fonts,
       or use 
                <link linkend="n779">AvailFonts()</link>
                 to find out which font sizes already exist.

       As of V37 the diskfont.library supported built-in outline
       fonts.  Then in V38 the outline font engine was moved to
       a new library, "bullet.library."

   BUGS
       This routine will not work well with font names whose file
       name components are longer than the maximum allowed
       (30 characters).

            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>icon</title>
        <section id="n784">
            <title>icon.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n785"> AddFreeList() </link>
                    
                <link linkend="n786"> BumpRevision() </link>
                    
                <link linkend="n787"> ChangeToSelectedIconColor() </link>
                    
                <link linkend="n788"> DeleteDiskObject() </link>
                    
                <link linkend="n789"> DrawIconStateA() </link>
                    
                <link linkend="n790"> DupDiskObjectA() </link>
                    
                <link linkend="n791"> FindToolType() </link>
                    
                <link linkend="n792"> FreeDiskObject() </link>
                    
                <link linkend="n793"> FreeFreeList() </link>
                    
                <link linkend="n794"> GetDefDiskObject() </link>
                    
                <link linkend="n795"> GetDiskObject() </link>
                    
                <link linkend="n796"> GetDiskObjectNew() </link>
                    
                <link linkend="n797"> GetIconRectangleA() </link>
                    
                <link linkend="n798"> GetIconTagList() </link>
                    
                <link linkend="n799"> IconControlA() </link>
                    
                <link linkend="n800"> LayoutIconA() </link>
                    
                <link linkend="n801"> MatchToolValue() </link>
                    
                <link linkend="n802"> NewDiskObject() </link>
                    
                <link linkend="n803"> PutDefDiskObject() </link>
                    
                <link linkend="n804"> PutDiskObject() </link>
                    
                <link linkend="n805"> PutIconTagList() </link>
            </literallayout>
        </section>
        <section id="n785">
            <title>icon.library/AddFreeList</title>
            <literallayout class="monospaced">
                   NAME
	AddFreeList - add memory to a free list.

   SYNOPSIS
	status = AddFreeList(free, mem, len)
	  D0                  A0    A1   A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 AddFreeList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                , ULONG);

   FUNCTION
	This routine adds the specified memory to the free list.
	The free list will be extended (if required).  If there
	is not enough memory to complete the call, NULL is returned.

	Note that AddFreeList() does NOT allocate the requested memory.
	It only records the memory in the free list.

   INPUTS
	free -- a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                 structure
	mem -- the base of the memory to be recorded
	len -- the length of the memory to be recorded

   RESULTS
	status -- TRUE if the call succeeded else FALSE;

   SEE ALSO
	
                <link linkend="n203">exec.library/AllocEntry</link>
                	
                <link linkend="n242">exec.library/FreeEntry</link>
                	
                <link linkend="n793">icon.library/FreeFreeList</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                
            </literallayout>
        </section>
        <section id="n786">
            <title>icon.library/BumpRevision</title>
            <literallayout class="monospaced">
                   NAME
	BumpRevision - reformat a name for a second copy.

   SYNOPSIS
	result = BumpRevision(newbuf, oldname)
	  D0                    A0      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 BumpRevision(STRPTR, STRPTR);

   FUNCTION
	BumpRevision takes a name and turns it into a "copy_of_name".
	It knows how to deal with copies of copies.  The routine
	will truncate the new name to the maximum dos name size
	(currently 30 characters).

   INPUTS
	newbuf - the new buffer that will receive the name
	         (it must be at least 31 characters long).
	oldname - the original name

   RESULTS
	result - a pointer to newbuf

   EXAMPLE
	oldname                          newbuf
	-------                          ------
	"foo"                            "copy_of_foo"
	"copy_of_foo"                    "copy_2_of_foo"
	"copy_2_of_foo"                  "copy_3_of_foo"
	"copy_199_of_foo"                "copy_200_of_foo"
	"copy foo"                       "copy_of_copy foo"
	"copy_0_of_foo"                  "copy_1_of_foo"
	"012345678901234567890123456789" "copy_of_0123456789012345678901"

            </literallayout>
        </section>
        <section id="n787">
            <title>icon.library/ChangeToSelectedIconColor</title>
            <literallayout class="monospaced">
                   NAME
	ChangeToSelectedIconColor -- Modify an RGB colour value for use in
	    a selected icon image (V44)

   SYNOPSIS
	ChangeToSelectedIconColor(cr)
	                          A0

	VOID ChangeToSelectedIconColor(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/datatypes/pictureclass.h">ColorRegister</ulink>
                 *cr);

   FUNCTION
	This function will change the provided RGB colour value to make it
	suitable for use in an icon's select image. This may involve darkening
	or toning the colour. Usually, icon.library calls this function
	when creating a select image for palette mapped icons which do not
	contain "real" select images.

   INPUTS
	cr -- Pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/datatypes/pictureclass.h">ColorRegister</ulink>
                , containing the RGB colour value
	    to be changed.

            </literallayout>
        </section>
        <section id="n788">
            <title>icon.library/DeleteDiskObject</title>
            <literallayout class="monospaced">
                   NAME
	DeleteDiskObject - Delete a Workbench disk object from disk.     (V37)

   SYNOPSIS
	result = DeleteDiskObject(name)
	  D0                      A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 DeleteDiskObject(STRPTR);

   FUNCTION
	This routine will try to delete a Workbench disk object from disk.
	The name parameter will have ".info" postpended to it, and the
	icon file of that name will be deleted.  If the call fails,
	it will return FALSE. The reason for the failure may be obtained
	via 
                <link linkend="n106">dos.library/IoErr()</link>
                .

	This call also updates the Workbench screen if needed.

	Using this routine protects you from any future changes to
	the way icons are stored within the system.

   INPUTS
	name -- name of the object (char *)

   RESULTS
	result -- TRUE if it worked, FALSE if not.

   EXAMPLE

	error = 0;

	/* Check if you have the right library version */
	if(IconBase-&gt;lib_Version &gt; 36)
	{
	    if (!DeleteDiskObject(name))
	        error = IoErr();
	}
	else
	{
	    /* Delete name plus ".info" */
	}

	if (error != 0)
	{
	    /* Do error routine...*/
	}

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n804">icon.library/PutDiskObject</link>
                	
                <link linkend="n795">icon.library/GetDiskObject</link>
                	
                <link linkend="n792">icon.library/FreeDiskObject</link>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	
                <link linkend="n805">icon.library/PutIconTagList</link>
                
            </literallayout>
        </section>
        <section id="n789">
            <title>icon.library/DrawIconStateA</title>
            <literallayout class="monospaced">
                   NAME
	DrawIconStateA -- 
                <link linkend="n629">Draw</link>
                 an icon as if it were an image (V44)

   SYNOPSIS
	DrawIconStateA(rp,icon,label,leftEdge,topEdge,state,tags)
	               A0 A1   A2    D0       D1      D2    A3

	VOID DrawIconStateA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *rp,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,
	                    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 label,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 leftEdge,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 topEdge,
	                    ULONG state,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	DrawIconState(rp,icon,label,leftEdge,topEdge,state,...);

	VOID DrawIconState(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *rp,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,
	                   
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 label,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 leftEdge,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 topEdge,
	                   ULONG state,...);

   FUNCTION
	This function will draw an icon as if it were an image; if
	a label is provided, it will be printed below it.

   INPUTS
	rp -- Pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to draw into; the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 clipping
	    rules, font, style, text colours and drawing mode will be used.
	icon -- Pointer to a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                .
	label -- Pointer to a NUL-terminated string, or NULL if
	    no label text is to be printed.
	leftEdge, topEdge -- Coordinates at which the icon image
	    should be drawn, including its border; please note that the
	    icon label may extend in whole or in part beyond the
	    leftEdge you have specified.
	state -- Select how and which icon image should be drawn;
	    see 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/imageclass.h">intuition/imageclass.h</ulink>
                 for supported states.
	tags -- Additional drawing options

   TAGS
	ICONDRAWA_DrawInfo (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 *) -- Drawing information data
	    associated with the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to draw into. The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                	    contents affect the colours of the border drawn around the
	    icon image and also carry display aspect ratio information.
	    If this tag is NULL, the default rendering pens for the
	    screen selected via IconControl(...,ICONA_SetGlobalScreen,...)
	    will be used instead.

	    This tag defaults to NULL.

	ICONDRAWA_Frameless (BOOL) -- 
                <link linkend="n629">Draw</link>
                 the icon without the
	    surrounding border.

	    This tag defaults to FALSE.

	ICONDRAWA_Borderless (BOOL) -- 
                <link linkend="n629">Draw</link>
                 the icon without the
	    surrounding border and frame.

	    This tag defaults to FALSE.

	ICONDRAWA_EraseBackground (BOOL) -- When drawing a frameless
	    icon, erase the icon background before drawing the icon.

	    This tag defaults to TRUE.

   EXAMPLE
	/* 
                <link linkend="n629">Draw</link>
                 the icon in its normal state, without
	 * a label but including a frame.
	 */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *rp;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon;

	DrawIconStateA(rp,icon,NULL,0,0,IDS_NORMAL,NULL);

	/* The same again, but without a frame. */
	DrawIconState(rp,icon,NULL,0,0,IDS_NORMAL,
	    ICONDRAWA_Frameless,TRUE,
	TAG_DONE);

	/* 
                <link linkend="n629">Draw</link>
                 the icon in selected state with a border; the
	 * frame colours come from the given 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                .
	 */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 *drawInfo;

	DrawIconState(rp,icon,NULL,0,0,IDS_SELECTED,
	    ICONDRAWA_DrawInfo,drawInfo,
	TAG_DONE);

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">workbench/icon.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/imageclass.h">intuition/imageclass.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">intuition/screens.h</ulink>
                	
                <link linkend="n348">intuition.library/DrawImageState</link>
                	
                <link linkend="n797">icon.library/GetIconRectangleA</link>
                	
                <link linkend="n799">icon.library/IconControlA</link>
                
            </literallayout>
        </section>
        <section id="n790">
            <title>icon.library/DupDiskObjectA</title>
            <literallayout class="monospaced">
                   NAME
	DupDiskObjectA -- Duplicate an icon (V44)

   SYNOPSIS
	icon = DupDiskObjectA(icon,tags);
	D0                    A0   A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 * DupDiskObjectA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,
	                                   struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	icon = DupDiskObject(icon,tag1,...);

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 * DupDiskObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,
	                                  
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 tag1,...);

   FUNCTION
	This function is used to create a duplicate of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                	in memory. It can also be used to create an extended
	("native") 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 data structure from an existing,
	traditional format 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 data structure.

   INPUTS
	icon -- Pointer to the icon to be duplicated.
	tags -- Control options.

   TAGS
	ICONDUPA_DuplicateDrawerData (BOOL) -- Duplicate the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DrawerData</ulink>
                ,
	    if available.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateImages (BOOL) -- Duplicate the icon images;
	    note that this DOES NOT include the associated image
	    data. To get the image data duplicated, too, also use
	    the ICONDUPA_DuplicateImageData tag.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateImageData (BOOL) -- Duplicate the icon image
	    data; this tag works together with the ICONDUPA_DuplicateImages
	    tag. If ICONDUPA_DuplicateImageData is set to TRUE, you must
	    also set ICONDUPA_DuplicateImages to TRUE.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateDefaultTool (BOOL) -- Duplicate the icon default
	    tool, if available.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateToolTypes (BOOL) -- Duplicate the icon tool
	    types, if available.

	    This tag defaults to TRUE.

	ICONDUPA_DuplicateToolWindow (BOOL) -- Duplicate the icon tool
	    window if available.

	    This tag defaults to TRUE.

	ICONDUPA_ActivateImageData (BOOL) -- If the source icon contains
	    palette mapped image data that was never put to use (this
	    happens if it is retrieved with the 
                <link linkend="n795">GetDiskObject()</link>
                 call rather
	    than the new 
                <link linkend="n798">GetIconTagList()</link>
                 call), this tag will cause the
	    image data to be analyzed and an attempt to be made to use that
	    image data in the duplicate. The resulting icon will be remapped
	    for display on the default screen, such as the Workbench screen.

	    This tag defaults to FALSE.

	ICONA_ErrorCode (LONG *) -- Pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 word variable to
	    store error codes in. Note that this variable will be
	    initialized regardless of whether an error occured or not.
	    Thus, you can check for an error condition by comparing the
	    variable contents against 0; 0 indicates success, all other
	    values are error codes as defined by dos.library.

   RESULT
	icon -- Pointer to a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 or NULL in case of error.
	    You can use 
                <link linkend="n106">IoErr()</link>
                 to retrieve the error code or use the
	    ICONA_ErrorCode tag instead.

   NOTES
	Any data you chose not to have duplicated will be set to NULL.
	For example, if you specified "ICONDUPA_DuplicateImages,FALSE",
	then the resulting icon's do_Gadget.GadgetRender and
	do_Gadget.SelectRender will both be NULL.

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">workbench/icon.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                
            </literallayout>
        </section>
        <section id="n791">
            <title>icon.library/FindToolType</title>
            <literallayout class="monospaced">
                   NAME
	FindToolType - find the value of a ToolType variable.

   SYNOPSIS
	value = FindToolType(toolTypeArray, typeName)
	  D0                      A0           A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 FindToolType(STRPTR *, STRPTR);

   FUNCTION
	This function searches a tool type array for a given entry,
	and returns a pointer to that entry.  This is useful for
	finding standard tool type variables.  The returned
	value is not a new copy of the string but is only
	a pointer to the part of the string after typeName.

   INPUTS
	toolTypeArray -- an array of strings (STRPTR *).
	typeName -- the name of the tooltype entry (STRPTR).

   RESULTS
	value -- a pointer to a string that is the value bound to typeName,
	        or NULL if typeName is not in the toolTypeArray.

   EXAMPLE
	Assume the tool type array has two strings in it:
	    "FILETYPE=text"
	    "TEMPDIR=:t"

	FindToolType( toolTypeArray, "FILETYPE" ) returns "text"
	FindToolType( toolTypeArray, "filetype" ) returns "text"
	FindToolType( toolTypeArray, "TEMPDIR" )  returns ":t"
	FindToolType( toolTypeArray, "MAXSIZE" )  returns NULL
	FindToolType( toolTypeArray, "text" )     returns NULL
	FindToolType( toolTypeArray, ":t" )       returns NULL

   NOTES
	icon.library V44 tolerates tool type strings with additional
	blanks around the '=' character, such as in "FILETYPE = text".
	Older icon.library versions did not support this.

   SEE ALSO
	
                <link linkend="n801">icon.library/MatchToolValue</link>
                
            </literallayout>
        </section>
        <section id="n792">
            <title>icon.library/FreeDiskObject</title>
            <literallayout class="monospaced">
                   NAME
	FreeDiskObject - free all memory in a Workbench disk object.

   SYNOPSIS
	FreeDiskObject(diskobj)
	               A0

	void FreeDiskObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *);

   FUNCTION
	This routine frees all memory in a Workbench disk object, and the
	object itself.  It is implemented via 
                <link linkend="n793">FreeFreeList()</link>
                .

	
                <link linkend="n795">GetDiskObject()</link>
                 takes care of all the initialization required
	to set up the object's free list.  This procedure may ONLY
	be called on a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 allocated via 
                <link linkend="n795">GetDiskObject()</link>
                .

   INPUTS
	diskobj -- a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 structure; as of V44,
	    a NULL diskobj pointer will be ignored.

   SEE ALSO
	
                <link linkend="n795">icon.library/GetDiskObject</link>
                	
                <link linkend="n804">icon.library/PutDiskObject</link>
                	
                <link linkend="n788">icon.library/DeleteDiskObject</link>
                	
                <link linkend="n793">icon.library/FreeFreeList</link>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	
                <link linkend="n805">icon.library/PutIconTagList</link>
                
            </literallayout>
        </section>
        <section id="n793">
            <title>icon.library/FreeFreeList</title>
            <literallayout class="monospaced">
                   NAME
	FreeFreeList - free all memory in a free list.

   SYNOPSIS
	FreeFreeList(free)
	             A0

	void FreeFreeList(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                 *);

   FUNCTION
	This routine frees all memory in a free list, and the
	free list itself.  It is useful for easily getting
	rid of all memory in a series of structures.  There is
	a free list in a Workbench object, and this contains
	all the memory associated with that object.

	A 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                 is a list of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 structures.  See the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 and 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemEntry</ulink>
                 documentation for more information.

	If the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                 itself is in the free list, it must be
	in the first 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/memory.h">MemList</ulink>
                 in the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                .

   INPUTS
	free -- a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                 structure; as of V44
	    a NULL free parameter will be ignored.

   SEE ALSO
	
                <link linkend="n203">exec.library/AllocEntry</link>
                	
                <link linkend="n242">exec.library/FreeEntry</link>
                	
                <link linkend="n785">icon.library/AddFreeList</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                
            </literallayout>
        </section>
        <section id="n794">
            <title>icon.library/GetDefDiskObject</title>
            <literallayout class="monospaced">
                   NAME
	GetDefDiskObject - read default wb disk object from disk.       (V36)

   SYNOPSIS
	diskobj = GetDefDiskObject(def_type)
	  D0                          D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *GetDefDiskObject(LONG);

   FUNCTION
	This routine reads in a default Workbench disk object from disk.
	The valid def_types can be found in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                 and
	currently include WBDISK thru WBKICK. If the call fails,
	it will return NULL. The reason for the failure may be obtained
	via 
                <link linkend="n106">IoErr()</link>
                .

	Using this routine protects you from any future changes to
	the way default icons are stored within the system.

   INPUTS
	def_type -- default icon type (WBDISK thru WBKICK).

   RESULTS
	diskobj -- the default Workbench disk object in question

   NOTES
	icon.library V36 through V40 did not support the WBDEVICE default
	icon type.

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n803">icon.library/PutDefDiskObject</link>
                	
                <link linkend="n805">icon.library/PutIconTagList</link>
                
            </literallayout>
        </section>
        <section id="n795">
            <title>icon.library/GetDiskObject</title>
            <literallayout class="monospaced">
                   NAME
	GetDiskObject - read in a Workbench disk object from disk.

   SYNOPSIS
	diskobj = GetDiskObject(name)
	  D0                      A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *GetDiskObject(STRPTR);

   FUNCTION
	This routine reads in a Workbench disk object in from disk.  The
	name parameter will have ".info" postpended to it, and the
	icon file of that name will be read.  If the call fails,
	it will return NULL.  The reason for the failure may be obtained
	via 
                <link linkend="n106">IoErr()</link>
                .

	Using this routine protects you from any future changes to
	the way icons are stored within the system.

	A 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                 structure is allocated just after the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                	structure; 
                <link linkend="n792">FreeDiskObject</link>
                 makes use of this to get rid of the
	memory that was allocated.

   INPUTS
	name -- name of the object (STRPTR) or NULL if you just want a
	        
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 structure allocated for you (useful when
	        calling AddAppIcon() in workbench.library).

   RESULTS
	diskobj -- the Workbench disk object in question

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n788">icon.library/DeleteDiskObject</link>
                	
                <link linkend="n792">icon.library/FreeDiskObject</link>
                	
                <link linkend="n796">icon.library/GetDiskObjectNew</link>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	
                <link linkend="n802">icon.library/NewDiskObject</link>
                	
                <link linkend="n804">icon.library/PutDiskObject</link>
                	
                <link linkend="n805">icon.library/PutIconTagList</link>
                	
                <link linkend="n834">workbench.library/AddAppIconA</link>
                
            </literallayout>
        </section>
        <section id="n796">
            <title>icon.library/GetDiskObjectNew</title>
            <literallayout class="monospaced">
                   NAME
	GetDiskObjectNew - read in a Workbench disk object from disk.    (V36)

   SYNOPSIS
	diskobj = GetDiskObjectNew(name)
	  D0                      A0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *GetDiskObjectNew(STRPTR);

   FUNCTION
	This routine reads in a Workbench disk object in from disk.  The
	name parameter will have ".info" postpended to it, and the
	icon file of that name will be read.  If the call fails,
	it will return zero.  The reason for the failure may be obtained
	via 
                <link linkend="n106">IoErr()</link>
                .

	Using this routine protects you from any future changes to
	the way icons are stored within the system.

	A 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">FreeList</ulink>
                 structure is allocated just after the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                	structure; 
                <link linkend="n792">FreeDiskObject</link>
                 makes use of this to get rid of the
	memory that was allocated.

	This call is functionally identical to 
                <link linkend="n795">GetDiskObject()</link>
                 with one
	exception. If its call to 
                <link linkend="n795">GetDiskObject()</link>
                 fails, this function calls
	
                <link linkend="n794">GetDefDiskObject()</link>
                . This is useful when there is no .info file for the
	icon you are trying to get a disk object for. Applications that use
	workbench application windows MUST use this call if they want to handle
	the user dropping an icon (that doesn't have a ".info" file) on their
	window. The V2.0 icon editor program is an example of a Workbench
	application window that uses this call.

   INPUTS
	name -- name of the object (STRPTR) or NULL if you just want a
	        
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 structure allocated for you (useful when
	        calling AddAppIcon() in workbench.library).

   RESULTS
	diskobj -- the Workbench disk object in question

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n792">icon.library/FreeDiskObject</link>
                	
                <link linkend="n795">icon.library/GetDiskObject</link>
                	
                <link linkend="n804">icon.library/PutDiskObject</link>
                	
                <link linkend="n788">icon.library/DeleteDiskObject</link>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	
                <link linkend="n805">icon.library/PutIconTagList</link>
                	
                <link linkend="n834">workbench.library/AddAppIconA</link>
                
            </literallayout>
        </section>
        <section id="n797">
            <title>icon.library/GetIconRectangleA</title>
            <literallayout class="monospaced">
                   NAME
	GetIconRectangleA -- Query the size of the area an icon renders into (V44)

   SYNOPSIS
	success = GetIconRectangleA(rp,icon,label,rectangle,tags)
	D0                          A0 A1   A2    A3        A4

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 GetIconRectangleA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *rp,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,
	                       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 label,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 *rectangle,
	                       struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	success = GetIconRectangle(rp,icon,label,rectangle,...);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 GetIconRectangle(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *rp,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,
	                      
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                 label,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 *rectangle,...);

   FUNCTION
	This function will calculate the size of the area icon rendering
	would affect.

   INPUTS
	rp -- Pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to use for calculating the
	    the size of the label with respect to the font and
	    style options currently in use; this parameter may be
	    NULL if the label is NULL, too.
	icon -- Pointer to a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                .
	label -- Pointer to a NUL-terminated string, or NULL if
	    no label text is to enter the calculation.
	rectangle -- Pointer to a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 to fill in. The
	    contents will take the size of the icon image, the icon
	    border size and -- if you provide 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 and label
	    text -- the icon label into account. Due to how labels
	    are printed, the rectangle-&gt;MinX and rectangle-&gt;MinY
	    members may be negative.
	tags -- Additional drawing options to be taken into account.

   TAGS
	ICONDRAWA_DrawInfo (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">DrawInfo</ulink>
                 *) -- Drawing information data
	    associated with the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 parameter passed in.

	    This tag defaults to NULL.

	ICONDRAWA_Borderless (BOOL) -- When calculating the size of
	    the rectangle, this tag allows you to leave the icon
	    border size out of the equation.

	    This tag defaults to FALSE.

   RESULTS
	success -- TRUE if the parameters were well-formed and
	    the output data fits into the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 data
	    structure (which may not be the case if the image
	    is too large for a signed 16 bit integer to hold).

   EXAMPLE
	/* Find out how large an icon is. */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 rect;

	if(GetIconRectangleA(NULL,NULL,icon,NULL,&amp;rect,NULL))
	{
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 width,height;

	    width = rect.MaxX - rect.MinX + 1;
	    height = rect.MaxY - rect.MinY + 1;

	    Printf("icon is %ld×%ld pixels in size.\n",
	        width,height);
	}

	/* Find out which area the icon rendering would
	 * cover if a label would be printed below it.
	 */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 *rp;

	if(GetIconRectangle(rp,NULL,icon,"a rather long label text",&amp;rect,TAG_DONE))
	{
	    Printf("icon plus label would cover the area %ld,%ld×%ld,%ld\n",
	        rect.MinX,rect.MinY,rect.MaxX,rect.MaxY);
	}

   NOTES
	This function can be used to optimize on-screen rendering by
	precalculating the area rendering would cover. To make sure that
	the precalculated area size matches the one covered by the actual
	drawing operation, the RastPorts you use for measuring and for
	drawing should share the same font and the same text styles.

	The image size calculated by this function can be
	slightly larger than the data you will find in the icon's
	do_Gadget.GadgetRender 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 structure since the icon border
	will be taken into account. This happens regardless of whether
	icon.library was switched into frameless icon rendering mode
	or whether the icon is frameless. To obtain the size of the
	icon without taking the border into account, use the
	ICONDRAWA_Borderless tag.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">workbench/icon.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                	icon.library/DrawIconState
	
                <link linkend="n799">icon.library/IconControlA</link>
                
            </literallayout>
        </section>
        <section id="n798">
            <title>icon.library/GetIconTagList</title>
            <literallayout class="monospaced">
                   NAME
	GetIconTagList -- Retrieve an icon (V44)

   SYNOPSIS
	icon = GetIconTagList(name,tags);
	D0                    A0   A1

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 * GetIconTagList(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	icon = GetIconTags(name,tag1,...);

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 * GetIconTags(STRPTR name,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 tag1,...);

   FUNCTION

	This function is used to retrieve an icon; the icon can
	belong to a file/drawer/volume or it can be a default icon.

   INPUTS
	name -- Name of the object an icon is to be retrieved for,
	    or NULL if a default icon is to be retrieved.
	tags -- Retrieval options.

   TAGS
	ICONGETA_GetDefaultType (LONG) -- Type of the default icon
	    to retrieve; must be one of WBDISK, WBDRAWER, WBTOOL,
	    WBPROJECT, WBGARBAGE, WBDEVICE or WBKICK.

	    If this tag is used, the "name" parameter will be ignored.

	ICONGETA_GetDefaultName (STRPTR) -- Name of the default object
	    type to retrieve a default icon for. If the named default
	    icon cannot be found, NULL will be returned. To avoid
	    this, also specify ICONGETA_GetDefaultType: this will provide
	    a fall-back and return a "default" default icon instead.

	    If this tag is used, the "name" parameter will be ignored.

	ICONGETA_FailIfUnavailable (BOOL) -- If there is no icon for
	    the specified object, this tag will control how to
	    proceed: if ICONGETA_FailIfUnavailable is set to TRUE,
	    NULL and an error code will be returned; if set to FALSE,
	    icon.library will first invoke the global identification
	    hook (see icon.library/IconControlA) and then, if necessary,
	    provide a default icon for the object in question.

	    This tag defaults to TRUE.

	ICONGETA_GetPaletteMappedIcon (BOOL) -- By default, icon.library
	    will try to retrieve the palette mapped version of an icon. To
	    change this, set the ICONGETA_GetPaletteMappedIcon tag to FALSE.

	    This tag defaults to TRUE.

	ICONGETA_RemapIcon (BOOL) -- Palette mapped icons will usually
	    be automatically remapped for display on the screen
	    selected using 
                <link linkend="n799">IconControlA()</link>
                . If you do not want this to
	    happen because, for example, you want to use LayoutIcon()
	    instead, you can set the ICONGETA_RemapIcon tag to FALSE.
	    Take care when doing this as the icon returned to you
	    will have NULL pointers in the do_Gadget.GadgetRender
	    and do_Gadget.SelectRender members.

	    This tag defaults to TRUE.

	ICONGETA_IsDefaultIcon (LONG *) -- When retrieving an icon with
	    the ICONGETA_FailIfUnavailable tag set to FALSE, you may
	    receive a default icon because there is no on-disk icon
	    file for the object you wanted to retrieve it for. This
	    type of default icon is also known as a "fake" icon.
	    To find out whether you have received a fake icon, use the
	    ICONGETA_IsDefaultIcon tag.

	ICONGETA_GenerateImageMasks (BOOL) -- When loading icons with
	    transparent colours or backfill imagery, bit plane masks
	    will be generated for later use with 
                <link linkend="n789">DrawIconStateA()</link>
                .
	    If you do not need these masks, set this tag to FALSE.

	    This tag defaults to TRUE.

	ICONGETA_Screen (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *) -- Pointer to the screen
	    to remap the icon to; if set to NULL, this keeps the
	    icon from getting remapped in the first place (see
	    ICONGETA_RemapIcon for the consequences).

	    This tag defaults to the default screen to remap to, as
	    preset by 
                <link linkend="n799">IconControlA()</link>
                .

	ICONGETA_Label (STRPTR) -- The label text to be printed below
	    the icon when it is put to use lateron. This parameter
	    can be useful to figure out the type of the icon to
	    be retrieved by the identification hook. For example,
	    Workbench may label unreadable disk icons as "DF0:????".
	    The identification hook could key on this and supply an
	    appropriate icon for the disk.

	    This tag defaults to NULL.

	ICONA_ErrorCode (LONG *) -- Pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 word variable to
	    store error codes in. Note that this variable will be
	    initialized regardless of whether an error occured or not.
	    Thus, you can check for an error condition by comparing the
	    variable contents against 0; 0 indicates success, all other
	    values are error codes as defined by dos.library.

   RESULT
	icon -- Pointer to a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 or NULL in case of error.
	    You can use 
                <link linkend="n106">IoErr()</link>
                 to retrieve the error code or use the
	    ICONA_ErrorCode tag instead.

   EXAMPLE

	/* Retrieve the default drawer icon. */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 errorCode;

	icon = GetIconTags(NULL,
	    ICONGETA_GetDefaultType,WBDRAWER,
	    ICONA_ErrorCode,&amp;errorCode,
	TAG_DONE);

	if(icon == NULL)
	{
	    Printf("could not retrieve default drawer icon;\n");
	    PrintFault(errorCode,NULL);
	}

	/* Retrieve the default "picture" icon. */
	icon = GetIconTags(NULL,
	    ICONGETA_GetDefaultName,"picture",
	TAG_DONE);

	/* Retrieve the default "picture" icon; if there is no
	 * such default icon, retrieve the default project
	 * icon instead.
	 */
	icon = GetIconTags(NULL,
	    ICONGETA_GetDefaultName,"picture",
	    ICONGETA_GetDefaultType,WBPROJECT,
	TAG_DONE);

	/* Retrieve the regular, non-palette-mapped version of
	 * an icon.
	 */
	icon = GetIconTags("file",
	    ICONGETA_GetPaletteMappedIcon,FALSE,
	TAG_DONE);

	/* Retrieve the icon for a file; if there is no icon associated
	 * with it, retrieve a default icon that matches the file.
	 * Also, remember whether we got a real icon or a fake one.
	 */
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 isFakeIcon;

	icon = GetIconTags("file",
	    ICONGETA_FailIfUnavailable,FALSE,
	    ICONGETA_IsDefaultIcon,&amp;isFakeIcon,
	TAG_DONE);

	if(icon != NULL)
	{
	    Printf("got an icon at 0x%08lx, and it is a %s icon.\n",
	        icon,isFakeIcon ? "fake" : "real");
	}

   NOTES
	This function is a superset of 
                <link linkend="n794">GetDefDiskObject()</link>
                , 
                <link linkend="n795">GetDiskObject()</link>
                	and 
                <link linkend="n796">GetDiskObjectNew()</link>
                .

	If a palette-mapped icon is set to allocate its colours from the
	default screen, such as the Workbench screen, icon.library may
	resort to remap its colours in the course of Workbench screen
	close/reopen transitions. This means that you cannot depend upon
	the icon's image bitmaps to stay the same size, shape or colour.
	If this is what you need, you should either create your own images
	from the palette mapped data or make copies of the icon image
	bitmaps and the associated colour table.

	If during Workbench close/open transitions the global remap
	screen becomes NULL, GetIconTagList() may refuse to return a
	remapped icon and return with an error (ERROR_REQUIRED_ARG_MISSING)
	instead.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">workbench/icon.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                	
                <link linkend="n795">icon.library/GetDiskObject</link>
                	
                <link linkend="n796">icon.library/GetDiskObjectNew</link>
                	
                <link linkend="n794">icon.library/GetDefDiskObject</link>
                	
                <link linkend="n799">icon.library/IconControlA</link>
                	
                <link linkend="n805">icon.library/PutIconTagList</link>
                
            </literallayout>
        </section>
        <section id="n799">
            <title>icon.library/IconControlA</title>
            <literallayout class="monospaced">
                   NAME
	IconControlA -- Set and get icon and icon.library options (V44)

   SYNOPSIS
	processed = IconControlA(icon,tags);
	D0                       A0   A1

	ULONG IconControlA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	processed = IconControl(icon,tag1,...);

	ULONG IconControl(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 tag1,...);

   FUNCTION

	This function is used to modify and query icon and icon.library
	options.

   INPUTS
	icon -- Pointer to a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                , or NULL if global
		options are to be modified/queried.
	tags -- Options to modify/query.

   TAGS
	ICONCTRLA_SetGlobalScreen (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *) -- Pointer to the
	    screen to remap palette mapped icons to. This is commonly
	    used by workbench.library after it has initialized itself
	    and before/after screen open/close transitions. If the
	    screen is set to NULL, the icon colour remapping strategy is
	    changed: colours are no longer allocated from a screen
	    and the colours to map to will come from a default colour
	    colour table with four palette entries. Please note that
	    once you select a screen to remap to, you cannot tell
	    icon.library to use a different screen; you first need to
	    tell icon.library to "let go" of the previously selected
	    screen by passing a NULL ICONCTRLA_SetGlobalScreen parameter.
	    You can set a different screen only after this is done.

	ICONCTRLA_GetGlobalScreen (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 **) -- Pointer to the
	    screen to remap palette mapped icons to.

	ICONCTRLA_SetGlobalPrecision (LONG) -- Set the global colour
	    allocation precision used when remapping icons for
	    display. Default is PRECISION_ICON.

	OBP_Precision (LONG) -- Can be used as an alias for the
	    ICONCTRLA_SetGlobalPrecision tag.

	ICONCTRLA_GetGlobalPrecision (LONG *) -- Get the global colour
	    allocation precision used when remapping icons for
	    display.

	ICONCTRLA_SetGlobalEmbossRect (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 *) -- Set the
	    frame sizes used for drawing icons. The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                	    must be initialized as follows:

	        Rectangle-&gt;MinX  Width of left edge border (negative),
	                         must be in the range [-255..-1]
	        Rectangle-&gt;MinY  Height of top edge border (negative),
	                         must be in the range [-255..-1]
	        Rectangle-&gt;MaxX  Width of right edge border (positive),
	                         must be in the range [1..255]
	        Rectangle-&gt;MaxY  Height of bottom edge border (positive),
	                         must be in the range [1..255]

	ICONCTRLA_GetGlobalEmbossRect (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 *) -- Get the
	    frame sizes used for drawing icons.

	ICONCTRLA_SetGlobalFrameless (BOOL) -- Select whether icons
	    should always be drawn without a surrounding frame.
	    This option defaults to FALSE.

	ICONCTRLA_GetGlobalFrameless (LONG *) -- Query whether icons
	    are always drawn without a surrounding frame.

	ICONCTRLA_SetGlobalIdentifyHook (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *) -- Set the
	    hook that is invoked when trying to find an icon
	    for a file/drawer/volume that does not have an
	    icon associated with it. If set to NULL, no hook
	    will be called. The hook will be called with the
	    following parameters:

	    hookFunc(hook,reserved,iim)
	              A0     A2    A1

	    VOID hookFunc(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 reserved,
	                  struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">IconIdentifyMsg</ulink>
                 *iim);

	    The reserved parameter will be set to NULL (V44).

	    The icon identification message contents are as follows:

	        iim_SysBase
	        iim_DOSBase
	        iim_UtilityBase
	        iim_IconBase
	            
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 base pointers set up for your use.

	        iim_FileLock
	            A lock on the object to return an icon for.
	            This lock is guaranteed to be non-NULL.

	        iim_ParentLock
	            A lock on the object's parent directory. This
	            may be NULL if iim_FileLock points to a volume's
	            root directory. In such a case you should return
	            a WBDISK type icon instead of a WBDRAWER icon.

	        iim_FIB
	            An initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">FileInfoBlock</ulink>
                 structure; prior
	            to passing iim_FIB to you, Examine(iim_FileLock,iim_FIB)
	            was called. Unlike the other members of this data
	            structure, you may modify the contents of iim_FIB.

	        iim_FileHandle
	            If the object to return an icon for is a file,
	            this member will contain a file handle that can
	            be used to 
                <link linkend="n136">Read()</link>
                 its contents. The file read
	            position will be set to the beginning of
	            the file. Note that this member can be NULL.

	        iim_Tags
	            A copy of the tag item list passed to GetIconTagList();
	            if you are going to call 
                <link linkend="n798">GetIconTagList()</link>
                 in your
	            hook, be sure to include this list as part of the
	            tag list you pass to it.

	            NOTE: This list does not include the tag
	                  ICONA_FailIfUnavailable. Keep in mind that
	                  the use of this tag can trigger a recursion
	                  if the icon you tried to retrieve via
	                  
                <link linkend="n798">GetIconTagList()</link>
                 does not exist: your hook
	                  code will be invoked again.

	    With the exception of iim_FIB, all members of the
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">IconIdentifyMsg</ulink>
                 are read-only; you may pass them to
	    functions like 
                <link linkend="n136">Read()</link>
                , 
                <link linkend="n68">Examine()</link>
                , etc. but you
	    may not 
                <link linkend="n49">Close()</link>
                 files, 
                <link linkend="n176">UnLock()</link>
                 locks or perform
	    other functions that may result in the data structures
	    getting deallocated or trashed.

	    When you manage to find the right icon type for the object
	    to be examined, you should return a pointer to a
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 that can be freed using 
                <link linkend="n792">FreeDiskObject()</link>
                	    lateron. Note that you cannot just return a pointer to a
	    statically initialized data structure in your code, you
	    must return a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 allocated by icon.library
	    itself, such as through 
                <link linkend="n798">GetIconTagList()</link>
                , 
                <link linkend="n790">DupDiskObjectA()</link>
                	    or 
                <link linkend="n802">NewDiskObject()</link>
                .

	    The icon you return will be checked to make sure that its
	    type matches the corresponding object. For example, returning
	    a WBDRAWER icon for a volume root directory will cause that
	    icon to be released and to be ignored.

	ICONCTRLA_GetGlobalIdentifyHook (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 **) -- Get the
	    hook that is invoked when trying to find an icon
	    for a file/drawer/volume that does not have an
	    icon associated with it.

	ICONCTRLA_SetGlobalMaxNameLength (LONG) -- icon.library has
	    a built-in file name length limit that affects whether
	    icon files are read and written. Currently, the default
	    for this value is 25 characters. This is sufficient for
	    an icon file name acceptable with the ROM filing system.
	    This limit has two effects: if an icon file is to be
	    written whose name would be longer than the limit,
	    icon.library will silently abort the write attempt and
	    pretend that the icon file has been written; this is done
	    in order to avoid overwriting the original data file with
	    the icon file. If an icon file was read that turns out to
	    contain invalid icon data, another test is done in order to
	    find out whether the file name was longer than the limit. If
	    this is the case, it is assumed that the data was read from
	    the original file rather than from the icon file. The library
	    then pretends that the icon file was not found.

	    This tag can be used to set this length limit. The limit
	    must be in the range [8..255].

	ICONCTRLA_GetGlobalMaxNameLength (LONG *) -- Retrieve the
	    file name length limit used by icon.library.

	ICONCTRLA_SetGlobalNewIconsSupport (BOOL) -- Select whether
	    icon.libray should read and return coloured icon images stored
	    in NewIcons format.
	    This option defaults to TRUE.

	ICONCTRLA_GetGlobalNewIconsSupport (LONG *) -- Query whether
	    icon.library will read and return coloured icon images
	    stored in NewIcons format.

	ICONCTRLA_SetGlobalColorIconSupport (BOOL) -- Select whether
	    icon.libray should read and return coloured icon images.
	    This option defaults to TRUE.

	ICONCTRLA_GetGlobalColorIconSupport (LONG *) -- Query whether
	    icon.library will read and return coloured icon images.

	ICONA_ErrorCode (LONG *) -- Pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 word variable to
	    store error codes in. Note that this variable will be
	    initialized regardless of whether an error occured or not.
	    Thus, you can check for an error condition by comparing the
	    variable contents against 0; 0 indicates success, all other
	    values are error codes as defined by dos.library.

	ICONA_ErrorTagItem (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 **) -- When an error occurs
	    whilst processing the tag item list passed to IconControl(),
	    you can have a pointer to the item that caused the error
	    passed back via the ICONA_ErrorTagItem tag. Note that for
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 lists allocated from the stack the address passed
	    back to you may no longer be valid when control returns from
	    IconControl().

	The following tags need a valid icon parameter to operate on.
	If the parameter is missing or invalid, it will be registered
	as an error.

	ICONCTRLA_GetImageMask1 (PLANEPTR *) -- Pointer to the mask plane
	    for the regular icon image (icon-&gt;do_Gadget.GadgetRender).
	    Note that this may be NULL.

	ICONCTRLA_GetImageMask2 (PLANEPTR *) -- Pointer to the mask plane
	    for the alternate icon image (icon-&gt;do_Gadget.SelectRender).
	    Note that this may be NULL.

	ICONCTRLA_SetTransparentColor1 (LONG) -- Set the transparent
	    colour for a palette mapped icon image, in this case the
	    regular icon image (icon-&gt;do_Gadget.GadgetRender). The
	    colour must be among the valid palette entries, e.g. for
	    a 16 colour image, the transparent colour may not be
	    larger than 15. To make the icon image opaque, set its
	    transparent colour to -1.

	ICONCTRLA_GetTransparentColor1 (LONG *) -- Get the transparent
	    colour for a palette mapped icon image, in this case the
	    regular icon image (icon-&gt;do_Gadget.GadgetRender). If
	    the image is opaque, its "transparent colour" will be
	    returned as -1. Note that this data is valid only for
	    palette mapped icons; for other types, you may not
	    receive any meaningful result.

	ICONCTRLA_SetTransparentColor2 (LONG) -- Set the transparent
	    colour for a palette mapped icon image, in this case the
	    alternate icon image (icon-&gt;do_Gadget.SelectRender). The
	    colour must be among the valid palette entries, e.g. for
	    a 16 colour image, the transparent colour may not be
	    larger than 15. To make the icon image opaque, set its
	    transparent colour to -1. Please note that you can set
	    the alternate image transparent colour only if there is
	    an alternate image.

	ICONCTRLA_GetTransparentColor2 (LONG *) -- Get the transparent
	    colour for a palette mapped icon image, in this case the
	    alternate icon image (icon-&gt;do_Gadget.SelectRender). If
	    the image is opaque, its "transparent colour" will be
	    returned as -1. Note that this data is valid only for
	    palette mapped icons; for other types, you may not
	    receive any meaningful result. Likewise, if there is
	    no alternate image, no information may be available.

	ICONCTRLA_SetPalette1 (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/datatypes/pictureclass.h">ColorRegister</ulink>
                 *) -- Set the colour
	    palette for a palette mapped icon image, in this case the
	    regular icon image (icon-&gt;do_Gadget.GadgetRender).

	ICONCTRLA_GetPalette1 (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/datatypes/pictureclass.h">ColorRegister</ulink>
                 **) -- Get the colour
	    palette for a palette mapped icon image, in this case the
	    regular icon image (icon-&gt;do_Gadget.GadgetRender). Note
	    that this data is valid only for palette mapped icons; for
	    other types, you may not receive any meaningful result.
	    Note that the number of palette entries in this table
	    matches the number of colours in use when the icon
	    was first created.

	ICONCTRLA_SetPalette2 (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/datatypes/pictureclass.h">ColorRegister</ulink>
                 *) -- Set the colour
	    palette for a palette mapped icon image, in this case the
	    alternate icon image (icon-&gt;do_Gadget.SelectRender).

	ICONCTRLA_GetPalette2 (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/datatypes/pictureclass.h">ColorRegister</ulink>
                 **) -- Get the colour
	    palette for a palette mapped icon image, in this case the
	    alternate icon image (icon-&gt;do_Gadget.SelectRender). Note
	    that this data is valid only for palette mapped icons; for
	    other types, you may not receive any meaningful result.
	    If there is no alternate image, no information may be
	    available.
	    Note that the number of palette entries in this table
	    matches the number of colours in use when the icon
	    was first created.

	ICONCTRLA_SetPaletteSize1 (ULONG) -- Set the size of the colour
	    palette to be used for a palette mapped icon image, in
	    this case the regular icon image (icon-&gt;do_Gadget.GadgetRender).
	    This value must be in the range [1..256].

	ICONCTRLA_GetPaletteSize1 (ULONG *) -- Get the size of the colour
	    palette to be used for a palette mapped icon image, in
	    this case the regular icon image (icon-&gt;do_Gadget.GadgetRender).
	    Note that this data is valid only for palette mapped icons; for
	    other types, you may not receive any meaningful result.

	ICONCTRLA_SetPaletteSize2 (ULONG) -- Set the size of the colour
	    palette to be used for a palette mapped icon image, in
	    this case the alternate icon image (icon-&gt;do_Gadget.SelectRender).
	    This value must be in the range [1..256].

	ICONCTRLA_GetPaletteSize2 (ULONG *) -- Get the size of the colour
	    palette to be used for a palette mapped icon image, in
	    this case the alternate icon image (icon-&gt;do_Gadget.SelectRender).
	    Note that this data is valid only for palette mapped icons; for
	    other types, you may not receive any meaningful result.
	    If there is no alternate image, no information may be
	    available.

	ICONCTRLA_SetImageData1 (UBYTE *) -- Set the image data to be used for
	    a palette mapped icon image, in this case the regular icon
	    image (icon-&gt;do_Gadget.GadgetRender). There must be exactly
	    as many bytes of image data as the image width multiplied
	    by its height requires.

	    To drop the palette mapped image data associated with an icon,
	    use "ICONCTRLA_SetImageData1,NULL,".

	ICONCTRLA_GetImageData1 (UBYTE **) -- Get the image data to be used for
	    a palette mapped icon image, in this case the regular icon
	    image (icon-&gt;do_Gadget.GadgetRender). Note that this data is
	    valid only for palette mapped icons; for other types, you may
	    not receive any meaningful result.

	ICONCTRLA_SetImageData2 (UBYTE *) -- Set the image data to be used for
	    a palette mapped icon image, in this case the alternate icon
	    image (icon-&gt;do_Gadget.SelectRender). There must be exactly
	    as many bytes of image data as the image width multiplied
	    by its height requires.

	    To drop the palette mapped image data associated with the alternate
	    image of an icon, use "ICONCTRLA_SetImageData2,NULL,".

	ICONCTRLA_GetImageData2 (UBYTE **) -- Get the image data to be used for
	    a palette mapped icon image, in this case the alternate icon
	    image (icon-&gt;do_Gadget.SelectRender). Note that this data is
	    valid only for palette mapped icons; for other types, you may
	    not receive any meaningful result. If there is no alternate
	    image, no information may be available.

	ICONCTRLA_SetFrameless (BOOL) -- Select whether the icon should be
	    drawn without a frame. This option defaults to FALSE.

	ICONCTRLA_GetFrameless (LONG *) -- Query whether the icon should be
	    drawn without a frame.

	ICONCTRLA_SetNewIconsSupport (BOOL) -- Select whether palette mapped
	    icon images that were originally stored in NewIcons format
	    should be written back in the same format. This option
	    defaults to TRUE.

	ICONCTRLA_GetNewIconsSupport (LONG *) -- Query whether palette mapped
	    icon images that were originally stored in NewIcons format
	    should be written back in the same format.

	ICONCTRLA_SetAspectRatio (UBYTE) -- Set the icon aspect ratio; this
	    consists of a numerator and a denominator packed into a
	    single byte (the PACK_ICON_ASPECT_RATIO() macro can be used
	    for encoding this parameter). If the icon aspect ratio is
	    unknown, ICON_ASPECT_RATIO_UNKNOWN should be used.

	ICONCTRLA_GetAspectRatio (UBYTE *) -- Get the icon aspect ratio; this
	    consists of a numerator and a denominator packed into a
	    single byte (the UNPACK_ICON_ASPECT_RATIO() macro can be used
	    for decoding this value). If the icon aspect ratio is unknown,
	    ICON_ASPECT_RATIO_UNKNOWN will be returned.

	ICONCTRLA_SetWidth (ULONG) -- Select the palette mapped icon image
	    width. This value must be in the range [1..256].

	ICONCTRLA_GetWidth (ULONG *) -- Query the palette mapped icon image
	    width. Note that this data is valid only for palette mapped icons;
	    for other types, you may not receive any meaningful result.

	ICONCTRLA_SetHeight (ULONG) -- Select the palette mapped icon image
	    height. This value must be in the range [1..256].

	ICONCTRLA_GetHeight (ULONG *) -- Query the palette mapped icon image
	    height. Note that this data is valid only for palette mapped icons;
	    for other types, you may not receive any meaningful result.

	ICONCTRLA_IsPaletteMapped (LONG *) -- Query whether the icon is using
	    palette mapped icon images.

	ICONCTRLA_IsNewIcon (LONG *) -- Query whether the icon is of the
	    NewIcon type.

	ICONCTRLA_IsNativeIcon (LONG *) -- There is an important difference
	    between struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 icons allocated by icon.library itself
	    (these are the so-called "native" icons) and statically initialized
	    icons which consist solely of a simple struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 which may
	    be part of a program's static data area. For example, you can
	    attach a palette mapped icon image to a "native" icon, which is
	    something you cannot do with a statically allocated icon. To help
	    you tell the two types apart, you can use the ICONCTRLA_IsNativeIcon
	    query tag.

	ICONGETA_IsDefaultIcon (LONG *) -- Query whether this icon is associated
	    with a file/drawer/volume or is a "fake" icon that was constructed
	    for an object that has no icon associated with it.

	ICONCTRLA_GetScreen (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 **) -- Get the screen this icon
	    has been remapped to and whose colour map it uses. Note that this
	    data is valid only for palette mapped icons; for other types, you
	    may not receive any meaningful result.

	    This tag may return NULL if the icon is not currently associated
	    with a screen.

	ICONCTRLA_HasRealImage2 (LONG *) -- icon.library may generate an
	    alternate image for palette mapped icons if there is no image
	    data stored for this image. To find out whether an icon
	    was generated or is part of the original icon image, use the
	    ICONCTRLA_HasRealImage2 tag.

   RESULT
	processed -- Number of tags that were processed correctly, i.e.
	    the number of tags whose parameters are in order, for which
	    information could be returned, etc. If processing stops because of
	    an error, the number returned by this function will be smaller
	    than the number of tag items passed in. The same happens if
	    the information you wanted to obtain is unavailable. In any
	    case, check the error code this routine can set up for you.

   EXAMPLE
	/* Check if the icon is palette mapped. */
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 isPaletteMapped;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 errorCode;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon;

	if(IconControl(icon,
	    ICONCTRLA_IsPaletteMapped,&amp;isPaletteMapped,
	    ICONA_ErrorCode,&amp;errorCode,
	TAG_DONE) == 1)
	{
	    Printf("the icon %s palette mapped\n",
	        isPaletteMapped ? "is" : "is not");
	}
	else
	{
	    Printf("could not query icon information;\n");
	    PrintFault(errorCode,NULL);
	}

	/* Set the icon colour remapping precision. */
	IconControl(NULL,
	    ICONCTRLA_SetGlobalPrecision,PRECISION_EXACT,
	TAG_DONE);

	/* Query the embossing rectangle dimensions and
	 * the identification hook.
	 */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/gfx.h">Rectangle</ulink>
                 rect;
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook;

	if(IconControl(NULL,
	    ICONCTRLA_GetGlobalEmbossRect,&amp;rect,
	    ICONCTRLA_GetGlobalIdentifyHook,&amp;hook,
	TAG_DONE) == 2)
	{
	    Printf("embossing rect: %ld,%ld,%ld,%ld\n",
	        rect.MinX,rect.MaxX,rect.MinY,rect.MaxY);
	    Printf("identification hook: 0x%08lx\n",
	        hook);
	}

   NOTES
	Changing an icon's palette or image data does not automatically
	produce a different icon image you can use. To do this, you
	must re-layout it using LayoutIcon().

	When querying parameters, make sure to always pass in a pointer
	to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 word variable to store the result in.

	Some get/set operations may cause additional memory to be
	allocated. This may fail; be prepared.

	IconControl() processes the tag item list in sequential order.
	This has consequences for several tags, such as the palette size
	and the transparent colour. For example, if you want to make
	colour #14 of an icon image transparent, make sure to have the
	palette size set to at least 15 colours before you try to change
	the transparent colour. Otherwise, IconControl() may refuse to
	set the transparent colour to #14 since it won't know that there
	should be more than 14 colours in that image at the time you try
	to set it. Therefore, if you wanted to change the palette size and
	the transparent colour in the same tag item list, make sure that the
	palette size change tag appears before the transparent colour change
	tag.

	As described above, some of the operations on icons are not
	supported for DiskObjects not allocated through icon.library. In
	such cases you will receive an error code ERROR_ACTION_NOT_KNOWN.

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n790">icon.library/DupDiskObjectA</link>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	icon.library/LayoutIcon
	
                <link linkend="n802">icon.library/NewDiskObject</link>
                	
                <link linkend="n605">graphics.library/BltMaskBitMapRastPort</link>
                	
                <link linkend="n686">graphics.library/ObtainBestPenA</link>
                	
                <link linkend="n449">utility.library/CallHookPkt</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">workbench/icon.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                
            </literallayout>
        </section>
        <section id="n800">
            <title>icon.library/LayoutIconA</title>
            <literallayout class="monospaced">
                   NAME
	LayoutIconA -- Adapt a palette-mapped icon for display (V44)

   SYNOPSIS
	success = LayoutIconA(icon,screen,tags);
	D0                    A0   A1     A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 LayoutIconA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *screen,
	                 struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	success = LayoutIcon(icon,screen,...);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 LayoutIcon(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *screen,...);

   FUNCTION
	This function will prepare an icon for display, either on a
	specific screen or using a default colour palette. It is
	useful only for palette mapped icons.

   INPUTS
	icon -- The icon to be remapped. This must be a palette mapped
	    icon.
	screen -- Pointer to a screen to remap the icon for or NULL
	    to remap the icon to use the system default colour palette
	    or something very similar to it (this means: four colours
	    only).
	tags -- Additional rendering options.

   TAGS
	OBP_Precision (LONG) -- Pen colour allocation precision.
	    Default is the same precision as set in the global
	    icon.library settings (see 
                <link linkend="n799">IconControlA()</link>
                ).

   OUTPUTS
	success -- TRUE if the icon could be remapped, FALSE if
	    the remapping failed for some reason. In case of
	    of failure, icon.library will try its best to keep
	    the icon in a presentable state, but this may fail.
	    In case of failure, the error code can be retrieved
	    using 
                <link linkend="n106">dos.library/IoErr</link>
                .

   NOTES
	You must make sure that the screen you remap to does not
	go away while there is an icon to use its colours. For
	a public screen, the easiest way to guarantee this is
	to keep it locked (see intuition.library/LockPubScreen).
	For custom screens, just don't close them! If you have to close
	the screen or need to keep your icon around until after a screen
	is closed, you should call LayoutIcon() with a NULL screen
	parameter. This will release all pens the icon has allocated
	and remap the icon to a default set of colours. Alternatively,
	you can dispose of the icon via 
                <link linkend="n792">FreeDiskObject()</link>
                 which
	will also release all pens the icon has allocated, including
	the icon itself, of course.

	Icons remapped to the global default screen (normally, that
	would be the Workbench screen) may get changed and remapped
	again during Workbench close/open transitions. To prevent
	this from taking place, just make sure that the Workbench
	screen does not close (e.g. via LockPubScreen("Workbench")).

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n686">graphics.library/ObtainBestPenA</link>
                	
                <link linkend="n700">graphics.library/ReleasePen</link>
                	
                <link linkend="n792">icon.library/FreeDiskObject</link>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	icon.library/IconControl
	
                <link linkend="n371">intuition.library/LockPubScreen</link>
                	
                <link linkend="n432">intuition.library/UnlockPubScreen</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/view.h">graphics/view.h</ulink>
                
            </literallayout>
        </section>
        <section id="n801">
            <title>icon.library/MatchToolValue</title>
            <literallayout class="monospaced">
                   NAME
	MatchToolValue - check a tool type variable for a particular value.

   SYNOPSIS
	result = MatchToolValue(typeString, value)
	  D0                        A0        A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 MatchToolValue(STRPTR, STRPTR);

   FUNCTION
	MatchToolValue is useful for parsing a tool type value for
	a known value.  It knows how to parse the syntax for a tool
	type value (in particular, it knows that '|' separates
	alternate values).  Note that the parsing is case insensitive.

   INPUTS
	typeString -- a ToolType value (as returned by FindToolType)
	value -- you are interested if value appears in typeString

   RESULTS
	result -- TRUE if the value was in typeString else FALSE.

   EXAMPLE
	Assume there are two type strings:
	    type1 = "text"
	    type2 = "a|b|c"

	MatchToolValue( type1, "text" ) returns TRUE
	MatchToolValue( type1, "TEXT" ) returns TRUE
	MatchToolValue( type1, "data" ) returns FALSE
	MatchToolValue( type2, "a" )    returns TRUE
	MatchToolValue( type2, "b" )    returns TRUE
	MatchToolValue( type2, "d" )    returns FALSE
	MatchToolValue( type2, "a|b" )  returns FALSE

   NOTES
	icon.library V44 skips blank spaces surrounding the typeString
	options and the value string. Older icon.library versions did
	not support this.

   SEE ALSO
	
                <link linkend="n791">icon.library/FindToolType</link>
                	
                <link linkend="n472">utility.library/Stricmp</link>
                
            </literallayout>
        </section>
        <section id="n802">
            <title>icon.library/NewDiskObject</title>
            <literallayout class="monospaced">
                   NAME
	NewDiskObject -- Create an empty icon (V44)

   SYNOPSIS
	icon = NewDiskObject(type)
	D0                   D0

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 * NewDiskObject(LONG type);

   FUNCTION
	This function is used to create an "empty" 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                	structure, which has no image data associated with it.
	Still, all the necessary structures are in place,
	you just have to fill them in.

   INPUTS
	type -- Icon type to create, this must be one of WBDISK,
	    WBDRAWER, WBTOOL, WBPROJECT, WBGARBAGE, WBDEVICE or WBKICK.

   RESULT
	icon -- Pointer to a struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 or NULL in case of error.
	    You can use 
                <link linkend="n106">IoErr()</link>
                 to retrieve the error code.

   NOTES
	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 returned by this function will have a zero
	width and height 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 in the do_Gadget.GadgetRender member
	and the do_Gadget.Width/do_Gadget.Height members will both
	be 0, too.

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">workbench/icon.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                
            </literallayout>
        </section>
        <section id="n803">
            <title>icon.library/PutDefDiskObject</title>
            <literallayout class="monospaced">
                   NAME
	PutDefDiskObject - write disk object as the default for its type.  (V36)

   SYNOPSIS
	status = PutDefDiskObject(diskobj)
	  D0                        A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 PutDefDiskObject(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *);

   FUNCTION
	This routine writes out a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 structure, and its
	associated information.  If the call fails, FALSE will
	be returned.  The reason for the failure may be obtained
	via 
                <link linkend="n106">IoErr()</link>
                .

	Note that this function calls 
                <link linkend="n804">PutDiskObject()</link>
                 internally which means
	that this call (if sucessful) notifies workbench than an icon has
	been created/modified.

	Using this routine protects you from any future changes to
	the way default icons are stored within the system.

   INPUTS
	diskobj -- a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                   RESULTS
	status -- TRUE if the call succeeded else FALSE

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n794">icon.library/GetDefDiskObject</link>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	
                <link linkend="n804">icon.library/PutDiskObject</link>
                
            </literallayout>
        </section>
        <section id="n804">
            <title>icon.library/PutDiskObject</title>
            <literallayout class="monospaced">
                   NAME
	PutDiskObject - write out a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 to disk.

   SYNOPSIS
	status = PutDiskObject(name, diskobj)
	 D0                    A0      A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 PutDiskObject(STRPTR, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *);

   FUNCTION
	This routine writes out a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 structure, and its
	associated information.  The file name of the info
	file will be the name parameter with ".info" postpended
	to it.  If the call fails, FALSE will be returned.  The
	reason for the failure may be obtained via 
                <link linkend="n106">IoErr()</link>
                .

	As of release V2.0, PutDiskObject() (if successful) notifies Workbench
	when an icon has been created/modified.

	Using this routine protects you from any future changes to
	the way icons are stored within the system.

   INPUTS
	name -- name of the object (pointer to a character string)
	diskobj -- a pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                   RESULTS
	status -- TRUE if the call succeeded else FALSE

   NOTES
	It is recommended that if you wish to copy an icon from one place
	to another than you use 
                <link linkend="n795">GetDiskObject()</link>
                 and PutDiskObject()
	and do not copy them directly.

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n788">icon.library/DeleteDiskObject</link>
                	
                <link linkend="n792">icon.library/FreeDiskObject</link>
                	
                <link linkend="n795">icon.library/GetDiskObject</link>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	
                <link linkend="n805">icon.library/PutIconTagList</link>
                
            </literallayout>
        </section>
        <section id="n805">
            <title>icon.library/PutIconTagList</title>
            <literallayout class="monospaced">
                   NAME
	PutIconTagList -- Store an icon (V44)

   SYNOPSIS
	success = PutIconTagList(name,icon,tags);
	D0                       A0   A1   A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 PutIconTagList(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,
	                    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	success = PutIconTags(name,icon,tag1,...);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 PutIconTags(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon,
                        
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">Tag</ulink>
                 tag1,...);

   FUNCTION
	This function is used to store an icon; the icon can
	belong to a file/drawer/volume or it can be a default icon.

   INPUTS
	name -- Name of the object the icon is to be stored for,
	    or NULL if a default icon is to be stored.
	icon -- The icon to be stored.
	tags -- Storage options.

   TAGS
	ICONPUTA_NotifyWorkbench (BOOL) -- Set this to TRUE to notify
	    Workbench of the fact that an icon was changed.

	    This tag defaults to FALSE.

	ICONPUTA_PutDefaultType (LONG) -- Type of the default icon
	    this icon is to replace; must be one of WBDISK, WBDRAWER,
	    WBTOOL, WBPROJECT, WBGARBAGE, WBDEVICE or WBKICK.

	    If this tag is used, the "name" parameter will be ignored.

	ICONPUTA_PutDefaultName (STRPTR) -- Name of the default object
	    type this icon is to be stored as.

	    If this tag is used, the "name" parameter will be ignored.

	ICONPUTA_DropPlanarIconImage (BOOL) -- If you decide that the
	    palette mapped icon imagery is sufficient to represent
	    an icon, you can tell icon.library not to store the original,
	    planar icon image data with the icon file. To do this,
	    set this tag to TRUE. Instead of the planar icon images,
	    a single default image will be stored. This can result
	    in space savings but may not look too pretty.

	    This tag defaults to FALSE.

	ICONPUTA_DropChunkyIconImage (BOOL) -- This tag can be used to
	    keep the chunky icon image data from getting written
	    to disk.

	    This tag defaults to FALSE.

	ICONPUTA_DropNewIconToolTypes (BOOL) -- This tag controls whether
	    any NewIcon tool types will be omitted when writing the
	    icon to disk. TRUE will omit the data.

	    This tag defaults to FALSE.

	ICONPUTA_OptimizeImageSpace (BOOL) -- A palette mapped icon
	    image might not use the entire icon palette. By default,
	    icon.library does not bother about this, it expects the
	    creator of the icon to choose its palette efficiently.
	    But just in case, you can tell icon.library to attempt
	    to identify how many colours are really in use and to
	    optimize its image compressor for them. This may take
	    extra time and is not recommended for daily use.

	    This tag defaults to FALSE.

	ICONPUTA_OnlyUpdatePosition (BOOL) -- This tag can be used to
	    reduce the overhead in updating icon information on disk
	    if the only information changed is the icon position.
	    For this case, you can set this tag to TRUE. The icon
	    to be modified will have only its do_CurrentX/do_CurrentY
	    member values changed, the remainer will stay unmodified.
	    Please note that this tag only takes effect if the
	    ICONPUTA_PutDefaultType and ICONPUTA_PutDefaultName tags
	    are omitted.

	    This tag defaults to FALSE.

	ICONPUTA_PreserveOldIconImages (BOOL) -- Before writing a
	    palette mapped icon back to disk, icon.library will make
	    sure that the original planar image data is stored in the
	    file. If you don't want that to happen, set this option to
	    FALSE. This tag will allow you to change the planar icon
	    image data written back to disk.

	    This tag defaults to TRUE.

	ICONA_ErrorCode (LONG *) -- Pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 word variable to
	    store error codes in. Note that this variable will be
	    initialized regardless of whether an error occured or not.
	    Thus, you can check for an error condition by comparing the
	    variable contents against 0; 0 indicates success, all other
	    values are error codes as defined by dos.library.

   RESULT
	success -- TRUE if the icon file could be stored, FALSE otherwise.
	    You can use 
                <link linkend="n106">IoErr()</link>
                 to retrieve the error code or use the
	    ICONA_ErrorCode tag instead.

   EXAMPLE
	/* Store an icon as the default "picture" icon. */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *icon;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 errorCode;
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 success;

	success = PutIconTags(NULL,icon,
	    ICONPUTA_PutDefaultName,"picture",
	    ICONA_ErrorCode,&amp;errorCode,
	TAG_DONE);

	if(success == FALSE)
	{
	    Printf("could not store default picture icon;\n");
	    PrintFault(errorCode,NULL);
	}

   NOTES
	This function is a superset of 
                <link linkend="n803">PutDefDiskObject()</link>
                 and 
                <link linkend="n804">PutDiskObject()</link>
                .

	If the name of the icon file to be stored would be too long to fit
	(as set with IconControl(..., ICONCTRLA_SetGlobalMaxNameLength, ...))
	then PutIconTagList() will silently pretend that the icon file has
	been written to disk. However, it will not store the icon file on the
	disk since there would a risk of accidentally overwriting the file the
	icon belongs to. If you want to know whether the icon you wrote was
	in fact written to disk, provide an error code pointer with the
	ICONA_ErrorCode tag. If the name of the file was too long,
	PutIconTagList() will still pretend that the icon file was written
	successfully, but the error code ERROR_TOO_MANY_LEVELS will be stored
	in the variable you passed in with the ICONA_ErrorCode tag.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/icon.h">workbench/icon.h</ulink>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">workbench/workbench.h</ulink>
                	
                <link linkend="n798">icon.library/GetIconTagList</link>
                	
                <link linkend="n803">icon.library/PutDefDiskObject</link>
                	
                <link linkend="n804">icon.library/PutDiskObject</link>
                
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>commodities</title>
        <section id="n806">
            <title>commodities.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n807"> ActivateCxObj() </link>
                    
                <link linkend="n808"> AddIEvents() </link>
                    
                <link linkend="n809"> AttachCxObj() </link>
                    
                <link linkend="n810"> ClearCxObjError() </link>
                    
                <link linkend="n811"> CreateCxObj() </link>
                    
                <link linkend="n812"> CxBroker() </link>
                    
                <link linkend="n813"> CxMsgData() </link>
                    
                <link linkend="n814"> CxMsgID() </link>
                    
                <link linkend="n815"> CxMsgType() </link>
                    
                <link linkend="n816"> CxObjError() </link>
                    
                <link linkend="n817"> CxObjType() </link>
                    
                <link linkend="n818"> DeleteCxObj() </link>
                    
                <link linkend="n819"> DeleteCxObjAll() </link>
                    
                <link linkend="n820"> DisposeCxMsg() </link>
                    
                <link linkend="n821"> DivertCxMsg() </link>
                    
                <link linkend="n822"> EnqueueCxObj() </link>
                    
                <link linkend="n823"> InsertCxObj() </link>
                    
                <link linkend="n824"> InvertKeyMap() </link>
                    
                <link linkend="n825"> MatchIX() </link>
                    
                <link linkend="n826"> ParseIX() </link>
                    
                <link linkend="n827"> RemoveCxObj() </link>
                    
                <link linkend="n828"> RouteCxMsg() </link>
                    
                <link linkend="n829"> SetCxObjPri() </link>
                    
                <link linkend="n830"> SetFilter() </link>
                    
                <link linkend="n831"> SetFilterIX() </link>
                    
                <link linkend="n832"> SetTranslate() </link>
            </literallayout>
        </section>
        <section id="n807">
            <title>commodities.library/ActivateCxObj</title>
            <literallayout class="monospaced">
                   NAME
	ActivateCxObj -- change the activation state of a commodity object.
			 (V36)

   SYNOPSIS
	previous = ActivateCxObj(co,true);
	D0			 A0 D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ActivateCxObj(CxObj *,LONG);

   FUNCTION
	Commodity objects of all types maintain an activation state.
	If an object is "active", then it performs its particular action
	whenever a commodity message arrives. If the object is "inactive"
	no action is taken, and the message goes on to its next destination.

	All objects are created in the "active" state except brokers
	which are created "inactive". Thus, after you create your
	broker and hang a tree of objects off of it, you must remember
	to use this function to activate it. This causes it to divert all
	messages to your tree of objects.

	This function activates 'co' if 'true' is different than 0. and
	deactivates it otherwise. The previous activation state is
	returned.

   INPUTS
	co - the commodity object to affect (may be NULL)
	true - 0 to deactivate the object, anything else to activate it

   RESULTS
	previous - the previous activation state: 0 if the object was
		   inactive or if 'co' was NULL, anything else if the object
		   was active

   SEE ALSO
	
                <link linkend="n812">CxBroker()</link>
                
            </literallayout>
        </section>
        <section id="n808">
            <title>commodities.library/AddIEvents</title>
            <literallayout class="monospaced">
                   NAME
	AddIEvents -- add input events to commodities' input stream. (V36)

   SYNOPSIS
	AddIEvents(events)
		   A0

	VOID AddIEvents(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 *);

   FUNCTION
	This function adds a null-terminated linked list of input events to
	the input stream processed by commodities. It is a touch easier than
	using the input device directly.

	The contents of the input events are copied into commodity messages,
	so they may be disposed of as soon as this call returns.

	The messages are initially routed to the first broker in
	commodities' object list.

   INPUTS
	events - the list of input events to add (may be NULL)

   WARNING
	The 
                <link linkend="n521">cx_lib/InvertString()</link>
                 function creates lists of input events that
	are in reverse order. Thus, passing the result of 
                <link linkend="n521">InvertString()</link>
                	to this function will insert a series of input events that will
	generate a string that's a mirror image of the string passed to
	
                <link linkend="n521">InvertString()</link>
                 originally.

	The solution to the above is to either flip the string before
	passing it to 
                <link linkend="n521">InvertString()</link>
                , or flip the resulting list of input
	events.

   BUGS
	Prior to V40, this function did not copy the data pointed to by
	ie_EventAddress for any events of type IECLASS_NEWPOINTERPOS.

   SEE ALSO
	
                <link linkend="n517">cx_lib/FreeIEvents()</link>
                
            </literallayout>
        </section>
        <section id="n809">
            <title>commodities.library/AttachCxObj</title>
            <literallayout class="monospaced">
                   NAME
	AttachCxObj -- attach a commodity object to the end of an existing
		       list of objects. (V36)

   SYNOPSIS
	AttachCxObj(headObj,co);
		    A0      A1

	VOID AttachCxObj(CxObj *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *);

   FUNCTION
	Adds 'co' to the list of objects pointed to by 'headObj'. The
	new object is added at the end of the list.

   INPUTS
	headObj - pointer to a list of objects. If this value is NULL, then
		  the entire tree of objects pointed to by 'co' is deleted
		  and becomes invalid.
	co - the object to add to the list (may be NULL)

   RESULTS
	If 'co' is NULL, this function will record that fact in the
	internal accumulated error of 'headObj'. This error record
	can be retrieved using 
                <link linkend="n816">CxObjError()</link>
                 and cleared using
	
                <link linkend="n810">ClearCxObjError()</link>
                .

   BUGS
	Until V38, passing a NULL 'headObj' parameter would cause low-memory
	access and unpredictable results.

   SEE ALSO
	
                <link linkend="n816">CxObjError()</link>
                , 
                <link linkend="n810">ClearCxObjError()</link>
                
            </literallayout>
        </section>
        <section id="n810">
            <title>commodities.library/ClearCxObjError</title>
            <literallayout class="monospaced">
                   NAME
	ClearCxObjError -- clear the accumulated error value of a commodity
			   object. (V36)

   SYNOPSIS
	ClearCxObjError(co);
	      	        A0

	VOID ClearCxObjError(CxObj *);

   FUNCTION
	This function clears the accumulated error value of commodity object
	'co'.

	It is unwise to do this to a filter if COERR_BADFILTER is set.
	This will fool commodities into thinking the filter is OK. Set
	another valid filter, or leave the error value alone.

   INPUTS
	co - the object to affect (may be NULL)

   SEE ALSO
	
                <link linkend="n816">CxObjError()</link>
                
            </literallayout>
        </section>
        <section id="n811">
            <title>commodities.library/CreateCxObj</title>
            <literallayout class="monospaced">
                   NAME
	CreateCxObj -- create a new commodity object. (V36)

   SYNOPSIS
	co = CreateCxObj(type,arg1,arg2);
	D0		 D0   A0   A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *CreateCxObj(ULONG,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                ,LONG);

   FUNCTION
	This function creates a commodity object of type 'type'. It is not
	proper to call this function directly. Each object creation routine
	except 
                <link linkend="n812">CxBroker()</link>
                 is defined as a macro in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                	These are independently documented.

	All functions which operate on a commodity object are made with
	a reference to the thirty-two bit value returned by this function
	(or by 
                <link linkend="n812">CxBroker()</link>
                ).

   INPUTS
	type - the type of object to create as defined in
	       
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                	arg1 - first argument, meaning depends on 'type'
	arg2 - second argument, meaning depends on 'type'

   RESULTS
	co - a pointer to the new object or NULL if it could not be created.
	     A NULL return indicates typically a lack of system memory. Minor
	     problems in creating an object, such as providing a bad filter
	     description to 
                <link linkend="n502">cx_lib/CxFilter()</link>
                , typically don't cause failure,
	     but are recorded in an internal error field in the new object
	     which can be accessed via 
                <link linkend="n816">CxObjError()</link>
                .

   SEE ALSO
	
                <link linkend="n816">CxObjError()</link>
                , 
                <link linkend="n502">cx_lib/CxFilter()</link>
                , 
                <link linkend="n503">cx_lib/CxSender()</link>
                ,
	
                <link linkend="n504">cx_lib/CxSignal()</link>
                , 
                <link linkend="n505">cx_lib/CxTranslate()</link>
                , 
                <link linkend="n501">cx_lib/CxDebug()</link>
                ,
	
                <link linkend="n500">cx_lib/CxCustom()</link>
                , 
                <link linkend="n812">CxBroker()</link>
                
            </literallayout>
        </section>
        <section id="n812">
            <title>commodities.library/CxBroker</title>
            <literallayout class="monospaced">
                   NAME
	CxBroker -- create a commodity broker. (V36)

   SYNOPSIS
	broker = CxBroker(nb,error);
	D0		  A0 D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *CxBroker(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">NewBroker</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 *);

   FUNCTION
	This function creates a broker from the specification found in the
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">NewBroker</ulink>
                 structure pointed to by 'nb'. The purpose and meaning of the
	fields of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">NewBroker</ulink>
                 structure are described below. Also see
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                 for more info.

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">NewBroker</ulink>
                	{
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                            nb_Version;
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                          nb_Name;
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                          nb_Title;
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                          nb_Descr;
	    WORD            nb_Unique;
	    WORD	    nb_Flags;
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BYTE</ulink>
                            nb_Pri;
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *nb_Port;
	    WORD            nb_ReservedChannel;
	};

	nb_Version
	This is the way that future versions of commodities can identify
	which version of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">NewBroker</ulink>
                 structure you are using. This should be
	set to NB_VERSION as defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                	nb_Name
	This is the name of the broker. This name is used to find the broker
	in commodities' object list and is the name shown in the listview
	gadget of the Exchange program. The name string is copied in the
	broker object upon creation so it can be discarded right after
	CxBroker() returns. The maximum length of the name string is defined
	by a constant in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .

	nb_Title, nb_Descr
	These are two strings which appear to the user in the Exchange
	program and describe the application the broker is representing.
	Note that these strings are copied into the broker object so they
	can be discarded right after CxBroker() returns. The maximum length
	of these strings that will be recognized are defined by constants in
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .

	nb_Unique
	This field indicates what should happen if a broker of the same name
	(nb_Name) already exists in commodities' object list. Constants
	in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                 allow the caller to specify whether
	another broker is to be created, and whether any existing broker of
	the same name should be notified that an attempt at creating a
	duplicate has been made.

	nb_Pri
	This specifies with what priority the new broker is to be inserted
	within commodities' object list. Higher priority nodes appear
	earlier in a list. It is strongly recommended that the ToolTypes
	environment of an application be used to allow the end-user to set
	the priority of the broker.

   INPUTS
	nb - an initialized 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">NewBroker</ulink>
                 structure
	error - a pointer to a longword where to store a failure code (may be
		NULL)

   RESULTS
	broker - a pointer to the broker object or NULL upon failure. If the
		 'error' pointer is not NULL, a further diagnostic code is
		 placed at that address. Error codes are defined in
		 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                 and include:

			CBERR_OK
			No problems; broker created OK.

 			CBERR_SYSERR
			System problems, not your fault, sign of low memory.

			CBERR_DUP
			The nb_Unique field specified that only one broker of
			'nb_Name' should be allowed, and one already exists.

			CBERR_VERSION
			The version specified in 'nb_Version' is unknown to the
			library.

   SEE ALSO
	
                <link linkend="n829">SetCxObjPri()</link>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n813">
            <title>commodities.library/CxMsgData</title>
            <literallayout class="monospaced">
                   NAME
	CxMsgData -- obtain a pointer to a commodity message's data area. (V36)

   SYNOPSIS
	data = CxMsgData(cxm);
	D0		 A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 CxMsgData(struct CxMsg *);

   FUNCTION
	Most commodity messages contain meaningful data such as an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                	structure. This function returns a pointer to this data.

	You may get a commodity message from a synchronous (custom object) or
	asynchronous (sender object) source. In the second case, 'data' is
	not valid after you have replied to the message.

   INPUTS
	cxm - the commodity message to get the data pointer from (may be NULL)

   RESULTS
	data - a pointer to the message's data, or NULL if 'cxm' is NULL.
	       The meaning of the data varies depending on which kind of
	       object is being inspected.

   BUGS
	Until V38, passing a NULL 'cxm' parameter would cause low-memory
	access and unpredictable results.

	Until V40, whenever the data pointer is a (struct InputEvent), the
	ie_EventAddress field of these structures was not reliable whenever
	the message was generated by a sender object.

   SEE ALSO
	
                <link linkend="n503">cx_lib/CxSender()</link>
                , 
                <link linkend="n500">cx_lib/CxCustom()</link>
                
            </literallayout>
        </section>
        <section id="n814">
            <title>commodities.library/CxMsgID</title>
            <literallayout class="monospaced">
                   NAME
	CxMsgID -- obtain the ID of a commodity message. (V36)

   SYNOPSIS
	id = CxMsgID(cxm);
	D0	     A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 CxMsgID(struct CxMsg *);

   FUNCTION
	This function returns the value associated with the cause or source
	of the commodity message 'cxm'. Values are provided by the application
	when a sender or custom object is created.

   INPUTS
	cxm - the commodity message to inquire about (must NOT be NULL)

   RESULTS
	id - if not specified by the application, the ID value of a
	     commodity message will be 0. It is suggested that using
	     non-zero values in your program as a rule may identify some
	     possible errors.

   SEE ALSO
	
                <link linkend="n503">cx_lib/CxSender()</link>
                , 
                <link linkend="n500">cx_lib/CxCustom()</link>
                
            </literallayout>
        </section>
        <section id="n815">
            <title>commodities.library/CxMsgType</title>
            <literallayout class="monospaced">
                   NAME
	CxMsgType -- obtain the type of a commodity message. (V36)

   SYNOPSIS
	type = CxMsgType(cxm);
	D0		 A0

	ULONG CxMsgType(struct CxMsg *);

   FUNCTION
	This function returns the type of a commodity message. Possible values
	of 'type' are defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                . Most commodity
	messages are of type CXM_IEVENT.

   INPUTS
	cxm - the commodity message to inquire about (must NOT be NULL)

   RESULTS
   	type - the type of the commodity message, possible values are defined
	       in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n816">
            <title>commodities.library/CxObjError</title>
            <literallayout class="monospaced">
                   NAME
	CxObjError -- obtain a commodity object's accumulated error. (V36)

   SYNOPSIS
	error = CxObjError(co);
	D0		   A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 CxObjError(CxObj *);

   FUNCTION
	When a function acting on an object fails, it records the failure
	in the object. This function returns the accumulated error value.
	The values are represented by flag bits defined in
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                . Several errors may be recorded by multiple
	bits in 'error'.

	The currently defined errors are:

	COERR_ISNULL
	  The value of parameter 'co' was in fact NULL. This error
	  means "the problem with the object you inquire about is
	  that it failed to be created."

  	COERR_NULLATTACH
	  Using the commodities' list manipulation functions, an attempt was
	  made to add a NULL object to the list belonging to 'co'. This allows
	  a line of code as follows to exist in an error-tolerant program:

	    AttachCxObj(filter,CxSender(myport,MY_ID));

  	COERR_BADFILTER
	  The most recent filter specification for a filter object
	  was faulty. This happens if no sense can be made out of a
	  description string, or if an input expression (IX) has an
	  invalid format or version byte. When this bit is set in a
	  filter's error field, the filter will match nothing, but this
	  is not the proper way to "turn off" a filter, use 
                <link linkend="n807">ActivateCxObj()</link>
                .

  	COERR_BADTYPE
	  A type specific operation, such as 
                <link linkend="n831">SetFilterIX()</link>
                , was called
	  for object 'co', but 'co' isn't of the proper type.

   INPUTS
	co - the commodity object to get the accumulated error from (may be
	     NULL)

   RESULTS
	error - the accumulated error, or 0 if 'co' is NULL

   SEE ALSO
	
                <link linkend="n830">SetFilter()</link>
                , 
                <link linkend="n831">SetFilterIX()</link>
                , 
                <link linkend="n809">AttachCxObj()</link>
                , 
                <link linkend="n807">ActivateCxObj()</link>
                ,
	
                <link linkend="n810">ClearCxObjError()</link>
                
            </literallayout>
        </section>
        <section id="n817">
            <title>commodities.library/CxObjType</title>
            <literallayout class="monospaced">
                   NAME
	CxObjType -- obtain the type of a commodity object. (V36)

   SYNOPSIS
	type = CxObjType(co);
	D0		 A0

	ULONG CxObjType(CxObj *);

   FUNCTION
	This function should not really be necessary. It returns
	the type of a commodity object, which you should already
	know, since you created it in the first place.

   INPUTS
	co - the commodity object to inquire about (may be NULL)

   RESULTS
	type - the type of the commodity object, possible values are
	       defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                . Returns CX_INVALID
	       if 'co' is NULL.

   SEE ALSO
	
                <link linkend="n811">CreateCxObj()</link>
                
            </literallayout>
        </section>
        <section id="n818">
            <title>commodities.library/DeleteCxObj</title>
            <literallayout class="monospaced">
                   NAME
	DeleteCxObj -- delete a commmodity object. (V36)

   SYNOPSIS
	DeleteCxObj(co);
	            A0

	VOID DeleteCxObj(CxObj *);

   FUNCTION
	Deletes a commodity object of any type. If the object
	is linked into a list, it is first removed. Note that
	the handle 'co' is invalid after this function is called.

	Also note that deleting an object which has other objects attached
	to it may be undesirable. Use the function 
                <link linkend="n819">DeleteCxObjAll()</link>
                	to delete an entire sub-tree of objects.

   INPUTS
	co - the commodity object to delete (may be NULL)

   SEE ALSO
	
                <link linkend="n819">DeleteCxObjAll()</link>
                
            </literallayout>
        </section>
        <section id="n819">
            <title>commodities.library/DeleteCxObjAll</title>
            <literallayout class="monospaced">
                   NAME
	DeleteCxObjAll -- recursively delete a tree of commodity objects.
			  (V36)

   SYNOPSIS
	DeleteCxObjAll(co);
		       A0

	VOID DeleteCxObjAll(CxObj *);

   FUNCTION
	This function deletes the commodity object 'co', and
	recursively deletes all objects attached to it, and the
	objects attached to them, etc.

	If 'co' is linked into a list, it is first removed. Note
	that the handle 'co' is invalid after this function is called.

	This function is useful when an application exits: most
	applications can clean up completely by deleting the
	entire sub-tree of objects starting at their broker.

   INPUTS
	co - the first commodity object to delete (may be NULL)

   SEE ALSO
	
                <link linkend="n818">DeleteCxObj()</link>
                
            </literallayout>
        </section>
        <section id="n820">
            <title>commodities.library/DisposeCxMsg</title>
            <literallayout class="monospaced">
                   NAME
	DisposeCxMsg -- delete a commodity message. (V36)

   SYNOPSIS
	DisposeCxMsg(cxm);
		     A0

	VOID DisposeCxMsg(struct CxMsg *);

   FUNCTION
	This function eliminates the commodity message pointed to by 'cxm'.
	Can be used to 'swallow' input events by disposing of every commodity
	message of type CXM_IEVENT.

	This function can only be called from within a custom object running
	on the input handler's context. It cannot be called from code running
	on a commodities' context, such as when receiving a CXM_IEVENT message
	from a sender object. CxMsg sent to a commodity program from a sender
	object must be sent back using 
                <link linkend="n282">ReplyMsg()</link>
                .

   INPUTS
	cxm - the commodity message to delete (must NOT be NULL)

            </literallayout>
        </section>
        <section id="n821">
            <title>commodities.library/DivertCxMsg</title>
            <literallayout class="monospaced">
                   NAME
	DivertCxMsg -- send a commodity message down an object list. (V36)

   SYNOPSIS
	DivertCxMsg(cxm,headObj,returnObj);
		    A0  A1      A2

	VOID DivertCxMsg(struct CxMsg *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *);

   FUNCTION
	This function sends the commodity message 'cxm' down the list of
	objects attached to 'headObj'. The pointer 'returnObj' is first
	pushed onto the routing stack of 'cxm' so that when the end of the
	list of 'headObj' is reached the SUCCESSOR of 'returnObj' is the
	next destination.

	For example, when a filter finds a match with a message, the
	message is diverted down the filter's list like this:

	  DivertCxMsg(cxm,filter,filter);

   INPUTS
	cxm - the commodity message to divert (must NOT be NULL)
	headObj - the list of objects to divert the message to
	returnObj - the object to use as a place holder

   SEE ALSO
	
                <link linkend="n828">RouteCxMsg()</link>
                
            </literallayout>
        </section>
        <section id="n822">
            <title>commodities.library/EnqueueCxObj</title>
            <literallayout class="monospaced">
                   NAME
	EnqueueCxObj -- insert a commodity object within a list of objects
		        based on object priority. (V36)

   SYNOPSIS
	EnqueueCxObj(headObj,co);
		     A0      A1

	VOID EnqueueCxObj(CxObj *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *);

   FUNCTION
	This function puts object 'co' into the list of object 'headObj'.
	The insertion point is determined by the object's priority. The
	objects are kept in the list from the highest priority to the
	lowest. New nodes are inserted in front of the first node with a
	lower priority. Hence a FIFO queue for nodes of equal priority.

	The priority of the commodity object can be set using 
                <link linkend="n829">SetCxObjPri()</link>
                .

   INPUTS
	headObj - pointer to a list of objects. If this value is NULL, then
		  the entire tree of objects pointed to by 'co' is deleted
		  and becomes invalid.
	co - the object to add to the list (may be NULL)

   RESULTS
	If 'co' is NULL, this function will record that fact in the
	internal accumulated error of 'headObj'. This error record
	can be retrieved using 
                <link linkend="n816">CxObjError()</link>
                 and cleared using
	
                <link linkend="n810">ClearCxObjError()</link>
                .

   BUGS
	Until V38, passing a NULL 'headObj' parameter would cause low-memory
	access and unpredictable results.

   SEE ALSO
	
                <link linkend="n829">SetCxObjPri()</link>
                , 
                <link linkend="n816">CxObjError()</link>
                , 
                <link linkend="n810">ClearCxObjError()</link>
                
            </literallayout>
        </section>
        <section id="n823">
            <title>commodities.library/InsertCxObj</title>
            <literallayout class="monospaced">
                   NAME
	InsertCxObj -- insert a commodity object in a list after a given
		       object. (V36)

   SYNOPSIS
	InsertCxObj(headObj,co,pred);
		    A0      A1 A2

	VOID InsertCxObj(CxObj *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *);

   FUNCTION
	Adds 'co' to the list of objects pointed to by 'headObj' after
	object 'pred'.

   INPUTS
	headObj - pointer to a list of objects. If this value is NULL, then
		  the entire tree of objects pointed to by 'co' is deleted
		  and becomes invalid.
	co - the object to add to the list (may be NULL)
	pred - the object after which 'co' should be inserted. If this is NULL
	       then 'co' is added to the head of the list.

   RESULTS
	If 'co' is NULL, this function will record that fact in the
	internal accumulated error of 'headObj'. This error record
	can be retrieved using 
                <link linkend="n816">CxObjError()</link>
                 and cleared using
	
                <link linkend="n810">ClearCxObjError()</link>
                .

   BUGS
	Until V38, passing a NULL 'headObj' parameter would cause low-memory
	access and unpredictable results.

   SEE ALSO
	
                <link linkend="n816">CxObjError()</link>
                , 
                <link linkend="n810">ClearCxObjError()</link>
                
            </literallayout>
        </section>
        <section id="n824">
            <title>commodities.library/InvertKeyMap</title>
            <literallayout class="monospaced">
                   NAME
	InvertKeyMap -- generate an input event from an ANSI code. (V36)

   SYNOPSIS
	success = InvertKeyMap(ansiCode,event,km)
	D0	 	       D0       A0    A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 InvertKeyMap(ULONG,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">KeyMap</ulink>
                 *);

   FUNCTION
	This function uses the system call 
                <link linkend="n850">MapANSI()</link>
                 to figure out what
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 translates to an ANSI character code 'ansiCode'. The
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 pointed to by 'event' is filled in with that information.
	The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">KeyMap</ulink>
                 'km' is used for the translation, unless it is NULL, in
	which case the current system default keymap is used.

   INPUTS
	ansiCode - the ANSI code to convert to an input event
	event - the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 to fill-in
	km - the keymap to use for the translation, or NULL to use the
	     current system default keymap.

   RESULTS
	success - TRUE if the translation worked, FALSE otherwise.

   BUGS
	This function currently handles one-deep dead keys (such as
	&lt;alt f&gt;o ). It does not look up the high key map (keystrokes
	with scan codes greater than 0x40).

	Prior to V40, this function was not initializing the ie_SubClass
	and ie_TimeStamp fields of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 structure. A simple work
	around to the problem is to clear these values to 0 before making
	a call to this function:

		struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 ie;

		    ie.ie_SubClass           = 0;
		    ie.ie_TimeStamp.tv_secs  = 0;
		    ie.ie_TimeStamp.tv_micro = 0;
		    if (InvertKeyMap(ansiCode,&amp;ie,NULL))
		    ...

   SEE ALSO
	
                <link linkend="n521">cx_lib/InvertString()</link>
                
            </literallayout>
        </section>
        <section id="n825">
            <title>commodities.library/MatchIX</title>
            <literallayout class="monospaced">
                   NAME
	MatchIX -- see if an input event matches an initialized input
		   expression. (V38)

   SYNOPSIS
	match = MatchIX(event,ix);
	D0		A0    A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 MatchIX(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 *,IX *);

   FUNCTION
	This function determines whether an input event matches an
	initialized input expression. Applications generally do not
	need to call this function as filter objects will normally provide
	all the event filtering needed. Nevertheless, MatchIX()
	can come in handy as it is the same function used to match an
	event to the various filter objects when an event makes its way
	through the input network.

   INPUTS
	event - the input event to match against the input expression
	ix - the input expression for the comparison

   RESULTS
	match - TRUE if the input event matches the input expression, or
		FALSE if not

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                , 
                <link linkend="n826">ParseIX()</link>
                
            </literallayout>
        </section>
        <section id="n826">
            <title>commodities.library/ParseIX</title>
            <literallayout class="monospaced">
                   NAME
	ParseIX -- initialize an input expression given a description string.
		   (V36)

   SYNOPSIS
	failureCode = ParseIX(description,ix);
	D0		      A0          A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 ParseIX(STRPTR,IX *);

   FUNCTION
	Given an input description string and an allocated input
	expression, sets the fields of the input expression to
	correspond to the description string.

   INPUTS
	description - the string to parse
	ix - the input expression to hold the result of the parse

   RESULTS
	failureCode -  0 if all went well,
		      -1 if tokens after end (code spec)
	              -2 if 'description' was NULL

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                , 
                <link linkend="n825">MatchIX()</link>
                
            </literallayout>
        </section>
        <section id="n827">
            <title>commodities.library/RemoveCxObj</title>
            <literallayout class="monospaced">
                   NAME
	RemoveCxObj -- remove a commodity object from a list. (V36)

   SYNOPSIS
	RemoveCxObj(co);
		    A0

	VOID RemoveCxObj(CxObj *);

   FUNCTION
	This function removes 'co' from any list it may be a part of.
	Will not crash if 'co' is NULL, or if it has not been inserted
	in a list.

   INPUTS
	co - the object to remove (may be NULL)

   SEE ALSO
	
                <link linkend="n809">AttachCxObj()</link>
                , 
                <link linkend="n822">EnqueueCxObj()</link>
                , 
                <link linkend="n823">InsertCxObj()</link>
                
            </literallayout>
        </section>
        <section id="n828">
            <title>commodities.library/RouteCxMsg</title>
            <literallayout class="monospaced">
                   NAME
	RouteCxMsg -- set the next destination of a commodity message. (V36)

   SYNOPSIS
	RouteCxMsg(cxm,co);
		   A0  A1

	VOID RouteCxMsg(struct CxMsg *,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">CxObj</ulink>
                 *);

   FUNCTION
	Establishes the next destination of a commodity message
	to be 'co', which must be a valid commodity object, and
	must be linked in ultimately to commodities' object list.

	Routing of an object is analogous to a 'goto' in a program.
	There is no effect on the message's routing stack.

   INPUTS
	cxm - the commodity message to route (must NOT be NULL)
	co - the commodity object to route the message to (must NOT be NULL)

   SEE ALSO
	
                <link linkend="n821">DivertCxMsg()</link>
                
            </literallayout>
        </section>
        <section id="n829">
            <title>commodities.library/SetCxObjPri</title>
            <literallayout class="monospaced">
                   NAME
	SetCxObjPri -- set the priority of a commodity object. (V36)

   SYNOPSIS
	oldPri = SetCxObjPri(co,pri)
	D0                   A0 D0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 SetCxObjPri(CxObj *,LONG);

   FUNCTION
	This function sets the priority of a commodity object for the
	purposes of 
                <link linkend="n822">EnqueueCxObj()</link>
                .

	It is strongly recommended that the ToolTypes environment be
	utilized to provide end-user control over the priority of
 	brokers, but application specific ordering of other objects
	within their lists is not dictated.

   INPUTS
	co - the commodity object to affect (may be NULL)
	pri - the object's new priority in the range -128 to +127. A value
	      of 0 is normal.

   RESULTS
	oldPri - the previous priority of the object or 0 if 'co' was NULL.
		 This value is only returned in V38 and beyond.

   BUGS
	This function will not reposition an object within its list when
	its priority changes. To attain the same effect, first remove the
	object from its list using 
                <link linkend="n827">RemoveCxObj()</link>
                , set its priority using
	SetCxObjPri(), and reinsert it in the list using 
                <link linkend="n822">EnqueueCxObj()</link>
                .

   SEE ALSO
	
                <link linkend="n822">EnqueueCxObj()</link>
                
            </literallayout>
        </section>
        <section id="n830">
            <title>commodities.library/SetFilter</title>
            <literallayout class="monospaced">
                   NAME
	SetFilter -- change the matching condition of a commodity filter.
		     (V36)

   SYNOPSIS
	SetFilter(filter,text);
		  A0     A1

	VOID SetFilter(CxObj *,STRPTR);

   FUNCTION
	This function changes the matching condition of a commodity input
	filter to that described by the input description string 'text'.

   INPUTS
	filter - the filter object to affect (may be NULL)
	text - the new matching conditions for the filter

   RESULTS
	The internal error of 'filter' will have the COERR_BADFILTER
	bit set or cleared depending on the failure or success of this
	function.

   SEE ALSO
	
                <link linkend="n831">SetFilterIX()</link>
                , 
                <link linkend="n816">CxObjError()</link>
                
            </literallayout>
        </section>
        <section id="n831">
            <title>commodities.library/SetFilterIX</title>
            <literallayout class="monospaced">
                   NAME
	SetFilterIX -- change the matching condition of a commodity filter.
		       (V36)

   SYNOPSIS
	SetFilterIX(filter,ix);
		    A0     A1

	VOID SetFilterIX(CxObj *,IX *);

   FUNCTION
	This function changes the matching condition of a commodity input
	filter to that described by the binary input expression pointed by
	'ix'.

	
                <link linkend="n103">Input</link>
                 expressions are defined in 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/libraries/commodities.h">&lt;libraries/commodities.h&gt;</ulink>
                .
	It is important to remember that the first field of the input
	expression structure must indicate which version of the
	input expression structure is being used.

   INPUTS
	filter - the filter object to affect (may be NULL)
	ix - the new matching conditions for the filter

   RESULTS
	The internal error of 'filter' will have the COERR_BADFILTER
	bit set or cleared depending on the failure or success of this
	function.

   SEE ALSO
	
                <link linkend="n830">SetFilter()</link>
                , 
                <link linkend="n816">CxObjError()</link>
                
            </literallayout>
        </section>
        <section id="n832">
            <title>commodities.library/SetTranslate</title>
            <literallayout class="monospaced">
                   NAME
	SetTranslate -- replace a translator object's translation list. (V36)

   SYNOPSIS
	SetTranslate(translator,events);
		     A0         A1

	VOID SetTranslate(CxObj *,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 *);

   FUNCTION
	This function replaces the translation list of a commodity
	translator object with the linked list starting at 'events'.

	A NULL value for 'events' indicates that the object 'translator'
	should swallow all commodity messages that are sent its way.

	Note that the input events are not copied into commodities' private
	memory, but the value of 'events' is used -- asynchronously to the
	application program -- to find a chain of InputEvents in the
	application's data space. At the time of translation, each input event
	is copied into its own new commodity message.

	The above means that no other commodities' user, nor
	commodities.library itself will be modifying your list of InputEvents.
	On the other hand, your program must not corrupt the input event
	chain that has been presented to a translator.

   INPUTS
	translator - the translator object to affect (may be NULL)
	events - the new input event translation list

   BUGS
	The list of input events manipulated by a translator object is
	inserted in reverse order in the commodities network, and come out
	of the network in reverse order as well. The 
                <link linkend="n521">cx_lib/InvertString()</link>
                	function creates lists of input events that are in reverse order so
	they can be used directly with translator objects.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">&lt;devices/inputevent.h&gt;</ulink>
                , 
                <link linkend="n505">cx_lib/CxTranslate()</link>
                
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>wb</title>
        <section id="n833">
            <title>wb.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n834"> AddAppIconA() </link>
                    
                <link linkend="n835"> AddAppMenuItemA() </link>
                    
                <link linkend="n836"> AddAppWindowA() </link>
                    
                <link linkend="n837"> AddAppWindowDropZoneA() </link>
                    
                <link linkend="n838"> ChangeWorkbenchSelectionA() </link>
                    
                <link linkend="n839"> CloseWorkbenchObjectA() </link>
                    
                <link linkend="n840"> MakeWorkbenchObjectVisibleA() </link>
                    
                <link linkend="n841"> OpenWorkbenchObjectA() </link>
                    
                <link linkend="n842"> RemoveAppIcon() </link>
                    
                <link linkend="n843"> RemoveAppMenuItem() </link>
                    
                <link linkend="n844"> RemoveAppWindow() </link>
                    
                <link linkend="n845"> RemoveAppWindowDropZone() </link>
                    
                <link linkend="n846"> WBInfo() </link>
                    
                <link linkend="n847"> WorkbenchControlA() </link>
            </literallayout>
        </section>
        <section id="n834">
            <title>workbench.library/AddAppIconA</title>
            <literallayout class="monospaced">
                   NAME
	AddAppIconA - add an icon to Workbench's list of AppIcons.       (V36)

   SYNOPSIS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 = AddAppIconA(id, userdata, text, msgport,
	   D0                 D0     D1      A0     A1

	                      lock, diskobj, taglist)
	                      A2      A3      A4

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 *AddAppIconA(ULONG, ULONG, char *,
	        struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *,
	        struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	Alternate, varargs version:
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 *AddAppIcon(ULONG, ULONG, char *,
	                           struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                ,
	                           struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 *,
	                           tag1, data1,
	                           tag2, data2,
	                           ...
	                           TAG_END );

   FUNCTION
	Attempt to add an icon to Workbench's list of AppIcons.  If
	successful, the icon is displayed on the Workbench backdrop (the
	same place disk icons are displayed).

	This call is provided to allow applications to be notified when
	a graphical object (not neccessarely associated with a file)
	gets 'manipulated'.

	The notification consists of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 (found in workbench.h/i)
	of type 'MTYPE_APPICON' arriving at the message port you specified.

	The types of 'manipulation' that can occur are:

	1. Double-clicking on the icon.  am_NumArgs will be zero and
	   am_ArgList will be NULL.
	2. Dropping an icon or icons on your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                .  am_NumArgs will
	   be the number of icons dropped on your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 plus one.
	   am_ArgList will be an array of pointers to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/startup.h">WBArg</ulink>
                 structures.
	   Refer to the 'WBStartup Message' section of the RKM for more info.
	3. Dropping your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 on another icon.  NOT SUPPORTED.
	4. Invoking an "Icons" menu item with your icon selected. (V44)
	   You have to tell Workbench which menu items your icon
	   responds to using the tag item list you provide to AddAppIconA().
	   When one of the supported menu items is invoked, you
	   will receive an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 with the am_Class entry set to
	   a value out of AMCLASSICON_Open..AMCLASSICON_EmptyTrash,
	   corresponding to the menu item used.

   INPUTS
	id - this variable is strictly for your own use and is ignored by
	     Workbench.  Typical uses in C are in switch and case statements,
	     and in assembly language table lookup.
	userdata - this variable is strictly for your own use and is ignored
	           by Workbench.
	text - name of icon (char *)
	lock - NULL    (Currently unused)
	msgport - pointer to message port Workbench will use to send you an
	          
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 message of type 'MTYPE_APPICON' when your icon
	          gets 'manipulated' (explained above).
	diskobj - pointer to a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 structure filled in as follows:
	    do_Magic - NULL
	    do_Version - NULL
	    do_Gadget - a gadget structure filled in as follows:
	        NextGadget - NULL
	        LeftEdge - NULL
	        TopEdge - NULL
	        Width - width of icon hit-box
	        Height - height of icon hit-box
	        Flags - NULL or GADGHIMAGE
	        Activation - NULL
	        GadgetType - NULL
	        GadgetRender - pointer to 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 structure filled in as follows:
	            LeftEdge - NULL
	            TopEdge - NULL
	            Width - width of image (must be &lt;= Width of hit box)
	            Height - height of image (must be &lt;= Height of hit box)
	            Depth - # of bit-planes in image
	            ImageData - pointer to actual word aligned bits (CHIP MEM)
	            PlanePick - Plane mask ((1 &lt;&lt; depth) - 1)
	            PlaneOnOff - 0
	            NextImage - NULL
	        SelectRender - pointer to alternate 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Image</ulink>
                 struct or NULL
	        GadgetText - NULL
	        MutualExclude - NULL
	        SpecialInfo - NULL
	        GadgetID - NULL
	        UserData - NULL
	    do_Type - NULL
	    do_DefaultTool - NULL
	    do_ToolTypes - NULL
	    do_CurrentX - NO_ICON_POSITION (recommended)
	    do_CurrentY - NO_ICON_POSITION (recommended)
	    do_DrawerData - NULL
	    do_ToolWindow - NULL
	    do_StackSize - NULL

	(an easy way to create one of these (a DiskObject) is to create an icon
	 with the V2.0 icon editor and save it out.  Your application can then
	 call 
                <link linkend="n795">GetDiskObject</link>
                 on it and pass that to AddAppIcon.)

	taglist - ptr to a list of tag items.  Must be NULL for V2.0.

   TAGS
	WBAPPICONA_SupportsOpen (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Open" menu, to FALSE
	    otherwise. Note that with this attribute set to FALSE,
	    users will still be able to double-click on your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                	    and drop icons on it. This attribute solely controls
	    whether the "Open" menu item will be available.

	    This tag defaults to TRUE. (V44)

	WBAPPICONA_SupportsCopy (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Copy" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsRename (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Rename" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsInformation (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Information" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsSnapshot (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Snapshot" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsUnSnapshot (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "UnSnapshot" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsLeaveOut (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Leave Out" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsPutAway (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Put Away" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsDelete (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Delete" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsFormatDisk (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "
                <link linkend="n83">Format</link>
                 Disk" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_SupportsEmptyTrash (BOOL) -- Set this to TRUE if your
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 should respond to the "Empty Trash" menu, to FALSE
	    otherwise.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_PropagatePosition (BOOL) -- Set this to TRUE if you
	    want the AppIcon's position to be propagated back to the
	    original 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                 you passed to this function. By
	    default, Workbench will make a copy of that DiskObject's
	    icon imagery, allowing you to free the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">DiskObject</ulink>
                .
	    But if you specify "WBAPPICONA_PropagatePosition,TRUE,"
	    Workbench will assume that you will not free it and
	    that the AppIcon's current position should be stored
	    in its do_CurrentX/do_CurrentY members.

	    This tag defaults to FALSE. (V44)

	WBAPPICONA_RenderHook (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *) -- Pointer to a hook that
	    will be invoked when rendering your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                . With this hook
	    and 
                <link linkend="n847">WorkbenchControlA()</link>
                 you can create dynamic or animated
	    AppIcons. Your hook will be called with the following
	    parameters and has to return a result value:

	    result = hookFunc(hook,reserved,arm)
	      D0               A0     A2     A1

	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 hookFunc(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 reserved,
	                  struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIconRenderMsg</ulink>
                 *arm);

	    The reserved parameter will be set to NULL (V44).

	    If your hook code returns TRUE, the AppIcon's regular image
	    will be drawn. If your code returns FALSE, the regular image
	    will not be drawn; this allows you to do all the icon's on-screen
	    rendering with the exception of the icon image used when dragging
	    the icon on the screen.

	    The render message contents are as follows:

	        arm_RastPort
	            A pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to render into.

	        arm_Icon
	            A pointer to the Icon to be rendered.

	        arm_Label
	            A pointer to the label text to be printed
	            below the icon.

	        arm_Tags
	            Further control tags which you should pass on
	            to 
                <link linkend="n789">icon.library/DrawIconStateA</link>
                , should you
	            call this routine.

	        arm_Left
	        arm_Top
	            Rendering origin; note that these coordinates
	            DO NOT take the embossing border sizes into
	            account.

	        arm_Width
	        arm_Height
	            Size of the Icon's image area; you should limit
	            your drawing to this area.

	        arm_State
	            An icon drawing state, such as used by
	            
                <link linkend="n789">icon.library/DrawIconStateA</link>
                .

	    Note that all the data in the render message is read-only.


	    This tag defaults to NULL. (V44)

	WBAPPICONA_NotifySelectState (BOOL) -- Set this tag to TRUE
	    if you want to be be notified whenever the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 becomes
	    selected or unselected. You will hear only state transitions,
	    i.e. changes from selected to unselected state and the other
	    way round. On a state transition you will receive AppMessages
	    with the AppMessage-&gt;am_Class member set to AMCLASSICON_Selected
	    or AMCLASSICON_Unselected, respectively.

	    This tag defaults to FALSE. (V44)

   RESULTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 - a pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 structure which you pass to
	          
                <link linkend="n842">RemoveAppIcon</link>
                 when you want to remove the icon
	          from Workbench's list of AppIcons.  NULL
	          if Workbench was unable to add your icon; typically
	          happens when Workbench is not running or under low
	          memory conditions.

   EXAMPLE
	You could design a print-spooler icon and add it to the Workbench.
	Any file dropped on the print spooler would be printed.  If the
	user double-clicked (opened) your printer-spooler icon, you could
	open a window showing the status of the print spool, allow changes
	to print priorities, allow deletions, etc.  If you registered this
	window as an 'AppWindow' (explained in workbench.library/AddAppWindow)
	files could also be dropped in the window and added to the spool.

   NOTES
	For this function call to succeed, Workbench must be open. This
	means that the LoadWB command was executed and the Workbench
	screen has been opened.

   SEE ALSO
	
                <link linkend="n842">workbench.library/RemoveAppIcon</link>
                	
                <link linkend="n847">workbench.library/WorkbenchControlA</link>
                	
                <link linkend="n789">icon.library/DrawIconStateA</link>
                   BUGS
	In workbench.library versions 36 through 40 
                <link linkend="n101">Info</link>
                 cannot be obtained
	on appicons.

            </literallayout>
        </section>
        <section id="n835">
            <title>workbench.library/AddAppMenuItemA</title>
            <literallayout class="monospaced">
                   NAME
	AddAppMenuItemA - add a menu item to Workbench's list            (V36)
                         of AppMenuItems.

   SYNOPSIS
	AppMenuItem = AddAppMenuItemA(id, userdata, text, msgport, taglist)
	D0                            D0     D1      A0     A1       A2

	struct AppMenuItem *AddAppMenuItemA(ULONG, ULONG, char *,
	                                    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *,
	                                    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	Alternate, varargs version:
	struct AppMenuItem *AddAppMenuItem(ULONG, ULONG, char *,
	                                   struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *,
	                                   tag1, data1,
	                                   tag2, data2,
	                                   ...
	                                   TAG_END );

   FUNCTION
	Attempt to add the text as a menu item to Workbench's list
	of AppMenuItems (the 'Tools' menu strip).

   INPUTS
	id - this variable is strictly for your own use and is ignored by
	     Workbench.  Typical uses in C are in switch and case statements,
	     and in assembly language table lookup.
	userdata - this variable is strictly for your own use and is ignored
	           by Workbench.
	text - text for the menu item (char *); starting with V44, any menu
	       label consisting entirely of '-', '_' or '~' characters will
	       result in a separator bar to be added in place of a textual
	       item.
	msgport - pointer to message port Workbench will use to send you an
	          
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 message of type 'MTYPE_APPMENUITEM' when your
	          menuitem gets selected.
	taglist - ptr to a list of tag items.  Must be NULL for V2.0.

   TAGS
	WBAPPMENUA_CommandKeyString (STRPTR) -- Command key to assign to
	    this AppMenu. This must be a NUL-terminated string. If the
	    string is empty, it will be ignored. Also, if the command key
	    is already in use by a different menu item it will be ignored,
	    too. In any case, only the first character of the string will
	    be used (V44).

	    This tag defaults to NULL.

   RESULTS
	AppMenuItem - a pointer to an appmenuitem structure which you pass to
	              
                <link linkend="n843">RemoveAppMenuItem</link>
                 when you want to remove the menuitem
	              from Workbench's list of AppMenuItems.  NULL if
	              workbench was unable to add your menu item; typically
	              happens when Workbench is not running or under low
	              memory conditions.

	          Starting with V44 NULL will be returned if you attempt to
	          add an AppMenu item to a menu which already contains 63
	          menu items.

   NOTES
	For this function call to succeed, Workbench must be open. This
	means that the LoadWB command was executed and the Workbench
	screen has been opened.

   SEE ALSO
	
                <link linkend="n843">workbench.library/RemoveAppMenuItem</link>
                   BUGS
	workbench.library V37 through V40 does not limit the number of menu
	items to 63. Any menu items after the 63rd will not be selectable.
	This bug was fixed in V44.

            </literallayout>
        </section>
        <section id="n836">
            <title>workbench.library/AddAppWindowA</title>
            <literallayout class="monospaced">
                   NAME
	AddAppWindowA - add a window to Workbench's list of AppWindows.  (V36)

   SYNOPSIS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 = AddAppWindowA(id, userdata, window, msgport, taglist)
	D0                        D0     D1       A0      A1       A2

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 *AddAppWindowA(ULONG, ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
	                                struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *);

	Alternate, varargs version:
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 *AddAppWindow(ULONG, ULONG, struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Window</ulink>
                 *,
	                               struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/ports.h">MsgPort</ulink>
                 *
	                               tag1, data1,
	                               tag2, data2,
	                               ...
	                               TAG_END );

   FUNCTION
	Attempt to add the window to Workbench's list of AppWindows.
	Normally non-Workbench windows (those not opened by Workbench)
	cannot have icons dropped in them.  This call is provided to
	allow applications to be notified when an icon or icons get
	dropped inside a window that they have registered with Workbench.
	The notification consists of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 (found in workbench.h/i)
	of type 'MTYPE_APPWINDOW' arriving at the message port you specified.
	What you do with the list of icons (pointed to by am_ArgList) is
	up to you, but generally you would want to call 
                <link linkend="n796">GetDiskObjectNew</link>
                 on
	them.

   INPUTS
	id - this variable is strictly for your own use and is ignored by
	     Workbench.  Typical uses in C are in switch and case statements,
	     and in assembly language table lookup.
	userdata - this variable is strictly for your own use and is ignored
	           by Workbench.
	window - pointer to window to add.
	msgport - pointer to message port Workbench will use to send you an
	          
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 message of type 'MTYPE_APPWINDOW' when your
	          window gets an icon or icons dropped in it.
	taglist - ptr to a list of tag items.  Must be NULL for V2.0.

   RESULTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 - a pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 structure which you pass to
	            
                <link linkend="n844">RemoveAppWindow</link>
                 when you want to remove the window
	            from Workbench's list of AppWindows.  NULL
	            if Workbench was unable to add your window; typically
	            happens when Workbench is not running or under low
	            memory conditions.

   SEE ALSO
	
                <link linkend="n837">workbench.library/AddAppWindowDropZoneA</link>
                	
                <link linkend="n844">workbench.library/RemoveAppWindow</link>
                   NOTES
	The V2.0 icon editor is an example of an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                .  Note that app
	window applications generally want to call 
                <link linkend="n796">GetDiskObjectNew</link>
                	(as opposed to GetDiskObject) to get the disk object for the icon
	dropped in the window.

	For this function call to succeed, Workbench must be open. This
	means that the LoadWB command was executed and the Workbench
	screen has been opened.

	When removing an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                , all its drop zones will be automatically
	removed.

            </literallayout>
        </section>
        <section id="n837">
            <title>workbench.library/AddAppWindowDropZoneAorkbench.library/AddAppWindowDropZoneA</title>
            <literallayout class="monospaced">
                   NAME
	AddAppWindowDropZoneA -- Designate an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 area as suitable for
	    dropping icons on. (V44)

   SYNOPSIS
	dropZone = AddAppWindowDropZoneA(appWindow,id,userData,tags)
	   D0                               A0    D0    D1     A1

	struct AppWindowDropZone * AddAppWindowDropZoneA(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 *aw,
	                           ULONG id,ULONG userData,
	                           struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 * tags);

	dropZone = AddAppWindowDropZone(appWindow,id,userData,zone,...)

	struct AppWindowDropZone * AddAppWindowDropZone(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 *aw,
	                           ULONG id,ULONG userData,...);

   FUNCTION
	Once it is created, Workbench will allow the user to drop an
	icon anywhere inside an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                , regardless of whether the
	icon was dropped on an area designated for dropping icons on
	or not. With AddAppWindowDropZoneA() you can tell Workbench
	which 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 areas are suitable for dropping icons on.

   INPUTS
	aw -- An 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 data structure, as returned by
	    
                <link linkend="n836">workbench.library/AddAppWindowA</link>
                .
	id -- This variable is strictly for your own use and is ignored by
	    Workbench. Typical uses in C are in switch and case statements,
	    and in assembly language table lookup. Later, when an icon is
	    dropped on the designated area, the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 sent to your
	    port will have the am_ID member set to this value.
	userData -- this variable is strictly for your own use and is ignored
	    by Workbench. Later, when an icon is dropped on the designated area,
	    the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 sent to your port will have the am_UserData member
	    set to this value.
	tags -- 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 of attributes to control the position and size
	    of the drop zone.

   TAGS
	WBDZA_Left (WORD) -- Left edge of the drop zone; a value of
	    0 would create a zone located at the left corner of the
	    window.

	WBDZA_RelRight (WORD) -- Left edge of the drop zone, relative
	    to the window width; a value of -10 would create a zone located
	    10 pixels left of the window right edge.

	WBDZA_Top (WORD) -- Top edge of the drop zone; a value of
	    0 would create a zone located at the top corner of the
	    window.

	WBDZA_RelBottom (WORD) -- Top edge of the drop zone, relative
	    to the window height; a value of -10 would create a zone located
	    10 pixels above the window bottom edge.

	WBDZA_Width (WORD) -- Width of the drop zone.

	WBDZA_RelWidth (WORD) -- Width of the drop zone, relative to the
	    width of the window; a value of -20 would create a zone that
	    is by 20 pixels narrower than the window.

	WBDZA_Height (WORD) -- Height of the drop zone.

	WBDZA_RelHeight (WORD) -- Height of the drop zone, relative to the
	    height of the window; a value of -20 would create a zone that
	    is by 20 pixels smaller than the window.

	WBDZA_Box (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IBox</ulink>
                 *) -- Position and size of the drop zone.

	WBDZA_Hook (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *) -- Pointer to a hook that will be
	    invoked whenever the mouse enters or leaves your drop zone
	    area. Your hook will be called with the following parameters:

	    result = hookFunc(hook,reserved,arm)
	      D0               A0     A2     A1

	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 hookFunc(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 reserved,
	                  struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindowDropZoneMsg</ulink>
                 *adzm);

	    The reserved parameter will be set to NULL (V44).
	    For future enhancement, make sure that your hook
	    function always returns NULL (V44).

	    The drop zone message contents are as follows:

	        adzm_RastPort
	            A pointer to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 to render into.
	            Typically, this is the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/graphics/rastport.h">RastPort</ulink>
                 of the window
	            the drop zone is attached to.

	        adzm_DropZoneBox
	            This member describes the position and size
	            of the drop zone. The zone is guaranteed to
	            be a valid area, i.e. the Width and Height
	            will both be greater than 0 and the Left/Top
	            will be well within the bounds of the window
	            containing the drop zone.

	        adzm_ID
	        adzm_UserData
	            These two come straight from the values you passed
	            as the id and userData parameters to
	            AddAppWindowDropZoneA().

	        adzm_Action
	            Depending upon whether the mouse has just entered
	            or left the drop zone area, this variable will be
	            set to ADZMACTION_Enter or to ADZMACTION_Leave.
	            Any other values for adzm_Action should be ignored.

	            When the mouse enters the drop zone, do your drop
	            zone area highlighting. When the mouse leaves the
	            drop zone, remove any highlighting done in the
	            previous ADZMACTION_Enter pass.

	            Note that the mouse leaving your drop zone box
	            does not imply that no icons will be dropped on it.
	            You may still receive a notification lateron, telling
	            you that your drop zone had icons dropped on it.
	            The hook function is solely for highlighting and
	            unhighlighting the drop zone area.

	    A final word of warning: when your hook code is called, you
	    must limit your rendering to simple drawing operations
	    from graphics.library; if you do anything complex that
	    involves Intuition locking and unlocking the display,
	    such as refreshing gadgets or locking 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuitionbase.h">IntuitionBase</ulink>
                ,
	    you will deadlock the operating system. You have been
	    warned!

   RESULT
	dropZone -- A newly created drop zone identifier, or NULL if
	    it could not be created; use 
                <link linkend="n106">dos.library/IoErr</link>
                 to find out
	    what caused it to fail.

   NOTES
	Once an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 has a drop zone installed, Workbench will send
	a new type of 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 to your port if icons are dropped on
	a drop zone. Instead of AMTYPE_APPWINDOW type messages you
	will receive AMTYPE_APPWINDOWZONE messages. In fact, you will
	no longer hear any AMTYPE_APPWINDOW type messages since Workbench
	will allow users to drop icons only on drop zones. Be prepared
	to handle this.

	Adding a drop zone to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 does not guarantee that only
	AMTYPE_APPWINDOWZONE type messages will arrive at your message
	port. In fact, the user may be able to drop an icon on the window
	before the first drop zone is installed. Be prepared to handle
	this.

	Workbench checks drop zones in the order in which they were added
	to the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                . Thus, if two zones overlap, the zone that was
	added first will be reported as hit.

	An 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 starts out with its entire area available for dropping
	icons on. Thus, you may receive AppMessages for icons dropped upon
	your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 before you have added the first drop zone to it.
	Be prepared to handle this.

	Drop zones must be created with a position and a size. If you omit
	either one, this routine will fail.

	When an icon is dropped on a drop zone, the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 am_MouseX and
	am_MouseY members will be relative to the window top left corner;
	they WILL NOT be relative to the left/top edge of the drop zone.

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n836">workbench.library/AddAppWindowA</link>
                
            </literallayout>
        </section>
        <section id="n838">
            <title>workbench.library/ChangeWorkbenchSelectionA.library/ChangeWorkbenchSelectionA</title>
            <literallayout class="monospaced">
                   NAME
	ChangeWorkbenchSelectionA -- Change the selection states of icons
	    displayed by Workbench. (V44)

   SYNOPSIS
	success = ChangeWorkbenchSelectionA(name,hook,tags)
	   D0                                A0   A1   A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ChangeWorkbenchSelectionA(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook,
	                               struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	success = ChangeWorkbenchSelection(name,hook,...);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 ChangeWorkbenchSelection(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook,...);

   FUNCTION
	The icons displayed inside each Workbench window can be in selected
	or in unselected state. This routine allows you to change this state
	for every icon found in a particular window.

   INPUTS
	name -- Name of the drawer whose icons should be submitted to the
	    callback hook for testing; pass NULL as the name to have the
	    icons in the Workbench backdrop (where disks and AppIcons live)
	    passed through the hook. Note that the drawer whose icons you
	    want to change must be open before you can make any changes.

	hook -- 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 to be invoked for each icon in the window.

	    The hook code will be invoked with the following parameters

	    action = hookFunc(hook,reserved,ism)
	       D0                A0     A2    A1

	    ULONG hookFunc(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 reserved,
	                   struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">IconSelectMsg</ulink>
                 *ism);

	    The reserved parameter will be set to NULL (V44).

	    The 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">IconSelectMsg</ulink>
                 contents are as follows:

	        ism_Length
	            Size of the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">IconSelectMsg</ulink>
                 data structure (in bytes).
	            Since this message may need to grow in the future,
	            always compare this value against the message size
	            you expect. For V44, ism_Length is guaranteed to
	            contain a value of 36. Expect this value to become
	            larger in the future.

	        ism_Drawer
	            A lock on the drawer the object in question resides
	            in. This may be NULL for the Workbench backdrop (where
	            disks and AppIcons live).

	        ism_Name
	            Name of the object in question; please note that for
	            disk icons the name does not end with a colon character
	            (":").

	        ism_Type
	            This is one of WBDISK, WBDRAWER, WBTOOL, WBPROJECT,
	            WBGARBAGE, WBDEVICE, WBKICK or WBAPPICON.

	        ism_Selected
	            TRUE if the object in question is currently selected,
	            FALSE otherwise.

	        ism_Tags
	            The list of tag items passed to ChangeWorkbenchSelectionA().

	        ism_DrawerWindow
	            If the object in question is a drawer or disk and its
	            associated window is currently open, then you will find
	            a pointer to it here.

	        ism_ParentWindow
	            This is a pointer to the window the object resides in.

	        ism_Left
	        ism_Top
	        ism_Width
	        ism_Height
	            These denote the position and size of the object in
	            question, relative to the top left edge of the window
	            it resides in.

	    With the exception of the ism_Left and ism_Top members, the
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">IconSelectMsg</ulink>
                 is read-only. The ism_Left/ism_Top members can
	    be used to change the position of the icon.

	    You hook code must return one of the following values:

	        ISMACTION_Unselect
	            Unselect the icon

	        ISMACTION_Select
	            Select the icon

	        ISMACTION_Ignore
	            Do not change the selection state of the icon.

	        ISMACTION_Stop
	            Do not change the selection state of the icon. Do not
	            invoke the hook function again.

	tags -- Additional options.

   TAGS
	No tags are defined yet (V44).

   RESULTS
	result -- FALSE if the drawer in question could not be found,
	    TRUE otherwise. If FALSE is returned, you can query the error
	    code using 
                <link linkend="n106">dos.library/IoErr()</link>
                .

   EXAMPLE
	/* Select the icon labeled "Prefs" in the drawer "SYS:". */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 hook;

	/* This hook code is responsible for selecting the icon. */
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                	SelectPrefs(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/hooks.h">Hook</ulink>
                 *hook,
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">APTR</ulink>
                 reserved,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">IconSelectMsg</ulink>
                 *ism)
	{
	    /* 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">Remember</ulink>
                 the old icon select status; if the icon name
	     * does not match "Prefs", this is what we will return,
	     * not changing anything.
	     */
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 selected = ism-&gt;ism_Selected;

	    /* If the name matches, select it. Otherwise, leave its
	     * select state alone.
	     */
	    if(Stricmp(ism-&gt;ism_Name,"Prefs") == 0)
	        selected = TRUE;

	    return(selected);
	}

	.
	.
	.

	/* Set up the hook data structure. */
	hook.h_Entry = HookEntry;
	hook.h_SubEntry = (HOOKFUNC)SelectPrefs;

	/* And finally change the selection. */
	ChangeWorkbenchSelection("SYS:",&amp;hook,TAG_END);

   NOTES
	The name of the drawer to work on is interpreted relative
	to the current directory of the program to call
	ChangeWorkbenchSelectionA().

	For this function call to succeed, Workbench must be open. This
	means that the LoadWB command was executed and the Workbench
	screen has been opened.

	While the user is dragging icons, no on-screen rendering may
	take place. In this state Workbench may refuse to execute the
	ChangeWorkbenchSelection() call and return an error code instead
	(ERROR_OBJECT_IN_USE).

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                
            </literallayout>
        </section>
        <section id="n839">
            <title>workbench.library/CloseWorkbenchObjectAorkbench.library/CloseWorkbenchObjectA</title>
            <literallayout class="monospaced">
                   NAME
	CloseWorkbenchObjectA -- 
                <link linkend="n49">Close</link>
                 a drawer as if the user had clicked
	    on the window close gadget. (V44)

   SYNOPSIS
	success = CloseWorkbenchObjectA(name,tags)
	   D0                            A0   A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 CloseWorkbenchObjectA(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	success = CloseWorkbenchObject(name,...);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 CloseWorkbenchObject(STRPTR name,...);

   FUNCTION
	This routine attempts to close the named object as if the user
	had clicked on its drawer window close gadget.

   INPUTS
	name -- Name of the drawer to be closed.

	tags -- Additional options.

   TAGS
	No tags are defined yet (V44).

   RESULTS
	result -- FALSE if the object in question could not be closed,
	    TRUE otherwise. If FALSE is returned, you can query the error
	    code using 
                <link linkend="n106">dos.library/IoErr()</link>
                .

   EXAMPLE
	/* 
                <link linkend="n49">Close</link>
                 the drawer "SYS:" */
	CloseWorkbenchObjectA("SYS:",NULL);

   NOTES
	The name of the drawer to be closed is interpreted relative
	to the current directory of the program to call
	CloseWorkbenchObjectA().

	For this function call to succeed, Workbench must be open. This
	means that the LoadWB command was executed and the Workbench
	screen has been opened.

	While the user is dragging icons, no on-screen rendering may
	take place. In this state Workbench may refuse to execute the
	CloseWorkbenchObject() call and return an error code instead
	(ERROR_OBJECT_IN_USE).

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n841">workbench.library/OpenWorkbenchObjectA</link>
                
            </literallayout>
        </section>
        <section id="n840">
            <title>workbench.library/MakeWorkbenchObjectVisibleArary/MakeWorkbenchObjectVisibleA</title>
            <literallayout class="monospaced">
                   NAME
	MakeWorkbenchObjectVisibleA -- Change a Workbench window in such a
	    way as to make a particular icon visible. (V44)

   SYNOPSIS
	success = MakeWorkbenchObjectVisibleA(name,tags)
	   D0                                  A0   A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 MakeWorkbenchObjectVisibleA(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	success = MakeWorkbenchObjectVisible(name,...);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 MakeWorkbenchObjectVisible(STRPTR name,...);

   FUNCTION
	Due to how the scrollers of a Workbench window affect the positions
	of the icons inside that window, some icons may not be drawn inside
	the bounds of the window. By using MakeWorkbenchObjectVisibleA()
	the window scrollers can be made to scroll such a "hidden" icon
	into view.

   INPUTS
	name -- Name of the icon to make visible. Note that the window
	    the icon resides in must already be open.

	tags -- Additional options.

   TAGS
	No tags are defined yet (V44).

   RESULTS
	result -- FALSE if the icon in question could not be found,
	    TRUE otherwise. If FALSE is returned, you can query the error
	    code using 
                <link linkend="n106">dos.library/IoErr()</link>
                .

   EXAMPLE
	/* Make the icon for the drawer "SYS:" visible. */
	MakeWorkbenchObjectVisible("SYS:",TAG_END);

   NOTES
	The name of the icon to make visible is interpreted relative
	to the current directory of the program to call
	MakeWorkbenchObjectVisibleA().

	For this function call to succeed, Workbench must be open. This
	means that the LoadWB command was executed and the Workbench
	screen has been opened.

	While the user is dragging icons, no on-screen rendering may
	take place. In this state Workbench may refuse to execute the
	MakeWorkbenchObjectVisible() call and return an error code instead
	(ERROR_OBJECT_IN_USE).

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                
            </literallayout>
        </section>
        <section id="n841">
            <title>workbench.library/OpenWorkbenchObjectA</title>
            <literallayout class="monospaced">
                   NAME
	OpenWorkbenchObjectA -- 
                <link linkend="n126">Open</link>
                 a drawer or launch a program as if
	    the user had double-clicked on an icon. (V44)

   SYNOPSIS
	success = OpenWorkbenchObjectA(name,tags)
	   D0                           A0   A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 OpenWorkbenchObjectA(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	success = OpenWorkbenchObject(name,...);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 OpenWorkbenchObject(STRPTR name,...);

   FUNCTION
	This routine attempts to open the named object as if the user
	had double-clicked on its icon. This allows you to open drawers
	under program control or to have Workbench launch your programs.

   INPUTS
	name -- Name of the object to be opened; this can be a drawer
	    name, a tool name or a project name.

	tags -- Additional options.

   TAGS
	WBOPENA_ArgLock (BPTR) -- Corresponds to the WBArg-&gt;wa_Lock
	    entry of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/startup.h">WBStartup</ulink>
                 message, to be sent to a program
	    to be launched. The lock you provide will be duplicated
	    when it is put into a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/startup.h">WBArg</ulink>
                 list.

	    The WBOPENA_ArgLock determines the lock parameters
	    to be associated with all following WBOPENA_ArgName tags.

	    This tag defaults to NULL.

	WBOPENA_ArgName (STRPTR) -- Corresponds to the WBArg-&gt;wa_Name
	    entry of a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/startup.h">WBStartup</ulink>
                 message to be sent to a program
	    to be launched. This tag can be used to construct a list
	    of parameters to pass to the tool/project to be launched.
	    It works in conjunction with the WBOPENA_ArgLock tag.
	    The name you provide will be duplicated when it is put
	    into a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/startup.h">WBArg</ulink>
                 list.

   RESULTS
	result -- FALSE if the object in question could not be opened,
	    TRUE otherwise. Note that TRUE may be returned even if
	    the program the object represents could not be launched;
	    this is due to limitations in the current (V44) Workbench
	    design. If FALSE is returned, you can query the error
	    code using 
                <link linkend="n106">dos.library/IoErr()</link>
                .

   EXAMPLE
	/* Launch Multiview with S:Startup-Sequence as its parameter. */
	OpenWorkbenchObject("MultiView",
	    WBOPENA_ArgLock, Lock("S:",SHARED_LOCK),
	    WBOPENA_ArgName, "Startup-Sequence",
	TAG_DONE);

	/* Launch the application "Paint" with the project files "Image1"
	 * and "Image2", which are both found in the drawer "Paint:Pictures".
	 */
	OpenWorkbenchObject("Paint",
	    WBOPENA_ArgLock, Lock("Paint:Pictures",SHARED_LOCK),
	    WBOPENA_ArgName, "Image1",
	    WBOPENA_ArgName, "Image2",
	TAG_DONE);

	/* Launch the application "Paint" with the project files "Image1"
	 * and "Anim1", which are both found in the drawers "Paint:Pictures"
	 * and "Paint:Animations", respectively.
	 */
	OpenWorkbenchObject("Paint",
	    WBOPENA_ArgLock, Lock("Paint:Pictures",SHARED_LOCK),
	    WBOPENA_ArgName, "Image1",
	    WBOPENA_ArgLock, Lock("Paint:Animations",SHARED_LOCK),
	    WBOPENA_ArgName, "Anim1",
	TAG_DONE);

   NOTES
	You need not specify fully qualified path names for programs to
	be launched. Workbench will look for files without fully
	qualified path names along its default Shell search path.
	In any case, Workbench will look for the tool to be launched
	in the current directory of the program that called
	OpenWorkbenchObjectA(). The same holds true for drawers.

	When launching a program, Workbench will automatically figure
	out which tool to use if the object in question is actually a
	project file with a project icon. Note that if the project
	icon's default tool cannot be found, you will not see any
	error message.

	Workbench transparently supports launching of Shell programs,
	but this is not recommended. You should always launch Shell
	programs from your own process.

	When you open a drawer, all WBOPENA_Arg[..] parameters you may
	have provided will be ignored.

	For this function call to succeed, Workbench must be open. This
	means that the LoadWB command was executed and the Workbench
	screen has been opened.

	While the user is dragging icons, no on-screen rendering may
	take place. In this state Workbench may refuse to execute the
	OpenWorkbenchObject() call and return an error code instead
	(ERROR_OBJECT_IN_USE).

   SEE ALSO
	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <link linkend="n839">workbench.library/CloseWorkbenchObjectA</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/startup.h">&lt;workbench/startup.h&gt;</ulink>
                
            </literallayout>
        </section>
        <section id="n842">
            <title>workbench.library/RemoveAppIcon</title>
            <literallayout class="monospaced">
                   NAME
	RemoveAppIcon - remove an icon from Workbench's list            (V36)
                         of AppIcons.

   SYNOPSIS
	success = RemoveAppIcon(AppIcon)
         D0                      A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 RemoveAppIcon(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 *);

   FUNCTION
	Attempt to remove an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 from Workbench's list of AppIcons.

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 - pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 structure returned by AddAppIcon.

   RESULTS
	success - TRUE if the icon could be removed, FALSE otherwise.

   NOTES
	As with anything that deals with asynchronous operation, you will need
	to do a final check for messages on your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 port for messages
	that may have come in between the last time you checked and the
	call to remove the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                .

   SEE ALSO
	
                <link linkend="n834">workbench.library/AddAppIconA</link>
                
            </literallayout>
        </section>
        <section id="n843">
            <title>workbench.library/RemoveAppMenuItem</title>
            <literallayout class="monospaced">
                   NAME
	RemoveAppMenuItem - remove a menu item from Workbench's list     (V36)
	                    of AppMenuItems.

   SYNOPSIS
	success = RemoveAppMenuItem(AppMenuItem)
         D0                            A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 RemoveAppMenuItem(struct AppMenuItem *);

   FUNCTION
	Attempt to remove an AppMenuItem from Workbench's list
	of AppMenuItems.

   INPUTS
	AppMenuItem - pointer to an AppMenuItem structure returned by
	              AddAppMenuItem.

   RESULTS
	success - TRUE if the menu could be removed, FALSE otherwise.

   NOTES
	As with anything that deals with asynchronous operation, you will need
	to do a final check for messages on your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 port for messages
	that may have come in between the last time you checked and the
	call to removed the AppMenuItem.

   SEE ALSO
	
                <link linkend="n835">workbench.library/AddAppMenuItemA</link>
                
            </literallayout>
        </section>
        <section id="n844">
            <title>workbench.library/RemoveAppWindow</title>
            <literallayout class="monospaced">
                   NAME
	RemoveAppWindow - remove a window from Workbench's list         (V36)
                          of AppWindows.

   SYNOPSIS
	success = RemoveAppWindow(AppWindow)
         D0                        A0

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 RemoveAppWindow(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 *);

   FUNCTION
	Attempt to remove an appwindow from Workbench's list of AppWindows.

   INPUTS
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 - pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 structure returned by
	            AddAppWindow.

   RESULTS
	success - TRUE if the window could be removed, FALSE otherwise.

   NOTES
	As with anything that deals with asynchronous operation, you will need
	to do a final check for messages on your 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppMessage</ulink>
                 port for messages
	that may have come in between the last time you checked and the
	call to removed the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                .

	Before the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 is removed, all its drop zones will be removed
	first. There is no need for you to call 
                <link linkend="n845">RemoveAppWindowDropZone()</link>
                	for every single one.

   SEE ALSO
	
                <link linkend="n836">workbench.library/AddAppWindowA</link>
                	
                <link linkend="n845">workbench.library/RemoveAppWindowDropZone</link>
                
            </literallayout>
        </section>
        <section id="n845">
            <title>workbench.library/RemoveAppWindowDropZoneench.library/RemoveAppWindowDropZone</title>
            <literallayout class="monospaced">
                   NAME
	RemoveAppWindowDropZone -- 
                <link linkend="n276">Remove</link>
                 a drop zone from an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                .

   SYNOPSIS
	success = RemoveAppWindowDropZone(appWindow,dropZone)
	  D0                                 A0        A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 RemoveAppWindowDropZone(struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 *,
	                             struct AppWindowDropZone *);

   FUNCTION
	Attempt to remove a drop zone from an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                .

   INPUTS
	appWindow -- pointer to an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                 structure returned by
	    
                <link linkend="n836">workbench.library/AddAppWindowA</link>
                . A value of NULL will be
	    ignored.
	dropZone -- pointer to an AppWindowDropZone returned by
	    
                <link linkend="n837">workbench.library/AddAppWindowDropZoneA</link>
                . A value of NULL will
	    be ignored.

   RESULTS
	success - TRUE if the drop zone could be removed, FALSE otherwise.
	    The reason for the failure can be obtained using
	    
                <link linkend="n106">dos.library/IoErr</link>
                . This routine may fail if the specified drop
	    zone is not registered with the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppWindow</ulink>
                .

   NOTES
	Due to the asynchronous nature of Workbench/user interaction, you
	may receive 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 drop zone messages for zones that you have
	just removed. These messages may arrive in the time between your
	code calling RemoveAppWindowDropZone() and Workbench responding
	to the drop zone removal request. Be prepared to handle this. Once
	a drop zone is removed, it will generate no new AppMessages.

   SEE ALSO
	
                <link linkend="n837">workbench.library/AddAppWindowDropZoneA</link>
                
            </literallayout>
        </section>
        <section id="n846">
            <title>workbench.library/WBInfo</title>
            <literallayout class="monospaced">
                   NAME
	WBInfo - Bring up the Information requester                     (V39)

   SYNOPSIS
	worked = WBInfo(lock, name, screen)
	d0              a0    a1    a2

	ULONG WBInfo(BPTR, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/screens.h">Screen</ulink>
                 *);

   FUNCTION
	This is the LVO that Workbench calls to bring up the Icon Information
	requester.  External applications may also call this requester.
	In addition, if someone were to wish to replace this requester
	with another one, they could do so via a 
                <link linkend="n285">SetFunction</link>
                .

   INPUTS
	lock   - A lock on the parent directory
	name   - The name of the icon contained within above directory
	screen - A screen pointer on which the requester is to show up

   RESULTS
	worked - Returns TRUE if the requester came up, FALSE if it did not.

   NOTE
	Note that this LVO may be called many times by different tasks
	before other calls return.  Thus, the code must be 100% re-entrant.

   SEE ALSO
	icon.library

            </literallayout>
        </section>
        <section id="n847">
            <title>workbench.library/WorkbenchControlA</title>
            <literallayout class="monospaced">
                   NAME
	WorkbenchControlA -- Query or modify Workbench and icon
	    options. (V44)

   SYNOPSIS
	success = WorkbenchControlA(name,tags)
	   D0                       A0   A1

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 WorkbenchControlA(STRPTR name,struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/utility/tagitem.h">TagItem</ulink>
                 *tags);

	success = WorkbenchControl(name,...);

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">BOOL</ulink>
                 WorkbenchControl(STRPTR name,...);

   FUNCTION
	With this function you can query or modify global Workbench
	parameters or local icon options.

   INPUTS
	name -- Name of an object to query or modify.

	tags -- Additional options.

   TAGS
	WBCTRLA_IsOpen (LONG *) -- Check if the named object is
	    currently open. In this case, the function "name"
	    parameter refers to the drawer that should be
	    tested; the result value will be set to TRUE if
	    the named drawer is currently open, FALSE otherwise.

	WBCTRLA_DuplicateSearchPath (BPTR *) -- This is a safe way
	    to obtain a copy of the Workbench search path list.
	    You will receive a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 to a path list, such as can
	    be stored in the cli_CommandDir pointer of a
	    
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">CommandLineInterface</ulink>
                 structure. Note that this is really
	    a copy of the Workbench search path list and not a reference
	    to the data associated with the Workbench process. Thus,
	    it can be freed by FreeDosObject(DOS_CLI,..), if part of
	    a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">CommandLineInterface</ulink>
                 structure.

	WBCTRLA_FreeSearchPath (BPTR) -- If you did not attach the
	    data returned by the WBCTRLA_DuplicateSearchPath
	    to a CLI, to be freed automatically later, you can
	    pass it back to WorkbenchControlA() to be released.

	WBCTRLA_GetDefaultStackSize (ULONG *) -- Get the default stack
	    size used by Workbench when launching Shell programs
	    or programs without a valid stack size number.

	    The default stack size is 4096 bytes.

	WBCTRLA_SetDefaultStackSize (ULONG) -- Set the default stack
	    size used by Workbench when launching Shell programs
	    or programs without a valid stack size number. You cannot
	    set a stack size number smaller than 4096 bytes

	WBCTRLA_RedrawAppIcon (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                 *) -- This tag will cause
	    Workbench to redraw an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/workbench/workbench.h">AppIcon</ulink>
                . Note that due to which state
	    the Workbench is currently in, it may refuse to redraw the
	    icon.

	WBCTRLA_GetProgramList (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 **) -- You can obtain a list
	    of currently running Workbench programs; every entry of this
	    list will have the complete path to the program and the
	    program name in its Node-&gt;ln_Name. When you no longer need
	    the list, don't forget to free it again using the tag
	    WBCTRLA_FreeProgramList.

	    Note that the list you will receive may be empty. Be
	    prepared to handle this.

	WBCTRLA_FreeProgramList (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *) -- With this tag you can
	    free the list allocated by the WBCTRLA_GetProgramList tag.

	WBCTRLA_GetSelectedIconList (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 **) -- You can obtain a
	    list of currently selected icons; every entry of this
	    list will have the complete path to the icon and the
	    icon name in its Node-&gt;ln_Name. Some icons do not enter the
	    list, such as AppIcons. When you no longer need the list,
	    don't forget to free it again using the tag
	    WBCTRLA_FreeSelectedIconList.

	    Note that the list you will receive may be empty. Be
	    prepared to handle this.

	WBCTRLA_FreeSelectedIconList (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *) -- With this tag
	    you can free the list allocated by the
	    WBCTRLA_GetSelectedIconList tag.

	WBCTRLA_GetOpenDrawerList (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 **) -- You can obtain a
	    list of currently open drawers and volumes; every entry of this
	    list will have the complete drawer path name in its Node-&gt;ln_Name.
	    When you no longer need the list, don't forget to free it
	    again using the tag WBCTRLA_FreeOpenDrawerList.

	    Note that the list you will receive may be empty. Be
	    prepared to handle this.

	WBCTRLA_FreeOpenDrawerList (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *) -- With this tag
	    you can free the list allocated by the
	    WBCTRLA_GetOpenDrawerList tag.

	WBCTRLA_AddHiddenDeviceName (STRPTR) -- Name of a device which
	    Workbench should not display a disk or device icon for.
	    Any such device will be effectively hidden from the Workbench
	    backdrop. The name must include a terminating colon character,
	    such as in "DF0:".

	    Note that adding new entries to this list may not immediately
	    take effect.

	WBCTRLA_RemoveHiddenDeviceName (STRPTR) -- Name of a device on
	    the list of devices to be hidden which should be removed.
	    The name must include a terminating colon character,
	    such as in "DF0:". Trying to remove an entry from the list
	    that is not on it will have no effect.

	    Note that removing entries from this list may not immediately
	    take effect.

	WBCTRLA_GetHiddenDeviceList (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 **) -- This will obtain
	    the list of devices whose contents which Workbench will not
	    display.

	    Note that the list you will receive may be empty. Be
	    prepared to handle this.

	WBCTRLA_FreeHiddenDeviceList (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 *) -- With this tag
	    you can free the list allocated by the
	    WBCTRLA_GetHiddenDeviceList tag.

	WBCTRLA_GetTypeRestartTime (ULONG *) -- Get the number of seconds
	    that have to pass before typing the next character in a drawer
	    window will restart with a new file name.

	WBCTRLA_SetTypeRestartTime (ULONG) -- Set the number of seconds
	    that have to pass before typing the next character in a drawer
	    window will restart with a new file name. You must specify a
	    number greater than 0. Default type restart time is 3 seconds.

   RESULTS
	result -- FALSE if the requested action could not be performed,
	    TRUE otherwise. If FALSE is returned, you can query the error
	    code using 
                <link linkend="n106">dos.library/IoErr()</link>
                .

   NOTES
	If this function returns FALSE, the expected result is undefined.
	For example, if you tried to obtain the list of currently running
	programs via the WBCTRLA_GetProgramList tag and WorkbenchControl()
	failed with an error code, do not expect the 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 pointer you
	passed in to be initialized.

	This function may only be called by a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">Process</ulink>
                .

	This function may not process all tags if the Workbench is not
	currently open. For V44, the following tags are support if
	Workbench is closed:

	    WBCTRLA_SetDefaultStackSize
	    WBCTRLA_GetDefaultStackSize
	    WBCTRLA_FreeHiddenDeviceList
	    WBCTRLA_GetHiddenDeviceList
	    WBCTRLA_AddHiddenDeviceName
	    WBCTRLA_RemoveHiddenDeviceName
	    WBCTRLA_SetTypeRestartTime
	    WBCTRLA_GetTypeRestartTime

   EXAMPLE
	/* Obtain a copy of the Workbench search path list, then
	 * release it again.
	 */
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dos.h">BPTR</ulink>
                 pathList;

	if(WorkbenchControl(NULL,
	    WBCTRLA_DuplicateSearchPath,&amp;pathList,
	TAG_DONE))
	{
	    WorkbenchControl(NULL,
	        WBCTRLA_FreeSearchPath,pathList,
	    TAG_DONE);
	}

	/* Check if the drawer "SYS:" is open. */
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 isOpen;

	if(WorkbenchControl("SYS:",
	    WBCTRLA_IsOpen,&amp;isOpen,
	TAG_DONE))
	{
	    Printf("Drawer \"SYS:\" is %s.\n",
	        isOpen ? "open" : "closed");
	}

	/* Print the list of all currently running
	 * Workbench programs, then free the list again.
	 */
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/lists.h">List</ulink>
                 * list;

	if(WorkbenchControl(NULL,
	    WBCTRLA_GetProgramList,&amp;list,
	TAG_DONE))
	{
	    struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/nodes.h">Node</ulink>
                 * node;

	    for(node = list-&gt;lh_Head ;
	        node-&gt;ln_Succ != NULL ;
	        node = node-&gt;ln_Succ)
	    {
	        Printf("%s\n",node-&gt;ln_Name);
	    }

	    WorkbenchControl(NULL,
	        WBCTRLA_FreeProgramList,list,
	    TAG_DONE);
	}

   SEE ALSO
	
                <link linkend="n90">dos.library/FreeDosObject</link>
                	
                <link linkend="n106">dos.library/IoErr</link>
                	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/dos/dosextens.h">&lt;dos/dosextens.h&gt;</ulink>
                
            </literallayout>
        </section>
    </chapter>
    <chapter>
        <title>keymap</title>
        <section id="n848">
            <title>keymap.doc</title>
            <literallayout class="monospaced">
                    
                <link linkend="n849"> AskKeyMapDefault() </link>
                    
                <link linkend="n850"> MapANSI() </link>
                    
                <link linkend="n851"> MapRawKey() </link>
                    
                <link linkend="n852"> SetKeyMapDefault() </link>
            </literallayout>
        </section>
        <section id="n849">
            <title>keymap.library/AskKeyMapDefault</title>
            <literallayout class="monospaced">
                   NAME
	AskKeyMapDefault -- Ask for a pointer to the current default
	                    keymap. (V36)

   SYNOPSIS
	keyMap = AskKeyMapDefault()

	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">KeyMap</ulink>
                 *AskKeyMapDefault( VOID );

   FUNCTION
	Return a pointer to the keymap used by the keymap library for
	
                <link linkend="n851">MapRawKey</link>
                 and 
                <link linkend="n850">MapANSI</link>
                 when a keymap is not specified.

   RESULTS
	keyMap - a pointer to a keyMap structure.  This key map is
	    guaranteed to be permanently allocated: it will remain in
	    memory till the machine is reset.

   BUGS
	The keymap.h include file should be in the libraries/ or perhaps
	resources/ directory, but is in the devices/ directory for
	compatibility reasons.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">devices/keymap.h</ulink>
                , 
                <link linkend="n852">keymap.library/SetKeyMapDefault()</link>
                ,
	console.device ...KEYMAP functions

            </literallayout>
        </section>
        <section id="n850">
            <title>keymap.library/MapANSI</title>
            <literallayout class="monospaced">
                   NAME
	MapANSI -- Encode an ANSI string into keycodes. (V36)

   SYNOPSIS
	actual = MapANSI( string, count, buffer, length, keyMap )
	D0                A0      D0     A1      D1      A2

	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                 MapANSI( 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">LONG</ulink>
                , struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">KeyMap</ulink>
                 * );

   FUNCTION
	This console function converts an ANSI byte string to the
	code/qualifier pairs of type IECLASS_RAWKEY that would
	generate the string and places those pairs in a buffer.
	A code/qualifier pair is a pair of bytes suitable for
	putting in the ie_Code and low byte of ie_Qualifier,
	and for subsequent events, shifted to the ie_Prev1DownCode/
	ie_Prev1DownQual then ie_Prev2DownCode/ie_Prev2DownQual
	pairs for any dead or double dead key mapping.


   INPUTS
	string - the ANSI string to convert.
	count - the number of characters in the string.
	buffer - a byte buffer large enough to hold all anticipated
	    code/qualifier pairs generated by this conversion.
	length - maximum anticipation, i.e. the buffer size in bytes
	    divided by two (the size of the code/qualifier pair).
	keyMap - a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">KeyMap</ulink>
                 structure pointer, or null if the default
	    key map is to be used.

   RESULT
	actual - the number of code/qualifier pairs in the buffer,
	    or negative to describe an error (see below).

   EXAMPLE
	...
	#include 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">&lt;devices/inputevent.h&gt;</ulink>
                	#define	STIMSIZE	3	/* two dead keys, one key */
	unsigned char rBuffer[STIMSIZE*2];
	...
	    KeymapBase = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/libraries.h">Library</ulink>
                 *) OpenLibrary("keymap.library", 0);
	    ...
	    event.ie_NextEvent = 0;
	    event.ie_Class = IECLASS_RAWKEY;
	    event.ie_SubClass = 0;

	    /* prove keymap code completeness and MapANSI reversibility */
	    for (code = 0; code &lt; 256; code++) {
		buffer[0] = code;
		actual = MapANSI(buffer, 1, rBuffer, STIMSIZE, 0);
		r = rBuffer;
		event.ie_Prev2DownCode = 0;
		event.ie_Prev2DownQual = 0;
		event.ie_Prev1DownCode = 0;
		event.ie_Prev1DownQual = 0;
		switch (actual) {
		    case -2:
			printf("MapANSI internal error");
			goto reportChar;
		    case -1:
			printf("MapANSI overflow error");
			goto reportChar;
		    case 0:
			printf("MapANSI ungeneratable code");
			goto reportChar;

		    case 3:
			event.ie_Prev2DownCode = *r++;
			event.ie_Prev2DownQual = *r++;
		    case 2:
			event.ie_Prev1DownCode = *r++;
			event.ie_Prev1DownQual = *r++;
		    case 1:
			event.ie_Code = *r++;
			event.ie_Qualifier = *r;

			actual = MapRawKey(&amp;event, buffer, BUFFERLEN, 0);
			if ((actual != 1) || (buffer[0] != code)) {
			    printf("MapANSI not reversible");
			    for (i = 0; i &lt; actual; i++)
				ReportChar(buffer[i]);
			    printf(" from");
	reportChar:
			    ReportChar(code);
			    printf("\n");
			}
		}
	    }
	...

   ERRORS
	if actual is 0, a character in the string was not generatable
	    from the keyMap.
	if actual is -1, a buffer overflow condition was detected.
	if actual is -2, an internal error occurred (e.g. no memory)

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">devices/inputevent.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">devices/keymap.h</ulink>
                
            </literallayout>
        </section>
        <section id="n851">
            <title>keymap.library/MapRawKey</title>
            <literallayout class="monospaced">
                   NAME
	MapRawKey -- Decode single raw key input event to an ANSI
	             string. (V36)

   SYNOPSIS
	actual = MapRawKey(event, buffer, length, keyMap)
	D0                 A0     A1      D1      A2

	WORD MapRawKey( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 *, 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/exec/types.h">STRPTR</ulink>
                , WORD,
	    struct Keymap * );

   FUNCTION
	This console function converts input events of type
	IECLASS_RAWKEY to ANSI bytes, based on the keyMap, and
	places the result into the buffer.

   INPUTS
	event -  an 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 structure pointer.  The event list is
	    not traversed.
	buffer - a byte buffer large enough to hold all anticipated
	    characters generated by this conversion.
	length - maximum anticipation, i.e. the buffer size in bytes.
	keyMap - a 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">KeyMap</ulink>
                 structure pointer, or null if the default
	    key map is to be used.

   RESULT
	actual - the number of characters in the buffer, or -1 if
	    a buffer overflow was about to occur.

   EXAMPLE
	...
	#define	BUFFERLEN	80	/* length of longest expected mapping /*
	char buffer[BUFFERLEN];
	struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">InputEvent</ulink>
                 ie;
	...
	    KeymapBase = OpenLibrary("keymap.library", 0);
	    ...
	    ie.ie_Class = IECLASS_RAWKEY;
	    ie.ie_SubClass = 0;
	    for (;;) {
		WaitPort(window-&gt;UserPort);
		while (im = (struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/intuition/intuition.h">IntuiMessage</ulink>
                 *) GetMsg(window-&gt;UserPort)) {
		    switch (im-&gt;Class) {
			case RAWKEY:
			    ie.ie_Code = im-&gt;Code;
			    ie.ie_Qualifier = im-&gt;Qualifier;
			    /* recover dead key codes &amp; qualifiers */
			    ie.ie_EventAddress = (APTR *) *((ULONG *)im-&gt;IAddress);
			    actual = MapRawKey(&amp;ie, buffer, BUFFERLEN, 0);
			    for (i = 0; i &lt; actual; i++)
				ReportChar(buffer[i]);
			    break;
			...
		    }
		    ...
		}
	    }

   ERRORS
	if actual is -1, a buffer overflow condition was detected.
	Not all of the characters in the buffer are valid.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/inputevent.h">devices/inputevent.h</ulink>
                , 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">devices/keymap.h</ulink>
                
            </literallayout>
        </section>
        <section id="n852">
            <title>keymap.library/SetKeyMapDefault</title>
            <literallayout class="monospaced">
                   NAME
	SetKeyMapDefault -- Set the current default keymap. (V36)

   SYNOPSIS
	SetKeyMapDefault(keyMap)

	void SetKeyMapDefault( struct 
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">KeyMap</ulink>
                 * );

   FUNCTION
	A pointer to key map specified is cached by the keymap library
	for use by 
                <link linkend="n851">MapRawKey</link>
                 and 
                <link linkend="n850">MapANSI</link>
                 when a keymap is not specified.

   INPUTS
	keyMap - a pointer to a keyMap structure.  This key map must be
	    permanently allocated: it must remain in memory till the
	    machine is reset.  It is appropriate that this keyMap be a
	    node on the keymap.resource list.

   BUGS
	The keymap.h include file should be in the libraries/ or perhaps
	resources/ directory, but is in the devices/ directory for
	compatability reasons.

   SEE ALSO
	
                <ulink url="file://localhost/home/sembiance/tmp/test/Includes_and_Autodocs_3.5/include/devices/keymap.h">devices/keymap.h</ulink>
                , 
                <link linkend="n849">keymap.library/AskKeyMapDefault()</link>
                ,
	console.device ...KEYMAP functions

            </literallayout>
        </section>
    </chapter>
</book>
