Add Strlen(), a strlen(3) that panics if string is stupid long and returns unsigned.

First batch of changes to use it to suppress warnings.
This commit is contained in:
nhkeni
2022-03-06 20:23:04 -05:00
parent 1e31fee0df
commit ff1289e828
16 changed files with 45 additions and 32 deletions

View File

@@ -3985,8 +3985,8 @@ let_to_name(char let, boolean unpaid, boolean showsym)
else
class_name = names[0];
len = strlen(class_name) + (unpaid ? sizeof "unpaid_" : sizeof "")
+ (oclass ? (strlen(ocsymfmt) + invbuf_sympadding) : 0);
len = Strlen(class_name) + (unpaid ? sizeof "unpaid_" : sizeof "")
+ (oclass ? (Strlen(ocsymfmt) + invbuf_sympadding) : 0);
if (len > g.invbufsiz) {
if (g.invbuf)
free((genericptr_t) g.invbuf);
@@ -3999,7 +3999,7 @@ let_to_name(char let, boolean unpaid, boolean showsym)
Strcpy(g.invbuf, class_name);
if ((oclass != 0) && showsym) {
char *bp = eos(g.invbuf);
int mlen = invbuf_sympadding - strlen(class_name);
int mlen = invbuf_sympadding - Strlen(class_name);
while (--mlen > 0) {
*bp = ' ';
bp++;