aboutsummaryrefslogtreecommitdiff
path: root/c/defs.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-06-02 12:38:41 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-06-02 12:38:41 +0200
commitf9dc17e285b5d3100d3eb6dc80a38a621fafe1ae (patch)
tree34af8ea1b4272ee92db8cedb220accfa21baf663 /c/defs.h
parentabb7f3552bf4d4f7ceecd27a1acd344b45ec2454 (diff)
downloadEpisodeBrowser-f9dc17e285b5d3100d3eb6dc80a38a621fafe1ae.tar.gz
Add Plp, Plg functions.
Diffstat (limited to 'c/defs.h')
-rw-r--r--c/defs.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/c/defs.h b/c/defs.h
index 2b4e0ba..8196a93 100644
--- a/c/defs.h
+++ b/c/defs.h
@@ -3,6 +3,7 @@
#include <windows.h>
#include <commctrl.h>
+#include <SWI-Prolog.h>
/* common.c */
TCHAR *TszFromSz(const char *, int);
@@ -32,6 +33,8 @@ void DlvShowEpisode(int);
/* pl.c */
int Pl(char *, char *, char *, ...);
+int Plp(term_t, char *, ...);
+int Plg(term_t, char *, ...);
/* defs.h */
#define DLVSIKEY 0
@@ -40,18 +43,6 @@ int Pl(char *, char *, char *, ...);
#define ELVSITITLE 1
#define ELVSIRATING 2
-#define P(m,p,a,t) if (!PL_call_predicate(NULL, PL_Q_NORMAL, \
- PL_predicate(p,a,m), t))
-#define Q(m,p,a,t) PL_open_query(NULL, PL_Q_NORMAL, PL_predicate(p,a,m), t)
-#define Qn(q) PL_next_solution(q)
-#define Qc(q) PL_cut_query(q)
-#define T(a) PL_new_term_refs(a)
-#define A(s) PL_new_atom(s)
-#define PA(t,x) if (!PL_put_atom(t,x))
-#define PI(t,x) if (!PL_put_integer(t,x))
-#define GI(t,x) if (!PL_get_integer(t,x))
-#define GAC(t,x) if (!PL_get_atom_chars(t,x))
-
inline int
Cmp(int a, int b)
{