From 031393529f436f9510acdecf087f7e8e2485f648 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 22 Oct 1991 09:50:57 +0000 Subject: [PATCH] Added vprintf etc --- lang/cem/libcc/stdio/LIST | 3 +++ lang/cem/libcc/stdio/vfprintf.c | 13 +++++++++++++ lang/cem/libcc/stdio/vprintf.c | 12 ++++++++++++ lang/cem/libcc/stdio/vsprintf.c | 24 ++++++++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 lang/cem/libcc/stdio/vfprintf.c create mode 100644 lang/cem/libcc/stdio/vprintf.c create mode 100644 lang/cem/libcc/stdio/vsprintf.c diff --git a/lang/cem/libcc/stdio/LIST b/lang/cem/libcc/stdio/LIST index eea742c0d..e731388cc 100644 --- a/lang/cem/libcc/stdio/LIST +++ b/lang/cem/libcc/stdio/LIST @@ -1,4 +1,7 @@ tail_cc.1s.a +vsprintf.c +vfprintf.c +vprintf.c termcap.c getopt.c clearerr.c diff --git a/lang/cem/libcc/stdio/vfprintf.c b/lang/cem/libcc/stdio/vfprintf.c new file mode 100644 index 000000000..e1e5f75b6 --- /dev/null +++ b/lang/cem/libcc/stdio/vfprintf.c @@ -0,0 +1,13 @@ +/* $Header$ */ + +#include +#include + +int +vfprintf(stream, format, arg) + FILE *stream; + char *format; + va_list arg; +{ + return _doprnt (format, arg, stream); +} diff --git a/lang/cem/libcc/stdio/vprintf.c b/lang/cem/libcc/stdio/vprintf.c new file mode 100644 index 000000000..f9da83b33 --- /dev/null +++ b/lang/cem/libcc/stdio/vprintf.c @@ -0,0 +1,12 @@ +/* $Header$ */ + +#include +#include + +int +vprintf(format, arg) + char *format; + va_list arg; +{ + return _doprnt(format, arg, stdout); +} diff --git a/lang/cem/libcc/stdio/vsprintf.c b/lang/cem/libcc/stdio/vsprintf.c new file mode 100644 index 000000000..55a27a1b4 --- /dev/null +++ b/lang/cem/libcc/stdio/vsprintf.c @@ -0,0 +1,24 @@ +/* $Header$ */ + +#include +#include + +char * +vsprintf(s, format, arg) + char *s; + char *format; + va_list arg; +{ + FILE tmp_stream; + + tmp_stream._fd = -1; + tmp_stream._flags = IO_WRITEMODE + IO_UNBUFF; + tmp_stream._buf = (unsigned char *) s; + tmp_stream._ptr = (unsigned char *) s; + tmp_stream._count = 32767; + + _doprnt(format, arg, &tmp_stream); + putc('\0',&tmp_stream); + + return s; +} -- 2.34.1