mirror of
https://github.com/rvtr/ctr_firmware.git
synced 2025-10-31 07:51:08 -04:00
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@145 b871894f-2f95-9b40-918c-086798483c85
92 lines
3.2 KiB
C
92 lines
3.2 KiB
C
/*---------------------------------------------------------------------------*
|
|
Project: CtrBrom - OS - incldue
|
|
File: printf.h
|
|
|
|
Copyright 2008 Nintendo. All rights reserved.
|
|
|
|
These coded instructions, statements, and computer programs contain
|
|
proprietary information of Nintendo of America Inc. and/or Nintendo
|
|
Company Ltd., and are protected by Federal copyright law. They may
|
|
not be disclosed to third parties or copied or duplicated in any form,
|
|
in whole or in part, without the prior written consent of Nintendo.
|
|
|
|
$Date:: $
|
|
$Rev$
|
|
$Author$
|
|
*---------------------------------------------------------------------------*/
|
|
#ifndef BROM_OS_COMMON_PRINTF_H_
|
|
#define BROM_OS_COMMON_PRINTF_H_
|
|
|
|
#include <stddef.h>
|
|
#include <stdarg.h>
|
|
#include <brom/types.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
//
|
|
// Prototypes
|
|
//
|
|
#ifndef SDK_FINALROM
|
|
//void osPutString(const char *str);
|
|
extern void (*osPutString) (const char *str);
|
|
#else
|
|
#define osPutString(x) ((void)0)
|
|
#endif
|
|
|
|
int osSPrintf(char *dst, const char *fmt, ...);
|
|
int osVSPrintf(char *dst, const char *fmt, va_list vlist);
|
|
int osSNPrintf(char *dst, size_t len, const char *fmt, ...);
|
|
int osVSNPrintf(char *dst, size_t len, const char *fmt, va_list vlist);
|
|
|
|
#ifndef SDK_FINALROM
|
|
void osPutChar(char c);
|
|
void osVPrintf(const char *fmt, va_list vlist);
|
|
void osTVPrintf(const char *fmt, va_list vlist);
|
|
void osPrintf(const char *fmt, ...);
|
|
void osTPrintf(const char *fmt, ...);
|
|
#ifndef SDK_NO_MESSAGE
|
|
void i_osWarning(const char *file, int line, const char *fmt, ...);
|
|
void i_osTWarning(const char *file, int line, const char *fmt, ...);
|
|
void i_osPanic(const char *file, int line, const char *fmt, ...);
|
|
void i_osTPanic(const char *file, int line, const char *fmt, ...);
|
|
#else
|
|
void osTerminate();
|
|
#define i_osWarning( file, line, ... ) ((void)0)
|
|
#define i_osTWarning( file, line, ... ) ((void)0)
|
|
#define i_osPanic( file, line, ... ) osTerminate()
|
|
#define i_osTPanic( file, line, ... ) osTerminate()
|
|
#endif
|
|
|
|
#define osWarning( ... ) i_osWarning( __FILE__, __LINE__, __VA_ARGS__ );
|
|
#define osPanic( ... ) i_osPanic( __FILE__, __LINE__, __VA_ARGS__ );
|
|
#define osTWarning( ... ) i_osTWarning( __FILE__, __LINE__, __VA_ARGS__ );
|
|
#define osTPanic( ... ) i_osTPanic( __FILE__, __LINE__, __VA_ARGS__ );
|
|
|
|
#else
|
|
//---- invalidate debug functions when FINALROM
|
|
#define osPutChar( ... ) ((void)0)
|
|
#define osVPrintf( fmt, ... ) ((void)0)
|
|
#define osPrintf( ... ) ((void)0)
|
|
#define i_osWarning( file, line, ... ) ((void)0)
|
|
#define i_osPanic( file, line, ... ) osTerminate()
|
|
#define osWarning( ... ) ((void)0)
|
|
#define osPanic( ... ) osTerminate()
|
|
|
|
#define osTVPrintf( fmt, ... ) ((void)0)
|
|
#define osTPrintf( ... ) ((void)0)
|
|
#define i_osTWarning( file, line, ... ) ((void)0)
|
|
#define i_osTPanic( file, line, ... ) osTerminate()
|
|
#define osTWarning( ... ) ((void)0)
|
|
#define osTPanic( ... ) osTerminate()
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
/* BROM_OS_COMMON_PRINTF_H_ */
|
|
#endif
|