On Mon, Jun 20, 2011 at 06:15:01PM +0100, Connor Lane Smith wrote:
> On 20 June 2011 18:05, Hiltjo Posthuma <hiltjo_AT_codemadness.org> wrote:
> > getline / getdelim (re)allocates buffers though. But yes a custom
> > function with fgets would be more compatible.
I ack here.
I regularly do use getline where fgets would not suffice...
>
> My point was that this is unnecessary: is your screen able to display
> more than, say, 8192 characters (a common value for BUFSIZ) on a
> single line? And even if so, why are you piping an essay into your
> status bar anyway?
1. the statusbar is set line by line. an essay that is put on the statusbar
will give only the last line.
2.
xsetroot must be called for each change in status message. My program
does not need spawning xsetroot endless, since whatever appears on
stdin will be put (line by line) on the statusbar.
This started with the date/time. Therefore, I need a program that does
like:
int main(int argc, char *argv[])
{
time_t t;
while (1) {
sleep(1);
time(&t);
fputs(stdout, ctime(&t));
fflush(stdout);
}
return 0;
}
When counting resources, you'll find this combination of 2 programs
consume less cpu-power drawing time in the statusbar than any
shell script. And at some point, consuming resources for regularly
setting the statusbar was the subject of this thread :-).
I don't think the history of timestamps equals an essay.
Kurt
Received on Tue Jun 21 2011 - 07:07:21 CEST
This archive was generated by hypermail 2.2.0 : Tue Jun 21 2011 - 07:12:03 CEST