diff options
author | John Ankarström <john@ankarstrom.se> | 2022-06-06 00:24:13 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-06-06 00:24:13 +0200 |
commit | c50bade7dd390784454e44a54a6bcac515d80531 (patch) | |
tree | 95ac44bfbb5d9992212b4d17531e9de5b238314c /c/pl.c | |
parent | f9dc17e285b5d3100d3eb6dc80a38a621fafe1ae (diff) | |
download | EpisodeBrowser-c50bade7dd390784454e44a54a6bcac515d80531.tar.gz |
Add basic threading support.
It is much easier to implement on the Prolog side than on the C
side... :-)
Diffstat (limited to 'c/pl.c')
-rw-r--r-- | c/pl.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -58,6 +58,13 @@ Plpv(term_t t, char *szFmt, va_list vl) if (!PL_put_integer(t+i, x)) return 0; break; } + case 'A': + { + atom_t x; + x = va_arg(vl, atom_t); + if (!PL_put_atom(t+i, x)) return 0; + break; + } case 'S': { atom_t a; @@ -70,6 +77,9 @@ Plpv(term_t t, char *szFmt, va_list vl) case 'i': va_arg(vl, int *); break; + case 'a': + va_arg(vl, atom_t *); + break; case 's': va_arg(vl, char **); break; @@ -102,6 +112,13 @@ Plgv(term_t t, char *szFmt, va_list vl) if (!PL_get_integer(t+i, lp)) return 0; break; } + case 'a': + { + atom_t *lp; + lp = va_arg(vl, atom_t *); + if (!PL_get_atom(t+i, lp)) return 0; + break; + } case 's': { char **lp; @@ -112,6 +129,9 @@ Plgv(term_t t, char *szFmt, va_list vl) case 'I': va_arg(vl, int); break; + case 'A': + va_arg(vl, atom_t); + break; case 'S': va_arg(vl, char *); break; |