aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-14 17:23:17 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-14 17:23:17 +0200
commit31c03c4ddba65199c8c444c75b684b6cfaa629d9 (patch)
tree1fd87e10b7922e2a319aea760e5beb4cd6c12ab7 /README
parentbc96017fc19828f5b2ddba3429bca5e1bba91a1e (diff)
downloadEpisodeBrowser-31c03c4ddba65199c8c444c75b684b6cfaa629d9.tar.gz
Add pl.cpp to README.
Diffstat (limited to 'README')
-rw-r--r--README24
1 files changed, 12 insertions, 12 deletions
diff --git a/README b/README
index 489103e..e500352 100644
--- a/README
+++ b/README
@@ -30,23 +30,23 @@ Frontend
~~~~~~~~
The graphical interface is implemented in C++ using the Win32 API (see
the c folder). The source code is spread across a small number of
-files. For an overview of the functions provided by each file, see
-defs.h. In summary:
+files. For an overview of the classes/functions provided by each file,
+see defs.h. In summary:
main.cpp Entry point and initialization. Contains the main event handler.
listview.cpp Creates and handles the shared aspects of the two list views.
episodelistview.cpp Defines the interface to the episode list view.
datalistview.cpp Defines the interface to the data list view.
+pl.cpp Interface to Prolog backend.
common.cpp Some useful functions that don't fit elsewhere.
-The frontend interacts with the Prolog backend via the SWI-Prolog API.
-Note, however, that most interaction is done through ten or so macros,
-defined in defs.h, that make the code easier to write -- and read,
-once you're used to it.
+The C++ frontend communicates with the Prolog backend via a couple of
+variadic printf-like functions defined in pl.cpp. For example,
-Building
-~~~~~~~~
-Episode Browser is built with swipl-ld, which is installed with
-SWI-Prolog. It is a wrapper around a C compiler and linker, which in
-Episode Browser's case happens to be GCC. The author personally uses
-the MinGW toolchain conveniently included with Strawberry Perl.
+ Pl("episode_data","episode_title","Is",i,&sz)
+
+calls the Prolog predicate episode_data:episode_title/2. The first
+argument is an integer input, denoted by an uppercase I. The second
+argument is a zero-terminated string output, denoted by a lowercase s.
+Given i = 100, the call puts the title of episode 100 into the buffer
+pointed at by sz. For more information, see pl.cpp.