summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2015-01-10 07:27:21 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2015-01-10 07:27:21 (GMT)
commit2b99881a880d101ae32a94b3d1e0a792224cb74c (patch) (unidiff)
treebb5145ebea295ff16b9ebfdb8a4f7d8a5a0a592e
parent5dfd8dd432785ca8d8b6d2c11bac9e110feda52b (diff)
downloadellinika-2b99881a880d101ae32a94b3d1e0a792224cb74c.tar.gz
ellinika-2b99881a880d101ae32a94b3d1e0a792224cb74c.tar.bz2
Switch to guile-www-2.38
* am/guile.m4: Remove. * Makefile.am (install-html): Fix generation of symlinks * configure.ac: Fall back to info prefix, if guile-config info bindir returns empty string. * data/db.struct: Minor change * data/pl/Makefile.am: Add missing silent rule markers * data/ru/Makefile.am: Likewise. * scm/dictrans.scm: Call setlocale. * scm/neatrans.scm: Likewise. * scm/verbop.scm: Likewise. * src/cgi-bin/conj.scm4: Call setlocale. Use cgi:value-u8 instead of cgi:value-u8. * src/cgi-bin/dict.scm4: Likewise. * src/cgi-bin/nea.scm4: Likewise. * src/ellinika/cgi.scm4 (cgi-script-name) (cgi-server-hostname,cgi-server-protocol-name) (cgi-server-protocol-version): Define in CGI mode. (cgi:value-u8): New public function. * src/ellinika/i18n.scm: Conditionally use syncase.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile.am3
-rw-r--r--am/guile.m4110
-rw-r--r--configure.ac11
-rw-r--r--data/db.struct6
-rw-r--r--data/pl/Makefile.am4
-rw-r--r--data/ru/Makefile.am4
-rw-r--r--scm/dictrans.scm4
-rw-r--r--scm/neatrans.scm2
-rw-r--r--scm/verbop.scm4
-rw-r--r--src/cgi-bin/conj.scm49
-rw-r--r--src/cgi-bin/dict.scm428
-rw-r--r--src/cgi-bin/nea.scm422
-rw-r--r--src/ellinika/cgi.scm425
-rw-r--r--src/ellinika/i18n.scm6
-rw-r--r--xml/ru/ellinika.xml3
-rw-r--r--xml/ru/rhmata.xml8
16 files changed, 91 insertions, 158 deletions
diff --git a/Makefile.am b/Makefile.am
index 521b3e0..7fac923 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,7 +41,8 @@ install-html:
41 if test -r $$top_srcdir/xml/$$dir/symlinks; then \ 41 if test -r $$top_srcdir/xml/$$dir/symlinks; then \
42 grep -v '^[ \t]*[;#]' $$top_srcdir/xml/$$dir/symlinks | \ 42 grep -v '^[ \t]*[;#]' $$top_srcdir/xml/$$dir/symlinks | \
43 sed 's,^/,_,;s,\\.\\./,__/,g' | \ 43 sed 's,^/,_,;s,\\.\\./,__/,g' | \
44 while read S T; do ln -sf $$S $$T; done; \ 44 (cd $(DESTDIR)$(HTMLDIR)/$$dir; \
45 while read S T; do ln -sf $$S $$T; done); \
45 fi; \ 46 fi; \
46 cd $$here; \ 47 cd $$here; \
47 fi; \ 48 fi; \
diff --git a/am/guile.m4 b/am/guile.m4
deleted file mode 100644
index c793a70..0000000
--- a/am/guile.m4
+++ b/dev/null
@@ -1,110 +0,0 @@
1dnl This file is part of GNU mailutils.
2dnl Copyright (C) 2001,2004 Free Software Foundation, Inc.
3dnl
4dnl This program is free software; you can redistribute it and/or modify
5dnl it under the terms of the GNU General Public License as published by
6dnl the Free Software Foundation; either version 2 of the License, or
7dnl (at your option) any later version.
8dnl
9dnl This program is distributed in the hope that it will be useful,
10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12dnl GNU General Public License for more details.
13dnl
14dnl You should have received a copy of the GNU General Public License
15dnl along with this program; if not, write to the Free Software
16dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17dnl
18
19dnl MU_RESULT_ACTIONS -- generate shell code for the result of a test
20dnl $1 -- CVAR -- cache variable to check
21dnl $2 -- NAME -- if not empty, used to generate a default value TRUE:
22dnl `AC_DEFINE(HAVE_NAME)'
23dnl $2 -- TRUE -- what to do if the CVAR is not `no'
24dnl $3 -- FALSE -- what to do otherwise; defaults to `:'
25dnl
26AC_DEFUN([MU_RESULT_ACTIONS], [
27[if test "$$1" != "" -a "$$1" != no; then
28 ]ifelse([$3], ,
29 [AC_DEFINE(HAVE_]translit($2, [a-z ./<>], [A-Z___])[,1,[FIXME])],
30 [$3])[
31else
32 ]ifelse([$4], , [:], [$4])[
33fi]])dnl
34
35AC_DEFUN([MU_CHECK_GUILE],
36[
37 if test "x$mu_cv_lib_guile" = x; then
38 cached=""
39 AC_PATH_PROG(GUILE_CONFIG, guile-config, no, $PATH)
40 if test $GUILE_CONFIG = no; then
41 mu_cv_lib_guile=no
42 else
43 GUILE_INCLUDES=`guile-config compile`
44 GUILE_LIBS=`guile-config link`
45 fi
46
47 if test $GUILE_CONFIG != no; then
48 AC_MSG_CHECKING(for guile version 1.6 or higher)
49 GUILE_VERSION=`($GUILE_CONFIG --version 2>&1; echo '')|sed -n 's/guile-config - Guile version \([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\).*/\1\2/p'`
50 case "x$GUILE_VERSION" in
51 x[[0-9]]*)
52 if test $GUILE_VERSION -lt 16; then
53 AC_MSG_RESULT(Nope. Version number too low.)
54 mu_cv_lib_guile=no
55 else
56 AC_DEFINE_UNQUOTED(GUILE_VERSION, $GUILE_VERSION,
57 [Guile version number: MAX*10 + MIN])
58 AC_MSG_RESULT(OK)
59 save_LIBS=$LIBS
60 save_CFLAGS=$CFLAGS
61 LIBS="$LIBS $GUILE_LIBS"
62 CFLAGS="$CFLAGS $GUILE_INCLUDES"
63 AC_TRY_LINK([#include <libguile.h>],
64 ifelse([$1], , scm_shell(0, NULL);, [$1]),
65 [mu_cv_lib_guile=yes],
66 [mu_cv_lib_guile=no])
67 LIBS=$save_LIBS
68 CFLAGS=$save_CFLAGS
69 fi ;;
70 *) AC_MSG_RESULT(Nope. Unknown version number)
71 mu_cv_lib_guile=no;;
72 esac
73 fi
74 else
75 cached=" (cached) "
76 GUILE_INCLUDES=`$GUILE_CONFIG compile`
77 GUILE_LIBS=`$GUILE_CONFIG link`
78 fi
79 AC_MSG_CHECKING(whether to build guile support)
80 MU_RESULT_ACTIONS([mu_cv_lib_guile],[LIBGUILE],[$2],[$3])
81 AC_MSG_RESULT(${cached}$mu_cv_lib_guile)
82
83 if test $mu_cv_lib_guile = yes; then
84 AC_ARG_WITH([guiledir],
85 AC_HELP_STRING([--with-guiledir=DIR],
86 [Specify the directory to install guile modules to]),
87 [case $withval in
88 /*) GUILE_SITE=$withval;;
89 yes) GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`/site;;
90 *) AC_MSG_ERROR([Argument to --with-guiledir must be an absolute directory name]);;
91 esac],
92 [GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`/site
93 pfx=$prefix
94 test "x$pfx" = xNONE && pfx=$ac_default_prefix
95 case $GUILE_SITE in
96 $pfx/*) ;; # OK
97 *) AC_MSG_WARN([guile site directory "$GUILE_SITE" lies outside your current prefix ($pfx).])
98 GUILE_SITE='$(datadir)/guile/site'
99 AC_MSG_WARN([Falling back to ${GUILE_SITE} instead. Use --with-guiledir to force using site directory.])
100 ;;
101 esac])
102 fi
103
104 AC_SUBST(GUILE_SITE)
105 AC_SUBST(GUILE_INCLUDES)
106 AC_SUBST(GUILE_LIBS)
107])
108
109
110
diff --git a/configure.ac b/configure.ac
index e545dfa..302f2df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
17 17
18AC_PREREQ(2.61) 18AC_PREREQ(2.61)
19 19
20AC_REVISION(2015-01-06 14:33:57 gray) 20AC_REVISION(2015-01-07 14:56:15 gray)
21AC_INIT(ellinika, 1.99.99, [gray+ellinika@gnu.org.ua]) 21AC_INIT(ellinika, 1.99.99, [gray+ellinika@gnu.org.ua])
22AC_CONFIG_SRCDIR(src/cgi-bin/dict.scm4) 22AC_CONFIG_SRCDIR(src/cgi-bin/dict.scm4)
23AC_CONFIG_AUX_DIR([build-aux]) 23AC_CONFIG_AUX_DIR([build-aux])
@@ -58,7 +58,16 @@ LIBS="$LIBS $ra_cv_lib_mysqlclient"
58## ************** 58## **************
59 59
60AC_SUBST(GUILE_BINDIR) 60AC_SUBST(GUILE_BINDIR)
61
61GUILE_BINDIR=`guile-config info bindir` 62GUILE_BINDIR=`guile-config info bindir`
63if test -z "$GUILE_BINDIR"; then
64 GUILE_BINDIR=`guile-config info prefix`
65 if test -n "$GUILE_BINDIR"; then
66 GUILE_BINDIR="$GUILE_BINDIR/bin"
67 else
68 AC_MSG_ERROR([Cannot determine guile bin directory])
69 fi
70fi
62 71
63case `guile -c "(display (member \"$GUILE_SITE\" %load-path))(newline)"` in 72case `guile -c "(display (member \"$GUILE_SITE\" %load-path))(newline)"` in
64\#f) GUILE_COMMENT=;; 73\#f) GUILE_COMMENT=;;
diff --git a/data/db.struct b/data/db.struct
index 1b2f160..61e3d25 100644
--- a/data/db.struct
+++ b/data/db.struct
@@ -1,5 +1,5 @@
1-- This file is part of Ellinika 1-- This file is part of Ellinika
2-- Copyright (C) 2004, 2005, 2007 Sergey Poznyakoff 2-- Copyright (C) 2004, 2005, 2007, 2015 Sergey Poznyakoff
3-- 3--
4-- Ellinika is free software; you can redistribute it and/or modify 4-- Ellinika is free software; you can redistribute it and/or modify
5-- it under the terms of the GNU General Public License as published by 5-- it under the terms of the GNU General Public License as published by
@@ -160,5 +160,5 @@ CREATE TABLE newsart(
160 160
161---- 161----
162 162
163source dbverb.struct; 163source ./dbverb.struct;
164 \ No newline at end of file 164
diff --git a/data/pl/Makefile.am b/data/pl/Makefile.am
index 8707cf2..0965f9b 100644
--- a/data/pl/Makefile.am
+++ b/data/pl/Makefile.am
@@ -1,5 +1,5 @@
1# This file is part of Ellinika project. 1# This file is part of Ellinika project.
2# Copyright (C) 2004, 2007 Sergey Poznyakoff 2# Copyright (C) 2004, 2007, 2015 Sergey Poznyakoff
3# 3#
4# Ellinika is free software; you can redistribute it and/or modify 4# Ellinika is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -19,6 +19,6 @@ BASEXML=\
19 0.xml 19 0.xml
20 20
21dict: 21dict:
22 $(top_builddir)/scm/dictrans $(BASEXML) 22 $(AM_V_GEN)LC_ALL=en_US.UTF-8 $(top_builddir)/scm/dictrans $(BASEXML)
23 23
24 24
diff --git a/data/ru/Makefile.am b/data/ru/Makefile.am
index 18d1441..b8eb7c7 100644
--- a/data/ru/Makefile.am
+++ b/data/ru/Makefile.am
@@ -1,5 +1,5 @@
1# This file is part of Ellinika project. 1# This file is part of Ellinika project.
2# Copyright (C) 2004, 2007 Sergey Poznyakoff 2# Copyright (C) 2004, 2007, 2015 Sergey Poznyakoff
3# 3#
4# Ellinika is free software; you can redistribute it and/or modify 4# Ellinika is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -48,6 +48,6 @@ EXTRA_DIST=\
48 iliada/2.4.xml 48 iliada/2.4.xml
49 49
50dict: 50dict:
51 $(top_builddir)/scm/dictrans $(BASEXML) 51 $(AM_V_GEN)LC_ALL=en_US.UTF-8 $(top_builddir)/scm/dictrans $(BASEXML)
52 52
53 53
diff --git a/scm/dictrans.scm b/scm/dictrans.scm
index 2148929..9f1cfd5 100644
--- a/scm/dictrans.scm
+++ b/scm/dictrans.scm
@@ -2,7 +2,7 @@
2=AUTOGENERATED= 2=AUTOGENERATED=
3!# 3!#
4;;;; This file is part of Ellinika 4;;;; This file is part of Ellinika
5;;;; Copyright (C) 2004, 2005, 2007, 2010 Sergey Poznyakoff 5;;;; Copyright (C) 2004, 2005, 2007, 2010, 2015 Sergey Poznyakoff
6;;;; 6;;;;
7;;;; Ellinika is free software; you can redistribute it and/or modify 7;;;; Ellinika is free software; you can redistribute it and/or modify
8;;;; it under the terms of the GNU General Public License as published by 8;;;; it under the terms of the GNU General Public License as published by
@@ -93,6 +93,8 @@
93(if (= (string->number (major-version)) 1) 93(if (= (string->number (major-version)) 1)
94 (use-modules (ice-9 syncase))) 94 (use-modules (ice-9 syncase)))
95 95
96(setlocale LC_ALL "")
97
96(define compile-only #f) 98(define compile-only #f)
97(define cleanup-option #f) 99(define cleanup-option #f)
98(define preserve-option #f) 100(define preserve-option #f)
diff --git a/scm/neatrans.scm b/scm/neatrans.scm
index 333453f..4f0fea3 100644
--- a/scm/neatrans.scm
+++ b/scm/neatrans.scm
@@ -40,6 +40,8 @@
40(if (= (string->number (major-version)) 1) 40(if (= (string->number (major-version)) 1)
41 (use-modules (ice-9 syncase))) 41 (use-modules (ice-9 syncase)))
42 42
43(setlocale LC_ALL "")
44
43(define compile-only #f) 45(define compile-only #f)
44(define cleanup-option #f) 46(define cleanup-option #f)
45(define force-option #f) 47(define force-option #f)
diff --git a/scm/verbop.scm b/scm/verbop.scm
index 0ad0f90..b500213 100644
--- a/scm/verbop.scm
+++ b/scm/verbop.scm
@@ -4,7 +4,7 @@ main='(module-ref (resolve-module '\''(src verbop)) '\'main')'
4exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@" 4exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@"
5!# 5!#
6;;;; This file is part of Ellinika 6;;;; This file is part of Ellinika
7;;;; Copyright (C) 2011 Sergey Poznyakoff 7;;;; Copyright (C) 2011, 2015 Sergey Poznyakoff
8;;;; 8;;;;
9;;;; Ellinika is free software; you can redistribute it and/or modify 9;;;; Ellinika is free software; you can redistribute it and/or modify
10;;;; it under the terms of the GNU General Public License as published by 10;;;; it under the terms of the GNU General Public License as published by
@@ -31,6 +31,8 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@"
31 (ellinika tenses) 31 (ellinika tenses)
32 (ice-9 getopt-long)) 32 (ice-9 getopt-long))
33 33
34(setlocale LC_ALL "")
35
34(define cleanup-option #f) 36(define cleanup-option #f)
35(define force-option #f) 37(define force-option #f)
36(define debug-level 0) 38(define debug-level 0)
diff --git a/src/cgi-bin/conj.scm4 b/src/cgi-bin/conj.scm4
index 83fb846..6a49c62 100644
--- a/src/cgi-bin/conj.scm4
+++ b/src/cgi-bin/conj.scm4
@@ -1,5 +1,5 @@
1;;;; Greek Dictionary Web Engine 1;;;; Greek Dictionary Web Engine
2;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010, 2011 Sergey Poznyakoff 2;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010, 2011, 2015 Sergey Poznyakoff
3;;;; 3;;;;
4;;;; This program is free software; you can redistribute it and/or modify 4;;;; This program is free software; you can redistribute it and/or modify
5;;;; it under the terms of the GNU General Public License as published by 5;;;; it under the terms of the GNU General Public License as published by
@@ -18,6 +18,7 @@
18;;; Tailor this statement to your needs if necessary. 18;;; Tailor this statement to your needs if necessary.
19(set! %load-path (cons "GUILE_SITE" %load-path)) 19(set! %load-path (cons "GUILE_SITE" %load-path))
20 20
21(setlocale LC_ALL "")
21(use-modules ifelse(IFACE,[CGI],(www cgi),(guile-user)) 22(use-modules ifelse(IFACE,[CGI],(www cgi),(guile-user))
22 (srfi srfi-1) 23 (srfi srfi-1)
23 (ice-9 rdelim) 24 (ice-9 rdelim)
@@ -61,7 +62,7 @@ ifelse(IFACE,[CGI],(cgi:init))
61 </td> 62 </td>
62 <td> 63 <td>
63 <input size=\"36\" name=\"key\" tabindex=\"1\"") 64 <input size=\"36\" name=\"key\" tabindex=\"1\"")
64 (let ((value (cgi:value "key"))) 65 (let ((value (cgi:value-u8 "key")))
65 (if value 66 (if value
66 (begin 67 (begin
67 (display " value=\"") 68 (display " value=\"")
@@ -350,7 +351,7 @@ ifelse(IFACE,[CGI],(cgi:init))
350 351
351 352
352(define (do-conj) 353(define (do-conj)
353 (let ((keyval (cgi:value "key"))) 354 (let ((keyval (cgi:value-u8 "key")))
354 (if (and keyval (not (string-null? keyval))) 355 (if (and keyval (not (string-null? keyval)))
355 (let ((input (ellinika:translate-input 356 (let ((input (ellinika:translate-input
356 (let ((keyval keyval)) 357 (let ((keyval keyval))
@@ -400,7 +401,7 @@ ifelse(IFACE,[CGI],(cgi:init))
400 (cond 401 (cond
401 ((string=? name "lang")) 402 ((string=? name "lang"))
402 (else 403 (else
403 (let ((v (cgi:value name))) 404 (let ((v (cgi:value-u8 name)))
404 (cond ((and v (not (string-null? v))) 405 (cond ((and v (not (string-null? v)))
405 (display "&amp;") 406 (display "&amp;")
406 (display name) 407 (display name)
diff --git a/src/cgi-bin/dict.scm4 b/src/cgi-bin/dict.scm4
index 77c1b3a..3b24367 100644
--- a/src/cgi-bin/dict.scm4
+++ b/src/cgi-bin/dict.scm4
@@ -1,5 +1,5 @@
1;;;; Greek Dictionary Web Engine 1;;;; Greek Dictionary Web Engine
2;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010, 2011 Sergey Poznyakoff 2;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010, 2011, 2015 Sergey Poznyakoff
3;;;; 3;;;;
4;;;; This program is free software; you can redistribute it and/or modify 4;;;; This program is free software; you can redistribute it and/or modify
5;;;; it under the terms of the GNU General Public License as published by 5;;;; it under the terms of the GNU General Public License as published by
@@ -18,10 +18,13 @@
18;;; Tailor this statement to your needs if necessary. 18;;; Tailor this statement to your needs if necessary.
19(set! %load-path (cons "GUILE_SITE" %load-path)) 19(set! %load-path (cons "GUILE_SITE" %load-path))
20 20
21(setlocale LC_ALL "")
22
21(use-modules ifelse(IFACE,[CGI],(www cgi),(guile-user)) 23(use-modules ifelse(IFACE,[CGI],(www cgi),(guile-user))
22 (ice-9 rdelim) 24 (ice-9 rdelim)
23 (xmltools dict) 25 (xmltools dict)
24 (gamma sql) 26 (gamma sql)
27 (gamma syslog)
25 (ellinika elmorph) 28 (ellinika elmorph)
26 (ellinika sql) 29 (ellinika sql)
27 (ellinika i18n) 30 (ellinika i18n)
@@ -79,7 +82,7 @@ ifelse(IFACE,[CGI],(cgi:init))
79 82
80(define (join-widget widget-id tabindex) 83(define (join-widget widget-id tabindex)
81 (let* ((name (string-append "join" widget-id)) 84 (let* ((name (string-append "join" widget-id))
82 (selected-choice (or (let ((s (cgi:value name))) 85 (selected-choice (or (let ((s (cgi:value-u8 name)))
83 (if s 86 (if s
84 (string->number s) 87 (string->number s)
85 #f)) 88 #f))
@@ -112,7 +115,7 @@ ifelse(IFACE,[CGI],(cgi:init))
112 </td> 115 </td>
113 <td> 116 <td>
114 <input size=\"36\" name=\"key\" tabindex=\"1\"") 117 <input size=\"36\" name=\"key\" tabindex=\"1\"")
115 (let ((value (cgi:value "key"))) 118 (let ((value (cgi:value-u8 "key")))
116 (if value 119 (if value
117 (begin 120 (begin
118 (display " value=\"") 121 (display " value=\"")
@@ -132,7 +135,7 @@ ifelse(IFACE,[CGI],(cgi:init))
132 (display (_"Επιλέξτε το μέρος του λόγου")) 135 (display (_"Επιλέξτε το μέρος του λόγου"))
133 (display "</td><td>") 136 (display "</td><td>")
134 137
135 (let ((selected-choice (or (let ((s (cgi:value "pos"))) 138 (let ((selected-choice (or (let ((s (cgi:value-u8 "pos")))
136 (if s 139 (if s
137 (string->number s) 140 (string->number s)
138 #f)) 141 #f))
@@ -166,7 +169,7 @@ ifelse(IFACE,[CGI],(cgi:init))
166 (display "<tr><td>") 169 (display "<tr><td>")
167 (display (list-ref category 1)) 170 (display (list-ref category 1))
168 (display "</td><td>") 171 (display "</td><td>")
169 (let ((selected-choice (or (let ((s (cgi:value (list-ref category 0)))) 172 (let ((selected-choice (or (let ((s (cgi:value-u8 (list-ref category 0))))
170 (if s 173 (if s
171 (string->number s) 174 (string->number s)
172 #f)) 175 #f))
@@ -353,7 +356,7 @@ ifelse(IFACE,[CGI],(cgi:init))
353 (list-ref part-of-speech (string->number pos)))) 356 (list-ref part-of-speech (string->number pos))))
354 (if (or (not (string-null? key)) (not (null? theme))) 357 (if (or (not (string-null? key)) (not (null? theme)))
355 (set! where-cond (cons 358 (set! where-cond (cons
356 (if (string=? (cgi:value "joinpos") "0") 359 (if (string=? (cgi:value-u8 "joinpos") "0")
357 " AND" 360 " AND"
358 " OR") 361 " OR")
359 where-cond))) 362 where-cond)))
@@ -418,21 +421,20 @@ ifelse(IFACE,[CGI],(cgi:init))
418 421
419 422
420(define (dict-search) 423(define (dict-search)
421 (let ((keyval (if (cgi:value "ident") 424 (let ((keyval (or (cgi:value-u8 "ident")
422 (dict:decode-string (cgi:value "ident")) 425 (cgi:value-u8 "key")))
423 (cgi:value "key")))
424 (theme (do ((catlist (get-topic-list) (cdr catlist)) 426 (theme (do ((catlist (get-topic-list) (cdr catlist))
425 (ret '())) 427 (ret '()))
426 ((null? catlist) ret) 428 ((null? catlist) ret)
427 (let ((name (caar catlist))) 429 (let ((name (caar catlist)))
428 (let ((v (cgi:value name))) 430 (let ((v (cgi:value-u8 name)))
429 (if (and v (> (string->number v) 0)) 431 (if (and v (> (string->number v) 0))
430 (set! ret (append 432 (set! ret (append
431 ret 433 ret
432 (list (= (string->number 434 (list (= (string->number
433 (cgi:value (string-append "join" name))) 0) 435 (cgi:value-u8 (string-append "join" name))) 0)
434 v)))))))) 436 v))))))))
435 (pos (or (cgi:value "pos") "0"))) 437 (pos (or (cgi:value-u8 "pos") "0")))
436 438
437 (sql-catch-failure 439 (sql-catch-failure
438 (cond 440 (cond
@@ -521,7 +523,7 @@ dict.forms,articles.subindex,articles.meaning,(dict.pos & conv(\"100000\",16,10)
521 (cond 523 (cond
522 ((string=? name "lang")) 524 ((string=? name "lang"))
523 (else 525 (else
524 (let ((v (cgi:value name))) 526 (let ((v (cgi:value-u8 name)))
525 (cond ((and v (not (string-null? v))) 527 (cond ((and v (not (string-null? v)))
526 (display "&amp;") 528 (display "&amp;")
527 (display name) 529 (display name)
diff --git a/src/cgi-bin/nea.scm4 b/src/cgi-bin/nea.scm4
index f64aca2..e366a7c 100644
--- a/src/cgi-bin/nea.scm4
+++ b/src/cgi-bin/nea.scm4
@@ -1,5 +1,5 @@
1;;;; News page for Ellinika 1;;;; News page for Ellinika
2;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010, 2011 Sergey Poznyakoff 2;;;; Copyright (C) 2004, 2005, 2006, 2007, 2010, 2011, 2015 Sergey Poznyakoff
3;;;; 3;;;;
4;;;; This program is free software; you can redistribute it and/or modify 4;;;; This program is free software; you can redistribute it and/or modify
5;;;; it under the terms of the GNU General Public License as published by 5;;;; it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
30ifelse(IFACE,[CGI],(cgi:init)) 30ifelse(IFACE,[CGI],(cgi:init))
31 31
32(define tmpl (if (and monima-nea-template-file-name 32(define tmpl (if (and monima-nea-template-file-name
33 (cgi:value "timestamp")) 33 (cgi:value-u8 "timestamp"))
34 monima-nea-template-file-name 34 monima-nea-template-file-name
35 nea-template-file-name)) 35 nea-template-file-name))
36 36
@@ -177,13 +177,13 @@ ifelse(IFACE,[CGI],(cgi:init))
177 0))) 177 0)))
178 (from (catch #t 178 (from (catch #t
179 (lambda () 179 (lambda ()
180 (let ((x (string->number (cgi:value "from")))) 180 (let ((x (string->number (cgi:value-u8 "from"))))
181 (if (< x count) 181 (if (< x count)
182 x 182 x
183 0))) 183 0)))
184 (lambda args 184 (lambda args
185 0))) 185 0)))
186 (fwd (let ((dir (cgi:value "dir"))) 186 (fwd (let ((dir (cgi:value-u8 "dir")))
187 (or (not dir) 187 (or (not dir)
188 (string=? dir "1")))) 188 (string=? dir "1"))))
189 (entries (collect-entries from fwd))) 189 (entries (collect-entries from fwd)))
@@ -199,7 +199,7 @@ ifelse(IFACE,[CGI],(cgi:init))
199 (let ((num-entries (length result)) 199 (let ((num-entries (length result))
200 (begin (if fwd from start)) 200 (begin (if fwd from start))
201 (end (if fwd start from)) 201 (end (if fwd start from))
202 (id (cgi:value "id"))) 202 (id (cgi:value-u8 "id")))
203 203
204 (cond 204 (cond
205 ((not (and (= from 0) (< num-entries nea-max-rows))) 205 ((not (and (= from 0) (< num-entries nea-max-rows)))
@@ -273,7 +273,7 @@ ifelse(IFACE,[CGI],(cgi:init))
273 (display "<span class=\"itemsubject\">\n") 273 (display "<span class=\"itemsubject\">\n")
274 (display (list-ref item 2)) 274 (display (list-ref item 2))
275 (display "</span>") 275 (display "</span>")
276 (if (not (cgi:value "timestamp")) 276 (if (not (cgi:value-u8 "timestamp"))
277 (permalink "span" (list-ref item 1))) 277 (permalink "span" (list-ref item 1)))
278 (display "</div><!-- news-header -->")) 278 (display "</div><!-- news-header -->"))
279 279
@@ -337,7 +337,7 @@ ifelse(IFACE,[CGI],(cgi:init))
337 (cond 337 (cond
338 ((string=? name "lang")) 338 ((string=? name "lang"))
339 (else 339 (else
340 (let ((v (cgi:value name))) 340 (let ((v (cgi:value-u8 name)))
341 (cond ((and v (not (string-null? v))) 341 (cond ((and v (not (string-null? v)))
342 (display "&amp;") 342 (display "&amp;")
343 (display name) 343 (display name)
@@ -435,7 +435,7 @@ ifelse(IFACE,[CGI],(cgi:init))
435;;; Main 435;;; Main
436 436
437(cond 437(cond
438 ((cgi:value "rss") 438 ((cgi:value-u8 "rss")
439 ifelse(IFACE,[CGI], 439 ifelse(IFACE,[CGI],
440 (display ["Content-type: text/xml; charset=utf-8\r\n\r\n"]), 440 (display ["Content-type: text/xml; charset=utf-8\r\n\r\n"]),
441 (request-rec:set-content-type! Request ["text/xml; charset=UTF-8"])) 441 (request-rec:set-content-type! Request ["text/xml; charset=UTF-8"]))
@@ -447,15 +447,15 @@ ifelse(IFACE,[CGI],(cgi:init))
447 (display ["Content-type: text/html; charset=utf-8\r\n\r\n"])) 447 (display ["Content-type: text/html; charset=utf-8\r\n\r\n"]))
448 (ellinika:sql-connect ellinika-sql-connection) 448 (ellinika:sql-connect ellinika-sql-connection)
449 (cond 449 (cond
450 ((or (cgi:value "timestamp") (cgi:value "id")) 450 ((or (cgi:value-u8 "timestamp") (cgi:value-u8 "id"))
451 (let ((tuples 451 (let ((tuples
452 (cond 452 (cond
453 ((cgi:value "timestamp") => 453 ((cgi:value-u8 "timestamp") =>
454 (lambda (ts) 454 (lambda (ts)
455 (ellinika:sql-query 455 (ellinika:sql-query
456 "SELECT date,unix_timestamp(date),ident\ 456 "SELECT date,unix_timestamp(date),ident\
457 FROM news WHERE unix_timestamp(date)=~Q" ts))) 457 FROM news WHERE unix_timestamp(date)=~Q" ts)))
458 ((cgi:value "id") => 458 ((cgi:value-u8 "id") =>
459 (lambda (id) 459 (lambda (id)
460 (ellinika:sql-query 460 (ellinika:sql-query
461 "SELECT date,unix_timestamp(date),ident\ 461 "SELECT date,unix_timestamp(date),ident\
diff --git a/src/ellinika/cgi.scm4 b/src/ellinika/cgi.scm4
index 8c9b54d..51f9570 100644
--- a/src/ellinika/cgi.scm4
+++ b/src/ellinika/cgi.scm4
@@ -1,6 +1,5 @@
1;;;; -*- scheme -*- 1;;;; Greek Dictionary Web Engine -*- scheme -*-
2;;;; Greek Dictionary Web Engine 2;;;; Copyright (C) 2005, 2007, 2010, 2015 Sergey Poznyakoff
3;;;; Copyright (C) 2005, 2007, 2010 Sergey Poznyakoff
4;;;; 3;;;;
5;;;; This program is free software; you can redistribute it and/or modify 4;;;; This program is free software; you can redistribute it and/or modify
6;;;; it under the terms of the GNU General Public License as published by 5;;;; it under the terms of the GNU General Public License as published by
@@ -19,12 +18,28 @@
19 #:use-module (ellinika config) 18 #:use-module (ellinika config)
20 #:use-module (ellinika i18n) 19 #:use-module (ellinika i18n)
21 #:use-module ifelse(IFACE,[CGI],(www cgi),(guile-user)) 20 #:use-module ifelse(IFACE,[CGI],(www cgi),(guile-user))
21 #:use-module (ice-9 iconv)
22 #:use-module (rnrs bytevectors)
22 #:re-export (base-dir html-dir sysconf-dir locale-path 23 #:re-export (base-dir html-dir sysconf-dir locale-path
23 ellinika-sql-connection 24 ellinika-sql-connection
24 config-file-name )) 25 config-file-name ))
25 26
26 27
27ifelse(IFACE,[CGI],,dnl 28ifelse(IFACE,[CGI],[
29(define-public cgi-script-name
30 (cgi:getenv 'script-name))
31(define-public cgi-server-hostname
32 (cgi:getenv 'server-hostname))
33(define-public cgi-server-protocol-name
34 (cgi:getenv 'server-protocol-name))
35(define-public cgi-server-protocol-version
36 (cgi:getenv 'server-protocol-version))
37(define-public (cgi:value-u8 key)
38 (let ((x (cgi:value key)))
39 (if x
40 (utf8->string (string->bytevector x "ISO-8859-1"))
41 x)))
42],[
28(define form-data 43(define form-data
29 (append 44 (append
30 (parse-form-data 45 (parse-form-data
@@ -59,7 +74,7 @@ ifelse(IFACE,[CGI],,dnl
59 (set! cgi-server-protocol-version (substring server-protocol 74 (set! cgi-server-protocol-version (substring server-protocol
60 (1+ slash)))))) 75 (1+ slash))))))
61 76
62) 77])
63 78
64 79
65;;; User-definable variables 80;;; User-definable variables
diff --git a/src/ellinika/i18n.scm b/src/ellinika/i18n.scm
index c05d727..40cb47d 100644
--- a/src/ellinika/i18n.scm
+++ b/src/ellinika/i18n.scm
@@ -1,5 +1,5 @@
1;;;; This file is part of Greek Dictionary Web Engine 1;;;; This file is part of Greek Dictionary Web Engine
2;;;; Copyright (C) 2006, 2007 Sergey Poznyakoff 2;;;; Copyright (C) 2006, 2007, 2015 Sergey Poznyakoff
3;;;; 3;;;;
4;;;; This program is free software; you can redistribute it and/or modify 4;;;; This program is free software; you can redistribute it and/or modify
5;;;; it under the terms of the GNU General Public License as published by 5;;;; it under the terms of the GNU General Public License as published by
@@ -15,10 +15,12 @@
15;;;; along with this program. If not, see <http://www.gnu.org/licenses/>. 15;;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
17(define-module (ellinika i18n) 17(define-module (ellinika i18n)
18 #:use-syntax (ice-9 syncase)
19 #:export-syntax (_) 18 #:export-syntax (_)
20 #:export (locale-setup)) 19 #:export (locale-setup))
21 20
21(if (= (string->number (major-version)) 1)
22 (use-modules (ice-9 syncase)))
23
22(define-syntax _ 24(define-syntax _
23 (syntax-rules () 25 (syntax-rules ()
24 ((_ msg) (gettext msg)))) 26 ((_ msg) (gettext msg))))
diff --git a/xml/ru/ellinika.xml b/xml/ru/ellinika.xml
index 2a0068d..97a801f 100644
--- a/xml/ru/ellinika.xml
+++ b/xml/ru/ellinika.xml
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (C) 2004-2011 Sergey Poznyakoff 2<!-- Copyright (C) 2004-2015 Sergey Poznyakoff
3 3
4 Permission is granted to copy, distribute and/or modify this document 4 Permission is granted to copy, distribute and/or modify this document
5 under the terms of the GNU Free Documentation License, Version 1.2 5 under the terms of the GNU Free Documentation License, Version 1.2
@@ -38,6 +38,7 @@ Copyright <![CDATA[&copy;]]> 2004-2011 Sergey Poznyakoff
38 38
39<GUILE> 39<GUILE>
40 (install-nea) 40 (install-nea)
41 (install-conj)
41 (install-srch) 42 (install-srch)
42 #f 43 #f
43</GUILE> 44</GUILE>
diff --git a/xml/ru/rhmata.xml b/xml/ru/rhmata.xml
index e4f5a38..1c5dfaf 100644
--- a/xml/ru/rhmata.xml
+++ b/xml/ru/rhmata.xml
@@ -1,6 +1,6 @@
1<!-- 1<!--
2 2
3 Copyright (C) 2004 Sergey Poznyakoff 3 Copyright (C) 2004, 2015 Sergey Poznyakoff
4 4
5 Permission is granted to copy, distribute and/or modify this document 5 Permission is granted to copy, distribute and/or modify this document
6 under the terms of the GNU Free Documentation License, Version 1.2 6 under the terms of the GNU Free Documentation License, Version 1.2
@@ -2480,6 +2480,12 @@
2480</TABULAR> 2480</TABULAR>
2481</PAGE> 2481</PAGE>
2482 2482
2483<PAGE PREFIX="conj" MODE="unnumbered" HEADER="Конъюгатор" REF="CONJ">
2484
2485@@conj@@
2486
2487</PAGE>
2488
2483</CHAPTER> 2489</CHAPTER>
2484 2490
2485<!-- Local Variables: --> 2491<!-- Local Variables: -->

Return to:

Send suggestions and report system problems to the System administrator.