Re: [PATCH] eliminate buffer in screen.c
- From: Pavel Tsekov <ptsekov gmx net>
- To: Bart Oldeman <bartoldeman users sourceforge net>
- Cc: MC dev <mc-devel gnome org>
- Subject: Re: [PATCH] eliminate buffer in screen.c
- Date: Sat, 27 Aug 2005 18:41:19 +0300
Hello,
On Sat, 27 Aug 2005, Bart Oldeman wrote:
> this patch was inspired by the UTF8 patch used by various distributions.
> This is just a clean up: I realized that buffer[] in repaint_file is
> unnecessary. Instead of formatting into this buffer and then using addstr() one
> can just addstr and printw directly.
I have just reviewed it but I have not tested it, so correct me if I am wrong.
> @@ -571,26 +562,21 @@
> else
> txt = (*format->string_fn)(fe, format->field_len);
>
> - old_pos = cdest;
> -
> len = format->field_len;
> if (len + length > width)
> len = width - length;
> - if (len + (cdest - dest) > limit)
> - len = limit - (cdest - dest);
> if (len <= 0)
> break;
> - cdest = to_buffer (cdest, format->just_mode, len, txt);
> length += len;
>
> attrset (color);
>
> if (permission_mode && !strcmp(format->id, "perm"))
> - add_permission_string (old_pos, format->field_len, fe, attr, color, 0);
> + add_permission_string (txt, format->field_len, fe, attr, color, 0);
> else if (permission_mode && !strcmp(format->id, "mode"))
> - add_permission_string (old_pos, format->field_len, fe, attr, color, 1);
> + add_permission_string (txt, format->field_len, fe, attr, color, 1);
The text passed to add_permission_string as the first argument is supposed
to be justfied but your patch will sent is just as is . Did I get it wrong
?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]