if (!IsEmptyStr(inbuf)) {
/* Fold in all the spacing */
- for (i=0; i<strlen(inbuf); ++i) {
+ for (i=0; !IsEmptyStr(&inbuf[i]); ++i) {
if (inbuf[i]==10) inbuf[i]=32;
if (inbuf[i]==13) inbuf[i]=32;
if (inbuf[i]==9) inbuf[i]=32;
inbuf[i] = '?';
} */
}
- for (i=0; i<strlen(inbuf); ++i) {
+ for (i=0; !IsEmptyStr(&inbuf[i]); ++i) {
while ((inbuf[i]==32)&&(inbuf[i+1]==32))
strcpy(&inbuf[i], &inbuf[i+1]);
}
- for (i=0; i<strlen(inbuf); ++i) {
+ for (i=0; !IsEmptyStr(&inbuf[i]); ++i) {
ch = inbuf[i];
}
/* Convert &; tags to the forbidden characters */
- if (!IsEmptyStr(outbuf)) for (i=0; i<strlen(outbuf); ++i) {
+ if (!IsEmptyStr(outbuf)) for (i=0; !IsEmptyStr(&outbuf[i]); ++i) {
/* Character entity references */
if (!strncasecmp(&outbuf[i], " ", 6)) {
do {
did_out = 0;
if (!IsEmptyStr(outbuf)) {
- for (i = 0; i<strlen(outbuf); ++i) {
+ for (i = 0; !IsEmptyStr(&outbuf[i]); ++i) {
if ( (i<(screenwidth-2)) && (outbuf[i]=='\n')) {
strncpy(&outptr[output_len],