This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10528 - A new implementation of logf, logfdisplay and logfdump
Attached to Project:
Rockbox
Opened by amaury pouly (pamaury) - Saturday, 15 August 2009, 15:40 GMT+2
Last edited by Maurus Cuelenaere (mcuelenaere) - Saturday, 22 August 2009, 00:54 GMT+2
Opened by amaury pouly (pamaury) - Saturday, 15 August 2009, 15:40 GMT+2
Last edited by Maurus Cuelenaere (mcuelenaere) - Saturday, 22 August 2009, 00:54 GMT+2
|
DetailsThis patch is a complete reimplementation of logf. Instead of using a line oriented buffer which complicated, it directly stores entries in a big buffer with '\0' as a separator.
This patch includes: * reimplementation of logf * reimplementation of remote display of logf * reimplementation of logfdisp to nicely handle non fixed-width font * reimplementation of logfdump Wrapping is also implemented. It also adds a function to sprintf.h which is nicer to use than snprintf in this context. Everything was tested except serial_tx logging. |
This task depends upon
Closed by Maurus Cuelenaere (mcuelenaere)
Saturday, 22 August 2009, 00:54 GMT+2
Reason for closing: Accepted
Additional comments about closing: In r22462.
Saturday, 22 August 2009, 00:54 GMT+2
Reason for closing: Accepted
Additional comments about closing: In r22462.
I don't have a remote, and I've never seen logf on a remote either so the following is just wondering:
I also don't know why displayremote() is in logf.c (I think logfdisp should be in apps/, using the multi screen api for displaying the logf on the main and remote display). The old logf also does it so strangely.
the name vfnprintf is bad IMO, it doesn't have anything to do with files (the f part), nor with a buffer size (the n part). vfprintf (a standard function) is also totally different.
But I surely welcome the work you've done on it, old weird code indeed!
The name of vfnprintf is perhaps bad, I had though "fn" would refer to "function" because it printf by calling a function. Similary there is the "fd" function which prints to a "file descriptor".
I don't think "f" is for "formatted" because it's already at the end (printf="print" + "formatted"), no ?
kugl: I don't have a remote-capable device so I tested it with the simulator :)
However you broke touchscreen scrolling in apps/logfdisp.c, this patch fixes that.