5 misc fixes
Robert Zawiasa
rhz at bibl.u-szeged.hu
Tue Apr 20 07:44:22 PDT 1999
hi all,
fix#1 in kaffe/libraries/clib/awt/X/fnt.c
some standard *slanted* X11 fonts (esp. Adobe Courier and Helvetica)
have -o- (outline?) instead of -i- (italic) in the XLFD name at the
"slant" position. let's use them if an "-i- font" is not available!
fix#2 in kaffe/libraries/javalib/java/applet/Applet.java
Applet as a Panel should resize() itself either for a working setSize()
fix#3 in kaffe/libraries/javalib/java/beans/PropertyChangeEvent.java and
kaffe/libraries/javalib/java/beans/PropertyVetoException.java
missing "this." prefix
fix#4 in kaffe/libraries/javalib/java/lang/reflect/Member.java
INTERESTING: final public static int fields PUBLIC and DECLARED
have different constant values as their JDK counterparts, so classes
compiled with kaffe works incorrectly with JDK and vice-versa:
*broken binary compatibility*, but JDK docs hide the actual value
of such final static ints, though they are integral part of the
classes' public runtime interface.
fix#5 in kaffe/libraries/javalib/kaffe/net/www/protocol/http/HttpURLConnection.java
mime-type names ought to be case-insensitive (I'm not sure whether
theoretically this is the case, but in practice certainly)
up for adventures!
Robert
-------------- next part --------------
diff -U 4 -rNbB --exclude=*.class --exclude=*.jar --exclude=Makefile.in --exclude=configure kaffe-apr15/libraries/clib/awt/X/fnt.c kaffe/libraries/clib/awt/X/fnt.c
--- kaffe-apr15/libraries/clib/awt/X/fnt.c Wed Feb 10 22:28:08 1999
+++ kaffe/libraries/clib/awt/X/fnt.c Sat Apr 17 12:20:56 1999
@@ -33,8 +33,14 @@
sprintf( buf, spec, weight, slant, size);
fs = XLoadQueryFont( X->dsp, buf);
+ if ( ! fs && ( style & 0x2 ) ){
+ slant = "o";
+ sprintf( buf, spec, weight, slant, size);
+ fs = XLoadQueryFont( X->dsp, buf);
+ }
+
if ( ! fs ){
DBG(awt,("cannot load font: %s (backup to %s)\n", buf, backupFont));
if ( !(fs = XLoadQueryFont( X->dsp, backupFont)) ) {
fprintf( stderr, "font panic, no default font!\n");
diff -U 4 -rNbB --exclude=*.class --exclude=*.jar --exclude=Makefile.in --exclude=configure kaffe-apr15/libraries/javalib/java/applet/Applet.java kaffe/libraries/javalib/java/applet/Applet.java
--- kaffe-apr15/libraries/javalib/java/applet/Applet.java Mon Mar 29 13:19:53 1999
+++ kaffe/libraries/javalib/java/applet/Applet.java Sat Apr 17 18:06:21 1999
@@ -107,13 +107,15 @@
catch ( MalformedURLException m) {}
}
public void resize( Dimension d) {
+ super.resize( d);
if ( stub != null)
stub.appletResize( d.width, d.height);
}
public void resize( int width, int height) {
+ super.resize( width, height);
if ( stub != null)
stub.appletResize( width, height);
}
diff -U 4 -rNbB --exclude=*.class --exclude=*.jar --exclude=Makefile.in --exclude=configure kaffe-apr15/libraries/javalib/java/beans/PropertyChangeEvent.java kaffe/libraries/javalib/java/beans/PropertyChangeEvent.java
--- kaffe-apr15/libraries/javalib/java/beans/PropertyChangeEvent.java Mon Apr 12 13:09:21 1999
+++ kaffe/libraries/javalib/java/beans/PropertyChangeEvent.java Sat Apr 17 12:20:56 1999
@@ -45,9 +45,9 @@
}
public void setPropagationId(Object propagationId)
{
- propagationId = propagationId;
+ this.propagationId = propagationId;
}
public Object getPropagationId()
{
diff -U 4 -rNbB --exclude=*.class --exclude=*.jar --exclude=Makefile.in --exclude=configure kaffe-apr15/libraries/javalib/java/beans/PropertyVetoException.java kaffe/libraries/javalib/java/beans/PropertyVetoException.java
--- kaffe-apr15/libraries/javalib/java/beans/PropertyVetoException.java Mon Mar 29 13:20:05 1999
+++ kaffe/libraries/javalib/java/beans/PropertyVetoException.java Sat Apr 17 12:20:56 1999
@@ -16,9 +16,9 @@
public PropertyVetoException(String mess, PropertyChangeEvent evt)
{
super(mess);
- evt = evt;
+ this.evt = evt;
}
public PropertyChangeEvent getPropertyChangeEvent()
{
diff -U 4 -rNbB --exclude=*.class --exclude=*.jar --exclude=Makefile.in --exclude=configure kaffe-apr15/libraries/javalib/java/lang/reflect/Member.java kaffe/libraries/javalib/java/lang/reflect/Member.java
--- kaffe-apr15/libraries/javalib/java/lang/reflect/Member.java Thu Dec 10 00:20:20 1998
+++ kaffe/libraries/javalib/java/lang/reflect/Member.java Sat Apr 17 14:42:29 1999
@@ -14,10 +14,10 @@
import java.lang.String;
public interface Member {
-final public static int PUBLIC = 1;
-final public static int DECLARED = 2;
+final public static int PUBLIC = 0;
+final public static int DECLARED = 1;
abstract public Class getDeclaringClass();
abstract public int getModifiers();
diff -U 4 -rNbB --exclude=*.class --exclude=*.jar --exclude=Makefile.in --exclude=configure kaffe-apr15/libraries/javalib/kaffe/net/www/protocol/http/HttpURLConnection.java kaffe/libraries/javalib/kaffe/net/www/protocol/http/HttpURLConnection.java
--- kaffe-apr15/libraries/javalib/kaffe/net/www/protocol/http/HttpURLConnection.java Mon Mar 29 13:20:16 1999
+++ kaffe/libraries/javalib/kaffe/net/www/protocol/http/HttpURLConnection.java Sat Apr 17 12:20:56 1999
@@ -109,9 +109,9 @@
}
public String getHeaderField(String name) {
for (int i = 0; i < headers.length; i++) {
- if (headers[i].equals( name)) {
+ if (headers[i].equalsIgnoreCase( name)) {
return (getHeaderField(i));
}
}
return (null);
@@ -132,9 +132,9 @@
}
protected void setHeaderField( String key, String value) {
for ( int i=0; i<headers.length; i++ ) {
- if ( headers[i].equals( key) ) {
+ if ( headers[i].equalsIgnoreCase( key) ) {
headersValue[i] = value;
break;
}
}
More information about the kaffe
mailing list