/*
 *  Stubbed out IL routines
 */

#include <xr/BasicTypes.h>
#include <xr/IncrementalLoad.h>
#include <xr/IncrementalLoadPrivate.h>
#include <xr/sMisc.h>

extern void
XR←ILEnumerateUndefinedSyms(func, clientData)
    bool (*func)(/* XR←SymEntry se, void *clientData */);
    void *clientData;
{
	SPCR←NotImplemented("XR←ILEnumerateUndefinedSyms");
}

extern XR←ILFileEntry
XR←ILGetPrevFileEntry(ilfe)
XR←ILFileEntry ilfe;
{
	SPCR←NotImplemented("XR←ILGetPrevFileEntry");
	return 0;
}

typedef int (*Installer←Func)();

extern Installer←Func
load←file(loading←file←name, func←name, check, nodebugger)
    char *loading←file←name;
    char *func←name;
    bool check;
    bool nodebugger;
{
	SPCR←NotImplemented("load←file");
	return 0;
}

caddr←t
get←sym←val(which)
    char *which;
{
	SPCR←NotImplemented("get←sym←val");
	return 0;
}

extern XR←ILError
XR←ILLoadFile(fName, fOffset, fMagic,
        refProc, refClientData, defProc, defClientData,
        commonProc, commonClientData, patchSizeProc, patchSizeClientData)
    char *fName;
    long fOffset;
    unsigned fMagic;
    XR←ILContinueAction (*refProc)(/*
        char *sym,
        XR←ILSymEntry ilseOld,
        void *clientData
    */);
    char *refClientData;
    XR←ILContinueAction (*defProc)(/*
        XR←ILSymEntry ilseNew,
        XR←ILSymEntry ilseOld,
        void *clientData
    */);
    char *defClientData;
    XR←ILContinueAction (*commonProc)(/*←
        char *sym,
        unsigned size,
        XR←ILSymEntry ilseOld,
        void *clientData
    */);
    char *commonClientData;
    void (*patchSizeProc)(/*
        XR←ILFileEntry ilfe,
        void *clientData
    */);
    char *patchSizeClientData;
{
	SPCR←NotImplemented("XR←ILLoadFile");
	return 0;
}

XR←ILSymEntry
XR←ILGetPrevSymEntry(ilse, externOnly)
        XR←ILSymEntry ilse;
        bool externOnly;
{
	SPCR←NotImplemented("XR←ILGetPrevSymEntry");
        return 0;
}

XR←ILSymEntry
XR←ILGetMatchingSymEntryByValue(
    ilse, val, wantedTypes, ignoredClasses, numToSkip
)
    XR←ILSymEntry ilse;
    unsigned val;
    unsigned wantedTypes;
    unsigned ignoredClasses;
    int numToSkip;
{
    SPCR←NotImplemented("XR←ILGetMatchingSymEntryByValue");
    return 0;
}


XR←ILLookupSymEntry(sym, externOnly)
char *sym;
bool externOnly;
{
	SPCR←NotImplemented("XR←ILGetPrevSymEntry");
	return 0;
}

XR←ILLookupSymEntryByValue(sym, externOnly)
char *sym;
bool externOnly;
{
	SPCR←NotImplemented("XR←ILGetPrevSymEntryByValue");
	return 0;
}

XR←ILError
XR←AbortIncrementalLoad()
{
	SPCR←NotImplemented("XR←AbortIncrementalLoad");
	return 0;
}

static int loadStateLocked = 0;

XR←ILError
XR←UnlockIncrementalLoadState()
{
	if (!loadStateLocked) {
		SPCR←error("Load state inappropriately unlocked");
	}
	loadStateLocked = 0;
	return 0;
}

XR←ILError
XR←LockIncrementalLoadState()
{
	if (loadStateLocked) {
		SPCR←error("Load state locked twice");
	}
	loadStateLocked = 1;
	return 0;
}

XR←ILError
XR←CommitIncrementalLoad()
{
	SPCR←NotImplemented("XR←CommitIncrementalLoad");
	return 0;
}


bool
XR←lib←symfind(sym, libfd, liboffset, magic, modulename)
char *sym;
XR←Fildes *libfd;
long *liboffset;
long *magic;
char **modulename;
{
	SPCR←NotImplemented("XR←lib←symfind");
	return 1;
}