1987-11-20 10:41:03 +00:00
|
|
|
#include <system.h>
|
|
|
|
#include "data.h"
|
1988-10-20 13:06:10 +00:00
|
|
|
#include <varargs.h>
|
1987-11-20 10:41:03 +00:00
|
|
|
|
1987-11-25 13:54:01 +00:00
|
|
|
/* Mysprint() stores the string directly in the string_arae. This saves
|
|
|
|
* a copy action.
|
|
|
|
*/
|
|
|
|
|
1988-10-20 13:06:10 +00:00
|
|
|
/*VARARGS*/
|
|
|
|
int mysprint(va_alist)
|
|
|
|
va_dcl
|
1987-11-20 10:41:03 +00:00
|
|
|
{
|
|
|
|
char *fmt;
|
1988-10-20 13:06:10 +00:00
|
|
|
va_list args;
|
|
|
|
int retval;
|
|
|
|
|
|
|
|
va_start(args);
|
|
|
|
fmt = va_arg(args, char *);
|
|
|
|
while (string + 1024 - string_area > size_string)
|
|
|
|
mem_string();
|
|
|
|
retval = _format(string, fmt, args);
|
|
|
|
string[retval] = '\0';
|
|
|
|
va_end(args);
|
|
|
|
return retval;
|
1987-11-20 10:41:03 +00:00
|
|
|
}
|