From f9dc17e285b5d3100d3eb6dc80a38a621fafe1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 2 Jun 2022 12:38:41 +0200 Subject: Add Plp, Plg functions. --- c/datalistview.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'c/datalistview.c') diff --git a/c/datalistview.c b/c/datalistview.c index 5335b27..fbb46d0 100644 --- a/c/datalistview.c +++ b/c/datalistview.c @@ -46,17 +46,17 @@ DlvShowEpisode(int iEpisode) lviKey.mask = LVIF_TEXT; lviValue.mask = LVIF_TEXT; - t = T(3); - PI(t,iEpisode) return; - q = Q("episode_data","episode_datum",3,t); + t = PL_new_term_refs(3); + if (!Plp(t,"I",iEpisode)) return; + q = PL_open_query(NULL, PL_Q_NORMAL, + PL_predicate("episode_datum", 3, "episode_data"), t); - for (i = 0; Qn(q); i++) { + for (i = 0; PL_next_solution(q); i++) { char *szKey; char *szValue; TCHAR *tszKey, *tszValue; - GAC(t+1,&szKey) continue; - GAC(t+2,&szValue) continue; + if (!Plg(t+1,"ss",&szKey,&szValue)) continue; tszKey = TszFromSz(szKey, CP_UTF8); if (!tszKey) continue; @@ -78,7 +78,7 @@ DlvShowEpisode(int iEpisode) c: free(tszKey); } - Qc(q); + PL_cut_query(q); UpdateLayout(); lvfi.flags = LVFI_PARAM; -- cgit v1.2.3