use Realloc instead of Srealloc

This commit is contained in:
ceriel 1988-08-15 15:27:29 +00:00
parent e0ad269d4c
commit 119bc227de
3 changed files with 11 additions and 11 deletions

View file

@ -317,11 +317,11 @@ string_token(nm, stop_char)
} }
str[pos++] = c; str[pos++] = c;
if (pos == str_size) if (pos == str_size)
str = Srealloc(str, str_size <<= 1); str = Realloc(str, str_size <<= 1);
LoadChar(c); LoadChar(c);
} }
str[pos++] = '\0'; /* for filenames etc. */ str[pos++] = '\0'; /* for filenames etc. */
str = Srealloc(str, pos); str = Realloc(str, pos);
return str; return str;
} }

View file

@ -611,7 +611,7 @@ get_text(formals, length)
else else
text[pos++] = '\\'; text[pos++] = '\\';
if (pos == text_size) if (pos == text_size)
text = Srealloc(text, text_size <<= 1); text = Realloc(text, text_size <<= 1);
} }
else else
if ( c == '/') { if ( c == '/') {
@ -624,7 +624,7 @@ get_text(formals, length)
else else
text[pos++] = '/'; text[pos++] = '/';
if (pos == text_size) if (pos == text_size)
text = Srealloc(text, text_size <<= 1); text = Realloc(text, text_size <<= 1);
} }
else else
if (formals && class(c) == STIDF) { if (formals && class(c) == STIDF) {
@ -644,7 +644,7 @@ get_text(formals, length)
/* construct the formal parameter mark */ /* construct the formal parameter mark */
text[pos++] = FORMALP | (char) n; text[pos++] = FORMALP | (char) n;
if (pos == text_size) if (pos == text_size)
text = Srealloc(text, text = Realloc(text,
text_size <<= 1); text_size <<= 1);
} }
else { else {
@ -653,7 +653,7 @@ get_text(formals, length)
idp = id_buf; idp = id_buf;
while (pos + sz >= text_size) text_size <<= 1; while (pos + sz >= text_size) text_size <<= 1;
text = Srealloc(text, text_size); text = Realloc(text, text_size);
while (text[pos++] = *idp++) ; while (text[pos++] = *idp++) ;
pos--; pos--;
} }
@ -661,12 +661,12 @@ get_text(formals, length)
else { else {
text[pos++] = c; text[pos++] = c;
if (pos == text_size) if (pos == text_size)
text = Srealloc(text, text_size <<= 1); text = Realloc(text, text_size <<= 1);
LoadChar(c); LoadChar(c);
} }
} }
text[pos++] = '\0'; text[pos++] = '\0';
text = Srealloc(text, pos); text = Realloc(text, pos);
*length = pos - 1; *length = pos - 1;
return text; return text;
} }

View file

@ -173,18 +173,18 @@ macro2buffer(idef, actpars, siztext)
for (p = actpars[n - 1]; *p; p++) { for (p = actpars[n - 1]; *p; p++) {
text[pos++] = *p; text[pos++] = *p;
if (pos == size) if (pos == size)
text = Srealloc(text, size <<= 1); text = Realloc(text, size <<= 1);
} }
} }
else { else {
text[pos++] = *ptr++; text[pos++] = *ptr++;
if (pos == size) if (pos == size)
text = Srealloc(text, size <<= 1); text = Realloc(text, size <<= 1);
} }
} }
text[pos] = '\0'; text[pos] = '\0';
*siztext = pos; *siztext = pos;
return Srealloc(text, pos+1); return Realloc(text, pos+1);
} }
EXPORT EXPORT