2003-12-08 Olga Rodimina <rodimina@redhat.com>
authorOlga Rodimina <rodimina@redhat.com>
Mon, 8 Dec 2003 22:59:52 +0000 (22:59 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Mon, 8 Dec 2003 22:59:52 +0000 (22:59 +0000)
* java/awt/Polygon.java
(translate): Fixed error that caused polygon
to move right/left when up/down translation was required.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c:
(getSelectionStart): Initialized start position to 0.
(getSelectionEnd): Initialized end position to 0.
(getCaretPosition): Initialized caret position to 0.
(getText): Initialized selected text to NULL

From-SVN: r74445

libjava/ChangeLog
libjava/java/awt/Polygon.java
libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c

index 0aa077d294abf94da5f1ccf842f914d3202930b8..0dae20f6731664dcd588f8cbe2bc5b05d554c929 100644 (file)
@@ -1,3 +1,14 @@
+2003-12-08  Olga Rodimina <rodimina@redhat.com>
+
+       * java/awt/Polygon.java
+       (translate): Fixed error that caused polygon 
+       to move right/left when up/down translation was required.
+       * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c:
+       (getSelectionStart): Initialized start position to 0. 
+       (getSelectionEnd): Initialized end position to 0.
+       (getCaretPosition): Initialized caret position to 0.
+       (getText): Initialized selected text to NULL 
+
 2003-12-08  Michael Koch  <konqueror@gmx.de>
 
        Fix for PR libgcj/13176.
index 1f51ac811d615abb577c44c0eb36d05006bc0467..113dad992d2234f8ed68fac67967ba7d6f5db5cb 100644 (file)
@@ -185,7 +185,7 @@ public class Polygon implements Shape, Serializable
     while (--i >= 0)
       {
         xpoints[i] += dx;
-        xpoints[i] += dy;
+        ypoints[i] += dy;
       }
     if (bounds != null)
       {
index 7e6d02f178add0a5a6dd2f2075cfbe59fe4d2ac5..b4a00e1288d5f18bb859b192b3b252d9a69825be 100644 (file)
@@ -101,7 +101,7 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getCaretPosition
   (JNIEnv *env, jobject obj)
 {
   void *ptr;
-  int pos;
+  int pos = 0;
   GtkEditable *editable;    // type of GtkEntry    (TextField)
   GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
   GtkTextBuffer *buf;
@@ -187,7 +187,7 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionStart
   (JNIEnv *env, jobject obj)
 {
   void *ptr;
-  int pos;
+  int pos = 0;
   GtkEditable *editable;    // type of GtkEntry    (TextField)
   GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
   GtkTextBuffer *buf;
@@ -244,7 +244,7 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionEnd
   (JNIEnv *env, jobject obj)
 {
   void *ptr;
-  int pos;
+  int pos = 0;
   GtkEditable *editable;    // type of GtkEntry    (TextField)
   GtkWidget *text = NULL;   // type of GtkTextView (TextArea)
   GtkTextBuffer *buf;
@@ -384,7 +384,7 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getText
   (JNIEnv *env, jobject obj)
 {
   void *ptr;
-  char *contents;
+  char *contents = NULL;
   jstring jcontents;
   GtkEditable *editable;    // type of GtkEntry    (TextField)
   GtkWidget *text = NULL;   // type of GtkTextView (TextArea)