About
Docs
Files
Support
Index

Essentials
AutoDocs
Library functions
Cooperate
Process mastering
Debug
Own debugging kit
FGE
Smart modeid pick
Loader
Shared lib. loader
Macros
Helper macros
Structs
All the structures
Logs
Library changelogs
Tools
Progs baked inside

MACROS
LP2IEEE()A
QBASEASSIGN()A
QBASEASSIGN2()A
QBASEDECL()A
QBASEDECL2()A
QBASEJUMPTAB()A
QBASELOCAL()A
QBASEPOINTER()A
QBASERESOLVE()A
QBASESLOTS()A
QDEV_HLP_ASMDIVU()A
QDEV_HLP_ASMMULU()A
QDEV_HLP_DELTAITER()A
QDEV_HLP_DELTASCAN()A
QDEV_HLP_DFUNC()A
QDEV_HLP_DIVUQUAD()A
QDEV_HLP_DSTOTV()A
QDEV_HLP_GETREG()A
QDEV_HLP_ISLISTEMPTY()A
QDEV_HLP_ITERATE()A
QDEV_HLP_MULUQUAD()A
QDEV_HLP_NOINTSEC()A
QDEV_HLP_NOSWITCH()A
QDEV_HLP_PROCDECL()A
QDEV_HLP_PROCEXIT()A
QDEV_HLP_REMOTE()A
QDEV_HLP_RESGLOB()A
QDEV_HLP_SETREG()A
QDEV_HLP_TASKDECL()A
QDEV_HLP_TVTODS()A
REGARG()A
REGVAR()A
__LOADA4()A
__SAVEA4()A
QDEVDEBUG()P
QDEVDEBUGIO()P
MFADD()I
MFCGE()I
MFCLE()I
MFCMP()I
MFDIV()I
MFFIX()I
MFFLT()I
MFMUL()I
MFSUB()I
MFVALUE()I
QDEV_HLP_ABS()I
QDEV_HLP_ADDTV()I
QDEV_HLP_ASMALIAS()I
QDEV_HLP_ASMENTRY()I
QDEV_HLP_BADDR()I
QDEV_HLP_BYTESPERROW()I
QDEV_HLP_EQUALIZEUC()I
QDEV_HLP_EQUALIZELC()I
QDEV_HLP_E_DIVULONG10()I
QDEV_HLP_FFPTOIEEE()I
QDEV_HLP_FLIP()I
QDEV_HLP_FNV32CSUM()I
QDEV_HLP_FNV32HASH()I
QDEV_HLP_IEEETOFFP()I
QDEV_HLP_LCOPYMEM()I
QDEV_HLP_LSHIFT64()I
QDEV_HLP_MAX()I
QDEV_HLP_MIN()I
QDEV_HLP_MKBADDR()I
QDEV_HLP_MKSTR()I
QDEV_HLP_MULU32X32()I
QDEV_HLP_N_DIVULONG10()I
QDEV_HLP_N_MULUXXX10()I
QDEV_HLP_NEG()I
QDEV_HLP_QUICKFILL()I
QDEV_HLP_SWAPQUAD()I
QDEV_HLP_POPCOUNT()I
QDEV_HLP_RASSIZE()I
QDEV_HLP_ROUNDPOW2()I
QDEV_HLP_RSHIFT64()I
QDEV_HLP_SUBTV()I
QDEV_HLP_SWAPLONG()I
QDEV_HLP_SWAPQUAD()I
QDEV_HLP_SWAPWORD()I



Q
B
A
S
E
D
E
C
L
(
)

SOURCE: qdev_macros.txt 1.16 (12/09/2014) English

                                 AMIGA - PUBLIC
 ----------------------------------------------------------------------------

   NAME

      QBASEDECL() - In-function (internal) library base decl.
                    macro.



   SYNOPSIS

      QBASEDECL(t, b, i...);

      QBASEDECL(<type>, <base_name>, [init_value]);



   FUNCTION

      This macro allows to declare (function private) library
      base as cached. When LBS(Local Base Support) is enabled
      then this macro assigns proper pointers to so called
      main and local bases.



   INPUTS

      t - Library specific structure/type (struct Library *). 

      b - Base name/symbol.

      i - QBASEPOINTER(xxxBase). Do not pass NULL nor random
          pointers!



   RETURNS

      No output.



   BASES

      None.



   NOTES

      If you want to be able to alter jump table of some lib.
      at runtime for use in current context only and you need
      to cache library bases because they may be unavailable
      as globals at some point then use this macro so that
      inlines will not reference global symbols.



   SEE ALSO

      QBASEDECL2(), QBASEASSIGN2(), QBASEASSIGN(),
      QBASELOCAL(), QBASEPOINTER(), QBASEJUMPTAB(),
      QBASESLOTS(), QBASERESOLVE()



   EXAMPLE

      #include <qlbs.h>     // This must be the first header!

      #include <proto/exec.h>
      #include <proto/dos.h>
      #include <qdev.h>

      /*
       * Suppose you need to cache DOSBase for some reason.
      */
      struct mycache
      {
        struct DosLibrary *mc_dos;
      };

      struct mycache *docache(void)
      {
        struct mycache *mc;

        if ((mc =
              AllocVec(sizeof(struct mycache), MEMF_PUBLIC)))
        {
          /*
           * You want to cache the alias which is resolvable
           * with QBASEPOINTER(). The reason for doing this
           * is that it may provide custom jump table.
          */
          mc->mc_dos = QBASEPOINTER(DOSBase);
        }

        return mc;
      }

      /*
       * Then you want to call "dos.library" function using
       * that cached base.
      */
      LONG Output_cached(struct mycache *mc)
      {
        /*
         * What happens here is that if 'qlbs.h' was included
         * then there are two declarations! One is 'DOSBase'
         * (main) and the other is 'L_DOSBase' that points at
         * redefinable alias which is used in a function call.
        */
        QBASEDECL(struct DosLibrary *, DOSBase, mc->mc_dos);

        return Output();
      }



   BUGS

      None known.



 ----------------------------------------------------------------------------
    


No more fear cus pure HTML is here!
Copyright (C) 2013-2014 by Burnt Chip Dominators