home *** CD-ROM | disk | FTP | other *** search
- /* ======================================================================== */
- /* = Programmname : SimplePlay_Subs V1.5 = */
- /* = = */
- /* ======================================================================== */
- /* = Autor/Copyright : (c) 1990-94 by Andreas Ralph Kleinert. = */
- /* = All rights reserved. = */
- /* ======================================================================== */
- /* = Funktion : Sub-Routines for SimplePlay V1.5 = */
- /* = = */
- /* ======================================================================== */
- /* = Compiler : SAS/C V6.51 = */
- /* = = */
- /* ======================================================================== */
-
- #include <dos.h> /* to prevent multiple include, include this at FIRST ! */
-
- #include <exec/types.h>
- #include <exec/memory.h>
-
- #include <proto/exec.h>
- #include <proto/dos.h>
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-
-
- #define N (NULL) /* as usual */
-
-
- void __stdargs SP_Printf(char *formatstring, ...);
-
-
- /* *************************************************** */
- /* * * */
- /* * SP_Printf : Replacement for printf()-Output * */
- /* * * */
- /* *************************************************** */
-
- #define KIP_BUFLEN (1200)
-
- extern void Fmt(void);
-
- extern BPTR _Backstdout;
-
- void __stdargs SP_Printf(char *formatstring, ...)
- {
- UBYTE *buffer;
-
- buffer = (BYTE *) AllocMem(KIP_BUFLEN, MEMF_CLEAR);
- if(buffer)
- {
- RawDoFmt((APTR) formatstring, (APTR) (((ULONG *)&formatstring)+1), (APTR) &Fmt, (APTR) buffer);
-
- Write(Output(), buffer, strlen(buffer));
-
- FreeMem(buffer, KIP_BUFLEN);
- }
- }
-