void article_display_pcf(int yPixel) { int pos; int copysize; int framebuffersize; framebuffersize = guilib_framebuffer_size(); pos = curBufferPos+((yPixel*LCD_VRAM_WIDTH_PIXELS)/8); if(pos<0 || pos>membuffersize) { return; } copysize = membuffersize-pos; if(copysize>framebuffersize) copysize = framebuffersize; else { return; } guilib_fb_lock(); guilib_clear(); memcpy(framebuffer,membuffer+pos,copysize); guilib_fb_unlock(); curBufferPos = pos; }
int main(int argc, char *argv[]) { framebuffer = (unsigned char *)malloc(guilib_framebuffer_size()); initscr(); keypad(stdscr, TRUE); noecho(); cbreak(); scrollok(stdscr, TRUE); idlok(stdscr, TRUE); start_color(); init_pair(1, COLOR_WHITE, COLOR_BLACK); init_pair(2, COLOR_RED, COLOR_BLACK); init_pair(3, COLOR_YELLOW, COLOR_BLACK); wikilib_init(); guilib_init(); wikilib_run(); /* never reached */ return 0; }
WikilibThread::WikilibThread() : QThread() { framebuffer = (unsigned char *) malloc(guilib_framebuffer_size()); }