deep-c-rsc/jcgo_Out/ChrstDcd.c

431 lines
13 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_java_nio_charset_CharsetDecoder
#include "jcgobchk.h"
#endif
JCGO_NOSEP_INLINE void CFASTCALL
java_nio_charset_CharsetDecoder__void( java_nio_charset_CharsetDecoder
This )
{
JCGO_FIELD_NZACCESS(This, state)= java_nio_charset_CharsetDecoder__STATE_RESET;
JCGO_FIELD_NZACCESS(This, malformedInputAction)= JCGO_CLINIT_VARACC(java_nio_charset_CodingErrorAction__class,
java_nio_charset_CodingErrorAction__REPORT);
JCGO_FIELD_NZACCESS(This, unmappableCharacterAction)= JCGO_CLINIT_VARACC(java_nio_charset_CodingErrorAction__class,
java_nio_charset_CodingErrorAction__REPORT);
}
JCGO_NOSEP_STATIC java_nio_charset_CharsetDecoder CFASTCALL
java_nio_charset_CharsetDecoder__this__L7qsf6FFLs( java_nio_charset_CharsetDecoder
This, java_nio_charset_Charset cs, java_lang_String replacement, jfloat
averageCharsPerByte, jfloat maxCharsPerByte )
{
{
;
java_nio_charset_CharsetDecoder__void(This);
if (JCGO_FP_EQUF(averageCharsPerByte, (jfloat)0))
{
averageCharsPerByte= (jfloat)(jint)1;
}
if (JCGO_FP_EQUF(maxCharsPerByte, (jfloat)0))
{
maxCharsPerByte= (jfloat)(jint)1;
}
if (JCGO_FP_LQF(averageCharsPerByte, (jfloat)0.0))
{
JCGO_THROW_EXC((java_lang_IllegalArgumentException__new__Ls(
JCGO_STRREF_OF(jcgo_string3_ChrstDcd))));
}
if (JCGO_FP_LQF(maxCharsPerByte, (jfloat)0.0))
{
JCGO_THROW_EXC((java_lang_IllegalArgumentException__new__Ls(
JCGO_STRREF_OF(jcgo_string4_ChrstDcd))));
}
(void)cs;
(void)averageCharsPerByte;
JCGO_FIELD_NZACCESS(This, maxCharsPerByte)= maxCharsPerByte;
JCGO_FIELD_NZACCESS(This, replacement)= replacement;
(java_nio_charset_CharsetDecoder__implReplaceWith__Ls(
This, replacement));
}
return This;
}
JCGO_NOSEP_FRWINL void CFASTCALL
java_nio_charset_CharsetDecoder__implReplaceWith__Ls( java_nio_charset_CharsetDecoder
This, java_lang_String newReplacement )
{
{
}
}
JCGO_NOSEP_INLINE jfloat CFASTCALL
java_nio_charset_CharsetDecoder__maxCharsPerByte__( java_nio_charset_CharsetDecoder
This )
{
{
return JCGO_FIELD_NZACCESS(This, maxCharsPerByte);
}
}
JCGO_NOSEP_INLINE java_nio_charset_CoderResult CFASTCALL
java_nio_charset_CharsetDecoder__decode__L9oaiaL3367bZ( java_nio_charset_CharsetDecoder
This, java_nio_ByteBuffer in, java_nio_CharBuffer out, jboolean endOfInput
)
{
{
jint newState;
newState= endOfInput? java_nio_charset_CharsetDecoder__STATE_END :
java_nio_charset_CharsetDecoder__STATE_CODING;
if (JCGO_FIELD_NZACCESS(This, state) != java_nio_charset_CharsetDecoder__STATE_RESET &&
JCGO_FIELD_NZACCESS(This, state) != java_nio_charset_CharsetDecoder__STATE_CODING &&
!(endOfInput && JCGO_FIELD_NZACCESS(This, state) == java_nio_charset_CharsetDecoder__STATE_END))
{
JCGO_THROW_EXC(java_lang_IllegalStateException__new__());
}
JCGO_FIELD_NZACCESS(This, state)= newState;
for (;;)
{
java_nio_charset_CoderResult JCGO_TRY_VOLATILE cr;
java_nio_charset_CodingErrorAction action;
jint jcgo_rcvrI1;
{
JCGO_TRY_BLOCK
{
cr= (JCGO_CALL_NZVFUNC(This)->decodeLoop__L9oaiaL3367b(
This, in, out));
}
JCGO_TRY_LEAVE
JCGO_TRY_CATCHES(1)
JCGO_TRY_CATCH(OBJT_java_lang_RuntimeException, MAXT_java_lang_RuntimeException)
{
java_lang_RuntimeException e;
e= (java_lang_RuntimeException)JCGO_TRY_THROWABLE(0);
JCGO_THROW_EXC((java_nio_charset_CoderMalfunctionError__new__L6tfiz(
(java_lang_Exception)e)));
}
JCGO_TRY_RETHROW(1)
}
if ((JCGO_CALL_FINALF(cr) java_nio_charset_CoderResult__isOverflow__(
cr)))
{
return cr;
}
if ((java_nio_charset_CoderResult__isUnderflow__(
cr)))
{
if (endOfInput && (JCGO_CALL_FINALF(in) java_nio_Buffer__hasRemaining__(
(java_nio_Buffer)in)))
{
cr= (java_nio_charset_CoderResult__malformedForLength__I(
(JCGO_CALL_FINALF(in) java_nio_Buffer__remaining__(
(java_nio_Buffer)in))));
}
else
{
return cr;
}
}
action= (JCGO_CALL_FINALF(cr) java_nio_charset_CoderResult__isMalformed__(
cr))? JCGO_FIELD_NZACCESS(This, malformedInputAction) : JCGO_FIELD_NZACCESS(This,
unmappableCharacterAction);
if (action == JCGO_CLINIT_VARACC(java_nio_charset_CodingErrorAction__class,
java_nio_charset_CodingErrorAction__REPORT))
{
return cr;
}
if (action == java_nio_charset_CodingErrorAction__REPLACE)
{
jObject jcgo_rcvrL1;
jint jcgo_rcvrI1;
if ((jcgo_rcvrI1= (JCGO_CALL_FINALF(out) java_nio_Buffer__remaining__(
(java_nio_Buffer)out)), jcgo_rcvrI1 < (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This,
replacement), JCGO_CALL_FINALF((java_lang_String)jcgo_rcvrL1)
java_lang_String__length__(
(java_lang_String)jcgo_rcvrL1))))
{
return java_nio_charset_CoderResult__OVERFLOW;
}
(java_nio_CharBuffer__put__Ls(
out, JCGO_FIELD_NZACCESS(This, replacement)));
}
(JCGO_CALL_FINALF(in) java_nio_Buffer__position__I(
(java_nio_Buffer)in, (jcgo_rcvrI1= (JCGO_CALL_FINALF(in) java_nio_Buffer__position__(
(java_nio_Buffer)in)), jcgo_rcvrI1 + (java_nio_charset_CoderResult__length__(
cr)))));
}
}
return jnull;
}
JCGO_NOSEP_INLINE java_nio_charset_CoderResult CFASTCALL
java_nio_charset_CharsetDecoder__implFlush__L3367b( java_nio_charset_CharsetDecoder
This, java_nio_CharBuffer out )
{
{
return JCGO_CLINIT_VARACC(java_nio_charset_CoderResult__class, java_nio_charset_CoderResult__UNDERFLOW);
}
}
JCGO_NOSEP_INLINE java_nio_charset_CoderResult CFASTCALL
java_nio_charset_CharsetDecoder__flush__L3367b( java_nio_charset_CharsetDecoder
This, java_nio_CharBuffer out )
{
{
if (JCGO_FIELD_NZACCESS(This, state) != java_nio_charset_CharsetDecoder__STATE_RESET &&
JCGO_FIELD_NZACCESS(This, state) != java_nio_charset_CharsetDecoder__STATE_END)
{
JCGO_THROW_EXC(java_lang_IllegalStateException__new__());
}
JCGO_FIELD_NZACCESS(This, state)= java_nio_charset_CharsetDecoder__STATE_FLUSHED;
return (java_nio_charset_CharsetDecoder__implFlush__L3367b(
This, out));
}
}
JCGO_NOSEP_INLINE void CFASTCALL
java_nio_charset_CharsetDecoder__implReset__( java_nio_charset_CharsetDecoder
This )
{
{
}
}
JCGO_NOSEP_INLINE java_nio_charset_CharsetDecoder CFASTCALL
java_nio_charset_CharsetDecoder__reset__( java_nio_charset_CharsetDecoder
This )
{
{
JCGO_FIELD_NZACCESS(This, state)= java_nio_charset_CharsetDecoder__STATE_RESET;
(JCGO_CALL_NZVFUNC(This)->implReset__(
This));
return This;
}
}
JCGO_NOSEP_INLINE void CFASTCALL
java_nio_charset_CharsetDecoder__implOnMalformedInput__L6zetg( java_nio_charset_CharsetDecoder
This, java_nio_charset_CodingErrorAction newAction )
{
{
}
}
JCGO_NOSEP_INLINE void CFASTCALL
java_nio_charset_CharsetDecoder__implOnUnmappableCharacter__L6zetg(
java_nio_charset_CharsetDecoder This, java_nio_charset_CodingErrorAction
newAction )
{
{
}
}
JCGO_NOSEP_INLINE java_nio_charset_CharsetDecoder CFASTCALL
java_nio_charset_CharsetDecoder__this__L7qsf6FF( java_nio_charset_CharsetDecoder
This, java_nio_charset_Charset cs, jfloat averageCharsPerByte, jfloat
maxCharsPerByte )
{
{
(java_nio_charset_CharsetDecoder__this__L7qsf6FFLs((java_nio_charset_CharsetDecoder)This,
cs, java_nio_charset_CharsetDecoder__DEFAULT_REPLACEMENT, averageCharsPerByte,
maxCharsPerByte));
}
return This;
}
JCGO_NOSEP_FRWINL java_nio_CharBuffer CFASTCALL
java_nio_charset_CharsetDecoder__decode__L9oaia( java_nio_charset_CharsetDecoder
This, java_nio_ByteBuffer in )
{
{
java_nio_CharBuffer out;
java_nio_charset_CoderResult cr;
jint remaining;
jint n;
if (JCGO_FIELD_NZACCESS(This, state) != java_nio_charset_CharsetDecoder__STATE_RESET)
{
JCGO_THROW_EXC(java_lang_IllegalStateException__new__());
}
remaining= (JCGO_CALL_FINALF(in) java_nio_Buffer__remaining__(
(java_nio_Buffer)in));
n= JCGO_JFLOAT_TOJINT(((jfloat)remaining * (java_nio_charset_CharsetDecoder__maxCharsPerByte__(
This))));
out= (java_nio_CharBuffer__allocate__I(
n));
if (remaining == 0)
{
JCGO_FIELD_NZACCESS(This, state)= java_nio_charset_CharsetDecoder__STATE_FLUSHED;
return out;
}
cr= (java_nio_charset_CharsetDecoder__decode__L9oaiaL3367bZ(
This, in, out, (jboolean)jtrue));
if ((java_nio_charset_CoderResult__isError__(
cr)))
{
(java_nio_charset_CoderResult__throwException__(
cr));
}
cr= (java_nio_charset_CharsetDecoder__flush__L3367b(
This, out));
if ((JCGO_CALL_FINALF(cr) java_nio_charset_CoderResult__isError__(
cr)))
{
(java_nio_charset_CoderResult__throwException__(
cr));
}
(java_nio_charset_CharsetDecoder__reset__(
This));
(java_nio_Buffer__flip__(
(java_nio_Buffer)out));
return out;
}
}
JCGO_NOSEP_FRWINL java_nio_charset_CharsetDecoder CFASTCALL
java_nio_charset_CharsetDecoder__onMalformedInput__L6zetg( java_nio_charset_CharsetDecoder
This, java_nio_charset_CodingErrorAction newAction )
{
{
if (newAction == jnull)
{
JCGO_THROW_EXC((java_lang_IllegalArgumentException__new__Ls(
JCGO_STRREF_OF(jcgo_string5_ChrstEnc))));
}
JCGO_FIELD_NZACCESS(This, malformedInputAction)= newAction;
(java_nio_charset_CharsetDecoder__implOnMalformedInput__L6zetg(
This, newAction));
return This;
}
}
JCGO_NOSEP_FRWINL java_nio_charset_CharsetDecoder CFASTCALL
java_nio_charset_CharsetDecoder__onUnmappableCharacter__L6zetg( java_nio_charset_CharsetDecoder
This, java_nio_charset_CodingErrorAction newAction )
{
{
if (newAction == jnull)
{
JCGO_THROW_EXC((java_lang_IllegalArgumentException__new__Ls(
JCGO_STRREF_OF(jcgo_string5_ChrstEnc))));
}
JCGO_FIELD_NZACCESS(This, unmappableCharacterAction)= newAction;
(java_nio_charset_CharsetDecoder__implOnUnmappableCharacter__L6zetg(
This, newAction));
return This;
}
}
JCGO_NOSEP_DATA CONST struct jcgo_methods_s java_nio_charset_CharsetDecoder_methods=
{
JCGO_CLASSREF_OF(java_nio_charset_CharsetDecoder__class),
JCGO_GCJDESCR_ZEROINIT
OBJT_java_nio_charset_CharsetDecoder,
0,
NULL,
JCGO_CLINIT_INIT(0)
0
};
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_nio_charset_CharsetDecoder_class_s
java_nio_charset_CharsetDecoder__class JCGO_THRD_ATTRNONGC=
{
{
&java_lang_Class_methods,
JCGO_MON_INIT
JCGO_OBJREF_OF(*(java_lang_Object)&java_nio_charset_CharsetDecoder_methods),
JCGO_STRREF_OF(jcgo_string1_ChrstDcd),
JCGO_CLASSREF_OF(java_lang_Object__class),
((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
0x401
}
};
JCGO_NOSEP_DATA CONST jcgo_arrtype98_GmCnnctn jcgo_array5_ChrstDcd=
{
(jvtable)&jbyteArr_methods,
JCGO_MON_INIT
32,
{
(jbyte)(jchar)78/*'N'*/, (jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)110/*'n'*/,
(jbyte)(jchar)45/*'-'*/, (jbyte)(jchar)112/*'p'*/, (jbyte)(jchar)111/*'o'*/,
(jbyte)(jchar)115/*'s'*/, (jbyte)(jchar)105/*'i'*/, (jbyte)(jchar)116/*'t'*/,
(jbyte)(jchar)105/*'i'*/, (jbyte)(jchar)118/*'v'*/, (jbyte)(jchar)101/*'e'*/,
(jbyte)(jchar)32/*' '*/, (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)118/*'v'*/,
(jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)97/*'a'*/,
(jbyte)(jchar)103/*'g'*/, (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)67/*'C'*/,
(jbyte)(jchar)104/*'h'*/, (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)114/*'r'*/,
(jbyte)(jchar)115/*'s'*/, (jbyte)(jchar)80/*'P'*/, (jbyte)(jchar)101/*'e'*/,
(jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)66/*'B'*/, (jbyte)(jchar)121/*'y'*/,
(jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)101/*'e'*/
}
};
JCGO_NOSEP_DATA CONST jcgo_arrtype90_GmCnnctn jcgo_array6_ChrstDcd=
{
(jvtable)&jbyteArr_methods,
JCGO_MON_INIT
28,
{
(jbyte)(jchar)78/*'N'*/, (jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)110/*'n'*/,
(jbyte)(jchar)45/*'-'*/, (jbyte)(jchar)112/*'p'*/, (jbyte)(jchar)111/*'o'*/,
(jbyte)(jchar)115/*'s'*/, (jbyte)(jchar)105/*'i'*/, (jbyte)(jchar)116/*'t'*/,
(jbyte)(jchar)105/*'i'*/, (jbyte)(jchar)118/*'v'*/, (jbyte)(jchar)101/*'e'*/,
(jbyte)(jchar)32/*' '*/, (jbyte)(jchar)109/*'m'*/, (jbyte)(jchar)97/*'a'*/,
(jbyte)(jchar)120/*'x'*/, (jbyte)(jchar)67/*'C'*/, (jbyte)(jchar)104/*'h'*/,
(jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)115/*'s'*/,
(jbyte)(jchar)80/*'P'*/, (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)114/*'r'*/,
(jbyte)(jchar)66/*'B'*/, (jbyte)(jchar)121/*'y'*/, (jbyte)(jchar)116/*'t'*/,
(jbyte)(jchar)101/*'e'*/
}
};
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_ChrstDcd
JCGO_THRD_ATTRNONGC=
{
&java_lang_String_methods,
JCGO_MON_INIT
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array3_Charset),
0, 31, (jint)0x5eeb32c0L
};
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string2_ChrstDcd
JCGO_THRD_ATTRNONGC=
{
&java_lang_String_methods,
JCGO_MON_INIT
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array35_CharData),
9, 1, (jint)0xfffdL
};
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string3_ChrstDcd
JCGO_THRD_ATTRNONGC=
{
&java_lang_String_methods,
JCGO_MON_INIT
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array5_ChrstDcd),
0, 32, (jint)0xbc921e5eL
};
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string4_ChrstDcd
JCGO_THRD_ATTRNONGC=
{
&java_lang_String_methods,
JCGO_MON_INIT
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array6_ChrstDcd),
0, 28, (jint)0xd7d957a5L
};
#ifdef CHKALL_java_nio_charset_CharsetDecoder
#include "jcgochke.h"
#endif
#endif