chip@ateng.ateng.com (Chip Salzenberg) (10/11/89)
[SPEED PATCH] This minor coding change speeds up the handling of "$(shell)" output. Index: function.c *************** *** 420,428 **** newlines in its output with spaces, and put that in the variable output buffer. */ ! if (buffer[i - 1] == '\n') --i; ! for (p = buffer; p < buffer + i; ++p) ! if (*p == '\n') ! *p = ' '; o = variable_buffer_output (o, buffer, i); } --- 420,428 ---- newlines in its output with spaces, and put that in the variable output buffer. */ ! if (i > 0 && buffer[i - 1] == '\n') --i; ! buffer[i] = '\0'; ! for (p = buffer; (p = index(p, '\n')) != NULL; ++p) ! *p = ' '; o = variable_buffer_output (o, buffer, i); }