Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

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, 23:24 GMT+2
Task Type Patches
Category Drivers
Status Unconfirmed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 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?
(application/octet-stream)    oem-names.patch (17.9 KiB)
 firmware/common/unicode.c    |  166 +++++++++++++++++++++++++++++++++++++------
 firmware/drivers/fat.c       |   15 ++-
 firmware/include/rbunicode.h |    1 
 tools/codepage_tables.c      |  106 +++++++++++++++++++++++++++
 tools/codepage_tables.h      |    5 +
 tools/codepages.c            |   17 ++++
 6 files changed, 280 insertions(+), 30 deletions(-)

This task depends upon

Comment by Linus Nielsen Feltzing (linusnielsen) - Tuesday, 01 August 2006, 23:32 GMT+2
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, 19:29 GMT+2
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.)
(application/octet-stream)    oem-names2.patch (17.9 KiB)
 firmware/common/unicode.c    |  167 +++++++++++++++++++++++++++++++++++++------
 firmware/drivers/fat.c       |   15 ++-
 firmware/include/rbunicode.h |    1 
 tools/codepage_tables.c      |  106 +++++++++++++++++++++++++++
 tools/codepage_tables.h      |    5 +
 tools/codepages.c            |   17 ++++
 6 files changed, 281 insertions(+), 30 deletions(-)

Comment by Alexander Levin (fml2) - Sunday, 06 August 2006, 00:36 GMT+2
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.
(application/octet-stream)    oem-names3.patch (19.8 KiB)
 firmware/common/unicode.c    |  218 +++++++++++++++++++++++++++++++++++++------
 firmware/drivers/fat.c       |   15 +-
 firmware/include/rbunicode.h |    1 
 tools/codepage_tables.c      |  106 ++++++++++++++++++++
 tools/codepage_tables.h      |    5 
 tools/codepages.c            |   17 +++
 6 files changed, 328 insertions(+), 34 deletions(-)

Loading...