Added vprintf etc
This commit is contained in:
parent
e72aafb165
commit
031393529f
|
@ -1,4 +1,7 @@
|
|||
tail_cc.1s.a
|
||||
vsprintf.c
|
||||
vfprintf.c
|
||||
vprintf.c
|
||||
termcap.c
|
||||
getopt.c
|
||||
clearerr.c
|
||||
|
|
13
lang/cem/libcc/stdio/vfprintf.c
Normal file
13
lang/cem/libcc/stdio/vfprintf.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
/* $Header$ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <varargs.h>
|
||||
|
||||
int
|
||||
vfprintf(stream, format, arg)
|
||||
FILE *stream;
|
||||
char *format;
|
||||
va_list arg;
|
||||
{
|
||||
return _doprnt (format, arg, stream);
|
||||
}
|
12
lang/cem/libcc/stdio/vprintf.c
Normal file
12
lang/cem/libcc/stdio/vprintf.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* $Header$ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <varargs.h>
|
||||
|
||||
int
|
||||
vprintf(format, arg)
|
||||
char *format;
|
||||
va_list arg;
|
||||
{
|
||||
return _doprnt(format, arg, stdout);
|
||||
}
|
24
lang/cem/libcc/stdio/vsprintf.c
Normal file
24
lang/cem/libcc/stdio/vsprintf.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* $Header$ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <varargs.h>
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in a new issue