mirror of
https://github.com/2003scape/deep-c-rsc.git
synced 2024-03-22 05:49:51 -04:00
308 lines
9.1 KiB
C
308 lines
9.1 KiB
C
/* DO NOT EDIT THIS FILE - it is machine generated (JCGO_116) */
|
|
|
|
#ifdef JCGO_SEPARATED
|
|
#define JCGO_116
|
|
#include "jcgortl.h"
|
|
#include "Main.h"
|
|
#endif
|
|
|
|
#ifdef JCGO_116
|
|
|
|
#ifdef CHKALL_gnu_java_nio_charset_UTF_18
|
|
#include "jcgobchk.h"
|
|
#endif
|
|
|
|
JCGO_NOSEP_INLINE gnu_java_nio_charset_UTF_8_Encoder CFASTCALL
|
|
gnu_java_nio_charset_UTF_8_Encoder__this__L7qsf6( gnu_java_nio_charset_UTF_8_Encoder
|
|
This, java_nio_charset_Charset cs )
|
|
{
|
|
{
|
|
(java_nio_charset_CharsetEncoder__this__L7qsf6FF((java_nio_charset_CharsetEncoder)This,
|
|
cs, (jfloat)1.1, (jfloat)4.0));
|
|
}
|
|
return This;
|
|
}
|
|
|
|
JCGO_NOSEP_FRWINL gnu_java_nio_charset_UTF_8_Encoder CFASTCALL
|
|
gnu_java_nio_charset_UTF_8_Encoder__new__L7qsf6( java_nio_charset_Charset
|
|
cs )
|
|
{
|
|
return gnu_java_nio_charset_UTF_8_Encoder__this__L7qsf6(
|
|
(gnu_java_nio_charset_UTF_8_Encoder)jcgo_newObject((jvtable)&gnu_java_nio_charset_UTF_8_Encoder_methods),
|
|
cs);
|
|
}
|
|
|
|
JCGO_NOSEP_STATIC java_nio_charset_CoderResult CFASTCALL
|
|
gnu_java_nio_charset_UTF_8_Encoder__encodeLoop__L3367bL9oaia( gnu_java_nio_charset_UTF_8_Encoder
|
|
This, java_nio_CharBuffer in, java_nio_ByteBuffer out )
|
|
{
|
|
{
|
|
JCGO_TRY_VOLATILE jint inPos;
|
|
inPos= (JCGO_CALL_FINALF(in) java_nio_Buffer__position__(
|
|
(java_nio_Buffer)in));
|
|
{
|
|
JCGO_TRY_BLOCK
|
|
{
|
|
while ((java_nio_Buffer__hasRemaining__(
|
|
(java_nio_Buffer)in)))
|
|
{
|
|
jint remaining;
|
|
jchar c;
|
|
remaining= (JCGO_CALL_FINALF(out) java_nio_Buffer__remaining__(
|
|
(java_nio_Buffer)out));
|
|
c= (java_nio_CharBufferImpl__get__(
|
|
(java_nio_CharBufferImpl)in));
|
|
if ((jint)c <= (jint)127)
|
|
{
|
|
if (remaining < (jint)1)
|
|
{
|
|
{
|
|
java_nio_charset_CoderResult jcgo_retval= JCGO_CLINIT_VARACC(java_nio_charset_CoderResult__class,
|
|
java_nio_charset_CoderResult__OVERFLOW);
|
|
#ifndef JCGO_SEHTRY
|
|
jcgo_tryLeave();
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
#endif
|
|
return jcgo_retval;
|
|
}
|
|
}
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)c));
|
|
inPos++;
|
|
}
|
|
else
|
|
{
|
|
if ((jint)c <= (jint)2047)
|
|
{
|
|
if (remaining < (jint)2)
|
|
{
|
|
{
|
|
java_nio_charset_CoderResult jcgo_retval= JCGO_CLINIT_VARACC(java_nio_charset_CoderResult__class,
|
|
java_nio_charset_CoderResult__OVERFLOW);
|
|
#ifndef JCGO_SEHTRY
|
|
jcgo_tryLeave();
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
#endif
|
|
return jcgo_retval;
|
|
}
|
|
}
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)(JCGO_SHR_F(c, (jint)6) |
|
|
(jint)192)));
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)((c & (jint)63) | (jint)128)));
|
|
inPos++;
|
|
}
|
|
else
|
|
{
|
|
if ((jint)55296L <= (jint)c && (jint)c <= (jint)57343L)
|
|
{
|
|
jint value;
|
|
jchar d;
|
|
if (remaining < (jint)4)
|
|
{
|
|
{
|
|
java_nio_charset_CoderResult jcgo_retval= JCGO_CLINIT_VARACC(java_nio_charset_CoderResult__class,
|
|
java_nio_charset_CoderResult__OVERFLOW);
|
|
#ifndef JCGO_SEHTRY
|
|
jcgo_tryLeave();
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
#endif
|
|
return jcgo_retval;
|
|
}
|
|
}
|
|
if ((jint)c > (jint)56319L)
|
|
{
|
|
{
|
|
java_nio_charset_CoderResult jcgo_retval= (java_nio_charset_CoderResult__malformedForLength__I(
|
|
(jint)1));
|
|
#ifndef JCGO_SEHTRY
|
|
jcgo_tryLeave();
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
#endif
|
|
return jcgo_retval;
|
|
}
|
|
}
|
|
if (!(java_nio_Buffer__hasRemaining__(
|
|
(java_nio_Buffer)in)))
|
|
{
|
|
{
|
|
java_nio_charset_CoderResult jcgo_retval= JCGO_CLINIT_VARACC(java_nio_charset_CoderResult__class,
|
|
java_nio_charset_CoderResult__UNDERFLOW);
|
|
#ifndef JCGO_SEHTRY
|
|
jcgo_tryLeave();
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
#endif
|
|
return jcgo_retval;
|
|
}
|
|
}
|
|
d= (java_nio_CharBufferImpl__get__(
|
|
(java_nio_CharBufferImpl)in));
|
|
if ((jint)d < (jint)56320L || (jint)d > (jint)57343L)
|
|
{
|
|
{
|
|
java_nio_charset_CoderResult jcgo_retval= (java_nio_charset_CoderResult__malformedForLength__I(
|
|
(jint)1));
|
|
#ifndef JCGO_SEHTRY
|
|
jcgo_tryLeave();
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
#endif
|
|
return jcgo_retval;
|
|
}
|
|
}
|
|
value= (JCGO_SHL_F((c & (jint)1023), (jint)10) | (d & (jint)1023)) +
|
|
(jint)65536L;
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)((JCGO_SHR_F(value, (jint)18) &
|
|
(jint)7) | (jint)240)));
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)((JCGO_SHR_F(value, (jint)12) &
|
|
(jint)63) | (jint)128)));
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)((JCGO_SHR_F(value, (jint)6) &
|
|
(jint)63) | (jint)128)));
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)((value & (jint)63) |
|
|
(jint)128)));
|
|
inPos+= (jint)2;
|
|
}
|
|
else
|
|
{
|
|
if (remaining < (jint)3)
|
|
{
|
|
{
|
|
java_nio_charset_CoderResult jcgo_retval= JCGO_CLINIT_VARACC(java_nio_charset_CoderResult__class,
|
|
java_nio_charset_CoderResult__OVERFLOW);
|
|
#ifndef JCGO_SEHTRY
|
|
jcgo_tryLeave();
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
#endif
|
|
return jcgo_retval;
|
|
}
|
|
}
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)(JCGO_SHR_F(c, (jint)12) |
|
|
(jint)224)));
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)((JCGO_SHR_F(c, (jint)6) &
|
|
(jint)63) | (jint)128)));
|
|
(java_nio_ByteBufferImpl__put__B(
|
|
(java_nio_ByteBufferImpl)out, (jbyte)((c & (jint)63) | (jint)128)));
|
|
inPos++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
{
|
|
java_nio_charset_CoderResult jcgo_retval= JCGO_CLINIT_VARACC(java_nio_charset_CoderResult__class,
|
|
java_nio_charset_CoderResult__UNDERFLOW);
|
|
#ifndef JCGO_SEHTRY
|
|
jcgo_tryLeave();
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
#endif
|
|
return jcgo_retval;
|
|
}
|
|
}
|
|
JCGO_TRY_LEAVE
|
|
{
|
|
(java_nio_Buffer__position__I(
|
|
(java_nio_Buffer)in, inPos));
|
|
}
|
|
JCGO_TRY_FINALLYEND
|
|
}
|
|
}
|
|
return jnull;
|
|
}
|
|
|
|
JCGO_NOSEP_DATA CONST struct gnu_java_nio_charset_UTF_8_Encoder_methods_s
|
|
gnu_java_nio_charset_UTF_8_Encoder_methods=
|
|
{
|
|
JCGO_CLASSREF_OF(gnu_java_nio_charset_UTF_8_Encoder__class),
|
|
JCGO_GCJDESCR_INIT(gnu_java_nio_charset_UTF_8_Encoder_s, unmappableCharacterAction)
|
|
OBJT_gnu_java_nio_charset_UTF_8_Encoder,
|
|
(JCGO_OBJSIZE_T)sizeof(struct gnu_java_nio_charset_UTF_8_Encoder_s),
|
|
NULL,
|
|
JCGO_CLINIT_INIT(0)
|
|
0,
|
|
java_lang_Object__equals__Lo,
|
|
java_lang_Object__hashCode__,
|
|
java_lang_Object__toString__,
|
|
java_lang_Object__finalize__,
|
|
gnu_java_nio_charset_UTF_8_Encoder__encodeLoop__L3367bL9oaia,
|
|
(void (CFASTCALL*)(java_nio_charset_CharsetEncoder))java_lang_Object__finalize__
|
|
};
|
|
|
|
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct gnu_java_nio_charset_UTF_8_Encoder_class_s
|
|
gnu_java_nio_charset_UTF_8_Encoder__class JCGO_THRD_ATTRNONGC=
|
|
{
|
|
{
|
|
&java_lang_Class_methods,
|
|
JCGO_MON_INIT
|
|
JCGO_OBJREF_OF(*(java_lang_Object)&gnu_java_nio_charset_UTF_8_Encoder_methods),
|
|
JCGO_STRREF_OF(jcgo_string1_EncdrEA),
|
|
JCGO_CLASSREF_OF(java_nio_charset_CharsetEncoder__class),
|
|
((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
|
|
0x1a
|
|
}
|
|
};
|
|
|
|
JCGO_NOSEP_DATA CONST jcgo_arrtype87_GmCnnctn jcgo_array2_EncdrEA=
|
|
{
|
|
(jvtable)&jbyteArr_methods,
|
|
JCGO_MON_INIT
|
|
34,
|
|
{
|
|
(jbyte)(jchar)103/*'g'*/, (jbyte)(jchar)110/*'n'*/, (jbyte)(jchar)117/*'u'*/,
|
|
(jbyte)(jchar)46/*'.'*/, (jbyte)(jchar)106/*'j'*/, (jbyte)(jchar)97/*'a'*/,
|
|
(jbyte)(jchar)118/*'v'*/, (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)46/*'.'*/,
|
|
(jbyte)(jchar)110/*'n'*/, (jbyte)(jchar)105/*'i'*/, (jbyte)(jchar)111/*'o'*/,
|
|
(jbyte)(jchar)46/*'.'*/, (jbyte)(jchar)99/*'c'*/, (jbyte)(jchar)104/*'h'*/,
|
|
(jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)115/*'s'*/,
|
|
(jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)46/*'.'*/,
|
|
(jbyte)(jchar)85/*'U'*/, (jbyte)(jchar)84/*'T'*/, (jbyte)(jchar)70/*'F'*/,
|
|
(jbyte)(jchar)95/*'_'*/, (jbyte)(jchar)56/*'8'*/, (jbyte)(jchar)36/*'$'*/,
|
|
(jbyte)(jchar)69/*'E'*/, (jbyte)(jchar)110/*'n'*/, (jbyte)(jchar)99/*'c'*/,
|
|
(jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)100/*'d'*/, (jbyte)(jchar)101/*'e'*/,
|
|
(jbyte)(jchar)114/*'r'*/
|
|
}
|
|
};
|
|
|
|
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_EncdrEA
|
|
JCGO_THRD_ATTRNONGC=
|
|
{
|
|
&java_lang_String_methods,
|
|
JCGO_MON_INIT
|
|
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array2_EncdrEA),
|
|
0, 34, (jint)0x425b3f10L
|
|
};
|
|
|
|
#ifdef CHKALL_gnu_java_nio_charset_UTF_18
|
|
#include "jcgochke.h"
|
|
#endif
|
|
|
|
#endif
|