many modyfications in search for more speed

This commit is contained in:
ceriel
1988-10-31 15:42:15 +00:00
parent 63f793aff3
commit 7851ff900f
19 changed files with 208 additions and 134 deletions

View File

@@ -3,9 +3,12 @@
#include <varargs.h>
/* Mysprint() stores the string directly in the string_arae. This saves
* a copy action.
* a copy action. It is assumed that the strings stored in the string-table
* are never longer than MAXSTRLEN bytes.
*/
#define MAXSTRLEN 1024
/*VARARGS*/
int mysprint(va_alist)
va_dcl
@@ -16,7 +19,7 @@ int mysprint(va_alist)
va_start(args);
fmt = va_arg(args, char *);
while (string + 1024 - string_area > size_string)
while (string + MAXSTRLEN - string_area > size_string)
mem_string();
retval = _format(string, fmt, args);
string[retval] = '\0';