Last modified: 2007-01-07 19:13:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7001 - patches for flexbisonparse
patches for flexbisonparse
Product: MediaWiki extensions
Classification: Unclassified
General/Unknown (Other open bugs)
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2006-08-13 17:27 UTC by CyrilB
Modified: 2007-01-07 19:13 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description CyrilB 2006-08-13 17:27:41 UTC
the following patches adresses two problems of flexbisonparse (current svn version):

1- supression of warning during compilation by inclusion of stdlib.h in
parsetree.c and of string.h in wikiparse.y (kind of warning suppressed: "
warning: incompatible implicit declaration of built-in function ‘printf’")

2- I got a sementation fault when processing big (17kB) files with the following
command : "./wikiparse < ../../ ". It turned out that this is due to
the printf in main(), and that the problem disapeared with "printf ("%s",
outputXML (articlenode, 1024));" instead of "printf ( outputXML (articlenode,
1024) ) ;" (I don't really know why, I'm not a C expert...)

the patch is as follow:

Index: wikiparse.y
--- wikiparse.y (revision 16034)
+++ wikiparse.y (working copy)
@@ -11,6 +11,7 @@
  **                 Originally written 2004 by Timwi

+#include <string.h>
 #include <stdio.h>
 #include "parsetree.h"
 #include "fb_defines.h"
@@ -633,7 +634,7 @@
 //    printf ("Parsing... ");

     result = yyparse();
-    if (!result) printf ( outputXML (articlenode, 1024) ) ;
+    if (!result) printf ("%s", outputXML (articlenode, 1024));
 //        printf ("\n\nXML output:\n\n%s\n\n", outputXML (articlenode, 1024));
     freeRecursively (articlenode);
     return result;
Index: parsetree.c
--- parsetree.c (revision 16034)
+++ parsetree.c (working copy)
@@ -11,6 +11,7 @@

 #include "parsetree.h"
 #include "fb_defines.h"
+#include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
Comment 1 Antoine "hashar" Musso (WMF) 2007-01-07 19:13:51 UTC
I applied your patches even though flexbisonparse is nore maintained.

Note You need to log in before you can comment on or make changes to this bug.