/*
    calls4.c - callbacks 040 through end (formerly in calls.c)

    Marc Wolfgram,  3/30/91 11:55:50
    ---------------------------------------------------------------
*/
#pragma noroot
#pragma keep "o/calls4"

#include "calls.h"
int userid(void);

segment "F_CALLBACK";

/*
    fGetKernalID 040
    ---------------------------------------------------------------
    Marc Wolfgram,  7/14/92 20:34:50
    0x0101 - 10/31/92 fColorPalette generalization
    0x0103 -  6/23/93 fGetFileName addition
*/
word remGetKernalID(long p)
{
    return SetToolError(0x0103);
}

/*
    fGetFileName 041
    ---------------------------------------------------------------
    Marc Wolfgram,  6/23/93 21:30:06
*/
word remGetFileName(fLoadFileRecPtr p)
{
word retVal;
long size;

    retVal = invalidPcount;

    if (p->pCount == 1) {
        size = GetHandleSize(workList[workIndex].pathName);
        p->fileData = NewHandle(GetHandleSize(size, userid(), 0x8018, 0L));
        retVal = toolerror();
        if (!retVal)
            HandToHand(workList[workIndex].pathName, p->fileData, size);
    }

    return SetToolError(retVal);
}
