summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-09-12 13:33:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-09-12 13:33:59 +0000
commit93b231c69366563ba441dc4907bfb036fe3b4c55 (patch)
tree0783ad028211f59e63925a354e4260a7209ffa24 /firmware/drivers/fat.c
parent5ed78ea80cdaa0ede4df89568f0781fa477a5738 (diff)
downloadrockbox-93b231c69366563ba441dc4907bfb036fe3b4c55.tar.gz
rockbox-93b231c69366563ba441dc4907bfb036fe3b4c55.zip
Greg Haerr's new loadable font. No more #ifdef font-style, removed old
propfont and loadable font code. New font file format. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2269 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/fat.c')
-rw-r--r--firmware/drivers/fat.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index c43807b25f..f0a2089367 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -1049,10 +1049,6 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry)
1049 for (j=longs-1; j>=0; j--) { 1049 for (j=longs-1; j>=0; j--) {
1050 unsigned char* ptr = dir->cached_buf; 1050 unsigned char* ptr = dir->cached_buf;
1051 int index = longarray[j]; 1051 int index = longarray[j];
1052#ifdef LOADABLE_FONTS
1053 int offset_idx = 0;
1054 unsigned char uni_char[2];
1055#endif
1056 /* current or cached sector? */ 1052 /* current or cached sector? */
1057 if ( sectoridx >= SECTOR_SIZE ) { 1053 if ( sectoridx >= SECTOR_SIZE ) {
1058 if ( sectoridx >= SECTOR_SIZE*2 ) { 1054 if ( sectoridx >= SECTOR_SIZE*2 ) {
@@ -1070,30 +1066,6 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry)
1070 index &= SECTOR_SIZE-1; 1066 index &= SECTOR_SIZE-1;
1071 } 1067 }
1072 1068
1073 /* piece together the name subcomponents. */
1074#ifdef LOADABLE_FONTS
1075 for (k=0; k<5; k++)
1076 {
1077 offset_idx = index + k*2 + 1;
1078 uni_char[0] = ptr[offset_idx+1];
1079 uni_char[1] = ptr[offset_idx];
1080 entry->name[l++] = from_unicode(uni_char);
1081 }
1082 for (k=0; k<6; k++)
1083 {
1084 offset_idx = index + k*2 + 14;
1085 uni_char[0] = ptr[offset_idx+1];
1086 uni_char[1] = ptr[offset_idx];
1087 entry->name[l++] = from_unicode(uni_char);
1088 }
1089 for (k=0; k<2; k++)
1090 {
1091 offset_idx = index + k*2 + 28;
1092 uni_char[0] = ptr[offset_idx+1];
1093 uni_char[1] = ptr[offset_idx];
1094 entry->name[l++] = from_unicode(uni_char);
1095 }
1096#else
1097 /* names are stored in unicode, but we 1069 /* names are stored in unicode, but we
1098 only grab the low byte (iso8859-1). */ 1070 only grab the low byte (iso8859-1). */
1099 for (k=0; k<5; k++) 1071 for (k=0; k<5; k++)
@@ -1102,7 +1074,6 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry)
1102 entry->name[l++] = ptr[index + k*2 + 14]; 1074 entry->name[l++] = ptr[index + k*2 + 14];
1103 for (k=0; k<2; k++) 1075 for (k=0; k<2; k++)
1104 entry->name[l++] = ptr[index + k*2 + 28]; 1076 entry->name[l++] = ptr[index + k*2 + 28];
1105#endif
1106 } 1077 }
1107 entry->name[l]=0; 1078 entry->name[l]=0;
1108 } 1079 }