Re: [Monetdb-developers] [Monetdb-pf-checkins] pathfinder/runtime shredder.mx, Feb2009, 1.153.2.5, 1.153.2.6
On Fri, Feb 20, 2009 at 02:18:38PM +0000, Jan Flokstra wrote:
Update of /cvsroot/monetdb/pathfinder/runtime In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16245
Modified Files: Tag: Feb2009 shredder.mx Log Message: - fixed shred_characters() bug, sorry :-(
Testing suggests that this indeed fixes the previously reported errors / failing tests, again. Thanks! We would *VERY MUCH APPRECIATE*, though, if you could run Mtest yourself --- and check the results to ensure that your changes do not break previously working code & tests --- *before* checking in, at least when bugfixing on the stable branch just before a planned release... Running Mtest costs (each of) you just 12 key strokes (`Mtest.py -r[Enter]`) and (even for pathfinder) takes much less time than it takes us to sort out the problems of many checkins by different people, and Sjoerd to re-build the release candidates more often than necessary ... (Once again) thank you very much in advance for you cooperation! Stefan
U shredder.mx Index: shredder.mx =================================================================== RCS file: /cvsroot/monetdb/pathfinder/runtime/shredder.mx,v retrieving revision 1.153.2.5 retrieving revision 1.153.2.6 diff -u -d -r1.153.2.5 -r1.153.2.6 --- shredder.mx 20 Feb 2009 13:06:50 -0000 1.153.2.5 +++ shredder.mx 20 Feb 2009 14:18:35 -0000 1.153.2.6 @@ -1105,9 +1105,20 @@ const xmlChar *cs, int n) { +#ifdef OLD_SHRED_CHARACTERS shredCtxStruct *shredCtx = (shredCtxStruct*) xmlCtx; + int l = MIN(PFSHRED_STRLEN_MAX -(int) shredCtx->content, n);
- if ( (shredCtx->content + n + 1) < shredCtx->content_max) { + memcpy(&(shredCtx->content_buf[shredCtx->content]), cs, l); + shredCtx->content += l; + + if (l < n) + stream_printf(GDKout, "!WARNING: shred_characters truncated text node > %d characters(starts with `%.16s...')\n", + (int) PFSHRED_STRLEN_MAX, cs); +#else + shredCtxStruct *shredCtx = (shredCtxStruct*) xmlCtx; + + if ( (shredCtx->content + n + 1) > shredCtx->content_max) { shredCtx->content_max = shredCtx->content + n + 1; shredCtx->content_buf = GDKrealloc(shredCtx->content_buf, shredCtx->content_max); if (shredCtx->content_buf == NULL) { @@ -1117,6 +1128,7 @@ } memcpy(&(shredCtx->content_buf[shredCtx->content]), cs, n); shredCtx->content += n; +#endif }
/**
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
participants (1)
-
Stefan Manegold