| Q B A S E D E C L 2 ( )
| | | | | SOURCE: qdev_macros.txt 1.16 (12/09/2014) English AMIGA - PUBLIC
----------------------------------------------------------------------------
NAME
QBASEDECL2() - In-function (internal) library base decl.
macro.
SYNOPSIS
QBASEDECL2(t, b, i...);
QBASEDECL2(<type>, <base_name>, [init_value]);
FUNCTION
This macro is similar to QBASEDECL() except that it does
not try to resolve main base out of local base.
INPUTS
t - Library specific structure/type (struct Library *).
b - Base name/symbol.
i - Initial val/pointer. In most cases it will be NULL
or nothing if 'b' must stay uninitialised.
RETURNS
No output.
BASES
None.
NOTES
Use this macro in conjunction with QBASEASSIGN2() when
you need to reload library base addrs sometime later.
SEE ALSO
QBASEDECL(), QBASEASSIGN(), QBASEASSIGN2(),
QBASELOCAL(), QBASEPOINTER(), QBASEJUMPTAB(),
QBASESLOTS(), QBASERESOLVE()
EXAMPLE
#include <qlbs.h>
#include <proto/exec.h>
#include <qdev.h>
/*
* You may have noticed that in this example the use
* of QBASEDECL2() is not necessary since there is just
* one func. that cannot take an advantage of alternate
* jumptable anyway. Note however that in case when some
* other routine references global base you must define
* through macro or 'AvailMem()' will be called using
* globally available base!
*/
LONG myAvailMem(void)
{
QBASEDECL2(struct ExecBase *, SysBase);
QBASEASSIGN2(SysBase, (*((struct ExecBase **)4)));
return AvailMem(MEMF_PUBLIC);
}
BUGS
None known.
----------------------------------------------------------------------------
| |
| |