summaryrefslogtreecommitdiff
path: root/apps/plugins/dict.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/dict.c')
-rw-r--r--apps/plugins/dict.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c
index efaeab2ed3..d3fea1d52d 100644
--- a/apps/plugins/dict.c
+++ b/apps/plugins/dict.c
@@ -52,7 +52,7 @@ void init_screen(void)
52} 52}
53 53
54/* for endian problems */ 54/* for endian problems */
55#ifdef LITTLE_ENDIAN 55#ifdef ROCKBOX_BIG_ENDIAN
56#define readlong(x) x 56#define readlong(x) x
57#else 57#else
58long readlong(void* value) 58long readlong(void* value)
@@ -140,7 +140,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
140 { 140 {
141 DEBUGF("Not found.\n"); 141 DEBUGF("Not found.\n");
142 rb->splash(HZ*2, true, "Not found."); 142 rb->splash(HZ*2, true, "Not found.");
143 rb->close(fIndex); 143 rb->close(fIndex);
144 return PLUGIN_OK; 144 return PLUGIN_OK;
145 } 145 }
146 146
@@ -152,7 +152,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
152 { 152 {
153 DEBUGF("Err: Failed to open description file.\n"); 153 DEBUGF("Err: Failed to open description file.\n");
154 rb->splash(HZ*2, true, "Failed to open descriptions."); 154 rb->splash(HZ*2, true, "Failed to open descriptions.");
155 rb->close(fIndex); 155 rb->close(fIndex);
156 return PLUGIN_ERROR; 156 return PLUGIN_ERROR;
157 } 157 }
158 158
@@ -187,14 +187,15 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
187 { 187 {
188 /* copy one lcd line */ 188 /* copy one lcd line */
189 rb->strncpy(output, ptr, display_columns); 189 rb->strncpy(output, ptr, display_columns);
190 output[display_columns] = '\0'; 190 output[display_columns] = '\0';
191 191
192 /* unsigned to kill a warning... */ 192 /* typecast to kill a warning... */
193 if((int)rb->strlen(ptr) < display_columns) { 193 if((int)rb->strlen(ptr) < display_columns)
194 rb->lcd_puts(0, lines, output); 194 {
195 rb->lcd_puts(0, lines, output);
195 lines++; 196 lines++;
196 break; 197 break;
197 } 198 }
198 199
199 200
200 /* get the last spacechar */ 201 /* get the last spacechar */
@@ -210,7 +211,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
210 next = display_columns; 211 next = display_columns;
211 } 212 }
212 213
213 /* put the line on screen */ 214 /* put the line on screen */
214 rb->lcd_puts(0, lines, output); 215 rb->lcd_puts(0, lines, output);
215 216
216 /* get output count */ 217 /* get output count */
@@ -240,6 +241,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
240 } 241 }
241 242
242 rb->close(fIndex); 243 rb->close(fIndex);
243 rb->close(fData); 244 rb->close(fData);
244 return PLUGIN_OK; 245 return PLUGIN_OK;
245} 246}