GSoC first month

Chris Young chris.young at unsatisfactorysoftware.co.uk
Sun Jun 14 09:56:33 BST 2009


On Sun, 14 Jun 2009 07:41:41 +0200, Mark wrote:

> Chris Young wrote:
> > On Thu, 11 Jun 2009 07:47:38 +0200, Mark wrote:
> >   
> >> Full Save GTK
> >>
> >> amiga implementation needs merger in view of added core
> >> functionality
> >>     
> >
> > If you need any pointers on that please let me know.
> >
> > Chris
> >   
> Hi Chris,
> 
> the main difficulty is that I have no way that I know of, of compiling
> for Amiga to check my work;

This may help, if you have the time and patience required to try it:
http://utilitybase.com/article/show/2007/06/23/231/Installing+an+AmigaOS+4+cross+compiler

> one more branch that I have yet to properly check for Amiga
> compatibility is search branch, involving a similar migration of
> functions from riscos/amiga to core;
> 
> so the best would be for you to check that both branches compile for
> Amiga, possibly debug the Amiga compile for search branch, possibly
> patch the full save branch?

Search compiles with a small patch (attached).  Text search works -
don't know about the web search, does that need some platform code?

Full save compiles once the duplicate code is removed and the new
functions added (diff attached), but it only saves the Inventory with
one entry - nothing else.  I haven't put anything in the new
functions though.

> As, in the full save branch, I simply avoided touching the Amiga branch
> at all, recognising the difficulty I was in in search branch; when I say
> 'needs merger in view of added core functionality' that's really a
> question of code optimisation, it should work untouched; longer term
> though it's a case of 'rewiring' the Amiga front to the changed core
> functions

No, it doesn't.  I'll have a look and see if I can get it working.

Regards
Chris
-------------- next part --------------
Index: amiga/search.c
===================================================================
--- amiga/search.c	(revision 7793)
+++ amiga/search.c	(working copy)
@@ -39,6 +39,7 @@
 #include "amiga/object.h"
 #include <proto/intuition.h>
 #include <proto/exec.h>
+#include "desktop/search.h"
 
 #include <proto/window.h>
 #include <proto/layout.h>
@@ -230,7 +231,7 @@
 
 }
 
-void gui_search_add_recent(static char *string)
+void gui_search_add_recent(const char *string)
 {
 }
 
-------------- next part --------------
Index: amiga/save_complete.c
===================================================================
--- amiga/save_complete.c	(revision 7793)
+++ amiga/save_complete.c	(working copy)
@@ -70,34 +70,6 @@
 static bool save_complete_inventory(const char *path);
 
 /**
- * Save an HTML page with all dependencies.
- *
- * \param  c     CONTENT_HTML to save
- * \param  path  directory to save to (must exist)
- * \return  true on success, false on error and error reported
- */
-
-bool save_complete(struct content *c, const char *path)
-{
-	bool result;
-
-	result = save_complete_html(c, path, true);
-
-	if (result)
-		result = save_complete_inventory(path);
-
-	/* free save_complete_list */
-	while (save_complete_list) {
-		struct save_complete_entry *next = save_complete_list->next;
-		free(save_complete_list);
-		save_complete_list = next;
-	}
-
-	return result;
-}
-
-
-/**
  * Save an HTML page with all dependencies, recursing through imported pages.
  *
  * \param  c      CONTENT_HTML to save
@@ -365,45 +337,7 @@
 	return true;
 }
 
-
 /**
- * Initialise the save_complete module.
- */
-
-void save_complete_init(void)
-{
-	/* Match an @import rule - see CSS 2.1 G.1. */
-	regcomp_wrapper(&save_complete_import_re,
-			"@import"		/* IMPORT_SYM */
-			"[ \t\r\n\f]*"		/* S* */
-			/* 1 */
-			"("			/* [ */
-			/* 2 3 */
-			"\"(([^\"]|[\\]\")*)\""	/* STRING (approximated) */
-			"|"
-			/* 4 5 */
-			"'(([^']|[\\]')*)'"
-			"|"			/* | */
-			"url\\([ \t\r\n\f]*"	/* URI (approximated) */
-			     /* 6 7 */
-			     "\"(([^\"]|[\\]\")*)\""
-			     "[ \t\r\n\f]*\\)"
-			"|"
-			"url\\([ \t\r\n\f]*"
-			    /* 8 9 */
-			     "'(([^']|[\\]')*)'"
-			     "[ \t\r\n\f]*\\)"
-			"|"
-			"url\\([ \t\r\n\f]*"
-			   /* 10 */
-			     "([^) \t\r\n\f]*)"
-			     "[ \t\r\n\f]*\\)"
-			")",			/* ] */
-			REG_EXTENDED | REG_ICASE);
-}
-
-
-/**
  * Rewrite stylesheet \@import rules for save complete.
  *
  * @param  source  stylesheet source
@@ -819,3 +753,35 @@
 	return true;
 }
 
+/**
+ * conducts the filesystem save appropriate to the gui
+ * \param path save path
+ * \param filename name of file to save
+ * \param c content to save, or NULL
+ * \param len data length
+ * \param sourcedata pointer to data to save, NULL when all data in sourcedata
+ * \param type integer filetype [riscos]
+ * \return true for success
+ */
+bool save_complete_gui_save(const char *path, const char *filename, struct content *c, int len, char *sourcedata, int type)
+{
+	return true;
+}
+
+/**
+ * wrapper for lib function htmlSaveFileFormat
+ */
+int save_complete_htmlSaveFileFormat(const char *path, const char *filename,
+		xmlDocPtr cur, const char *encoding, int format)
+{
+	return 0;
+}
+
+/**
+ * mainly implemented as a wrapper for riscos
+ */
+bool save_complete_gui_filetype(const char *path, const char *filename,
+		int type)
+{
+	return true;
+}


More information about the netsurf-dev mailing list