diff options
author | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-09-29 16:18:57 +0000 |
---|---|---|
committer | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-09-29 16:18:57 +0000 |
commit | f18b720f9a960d701f8d32a199e8b2a3975f9d6c (patch) | |
tree | 5b3a1d569d1e952d8c43899050dca4d6c47bf176 /miscutils/less.c | |
parent | 7c8bf4a0ff3205a5ee8d9a6292036d905db3c479 (diff) | |
download | busybox-w32-f18b720f9a960d701f8d32a199e8b2a3975f9d6c.tar.gz busybox-w32-f18b720f9a960d701f8d32a199e8b2a3975f9d6c.tar.bz2 busybox-w32-f18b720f9a960d701f8d32a199e8b2a3975f9d6c.zip |
change interface to bb_xasprintf() - more perfect for me.
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers
reduce 100 bytes don't care in sum
git-svn-id: svn://busybox.net/trunk/busybox@11694 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'miscutils/less.c')
-rw-r--r-- | miscutils/less.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/miscutils/less.c b/miscutils/less.c index 7b1b96c6d..189b886f7 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -208,7 +208,7 @@ static void add_linenumbers(void) { | |||
208 | 208 | ||
209 | for (i = 0; i <= num_flines; i++) { | 209 | for (i = 0; i <= num_flines; i++) { |
210 | safe_strncpy(current_line, flines[i], 256); | 210 | safe_strncpy(current_line, flines[i], 256); |
211 | bb_xasprintf(&flines[i],"%5d %s", i + 1, current_line); | 211 | flines[i] = bb_xasprintf("%5d %s", i + 1, current_line); |
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
@@ -618,11 +618,8 @@ static void colon_process(void) { | |||
618 | 618 | ||
619 | static char *insert_highlights (char *line, int start, int end) { | 619 | static char *insert_highlights (char *line, int start, int end) { |
620 | 620 | ||
621 | char *new_line; | 621 | return bb_xasprintf("%.*s%s%.*s%s%s", start, line, HIGHLIGHT, |
622 | |||
623 | bb_xasprintf(&new_line, "%.*s%s%.*s%s%s", start, line, HIGHLIGHT, | ||
624 | end - start, line + start, NORMAL, line + end); | 622 | end - start, line + start, NORMAL, line + end); |
625 | return new_line; | ||
626 | } | 623 | } |
627 | 624 | ||
628 | static char *process_regex_on_line(char *line, regex_t *pattern) { | 625 | static char *process_regex_on_line(char *line, regex_t *pattern) { |