Revision: 48
Author: sucknblow
Date: 2006-06-04 16:01:08 -0700 (Sun, 04 Jun 2006)
ViewCVS: http://svn.sourceforge.net/pmplib/?rev=48&view=rev
Log Message:
-----------
Display paths correctly on posix systems.
Modified Paths:
--------------
trunk/frontend/easypmp/cui/device.c
Modified: trunk/frontend/easypmp/cui/device.c
===================================================================
--- trunk/frontend/easypmp/cui/device.c 2006-06-04 18:36:58 UTC (rev 47)
+++ trunk/frontend/easypmp/cui/device.c 2006-06-04 23:01:08 UTC (rev 48)
@@ -43,6 +43,16 @@
}
}
+// Display a path name using the given string format.
+void device_show_path(FILE *fp, const char const* format, const ucs2char_t const* path)
+{
+ ucs2char_t decoded_path[MAX_PATH];
+ ucs2cpy(decoded_path, path);
+ filepath_decode(decoded_path);
+
+ fprints(fp, format, decoded_path);
+}
+
void device_show_information(pmp_t* pmp, FILE *fp)
{
fprintf(fp, "Device identifier: %s\n", pmp->env.id);
@@ -51,8 +61,10 @@
fprintf(fp, " Firmware version: %s\n", pmp->env.version);
fprintf(fp, " Default language: %s\n", pmp->env.language);
fprints(fp, " Root directory: %s\n", pmp->env.path_to_root.path);
- fprints(fp, " Music directory: %s\n", pmp->env.path_to_music.path);
- fprints(fp, " Playlist directory: %s\n", pmp->env.path_to_playlist.path);
+
+ device_show_path(fp, " Music directory: %s\n", pmp->env.path_to_music.path);
+ device_show_path(fp, " Playlist directory: %s\n", pmp->env.path_to_playlist.path);
+
fprints(fp, " Playlist extension: %s\n", pmp->env.playlist_ext);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|