New version with different parameter passing mechanism and some

minor fixes
This commit is contained in:
ceriel
1989-03-20 13:32:06 +00:00
parent 346bc839a3
commit f9b6acf1dc
15 changed files with 197 additions and 105 deletions

View File

@@ -152,9 +152,11 @@ GetString(upto)
}
}
str->s_length = p - str->s_str;
*p = '\0';
str->s_str = Realloc(str->s_str,
(unsigned)((str->s_length+(int)word_size) & ~((int)word_size-1)));
len = (str->s_length+(int)word_size) & ~((int)word_size-1);
while (p - str->s_str < len) {
*p++ = '\0';
}
str->s_str = Realloc(str->s_str, (unsigned) len);
if (str->s_length == 0) str->s_length = 1;
/* ??? string length at least 1 ??? */
return str;