Last change
on this file was 6223, checked in by bird, 24 years ago |
C++ fix for printf so that kprintf don't resolve to some memberfunction called printf... (like it did in the ModuleBase family)
|
File size:
1.2 KB
|
Rev | Line | |
---|
[6223] | 1 | /* $Id: log.h,v 1.6 2001-07-08 03:01:09 bird Exp $
|
---|
[1269] | 2 | *
|
---|
[847] | 3 | * log - C-style logging - kprintf.
|
---|
[1269] | 4 | * Dual mode, RING0 and RING3.
|
---|
[2898] | 5 | * Dual 16 and 32 bit.
|
---|
[847] | 6 | *
|
---|
[2898] | 7 | * Define NOLOGGING to disable logging for the given sourcefile or the entire system.
|
---|
[847] | 8 | *
|
---|
[2898] | 9 | * Copyright (c) 1998-2000 knut st. osmundsen
|
---|
| 10 | *
|
---|
[1467] | 11 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 12 | *
|
---|
[847] | 13 | */
|
---|
| 14 |
|
---|
| 15 | #ifndef _log_h_
|
---|
| 16 | #define _log_h_
|
---|
| 17 |
|
---|
| 18 | #ifdef __cplusplus
|
---|
| 19 | extern "C" {
|
---|
| 20 | #endif
|
---|
| 21 |
|
---|
[1467] | 22 | /*
|
---|
| 23 | * COM-Port port numbers.
|
---|
| 24 | */
|
---|
[847] | 25 | #define OUTPUT_COM1 0x3f8
|
---|
| 26 | #define OUTPUT_COM2 0x2f8
|
---|
[4164] | 27 | #define OUTPUT_COM3 0x3e8
|
---|
| 28 | #define OUTPUT_COM4 0x2e8
|
---|
[847] | 29 |
|
---|
[1467] | 30 |
|
---|
[1269] | 31 | /*
|
---|
| 32 | * output macros
|
---|
| 33 | */
|
---|
| 34 | #define dprintf kprintf
|
---|
[2898] | 35 | #if defined(DEBUG) && !defined(NOLOGGING)
|
---|
[4164] | 36 | #ifdef INCL_16
|
---|
| 37 | /* 16-bit */
|
---|
| 38 | #include "vprntf16.h"
|
---|
| 39 | #define kprintf(a) printf16 a
|
---|
| 40 | #define printf this function is not used in 16-bit code! Use printf16!
|
---|
| 41 | #else
|
---|
[2898] | 42 | /* 32-bit */
|
---|
| 43 | #include <stdarg.h>
|
---|
| 44 | #include "vprintf.h"
|
---|
[6223] | 45 | #ifdef __cplusplus
|
---|
| 46 | #define kprintf(a) ::printf a
|
---|
| 47 | #else
|
---|
| 48 | #define kprintf(a) printf a
|
---|
| 49 | #endif
|
---|
[2898] | 50 | #endif
|
---|
[847] | 51 | #else
|
---|
[4164] | 52 | #define kprintf(a) ((void)0)
|
---|
[847] | 53 | #endif
|
---|
| 54 |
|
---|
| 55 | #ifdef __cplusplus
|
---|
| 56 | }
|
---|
| 57 | #endif
|
---|
| 58 | #endif
|
---|
| 59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.