diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2015-01-10 09:27:21 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2015-01-10 09:27:21 +0200 |
commit | 2b99881a880d101ae32a94b3d1e0a792224cb74c (patch) | |
tree | bb5145ebea295ff16b9ebfdb8a4f7d8a5a0a592e /src/ellinika | |
parent | 5dfd8dd432785ca8d8b6d2c11bac9e110feda52b (diff) | |
download | ellinika-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 (limited to 'src/ellinika')
-rw-r--r-- | src/ellinika/cgi.scm4 | 25 | ||||
-rw-r--r-- | src/ellinika/i18n.scm | 6 |
2 files changed, 24 insertions, 7 deletions
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 @@ -;;;; -*- scheme -*- -;;;; Greek Dictionary Web Engine -;;;; Copyright (C) 2005, 2007, 2010 Sergey Poznyakoff +;;;; Greek Dictionary Web Engine -*- scheme -*- +;;;; Copyright (C) 2005, 2007, 2010, 2015 Sergey Poznyakoff ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -19,12 +18,28 @@ #:use-module (ellinika config) #:use-module (ellinika i18n) #:use-module ifelse(IFACE,[CGI],(www cgi),(guile-user)) + #:use-module (ice-9 iconv) + #:use-module (rnrs bytevectors) #:re-export (base-dir html-dir sysconf-dir locale-path ellinika-sql-connection config-file-name )) -ifelse(IFACE,[CGI],,dnl +ifelse(IFACE,[CGI],[ +(define-public cgi-script-name + (cgi:getenv 'script-name)) +(define-public cgi-server-hostname + (cgi:getenv 'server-hostname)) +(define-public cgi-server-protocol-name + (cgi:getenv 'server-protocol-name)) +(define-public cgi-server-protocol-version + (cgi:getenv 'server-protocol-version)) +(define-public (cgi:value-u8 key) + (let ((x (cgi:value key))) + (if x + (utf8->string (string->bytevector x "ISO-8859-1")) + x))) +],[ (define form-data (append (parse-form-data @@ -59,7 +74,7 @@ ifelse(IFACE,[CGI],,dnl (set! cgi-server-protocol-version (substring server-protocol (1+ slash)))))) -) +]) ;;; 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 @@ ;;;; This file is part of Greek Dictionary Web Engine -;;;; Copyright (C) 2006, 2007 Sergey Poznyakoff +;;;; Copyright (C) 2006, 2007, 2015 Sergey Poznyakoff ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -15,10 +15,12 @@ ;;;; along with this program. If not, see <http://www.gnu.org/licenses/>. (define-module (ellinika i18n) - #:use-syntax (ice-9 syncase) #:export-syntax (_) #:export (locale-setup)) +(if (= (string->number (major-version)) 1) + (use-modules (ice-9 syncase))) + (define-syntax _ (syntax-rules () ((_ msg) (gettext msg)))) |