Page MenuHomeFreeBSD

D36832.diff
No OneTemporary

D36832.diff

diff --git a/usr.bin/rs/rs.c b/usr.bin/rs/rs.c
--- a/usr.bin/rs/rs.c
+++ b/usr.bin/rs/rs.c
@@ -114,10 +114,11 @@
static void
getfile(void)
{
- char *p;
+ char *p, *sp;
char *endp;
char **ep;
int c;
+ int len;
int multisep = (flags & ONEISEPONLY ? 0 : 1);
int nullpad = flags & NULLPAD;
char **padto;
@@ -159,11 +160,13 @@
*ep = blank;
else /* store column entry */
*ep = p;
+ sp = p;
while (p < endp && *p != isep)
p++; /* find end of entry */
*p = '\0'; /* mark end of entry */
- if (maxlen < p - *ep) /* update maxlen */
- maxlen = p - *ep;
+ len = p - sp;
+ if (maxlen < len) /* update maxlen */
+ maxlen = len;
INCR(ep); /* prepare for next entry */
}
irows++; /* update row count */

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 12:19 AM (19 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14811834
Default Alt Text
D36832.diff (762 B)

Event Timeline