Re: [cp-patches] FYI: Swing Demos / minor fixes
Hi David, Am Montag, den 30.01.2006, 23:24 + schrieb David Gilbert: This patch (committed) removes one of the 'Close' buttons from the demo panels when they are launched from the main Swing demo: 2006-01-30 David Gilbert [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/ButtonDemo.java (ButtonDemo): Move content initialisation to new method, (initFrameContent): New method, (main): Call initFrameContent(), * examples/gnu/classpath/examples/swing/ComboBoxDemo.java: Likewise, * examples/gnu/classpath/examples/swing/FileChooserDemo.java: Likewise, * examples/gnu/classpath/examples/swing/ScrollBarDemo.java: Likewise, * examples/gnu/classpath/examples/swing/SliderDemo.java: Likewise, * examples/gnu/classpath/examples/swing/TextFieldDemo.java: Likewise. Regards, Thank you for fixing this. This must have slipped through my attention :-) Cheers, Roman signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
[cp-patches] FYI: BasicTextUI fixlet
The method BasicTextUI.createKeymap() used to store a KeyBinding[] into the UIManager focusInputMap for the text component. This is certainly wrong. If at all the KeyBinding[] should be stored as prefix + .bindings. However I think that this method should not even do this. AFAICS no Swing class stores anything into the UIManager (except the LookAndFeel classes of course). Also, this method seems to be implemented wrong at all. For details look at the FIXME that I added and this bugreport that I filed for this: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26045 I committed this small fix for now to make my application working: 2006-01-31 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTextUI.java (createKeymap): Don't store KeyBindings[] as focusInputMap in UIManager. Added FIXME regarding the implementation of this method. /Roman Index: javax/swing/plaf/basic/BasicTextUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v retrieving revision 1.62 diff -u -r1.62 BasicTextUI.java --- javax/swing/plaf/basic/BasicTextUI.java 22 Dec 2005 16:04:56 - 1.62 +++ javax/swing/plaf/basic/BasicTextUI.java 31 Jan 2006 09:27:46 - @@ -621,6 +621,11 @@ */ protected Keymap createKeymap() { +// FIXME: It seems to me that this method implementation is wrong. It seems +// to fetch the focusInputMap and transform it to the KeyBinding/Keymap +// implemenation. I would think that it should be done the other way, +// fetching the keybindings (from prefix + .bindings) and transform +// it to the newer InputMap/ActionMap implementation. JTextComponent.KeyBinding[] bindings = null; String prefix = getPropertyPrefix(); InputMapUIResource m = (InputMapUIResource) UIManager.get(prefix + .focusInputMap); @@ -637,10 +642,7 @@ } } if (bindings == null) - { -bindings = new JTextComponent.KeyBinding[0]; -UIManager.put(prefix + .focusInputMap, bindings); - } + bindings = new JTextComponent.KeyBinding[0]; Keymap km = JTextComponent.addKeymap(getKeymapName(), JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP));
[cp-patches] FYI: Plain text fixes
I have an application here that implements a subclass of PlainView and seems to expect the drawLine method to be feeded with the coordinates of the text baseline instead of the upper left corner of the text. I adjusted the affected methods and added documentation for this. 2006-01-31 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/text/PlainView.java (paint): Call drawLine with baseline coordinates. (drawLine): Documented and indented this method. (drawUnselecetedText): Documented and indented this method. * javax/swing/plaf/text/Utilites.java (drawTabbedText): The coordinates denote the baseline of the text not the upper left corner. /Roman Index: javax/swing/text/PlainView.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/PlainView.java,v retrieving revision 1.34 diff -u -r1.34 PlainView.java --- javax/swing/text/PlainView.java 24 Nov 2005 20:36:55 - 1.34 +++ javax/swing/text/PlainView.java 31 Jan 2006 10:00:54 - @@ -137,22 +137,31 @@ return rect; } + /** + * Draws a line of text. The X and Y coordinates specify the start of + * the embaseline/em of the line. + * + * @param lineIndex the index of the line + * @param g the graphics to use for drawing the text + * @param x the X coordinate of the baseline + * @param y the Y coordinate of the baseline + */ protected void drawLine(int lineIndex, Graphics g, int x, int y) { try { - metrics = g.getFontMetrics(); - // FIXME: Selected text are not drawn yet. - Element line = getElement().getElement(lineIndex); - drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset()); - //drawSelectedText(g, , , , ); +metrics = g.getFontMetrics(); +// FIXME: Selected text are not drawn yet. +Element line = getElement().getElement(lineIndex); +drawUnselectedText(g, x, y, line.getStartOffset(), line.getEndOffset()); +//drawSelectedText(g, , , , ); } catch (BadLocationException e) - { - AssertionError ae = new AssertionError(Unexpected bad location); - ae.initCause(e); - throw ae; - } +{ + AssertionError ae = new AssertionError(Unexpected bad location); + ae.initCause(e); + throw ae; +} } protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) @@ -164,6 +173,20 @@ return Utilities.drawTabbedText(segment, x, y, g, this, 0); } + /** + * Draws a chunk of unselected text. + * + * @param g the graphics to use for drawing the text + * @param x the X coordinate of the baseline + * @param y the Y coordinate of the baseline + * @param p0 the start position in the text model + * @param p1 the end position in the text model + * + * @return the X location of the end of the range + * + * @throws BadLocationException if codep0/code or codep1/code are + * invalid + */ protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { @@ -194,12 +217,12 @@ // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); -int y = rect.y; +int y = rect.y + metrics.getAscent(); for (int i = 0; i root.getElementCount(); i++) { - drawLine(i, g, rect.x, y); - y += metrics.getHeight(); +drawLine(i, g, rect.x, y); +y += metrics.getHeight(); } } Index: javax/swing/text/Utilities.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/Utilities.java,v retrieving revision 1.19 diff -u -r1.19 Utilities.java --- javax/swing/text/Utilities.java 23 Nov 2005 11:59:30 - 1.19 +++ javax/swing/text/Utilities.java 31 Jan 2006 10:00:54 - @@ -73,6 +73,10 @@ * are taken into account. Tabs are expanded using the * specified [EMAIL PROTECTED] TabExpander}. * + * + * The X and Y coordinates denote the start of the embaseline/em where + * the text should be drawn. + * * @param s the text fragment to be drawn. * @param x the x position for drawing. * @param y the y position for drawing. @@ -88,15 +92,14 @@ // This buffers the chars to be drawn. char[] buffer = s.array; - -// The current x and y pixel coordinates. -int pixelX = x; -int pixelY = y; - // The font metrics of the current selected font. FontMetrics metrics = g.getFontMetrics(); int ascent = metrics.getAscent(); +// The current x and y pixel coordinates. +int pixelX = x; +int pixelY = y - ascent; + int pixelWidth = 0; int pos = s.offset; int len = 0;
[cp-patches] FYI: gnu.regexp: REMatch to return null for a skipped group
I am checking this in. ChangeLog 2006-01-31 Ito Kazumitsu [EMAIL PROTECTED] Fixes bug #22873 * gnu/regexp/REMatch(toString(int)): Throw IndexOutOfBoundsException for an invalid index and return null for a skipped group. Index: classpath/gnu/regexp/REMatch.java === RCS file: /cvsroot/classpath/classpath/gnu/regexp/REMatch.java,v retrieving revision 1.4 diff -u -r1.4 REMatch.java --- classpath/gnu/regexp/REMatch.java 30 Jan 2006 12:35:54 - 1.4 +++ classpath/gnu/regexp/REMatch.java 31 Jan 2006 14:43:41 - @@ -179,7 +179,9 @@ * @param sub Index of the subexpression. */ public String toString(int sub) { - if ((sub = start.length) || (start[sub] == -1)) return ; + if ((sub = start.length) || sub 0) + throw new IndexOutOfBoundsException(No group + sub); + if (start[sub] == -1) return null; return (matchedText.substring(start[sub],end[sub])); }
[cp-patches] Patch: DefaultStyledDocument fixlet
A small fix 2006-01-31 Lillian Angel [EMAIL PROTECTED] * javax/swing/text/DefaultStyledDocument.java (insert): Removed comment. (insertUpdate): Added comment. (recreateLeaves): Removed call to push newBranch onto the stack. This does not need to be done here. Index: javax/swing/text/DefaultStyledDocument.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v retrieving revision 1.51 diff -u -r1.51 DefaultStyledDocument.java --- javax/swing/text/DefaultStyledDocument.java 30 Jan 2006 21:26:25 - 1.51 +++ javax/swing/text/DefaultStyledDocument.java 31 Jan 2006 16:37:28 - @@ -666,17 +667,19 @@ { if (length == 0) return; + this.offset = offset; this.pos = offset; this.endOffset = offset + length; this.length = length; documentEvent = ev; - // Push the root and the paragraph at offset onto the element stack. + edits.removeAllElements(); elementStack.removeAllElements(); lastFractured = null; origParCreated = false; fracNotCreated = false; + insertUpdate(data); // This for loop applies all the changes that were made and updates the @@ -702,6 +705,7 @@ */ protected void insertUpdate(ElementSpec[] data) { + // Push the root and the paragraph at offset onto the element stack. origParCreated = false; Element current = root; int index; @@ -1049,7 +1053,6 @@ Element[] added = recreateAfterFracture(removed, newBranch, 0, child.getEndOffset()); edit = getEditForParagraphAndIndex(newBranch, 1); edit.addAddedElements(added); - elementStack.push(newBranch); lastFractured = newLeaf; offset = newBranch.getEndOffset(); }
[cp-patches] FYI: BasicRootPaneUI fixlet
A mauve test that I committed just now points out that the BasicRootPaneUI should not install a background color on JRootPanes. This is fixed by this patch. 2006-01-31 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicRootPaneUI.java (installDefaults): Don't install a background color here. /Roman Index: javax/swing/plaf/basic/BasicRootPaneUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicRootPaneUI.java,v retrieving revision 1.10 diff -u -r1.10 BasicRootPaneUI.java --- javax/swing/plaf/basic/BasicRootPaneUI.java 18 Oct 2005 22:10:32 - 1.10 +++ javax/swing/plaf/basic/BasicRootPaneUI.java 31 Jan 2006 20:25:12 - @@ -75,8 +75,7 @@ */ protected void installDefaults(JRootPane rp) { -// Is this ok? -rp.setBackground(UIManager.getColor(control)); +// TODO: What to do here, if anything? (might be a hook method) } /**
[cp-patches] Patch: DefaultStyledDocument split/edit fix
Another fix to correctly split elements when inserting a new paragraph. 2006-01-31 Lillian Angel [EMAIL PROTECTED] * javax/swing/text/DefaultStyledDocument.java (changeUpdate): Fixed calls to split to incorporate new parameter. (insertParagraph): Likewise. Uses 0 as editIndex because inserting into a new paragraph. (insertContentTag): Fixed check to use recreateLeaves. Added a FIXME comment. (split): Added a new parameter for edits. Index: javax/swing/text/DefaultStyledDocument.java === RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v retrieving revision 1.52 diff -u -r1.52 DefaultStyledDocument.java --- javax/swing/text/DefaultStyledDocument.java 31 Jan 2006 16:43:26 - 1.52 +++ javax/swing/text/DefaultStyledDocument.java 31 Jan 2006 21:10:29 - @@ -573,7 +573,7 @@ { // Split up the element at the start offset if necessary. Element el = getCharacterElement(offset); - Element[] res = split(el, offset, 0); + Element[] res = split(el, offset, 0, el.getElementIndex(offset)); BranchElement par = (BranchElement) el.getParentElement(); if (res[1] != null) { @@ -599,7 +599,7 @@ int endOffset = offset + length; el = getCharacterElement(endOffset); - res = split(el, endOffset, 0); + res = split(el, endOffset, 0, el.getElementIndex(endOffset)); par = (BranchElement) el.getParentElement(); if (res[1] != null) { @@ -789,7 +789,7 @@ private Element insertParagraph(BranchElement par, int offset) { Element current = par.getElement(par.getElementIndex(offset)); - Element[] res = split(current, offset, 0); + Element[] res = split(current, offset, 0, 0); int index = par.getElementIndex(offset); Edit e = getEditForParagraphAndIndex(par, index + 1); Element ret; @@ -971,17 +970,16 @@ } else if (!origParCreated || dir != ElementSpec.OriginateDirection) { + // FIXME: insert TestTag4 int end = pos + len; Element leaf = createLeafElement(paragraph, tag.getAttributes(), pos, end); edit.addAddedElement(leaf); - // check if there is an overlap with the next element. + // recreate all others Element next = paragraph.getElement(index); - if (pos = next.getStartOffset() pos next.getEndOffset()) + if (next != null next.isLeaf()) { - Element nextLeaf = createLeafElement(paragraph, next.getAttributes(), - end, next.getEndOffset()); - edit.addAddedElement(nextLeaf); + recreateLeaves(end, new ElementSpec[] { tag }); edit.addRemovedElement(next); } } @@ -1075,6 +1073,8 @@ * the offset at which to possibly split * @param space * the amount of space to create between the splitted parts + * @param editIndex + * the index of the edit to use * @return An array of elements which represent the split result. This array * has two elements, the two parts of the split. The first element * might be null, which means that the element which should be @@ -1082,7 +1082,7 @@ * null, which means that the offset is already at an element * boundary and the element doesn't need to be splitted. */ -private Element[] split(Element el, int offset, int space) +private Element[] split(Element el, int offset, int space, int editIndex) { // If we are at an element boundary, then return an empty array. if ((offset == el.getStartOffset() || offset == el.getEndOffset()) @@ -1097,7 +1097,7 @@ { int index = el.getElementIndex(offset); Element child = el.getElement(index); - Element[] result = split(child, offset, space); + Element[] result = split(child, offset, space, editIndex); Element[] removed; Element[] added; Element[] newAdded; @@ -1130,33 +1130,29 @@ if (ind != 0) newAdded[ind] = el2; } - - Edit edit = getEditForParagraphAndIndex((BranchElement) el, index); + + Edit edit = getEditForParagraphAndIndex((BranchElement) el, editIndex); edit.addRemovedElements(removed); edit.addAddedElements(added); - + BranchElement newPar = (BranchElement) new BranchElement(el.getParentElement(), el.getAttributes()); newPar.replace(0, 0, newAdded); res = new Element[] { null, newPar }; }
Re: [cp-patches] RFC: newly generated Character.UnicodeBlock
Tony == Anthony Balkissoon [EMAIL PROTECTED] writes: Tony The script was run with the input file Blocks-4.0.0.txt downloadable Tony from www.unicode.org. I haven't yet added this to our doc/unicode Tony folder but I would add that along with this patch. Sounds good. Don't forget to mention it in the ChangeLog. Tony In addition, we would need to download UnicodeData-4.0.0.txt and Tony SpecialCasing-4.txt and update scripts/unicode-muncher.pl to generate Tony the new data for gnu.java.lang.CharData. When this is done, the missing Tony lookup methods for java.lang.Character can be written. I'm not yet sure Tony how to update unicode-muncher.pl but I'll look into it, or if someone Tony else knows what needs to be done, please go ahead and do it. It may be as simple as having the script loop over the new characters as well. That is where I would start. Tony For the moment, is it okay to commit this? Yes, thanks. Tom
Re: [cp-patches] RFC: gnu.regexp: Named property expression supported
Hi Ito, On Mon, 2006-01-30 at 22:19 +0900, Ito Kazumitsu wrote: ChangeLog 2006-01-30 Ito Kazumitsu [EMAIL PROTECTED] Fixes bug #26002 * gnu/regexp/gnu/regexp/RE.java(initialize): Parse /\p{prop}/. (NamedProperty): New inner class. (getNamedProperty): New method. (getRETokenNamedProperty): New Method. * gnu/regexp/RESyntax.java(RE_NAMED_PROPERTY): New syntax falg. * gnu/regexp/RETokenNamedProperty.java: New file. Christian told me he needed a little extension to this for the combined properties L, M, Z, S, N, P and C to get eclipse 3.2M4 working. They are explained here: http://www.regular-expressions.info/unicode.html This is my quick and dirty implementation of it. What do you think? I'll test and write a real ChangeLog for it later. Cheers, Mark Index: gnu/regexp/RE.java === RCS file: /cvsroot/classpath/classpath/gnu/regexp/RE.java,v retrieving revision 1.14 diff -u -r1.14 RE.java --- gnu/regexp/RE.java 31 Jan 2006 14:39:08 - 1.14 +++ gnu/regexp/RE.java 31 Jan 2006 23:41:28 - @@ -1210,7 +1210,10 @@ return new RETokenNamedProperty(subIndex, np.name, insens, np.negate); } catch (REException e) { - throw new REException(e.getMessage(), REException.REG_ESCAPE, index); + REException ree; + ree = new REException(e.getMessage(), REException.REG_ESCAPE, index); + ree.initCause(e); + throw ree; } } Index: gnu/regexp/RETokenNamedProperty.java === RCS file: /cvsroot/classpath/classpath/gnu/regexp/RETokenNamedProperty.java,v retrieving revision 1.1 diff -u -r1.1 RETokenNamedProperty.java --- gnu/regexp/RETokenNamedProperty.java 31 Jan 2006 14:39:08 - 1.1 +++ gnu/regexp/RETokenNamedProperty.java 31 Jan 2006 23:41:28 - @@ -44,6 +44,44 @@ boolean negate; Handler handler; + // Grouped properties + static final byte[] LETTER = new byte[] { Character.LOWERCASE_LETTER, + Character.UPPERCASE_LETTER, + Character.TITLECASE_LETTER, + Character.MODIFIER_LETTER, + Character.OTHER_LETTER }; + + static final byte[] MARK = new byte[] { Character.NON_SPACING_MARK, + Character.COMBINING_SPACING_MARK, + Character.ENCLOSING_MARK }; + + static final byte[] SEPARATOR = new byte[] { Character.SPACE_SEPARATOR, + Character.LINE_SEPARATOR, + Character.PARAGRAPH_SEPARATOR }; + + static final byte[] SYMBOL = new byte[] { Character.MATH_SYMBOL, + Character.CURRENCY_SYMBOL, + Character.MODIFIER_SYMBOL, + Character.OTHER_SYMBOL }; + + static final byte[] NUMBER = new byte[] { Character.DECIMAL_DIGIT_NUMBER, + Character.LETTER_NUMBER, + Character.OTHER_NUMBER }; + + static final byte[] PUNCTUATION = new byte[] { Character.DASH_PUNCTUATION, + Character.START_PUNCTUATION, + Character.END_PUNCTUATION, + Character.CONNECTOR_PUNCTUATION, + Character.OTHER_PUNCTUATION, + Character.INITIAL_QUOTE_PUNCTUATION, + Character.FINAL_QUOTE_PUNCTUATION}; + + static final byte[] OTHER = new byte[] { Character.CONTROL, + Character.FORMAT, + Character.PRIVATE_USE, + Character.SURROGATE, + Character.UNASSIGNED }; + RETokenNamedProperty(int subIndex, String name, boolean insens, boolean negate) throws REException { super(subIndex); this.name = name; @@ -108,6 +146,21 @@ if (name.startsWith(Is)) { name = name.substring(2); } + + // grouped properties + if (name.equals(L)) + return new UnicodeCategoriesHandler(LETTER); + if (name.equals(M)) + return new UnicodeCategoriesHandler(MARK); + if (name.equals(Z)) + return new UnicodeCategoriesHandler(SYMBOL); + if (name.equals(N)) + return new UnicodeCategoriesHandler(NUMBER); + if (name.equals(P)) + return new UnicodeCategoriesHandler(PUNCTUATION); + if (name.equals(C)) + return new UnicodeCategoriesHandler(OTHER); + if (name.equals(Mc)) return new UnicodeCategoryHandler(Character.COMBINING_SPACING_MARK); if (name.equals(Pc)) @@ -199,5 +252,18 @@ return Character.getType(c) == category; } } - + +
[cp-testresults] FAIL: ecj built with gcjx on Tue Jan 31 04:51:09 UTC 2006
terminate called after throwing an instance of 'exception_tmpl0' xargs: gcjx: terminated by signal 6 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: ecj built with gcjx on Tue Jan 31 14:25:59 UTC 2006
terminate called after throwing an instance of 'exception_tmpl0' xargs: gcjx: terminated by signal 6 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: regressions for mauve-jamvm on Wed Feb 1 06:38:44 UTC 2006
Baseline from: Sun Jan 29 02:20:28 UTC 2006 Regressions: FAIL: gnu.testlet.javax.swing.event.SwingPropertyChangeSupport.removePropertyChangeListener: (String, PropertyChangeListener) (number 4) FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8: create eighth leaf element (number 15) FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.ElementStructure8: create eighth leaf element (number 6) New fails: FAIL: gnu.testlet.java.lang.Double.DoubleTest: test_equals CYGNUS: Double.equals - 8 (number 1) FAIL: gnu.testlet.java.lang.Double.DoubleTest: test_toString - 8 (number 1) FAIL: gnu.testlet.java.lang.Float.FloatTest: test_equals - 8 (number 1) FAIL: gnu.testlet.java.lang.Float.FloatTest: test_toString - 8 (number 1) FAIL: gnu.testlet.java.lang.Math.MathTest: test_atan2 - 5 (number 1) FAIL: gnu.testlet.javax.swing.event.SwingPropertyChangeSupport.hasListeners: uncaught exception: java.lang.NullPointerException FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.insert: testEndTag4 (number 2) FAIL: gnu.testlet.javax.swing.text.DefaultStyledDocument.ElementBuffer.insert: uncaught exception at testEndTag4 number 3: java.lang.NullPointerException Totals: PASS: 28688 XPASS: 0 FAIL: 378 XFAIL: 0 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
Updated StatCVS report...
I updated the StatCVS report for GNU Classpath CVS: http://www.object-refinery.com/classpath/statcvs/ All the usual disclaimers about meaningless statistics apply! Regards, Dave
[Bug classpath/26046] checking for files doesn't work while cross-compiling
--- Comment #1 from mark at gcc dot gnu dot org 2006-01-31 12:42 --- Dalibor could you take a look at this? You have been doing some cross-compiling for kaffe recently. I don't know if pkg-config actually supports cross-compiling to be honest. -- mark at gcc dot gnu dot org changed: What|Removed |Added CC||robilad at kaffe dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26046 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
Re: New native layer
Dalibor Topic wrote: On Mon, 2006-01-30 at 12:20 -0500, Brian Jones wrote: It would be nice, I believe, to re-use libraries that have handled most of the porting and wrapping for you such as APR (http://apr.apache.org/), or NPR (http://www.mozilla.org/projects/nspr/) to platforms GNU Classpath might care to support. You might also find glib useful, http://developer.gnome.org/arch/gtk/glib.html. I believe that's the reason why neither APR nor NSPR (nor other similar projects) have seen wide spread acceptance, even though they have been around for many years now: they don't really pay off enough for people to rewrite their existing code bases to them. Okay, but I brought it up since the work Guilhem Lavaux is doing sounds an awful lot like a rewrite. Although technically I think you can just run the macro processor by hand to get the current real source code for say Linux and autoconfiscate it from there. Or you could go back a couple of years and look in native/ for the original autoconf/posix version of the libraries and move forward from there. See also what the OpenBSD developers did as one of the first things, once they 'forked' Apache web server 1.3.x after the Apache license change: rip out APR and replace its use by plain old posix functions, since those were more maintainable for them. Yea, I think the point for me would be to keep Classpath's java hackers out of the business of writing native code, and especially out of the business of porting native code for such common idioms as generic file operations, network operations, etc. Anyway, that was my $0.02, Brian
Re: New native layer
Brian Jones wrote: Dalibor Topic wrote: On Mon, 2006-01-30 at 12:20 -0500, Brian Jones wrote: It would be nice, I believe, to re-use libraries that have handled most of the porting and wrapping for you such as APR (http://apr.apache.org/), or NPR (http://www.mozilla.org/projects/nspr/) to platforms GNU Classpath might care to support. You might also find glib useful, http://developer.gnome.org/arch/gtk/glib.html. I believe that's the reason why neither APR nor NSPR (nor other similar projects) have seen wide spread acceptance, even though they have been around for many years now: they don't really pay off enough for people to rewrite their existing code bases to them. Okay, but I brought it up since the work Guilhem Lavaux is doing sounds an awful lot like a rewrite. Although technically I think you can just run the macro processor by hand to get the current real source code for say Linux and autoconfiscate it from there. Or you could go back a couple of years and look in native/ for the original autoconf/posix version of the libraries and move forward from there. See also what the OpenBSD developers did as one of the first things, once they 'forked' Apache web server 1.3.x after the Apache license change: rip out APR and replace its use by plain old posix functions, since those were more maintainable for them. Yea, I think the point for me would be to keep Classpath's java hackers out of the business of writing native code, and especially out of the business of porting native code for such common idioms as generic file operations, network operations, etc. Hi Brian, The code is not really a rewrite. Actually I am just moving out TARGET layer and replacing it with native function call with an API not so different than posix. My idea is that these function calls should be purely POSIX (so that classpath's hackers does not have deal with subtleties). Anyway, as I have already said it, seeing the amount of code to do pure administrations in the JNI world, it is easier to read autoconfiscated code which is completely outside the JNI code (again look at javanet). The advantage of this method is that some VMs may want to reroute these syscalls and it is easy to do so using this semi-abstract interface without rewriting anything. Regards, Guilhem.
Re: New native layer
Hi Brian, hi list, Yea, I think the point for me would be to keep Classpath's java hackers out of the business of writing native code, and especially out of the business of porting native code for such common idioms as generic file operations, network operations, etc. BTW, Torsten, the man who first wrote the target native layer, mostly works on native code and porting of this to platforms you would not dream of. He is hardly a 'Classpath java hacker'. If the world was so nice that posix and autoconf is the solution to everything, then such work would hardly be necessary. But this seems to be a little behind the horizon of the brave GNU world. Man, all this narrow-mindedness sets me up, I think I better go back to java hacking ;-) Roman signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
[Bug classpath/24876] Regex failure
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |0.21 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24876 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug classpath/26002] Another regex problem: \p{Nd}
--- Comment #5 from kaz at maczuka dot gcd dot org 2006-01-31 16:26 --- Fixed. -- kaz at maczuka dot gcd dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26002 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug swing/26027] The new element, added to JList, does not appear (regression since 0.20)
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |0.21 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26027 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug classpath/22873] java.util.regex.Matcher.group(int) differs from Sun's API
--- Comment #5 from cvs-commit at developer dot classpath dot org 2006-01-31 16:27 --- Subject: Bug 22873 CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Ito Kazumitsu [EMAIL PROTECTED] 06/01/31 14:57:43 Modified files: . : ChangeLog gnu/regexp : REMatch.java Log message: 2006-01-31 Ito Kazumitsu [EMAIL PROTECTED] Fixes bug #22873 * gnu/regexp/REMatch(toString(int)): Throw IndexOutOfBoundsException for an invalid index and return null for a skipped group. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6231tr2=1.6232r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/REMatch.java.diff?tr1=1.4tr2=1.5r1=textr2=text -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22873 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
[Bug classpath/26002] Another regex problem: \p{Nd}
--- Comment #4 from cvs-commit at developer dot classpath dot org 2006-01-31 15:51 --- Subject: Bug 26002 CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Ito Kazumitsu [EMAIL PROTECTED] 06/01/31 14:39:08 Modified files: . : ChangeLog gnu/regexp : RE.java RESyntax.java Added files: gnu/regexp : RETokenNamedProperty.java Log message: 2006-01-30 Ito Kazumitsu [EMAIL PROTECTED] Fixes bug #26002 * gnu/regexp/gnu/regexp/RE.java(initialize): Parse /\p{prop}/. (NamedProperty): New inner class. (getNamedProperty): New method. (getRETokenNamedProperty): New Method. * gnu/regexp/RESyntax.java(RE_NAMED_PROPERTY): New syntax falg. * gnu/regexp/RETokenNamedProperty.java: New file. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6230tr2=1.6231r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RE.java.diff?tr1=1.13tr2=1.14r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RESyntax.java.diff?tr1=1.5tr2=1.6r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RETokenNamedProperty.java?rev=1.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26002 ___ Bug-classpath mailing list Bug-classpath@gnu.org http://lists.gnu.org/mailman/listinfo/bug-classpath
Re: New native layer
Casey Marshall wrote: We have the responsibility, as contributors to a GNU project, to maintain the project for the GNU system. GNU is sorta-POSIX, as are a lot of other interesting platforms, and targeting them earns us, as free software contributors -- not necessarily other groups or companies that want to use Classpath -- a lot. I see these native portability layers as being counter to that goal, and they especially don't make sense given that there's no other free implementations for platforms other than what we are targeting. An alternative take with similar conclusion: There is a standard native portability layer. It is called Posix. There are multiple implementations of this layer available for MS-Windows. Other platforms we are likely to support (such as OS-X) already support Posix. I.e. there is no need for an extra portability layer. That is not to say we cannot add hooks and conditional compilation in modest doses to support Windows and other non-Posix platforms. But any extra indirection that hurts performance on Posix (even trivially), or anything that makes the code harder to maintain and understand is generally inappropriate. -- --Per Bothner [EMAIL PROTECTED] http://per.bothner.com/
Mauve / StatCVS (running free!)
Here is the latest StatCVS report showing excellent growth for Mauve: http://www.object-refinery.com/classpath/mauve/statcvs/ This report has been generated using JamVM, GNU Classpath, StatCVS, Cairo, the cairo-java bindings and a little bit of custom code - for details see: http://www.object-refinery.com/classpath/statcvs.html I'll be talking about this in an end-user talk at FOSDEM, and look forward to seeing some of you there. Regards, Dave
[commit-cp] classpath ./ChangeLog javax/swing/plaf/basic/Ba...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]06/01/31 09:33:05 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTextUI.java Log message: 2006-01-31 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTextUI.java (createKeymap): Don't store KeyBindings[] as focusInputMap in UIManager. Added FIXME regarding the implementation of this method. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6228tr2=1.6229r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java.diff?tr1=1.62tr2=1.63r1=textr2=text
[commit-cp] classpath javax/swing/text/PlainView.java javax...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]06/01/31 10:03:32 Modified files: javax/swing/text: PlainView.java Utilities.java . : ChangeLog Log message: 2006-01-31 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/text/PlainView.java (paint): Call drawLine with baseline coordinates. (drawLine): Documented and indented this method. (drawUnselecetedText): Documented and indented this method. * javax/swing/plaf/text/Utilites.java (drawTabbedText): The coordinates denote the baseline of the text not the upper left corner. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/PlainView.java.diff?tr1=1.34tr2=1.35r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/Utilities.java.diff?tr1=1.19tr2=1.20r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6229tr2=1.6230r1=textr2=text
[commit-cp] classpath ./ChangeLog gnu/xml/stream/SAXParser....
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Chris Burdess [EMAIL PROTECTED] 06/01/31 15:28:48 Modified files: . : ChangeLog gnu/xml/stream : SAXParser.java UnicodeReader.java XIncludeFilter.java XMLParser.java java/lang : ClassNotFoundException.java java/util/logging: SimpleFormatter.java Log message: 2006-01-31 Chris Burdess [EMAIL PROTECTED] * gnu/xml/stream/SAXParser.java, gnu/xml/stream/UnicodeReader.java, gnu/xml/stream/XIncludeFilter.java, gnu/xml/stream/XMLParser.java: Fix case where resolved InputSource only resolved the system ID not the stream. Make some utility methods public and static for use by other private XML APIs. * java/lang/ClassNotFoundException.java: Ensure that initCause can be called without throwing IllegalStateException. * java/util/logging/SimpleFormatter.java: Write thrown exception if provided. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6232tr2=1.6233r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/SAXParser.java.diff?tr1=1.16tr2=1.17r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/UnicodeReader.java.diff?tr1=1.2tr2=1.3r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/XIncludeFilter.java.diff?tr1=1.5tr2=1.6r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/xml/stream/XMLParser.java.diff?tr1=1.22tr2=1.23r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/java/lang/ClassNotFoundException.java.diff?tr1=1.9tr2=1.10r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/java/util/logging/SimpleFormatter.java.diff?tr1=1.7tr2=1.8r1=textr2=text
[commit-cp] classpath ./ChangeLog gnu/regexp/REMatch.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Ito Kazumitsu [EMAIL PROTECTED] 06/01/31 14:57:43 Modified files: . : ChangeLog gnu/regexp : REMatch.java Log message: 2006-01-31 Ito Kazumitsu [EMAIL PROTECTED] Fixes bug #22873 * gnu/regexp/REMatch(toString(int)): Throw IndexOutOfBoundsException for an invalid index and return null for a skipped group. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6231tr2=1.6232r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/REMatch.java.diff?tr1=1.4tr2=1.5r1=textr2=text
[commit-cp] classpath/external/relaxngDatatype
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Chris Burdess [EMAIL PROTECTED] 06/01/31 19:04:10 classpath/external/relaxngDatatype Update of /cvsroot/classpath/classpath/external/relaxngDatatype In directory savannah:/tmp/cvs-serv8363/external/relaxngDatatype Log Message: Directory /cvsroot/classpath/classpath/external/relaxngDatatype added to the repository
[commit-cp] classpath/external/relaxngDatatype/org
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Chris Burdess [EMAIL PROTECTED] 06/01/31 19:04:46 classpath/external/relaxngDatatype/org Update of /cvsroot/classpath/classpath/external/relaxngDatatype/org In directory savannah:/tmp/cvs-serv8403/external/relaxngDatatype/org Log Message: Directory /cvsroot/classpath/classpath/external/relaxngDatatype/org added to the repository
[commit-cp] classpath/external/relaxngDatatype/org/relaxng
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Chris Burdess [EMAIL PROTECTED] 06/01/31 19:04:56 classpath/external/relaxngDatatype/org/relaxng Update of /cvsroot/classpath/classpath/external/relaxngDatatype/org/relaxng In directory savannah:/tmp/cvs-serv8420/external/relaxngDatatype/org/relaxng Log Message: Directory /cvsroot/classpath/classpath/external/relaxngDatatype/org/relaxng added to the repository
[commit-cp] classpath/external/relaxngDatatype/org/relaxng/datatype
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Chris Burdess [EMAIL PROTECTED] 06/01/31 19:05:06 classpath/external/relaxngDatatype/org/relaxng/datatype Update of /cvsroot/classpath/classpath/external/relaxngDatatype/org/relaxng/datatype In directory savannah:/tmp/cvs-serv8476/external/relaxngDatatype/org/relaxng/datatype Log Message: Directory /cvsroot/classpath/classpath/external/relaxngDatatype/org/relaxng/datatype added to the repository
[commit-cp] classpath/external/relaxngDatatype/org/relaxng/datatype/helpers
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Chris Burdess [EMAIL PROTECTED] 06/01/31 19:05:17 classpath/external/relaxngDatatype/org/relaxng/datatype/helpers Update of /cvsroot/classpath/classpath/external/relaxngDatatype/org/relaxng/datatype/helpers In directory savannah:/tmp/cvs-serv8495/external/relaxngDatatype/org/relaxng/datatype/helpers Log Message: Directory /cvsroot/classpath/classpath/external/relaxngDatatype/org/relaxng/datatype/helpers added to the repository
[commit-cp] classpath javax/swing/plaf/basic/BasicRootPaneU...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Roman Kennke [EMAIL PROTECTED]06/01/31 20:25:43 Modified files: javax/swing/plaf/basic: BasicRootPaneUI.java . : ChangeLog Log message: 2006-01-31 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicRootPaneUI.java (installDefaults): Don't install a background color here. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicRootPaneUI.java.diff?tr1=1.10tr2=1.11r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6234tr2=1.6235r1=textr2=text
[commit-cp] classpath ./ChangeLog gnu/regexp/RE.java gnu/re...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Ito Kazumitsu [EMAIL PROTECTED] 06/01/31 14:39:08 Modified files: . : ChangeLog gnu/regexp : RE.java RESyntax.java Added files: gnu/regexp : RETokenNamedProperty.java Log message: 2006-01-30 Ito Kazumitsu [EMAIL PROTECTED] Fixes bug #26002 * gnu/regexp/gnu/regexp/RE.java(initialize): Parse /\p{prop}/. (NamedProperty): New inner class. (getNamedProperty): New method. (getRETokenNamedProperty): New Method. * gnu/regexp/RESyntax.java(RE_NAMED_PROPERTY): New syntax falg. * gnu/regexp/RETokenNamedProperty.java: New file. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6230tr2=1.6231r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RE.java.diff?tr1=1.13tr2=1.14r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RESyntax.java.diff?tr1=1.5tr2=1.6r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RETokenNamedProperty.java?rev=1.1
[commit-cp] classpath ./ChangeLog java/net/URI.java
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Mark Wielaard [EMAIL PROTECTED] 06/01/31 21:59:15 Modified files: . : ChangeLog java/net : URI.java Log message: * java/net/URI.java (getURIGroup): Check for null to see whether group actually exists. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6236tr2=1.6237r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/java/net/URI.java.diff?tr1=1.16tr2=1.17r1=textr2=text
[commit-cp] classpath ./ChangeLog javax/swing/text/DefaultS...
CVSROOT:/cvsroot/classpath Module name:classpath Branch: Changes by: Lillian Angel [EMAIL PROTECTED] 06/01/31 21:13:50 Modified files: . : ChangeLog javax/swing/text: DefaultStyledDocument.java Log message: 2006-01-31 Lillian Angel [EMAIL PROTECTED] * javax/swing/text/DefaultStyledDocument.java (changeUpdate): Fixed calls to split to incorporate new parameter. (insertParagraph): Likewise. Uses 0 as editIndex because inserting into a new paragraph. (insertContentTag): Fixed check to use recreateLeaves. Added a FIXME comment. (split): Added a new parameter for edits. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6235tr2=1.6236r1=textr2=text http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/DefaultStyledDocument.java.diff?tr1=1.52tr2=1.53r1=textr2=text