You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by qi...@apache.org on 2008/08/22 09:15:27 UTC

svn commit: r687988 [7/11] - in /harmony/enhanced/classlib/branches/java6: ./ depends/build/ depends/build/platform/ depends/jars/ depends/jars/icu4jni_3.4/ depends/manifests/bcel-5.2/ depends/manifests/bcel-5.2/META-INF/ make/ modules/accessibility/ m...

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM273.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM273.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM273.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM273.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM273.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM273_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM277.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM277.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM277.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM277.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM277.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM277_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM278.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM278.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM278.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM278.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM278.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM278_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM280.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM280.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM280.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM280.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM280.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM280_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM284.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM284.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM284.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM284.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM284.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM284_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM285.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM285.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM285.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM285.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM285.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM285_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM297.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM297.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM297.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM297.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM297.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM297_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM420.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM420.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM420.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM420.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM420.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM420_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM424.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM424.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM424.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM424.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM424.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM424_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM437.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM437.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM437.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM437.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM437.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM437_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM500.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM500.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM500.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM500.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM500.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM500_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM775.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM775.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM775.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM775.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM775.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM775_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM850.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM850.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM850.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM850.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM850.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM850_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM852.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM852.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM852.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM852.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM852.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM852_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM855.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM855.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM855.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM855.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM855.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM855_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM857.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM857.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM857.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM857.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM857.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM857_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM860.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM860.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM860.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM860.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM860.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM860_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM861.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM861.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM861.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM861.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM861.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM861_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM862.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM862.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM862.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM862.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM862.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM862_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM863.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM863.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM863.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM863.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM863.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM863_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM864.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM864.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM864.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM864.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM864.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM864_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM865.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM865.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM865.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM865.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM865.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM865_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM868.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM868.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM868.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM868.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM868.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM868_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM869.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM869.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM869.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM869.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM869.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM869_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM870.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM870.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM870.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM870.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM870.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM870_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM871.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM871.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM871.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM871.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM871.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM871_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM918.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM918.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM918.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM918.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM918.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM918_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM_Thai.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM_Thai.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM_Thai.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM_Thai.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "IBM_Thai.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_IBM_1Thai_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_3.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_3.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_3.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_3.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "ISO_8859_3.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_ISO_18859_13_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_6.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_6.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_6.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_6.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "ISO_8859_6.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_ISO_18859_16_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_8.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_8.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_8.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/ISO_8859_8.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "ISO_8859_8.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_ISO_18859_18_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/JIS_X0201.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/JIS_X0201.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/JIS_X0201.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/JIS_X0201.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "JIS_X0201.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_JIS_1X0201_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/TIS_620.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/TIS_620.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/TIS_620.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/TIS_620.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "TIS_620.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_TIS_1620_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_1255.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_1255.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_1255.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_1255.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "windows_1255.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_windows_11255_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_1256.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_1256.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_1256.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_1256.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "windows_1256.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_windows_11256_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_31j.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_31j.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_31j.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/windows_31j.c Fri Aug 22 00:15:00 2008
@@ -16,7 +16,7 @@
  */
 
 #include "windows_31j.h"
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
         static const int decodeIndex[] = {
          0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1006.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1006.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1006.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1006.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM1006.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1006_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1025.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1025.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1025.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1025.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM1025.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1025_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1097.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1097.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1097.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1097.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM1097.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1097_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1098.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1098.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1098.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1098.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM1098.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1098_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1112.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1112.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1112.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1112.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM1112.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1112_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1122.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1122.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1122.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1122.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM1122.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1122_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1123.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1123.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1123.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1123.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM1123.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1123_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1124.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1124.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1124.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM1124.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM1124.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM1124_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM737.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM737.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM737.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM737.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM737.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM737_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM856.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM856.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM856.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM856.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM856.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM856_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM874.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM874.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM874.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM874.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM874.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM874_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM875.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM875.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM875.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM875.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM875.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM875_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM922.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM922.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM922.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_IBM922.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_IBM922.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1IBM922_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MS950_HKSCS.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MS950_HKSCS.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MS950_HKSCS.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MS950_HKSCS.c Fri Aug 22 00:15:00 2008
@@ -16,7 +16,7 @@
  */
 
 #include "x_MS950_HKSCS.h"
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
         static const int decodeIndex[] = {
          0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacCyrillic.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacCyrillic.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacCyrillic.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacCyrillic.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_MacCyrillic.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1MacCyrillic_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacGreek.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacGreek.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacGreek.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacGreek.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_MacGreek.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1MacGreek_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacTurkish.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacTurkish.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacTurkish.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_MacTurkish.c Fri Aug 22 00:15:00 2008
@@ -17,7 +17,7 @@
 
 #include "x_MacTurkish.h"
 
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
 JNIEXPORT void JNICALL Java_org_apache_harmony_niochar_charset_additional_x_1MacTurkish_00024Encoder_nEncode
   (JNIEnv *env, jobject obj, jlong outAddr, jint absolutePos, jcharArray array, jint arrayOffset, jintArray result){

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_windows_949.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_windows_949.c?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_windows_949.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/x_windows_949.c Fri Aug 22 00:15:00 2008
@@ -16,7 +16,7 @@
  */
 
 #include "x_windows_949.h"
-#define jlong2addr(a, x) ((a *)((int)(x)))
+#include "hycomp.h"
 
         static const int decodeIndex[] = {
          0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/unix/makefile?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/unix/makefile Fri Aug 22 00:15:00 2008
@@ -19,6 +19,10 @@
 
 include $(HY_HDK)/build/make/defines.mk
 
+# TODO: Fix the warnings see HARMONY-4959 and
+# http://www.mail-archive.com/dev@harmony.apache.org/msg10469.html 
+WARNFLAGS :=
+
 BUILDFILES = \
   ../shared/CP_1250.o \
   ../shared/CP_1251.o \
@@ -113,4 +117,4 @@
 
 DLLNAME = ../libhycharset.so
 
-include $(HY_HDK)/build/make/rules.mk
\ No newline at end of file
+include $(HY_HDK)/build/make/rules.mk

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java Fri Aug 22 00:15:00 2008
@@ -16,6 +16,7 @@
 
 package org.apache.harmony.nio_char.tests.java.nio.charset;
 
+import java.io.IOException;
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
@@ -27,6 +28,7 @@
 import java.nio.charset.CoderResult;
 import java.nio.charset.CodingErrorAction;
 import java.nio.charset.MalformedInputException;
+import java.util.Arrays;
 
 import junit.framework.TestCase;
 
@@ -228,4 +230,51 @@
 			return CoderResult.UNDERFLOW;
 		}
 	}
+
+
+    public void testInvalidDecoding() throws IOException {
+
+        byte[][] invalidSequences = new byte[][] {
+            // overlong NULL
+            { (byte) 0xC0, (byte) 0x80 },
+            // overlong ascii 'A'
+            { (byte) 0xC0, (byte) 0xC1 },
+            // overlong "/../"
+            { (byte) 0x2F, (byte) 0xC0, (byte) 0xAE, (byte) 0x2E, (byte) 0x2F },
+            // Invalid encoding 2r11111000 (sequence too long)
+            { (byte) 0xF8 },
+            // Invalid encoding 2r10000000 (sequence too short)
+            { (byte) 0x80 }
+        };
+
+        CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder();
+        decoder.onMalformedInput(CodingErrorAction.REPORT);
+
+        /*
+         * When bytebuffer has a backing array...
+         */
+        for (byte[] bytes : invalidSequences) {
+            try {
+                decoder.decode(ByteBuffer.wrap(bytes));
+                fail("No exception thrown on " + Arrays.toString(bytes));
+            } catch (MalformedInputException e) {
+                // expected
+            }
+        }
+
+        /*
+         * When bytebuffer has _not_ got a backing array...
+         */
+        for (byte[] bytes : invalidSequences) {
+            try {
+                ByteBuffer bb = ByteBuffer.allocateDirect(8);
+                bb.put(bytes).flip();
+                decoder.decode(bb);
+                fail("No exception thrown on " + Arrays.toString(bytes));
+            } catch (MalformedInputException e) {
+                // expected
+            }
+        }
+    }
+
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/META-INF/MANIFEST.MF?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/META-INF/MANIFEST.MF (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/META-INF/MANIFEST.MF Fri Aug 22 00:15:00 2008
@@ -13,10 +13,16 @@
 Eclipse-JREBundle: true
 Import-Package: java.io;resolution:=optional,
  java.lang;resolution:=optional,
+ java.nio,
  java.util;resolution:=optional,
- java.util.jar;resolution:=optional
+ java.util.jar;resolution:=optional,
+ org.apache.bcel,
+ org.apache.bcel.classfile
 Export-Package: org.apache.harmony.pack200,
- org.apache.harmony.pack200.bytecode
+ org.apache.harmony.pack200.bytecode,
+ org.apache.harmony.unpack200,
+ org.apache.harmony.unpack200.bytecode,
+ org.apache.harmony.unpack200.bytecode.forms
 Bundle-RequiredExecutionEnvironment: J2SE-1.4,
  J2SE-1.5
 

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/build.xml?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/build.xml Fri Aug 22 00:15:00 2008
@@ -193,6 +193,10 @@
                dir="${basedir}"
                jvm="${test.jre.home}/bin/java">
 
+            <assertions enableSystemAssertions="true">
+                <enable />
+            </assertions>
+
             <jvmarg line="${hy.test.vmargs}" />
 
             <classpath>

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java Fri Aug 22 00:15:00 2008
@@ -22,7 +22,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.harmony.unpack200.Pack200Exception;
 
 /**
  * A BHSD codec is a means of encoding integer values as a sequence of bytes or
@@ -36,7 +35,7 @@
  * the integers [1..10] would be represented as a sequence of 10x1s. This allows
  * the absolute value of a coded integer to fall outside of the 'small number'
  * range, whilst still being encoded as a single byte.
- * 
+ *
  * A BHSD codec is configured with four parameters:
  * <dl>
  * <dt>B</dt>
@@ -69,7 +68,7 @@
  * instance of the Codec to be cloned for each use.)
  * <dt>
  * </dl>
- * 
+ *
  * Codecs are notated as (B,H,S,D) and either D or S,D may be omitted if zero.
  * Thus {@link #BYTE1} is denoted (1,256,0,0) or (1,256). The
  * {@link #toString()} method prints out the condensed form of the encoding.
@@ -78,7 +77,7 @@
  * {@link #UNSIGNED5}) are unsigned; otherwise, in most cases, they are signed.
  * The presence of the word Delta ({@link #DELTA5}, {@link #UDELTA5})
  * indicates a delta encoding is used.
- * 
+ *
  */
 public final class BHSDCodec extends Codec {
 
@@ -114,8 +113,13 @@
     private final long largest;
 
     /**
+     * radix^i powers
+     */
+    private long[] powers;
+
+    /**
      * Constructs an unsigned, non-delta Codec with the given B and H values.
-     * 
+     *
      * @param b
      *            the maximum number of bytes that a value can be encoded as
      *            [1..5]
@@ -128,7 +132,7 @@
 
     /**
      * Constructs a non-delta Codec with the given B, H and S values.
-     * 
+     *
      * @param b
      *            the maximum number of bytes that a value can be encoded as
      *            [1..5]
@@ -144,7 +148,7 @@
 
     /**
      * Constructs a Codec with the given B, H, S and D values.
-     * 
+     *
      * @param b
      *            the maximum number of bytes that a value can be encoded as
      *            [1..5]
@@ -183,12 +187,17 @@
         }
         smallest = calculateSmallest();
         largest = calculateLargest();
+
+        powers = new long[b];
+        for(int c = 0; c < b; c++) {
+            powers[c] = (long)Math.pow(h, c);
+        }
     }
 
     /**
      * Returns the cardinality of this codec; that is, the number of distinct
      * values that it can contain.
-     * 
+     *
      * @return the cardinality of this codec
      */
     public long cardinality() {
@@ -206,14 +215,16 @@
             Pack200Exception {
         int n = 0;
         long z = 0;
-        long x;
+        long x = 0;
+
         do {
             x = in.read();
-            if (x == -1)
-                throw new EOFException("End of stream reached whilst decoding");
-            z += x * Math.pow(h, n);
+            z += x * powers[n];
             n++;
-        } while (n < b & isHigh(x));
+        } while (x >= l && n < b);
+
+        if (x == -1)
+            throw new EOFException("End of stream reached whilst decoding");
 
         if (isSigned()) {
             int u = ((1 << s) - 1);
@@ -250,13 +261,9 @@
     // return u;
     // }
 
-    private boolean isHigh(long x) {
-        return x >= l;
-    }
-
     /**
      * True if this encoding can code the given value
-     * 
+     *
      * @param value
      *            the value to check
      * @return <code>true</code> if the encoding can encode this value
@@ -284,6 +291,11 @@
                     z += (z - z % 3) / 3;
                 }
             }
+        } else {
+            if (z < 0) {
+                // Need to use integer overflow here to represent negatives.
+                z += 4294967296L; // this value is equal to (1 << 32).
+            }
         }
         List byteList = new ArrayList();
         for (int n = 0; n < b; n++) {
@@ -309,9 +321,13 @@
         return bytes;
     }
 
+    public byte[] encode(long value) throws Pack200Exception {
+        return encode(value, 0);
+    }
+
     /**
      * Returns true if this codec is a delta codec
-     * 
+     *
      * @return true if this codec is a delta codec
      */
     public boolean isDelta() {
@@ -320,7 +336,7 @@
 
     /**
      * Returns true if this codec is a signed codec
-     * 
+     *
      * @return true if this codec is a signed codec
      */
     public boolean isSigned() {
@@ -329,7 +345,7 @@
 
     /**
      * Returns the largest value that this codec can represent.
-     * 
+     *
      * @return the largest value that this codec can represent.
      */
     public long largest() {
@@ -358,7 +374,7 @@
 
     /**
      * Returns the smallest value that this codec can represent.
-     * 
+     *
      * @return the smallest value that this codec can represent.
      */
     public long smallest() {

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java Fri Aug 22 00:15:00 2008
@@ -19,12 +19,11 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.harmony.unpack200.Pack200Exception;
 
 /**
  * A Codec allows a sequence of bytes to be decoded into integer values (or vice
  * versa).
- * 
+ *
  * There are a number of standard Codecs ({@link #UDELTA5}, {@link #UNSIGNED5},
  * {@link #BYTE1}, {@link #CHAR3}) that are used in the implementation of many
  * bands; but there are a variety of other ones, and indeed the specification
@@ -90,7 +89,7 @@
      * Decode a sequence of bytes from the given input stream, returning the
      * value as a long. Note that this method can only be applied for non-delta
      * encodings.
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @return the value as a long
@@ -104,12 +103,36 @@
             Pack200Exception;
 
     /**
+     * Encode a single value into a sequence of bytes.
+     *
+     * @param value
+     *            the value to encode
+     * @param last
+     *            the previous value encoded (for delta encodings)
+     * @return the encoded bytes
+     * @throws Pack200Exception
+     */
+    public abstract byte[] encode(long value, long last)
+            throws Pack200Exception;
+
+    /**
+     * Encode a single value into a sequence of bytes. Note that this method can
+     * only be used for non-delta encodings.
+     *
+     * @param value
+     *            the value to encode
+     * @return the encoded bytes
+     * @throws Pack200Exception
+     */
+    public abstract byte[] encode(long value) throws Pack200Exception;
+
+    /**
      * Decode a sequence of bytes from the given input stream, returning the
      * value as a long. If this encoding is a delta encoding (d=1) then the
      * previous value must be passed in as a parameter. If it is a non-delta
      * encoding, then it does not matter what value is passed in, so it makes
      * sense for the value to be passed in by default using code similar to:
-     * 
+     *
      * <pre>
      * long last = 0;
      * while (condition) {
@@ -117,7 +140,7 @@
      *     // do something with last
      * }
      * </pre>
-     * 
+     *
      * @param in
      *            the input stream to read from
      * @param last
@@ -137,10 +160,10 @@
     /**
      * Decodes a sequence of <code>n</code> values from <code>in</code>.
      * This should probably be used in most cases, since some codecs (such as
-     * 
+     *
      * @{link PopCodec}) only work when the number of values to be read is
      *        known.
-     * 
+     *
      * @param n
      *            the number of values to decode
      * @param in
@@ -167,10 +190,10 @@
     /**
      * Decodes a sequence of <code>n</code> values from <code>in</code>.
      * This should probably be used in most cases, since some codecs (such as
-     * 
+     *
      * @{link PopCodec}) only work when the number of values to be read is
      *        known.
-     * 
+     *
      * @param n
      *            the number of values to decode
      * @param in
@@ -196,7 +219,7 @@
 
     /**
      * Decodes a sequence of <code>n</code> values from <code>in</code>.
-     * 
+     *
      * @param n
      *            the number of values to decode
      * @param in
@@ -225,7 +248,7 @@
 
     /**
      * Decodes a sequence of <code>n</code> values from <code>in</code>.
-     * 
+     *
      * @param n
      *            the number of values to decode
      * @param in
@@ -251,4 +274,29 @@
         }
         return result;
     }
+
+    /**
+     * Encode a sequence of integers into a byte array
+     *
+     * @param ints
+     *            the values to encode
+     * @return byte[] encoded bytes
+     * @throws Pack200Exception
+     *             if there is a problem encoding any of the values
+     */
+    public byte[] encode(int[] ints) throws Pack200Exception {
+        int total = 0;
+        byte[][] bytes = new byte[ints.length][];
+        for (int i = 0; i < ints.length; i++) {
+            bytes[i] = encode(ints[i], i > 0 ? ints[i-1] : 0);
+            total += bytes[i].length;
+        }
+        byte[] encoded = new byte[total];
+        int index = 0;
+        for (int i = 0; i < bytes.length; i++) {
+            System.arraycopy(bytes[i], 0, encoded, index, bytes[i].length);
+            index += bytes[i].length;
+        }
+        return encoded;
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CodecEncoding.java Fri Aug 22 00:15:00 2008
@@ -20,7 +20,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.harmony.unpack200.Pack200Exception;
 
 /**
  * CodecEncoding is used to get the right Codec for a given meta-encoding
@@ -99,7 +98,7 @@
      * band_headers byte array. Since the values from this are consumed and not
      * repeated, the input stream should be reused for subsequent encodings.
      * This does not therefore close the input stream.
-     * 
+     *
      * @param value
      *            the canonical encoding value
      * @param in
@@ -108,7 +107,7 @@
      *            TODO
      * @return the corresponding codec, or <code>null</code> if the default
      *         should be used
-     * 
+     *
      * @throws IOException
      *             if there is a problem reading from the input stream (which in
      *             reality, is never, since the band_headers are likely stored

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/PopulationCodec.java Fri Aug 22 00:15:00 2008
@@ -19,7 +19,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.harmony.unpack200.Pack200Exception;
 
 /**
  * A PopulationCodec is a Codec that is well suited to encoding data that shows
@@ -138,4 +137,14 @@
     public Codec getUnvafouredCodec() {
         return unvafouredCodec;
     }
+
+    public byte[] encode(long value, long last) throws Pack200Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public byte[] encode(long value) throws Pack200Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/RunCodec.java Fri Aug 22 00:15:00 2008
@@ -20,7 +20,6 @@
 import java.io.InputStream;
 import java.util.Arrays;
 
-import org.apache.harmony.unpack200.Pack200Exception;
 
 /**
  * A run codec is a grouping of two nested codecs; K values are decoded from the
@@ -126,4 +125,14 @@
         return "RunCodec[k=" + k + ";aCodec=" + aCodec + "bCodec=" + bCodec
                 + "]";
     }
+
+    public byte[] encode(long value, long last) throws Pack200Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public byte[] encode(long value) throws Pack200Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/Archive.java Fri Aug 22 00:15:00 2008
@@ -17,6 +17,7 @@
 package org.apache.harmony.unpack200;
 
 import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
@@ -29,6 +30,8 @@
 import java.util.jar.JarOutputStream;
 import java.util.zip.GZIPInputStream;
 
+import org.apache.harmony.pack200.Pack200Exception;
+
 /**
  * Archive is the main entry point to unpack200. An archive is constructed with
  * either two file names, a pack file and an output file name or two input
@@ -57,7 +60,7 @@
 
     /**
      * Creates an Archive with the given input and output file names.
-     * 
+     *
      * @param inputFile
      * @param outputFile
      * @throws FileNotFoundException
@@ -69,14 +72,14 @@
         this.inputFileName = inputFile;
         this.outputFileName = outputFile;
         inputStream = new FileInputStream(inputFile);
-        outputStream = new JarOutputStream(new FileOutputStream(outputFile));
+        outputStream = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
     }
 
     /**
      * Creates an Archive with streams for the input and output files. Note: If
      * you use this method then calling {@link #setRemovePackFile(boolean)} will
      * have no effect.
-     * 
+     *
      * @param inputStream
      * @param outputStream
      * @throws IOException
@@ -89,7 +92,7 @@
 
     /**
      * Unpacks the Archive from the input file to the output file
-     * 
+     *
      * @throws Pack200Exception
      * @throws IOException
      */
@@ -146,6 +149,8 @@
                     segment
                             .setLogStream(logFile != null ? (OutputStream) logFile
                                     : (OutputStream) System.out);
+                    segment.setPreRead(false);
+
                     if (i == 1) {
                         segment.log(Segment.LOG_LEVEL_VERBOSE,
                                 "Unpacking from " + inputFileName + " to "
@@ -200,7 +205,7 @@
     /**
      * If removePackFile is set to true, the input file is deleted after
      * unpacking
-     * 
+     *
      * @param removePackFile
      */
     public void setRemovePackFile(boolean removePackFile) {

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttrDefinitionBands.java Fri Aug 22 00:15:00 2008
@@ -20,6 +20,7 @@
 import java.io.InputStream;
 
 import org.apache.harmony.pack200.Codec;
+import org.apache.harmony.pack200.Pack200Exception;
 
 /**
  * Attribute definition bands are the set of bands used to define extra
@@ -44,10 +45,10 @@
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.harmony.unpack200.BandSet#unpack(java.io.InputStream)
      */
-    public void unpack(InputStream in) throws IOException, Pack200Exception {
+    public void read(InputStream in) throws IOException, Pack200Exception {
         int attributeDefinitionCount = header.getAttributeDefinitionCount();
         attributeDefinitionHeader = decodeBandInt("attr_definition_headers",
                 in, Codec.BYTE1, attributeDefinitionCount);
@@ -77,6 +78,10 @@
         attributeDefinitionMap.checkMap();
     }
 
+    public void unpack() throws Pack200Exception, IOException {
+
+    }
+
     public AttributeLayoutMap getAttributeDefinitionMap() {
         return attributeDefinitionMap;
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayout.java Fri Aug 22 00:15:00 2008
@@ -17,6 +17,7 @@
 package org.apache.harmony.unpack200;
 
 import org.apache.harmony.pack200.Codec;
+import org.apache.harmony.pack200.Pack200Exception;
 import org.apache.harmony.unpack200.bytecode.ClassFileEntry;
 
 /**
@@ -109,7 +110,7 @@
     /**
      * Construct a default AttributeLayout (equivalent to
      * <code>new AttributeLayout(name, context, layout, index, true);</code>)
-     * 
+     *
      * @param name
      * @param context
      * @param layout
@@ -243,7 +244,7 @@
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.harmony.unpack200.IMatches#matches(long)
      */
     public boolean matches(long value) {

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayoutMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayoutMap.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayoutMap.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/AttributeLayoutMap.java Fri Aug 22 00:15:00 2008
@@ -23,6 +23,8 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.harmony.pack200.Pack200Exception;
+
 /**
  * Stores a mapping from attribute names to their corresponding layout types.
  * Note that names of attribute layouts and their formats are <emph>not</emph>
@@ -243,9 +245,9 @@
     /**
      * The map should not contain the same layout and name combination more than
      * once for each context.
-     * 
+     *
      * @throws Pack200Exception
-     * 
+     *
      */
     public void checkMap() throws Pack200Exception {
         for (int i = 0; i < layouts.length; i++) {

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java?rev=687988&r1=687987&r2=687988&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/unpack200/BandSet.java Fri Aug 22 00:15:00 2008
@@ -24,6 +24,7 @@
 import org.apache.harmony.pack200.BHSDCodec;
 import org.apache.harmony.pack200.Codec;
 import org.apache.harmony.pack200.CodecEncoding;
+import org.apache.harmony.pack200.Pack200Exception;
 import org.apache.harmony.pack200.PopulationCodec;
 import org.apache.harmony.unpack200.bytecode.CPClass;
 import org.apache.harmony.unpack200.bytecode.CPDouble;
@@ -36,16 +37,22 @@
 import org.apache.harmony.unpack200.bytecode.CPNameAndType;
 import org.apache.harmony.unpack200.bytecode.CPString;
 import org.apache.harmony.unpack200.bytecode.CPUTF8;
-import org.apache.harmony.unpack200.bytecode.ClassConstantPool;
 
 /**
  * Abstract superclass for a set of bands
  */
 public abstract class BandSet {
 
-    public abstract void unpack(InputStream inputStream) throws IOException,
+    public abstract void read(InputStream inputStream) throws IOException,
             Pack200Exception;
 
+    public abstract void unpack() throws IOException, Pack200Exception;
+
+    public void unpack(InputStream in) throws IOException, Pack200Exception {
+        read(in);
+        unpack();
+    }
+
     protected Segment segment;
 
     protected SegmentHeader header;
@@ -57,7 +64,7 @@
 
     /**
      * Decode a band and return an array of <code>int</code> values
-     * 
+     *
      * @param name
      *            the name of the band (primarily for logging/debugging
      *            purposes)
@@ -139,7 +146,7 @@
 
     /**
      * Decode a band and return an array of <code>int[]</code> values
-     * 
+     *
      * @param name
      *            the name of the band (primarily for logging/debugging
      *            purposes)
@@ -180,7 +187,7 @@
 
     /**
      * Decode a band and return an array of <code>long</code> values
-     * 
+     *
      * @param name
      *            the name of the band (primarily for logging/debugging
      *            purposes)
@@ -332,7 +339,7 @@
      * <code>reference</code> (which is populated prior to this call). An
      * exception is thrown if a decoded index falls outside the range
      * [0..reference.length-1].
-     * 
+     *
      * @param name
      *            the band name
      * @param in
@@ -343,7 +350,7 @@
      *            the number of references to decode
      * @param reference
      *            the array of values to use for the references
-     * 
+     *
      * @throws IOException
      *             if a problem occurs during reading from the underlying stream
      * @throws Pack200Exception
@@ -363,7 +370,7 @@
      * exception is thrown if a decoded index falls outside the range
      * [0..reference.length-1]. Unlike the other parseReferences, this
      * post-processes the result into an array of results.
-     * 
+     *
      * @param name
      *            TODO
      * @param in
@@ -374,7 +381,7 @@
      *            the numbers of references to decode for each array entry
      * @param reference
      *            the array of values to use for the references
-     * 
+     *
      * @throws IOException
      *             if a problem occurs during reading from the underlying stream
      * @throws Pack200Exception
@@ -477,8 +484,7 @@
         CPUTF8[] result = new CPUTF8[indices.length];
         for (int i1 = 0; i1 < count; i1++) {
             int index = indices[i1];
-            result[i1] = segment.getCpBands().cpUTF8Value(index,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ);
+            result[i1] = segment.getCpBands().cpUTF8Value(index);
         }
         return result;
     }
@@ -495,8 +501,7 @@
         int[] indices = decodeBandInt(name, in, codec, sum);
         for (int i1 = 0; i1 < sum; i1++) {
             int index = indices[i1];
-            result1[i1] = segment.getCpBands().cpUTF8Value(index,
-                    ClassConstantPool.DOMAIN_NORMALASCIIZ);
+            result1[i1] = segment.getCpBands().cpUTF8Value(index);
         }
         CPUTF8[] refs = result1;
         int pos = 0;
@@ -632,7 +637,7 @@
             result[i] = new String[ints[i].length];
             for (int j = 0; j < result[i].length; j++) {
                 result[i][j] = reference[ints[i][j]];
-                
+
             }
         }
         return result;