Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "plugin.h"
- void print_text_formatted(char * text)
- {
- char * word, *saveptr;
- word = rb->strtok_r(text, " ", &saveptr);
- while( word != NULL )
- {
- rb->lcd_puts(0,0, word);
- word = rb->strtok_r(NULL, " ", &saveptr);
- }
- return;
- }
- enum plugin_status plugin_start(const void* parameter)
- {
- (void)parameter;
- int content_file = rb->open("/wp.wkc", O_RDONLY);
- int index_file = rb->open("/wp.wki", O_RDONLY);
- char idx_entry[80];
- rb->read_line(index_file, idx_entry, 80);
- int offset_to_page, page_len;
- char title[30];
- sscanf( idx_entry, "%s %d %d", title, &offset_to_page, &page_len);
- rb->lcd_set_background(LCD_WHITE);
- rb->lcd_set_foreground(LCD_BLACK);
- rb->lcd_clear_display();
- print_text_formatted("some text is");
- rb->lcd_update();
- sleep(500);
- rb->close(content_file);
- rb->close(index_file);
- return PLUGIN_OK;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement