00001
00002 #include <stdarg.h>
00003
00004
00005
00006
00007 #ifndef SPRINTFH
00008 #define SPRINTFH
00009
00010
00011 #include "type.h"
00012
00013
00014
00015 typedef int (*funcPutChar)(char ch, ULONG ud);
00016
00017
00018
00019 int f_puts(funcPutChar fPutChar, const char *pStr, ULONG ud);
00020
00021
00022
00023 int f_putb(funcPutChar fPutByte, const unsigned char *pBuf, ULONG len, ULONG ud);
00024
00025
00026 #define NOTEOFPRINTF -1
00027 #define EOFPRINTF 0
00028
00029 int funcprintfArp (
00030 funcPutChar fPutChar,
00031 ULONG ud,
00032 const char* str,
00033 va_list arp
00034 );
00035
00036 int funcprintf (
00037 funcPutChar fPutChar,
00038 ULONG ud,
00039 const char* str,
00040 ...
00041 );
00042
00043
00044 typedef struct
00045 {
00046 char *pBuf;
00047 UINT32 bufSize;
00048 UINT32 pos;
00049 } printToStringType;
00050
00051 int osprintf(char* strBuf, UINT32 bufSize, const char*format, ...);
00052
00053 #endif