Home MagiCMagiC The task-manager of MagiCThe task-manager of MagiC Threads in MagiCThreads in MagiC

11.17 Test for MagiC

/*  The following code tess whether MagiC is installed, and returns
    one of the following values:

    -1 = No MagiC present
    -2 = MagiC installed, but MagiC-AES inactive, i.e. MagiC is only
         being used as a fast filesystem
    >0 = MagiC present and MagiC-AES active. The return value contains
         the BCD-coded version number  */

GLOBAL WORD InqMagX (VOID)
{
    MAGX_COOKIE *cv;

    if (get_cookie ("MagX", (LONG) &cv))
    {
        if (cv->aesvars)
            return (cv->aesvars->version);
        else
           return (-2);
    }
    else
       return (-1);
} /* InqMagX */

Note: Programs launched from the AUTO folder can not obtain MagiC's version number with the aid of this routine, since the AES is not yet initialized at boot-time. In this case one should fall back on the function DoMagixAESVars.

See also: Cookie jar   Cookie and XBRA list


Home MagiCMagiC The task-manager of MagiCThe task-manager of MagiC Threads in MagiCThreads in MagiC