mirror of
https://github.com/adtools/clib2.git
synced 2026-05-06 05:04:57 +00:00
Initial import into SourceForge CVS
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14685 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
151
library/debug_headers.h
Normal file
151
library/debug_headers.h
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* $Id: debug_headers.h,v 1.1.1.1 2004-07-26 16:30:27 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@sourcery.han.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _DEBUG_HEADERS_H
|
||||
#define _DEBUG_HEADERS_H
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#include <exec/libraries.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(__SASC)
|
||||
|
||||
#include <clib/exec_protos.h>
|
||||
/*#include <pragmas/exec_sysbase_pragmas.h>*/
|
||||
#include <pragmas/exec_pragmas.h>
|
||||
|
||||
LONG RawMayGetChar(VOID);
|
||||
VOID RawPutChar(UBYTE c);
|
||||
|
||||
#pragma libcall SysBase RawMayGetChar 1fe 00
|
||||
#pragma libcall SysBase RawPutChar 204 001
|
||||
|
||||
#endif /* __SASC */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(__amigaos4__)
|
||||
#include <exec/emulation.h>
|
||||
#endif /* __amigaos4__ */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
#define __NOLIBBASE__
|
||||
#include <proto/exec.h>
|
||||
|
||||
#ifndef __PPC__
|
||||
|
||||
#define RawMayGetChar() ({ \
|
||||
UBYTE _RawMayGetChar__re = \
|
||||
({ \
|
||||
register struct Library * const __RawMayGetChar__bn __asm("a6") = SysBase;\
|
||||
register UBYTE __RawMayGetChar__re __asm("d0"); \
|
||||
__asm volatile ("jsr a6@(-510:W)" \
|
||||
: "=r"(__RawMayGetChar__re) \
|
||||
: "r"(__RawMayGetChar__bn) \
|
||||
: "d1", "a0", "a1", "fp0", "fp1", "cc", "memory"); \
|
||||
__RawMayGetChar__re; \
|
||||
}); \
|
||||
_RawMayGetChar__re; \
|
||||
})
|
||||
|
||||
#define RawPutChar(c) ({ \
|
||||
ULONG _RawPutChar_c = (c); \
|
||||
{ \
|
||||
register struct Library * const __RawPutChar__bn __asm("a6") = SysBase;\
|
||||
register ULONG __RawPutChar_c __asm("d0") = (_RawPutChar_c); \
|
||||
__asm volatile ("jsr a6@(-516:W)" \
|
||||
: \
|
||||
: "r"(__RawPutChar__bn), "r"(__RawPutChar_c) \
|
||||
: "d0", "d1", "a0", "a1", "fp0", "fp1", "cc", "memory"); \
|
||||
} \
|
||||
})
|
||||
|
||||
#endif /* __PPC___ */
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#define SysBase (*(struct Library **)4)
|
||||
#define IExec ((struct ExecIFace *)((struct ExecBase *)SysBase)->MainInterface)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
extern LONG cmpstrexec(const char *source1, const char *source2);
|
||||
extern LONG KCmpStr(const char *source1, const char *source2);
|
||||
extern LONG KMayGetCh(VOID);
|
||||
extern LONG KMayGetChar(VOID);
|
||||
extern LONG kgetc(VOID);
|
||||
extern LONG kgetchar(VOID);
|
||||
extern LONG kgetch(VOID);
|
||||
extern LONG KGetCh(VOID);
|
||||
extern LONG KGetChar(VOID);
|
||||
extern LONG kgetnum(VOID);
|
||||
extern LONG KGetNum(void);
|
||||
extern VOID KDoFmt(const char *format_string, APTR data_stream, APTR put_char_routine, APTR put_char_data);
|
||||
extern VOID KPutFmt(const char *format, va_list arg);
|
||||
extern VOID KVPrintF(const char * format, va_list arg);
|
||||
extern VOID kvprintf(const char *format, va_list arg);
|
||||
extern VOID kprintf(const char *format, ...);
|
||||
extern VOID KPrintF(const char *format, ...);
|
||||
extern VOID kputc(UBYTE c);
|
||||
extern VOID kputchar(UBYTE c);
|
||||
extern VOID kputch(UBYTE c);
|
||||
extern VOID KPutCh(UBYTE c);
|
||||
extern VOID KPutChar(UBYTE c);
|
||||
extern VOID kputstr(const UBYTE *s);
|
||||
extern VOID KPutS(const UBYTE *s);
|
||||
extern VOID kputs(const UBYTE *s);
|
||||
extern VOID KPutStr(const UBYTE *s);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* _DEBUG_HEADERS_H */
|
||||
Reference in New Issue
Block a user