aboutsummaryrefslogtreecommitdiff
path: root/src/cgi-bin/conj.scm4
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgi-bin/conj.scm4')
-rw-r--r--src/cgi-bin/conj.scm43
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cgi-bin/conj.scm4 b/src/cgi-bin/conj.scm4
index fec7eca..8c5e317 100644
--- a/src/cgi-bin/conj.scm4
+++ b/src/cgi-bin/conj.scm4
@@ -319,24 +319,26 @@ ifelse(IFACE,[CGI],(cgi:init))
(display "</a>"))
(define (show-best-matches key)
(let ((result (ellinika:sql-query
"SELECT DISTINCT word\
FROM dict\
WHERE sound LIKE ~Q\
AND (pos & 1048576) <> 0 ORDER BY 1"
(ellinika:sounds-like key))))
(cond
((null? result)
(search-failure key))
+ ((= (length result) 1)
+ (show-conjugation (caar result)))
(else
(format #t
"<div class=\"error\"><p>~A</p></div>"
(_ "Στην λέξη εισαγωγής δεν υπάρχει τόνος. Μήπος θέλατε να κλίσετε ένα απ'αυτά τα ρήματα:"))
(display "<table width=\"100%\" class=\"noframe\">")
(let* ((result-length (length result))
(lim (1+ (quotient result-length match-list-columns))))
(do ((i 0 (1+ i)))
((= i lim) #f)
(display "<tr>")
(do ((j i (+ j lim)))
((>= j result-length) #f)
@@ -398,24 +400,25 @@ ifelse(IFACE,[CGI],(cgi:init))
(cond
((string=? name "lang"))
(else
(let ((v (cgi:value name)))
(cond ((and v (not (string-null? v)))
(display "&amp;")
(display name)
(display "=")
(display v)))))))
(cgi:names))))
(cons "@@conj@@"
(lambda ()
+ (format #t "<!-- ~A -->" (environ))
(dict-connect)
(main-form)
(do-conj)
(if (not (null? unattested))
(footnotes)))))))
(do ((line (read-line) (read-line)))
((eof-object? line) #f)
(expand-template explist line)
(newline))
(ellinika:sql-disconnect))))

Return to:

Send suggestions and report system problems to the System administrator.