home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
back2roots/padua
/
padua.7z
/
padua
/
ftp.vapor.com
/
microdot-1
/
md1_src_02.lzx
/
autoopenfail.c
< prev
next >
Wrap
C/C++ Source or Header
|
2014-05-19
|
965b
|
45 lines
#include <proto/dos.h>
#include <proto/exec.h>
#include <string.h>
extern struct WBStartup *_WBenchMsg;
extern char __stdiowin[];
extern long __oslibversion;
#define WS(x) Write( fh, x, strlen( x ) )
void __regargs __autoopenfail(char *lib)
{
struct DOSBase *DOSBase;
long fh;
char buf[50];
DOSBase = (struct DOSBase *)OldOpenLibrary("dos.library");
if (_WBenchMsg == NULL)
fh = Output();
else
fh = Open(__stdiowin, MODE_NEWFILE);
if (fh)
{
RawDoFmt("Ben÷tige (mindestens) V%ld der ",
&__oslibversion, (void (*))"\x16\xC0\x4E\x75", buf);
Write(fh, buf, strlen(buf));
Write(fh, lib, strlen(lib));
Write(fh, "\n", 1);
if (_WBenchMsg)
{
Delay(200);
Close(fh);
}
}
CloseLibrary((struct Library *)DOSBase);
((struct Process *)FindTask(NULL))->pr_Result2 =
ERROR_INVALID_RESIDENT_LIBRARY;
}