Rockbox

Tasklist

FS#5757 - Correctly display short DOS file names in file browser

Attached to Project: Rockbox
Opened by Alexander Levin (fml2) - Tuesday, 01 August 2006, 21:24 GMT
Task Type Patches
Category Drivers
Status Unconfirmed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This is a sequel for  FS#5736 . It correctly displays the OEM-encoded short DOS file names.

Following code pages are supported: cp850 (western Europe), cp852 (central Europe), cp737 (greek), cp866 (cyriliic), cp862 (hebrew).

If you change the default code page (in the settings menu) and there are files that are displayed with the short DOS names, you'd better rebuild the dir cache (if it's activated) since the UTF8-name of the file changes.

When I compile the modified sources, I get the following warning which I don't understand:
CC common/unicode.c
common/unicode.c:136: warning: function declaration isn't a prototype

Could anyone tell me what that means and what the reason is?
This task depends upon

Comment by Linus Nielsen Feltzing (linusnielsen) - Tuesday, 01 August 2006, 21:32 GMT
This prototype:

static bool load_oem_table()

lacks an argument. In ANSI C you need to write it like this:

static bool load_oem_table(void)
Comment by Alexander Levin (fml2) - Wednesday, 02 August 2006, 17:29 GMT
Thanks Linus! Now everything compiles without warnings. Here is the updated patch (also fixed an error in OEM-encoding when the current code page is UTF-8 and made line shorter than 80 chars.)
Comment by Alexander Levin (fml2) - Saturday, 05 August 2006, 22:36 GMT
Slightly improved patch. Now only the required OEM area is stored in RAM thus reducing the overall code size. And that's good since this feature is probably rearly used so we shouldn't waste much memory on it.

Loading...