mirror of
https://github.com/2003scape/deep-c-rsc.git
synced 2024-03-22 05:49:51 -04:00
272 lines
6.2 KiB
C
272 lines
6.2 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_Buffer
|
|
#include "jcgobchk.h"
|
|
#endif
|
|
|
|
JCGO_NOSEP_INLINE java_nio_Buffer CFASTCALL
|
|
java_nio_Buffer__limit__I( java_nio_Buffer This, jint newLimit )
|
|
{
|
|
{
|
|
if ((newLimit < 0) || (newLimit > JCGO_FIELD_NZACCESS(This, cap)))
|
|
{
|
|
JCGO_THROW_EXC(java_lang_IllegalArgumentException__new__());
|
|
}
|
|
if (newLimit < JCGO_FIELD_NZACCESS(This, mark))
|
|
{
|
|
JCGO_FIELD_NZACCESS(This, mark)= (-(jint)1);
|
|
}
|
|
if (JCGO_FIELD_NZACCESS(This, pos) > newLimit)
|
|
{
|
|
JCGO_FIELD_NZACCESS(This, pos)= newLimit;
|
|
}
|
|
JCGO_FIELD_NZACCESS(This, limit)= newLimit;
|
|
return This;
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_FRWINL jint CFASTCALL
|
|
java_nio_Buffer__remaining__( java_nio_Buffer This )
|
|
{
|
|
{
|
|
return JCGO_FIELD_NZACCESS(This, limit) - JCGO_FIELD_NZACCESS(This,
|
|
pos);
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_INLINE jint CFASTCALL
|
|
java_nio_Buffer__limit__( java_nio_Buffer This )
|
|
{
|
|
{
|
|
return JCGO_FIELD_NZACCESS(This, limit);
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_STATIC java_nio_Buffer CFASTCALL
|
|
java_nio_Buffer__this__IIIIL8d4dv( java_nio_Buffer This, java_lang_Object
|
|
address, jint capacity, jint limit, jint position, jint mark )
|
|
{
|
|
{
|
|
;
|
|
(void)address;
|
|
if (capacity < 0)
|
|
{
|
|
JCGO_THROW_EXC(java_lang_IllegalArgumentException__new__());
|
|
}
|
|
JCGO_FIELD_NZACCESS(This, cap)= capacity;
|
|
(java_nio_Buffer__limit__I(
|
|
This, limit));
|
|
(java_nio_Buffer__position__I(
|
|
This, position));
|
|
if (mark >= 0)
|
|
{
|
|
if (mark > JCGO_FIELD_NZACCESS(This, pos))
|
|
{
|
|
JCGO_THROW_EXC(java_lang_IllegalArgumentException__new__());
|
|
}
|
|
JCGO_FIELD_NZACCESS(This, mark)= mark;
|
|
}
|
|
else
|
|
{
|
|
JCGO_FIELD_NZACCESS(This, mark)= (-(jint)1);
|
|
}
|
|
}
|
|
return This;
|
|
}
|
|
|
|
JCGO_NOSEP_FRWINL jint CFASTCALL
|
|
java_nio_Buffer__capacity__( java_nio_Buffer This )
|
|
{
|
|
{
|
|
return JCGO_FIELD_NZACCESS(This, cap);
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_STATIC java_nio_Buffer CFASTCALL
|
|
java_nio_Buffer__clear__( java_nio_Buffer This )
|
|
{
|
|
{
|
|
JCGO_FIELD_NZACCESS(This, limit)= JCGO_FIELD_NZACCESS(This, cap);
|
|
JCGO_FIELD_NZACCESS(This, pos)= 0;
|
|
JCGO_FIELD_NZACCESS(This, mark)= (-(jint)1);
|
|
return This;
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_STATIC java_nio_Buffer CFASTCALL
|
|
java_nio_Buffer__flip__( java_nio_Buffer This )
|
|
{
|
|
{
|
|
JCGO_FIELD_NZACCESS(This, limit)= JCGO_FIELD_NZACCESS(This, pos);
|
|
JCGO_FIELD_NZACCESS(This, pos)= 0;
|
|
JCGO_FIELD_NZACCESS(This, mark)= (-(jint)1);
|
|
return This;
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_FRWINL jboolean CFASTCALL
|
|
java_nio_Buffer__hasRemaining__( java_nio_Buffer This )
|
|
{
|
|
{
|
|
return (jboolean)((java_nio_Buffer__remaining__(
|
|
This)) > 0);
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_FRWINL jint CFASTCALL
|
|
java_nio_Buffer__position__( java_nio_Buffer This )
|
|
{
|
|
{
|
|
return JCGO_FIELD_NZACCESS(This, pos);
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_STATIC java_nio_Buffer CFASTCALL
|
|
java_nio_Buffer__position__I( java_nio_Buffer This, jint newPosition
|
|
)
|
|
{
|
|
{
|
|
if ((newPosition < 0) || (newPosition > JCGO_FIELD_NZACCESS(This,
|
|
limit)))
|
|
{
|
|
JCGO_THROW_EXC(java_lang_IllegalArgumentException__new__());
|
|
}
|
|
if (newPosition <= JCGO_FIELD_NZACCESS(This, mark))
|
|
{
|
|
JCGO_FIELD_NZACCESS(This, mark)= (-(jint)1);
|
|
}
|
|
JCGO_FIELD_NZACCESS(This, pos)= newPosition;
|
|
return This;
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_INLINE void CFASTCALL
|
|
java_nio_Buffer__checkForUnderflow__I( java_nio_Buffer This, jint
|
|
length )
|
|
{
|
|
{
|
|
if ((java_nio_Buffer__remaining__(
|
|
This)) < length)
|
|
{
|
|
JCGO_THROW_EXC(java_nio_BufferUnderflowException__new__());
|
|
}
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_INLINE void CFASTCALL
|
|
java_nio_Buffer__checkForOverflow__I( java_nio_Buffer This, jint length
|
|
)
|
|
{
|
|
{
|
|
if ((java_nio_Buffer__remaining__(
|
|
This)) < length)
|
|
{
|
|
JCGO_THROW_EXC(java_nio_BufferOverflowException__new__());
|
|
}
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_INLINE void CFASTCALL
|
|
java_nio_Buffer__checkIndex__I( java_nio_Buffer This, jint index )
|
|
{
|
|
{
|
|
if (index < 0 || index >= (java_nio_Buffer__limit__(
|
|
This)))
|
|
{
|
|
JCGO_THROW_EXC(java_lang_IndexOutOfBoundsException__new__());
|
|
}
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_INLINE void CFASTCALL
|
|
java_nio_Buffer__checkIfReadOnly__( java_nio_Buffer This )
|
|
{
|
|
{
|
|
if ((JCGO_CALL_NZVFUNC(This)->isReadOnly__(
|
|
This)))
|
|
{
|
|
JCGO_THROW_EXC(java_nio_ReadOnlyBufferException__new__());
|
|
}
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_STATIC void CFASTCALL
|
|
java_nio_Buffer__checkArraySize__III( jint arraylength, jint offset,
|
|
jint length )
|
|
{
|
|
{
|
|
if ((offset < 0) || (length < 0) || (arraylength < length + offset))
|
|
{
|
|
JCGO_THROW_EXC(java_lang_IndexOutOfBoundsException__new__());
|
|
}
|
|
}
|
|
}
|
|
|
|
JCGO_NOSEP_DATA CONST struct jcgo_methods_s java_nio_Buffer_methods=
|
|
{
|
|
JCGO_CLASSREF_OF(java_nio_Buffer__class),
|
|
JCGO_GCJDESCR_ZEROINIT
|
|
OBJT_java_nio_Buffer,
|
|
0,
|
|
NULL,
|
|
JCGO_CLINIT_INIT(0)
|
|
0
|
|
};
|
|
|
|
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_nio_Buffer_class_s java_nio_Buffer__class
|
|
JCGO_THRD_ATTRNONGC=
|
|
{
|
|
{
|
|
&java_lang_Class_methods,
|
|
JCGO_MON_INIT
|
|
JCGO_OBJREF_OF(*(java_lang_Object)&java_nio_Buffer_methods),
|
|
JCGO_STRREF_OF(jcgo_string1_BufferBD),
|
|
JCGO_CLASSREF_OF(java_lang_Object__class),
|
|
((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
|
|
0x401
|
|
}
|
|
};
|
|
|
|
JCGO_NOSEP_DATA CONST jcgo_arrtype98_GmCnnctn jcgo_array2_BufferBD=
|
|
{
|
|
(jvtable)&jbyteArr_methods,
|
|
JCGO_MON_INIT
|
|
32,
|
|
{
|
|
(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)66/*'B'*/, (jbyte)(jchar)117/*'u'*/, (jbyte)(jchar)102/*'f'*/,
|
|
(jbyte)(jchar)102/*'f'*/, (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)114/*'r'*/,
|
|
(jbyte)(jchar)79/*'O'*/, (jbyte)(jchar)118/*'v'*/, (jbyte)(jchar)101/*'e'*/,
|
|
(jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)102/*'f'*/, (jbyte)(jchar)108/*'l'*/,
|
|
(jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)119/*'w'*/, (jbyte)(jchar)69/*'E'*/,
|
|
(jbyte)(jchar)120/*'x'*/, (jbyte)(jchar)99/*'c'*/, (jbyte)(jchar)101/*'e'*/,
|
|
(jbyte)(jchar)112/*'p'*/, (jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)105/*'i'*/,
|
|
(jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)110/*'n'*/
|
|
}
|
|
};
|
|
|
|
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_BufferBD
|
|
JCGO_THRD_ATTRNONGC=
|
|
{
|
|
&java_lang_String_methods,
|
|
JCGO_MON_INIT
|
|
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array2_BufferBD),
|
|
0, 15, (jint)0x3091e8c6L
|
|
};
|
|
|
|
#ifdef CHKALL_java_nio_Buffer
|
|
#include "jcgochke.h"
|
|
#endif
|
|
|
|
#endif
|