Last change
on this file since 6223 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
|
Line | |
---|
1 | /* $Id: log.h,v 1.6 2001-07-08 03:01:09 bird Exp $
|
---|
2 | *
|
---|
3 | * log - C-style logging - kprintf.
|
---|
4 | * Dual mode, RING0 and RING3.
|
---|
5 | * Dual 16 and 32 bit.
|
---|
6 | *
|
---|
7 | * Define NOLOGGING to disable logging for the given sourcefile or the entire system.
|
---|
8 | *
|
---|
9 | * Copyright (c) 1998-2000 knut st. osmundsen
|
---|
10 | *
|
---|
11 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
12 | *
|
---|
13 | */
|
---|
14 |
|
---|
15 | #ifndef _log_h_
|
---|
16 | #define _log_h_
|
---|
17 |
|
---|
18 | #ifdef __cplusplus
|
---|
19 | extern "C" {
|
---|
20 | #endif
|
---|
21 |
|
---|
22 | /*
|
---|
23 | * COM-Port port numbers.
|
---|
24 | */
|
---|
25 | #define OUTPUT_COM1 0x3f8
|
---|
26 | #define OUTPUT_COM2 0x2f8
|
---|
27 | #define OUTPUT_COM3 0x3e8
|
---|
28 | #define OUTPUT_COM4 0x2e8
|
---|
29 |
|
---|
30 |
|
---|
31 | /*
|
---|
32 | * output macros
|
---|
33 | */
|
---|
34 | #define dprintf kprintf
|
---|
35 | #if defined(DEBUG) && !defined(NOLOGGING)
|
---|
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
|
---|
42 | /* 32-bit */
|
---|
43 | #include <stdarg.h>
|
---|
44 | #include "vprintf.h"
|
---|
45 | #ifdef __cplusplus
|
---|
46 | #define kprintf(a) ::printf a
|
---|
47 | #else
|
---|
48 | #define kprintf(a) printf a
|
---|
49 | #endif
|
---|
50 | #endif
|
---|
51 | #else
|
---|
52 | #define kprintf(a) ((void)0)
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | #ifdef __cplusplus
|
---|
56 | }
|
---|
57 | #endif
|
---|
58 | #endif
|
---|
59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.