/* added prototype defs for v6.0 17 Jan 93 mwr */ /* added fdprintf() & fkprintf() 26 Jun 93 mwr */ /* added protos for amiga.lib stdio; regargs 12 Nov 96 */ #include #include #include #include #include #include #include #include #include //#include #include "bars.h" extern struct Functions *functions; static void __stdargs __saveds kprintf(const char *string, long a, long b, long c, long d, long e, long f, long g, long h) { char buff[100]; #pragma msg 104 ignore push long file = Open("CONSOLE:",MODE_NEWFILE); #pragma msg 104 pop if (file) { #pragma msg 104 ignore push sprintf(buff,string,a,b,c,d,e,f,g,h); #pragma msg 104 pop Write(file,buff,strlen(buff)); Close(file); } } void __stdargs __saveds dprintf(const char *string, long a, long b, long c, long d, long e, long f, long g, long h) { #pragma msg 154 ignore push functions->doscall(kprintf,string,a,b,c,d,e,f,g,h); #pragma msg 154 pop } /* my versions to support writing to a file instead of con: */ static void __stdargs __saveds fkprintf(const char *string, long a, long b, long c, long d, long e, long f, long g, long h) { char buff[100]; #pragma msg 104 ignore push long file = Open("SD0:BP.dump",MODE_READWRITE); #pragma msg 104 pop if (file) { Seek(file,0,OFFSET_END); /* go to end of file */ #pragma msg 104 ignore push sprintf(buff,string,a,b,c,d,e,f,g,h); #pragma msg 104 pop Write(file,buff,strlen(buff)); Close(file); } } void __stdargs __saveds fdprintf(const char *string, long a, long b, long c, long d, long e, long f, long g, long h) { #pragma msg 154 ignore push functions->doscall(fkprintf,string,a,b,c,d,e,f,g,h); #pragma msg 154 pop }