r5370 vince - in /branches/vince/netsurf-fb: ./ framebuffer/

netsurf at semichrome.net netsurf at semichrome.net
Thu Sep 18 13:43:54 BST 2008


Author: vince
Date: Thu Sep 18 07:43:53 2008
New Revision: 5370

URL: http://source.netsurf-browser.org?rev=5370&view=rev
Log:
warning squash and cleanup ready for trunk merge

Added:
    branches/vince/netsurf-fb/framebuffer/fb_frontend.h
    branches/vince/netsurf-fb/framebuffer/fb_frontend_ablefb.c   (contents, props changed)
      - copied, changed from r5364, branches/vince/netsurf-fb/framebuffer/fb_init_able.c
    branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c   (contents, props changed)
      - copied, changed from r5364, branches/vince/netsurf-fb/framebuffer/fb_init_linux.c
Removed:
    branches/vince/netsurf-fb/framebuffer/fb_init_able.c
    branches/vince/netsurf-fb/framebuffer/fb_init_linux.c
Modified:
    branches/vince/netsurf-fb/Makefile.sources
    branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_bitmap.c
    branches/vince/netsurf-fb/framebuffer/fb_bitmap.h
    branches/vince/netsurf-fb/framebuffer/fb_cursor.c
    branches/vince/netsurf-fb/framebuffer/fb_cursor.h
    branches/vince/netsurf-fb/framebuffer/fb_font.c
    branches/vince/netsurf-fb/framebuffer/fb_font.h
    branches/vince/netsurf-fb/framebuffer/fb_gui.c
    branches/vince/netsurf-fb/framebuffer/fb_gui.h
    branches/vince/netsurf-fb/framebuffer/fb_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_plotters.h
    branches/vince/netsurf-fb/framebuffer/fb_schedule.c
    branches/vince/netsurf-fb/framebuffer/fb_schedule.h
    branches/vince/netsurf-fb/framebuffer/font_8x16.c
    branches/vince/netsurf-fb/framebuffer/history.c
    branches/vince/netsurf-fb/framebuffer/hotlist.c
    branches/vince/netsurf-fb/framebuffer/login.c
    branches/vince/netsurf-fb/framebuffer/misc.c
    branches/vince/netsurf-fb/framebuffer/thumbnail.c
    branches/vince/netsurf-fb/framebuffer/tree.c

Modified: branches/vince/netsurf-fb/Makefile.sources
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/Makefile.sources?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/Makefile.sources (original)
+++ branches/vince/netsurf-fb/Makefile.sources Thu Sep 18 07:43:53 2008
@@ -96,9 +96,9 @@
 #	fb_1bpp_plotters.c
 
 ifeq ($(NETSURF_FB_FRONTEND),linux)
-S_FRAMEBUFFER += fb_init_linux.c
+S_FRAMEBUFFER += fb_frontend_linuxfb.c
 else
-S_FRAMEBUFFER += fb_init_able.c
+S_FRAMEBUFFER += fb_frontend_ablefb.c
 endif
 
 S_FRAMEBUFFER := $(addprefix framebuffer/,$(S_FRAMEBUFFER))

Modified: branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -30,10 +30,6 @@
 #include "framebuffer/fb_bitmap.h"
 #include "framebuffer/fb_font.h"
 
-
-extern framebuffer_t *framebuffer;
-extern struct gui_window *current_window;
-
 static inline uint16_t *
 fb_16bpp_get_xy_loc(int x, int y, struct gui_window *g)
 {

Modified: branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -30,9 +30,6 @@
 #include "framebuffer/fb_bitmap.h"
 #include "framebuffer/fb_font.h"
 
-extern framebuffer_t *framebuffer;
-extern struct gui_window *current_window;
-
 static inline uint32_t *
 fb_32bpp_get_xy_loc(int x, int y, struct gui_window *g)
 {

Modified: branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c Thu Sep 18 07:43:53 2008
@@ -30,9 +30,6 @@
 #include "framebuffer/fb_bitmap.h"
 #include "framebuffer/fb_font.h"
 
-extern framebuffer_t *framebuffer;
-extern struct gui_window *current_window;
-
 static inline uint8_t *
 fb_8bpp_get_xy_loc(int x, int y, struct gui_window *g)
 {

Modified: branches/vince/netsurf-fb/framebuffer/fb_bitmap.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_bitmap.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_bitmap.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_bitmap.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *

Modified: branches/vince/netsurf-fb/framebuffer/fb_bitmap.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_bitmap.h?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_bitmap.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_bitmap.h Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -20,8 +20,8 @@
 #define FRAMEBUFFER_BITMAP_H
 
 struct bitmap {
-	uint32_t width;
-	uint32_t height;
+	int width;
+	int height;
 	uint8_t *pixdata;
 };
 

Modified: branches/vince/netsurf-fb/framebuffer/fb_cursor.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_cursor.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_cursor.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_cursor.c Thu Sep 18 07:43:53 2008
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include <sys/types.h>
 #include <stdint.h>
 
@@ -20,7 +38,9 @@
         int y;
         int width; /**< width */
         int height; /**< height */
-    
+
+        bool plotted;
+
         struct bitmap *bitmap; /* pointer bitmap */
 
         uint8_t *savedata; /* save under area */
@@ -52,6 +72,63 @@
   "\207\0\0\0\377",
 };
 
+static void fb_cursor_save(framebuffer_t *fb)
+{
+        uint8_t *savebuf;
+        int savelen;
+        uint8_t *pvid;
+        int yloop;
+
+        savelen = ((fb->cursor->width * fb->bpp) / 8);
+        savebuf = malloc(savelen * fb->cursor->height);
+        if (savebuf == NULL)
+                return;
+
+        if (fb->cursor->savedata != NULL)
+                free(fb->cursor->savedata);
+
+        fb->cursor->savedata = savebuf;
+
+        pvid = fb->ptr + 
+               (fb->cursor->y  * fb->linelen) + 
+               ((fb->cursor->x * fb->bpp) / 8);
+
+        for (yloop=0; yloop < fb->cursor->height; yloop++) {
+                memcpy(savebuf, pvid, savelen);
+                savebuf += savelen;
+                pvid += fb->linelen;
+        }
+}
+
+static void fb_cursor_clear(framebuffer_t *fb) 
+{
+        uint8_t *savebuf;
+        int savelen;
+        uint8_t *pvid;
+        int yloop;
+
+        if (fb->cursor->plotted == false)
+                return;
+        fb->cursor->plotted = false;
+
+        savebuf = fb->cursor->savedata;
+        if (savebuf == NULL)
+                return;
+
+        savelen = ((fb->cursor->width * fb->bpp) / 8);
+
+        pvid = fb->ptr + 
+               (fb->cursor->y  * fb->linelen) + 
+               ((fb->cursor->x * fb->bpp) / 8);
+
+        for (yloop=0; yloop < fb->cursor->height; yloop++) {
+                memcpy(pvid, savebuf, savelen);
+                savebuf += savelen;
+                pvid += fb->linelen;
+        }
+
+}
+
 void
 fb_cursor_move(framebuffer_t *fb, int x, int y)
 {
@@ -66,12 +143,18 @@
         if (fb->cursor->y > fb->height)
                 fb->cursor->y = fb->height;
 
+        fb_cursor_clear(fb);
+
 }
 
 void 
 fb_cursor_plot(framebuffer_t *fb)
 {
         bbox_t saved_plot_ctx;
+
+        if (fb->cursor->plotted)
+                return;
+
         saved_plot_ctx = fb_plot_ctx;
 
         fb_plot_ctx.x0 = 0;
@@ -79,10 +162,13 @@
         fb_plot_ctx.x1 = fb->width;
         fb_plot_ctx.y1 = fb->height;
 
+        fb_cursor_save(fb);
+
         plot.bitmap(fb->cursor->x, fb->cursor->y, 
                     fb->cursor->width, fb->cursor->height,
                     fb->cursor->bitmap, 0, NULL);
 
+        fb->cursor->plotted = true;
         fb_plot_ctx = saved_plot_ctx;
 }
 
@@ -102,7 +188,11 @@
 
         memcpy(cursor->bitmap->pixdata, 
                pointer_image.pixel_data, 
-               pointer_image.width * pointer_image.height * pointer_image.bytes_per_pixel);
+               pointer_image.width * 
+               pointer_image.height * 
+               pointer_image.bytes_per_pixel);
+
+        cursor->plotted = false;
 
         return cursor;
 }

Modified: branches/vince/netsurf-fb/framebuffer/fb_cursor.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_cursor.h?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_cursor.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_cursor.h Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *

Modified: branches/vince/netsurf-fb/framebuffer/fb_font.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_font.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_font.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_font.c Thu Sep 18 07:43:53 2008
@@ -1,6 +1,6 @@
 /*
  * Copyright 2005 James Bursa <bursa at users.sourceforge.net>
- *           2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ *           2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *

Modified: branches/vince/netsurf-fb/framebuffer/fb_font.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_font.h?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_font.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_font.h Thu Sep 18 07:43:53 2008
@@ -1,3 +1,20 @@
+/*
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 
 struct fb_font_desc {

Added: branches/vince/netsurf-fb/framebuffer/fb_frontend.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_frontend.h?rev=5370&view=auto
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_frontend.h (added)
+++ branches/vince/netsurf-fb/framebuffer/fb_frontend.h Thu Sep 18 07:43:53 2008
@@ -1,0 +1,21 @@
+/*
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+extern framebuffer_t *fb_os_init(int argc, char** argv);
+extern void fb_os_quit(framebuffer_t *fb);
+extern void fb_os_input(struct gui_window *g);

Copied: branches/vince/netsurf-fb/framebuffer/fb_frontend_ablefb.c (from r5364, branches/vince/netsurf-fb/framebuffer/fb_init_able.c)
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_frontend_ablefb.c?p2=branches/vince/netsurf-fb/framebuffer/fb_frontend_ablefb.c&p1=branches/vince/netsurf-fb/framebuffer/fb_init_able.c&r1=5364&r2=5370&rev=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_init_able.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_frontend_ablefb.c Thu Sep 18 07:43:53 2008
@@ -1,12 +1,38 @@
+/*
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
+#include <unistd.h>
+#include <string.h>
 #include <able/fb.h>
 
 #include "css/css.h"
+#include "desktop/options.h"
+#include "desktop/gui.h"
+#include "desktop/options.h"
+#include "utils/messages.h"
+
 #include "framebuffer/fb_gui.h"
 #include "framebuffer/fb_plotters.h"
+#include "framebuffer/fb_frontend.h"
 
 #include "utils/log.h"
 
@@ -65,6 +91,22 @@
         /* set stdin to nonblocking */
         fcntl(0, F_SETFL, O_NONBLOCK);
 
+//#define FILE_PFX "(cd0)/res/"
+#define FILE_PFX "(tftpboot)/"
+
+        /* load browser messages */
+        messages_load(FILE_PFX "messages");
+
+        /* load browser options */        
+	options_read(FILE_PFX "Options");
+
+        /* override some options */
+        option_max_cached_fetch_handles = 1;
+        option_max_fetchers = option_max_fetchers_per_host = 1;
+
+        default_stylesheet_url = strdup("file://" FILE_PFX "default.css");
+        //default_stylesheet_url = strdup("http://jennifer.kyllikki.org/~vince/res/default.css");
+
         return newfb;
 }
 

Propchange: branches/vince/netsurf-fb/framebuffer/fb_frontend_ablefb.c
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c (from r5364, branches/vince/netsurf-fb/framebuffer/fb_init_linux.c)
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c?p2=branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c&p1=branches/vince/netsurf-fb/framebuffer/fb_init_linux.c&r1=5364&r2=5370&rev=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_init_linux.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c Thu Sep 18 07:43:53 2008
@@ -1,3 +1,21 @@
+/*
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include <signal.h>
 #include <sys/types.h>
 #include <inttypes.h>
@@ -22,12 +40,16 @@
 
 #include "css/css.h"
 #include "desktop/browser.h"
+#include "desktop/options.h"
+#include "desktop/gui.h"
 #include "framebuffer/fb_gui.h"
 #include "framebuffer/fb_plotters.h"
 #include "framebuffer/fb_schedule.h"
 #include "framebuffer/fb_cursor.h"
+#include "framebuffer/fb_frontend.h"
 
 #include "utils/log.h"
+#include "utils/messages.h"
 
 #define FB_ACTIVE    0
 #define FB_REL_REQ   1
@@ -105,20 +127,6 @@
                 /* acquisition */
                 fb_switch_state = FB_ACQ_REQ;
         }
-}
-
-static void
-fb_switch_release(void)
-{
-        ioctl(tty, VT_RELDISP, 1);
-        fb_switch_state = FB_INACTIVE;
-}
-
-static void
-fb_switch_acquire(void)
-{
-        ioctl(tty, VT_RELDISP, VT_ACKACQ);
-        fb_switch_state = FB_ACTIVE;
 }
 
 static int
@@ -168,7 +176,7 @@
 }
 
 static int
-fb_setmode(char *name, int bpp)
+fb_setmode(const char *name, int bpp)
 {
         FILE *fp;
         char line[80],label[32],value[16];
@@ -180,9 +188,9 @@
                 exit(1);
         }
     
-        if (NULL == name)
+        if (name == NULL)
                 return -1;
-        if (NULL == (fp = fopen("/etc/fb.modes","r")))
+        if ((fp = fopen("/etc/fb.modes","r")) == NULL)
                 return -1;
         while (NULL != fgets(line,79,fp)) {
                 if (1 == sscanf(line, "mode \"%31[^\"]\"",label) &&
@@ -348,7 +356,7 @@
 }
 
 static int
-fb_init(char *device, char *mode, int bpp, int vt)
+fb_init(const char *device, const char *mode, int bpp, int vt)
 {
         char   fbdev[16];
         struct vt_stat vts;
@@ -365,9 +373,9 @@
                 exit(1);
         }
     
-        if (NULL == device) {
+        if (device == NULL) {
                 device = getenv("FRAMEBUFFER");
-                if (NULL == device) {
+                if (device == NULL) {
                         struct fb_con2fbmap c2m;
                         if (-1 == (fb = open(devices->fb0,O_RDWR /* O_WRONLY */,0))) {
                                 fprintf(stderr,"open %s: %s\n",devices->fb0,strerror(errno));
@@ -537,6 +545,17 @@
         if (mousefd < 0) {
                 fprintf(stderr, "Unable to open /dev/input/event2 no mouse\n");                
         } 
+
+#define FILE_PFX "/home/vince/netsurf/netsurf-fb/framebuffer/res/"
+
+        /* load browser messages */
+        messages_load(FILE_PFX "messages");
+
+        /* load browser options */        
+	options_read(FILE_PFX "Options");
+
+        default_stylesheet_url = strdup("file://"FILE_PFX"/default.css");
+
         return newfb;
 }
 

Propchange: branches/vince/netsurf-fb/framebuffer/fb_frontend_linuxfb.c
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -26,10 +26,11 @@
 #include "desktop/plotters.h"
 #include "desktop/netsurf.h"
 #include "desktop/options.h"
-#include "utils/messages.h"
 #include "utils/log.h"
+
 #include "framebuffer/fb_bitmap.h"
 #include "framebuffer/fb_gui.h"
+#include "framebuffer/fb_frontend.h"
 #include "framebuffer/fb_plotters.h"
 #include "framebuffer/fb_schedule.h"
 #include "framebuffer/fb_cursor.h"
@@ -47,10 +48,6 @@
 
 framebuffer_t *framebuffer;
 
-//#define FILE_PFX "(cd0)/res/"
-//#define FILE_PFX "(tftpboot)/"
-#define FILE_PFX "/home/vince/netsurf/netsurf-fb/framebuffer/res/"
-
 static void fb_redraw(struct gui_window *g)
 {
 	struct content *c;
@@ -76,20 +73,9 @@
 
 void gui_init(int argc, char** argv)
 {
-        LOG(("%s(%d, %p)", __func__, argc, argv));
-
-        messages_load(FILE_PFX "messages");
-
-	options_read(FILE_PFX "Options");
-
-        option_max_cached_fetch_handles = 1;
-        option_max_fetchers = option_max_fetchers_per_host = 1;
+        LOG(("argc %d, argv %p", argc, argv));
 
         framebuffer = fb_os_init(argc, argv);
-
-        //default_stylesheet_url = "file:/(cd0)/res/default.css";
-        //default_stylesheet_url = strdup("http://jennifer.kyllikki.org/~vince/res/default.css");
-        default_stylesheet_url = strdup("file://"FILE_PFX"/default.css");
 
         switch (framebuffer->bpp) {
                 /*        case 1:
@@ -204,7 +190,6 @@
 
 void gui_window_destroy(struct gui_window *g)
 {
-        struct gui_window *p;
         LOG(("g %p", g));
         
         if (g->prev == NULL) {
@@ -217,7 +202,6 @@
 
         free(g);
 
-
         if (window_list == NULL)
                 netsurf_quit = true;
 
@@ -424,18 +408,22 @@
 
 bool gui_empty_clipboard(void)
 {
+        return false;
 }
 
 bool gui_add_to_clipboard(const char *text, size_t length, bool space)
 {
+        return false;
 }
 
 bool gui_commit_clipboard(void)
 {
+        return false;
 }
 
 bool gui_copy_to_clipboard(struct selection *s)
 {
+        return false;
 }
 
 void gui_create_form_select_menu(struct browser_window *bw,
@@ -451,6 +439,7 @@
 		unsigned start_offset, unsigned end_offset,
 		unsigned *start_idx, unsigned *end_idx)
 {
+        return false;
 }
 
 

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.h?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.h Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -50,8 +50,5 @@
     struct gui_window *next, *prev;
 };
 
-extern framebuffer_t *fb_os_init(int argc, char** argv);
-extern void fb_os_quit(framebuffer_t *fb);
-extern void fb_os_input(struct gui_window *g);
-
 extern framebuffer_t *framebuffer;
+extern struct gui_window *current_window;

Removed: branches/vince/netsurf-fb/framebuffer/fb_init_able.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_init_able.c?rev=5369&view=auto
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_init_able.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_init_able.c (removed)
@@ -1,108 +1,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <able/fb.h>
-
-#include "css/css.h"
-#include "framebuffer/fb_gui.h"
-#include "framebuffer/fb_plotters.h"
-
-#include "utils/log.h"
-
-int devfd;
-static const char *fbdevname = "(fb0)";
-
-framebuffer_t *fb_os_init(int argc, char** argv)
-{
-        framebuffer_t *newfb;
-        struct fb_info_s *fbinfo;
-        argb_t palent;
-        int ploop;
-        int res;
-
-        /* open display device */
-        devfd = open(fbdevname, O_RDWR);
-        if (devfd < 0) {
-                LOG(("Error opening output device %s", fbdevname));
-                return NULL;
-        }
-
-        LOG(("Opened %s fd is %d",fbdevname, devfd));
-
-        res = ioctl(devfd, IOCTL_FB_GETINFO, &fbinfo);
-
-        if (res < 0) {
-                LOG(("Output device error"));
-                close(devfd);
-                return NULL;
-        }
-
-        LOG(("Framebuffer device name %s bpp %d\n",
-             fbinfo->name,
-             fbinfo->screeninfo->bits_per_pixel));
-
-        newfb = calloc(1, sizeof(framebuffer_t));
-
-        newfb->width = fbinfo->screeninfo->xres;
-        newfb->height = fbinfo->screeninfo->yres;
-        newfb->ptr = fbinfo->video_start + fbinfo->video_scroll;
-        newfb->linelen = fbinfo->line_len;
-        newfb->bpp = fbinfo->screeninfo->bits_per_pixel;
-
-        if (newfb->bpp <= 8) {
-                for(ploop=0; ploop<256; ploop++) {
-                        palent = fbinfo->cur_palette[ploop];
-
-                        newfb->palette[ploop] = 0xFF000000 | 
-                                                palent.b << 16 | 
-                                                palent.g << 8 | 
-                                                palent.r ; 
-                }
-        }
-
-
-        /* set stdin to nonblocking */
-        fcntl(0, F_SETFL, O_NONBLOCK);
-
-        return newfb;
-}
-
-void fb_os_quit(framebuffer_t *fb)
-{
-}
-
-void fb_os_input(struct gui_window *g) 
-{
-        ssize_t amt;
-        char key;
-
-        amt = read(0, &key, 1);
-
-        if (amt > 0) {
-                if (key == 'j') {
-                        g->scrolly +=100;
-                        gui_window_redraw_window(g);
-                }
-                if (key == 'k') {
-                        g->scrolly -=100;
-                        if (g->scrolly < 0)
-                                g->scrolly = 0;
-                        gui_window_redraw_window(g);
-                }
-                if (key == 'q') {
-                        browser_window_destroy(g->bw);
-                }
-                if (key == 'd') {
-                        list_schedule();
-                }
-        }
-
-}
-
-/*
- * Local Variables:
- * c-basic-offset:8
- * End:
- */
-

Removed: branches/vince/netsurf-fb/framebuffer/fb_init_linux.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_init_linux.c?rev=5369&view=auto
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_init_linux.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_init_linux.c (removed)
@@ -1,625 +1,0 @@
-#include <signal.h>
-#include <sys/types.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <termios.h>
-#include <errno.h>
-#include <setjmp.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-
-#include <linux/kd.h>
-#include <linux/vt.h>
-#include <linux/fb.h>
-
-#include <linux/input.h>
-
-#include "css/css.h"
-#include "desktop/browser.h"
-#include "framebuffer/fb_gui.h"
-#include "framebuffer/fb_plotters.h"
-#include "framebuffer/fb_schedule.h"
-#include "framebuffer/fb_cursor.h"
-
-#include "utils/log.h"
-
-#define FB_ACTIVE    0
-#define FB_REL_REQ   1
-#define FB_INACTIVE  2
-#define FB_ACQ_REQ   3
-
-
-struct fb_fix_screeninfo fb_fix;
-struct fb_var_screeninfo fb_var;
-unsigned char *fb_mem;
-int fb_mem_offset = 0;
-int fb_switch_state = FB_ACTIVE;
-
-
-static int                       fb,tty;
-static int                       orig_vt_no = 0;
-static struct vt_mode            vt_mode;
-
-static int                       kd_mode;
-static struct vt_mode            vt_omode;
-static struct termios            term;
-static struct fb_var_screeninfo  fb_ovar;
-static unsigned short            ored[256], ogreen[256], oblue[256], otransp[256];
-static struct fb_cmap            ocmap = { 0, 256, ored, ogreen, oblue, otransp };
-
-int keyboardfd;
-int mousefd;
-
-/* -------------------------------------------------------------------- */
-/* devices                                                              */
-
-struct DEVS {
-        const char *fb0;
-        const char *fbnr;
-        const char *ttynr;
-};
-
-struct DEVS devs_default = {
-        .fb0 =  "/dev/fb0",
-        .fbnr = "/dev/fb%d",
-        .ttynr = "/dev/tty%d",
-};
-
-struct DEVS devs_devfs = {
-        .fb0 = "/dev/fb/0",
-        .fbnr = "/dev/fb/%d",
-        .ttynr = "/dev/vc/%d",
-};
-struct DEVS *devices;
-
-static void dev_init(void)
-{
-        struct stat dummy;
-
-        if (NULL != devices)
-                return;
-        if (0 == stat("/dev/.devfsd",&dummy))
-                devices = &devs_devfs;
-        else
-                devices = &devs_default;
-}
-
-/* -------------------------------------------------------------------- */
-/* console switching                                                    */
-
-
-static void
-fb_switch_signal(int signal)
-{
-        if (signal == SIGUSR1) {
-                /* release */
-                fb_switch_state = FB_REL_REQ;
-        }
-        if (signal == SIGUSR2) {
-                /* acquisition */
-                fb_switch_state = FB_ACQ_REQ;
-        }
-}
-
-static void
-fb_switch_release(void)
-{
-        ioctl(tty, VT_RELDISP, 1);
-        fb_switch_state = FB_INACTIVE;
-}
-
-static void
-fb_switch_acquire(void)
-{
-        ioctl(tty, VT_RELDISP, VT_ACKACQ);
-        fb_switch_state = FB_ACTIVE;
-}
-
-static int
-fb_switch_init(void)
-{
-        struct sigaction act,old;
-
-        memset(&act,0,sizeof(act));
-        act.sa_handler  = fb_switch_signal;
-        sigemptyset(&act.sa_mask);
-        sigaction(SIGUSR1,&act,&old);
-        sigaction(SIGUSR2,&act,&old);
-    
-        if (-1 == ioctl(tty,VT_GETMODE, &vt_mode)) {
-                perror("ioctl VT_GETMODE");
-                exit(1);
-        }
-        vt_mode.mode   = VT_PROCESS;
-        vt_mode.waitv  = 0;
-        vt_mode.relsig = SIGUSR1;
-        vt_mode.acqsig = SIGUSR2;
-    
-        if (-1 == ioctl(tty,VT_SETMODE, &vt_mode)) {
-                perror("ioctl VT_SETMODE");
-                exit(1);
-        }
-        return 0;
-}
-
-/* -------------------------------------------------------------------- */
-/* initialisation & cleanup                                             */
-
-static void
-fb_memset (void *addr, int c, size_t len)
-{
-#if 1 /* defined(__powerpc__) */
-        unsigned int i, *p;
-    
-        i = (c & 0xff) << 8;
-        i |= i << 16;
-        len >>= 2;
-        for (p = addr; len--; p++)
-                *p = i;
-#else
-        memset(addr, c, len);
-#endif
-}
-
-static int
-fb_setmode(char *name, int bpp)
-{
-        FILE *fp;
-        char line[80],label[32],value[16];
-        int  geometry=0, timings=0;
-    
-        /* load current values */
-        if (ioctl(fb,FBIOGET_VSCREENINFO,&fb_var) == -1) {
-                perror("ioctl FBIOGET_VSCREENINFO");
-                exit(1);
-        }
-    
-        if (NULL == name)
-                return -1;
-        if (NULL == (fp = fopen("/etc/fb.modes","r")))
-                return -1;
-        while (NULL != fgets(line,79,fp)) {
-                if (1 == sscanf(line, "mode \"%31[^\"]\"",label) &&
-                    0 == strcmp(label,name)) {
-                        /* fill in new values */
-                        fb_var.sync  = 0;
-                        fb_var.vmode = 0;
-                        while (NULL != fgets(line,79,fp) &&
-                               NULL == strstr(line,"endmode")) {
-                                if (5 == sscanf(line," geometry %d %d %d %d %d",
-                                                &fb_var.xres,&fb_var.yres,
-                                                &fb_var.xres_virtual,&fb_var.yres_virtual,
-                                                &fb_var.bits_per_pixel))
-                                        geometry = 1;
-                                if (7 == sscanf(line," timings %d %d %d %d %d %d %d",
-                                                &fb_var.pixclock,
-                                                &fb_var.left_margin,  &fb_var.right_margin,
-                                                &fb_var.upper_margin, &fb_var.lower_margin,
-                                                &fb_var.hsync_len,    &fb_var.vsync_len))
-                                        timings = 1;
-                                if (1 == sscanf(line, " hsync %15s",value) &&
-                                    0 == strcasecmp(value,"high"))
-                                        fb_var.sync |= FB_SYNC_HOR_HIGH_ACT;
-                                if (1 == sscanf(line, " vsync %15s",value) &&
-                                    0 == strcasecmp(value,"high"))
-                                        fb_var.sync |= FB_SYNC_VERT_HIGH_ACT;
-                                if (1 == sscanf(line, " csync %15s",value) &&
-                                    0 == strcasecmp(value,"high"))
-                                        fb_var.sync |= FB_SYNC_COMP_HIGH_ACT;
-                                if (1 == sscanf(line, " extsync %15s",value) &&
-                                    0 == strcasecmp(value,"true"))
-                                        fb_var.sync |= FB_SYNC_EXT;
-                                if (1 == sscanf(line, " laced %15s",value) &&
-                                    0 == strcasecmp(value,"true"))
-                                        fb_var.vmode |= FB_VMODE_INTERLACED;
-                                if (1 == sscanf(line, " double %15s",value) &&
-                                    0 == strcasecmp(value,"true"))
-                                        fb_var.vmode |= FB_VMODE_DOUBLE;
-                        }
-                        /* ok ? */
-                        if (!geometry || !timings)
-                                return -1;
-
-                        if (bpp != 0)
-                                fb_var.bits_per_pixel = bpp;
-
-                        /* set */
-                        fb_var.xoffset = 0;
-                        fb_var.yoffset = 0;
-                        if (-1 == ioctl(fb,FBIOPUT_VSCREENINFO,&fb_var))
-                                perror("ioctl FBIOPUT_VSCREENINFO");
-                        /* look what we have now ... */
-                        if (-1 == ioctl(fb,FBIOGET_VSCREENINFO,&fb_var)) {
-                                perror("ioctl FBIOGET_VSCREENINFO");
-                                exit(1);
-                        }
-                        return 0;
-                }
-        }
-        return -1;
-}
-
-static void
-fb_setvt(int vtno)
-{
-        struct vt_stat vts;
-        char vtname[12];
-    
-        if (vtno < 0) {
-                if (-1 == ioctl(tty,VT_OPENQRY, &vtno) || vtno == -1) {
-                        perror("ioctl VT_OPENQRY");
-                        exit(1);
-                }
-        }
-
-        vtno &= 0xff;
-        sprintf(vtname, devices->ttynr, vtno);
-        chown(vtname, getuid(), getgid());
-        if (-1 == access(vtname, R_OK | W_OK)) {
-                fprintf(stderr,"access %s: %s\n",vtname,strerror(errno));
-                exit(1);
-        }
-        /*        switch (fork()) {
-        case 0:
-                break;
-        case -1:
-                perror("fork");
-                exit(1);
-        default:
-                exit(0);
-                }
-        close(tty);
-        close(0);
-        close(1);
-        close(2);
-        setsid();
-        open(vtname,O_RDWR);
-        dup(0);
-        dup(0);
-*/
-        tty = open(vtname,O_RDWR);
-        if (-1 == ioctl(tty,VT_GETSTATE, &vts)) {
-                perror("ioctl VT_GETSTATE");
-                exit(1);
-        }
-        orig_vt_no = vts.v_active;
-        if (-1 == ioctl(tty,VT_ACTIVATE, vtno)) {
-                perror("ioctl VT_ACTIVATE");
-                exit(1);
-        }
-        if (-1 == ioctl(tty,VT_WAITACTIVE, vtno)) {
-                perror("ioctl VT_WAITACTIVE");
-                exit(1);
-        }
-}
-
-/* Hmm. radeonfb needs this. matroxfb doesn't. */
-static int 
-fb_activate_current(int tty)
-{
-        struct vt_stat vts;
-    
-        if (-1 == ioctl(tty,VT_GETSTATE, &vts)) {
-                perror("ioctl VT_GETSTATE");
-                return -1;
-        }
-        if (-1 == ioctl(tty,VT_ACTIVATE, vts.v_active)) {
-                perror("ioctl VT_ACTIVATE");
-                return -1;
-        }
-        if (-1 == ioctl(tty,VT_WAITACTIVE, vts.v_active)) {
-                perror("ioctl VT_WAITACTIVE");
-                return -1;
-        }
-        return 0;
-}
-
-static void
-fb_cleanup(void)
-{
-        /* restore console */
-        if (-1 == ioctl(fb,FBIOPUT_VSCREENINFO,&fb_ovar))
-                perror("ioctl FBIOPUT_VSCREENINFO");
-        if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix))
-                perror("ioctl FBIOGET_FSCREENINFO");
-        if (fb_ovar.bits_per_pixel == 8 ||
-            fb_fix.visual == FB_VISUAL_DIRECTCOLOR) {
-                if (-1 == ioctl(fb,FBIOPUTCMAP,&ocmap))
-                        perror("ioctl FBIOPUTCMAP");
-        }
-        close(fb);
-
-        if (-1 == ioctl(tty,KDSETMODE, kd_mode))
-                perror("ioctl KDSETMODE");
-        if (-1 == ioctl(tty,VT_SETMODE, &vt_omode))
-                perror("ioctl VT_SETMODE");
-        if (orig_vt_no && -1 == ioctl(tty, VT_ACTIVATE, orig_vt_no))
-                perror("ioctl VT_ACTIVATE");
-        if (orig_vt_no && -1 == ioctl(tty, VT_WAITACTIVE, orig_vt_no))
-                perror("ioctl VT_WAITACTIVE");
-        tcsetattr(tty, TCSANOW, &term);
-        close(tty);
-}
-
-static int
-fb_init(char *device, char *mode, int bpp, int vt)
-{
-        char   fbdev[16];
-        struct vt_stat vts;
-        long pm = ~(sysconf(_SC_PAGESIZE) - 1);
-
-        dev_init();
-        tty = 0;
-        if (vt != 0)
-                fb_setvt(vt);
-
-        if (-1 == ioctl(tty,VT_GETSTATE, &vts)) {
-                fprintf(stderr,"ioctl VT_GETSTATE: %s (not a linux console?)\n",
-                        strerror(errno));
-                exit(1);
-        }
-    
-        if (NULL == device) {
-                device = getenv("FRAMEBUFFER");
-                if (NULL == device) {
-                        struct fb_con2fbmap c2m;
-                        if (-1 == (fb = open(devices->fb0,O_RDWR /* O_WRONLY */,0))) {
-                                fprintf(stderr,"open %s: %s\n",devices->fb0,strerror(errno));
-                                exit(1);
-                        }
-                        c2m.console = vts.v_active;
-                        if (-1 == ioctl(fb, FBIOGET_CON2FBMAP, &c2m)) {
-                                perror("ioctl FBIOGET_CON2FBMAP");
-                                exit(1);
-                        }
-                        close(fb);
-                        fprintf(stderr,"map: vt%02d => fb%d\n",
-                                c2m.console,c2m.framebuffer);
-                        sprintf(fbdev,devices->fbnr,c2m.framebuffer);
-                        device = fbdev;
-                }
-        }
-
-        /* get current settings (which we have to restore) */
-        if (-1 == (fb = open(device,O_RDWR /* O_WRONLY */))) {
-                fprintf(stderr,"open %s: %s\n",device,strerror(errno));
-                exit(1);
-        }
-        if (-1 == ioctl(fb,FBIOGET_VSCREENINFO,&fb_ovar)) {
-                perror("ioctl FBIOGET_VSCREENINFO");
-                exit(1);
-        }
-        if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix)) {
-                perror("ioctl FBIOGET_FSCREENINFO");
-                exit(1);
-        }
-        if (fb_ovar.bits_per_pixel == 8 ||
-            fb_fix.visual == FB_VISUAL_DIRECTCOLOR) {
-                if (-1 == ioctl(fb,FBIOGETCMAP,&ocmap)) {
-                        perror("ioctl FBIOGETCMAP");
-                        exit(1);
-                }
-        }
-        if (-1 == ioctl(tty,KDGETMODE, &kd_mode)) {
-                perror("ioctl KDGETMODE");
-                exit(1);
-        }
-        if (-1 == ioctl(tty,VT_GETMODE, &vt_omode)) {
-                perror("ioctl VT_GETMODE");
-                exit(1);
-        }
-        tcgetattr(tty, &term);
-    
-        /* switch mode */
-        fb_setmode(mode, bpp);
-    
-        /* checks & initialisation */
-        if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix)) {
-                perror("ioctl FBIOGET_FSCREENINFO");
-                exit(1);
-        }
-        if (fb_fix.type != FB_TYPE_PACKED_PIXELS) {
-                fprintf(stderr,"can handle only packed pixel frame buffers\n");
-                goto err;
-        }
-
-        fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (~pm);
-        fb_mem = mmap(NULL,fb_fix.smem_len+fb_mem_offset,
-                      PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
-        if (-1L == (long)fb_mem) {
-                perror("mmap");
-                goto err;
-        }
-        /* move viewport to upper left corner */
-        if (fb_var.xoffset != 0 || fb_var.yoffset != 0) {
-                fb_var.xoffset = 0;
-                fb_var.yoffset = 0;
-                if (-1 == ioctl(fb,FBIOPAN_DISPLAY,&fb_var)) {
-                        perror("ioctl FBIOPAN_DISPLAY");
-                        goto err;
-                }
-        }
-        if (-1 == ioctl(tty,KDSETMODE, KD_GRAPHICS)) {
-                perror("ioctl KDSETMODE");
-                goto err;
-        }
-        fb_activate_current(tty);
-
-        /* cls */
-        fb_memset(fb_mem + fb_mem_offset, 0, fb_fix.smem_len);
-        return fb;
-
-err:
-        fb_cleanup();
-        exit(1);
-}
-
-
-/* -------------------------------------------------------------------- */
-/* handle fatal errors                                                  */
-
-static jmp_buf fb_fatal_cleanup;
-
-static void
-fb_catch_exit_signal(int signal)
-{
-        siglongjmp(fb_fatal_cleanup,signal);
-}
-
-static void
-fb_catch_exit_signals(void)
-{
-        struct sigaction act,old;
-        int termsig;
-
-        memset(&act,0,sizeof(act));
-        act.sa_handler = fb_catch_exit_signal;
-        sigemptyset(&act.sa_mask);
-        sigaction(SIGINT, &act,&old);
-        sigaction(SIGQUIT,&act,&old);
-        sigaction(SIGTERM,&act,&old);
-
-        sigaction(SIGABRT,&act,&old);
-        sigaction(SIGTSTP,&act,&old);
-
-        sigaction(SIGBUS, &act,&old);
-        sigaction(SIGILL, &act,&old);
-        sigaction(SIGSEGV,&act,&old);
-
-        if (0 == (termsig = sigsetjmp(fb_fatal_cleanup,0)))
-                return;
-
-        /* cleanup */
-        fb_cleanup();
-        fprintf(stderr,"Oops: %s\n",sys_siglist[termsig]);
-        exit(42);
-}
-
-framebuffer_t *fb_os_init(int argc, char** argv)
-{
-        framebuffer_t *newfb;
-        int ploop;
-
-        fb_init("/dev/fb0", "800x600-70", 16, 1);
-        fb_switch_init();
-        fb_catch_exit_signals();
-
-        newfb = calloc(1, sizeof(framebuffer_t));
-
-        newfb->width = fb_var.xres;
-        newfb->height = fb_var.yres;
-        newfb->ptr = fb_mem;
-        newfb->linelen = fb_fix.line_length;
-        newfb->bpp = fb_var.bits_per_pixel;
-
-        if (newfb->bpp <= 8) {
-                for(ploop=0; ploop < 256; ploop++) {
-                        newfb->palette[ploop] = 0xFF000000 | 
-                                                ocmap.blue[ploop] << 16 | 
-                                                ocmap.green[ploop] << 8 | 
-                                                ocmap.red[ploop] ; 
-                }
-        }
-
-
-
-        keyboardfd = open("/dev/input/event0", O_RDONLY | O_NONBLOCK);
-        if (keyboardfd < 0) {
-                fprintf(stderr, "Unable to open /dev/input/event0 no keyboard\n");                
-        } 
-        mousefd = open("/dev/input/event2", O_RDONLY | O_NONBLOCK);
-        if (mousefd < 0) {
-                fprintf(stderr, "Unable to open /dev/input/event2 no mouse\n");                
-        } 
-        return newfb;
-}
-
-void fb_os_quit(framebuffer_t *fb)
-{
-        fb_cleanup();
-}
-
-void fb_os_input(struct gui_window *g) 
-{
-        ssize_t amt;
-        struct input_event event;       
-
-        if (keyboardfd >= 0) {
-
-                amt = read(keyboardfd, &event, sizeof(struct input_event));
-
-                if (amt > 0) {
-                        if (event.type != EV_KEY)
-                                return;
-
-                        if (event.value == 0)
-                                return;
-
-                        switch (event.code) {
-                        case KEY_J:
-                                g->scrolly +=100;
-                                gui_window_redraw_window(g);
-                                break;
-
-                        case KEY_K:
-                                g->scrolly -=100;
-                                if (g->scrolly < 0)
-                                        g->scrolly = 0;
-                                gui_window_redraw_window(g);
-                                break;
-
-                        case KEY_Q:
-                                browser_window_destroy(g->bw);
-                                break;
-
-                        case KEY_D:
-                                list_schedule();
-                                break;
-
-                        case KEY_UP:
-                                fb_cursor_move(framebuffer, 0, -1);
-                                break;
-
-                        case KEY_DOWN:
-                                fb_cursor_move(framebuffer, 0, 1);
-                                break;
-
-                        case KEY_LEFT:
-                                fb_cursor_move(framebuffer, -1, 0);
-                                break;
-
-                        case KEY_RIGHT:
-                                fb_cursor_move(framebuffer, 1, 0);
-                                break;
-                        }
-                }
-        }
-
-        if (mousefd >= 0) {
-
-                while((amt = read(mousefd, &event, sizeof(struct input_event))) > 0) {
-                        if (event.type != EV_REL)
-                                return;
-
-                        if (event.code == 0) {
-                                fb_cursor_move(framebuffer, event.value, 0);
-                        } else { 
-                                fb_cursor_move(framebuffer, 0, event.value);
-                        }
-                }
-        }
-
-}
-
-/*
- * Local Variables:
- * c-basic-offset:8
- * End:
- */
-

Modified: branches/vince/netsurf-fb/framebuffer/fb_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_plotters.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_plotters.c Thu Sep 18 07:43:53 2008
@@ -35,8 +35,6 @@
 
 /* Current plotting context */
 bbox_t fb_plot_ctx;
-
-extern framebuffer_t *framebuffer;
 
 #define REGION(x,y,cx1,cx2,cy1,cy2) ( ( (y) > (cy2) ? 8 : 0) |  \
                                       ( (y) < (cy1) ? 4 : 0) |  \
@@ -173,11 +171,6 @@
 	return true;
 }
 
-void fb_plotters_clear_cursor(void)
-{
-}
-
-
 colour fb_plotters_ablend(colour pixel, colour scrpixel)
 {
         int opacity = (pixel >> 24) & 0xFF;

Modified: branches/vince/netsurf-fb/framebuffer/fb_plotters.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_plotters.h?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_plotters.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_plotters.h Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *

Modified: branches/vince/netsurf-fb/framebuffer/fb_schedule.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_schedule.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_schedule.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_schedule.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -16,7 +16,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
- #include <sys/time.h>
+#include <sys/time.h>
 #include <time.h>
 
 #include "desktop/browser.h"
@@ -178,12 +178,13 @@
         struct nscallback *cur_nscb;
 
 	gettimeofday(&tv, NULL);
-        LOG(("schedule list at %lld:%lld", tv.tv_sec, tv.tv_usec));
+
+        LOG(("schedule list at %ld:%ld", tv.tv_sec, tv.tv_usec));
 
         cur_nscb = schedule_list;
 
         while (cur_nscb != NULL) {
-                LOG(("Schedule %p at %lld:%lld", 
+                LOG(("Schedule %p at %ld:%ld", 
                      cur_nscb, cur_nscb->tv.tv_sec, cur_nscb->tv.tv_usec));
                 cur_nscb = cur_nscb->next;
         }

Modified: branches/vince/netsurf-fb/framebuffer/fb_schedule.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_schedule.h?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_schedule.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_schedule.h Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *

Modified: branches/vince/netsurf-fb/framebuffer/font_8x16.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/font_8x16.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/font_8x16.c (original)
+++ branches/vince/netsurf-fb/framebuffer/font_8x16.c Thu Sep 18 07:43:53 2008
@@ -1,10 +1,22 @@
-/* fb/font_8x16.c
+/*
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
- * 8x16 console font generated by cpi2fnt
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
- * Copyright 2003 Simtec Electronics
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "desktop/plotters.h"
 #include "framebuffer/fb_font.h"
 
 #define FONTDATAMAX 4096

Modified: branches/vince/netsurf-fb/framebuffer/history.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/history.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/history.c (original)
+++ branches/vince/netsurf-fb/framebuffer/history.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -28,5 +28,6 @@
 
 char **global_history_get_recent(int *count)
 {
+    return NULL;
 }
 

Modified: branches/vince/netsurf-fb/framebuffer/hotlist.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/hotlist.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/hotlist.c (original)
+++ branches/vince/netsurf-fb/framebuffer/hotlist.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *

Modified: branches/vince/netsurf-fb/framebuffer/login.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/login.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/login.c (original)
+++ branches/vince/netsurf-fb/framebuffer/login.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *

Modified: branches/vince/netsurf-fb/framebuffer/misc.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/misc.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/misc.c (original)
+++ branches/vince/netsurf-fb/framebuffer/misc.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -20,8 +20,11 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+
 #include "desktop/cookies.h"
 #include "utils/messages.h"
+#include "utils/utils.h"
+#include "utils/url.h"
 
 void warn_user(const char *warning, const char *detail)
 {
@@ -33,7 +36,9 @@
 }
 
 bool cookies_update(const char *domain, const struct cookie_data *data)
-{ return true; }
+{ 
+    return true; 
+}
 
 char *url_to_path(const char *url)
 {

Modified: branches/vince/netsurf-fb/framebuffer/thumbnail.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/thumbnail.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/thumbnail.c (original)
+++ branches/vince/netsurf-fb/framebuffer/thumbnail.c Thu Sep 18 07:43:53 2008
@@ -21,4 +21,5 @@
 bool thumbnail_create(struct content *content, struct bitmap *bitmap,
 	const char *url)
 {
+    return false;
 }

Modified: branches/vince/netsurf-fb/framebuffer/tree.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/tree.c?rev=5370&r1=5369&r2=5370&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/tree.c (original)
+++ branches/vince/netsurf-fb/framebuffer/tree.c Thu Sep 18 07:43:53 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Chris Young <chris at unsatisfactorysoftware.co.uk>
+ * Copyright 2008 Vincent Sanders <vince at simtec.co.uk>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *




More information about the netsurf-commits mailing list