mirror of
https://github.com/2003scape/deep-c-rsc.git
synced 2024-03-22 05:49:51 -04:00
370 lines
11 KiB
C
370 lines
11 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_net_ResolverCache
|
||
|
#include "jcgobchk.h"
|
||
|
#endif
|
||
|
|
||
|
JCGO_NOSEP_INLINE java_lang_Object CFASTCALL
|
||
|
java_net_ResolverCache__makeHashableAddress__BA( jbyteArr addr )
|
||
|
{
|
||
|
{
|
||
|
jcharArr chars;
|
||
|
chars= (jcharArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jchar), 0,
|
||
|
JCGO_ARRAY_LENGTH(addr));
|
||
|
{
|
||
|
jint i;
|
||
|
i= 0;
|
||
|
for (; i < JCGO_ARRAY_NZLENGTH(addr); i++)
|
||
|
{
|
||
|
jchar jcgo_rcvrC1;
|
||
|
(jcgo_rcvrC1= (jchar)JCGO_ARRAY_NZBACCESS(addr, i), JCGO_ARRAY_NZCACCESS(chars,
|
||
|
i)= jcgo_rcvrC1);
|
||
|
}
|
||
|
}
|
||
|
return (java_lang_Object)(java_lang_String__new__CA(
|
||
|
chars));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_STATIC jint CFASTCALL
|
||
|
java_net_ResolverCache__getTTL__LsI( java_lang_String propName, jint
|
||
|
defaultValue )
|
||
|
{
|
||
|
{
|
||
|
java_lang_String propValue;
|
||
|
propValue= (gnu_classpath_SystemProperties__getProperty__Ls(
|
||
|
propName));
|
||
|
if (propValue == jnull)
|
||
|
{
|
||
|
return defaultValue;
|
||
|
}
|
||
|
return (java_lang_Integer__parseInt__Ls(
|
||
|
propValue));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_FRWINL java_lang_String CFASTCALL
|
||
|
java_net_ResolverCache__getHostByAddr__BA( jbyteArr addr )
|
||
|
{
|
||
|
JCGO_CLINIT_TRIG(java_net_ResolverCache__class);
|
||
|
{
|
||
|
java_lang_Object key;
|
||
|
java_net_ResolverCache_Entry entry;
|
||
|
key= (java_net_ResolverCache__makeHashableAddress__BA(
|
||
|
addr));
|
||
|
entry= (java_net_ResolverCache_Entry)(java_net_ResolverCache__get__Lo(
|
||
|
key));
|
||
|
if (entry != jnull)
|
||
|
{
|
||
|
if (JCGO_FIELD_NZACCESS(entry, value) == jnull)
|
||
|
{
|
||
|
JCGO_THROW_EXC(java_net_UnknownHostException__new__());
|
||
|
}
|
||
|
return (java_lang_String)JCGO_CAST_OBJECT0(OBJT_java_lang_String,
|
||
|
MAXT_java_lang_String, JCGO_FIELD_NZACCESS(entry, value));
|
||
|
}
|
||
|
{
|
||
|
JCGO_TRY_BLOCK
|
||
|
{
|
||
|
java_lang_String hostname;
|
||
|
hostname= (java_net_VMInetAddress__getHostByAddr__BA(
|
||
|
addr));
|
||
|
(java_net_ResolverCache__put__L4levq(
|
||
|
(java_net_ResolverCache_Entry__new__LoLo(
|
||
|
key, (java_lang_Object)hostname))));
|
||
|
#ifndef JCGO_SEHTRY
|
||
|
jcgo_tryLeave();
|
||
|
#endif
|
||
|
return hostname;
|
||
|
}
|
||
|
JCGO_TRY_LEAVE
|
||
|
JCGO_TRY_CATCHES(1)
|
||
|
JCGO_TRY_CATCH(OBJT_java_net_UnknownHostException, MAXT_java_net_UnknownHostException)
|
||
|
{
|
||
|
java_net_UnknownHostException e;
|
||
|
e= (java_net_UnknownHostException)JCGO_TRY_THROWABLE(0);
|
||
|
(java_net_ResolverCache__put__L4levq(
|
||
|
(java_net_ResolverCache_Entry__new__LoLo(
|
||
|
key, (java_lang_Object)jnull))));
|
||
|
JCGO_THROW_EXC(e);
|
||
|
}
|
||
|
JCGO_TRY_RETHROW(1)
|
||
|
}
|
||
|
}
|
||
|
return jnull;
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_FRWINL jObjectArr CFASTCALL
|
||
|
java_net_ResolverCache__getHostByName__Ls( java_lang_String hostname
|
||
|
)
|
||
|
{
|
||
|
JCGO_CLINIT_TRIG(java_net_ResolverCache__class);
|
||
|
{
|
||
|
java_net_ResolverCache_Entry entry;
|
||
|
entry= (java_net_ResolverCache_Entry)(java_net_ResolverCache__get__Lo(
|
||
|
(java_lang_Object)hostname));
|
||
|
if (entry != jnull)
|
||
|
{
|
||
|
if (JCGO_FIELD_NZACCESS(entry, value) == jnull)
|
||
|
{
|
||
|
JCGO_THROW_EXC(java_net_UnknownHostException__new__());
|
||
|
}
|
||
|
return (jObjectArr)JCGO_CAST_OBJECT(OBJT_jbyte, MAXT_jbyte, 2, JCGO_FIELD_NZACCESS(entry,
|
||
|
value));
|
||
|
}
|
||
|
{
|
||
|
JCGO_TRY_BLOCK
|
||
|
{
|
||
|
jObjectArr addrs;
|
||
|
addrs= (java_net_VMInetAddress__getHostByName__Ls(
|
||
|
hostname));
|
||
|
(java_net_ResolverCache__put__L4levq(
|
||
|
(java_net_ResolverCache_Entry__new__LoLo(
|
||
|
(java_lang_Object)hostname, (java_lang_Object)addrs))));
|
||
|
#ifndef JCGO_SEHTRY
|
||
|
jcgo_tryLeave();
|
||
|
#endif
|
||
|
return addrs;
|
||
|
}
|
||
|
JCGO_TRY_LEAVE
|
||
|
JCGO_TRY_CATCHES(1)
|
||
|
JCGO_TRY_CATCH(OBJT_java_net_UnknownHostException, MAXT_java_net_UnknownHostException)
|
||
|
{
|
||
|
java_net_UnknownHostException e;
|
||
|
e= (java_net_UnknownHostException)JCGO_TRY_THROWABLE(0);
|
||
|
(java_net_ResolverCache__put__L4levq(
|
||
|
(java_net_ResolverCache_Entry__new__LoLo(
|
||
|
(java_lang_Object)hostname, (java_lang_Object)jnull))));
|
||
|
JCGO_THROW_EXC(e);
|
||
|
}
|
||
|
JCGO_TRY_RETHROW(1)
|
||
|
}
|
||
|
}
|
||
|
return jnull;
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_STATIC java_net_ResolverCache_Entry CFASTCALL
|
||
|
java_net_ResolverCache__get__Lo( java_lang_Object key )
|
||
|
{
|
||
|
JCGO_SYNC_BLOCKSAFENZ(JCGO_CLASSREF_OF(java_net_ResolverCache__class))
|
||
|
{
|
||
|
jObject jcgo_rcvrL1;
|
||
|
(java_net_ResolverCache__reap__());
|
||
|
{
|
||
|
java_net_ResolverCache_Entry jcgo_retval= (java_net_ResolverCache_Entry)JCGO_CAST_OBJECT0(OBJT_java_net_ResolverCache_Entry,
|
||
|
MAXT_java_net_ResolverCache_Entry, (jcgo_rcvrL1= (jObject)java_net_ResolverCache__cache,
|
||
|
JCGO_CALL_FINALF((java_util_HashMap)jcgo_rcvrL1) java_util_HashMap__get__Lo(
|
||
|
(java_util_HashMap)jcgo_rcvrL1, key)));
|
||
|
#ifndef JCGO_SEHTRY
|
||
|
JCGO_SYNC_JUMPLEAVE(0);
|
||
|
#endif
|
||
|
return jcgo_retval;
|
||
|
}
|
||
|
}
|
||
|
JCGO_SYNC_ENDUNREACH
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_STATIC void CFASTCALL
|
||
|
java_net_ResolverCache__put__L4levq( java_net_ResolverCache_Entry
|
||
|
entry )
|
||
|
{
|
||
|
JCGO_SYNC_BLOCKSAFENZ(JCGO_CLASSREF_OF(java_net_ResolverCache__class))
|
||
|
{
|
||
|
(java_net_ResolverCache__reap__());
|
||
|
if (JCGO_FIELD_ACCESS(java_net_ResolverCache_Entry, entry, expires) !=
|
||
|
0)
|
||
|
{
|
||
|
jObject jcgo_rcvrL1;
|
||
|
if (JCGO_FIELD_NZACCESS(entry, expires) != (-(jint)1))
|
||
|
{
|
||
|
jObject jcgo_rcvrL1;
|
||
|
(jcgo_rcvrL1= (jObject)java_net_ResolverCache__killqueue, JCGO_CALL_FINALF((java_util_LinkedList)jcgo_rcvrL1)
|
||
|
java_util_LinkedList__add__Lo(
|
||
|
(java_util_LinkedList)jcgo_rcvrL1, (java_lang_Object)entry));
|
||
|
}
|
||
|
(jcgo_rcvrL1= (jObject)java_net_ResolverCache__cache, JCGO_CALL_FINALF((java_util_HashMap)jcgo_rcvrL1)
|
||
|
java_util_HashMap__put__LoLo(
|
||
|
(java_util_HashMap)jcgo_rcvrL1, JCGO_FIELD_NZACCESS(entry, key),
|
||
|
(java_lang_Object)entry));
|
||
|
}
|
||
|
}
|
||
|
JCGO_SYNC_END
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_STATIC void CFASTCALL
|
||
|
java_net_ResolverCache__reap__( void )
|
||
|
{
|
||
|
{
|
||
|
jObject jcgo_rcvrL1;
|
||
|
if (!(jcgo_rcvrL1= (jObject)java_net_ResolverCache__killqueue, JCGO_CALL_FINALF((java_util_LinkedList)jcgo_rcvrL1)
|
||
|
java_util_AbstractCollection__isEmpty__(
|
||
|
(java_util_AbstractCollection)jcgo_rcvrL1)))
|
||
|
{
|
||
|
java_util_Iterator iter;
|
||
|
jlong now;
|
||
|
jObject jcgo_rcvrL1;
|
||
|
now= (java_lang_System__currentTimeMillis__());
|
||
|
iter= (jcgo_rcvrL1= (jObject)java_net_ResolverCache__killqueue,
|
||
|
JCGO_CALL_FINALF((java_util_LinkedList)jcgo_rcvrL1) java_util_AbstractSequentialList__iterator__(
|
||
|
(java_util_AbstractSequentialList)jcgo_rcvrL1));
|
||
|
while ((JCGO_CALL_VFUNC(iter)->hasNext__(
|
||
|
iter)))
|
||
|
{
|
||
|
java_net_ResolverCache_Entry entry;
|
||
|
jObject jcgo_rcvrL1;
|
||
|
entry= (java_net_ResolverCache_Entry)JCGO_CAST_OBJECT0(OBJT_java_net_ResolverCache_Entry,
|
||
|
MAXT_java_net_ResolverCache_Entry, (JCGO_CALL_NZVFUNC(iter)->next__(
|
||
|
iter)));
|
||
|
if (JCGO_FIELD_ACCESS(java_net_ResolverCache_Entry, entry, expires) >
|
||
|
now)
|
||
|
{
|
||
|
break;
|
||
|
}
|
||
|
(jcgo_rcvrL1= (jObject)java_net_ResolverCache__cache, JCGO_CALL_FINALF((java_util_HashMap)jcgo_rcvrL1)
|
||
|
java_util_HashMap__remove__Lo(
|
||
|
(java_util_HashMap)jcgo_rcvrL1, JCGO_FIELD_NZACCESS(entry, key)));
|
||
|
(JCGO_CALL_NZVFUNC(iter)->remove__(
|
||
|
iter));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_STATIC java_net_ResolverCache CFASTCALL
|
||
|
java_net_ResolverCache__this__( java_net_ResolverCache This )
|
||
|
{
|
||
|
{
|
||
|
;
|
||
|
}
|
||
|
return This;
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_STATIC void CFASTCALL
|
||
|
java_net_ResolverCache__class__0( void )
|
||
|
{
|
||
|
JCGO_CLINIT_BEGIN(java_net_ResolverCache__class);
|
||
|
java_net_ResolverCache__POSITIVE_TTL= (java_net_ResolverCache__getTTL__LsI(
|
||
|
JCGO_STRREF_OF(jcgo_string2_RslvrCch), (-(jint)1)));
|
||
|
java_net_ResolverCache__NEGATIVE_TTL= (java_net_ResolverCache__getTTL__LsI(
|
||
|
JCGO_STRREF_OF(jcgo_string3_RslvrCch), (jint)10));
|
||
|
java_net_ResolverCache__cache= java_util_HashMap__new__();
|
||
|
java_net_ResolverCache__killqueue= java_util_LinkedList__new__();
|
||
|
JCGO_CLINIT_DONE(java_net_ResolverCache__class);
|
||
|
}
|
||
|
|
||
|
JCGO_NOSEP_DATA CONST struct java_net_ResolverCache_methods_s java_net_ResolverCache_methods=
|
||
|
{
|
||
|
JCGO_CLASSREF_OF(java_net_ResolverCache__class),
|
||
|
JCGO_GCJDESCR_ZEROINIT
|
||
|
OBJT_java_net_ResolverCache,
|
||
|
-(JCGO_OBJSIZE_T)sizeof(struct java_net_ResolverCache_s),
|
||
|
NULL,
|
||
|
JCGO_CLINIT_INIT(java_net_ResolverCache__class__0)
|
||
|
java_net_ResolverCache__this__,
|
||
|
java_lang_Object__equals__Lo,
|
||
|
java_lang_Object__hashCode__,
|
||
|
java_lang_Object__toString__,
|
||
|
java_lang_Object__finalize__
|
||
|
};
|
||
|
|
||
|
JCGO_NOSEP_DATA struct java_net_ResolverCache_class_s java_net_ResolverCache__class
|
||
|
ATTRIBNONGC=
|
||
|
{
|
||
|
{
|
||
|
&java_lang_Class_methods,
|
||
|
JCGO_MON_INIT
|
||
|
JCGO_OBJREF_OF(*(java_lang_Object)&java_net_ResolverCache_methods),
|
||
|
JCGO_STRREF_OF(jcgo_string1_RslvrCch),
|
||
|
JCGO_CLASSREF_OF(java_lang_Object__class),
|
||
|
((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
|
||
|
0x1c0
|
||
|
}
|
||
|
};
|
||
|
|
||
|
JCGO_NOSEP_GCDATA java_util_HashMap java_net_ResolverCache__cache
|
||
|
ATTRIBGCBSS= jnull;
|
||
|
|
||
|
JCGO_NOSEP_GCDATA java_util_LinkedList java_net_ResolverCache__killqueue
|
||
|
ATTRIBGCBSS= jnull;
|
||
|
|
||
|
JCGO_NOSEP_DATA jint java_net_ResolverCache__POSITIVE_TTL= (jint)0;
|
||
|
|
||
|
JCGO_NOSEP_DATA jint java_net_ResolverCache__NEGATIVE_TTL= (jint)0;
|
||
|
|
||
|
JCGO_NOSEP_DATA CONST jcgo_arrtype90_GmCnnctn jcgo_array4_RslvrCch=
|
||
|
{
|
||
|
(jvtable)&jbyteArr_methods,
|
||
|
JCGO_MON_INIT
|
||
|
28,
|
||
|
{
|
||
|
(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)101/*'e'*/, (jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)46/*'.'*/,
|
||
|
(jbyte)(jchar)82/*'R'*/, (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)115/*'s'*/,
|
||
|
(jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)108/*'l'*/, (jbyte)(jchar)118/*'v'*/,
|
||
|
(jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)67/*'C'*/,
|
||
|
(jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)99/*'c'*/, (jbyte)(jchar)104/*'h'*/,
|
||
|
(jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)36/*'$'*/, (jbyte)(jchar)69/*'E'*/,
|
||
|
(jbyte)(jchar)110/*'n'*/, (jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)114/*'r'*/,
|
||
|
(jbyte)(jchar)121/*'y'*/
|
||
|
}
|
||
|
};
|
||
|
|
||
|
JCGO_NOSEP_DATA CONST jcgo_arrtype94_GmCnnctn jcgo_array5_RslvrCch=
|
||
|
{
|
||
|
(jvtable)&jbyteArr_methods,
|
||
|
JCGO_MON_INIT
|
||
|
24,
|
||
|
{
|
||
|
(jbyte)(jchar)110/*'n'*/, (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)116/*'t'*/,
|
||
|
(jbyte)(jchar)119/*'w'*/, (jbyte)(jchar)111/*'o'*/, (jbyte)(jchar)114/*'r'*/,
|
||
|
(jbyte)(jchar)107/*'k'*/, (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)100/*'d'*/,
|
||
|
(jbyte)(jchar)100/*'d'*/, (jbyte)(jchar)114/*'r'*/, (jbyte)(jchar)101/*'e'*/,
|
||
|
(jbyte)(jchar)115/*'s'*/, (jbyte)(jchar)115/*'s'*/, (jbyte)(jchar)46/*'.'*/,
|
||
|
(jbyte)(jchar)99/*'c'*/, (jbyte)(jchar)97/*'a'*/, (jbyte)(jchar)99/*'c'*/,
|
||
|
(jbyte)(jchar)104/*'h'*/, (jbyte)(jchar)101/*'e'*/, (jbyte)(jchar)46/*'.'*/,
|
||
|
(jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)116/*'t'*/, (jbyte)(jchar)108/*'l'*/
|
||
|
}
|
||
|
};
|
||
|
|
||
|
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_RslvrCch
|
||
|
JCGO_THRD_ATTRNONGC=
|
||
|
{
|
||
|
&java_lang_String_methods,
|
||
|
JCGO_MON_INIT
|
||
|
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array4_RslvrCch),
|
||
|
0, 22, (jint)0xc40adb9fL
|
||
|
};
|
||
|
|
||
|
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string2_RslvrCch
|
||
|
JCGO_THRD_ATTRNONGC=
|
||
|
{
|
||
|
&java_lang_String_methods,
|
||
|
JCGO_MON_INIT
|
||
|
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array5_RslvrCch),
|
||
|
0, 24, (jint)0x1d22df98L
|
||
|
};
|
||
|
|
||
|
JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string3_RslvrCch
|
||
|
JCGO_THRD_ATTRNONGC=
|
||
|
{
|
||
|
&java_lang_String_methods,
|
||
|
JCGO_MON_INIT
|
||
|
(java_lang_Object)JCGO_OBJREF_OF(jcgo_array453_VMSstmPr),
|
||
|
0, 33, (jint)0xa2aa1887L
|
||
|
};
|
||
|
|
||
|
#ifdef CHKALL_java_net_ResolverCache
|
||
|
#include "jcgochke.h"
|
||
|
#endif
|
||
|
|
||
|
#endif
|