home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
XGRP_000.SZH
/
FFPRINTF.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-15
|
688b
|
43 lines
#define INCL_DOS
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <io.h>
#include <process.h>
#ifdef TSC
#define _cdecl cdecl
#include <os2kernl.h>
#else
#include <os2.h>
#endif
#include "nofast.h"
#define MAX_BUFFER_LENGTH 1024
/* An fprintf() for DosWrite() */
unsigned int _cdecl ffprintf (unsigned int handle,char *string,...) {
unsigned int x,y;
char buffer[MAX_BUFFER_LENGTH];
va_list pArguments;
va_start(pArguments,string);
x = vsprintf(buffer,string,pArguments);
va_end(pArguments);
DosWrite(handle,buffer,x,&y);
return y;
}