NEURON
dll.cpp File Reference
#include <../../nrnconf.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <setjmp.h>
#include <math.h>
#include <io.h>
#include <assert.h>
#include "coff.h"
#include "limits.h"
#include "dll.h"
#include "nrnmath.h"
#include "nrnmech.h"

Go to the source code of this file.

Classes

struct  Symtab
 
struct  dll_s
 

Macros

#define __attribute__(arg)
 
#define CYGWIN   1
 
#define PRINT   0
 
#define PRDEBUG   printf(
 
#define MKDLL(a, b)   extern void b();
 
#define DFMKDLL(a, b)   extern double b();
 
#define DFMKDLL1(a, b)
 
#define DFMKDLL2(a, b)
 
#define DMKDLL(a, b)   extern double b;
 
#define IMKDLL(a, b)   extern int b;
 
#define MKDLLdec(a, b)
 
#define MKDLLvpf(a, b)   extern void* b();
 
#define MKDLLvp(a, b)   extern void* b;
 
#define MKDLLif(a, b)   extern int b();
 
#define MKDLL(a, b)   dll_register(a, (void*)b);
 
#define DFMKDLL(a, b)   dll_register(a, (void*)b);
 
#define DFMKDLL1(a, b)   dll_registerdf1(a, b);
 
#define DFMKDLL2(a, b)   dll_registerdf2(a, b);
 
#define DMKDLL(a, b)   dll_register(a, (void*)(&b));
 
#define IMKDLL(a, b)   DMKDLL(a,b)
 
#define MKDLLdec(a, b)   MKDLL(a, b)
 
#define MKDLLvpf(a, b)   MKDLL(a,b)
 
#define MKDLLif(a, b)   MKDLL(a,b)
 
#define MKDLLvp(a, b)   DMKDLL(a,b)
 

Typedefs

typedef void(* CDTOR) ()
 

Functions

char * dllstrdup (const char *s)
 
static void dll_exitfunc (void)
 
void dll_register (char *Psymbol, void *Paddress)
 
static void dll_registerdf1 (char *Psymbol, double(*Paddress)(double))
 
static void dll_registerdf2 (char *Psymbol, double(*Paddress)(double, double))
 
void dll_init (char *argv0)
 
char * find_file (char *fn)
 
struct DLL * dll_load (char *filename)
 
struct DLL * dll_force_load (char *filename)
 
void dll_unload (struct DLL *Pdll)
 
voiddll_lookup (struct DLL *Pdll, char *name)
 

Variables

struct {
   int   val
 
   char *   name
 
flags []
 
struct {
   int   val
 
   char *   name
 
sflags []
 
static char * dll_argv0 = 0
 
static Symtablocal_symtab = 0
 
static Symtabcommon_symtab = 0
 

Macro Definition Documentation

◆ __attribute__

#define __attribute__ (   arg)

Definition at line 14 of file dll.cpp.

◆ CYGWIN

#define CYGWIN   1

Definition at line 17 of file dll.cpp.

◆ DFMKDLL [1/2]

#define DFMKDLL (   a,
 
)    extern double b();

Definition at line 218 of file dll.cpp.

◆ DFMKDLL [2/2]

#define DFMKDLL (   a,
 
)    dll_register(a, (void*)b);

Definition at line 218 of file dll.cpp.

◆ DFMKDLL1 [1/2]

#define DFMKDLL1 (   a,
 
)

Definition at line 219 of file dll.cpp.

◆ DFMKDLL1 [2/2]

#define DFMKDLL1 (   a,
 
)    dll_registerdf1(a, b);

Definition at line 219 of file dll.cpp.

◆ DFMKDLL2 [1/2]

#define DFMKDLL2 (   a,
 
)

Definition at line 220 of file dll.cpp.

◆ DFMKDLL2 [2/2]

#define DFMKDLL2 (   a,
 
)    dll_registerdf2(a, b);

Definition at line 220 of file dll.cpp.

◆ DMKDLL [1/2]

#define DMKDLL (   a,
 
)    extern double b;

Definition at line 221 of file dll.cpp.

◆ DMKDLL [2/2]

#define DMKDLL (   a,
 
)    dll_register(a, (void*)(&b));

Definition at line 221 of file dll.cpp.

◆ IMKDLL [1/2]

#define IMKDLL (   a,
 
)    extern int b;

Definition at line 222 of file dll.cpp.

◆ IMKDLL [2/2]

#define IMKDLL (   a,
 
)    DMKDLL(a,b)

Definition at line 222 of file dll.cpp.

◆ MKDLL [1/2]

#define MKDLL (   a,
 
)    extern void b();

Definition at line 217 of file dll.cpp.

◆ MKDLL [2/2]

#define MKDLL (   a,
 
)    dll_register(a, (void*)b);

Definition at line 217 of file dll.cpp.

◆ MKDLLdec [1/2]

#define MKDLLdec (   a,
 
)

Definition at line 223 of file dll.cpp.

◆ MKDLLdec [2/2]

#define MKDLLdec (   a,
 
)    MKDLL(a, b)

Definition at line 223 of file dll.cpp.

◆ MKDLLif [1/2]

#define MKDLLif (   a,
 
)    extern int b();

Definition at line 226 of file dll.cpp.

◆ MKDLLif [2/2]

#define MKDLLif (   a,
 
)    MKDLL(a,b)

Definition at line 226 of file dll.cpp.

◆ MKDLLvp [1/2]

#define MKDLLvp (   a,
 
)    extern void* b;

Definition at line 225 of file dll.cpp.

◆ MKDLLvp [2/2]

#define MKDLLvp (   a,
 
)    DMKDLL(a,b)

Definition at line 225 of file dll.cpp.

◆ MKDLLvpf [1/2]

#define MKDLLvpf (   a,
 
)    extern void* b();

Definition at line 224 of file dll.cpp.

◆ MKDLLvpf [2/2]

#define MKDLLvpf (   a,
 
)    MKDLL(a,b)

Definition at line 224 of file dll.cpp.

◆ PRDEBUG

#define PRDEBUG   printf(

Definition at line 61 of file dll.cpp.

◆ PRINT

#define PRINT   0

Definition at line 60 of file dll.cpp.

Typedef Documentation

◆ CDTOR

typedef void(* CDTOR) ()

Definition at line 70 of file dll.cpp.

Function Documentation

◆ dll_exitfunc()

static void dll_exitfunc ( void  )
static

Definition at line 191 of file dll.cpp.

◆ dll_force_load()

struct DLL* dll_force_load ( char *  filename)

Definition at line 352 of file dll.cpp.

◆ dll_init()

void dll_init ( char *  argv0)

Definition at line 245 of file dll.cpp.

◆ dll_load()

struct DLL* dll_load ( char *  filename)

Definition at line 330 of file dll.cpp.

◆ dll_lookup()

void* dll_lookup ( struct DLL *  Pdll,
char *  name 
)

Definition at line 733 of file dll.cpp.

◆ dll_register()

void dll_register ( char *  Psymbol,
void Paddress 
)

Definition at line 197 of file dll.cpp.

◆ dll_registerdf1()

static void dll_registerdf1 ( char *  Psymbol,
double(*)(double)  Paddress 
)
static

Definition at line 209 of file dll.cpp.

◆ dll_registerdf2()

static void dll_registerdf2 ( char *  Psymbol,
double(*)(double, double)  Paddress 
)
static

Definition at line 213 of file dll.cpp.

◆ dll_unload()

void dll_unload ( struct DLL *  Pdll)

Definition at line 700 of file dll.cpp.

◆ dllstrdup()

char* dllstrdup ( const char *  s)

Definition at line 39 of file dll.cpp.

◆ find_file()

char* find_file ( char *  fn)

Definition at line 285 of file dll.cpp.

Variable Documentation

◆ common_symtab

Symtab* common_symtab = 0
static

Definition at line 189 of file dll.cpp.

◆ dll_argv0

char* dll_argv0 = 0
static

Definition at line 187 of file dll.cpp.

◆ flags

struct { ... } flags[]
Initial value:
= {
F_RELFLG, "REL",
F_EXEC, "EXEC",
F_LNNO, "LNNO",
F_LSYMS, "LSYMS",
0, 0
}
#define F_EXEC
Definition: coff.h:25
#define F_LSYMS
Definition: coff.h:27
#define F_LNNO
Definition: coff.h:26
#define F_RELFLG
Definition: coff.h:24

◆ local_symtab

Symtab* local_symtab = 0
static

Definition at line 188 of file dll.cpp.

◆ name

char* name

Definition at line 168 of file dll.cpp.

◆ sflags

struct { ... } sflags[]
Initial value:
= {
STYP_TEXT, "text",
STYP_DATA, "data",
STYP_BSS, "bss",
0, 0
}
#define STYP_TEXT
Definition: coff.h:108
#define STYP_DATA
Definition: coff.h:109
#define STYP_BSS
Definition: coff.h:110

◆ val

int val

Definition at line 167 of file dll.cpp.