#include "include\cinterface"
typedef	TLnat4	TL_TL_priority_t;
struct	TL_TL_ExceptionInfo {
    TLint4	quitCode;
    TLint4	libraryQuitCode;
    TLstring	errorMsg;
};
typedef	TLnat1	__x368[1];
struct	TL_TL_HandlerArea {
    TLint4	quitCode;
    TLnat4	lineAndFile;
    TLaddressint	fileTable;
    struct TL_TL_HandlerArea	*nextHandler;
    __x368	savedState;
};
typedef	TLnat4	TL_TL_hardwarePriority_t;
typedef	TL_TL_hardwarePriority_t	TL_TL_lockStatus_t;
typedef	TLnat4	TL_TL_lock_t;
struct	TL_TL_link_t {
    struct TL_TL_ProcessDescriptor	*flink;
    struct TL_TL_ProcessDescriptor	*blink;
};
struct	TL_TL_ProcessDescriptor {
    TLnat4	lineAndFile;
    TLaddressint	fileTable;
    TLaddressint	stackLimit;
    TLaddressint	stackPointer;
    struct TL_TL_HandlerArea	*handlerQhead;
    struct TL_TL_HandlerArea	*currentHandler;
    TLaddressint	name;
    struct TL_TL_ExceptionInfo	exception;
    TLnat4	waitParameter;
    struct TL_TL_ProcessDescriptor	*monitorQlink;
    TLnat4	timeOutStatus;
    TLnat4	pid;
    TLaddressint	memoryBase;
    TLnat4	timeoutTime;
    TLnat4	timeoutEpoch;
    struct TL_TL_link_t	timeoutQ;
    TLboolean	timedOut;
    TLboolean	pausing;
    TL_TL_priority_t	dispatchPriority;
    struct TL_TL_ProcessDescriptor	*runQlink;
    TLboolean	ready;
    struct TL_TL_ProcessDescriptor	*tsyncWaiter;
    TLnat4	quantum;
    TLnat4	quantumCntr;
    TLnat4	devmonLevel;
    TLaddressint	otherInfo;
};

extern void TL_TLM_TLMUDUMP ();

extern void TL_TLB_TLBMAL ();

extern void TL_TLB_TLBMFR ();

extern void TL_TLB_TLBNWU ();

extern void TL_TLB_TLBFRU ();

extern void TL_TLI_TLIFS ();

extern void TL_TLI_TLIAON ();

extern void TL_TLI_TLIAOFF ();

extern void TL_TLI_TLIUDUMP ();

extern void TL_TLI_TLIFINI ();

extern void TL_TLE_TLELF ();
typedef	TLint4	TL_Cint;
extern TLboolean	TL_TLECU;
extern struct TL_TL_ProcessDescriptor	*TL_TLKPD;

void TL_TLQUIT ();

extern void TL_TLK_TLKINI ();

extern void TL_TLK_TLKFINI ();

extern void TL_TLK_TLKUXRS ();

extern void TL_TLK_TLKUXRE ();

extern void TL_TLK_TLKUEXIT ();

extern void TL_TLK_TLKUDMPP ();

extern void TL_TLK_TLKPFORK ();

extern TLboolean TL_TLK_TLKFRKED ();

extern void TL_TLK_TLKLKON ();

extern void TL_TLK_TLKLKOFF ();

extern void TL_TLK_TLKSSYNC ();

extern void TL_TLK_TLKSWAKE ();

extern void TL_TLK_TLKSTIMO ();

extern void TL_TLK_TLKCINI ();

extern TLnat4 TL_TLK_TLKPGETP ();

extern void TL_TLK_TLKPSETP ();

extern void TL_TLK_TLKIPINI ();

extern void TL_TLK_TLKIPENT ();

extern void TL_TLK_TLKIPEXT ();

extern TLboolean TL_TLK_TLKDMINI ();

extern void TL_TLK_TLKDMENT ();

extern void TL_TLK_TLKDMEXT ();

extern void TL_TLK_TLKPPAUS ();

extern void TL_TLX_TLXPID ();

extern void TL_TLX_TLXTIM ();

extern void TL_TLX_TLXATF ();

extern void TL_TLX_TLXDT ();

extern void TL_TLX_TLXTM ();

extern void TL_TLX_TLXCL ();

extern void TL_TLX_TLXSC ();

extern void TL_TLX_TLXGE ();

extern void TL_TLX_TLXSYS ();

extern void TL_TLA_TLAVES ();

extern void TL_TLA_TLAVFS ();

extern void TL_TLA_TLAVS8 ();

extern void TL_TLA_TLAVSI ();

extern void TL_TLA_TLAVSN ();
struct	TL_TLE_Place {
    TLnat4	lineAndFile;
    TLaddressint	fileTable;
};
extern struct TL_TL_HandlerArea	TL_TLE_TLEDEFHA;

extern void TL_TLE_TLEABT ();

extern void TL_TLE_TLETR_TLETRR ();

extern void TL_TLE_TLEDH ();
void TL_TLE_TLELF (lineAndFile, fileTable, lineNumber, fileName)
TLnat4	lineAndFile;
TLaddressint	fileTable;
TLnat4	*lineNumber;
TLaddressint	*fileName;
{
    typedef	TLchar	__x371[1];
    struct	FileTable {
    TLnat4	fileCount;
    __x371	fileNames;
};
    TLnat4	fileNumber;
    register TLaddressint	name;
    if ((lineAndFile == 0) || ((unsigned long) fileTable == 0)) {
	(*lineNumber) = 0;
	(*fileName) = (TLaddressint) 0;
	return;
    };
    fileNumber = lineAndFile / 100000;
    if ((fileNumber < 1) || (fileNumber > ((* (struct FileTable *) fileTable).fileCount))) {
	typedef	TLchar	__x374[26];
	typedef	__x374	__x373[1];
	static __x373	errorMsg = 
	    {"<Corrupted line and file>"};
	(*lineNumber) = 0;
	(*fileName) = (TLaddressint) ((unsigned long)errorMsg[0]);
    };
    (*lineNumber) = lineAndFile % 100000;
    name = (TLaddressint) ((unsigned long)(* (struct FileTable *) fileTable).fileNames);
    {
	register TLint4	count;
	TLint4	__x376;
	__x376 = fileNumber;
	count = 2;
	if (count <= __x376) {
	    for(;;) {
		for(;;) {
		    if (((* (TLchar *) name)) == '\0') {
			break;
		    };
		    name += 1;
		};
		name += 1;
		if (count == __x376) break;
		count++;
	    }
	};
    };
    (*fileName) = (TLaddressint) name;
}
