예제 #1
0
ret_t
cherokee_plugin_loader_load (cherokee_plugin_loader_t *loader,
			     const char               *modname)
{
#ifdef HAVE_RTLDGLOBAL
	return load_common (loader, modname, RTLD_GLOBAL);
#else
	return load_common (loader, modname, 0);
#endif
}
예제 #2
0
파일: vmload.c 프로젝트: Refandler/gentee
pvmfunc  STDCALL load_commonfunc( pubyte* input, pubyte* out, pubyte* end, puint size )
{
   pvmfunc  pfunc;
   pubyte   ptr = *input;
   uint     i;

   // Проверка на повторный вызов
   ptr = load_common( ptr, out, *size );
   *end = *input + _vm.isize;

   pfunc = ( pvmfunc )_vm.pmng->top;
   pfunc->vmo.flag |= GHRT_MAYCALL;
   pfunc->ret = load_var( &ptr, out, 1, size, 1 );
   pfunc->dwret = ( ubyte )(( povmtype )PCMD( pfunc->ret->type ))->stsize;
   pfunc->parcount = ( ubyte )load_bwd( &ptr );
   if ((uint)*out & 3 ) // Alignment
      *out += 4 - ( (uint)*out & 3 );

//   print("ret=%i %s %i\n", pfunc->ret->type,pfunc->vmo.name, pfunc->parcount );
   pfunc->params = load_var( &ptr, out, pfunc->parcount, size, 1 );
   
   for ( i = 0; i < pfunc->parcount; i++ )
   {
      pfunc->parsize += ( ubyte )((povmtype)PCMD( pfunc->params[i].type ))->stsize;//( ubyte )( *size >> 2 );
   }
//   print("%s ret = %i parsize = %i count = %i\n", 
//      pfunc->vmo.name, pfunc->ret->type, pfunc->parsize, pfunc->parcount );

   *input = ptr;

   return pfunc;
}   
예제 #3
0
ret_t
cherokee_plugin_loader_load_no_global (cherokee_plugin_loader_t *loader,
				       const char               *modname)
{
	return load_common (loader, modname, 0);
}
예제 #4
0
ret_t
http2d_plugin_loader_load_no_global (http2d_plugin_loader_t *loader,
				     const char             *modname)
{
	return load_common (loader, modname, 0);
}
예제 #5
0
void load_config_encode()
{
struct encodingoptions *point;
struct machine *pointm;
char filename[100];
char section[LONGOPT];
int have_config;

  sprintf(filename,"%s/%s/%s",getenv("HOME"),".studio", encodeconfigfile );
  if (0 == cfg_parse_file(filename))
    have_config = 1;

  point = &encoding; 
  set_structs_default(point);  /* set struct to the defaults */

  point = &encoding2;
  set_structs_default(point);  /* set struct to the defaults */
  do_preset_mpeg2(point);     /* set some mpeg2 specific options */

  point = &encoding_gmpeg;
  set_structs_default(point);  /* set struct to the defaults */
  do_preset_mpeg2(point);     /* set some mpeg2 specific options */

  point = &encoding_vcd;
  set_structs_default(point);  /* set struct to the defaults */
  do_preset_vcd(point);     /* set some VCD specific options */

  point = &encoding_svcd;
  set_structs_default(point);  /* set struct to the defaults */
  do_preset_svcd(point);     /* set some SVCD specific options */

  point = &encoding_dvd;
  set_structs_default(point);  /* set struct to the defaults */
  do_preset_dvd(point);     /* set some DVD specific options */

  point = &encoding_yuv2lav;
  set_structs_default(point);  /* set struct to the defaults */
  do_preset_yuv2lav(point);     /* set some DIVX specific options */

  set_distributed(); /*set the distributed encoding variabels to the defaults*/

  /* set the defaults for the scripting options */
  set_scripting_defaults ();

  set_common();
  load_common();
  
  if (verbose)
    show_common();

  strncpy(section,"MPEG1",LONGOPT);
  point = &encoding; 
  load_section(section,point);
  if (verbose) 
    print_encoding_options(section,point);

  strncpy(section,"MPEG2",LONGOPT);
  point = &encoding2; 
  load_section(section,point);
  if (verbose)
    print_encoding_options(section,point);

  strncpy(section,"GENERIC",LONGOPT);
  point = &encoding_gmpeg; 
  load_section(section,point);
  if (verbose)
    print_encoding_options(section,point);

  strncpy(section,"VCD",LONGOPT);
  point = &encoding_vcd; 
  load_section(section,point);
  if (verbose)
    print_encoding_options(section,point);

  strncpy(section,"SVCD",LONGOPT);
  point = &encoding_svcd; 
  load_section(section,point);
  if (verbose)
    print_encoding_options(section,point);

  strncpy(section,"DVD",LONGOPT);
  point = &encoding_dvd; 
  load_section(section,point);
  if (verbose)
    print_encoding_options(section,point);

  strncpy(section,"YUV2LAV",LONGOPT);
  point = &encoding_yuv2lav; 
  load_section(section,point);
  if (verbose)
    print_encoding_options(section,point);

  load_machine_names();  /* fill the GList with machine names */
  if (verbose)
    print_machine_names(); 
 
  strncpy(section,"Machines4MPEG1",LONGOPT);
  pointm = &machine4mpeg1; 
  load_machine_data(section, pointm);
  if (verbose)
    print_machine_data(section,pointm);

  strncpy(section,"Machines4MPEG2",LONGOPT);
  pointm = &machine4mpeg2; 
  load_machine_data(section, pointm);
  if (verbose)
    print_machine_data(section,pointm);

  strncpy(section,"Machines4GENERIC",LONGOPT);
  pointm = &machine4mpeg2; 
  load_machine_data(section, pointm);
  if (verbose)
    print_machine_data(section,pointm);

  strncpy(section,"Machines4VCD",LONGOPT);
  pointm = &machine4vcd; 
  load_machine_data(section, pointm);
  if (verbose)
    print_machine_data(section,pointm);

  strncpy(section,"Machines4SVCD",LONGOPT);
  pointm = &machine4svcd; 
  load_machine_data(section, pointm);
  if (verbose)
    print_machine_data(section,pointm);

  strncpy(section,"Machines4DVD",LONGOPT);
  pointm = &machine4svcd; 
  load_machine_data(section, pointm);
  if (verbose)
    print_machine_data(section,pointm);

  strncpy(section,"Machines4YUV2LAV",LONGOPT);
  pointm = &machine4yuv2lav; 
  load_machine_data(section, pointm);
  if (verbose)
    print_machine_data(section,pointm);

  load_script_data();

}
예제 #6
0
파일: vmload.c 프로젝트: Refandler/gentee
pvmobj  STDCALL load_type( pubyte* input )
{
   povmtype  ptype;
   pubyte    out;
   pubyte    ptr = *input;

   ptr = load_common( ptr, &out, sizeof( ovmtype ) );

   ptype = ( povmtype )_vm.pmng->top;
   ptype->size = 4;
   ptype->stsize = 1;
   ptype->index.type = 0;//TUint;

   if ( ptype->vmo.flag & GHTY_INHERIT )
   {
      povmtype inherit;
      
      ptype->inherit = load_convert( &ptr );
      inherit = ( povmtype )PCMD( ptype->inherit );
      // Наследуем index type от родителя
      ptype->index.type = inherit->index.type;
      ptype->index.oftype = inherit->index.oftype;
      ptype->ftype[ FTYPE_OFTYPE ] = inherit->ftype[ FTYPE_OFTYPE ];
   }
   if ( ptype->vmo.flag & GHTY_INDEX )
   {
      ptype->index.type = load_convert( &ptr );
      ptype->index.oftype = load_convert( &ptr );
   }
   if ( ptype->vmo.flag & GHTY_INITDEL )
   {
      ptype->ftype[ FTYPE_INIT ] = load_convert( &ptr );
      ptype->ftype[ FTYPE_DELETE ] = load_convert( &ptr );
   }
   if ( ptype->vmo.flag & GHTY_EXTFUNC )
   {
      ptype->ftype[ FTYPE_OFTYPE ] = load_convert( &ptr );
      ptype->ftype[ FTYPE_COLLECTION ] = load_convert( &ptr );
   }
   if ( ptype->vmo.flag & GHTY_ARRAY )
   {
      uint  i, dim = load_convert( &ptr );

      if ( dim <= MAX_MSR )
      {
         for ( i = 0; i < dim; i++ )
            ptype->ftype[ FTYPE_ARRAY + i ] = load_convert( &ptr );
      }
      else
         ptype->ftype[ FTYPE_ARRAY ] = dim;
   }
   ptype->count = load_bwd( &ptr );
   if ( ptype->vmo.flag & GHTY_STACK )
   {
      ptype->size = ptype->count;
      ptype->stsize = ptype->size > sizeof( uint ) ? 2 : 1;
      ptype->count = 0;
   }
   else
      if ( ptype->count )
      {
         ptype->children = load_var( &ptr, &out, ptype->count, &ptype->size, 0 );
      }
   
   load_addobj( 0 );
   vmmng_end( out );

//   print("id= %i name= %s s=%i/%i ind = %i\n", ptype->vmo.id, ptype->vmo.name, ptype->size, 
//          ptype->stsize, ptype->index.type );
   *input += _vm.isize;
   return ( pvmobj )ptype;
}