bridge/class-master/depend/pari/src/language/es.c
/* like dlopen, but using default(sopath) */
like dlopen, but using default(sopath)
like dlopen but using default ( sopath )
static void *
gp_dlopen(const char *name, int flag)
{
  void *handle;
  char *s;
  if (!name) return dlopen(NULL, flag);
  s = path_expand(name);
  if (!GP_DATA || *(GP_DATA->sopath->PATH)==0 || path_is_absolute(s))
    return try_dlopen(s, flag);
  else
  {
    forpath_t T;
    char *t;
    forpath_init(&T, GP_DATA->sopath, s);
    while ( (t = forpath_next(&T)) )
    {
      if ( (handle = try_dlopen(t,flag)) ) { pari_free(s); return handle; }
      (void)dlerror(); 
    }
    pari_free(s);
  }
  return NULL;
}
static void * gp_dlopen ( const char * name , int flag ) { void * handle ; char * s ; if ( ! name ) return dlopen ( NULL , flag ) ; s = path_expand ( name ) ; if ( ! GP_DATA || * ( GP_DATA -> sopath -> PATH ) == 0 || path_is_absolute ( s ) ) return try_dlopen ( s , flag ) ; else { forpath_t T ; char * t ; forpath_init ( & T , GP_DATA -> sopath , s ) ; while ( ( t = forpath_next ( & T ) ) ) { if ( ( handle = try_dlopen ( t , flag ) ) ) { pari_free ( s ) ; return handle ; } ( void ) dlerror ( ) ; } pari_free ( s ) ; } return NULL ; }
like dlopen, but using default(sopath)
like dlopen but using default ( sopath )
/* if sopath empty or path is absolute, use dlopen */ /* clear error message */