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/cgi-bin | |
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/cgi-bin')
-rw-r--r-- | src/cgi-bin/conj.scm4 | 9 | ||||
-rw-r--r-- | src/cgi-bin/dict.scm4 | 28 | ||||
-rw-r--r-- | src/cgi-bin/nea.scm4 | 22 |
3 files changed, 31 insertions, 28 deletions
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 "&") | 406 | (display "&") |
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 "&") | 528 | (display "&") |
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 @@ | |||
30 | ifelse(IFACE,[CGI],(cgi:init)) | 30 | ifelse(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 |