[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: tla update
From: |
Michael Teichgräber |
Subject: |
Re: [Gnu-arch-users] Re: tla update |
Date: |
Sat, 13 Sep 2003 23:22:59 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux) |
Miles Bader <address@hidden> writes:
> The changes would be fairly pervasive though, I think (there are a lots
> of places that print stuff, and it currently all uses simple print
> statements). Hello patch conflicts... :-)
There could be an indentation function related to printfmt, that would
add information about the indent to the file descriptor. A modified
printfmt_va_list() then would print an indent every time it is located
in column 0. This approach would not require changing much code, only
at some places in the cmd-*.c files, where the top messages are
printed.
I have tested this by extending struct vu_handler (maybe this is no
good idea) to
struct vu_handler
{
struct vu_fs_discipline * vtable;
void * closure;
struct {
int indent;
int column0;
} printfmt_settings;
};
, modifying printfmt_va_list as explained, and enclosing three
printfmt occurences in cmd-update.c like this:
printfmt_set_indent (1 /* fd */, 0);
safe_printfmt (1, "\n* reapplying local changes\n");
printfmt_set_indent (1, 2);
With a similar function one could prepend each line of output from a
subcomponent with a prefix string.
--
Michael