summaryrefslogtreecommitdiffstats
path: root/private/crt32/stdio/vfwprint.c
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/crt32/stdio/vfwprint.c
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'private/crt32/stdio/vfwprint.c')
-rw-r--r--private/crt32/stdio/vfwprint.c76
1 files changed, 76 insertions, 0 deletions
diff --git a/private/crt32/stdio/vfwprint.c b/private/crt32/stdio/vfwprint.c
new file mode 100644
index 000000000..0979617b6
--- /dev/null
+++ b/private/crt32/stdio/vfwprint.c
@@ -0,0 +1,76 @@
+/***
+*vfwprintf.c - fwprintf from variable arg list
+*
+* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
+*
+*Purpose:
+* defines vfwprintf() - print formatted output, but take args from
+* a stdargs pointer.
+*
+*Revision History:
+* 05-16-92 KRS Created from vfprintf.c.
+*
+*******************************************************************************/
+
+#include <cruntime.h>
+#include <stdio.h>
+#include <wchar.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <file2.h>
+#include <internal.h>
+#include <os2dll.h>
+
+/***
+*int vfwprintf(stream, format, ap) - print to file from varargs
+*
+*Purpose:
+* Performs formatted output to a file. The arg list is a variable
+* argument list pointer.
+*
+*Entry:
+* FILE *stream - stream to write data to
+* wchar_t *format - format string containing data format
+* va_list ap - variable arg list pointer
+*
+*Exit:
+* returns number of correctly output wide characters
+* returns negative number if error occurred
+*
+*Exceptions:
+*
+*******************************************************************************/
+
+int _CALLTYPE1 vfwprintf (
+ FILE *str,
+ const wchar_t *format,
+ va_list ap
+ )
+/*
+ * 'V'ariable argument 'F'ile (stream) 'W'char_t 'PRINT', 'F'ormatted
+ */
+{
+ REG1 FILE *stream;
+ REG2 int buffing;
+ REG3 int retval;
+#ifdef MTHREAD
+ int index;
+#endif
+
+ assert(str != NULL);
+ assert(format != NULL);
+
+ /* Init stream pointer */
+ stream = str;
+
+#ifdef MTHREAD
+ index=_iob_index(stream);
+#endif
+ _lock_str(index);
+ buffing = _stbuf(stream);
+ retval = _woutput(stream,format,ap );
+ _ftbuf(buffing, stream);
+ _unlock_str(index);
+
+ return(retval);
+}