VirtualBox

source: vbox/trunk/src/recompiler/InnoTek/crt/stdio.h@ 2981

Last change on this file since 2981 was 2981, checked in by vboxsync, 18 years ago

InnoTek -> innotek: all the headers and comments.

  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1/* $Id: stdio.h 2981 2007-06-01 16:01:28Z vboxsync $ */
2/** @file
3 * Our minimal stdio
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef __stdio_h__
23#define __stdio_h__
24
25#ifndef LOG_GROUP
26# define UNDO_LOG_GROUP
27#endif
28
29#include <VBox/log.h>
30
31#ifdef UNDO_LOG_GROUP
32# undef UNDO_LOG_GROUP
33# undef LOG_GROUP
34#endif
35
36#ifndef LOG_USE_C99
37# error "LOG_USE_C99 isn't defined."
38#endif
39
40__BEGIN_DECLS
41
42typedef struct FILE FILE;
43
44DECLINLINE(int) fprintf(FILE *ignored, const char *pszFormat, ...)
45{
46/** @todo We don't support wrapping calls taking a va_list yet. It's not worth it yet,
47 * since there are only a couple of cases where this fprintf implementation is used.
48 * (The macro below will deal with the majority of the fprintf calls.) */
49#if 0 /*def LOG_ENABLED*/
50 if (LogIsItEnabled(NULL, 0, LOG_GROUP_REM_PRINTF))
51 {
52 va_list va;
53 va_start(va, pszFormat);
54 RTLogLoggerExV(NULL, 0, LOG_GROUP_REM_PRINTF, pszFormat, va);
55 va_end(va);
56 }
57#endif
58 return 0;
59}
60
61#define fflush(file) RTLogFlush(NULL)
62#define printf(...) LogIt(LOG_INSTANCE, 0, LOG_GROUP_REM_PRINTF, (__VA_ARGS__))
63#define fprintf(logfile, ...) LogIt(LOG_INSTANCE, 0, LOG_GROUP_REM_PRINTF, (__VA_ARGS__))
64
65
66__END_DECLS
67
68#endif
69
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette