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/cgi.scm4 | |
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/cgi.scm4')
-rw-r--r-- | src/ellinika/cgi.scm4 | 25 |
1 files changed, 20 insertions, 5 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 @@ | |||
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 | ||
27 | ifelse(IFACE,[CGI],,dnl | 28 | ifelse(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 |