Frank,
Jorge Arellano Cid wrote:
Hi Frank,
After waiting for a week as you suggested, today I gave a review to the new kbnav patch. It feels good!
After some testing I came across a page that produces a segfault. The attached patch is against today's CVS + a couple of compiler-warning removals. The page is also attached. Beware that the segfault is only caught when the new parser is used, and that the page has bad-html. The case is interesting though, because a weird widget tree is generated and iterators should be able to handle/survive them!
Please give it a look.
Cheers Jorge.-
I have taken a look at your patch-to-my-patch, but did not apply it to the version I will publish later today.
:-o
I did do some manual reformatting to correct some tab-related problems
Good!
(Emacs' use of tabs messes up things sometimes, and the 2-space indent it uses are not consistent with Dillo's conventions).
Thanks, we strive to be style consistent. BTW, I didn't try to fix indentation in the patch, it was just to do a test run.
Some files seem to be missing from the patch you sent me, I guess you did not make any changes to those?
My mistake.
I did not see anything in your patch which would have corrected any compiler warnings by that way, with a possible exception for the disputed URL_ILLEGAL_CHARS_ macro. In my patch I used URL_ILLEGAL_CHARS_(u) in html.c, while you use URL_ILLEGAL_CHARS(u). In the current patch I use URL_ILLEGAL_CHARS(u) as well. The end result should be the same however now that both versions exist. What compiler warnings did you get which were corrected by your modifications to my patch?
focus.c: In function `Focus_state_find_list': focus.c:268: warning: `list' might be used uninitialized in this function focus.c: In function `Focus_state_find_link': focus.c:465: warning: `list' might be used uninitialized in this function gcc version 3.2.3
On that Tarot-page you added to the message, I can say that navigation is still quirky. But so is the page, it produces 9 warnings about misplaced </a> tags. If you look at the source, you'll notice that it misses several closing </A> tags (causing Dillo to allocate links all over the page). It also contains some links with <BR> in them, which used to crash patched Dillo because of the problem with a_Dw_page_construct_iterator (which used to always set the mask to DW_CONTENT_ALL, I changed this to a user-settable mask like all other iterators have). I guess you attached the page because of those crashes?
Yes, for you to have a way to reproduce it. BTW, that is what I meant with: "page has bad-html".
I will probably publish a new version of the patch (4) today, together with a new version of the tab/frame patch. That version should be more or less ready to commit, as no serious problems have cropped up for several days now. See the list for problems found and corrected (including the one causing the Tarot page to crash by the way - see my message dated Wed, 12 Nov 2003 11:00:58 +0100).
Oh, I didn't find anything about it at GMANE !? Cheers Jorge.-
(Emacs' use of tabs messes up things sometimes, and the 2-space indent it uses are not consistent with Dillo's conventions).
Emacs users, put the following code into ~/.emacs: ---------------------------------------------------------------------- (defun array-find (a1 a2 &optional index-or-nil) (let ((index (if index-or-nil index-or-nil 0)) (l1 (length a1)) (l2 (length a2))) (if (> (+ index l2) l1) nil (let ((i 0)) (while (and (< i l2) (= (aref a1 (+ index i)) (aref a2 i))) (setq i (+ i 1))) (if (= i l2) index (array-find a1 a2 (+ index 1))))))) (defun my-c-hook () (if (array-find (buffer-file-name) "/dillo") (progn ;; dillo conventions (set-variable 'indent-tabs-mode nil) (set-variable 'c-basic-offset 3)) ;; conventions for other code (set-variable 'indent-tabs-mode t) (set-variable 'c-basic-offset 2))) (add-hook 'c-mode-hook 'my-c-hook) ---------------------------------------------------------------------- This hook for the C mode switches between different coding styles, a file with a path containing "/dillo" is considered to be part of dillo. (I'm not that familiar with Emacs lisp, probably, there is alraedy something like "array-find".) Sebastian
Sebastian Geerken wrote:
(Emacs' use of tabs messes up things sometimes, and the 2-space indent it uses are not consistent with Dillo's conventions).
Emacs users, put the following code into ~/.emacs:
---------------------------------------------------------------------- (defun array-find (a1 a2 &optional index-or-nil) (let ((index (if index-or-nil index-or-nil 0)) (l1 (length a1)) (l2 (length a2))) (if (> (+ index l2) l1) nil (let ((i 0)) (while (and (< i l2) (= (aref a1 (+ index i)) (aref a2 i))) (setq i (+ i 1))) (if (= i l2) index (array-find a1 a2 (+ index 1)))))))
(defun my-c-hook () (if (array-find (buffer-file-name) "/dillo") (progn ;; dillo conventions (set-variable 'indent-tabs-mode nil) (set-variable 'c-basic-offset 3)) ;; conventions for other code (set-variable 'indent-tabs-mode t) (set-variable 'c-basic-offset 2)))
(add-hook 'c-mode-hook 'my-c-hook)
Thanks... Makes it a bit easier to be Dillo-compliant... Cheers//Frank -- WWWWW ________________________ ## o o\ / Frank de Lange \ }# \| / +46-734352015 \ \ `--| _/ <Hacker for Hire> \ `---' \ +31-640037120 / \ frank@unternet.org / `------------------------' [ "Omnis enim res, quae dando non deficit, dum habetur et non datur, nondum habetur, quomodo habenda est." ]
Jorge Arellano Cid wrote:
I have taken a look at your patch-to-my-patch, but did not apply it to the version I will publish later today.
OK, later tomorrow, did not have time today... Both patches.
Anyway, the reason I did not apply the patch was because it was incomplete, and I had changed my version in the meantime (as you'll notice when it finally is available to the masses, tomorrow...).
Thanks, we strive to be style consistent. BTW, I didn't try to fix indentation in the patch, it was just to do a test run.
I'd like to teach my Emacsen to 'do the right thing', but they all have a will of their own when it comes to indentation. And the use of tabs instead of spaces. But as Emacs' indentation (GNU-style) is what I generally use that's no problem for me. Except in the case of Dillo...
focus.c: In function `Focus_state_find_list': focus.c:268: warning: `list' might be used uninitialized in this function focus.c: In function `Focus_state_find_link': focus.c:465: warning: `list' might be used uninitialized in this function
gcc version 3.2.3
Hmmmm... Nothing here with 3.2.2, weird. I'll have a look at this...
(including the one causing the Tarot page to crash by the way - see my message dated Wed, 12 Nov 2003 11:00:58 +0100).
Oh, I didn't find anything about it at GMANE !?
http://article.gmane.org/gmane.comp.web.dillo.devel/1458 Cheers//Frank -- WWWWW ________________________ ## o o\ / Frank de Lange \ }# \| / +46-734352015 \ \ `--| _/ <Hacker for Hire> \ `---' \ +31-640037120 / \ frank@unternet.org / `------------------------' [ "Omnis enim res, quae dando non deficit, dum habetur et non datur, nondum habetur, quomodo habenda est." ]
participants (3)
-
Frank de Lange
-
Jorge Arellano Cid
-
Sebastian Geerken