YAP 7.1.0
load_none.c
1/*************************************************************************
2* *
3* YAP Prolog *
4* *
5* Yap Prolog was developed at NCCUP - Universidade do Porto *
6* *
7* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
8* *
9**************************************************************************
10* *
11* File: load_none.c *
12* comments: dummy dynamic loaderr of external routines *
13*************************************************************************/
14
15#include "Yap.h"
16#include "Foreign.h"
17#include "Yatom.h"
18#include "YapHeap.h"
19#ifdef HAVE_STRING_H
20#include <string.h>
21#endif
22
23#ifdef NO_DYN
24
25/*
26 * YAP_FindExecutable(argv[0]) should be called on yap initialization to
27 * locate the executable of Yap
28*/
29char *
30Yap_FindExecutable(void)
31{
32 return NULL;
33}
34
35
36/*
37 * LoadForeign(file_name,proc_name,init_proc) dynamically loads a foreign
38 * code file and locates an initialization routine
39*/
40static Int
41LoadForeign(StringList ofiles, StringList libs,
42 char *proc_name, YapInitProc *init_proc)
43{
44 strcpy(LOCAL_ErrorSay,"load_foreign not supported in this version of Yap");
45 return LOAD_FAILLED;
46}
47
48void *
49Yap_LoadForeignFile(char *file, int flags)
50{
51 /* not implemented */
52 return NULL;
53}
54
55int
56Yap_CallForeignFile(void *handle, char *f)
57{
58 return FALSE;
59}
60
61int
62Yap_CloseForeignFile(void *handle)
63{
64 return -1;
65}
66
67
68Int
69Yap_LoadForeign(StringList ofiles, StringList libs,
70 char *proc_name, YapInitProc *init_proc)
71{
72 return(LoadForeign(ofiles,libs, proc_name, init_proc));
73}
74
75void
76Yap_ShutdownLoadForeign(void)
77{
78}
79
80Int
81Yap_ReLoadForeign(StringList ofiles, StringList libs,
82 char *proc_name, YapInitProc *init_proc)
83{
84 return(LoadForeign(ofiles,libs, proc_name, init_proc));
85}
86
87#endif
88
load_foreign_files/3 has works for the following configurations:
Main definitions.