Back to index

texmacs  1.0.7.15
Functions
dynload.h File Reference
#include "scheme-private.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SCHEME_EXPORT pointer scm_load_ext (scheme *sc, pointer arglist)

Function Documentation

SCHEME_EXPORT pointer scm_load_ext ( scheme sc,
pointer  arglist 
)

Definition at line 90 of file dynload.c.

{
   pointer first_arg;
   pointer retval;
   char filename[MAXPATHLEN], init_fn[MAXPATHLEN+6];
   char *name;
   HMODULE dll_handle;
   void (*module_init)(scheme *sc);

   if ((args != sc->NIL) && is_string((first_arg = pair_car(args)))) {
      name = string_value(first_arg);
      make_filename(name,filename);
      make_init_fn(name,init_fn);
      dll_handle = dl_attach(filename);
      if (dll_handle == 0) {
         retval = sc -> F;
      }
      else {
         module_init = (void(*)(scheme *))dl_proc(dll_handle, init_fn);
         if (module_init != 0) {
            (*module_init)(sc);
            retval = sc -> T;
         }
         else {
            retval = sc->F;
         }
      }
   }
   else {
      retval = sc -> F;
   }

  return(retval);
}

Here is the call graph for this function:

Here is the caller graph for this function: