示例#1
0
void iso9660::load_rdr(int offset,unsigned char *r_array)
{

  
  //disp1.printf("\nLength directory record ");
  rd.len_dir=r_array[0+offset];
  //disp1.printf("%x",r_array[0+offset]);
  
  
  //disp1.printf("\nExtented attribute record length ");
  rd.ext_attr_len=r_array[1+offset];
  //disp1.printf("%x",r_array[1+offset]);

  
  //disp1.printf("\nlocation of extent ");
  rd.loc_ext=return_int (r_array,6+offset,1);
  //disp1.printf("%x",rd.loc_ext);

  //disp1.printf("\nData length ");
rd.data_len=return_int (r_array,14+offset,1);
//disp1.printf("%x",rd.data_len);
 
//disp1.printf("\nRecording date and time ");
 for(int i=0;i<7;++i)
   {
     rd.date_time[i]=r_array[18+offset+i];
     //disp1.printf("%c",r_array[18+offset+i]);
   }
 //disp1.printf("\nFile flag ");
 rd.file_flag=r_array[25+offset];
 //disp1.printf("%x",r_array[25+offset]);
 

 //disp1.printf("\nFile unit size ");
 rd.file_unit_size=r_array[26+offset];
 //disp1.printf("%x",r_array[26+offset]);
 
 //disp1.printf("\niInterleave Gap size ");
 rd.int_gap_size=r_array[27+offset];
 //disp1.printf("%x",r_array[27+offset]);

 //disp1.printf("\nVolume seq number ");
 rd.vol_seq_num=two_return_int (r_array,30+offset,1);
 //disp1.printf("%x",rd.vol_seq_num);
 
 //disp1.printf("\nLength of file identifier ");
 rd.len_file_id=r_array[32+offset];
 //disp1.printf("%x",r_array[32+offset]);
 
 
 //disp1.printf("\nFile identifier ");
 for(int i=0;i<rd.len_file_id;++i)
   {
     rd.file_id[i]=r_array[33+offset+i];
     //disp1.printf("%c",r_array[33+offset+i]);
   }
 
}
示例#2
0
/* SYMBOL: java_util_zip_Deflater_deflate([BII)I */
void
Kaffe_java_util_zip_Deflater_deflate_stub(stack_item* _P_, stack_item* _R_)
{
	extern jint java_util_zip_Deflater_deflate(void*, HArrayOfByte*, jint, jint);
	jint ret = java_util_zip_Deflater_deflate(_P_[3].p, _P_[2].p, _P_[1].i, _P_[0].i);
	return_int(ret);
}
示例#3
0
/* SYMBOL: java_lang_UNIXProcess_forkAndExec([Ljava/lang/String;[Ljava/lang/String;)I */
void
Kaffe_java_lang_UNIXProcess_forkAndExec_stub(stack_item* _P_, stack_item* _R_)
{
    extern jint java_lang_UNIXProcess_forkAndExec(void*, HArrayOfObject*, HArrayOfObject*);
    jint ret = java_lang_UNIXProcess_forkAndExec(_P_[2].p, _P_[1].p, _P_[0].p);
    return_int(ret);
}
示例#4
0
/* SYMBOL: java_lang_reflect_Field_getInt(Ljava/lang/Object;)I */
void
Kaffe_java_lang_reflect_Field_getInt_stub(stack_item* _P_, stack_item* _R_)
{
	extern jint java_lang_reflect_Field_getInt(void*, void*);
	jint ret = java_lang_reflect_Field_getInt(_P_[1].p, _P_[0].p);
	return_int(ret);
}
示例#5
0
/* SYMBOL: java_lang_reflect_Field_getChar(Ljava/lang/Object;)C */
void
Kaffe_java_lang_reflect_Field_getChar_stub(stack_item* _P_, stack_item* _R_)
{
	extern jchar java_lang_reflect_Field_getChar(void*, void*);
	jchar ret = java_lang_reflect_Field_getChar(_P_[1].p, _P_[0].p);
	return_int(ret);
}
示例#6
0
/* SYMBOL: java_lang_reflect_Field_getByte(Ljava/lang/Object;)B */
void
Kaffe_java_lang_reflect_Field_getByte_stub(stack_item* _P_, stack_item* _R_)
{
	extern jbyte java_lang_reflect_Field_getByte(void*, void*);
	jbyte ret = java_lang_reflect_Field_getByte(_P_[1].p, _P_[0].p);
	return_int(ret);
}
示例#7
0
/* SYMBOL: java_lang_reflect_Field_getBoolean(Ljava/lang/Object;)Z */
void
Kaffe_java_lang_reflect_Field_getBoolean_stub(stack_item* _P_, stack_item* _R_)
{
	extern jbool java_lang_reflect_Field_getBoolean(void*, void*);
	jbool ret = java_lang_reflect_Field_getBoolean(_P_[1].p, _P_[0].p);
	return_int(ret);
}
示例#8
0
/* SYMBOL: java_util_zip_Deflater_getTotalOut()I */
void
Kaffe_java_util_zip_Deflater_getTotalOut_stub(stack_item* _P_, stack_item* _R_)
{
	extern jint java_util_zip_Deflater_getTotalOut(void*);
	jint ret = java_util_zip_Deflater_getTotalOut(_P_[0].p);
	return_int(ret);
}
示例#9
0
/* SYMBOL: java_lang_Float_floatToIntBits(F)I */
void
Kaffe_java_lang_Float_floatToIntBits_stub(stack_item* _P_, stack_item* _R_)
{
	extern jint java_lang_Float_floatToIntBits(jfloat);
	jint ret = java_lang_Float_floatToIntBits(_P_[0].f);
	return_int(ret);
}
示例#10
0
/* SYMBOL: java_io_ObjectInputStream_invokeObjectReader(Ljava/lang/Object;Ljava/lang/Class;)Z */
void
Kaffe_java_io_ObjectInputStream_invokeObjectReader_stub(stack_item* _P_, stack_item* _R_)
{
	extern jbool java_io_ObjectInputStream_invokeObjectReader(void*, void*, void*);
	jbool ret = java_io_ObjectInputStream_invokeObjectReader(_P_[2].p, _P_[1].p, _P_[0].p);
	return_int(ret);
}
示例#11
0
/* SYMBOL: java_lang_Class_isPrimitive()Z */
void
Kaffe_java_lang_Class_isPrimitive_stub(stack_item* _P_, stack_item* _R_)
{
	extern jbool java_lang_Class_isPrimitive(void*);
	jbool ret = java_lang_Class_isPrimitive(_P_[0].p);
	return_int(ret);
}
示例#12
0
/* SYMBOL: java_lang_Class_isInstance(Ljava/lang/Object;)Z */
void
Kaffe_java_lang_Class_isInstance_stub(stack_item* _P_, stack_item* _R_)
{
	extern jbool java_lang_Class_isInstance(void*, void*);
	jbool ret = java_lang_Class_isInstance(_P_[1].p, _P_[0].p);
	return_int(ret);
}
示例#13
0
/* SYMBOL: java_lang_Class_isAssignableFrom(Ljava/lang/Class;)Z */
void
Kaffe_java_lang_Class_isAssignableFrom_stub(stack_item* _P_, stack_item* _R_)
{
	extern jbool java_lang_Class_isAssignableFrom(void*, void*);
	jbool ret = java_lang_Class_isAssignableFrom(_P_[1].p, _P_[0].p);
	return_int(ret);
}
示例#14
0
/* SYMBOL: java_util_zip_Inflater_getAdler()I */
void
Kaffe_java_util_zip_Inflater_getAdler_stub(stack_item* _P_, stack_item* _R_)
{
	extern jint java_util_zip_Inflater_getAdler(void*);
	jint ret = java_util_zip_Inflater_getAdler(_P_[0].p);
	return_int(ret);
}
示例#15
0
/* SYMBOL: java_lang_Class_getModifiers()I */
void
Kaffe_java_lang_Class_getModifiers_stub(stack_item* _P_, stack_item* _R_)
{
	extern jint java_lang_Class_getModifiers(void*);
	jint ret = java_lang_Class_getModifiers(_P_[0].p);
	return_int(ret);
}
示例#16
0
文件: Invoke.c 项目: Flameeyes/jffi
/*
 * Class:     com_kenai_jffi_Foreign
 * Method:    invokeArrayInt32
 * Signature: (J[B)I
 */
JNIEXPORT jint JNICALL
Java_com_kenai_jffi_Foreign_invokeArrayReturnInt(JNIEnv* env, jclass self, jlong ctxAddress,
        jbyteArray paramBuffer)
{
    FFIValue retval;
    invokeArray(env, ctxAddress, paramBuffer, &retval);
    return_int(retval);
}
示例#17
0
文件: Invoke.c 项目: Flameeyes/jffi
/*
 * Class:     com_kenai_jffi_Foreign
 * Method:    invokeArrayWithObjectsInt32
 * Signature: (J[B[I[Ljava/lang/Object;)I
 */
JNIEXPORT jint JNICALL
Java_com_kenai_jffi_Foreign_invokeArrayWithObjectsInt32(JNIEnv* env, jobject self,
        jlong ctxAddress, jbyteArray paramBuffer, jint objectCount, jintArray objectInfo, jobjectArray objectArray)
{
    FFIValue retval;
    invokeArrayWithObjects(env, ctxAddress, paramBuffer, objectCount, objectInfo, objectArray, &retval);
    return_int(retval);
}
示例#18
0
文件: Invoke.c 项目: Flameeyes/jffi
/*
 * Class:     com_kenai_jffi_Foreign
 * Method:    invokeArrayO1Int32
 * Signature: (J[BILjava/lang/Object;I)I
 */
JNIEXPORT jint JNICALL
Java_com_kenai_jffi_Foreign_invokeArrayO1Int32(JNIEnv* env, jobject self, jlong ctxAddress,
        jbyteArray paramBuffer, jobject o1, jint o1info, jint o1off, jint o1len)
{
    FFIValue retval;
    jint info[] = { o1info, o1off, o1len };
    jobject objects[] = { o1 };
    invokeArrayWithObjects_(env, ctxAddress, paramBuffer, 1, info, objects, &retval);
    return_int(retval);
}
示例#19
0
void iso9660::load_ptb(int offset,unsigned char *r_array)
{
  

  
  pt.len_di=r_array[0+offset];
  //disp1.printf("\nLength of Directory identifier ");
  //disp1.printf("%x",pt.len_di);
  
  pt.ext_attr_len=r_array[1+offset];
  //disp1.printf("\nExtented attribute record ");
  //disp1.printf("%x",pt.ext_attr_len);
  
  pt.loc_ext=return_int (r_array,2+offset,0);
  //disp1.printf("\nLocation of extent ");
  //disp1.printf("%x",pt.loc_ext);
  
  pt.par_dir_no=two_return_int (r_array,6+offset,0);
  //disp1.printf("\nParent Diectory no  ");
  //disp1.printf("%x",pt.par_dir_no);
  
  //disp1.printf("\nDirectory identifier ");
  for(int i=0;i<pt.len_di;++i)
    {
      pt.dir_id[i]=r_array[8+offset+i];
      //  disp1.printf("%c",pt.dir_id[i]);
    }
  
  //disp1.printf("\nPadding field ");
  for(int i=0;i<pt.len_di;++i)
    {
      pt.pad_fld[i]=r_array[8+offset+pt.len_di+i];
      //disp1.printf("%c",pt.pad_fld[i]);
      
    }
  
  
}
示例#20
0
文件: x86.c 项目: mlevin2/snippets
int main(int argc, char **argv)
{
  printf("%d\n", return_int());
  return 0;
}
示例#21
0
iso9660::iso9660(drive *d)
{
  

  unsigned char bf[2048];
  int i,count;
  drv = d;
  drv->pioread(64,4,bf);
  pr.vdt=bf[0];
  pr.si[0]=bf[1];
  pr.si[1]=bf[2];
  pr.si[2]=bf[3];
  pr.si[3]=bf[4];
  pr.si[4]=bf[5];
  if(pr.si[0]=='C' && pr.si[1]=='D' && pr.si[2]=='0' && pr.si[3]=='0' && pr.si[4]=='1' && pr.vdt==1)
    disp1.printf("\nIso9660 file system detected\n");
  else
    {
      disp1.printf("\nUnknown file system\n");
	return;
    }
  //disp1.printf("\nsystem identifier ");
  for(i=0;i<32;++i)
    {
      //disp1.printf("%c",bf[8+i]);
      pr.sid[i]=bf[8+i];
    }
  //disp1.printf("\nvolume identifier ");
  
  for(i=0;i<32;++i)
    {
      //disp1.printf("%c",bf[40+i]);
      pr.vid[i]=bf[40+i];
    }
  //disp1.printf("\nvolume space size ");
  pr.vss=return_int (bf,84,1);
  //disp1.printf("%x",pr.vss);
  
  //disp1.printf("\nvolume set size  ");
  
  pr.vsts=two_return_int (bf,122,1);
  //disp1.printf("%x",pr.vsts);
  
  
  
  //disp1.printf("\nvolume seq number ");
  
  pr.vsn=two_return_int (bf,126,1);
  //disp1.printf("%x",pr.vsn);
  
  //disp1.printf("\nlogical block size ");
  
  pr.lbs=two_return_int (bf,130,1);
  //disp1.printf(" %x",pr.lbs);
  
  //disp1.printf("\npath table size ");

  pr.pts=return_int (bf,136,1);
  //disp1.printf("%x",pr.pts);
  
  //disp1.printf("\nlocation of l path table ");
  
  pr.lptb=return_int (bf,140,0);
  //disp1.printf("%x",pr.lptb);

  //disp1.printf("\nlocation of m path table ");
  
  pr.mptb=return_int (bf,148,1);
  //disp1.printf("%x",pr.mptb);
  
  //disp1.printf("\nroot directory record ");
  
  for(i=0;i<34;++i)
    {
      //disp1.printf("%x",bf[156+i]);
      pr.rdr[i]=bf[156+i];
    }
  load_rdr(0,pr.rdr);
  //disp1.printf("\nApplication identifier ");
  
  for(i=0;i<128;++i)
    {
//disp1.printf("%c",bf[574+i]);
      pr.apid[i]=bf[574+i];
    }
  //disp1.printf("\ndate and time of volume creation ");
  
for(i=0;i<16;++i)
  {
    //disp1.printf("%c",bf[813+i]);
    pr.vdnt[i]=bf[813+i];
  }
//disp1.printf("\ndate and time of volume modification ");
 
 for(i=0;i<16;++i)
   {
     //disp1.printf("%c",bf[830+i]);
     pr.mdnt[i]=bf[830+i];
   }
 //disp1.printf("\nEf	fective date and time of volume ");
 
 for(i=0;i<16;++i)
   {
     //disp1.printf("%c",bf[864+i]);
     pr.ednt[i]=bf[864+i];
   }
 
////////////////////////////////////////////////////////////////////////////////////////
 
 
}
示例#22
0
//  - AnyStructOrClass* (handled as an opaque pointer)

function_entry MRP_DoublePointer("double", "double,double", "n1,n2", [](params) {
	double* n1 = (in)arg[0];
	double* n2 = (in)arg[1];

	return_double(*n1 + *n2);
},
"add two numbers"
);

function_entry MRP_IntPointer("int", "int,int", "n1,n2", [](params) {
	int* n1 = (in)arg[0];
	int* n2 = (in)arg[1];

	return_int(*n1+*n2);
},
"add two numbers"
);

std::unordered_set<void*> g_active_mrp_arrays;

function_entry MRP_CreateArray("MRP_Array*", "int", "size", [](params) {
	char buf[256];
	int* arrsize = (in)arg[0];
	std::vector<double>* ret;
	try
	{
		ret = new std::vector<double>(*arrsize);
		g_active_mrp_arrays.insert((void*)ret);
		return (void*)ret;