FreeBSD/sys/boot/ficl/loader.c
/**************************************************************************
                        f i c l C o m p i l e P l a t f o r m
** Build FreeBSD platform extensions into the system dictionary
**************************************************************************/
f i c l C o m p i l e P l a t f o r m
Build FreeBSD platform extensions into the system dictionary
f i c l C o m p i l e P l a t f o r m Build FreeBSD platform extensions into the system dictionary
void ficlCompilePlatform(FICL_SYSTEM *pSys)
{
    FICL_DICT *dp = pSys->dp;
    assert (dp);
    dictAppendWord(dp, ".#",        displayCellNoPad,    FW_DEFAULT);
    dictAppendWord(dp, "isdir?",    isdirQuestion,  FW_DEFAULT);
    dictAppendWord(dp, "fopen",	    pfopen,	    FW_DEFAULT);
    dictAppendWord(dp, "fclose",    pfclose,	    FW_DEFAULT);
    dictAppendWord(dp, "fread",	    pfread,	    FW_DEFAULT);
    dictAppendWord(dp, "freaddir",  pfreaddir,	    FW_DEFAULT);
    dictAppendWord(dp, "fload",	    pfload,	    FW_DEFAULT);
    dictAppendWord(dp, "fkey",	    fkey,	    FW_DEFAULT);
    dictAppendWord(dp, "fseek",     pfseek,	    FW_DEFAULT);
    dictAppendWord(dp, "fwrite",    pfwrite,	    FW_DEFAULT);
    dictAppendWord(dp, "key",	    key,	    FW_DEFAULT);
    dictAppendWord(dp, "key?",	    keyQuestion,    FW_DEFAULT);
    dictAppendWord(dp, "ms",        ms,             FW_DEFAULT);
    dictAppendWord(dp, "seconds",   pseconds,       FW_DEFAULT);
    dictAppendWord(dp, "heap?",     freeHeap,       FW_DEFAULT);
    dictAppendWord(dp, "dictthreshold", ficlDictThreshold, FW_DEFAULT);
    dictAppendWord(dp, "dictincrease", ficlDictIncrease, FW_DEFAULT);
    dictAppendWord(dp, "setenv",    ficlSetenv,	    FW_DEFAULT);
    dictAppendWord(dp, "setenv?",   ficlSetenvq,    FW_DEFAULT);
    dictAppendWord(dp, "getenv",    ficlGetenv,	    FW_DEFAULT);
    dictAppendWord(dp, "unsetenv",  ficlUnsetenv,   FW_DEFAULT);
    dictAppendWord(dp, "copyin",    ficlCopyin,	    FW_DEFAULT);
    dictAppendWord(dp, "copyout",   ficlCopyout,    FW_DEFAULT);
    dictAppendWord(dp, "findfile",  ficlFindfile,   FW_DEFAULT);
    dictAppendWord(dp, "ccall",	    ficlCcall,	    FW_DEFAULT);
    dictAppendWord(dp, "uuid-from-string", ficlUuidFromString, FW_DEFAULT);
    dictAppendWord(dp, "uuid-to-string", ficlUuidToString, FW_DEFAULT);
#ifndef TESTMAIN
#ifdef __i386__
    dictAppendWord(dp, "outb",      ficlOutb,       FW_DEFAULT);
    dictAppendWord(dp, "inb",       ficlInb,        FW_DEFAULT);
#endif
#ifdef HAVE_PNP
    dictAppendWord(dp, "pnpdevices",ficlPnpdevices, FW_DEFAULT);
    dictAppendWord(dp, "pnphandlers",ficlPnphandlers, FW_DEFAULT);
#endif
#endif
#ifdef __i386__
    dictAppendWord(dp, "pcibios-device-count", ficlPciBiosCountDevices, FW_DEFAULT);
    dictAppendWord(dp, "pcibios-read-config", ficlPciBiosReadConfig, FW_DEFAULT);
    dictAppendWord(dp, "pcibios-write-config", ficlPciBiosWriteConfig, FW_DEFAULT);
    dictAppendWord(dp, "pcibios-find-devclass", ficlPciBiosFindDevclass, FW_DEFAULT);
    dictAppendWord(dp, "pcibios-find-device", ficlPciBiosFindDevice, FW_DEFAULT);
    dictAppendWord(dp, "pcibios-locator", ficlPciBiosLocator, FW_DEFAULT);
#endif
#if defined(PC98)
    ficlSetEnv(pSys, "arch-pc98",         FICL_TRUE);
#elif defined(__i386__)
    ficlSetEnv(pSys, "arch-i386",         FICL_TRUE);
    ficlSetEnv(pSys, "arch-powerpc",      FICL_FALSE);
#elif defined(__powerpc__)
    ficlSetEnv(pSys, "arch-i386",         FICL_FALSE);
    ficlSetEnv(pSys, "arch-powerpc",      FICL_TRUE);
#endif
    return;
}
void ficlCompilePlatform ( FICL_SYSTEM * pSys ) { FICL_DICT * dp = pSys -> dp ; assert ( dp ) ; dictAppendWord ( dp , " " , displayCellNoPad , FW_DEFAULT ) ; dictAppendWord ( dp , " " , isdirQuestion , FW_DEFAULT ) ; dictAppendWord ( dp , " " , pfopen , FW_DEFAULT ) ; dictAppendWord ( dp , " " , pfclose , FW_DEFAULT ) ; dictAppendWord ( dp , " " , pfread , FW_DEFAULT ) ; dictAppendWord ( dp , " " , pfreaddir , FW_DEFAULT ) ; dictAppendWord ( dp , " " , pfload , FW_DEFAULT ) ; dictAppendWord ( dp , " " , fkey , FW_DEFAULT ) ; dictAppendWord ( dp , " " , pfseek , FW_DEFAULT ) ; dictAppendWord ( dp , " " , pfwrite , FW_DEFAULT ) ; dictAppendWord ( dp , " " , key , FW_DEFAULT ) ; dictAppendWord ( dp , " " , keyQuestion , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ms , FW_DEFAULT ) ; dictAppendWord ( dp , " " , pseconds , FW_DEFAULT ) ; dictAppendWord ( dp , " " , freeHeap , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlDictThreshold , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlDictIncrease , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlSetenv , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlSetenvq , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlGetenv , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlUnsetenv , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlCopyin , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlCopyout , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlFindfile , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlCcall , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlUuidFromString , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlUuidToString , FW_DEFAULT ) ; #ifndef TESTMAIN #ifdef __i386__ dictAppendWord ( dp , " " , ficlOutb , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlInb , FW_DEFAULT ) ; #endif #ifdef HAVE_PNP dictAppendWord ( dp , " " , ficlPnpdevices , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlPnphandlers , FW_DEFAULT ) ; #endif #endif #ifdef __i386__ dictAppendWord ( dp , " " , ficlPciBiosCountDevices , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlPciBiosReadConfig , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlPciBiosWriteConfig , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlPciBiosFindDevclass , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlPciBiosFindDevice , FW_DEFAULT ) ; dictAppendWord ( dp , " " , ficlPciBiosLocator , FW_DEFAULT ) ; #endif #if defined ( PC98 ) ficlSetEnv ( pSys , " " , FICL_TRUE ) ; #elif defined ( __i386__ ) ficlSetEnv ( pSys , " " , FICL_TRUE ) ; ficlSetEnv ( pSys , " " , FICL_FALSE ) ; #elif defined ( __powerpc__ ) ficlSetEnv ( pSys , " " , FICL_FALSE ) ; ficlSetEnv ( pSys , " " , FICL_TRUE ) ; #endif return ; }
f i c l C o m p i l e P l a t f o r m
Build FreeBSD platform extensions into the system dictionary
f i c l C o m p i l e P l a t f o r m Build FreeBSD platform extensions into the system dictionary