diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-20 13:05:27 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-20 13:05:27 +0300 |
commit | 2bf7460851d3d03274d1b5f979b943cb00f1813e (patch) | |
tree | 70533c308dd6e2376e72753859120ea1a8d29ae0 /src/cgi-bin/conj.scm4 | |
parent | b56552e3260023593a3bf80315edf0f069eebac1 (diff) | |
download | ellinika-2bf7460851d3d03274d1b5f979b943cb00f1813e.tar.gz ellinika-2bf7460851d3d03274d1b5f979b943cb00f1813e.tar.bz2 |
Improve coupling between dict and conj.
* po/pl.po: Update
* src/cgi-bin/conj.scm4: Use cgi-program-name to generate
references to dict.
* src/cgi-bin/dict.scm4: Add a reference to conjugator (for verbs).
* src/ellinika/Makefile.am: Define SCRIP_SUFFIX
* src/ellinika/cgi.scm4 (cgi-program-name): New function.
* style.css: Update.
Diffstat (limited to 'src/cgi-bin/conj.scm4')
-rw-r--r-- | src/cgi-bin/conj.scm4 | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/cgi-bin/conj.scm4 b/src/cgi-bin/conj.scm4 index 72da00e..fec7eca 100644 --- a/src/cgi-bin/conj.scm4 +++ b/src/cgi-bin/conj.scm4 @@ -245,11 +245,6 @@ ifelse(IFACE,[CGI],(cgi:init)) result) (return #f)))) -(define (dict-cgi-name) - (let* ((my-name cgi-script-name) - (slpos (string-rindex my-name #\/))) - (string-append (substring my-name 0 slpos) "/dict.SCRIPT_SUFFIX"))) - (define (show-conjugation verb) (catch #t (lambda () @@ -266,7 +261,7 @@ ifelse(IFACE,[CGI],(cgi:init)) ((and descr (not (null? descr))) (format #t "<h2 class=\"verb\"><a href=\"~A\">~A - ~A</a></h2>" (make-cgi-name - (dict-cgi-name) "ident" (dict:encode-string verb)) + (cgi-program-name "dict") "ident" (dict:encode-string verb)) verb (caar descr))) (else (format #t @@ -328,7 +323,7 @@ ifelse(IFACE,[CGI],(cgi:init)) "SELECT DISTINCT word\ FROM dict\ WHERE sound LIKE ~Q\ - AND (pos & 1048576) = 1048576 ORDER BY 1" + AND (pos & 1048576) <> 0 ORDER BY 1" (ellinika:sounds-like key)))) (cond ((null? result) |