Rev | Line | |
---|
[1678] | 1 | /* $Id: vprintf.h,v 1.2 1999-11-10 01:45:34 bird Exp $
|
---|
[1270] | 2 | *
|
---|
| 3 | * printf/vprintf header file.
|
---|
| 4 | *
|
---|
| 5 | * Copyright (c) 1999 knut st. osmundsen
|
---|
| 6 | *
|
---|
[1678] | 7 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 8 | *
|
---|
[1270] | 9 | */
|
---|
| 10 |
|
---|
| 11 | #ifndef _vprintf_h_
|
---|
| 12 | #define _vprintf_h_
|
---|
| 13 |
|
---|
| 14 | #ifdef __cplusplus
|
---|
| 15 | extern "C" {
|
---|
| 16 | #endif
|
---|
| 17 |
|
---|
| 18 | #ifndef va_arg
|
---|
| 19 | #error "must include stdarg.h"
|
---|
| 20 | #endif
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | /*
|
---|
| 24 | * Function prototypes
|
---|
| 25 | */
|
---|
| 26 | int printf(const char *pszFormat, ...);
|
---|
| 27 | int vprintf(const char *pszFormat, va_list args);
|
---|
[1678] | 28 | int vprintf2(const char *pszFormat, va_list args);
|
---|
[1270] | 29 |
|
---|
| 30 | /*
|
---|
| 31 | * va_start have to be redeclared. Compiler don't accept SSToDS() as va_start argument.
|
---|
| 32 | */
|
---|
| 33 | #undef va_start
|
---|
[21916] | 34 | #ifdef __GNUC__
|
---|
| 35 | #define __nextword(base) (((unsigned)(sizeof(base))+3U)&~(3U))
|
---|
| 36 | #endif
|
---|
[1270] | 37 | #define va_start(ap, last) ap = ((va_list)SSToDS(&last)) + __nextword(last)
|
---|
| 38 |
|
---|
| 39 | #ifdef __cplusplus
|
---|
| 40 | }
|
---|
| 41 | #endif
|
---|
| 42 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.