summaryrefslogtreecommitdiffabout
path: root/src
Unidiff
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-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
5 files changed, 55 insertions, 35 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,3 +1,3 @@
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;;;;
@@ -20,2 +20,3 @@
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))
@@ -63,3 +64,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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
@@ -352,3 +353,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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)))
@@ -402,3 +403,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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)))
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,3 +1,3 @@
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;;;;
@@ -20,2 +20,4 @@
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))
@@ -24,2 +26,3 @@
24 (gamma sql) 26 (gamma sql)
27 (gamma syslog)
25 (ellinika elmorph) 28 (ellinika elmorph)
@@ -81,3 +84,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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
@@ -114,3 +117,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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
@@ -134,3 +137,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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
@@ -168,3 +171,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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
@@ -355,3 +358,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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"
@@ -420,5 +423,4 @@ ifelse(IFACE,[CGI],(cgi:init))
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))
@@ -427,3 +429,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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))
@@ -432,5 +434,5 @@ ifelse(IFACE,[CGI],(cgi:init))
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
@@ -523,3 +525,3 @@ dict.forms,articles.subindex,articles.meaning,(dict.pos & conv(\"100000\",16,10)
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)))
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,3 +1,3 @@
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;;;;
@@ -32,3 +32,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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
@@ -179,3 +179,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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)
@@ -185,3 +185,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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)
@@ -201,3 +201,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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
@@ -275,3 +275,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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)))
@@ -339,3 +339,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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)))
@@ -437,3 +437,3 @@ ifelse(IFACE,[CGI],(cgi:init))
437(cond 437(cond
438 ((cgi:value "rss") 438 ((cgi:value-u8 "rss")
439 ifelse(IFACE,[CGI], 439 ifelse(IFACE,[CGI],
@@ -449,6 +449,6 @@ ifelse(IFACE,[CGI],(cgi:init))
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)
@@ -457,3 +457,3 @@ ifelse(IFACE,[CGI],(cgi:init))
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)
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,4 +1,3 @@
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;;;;
@@ -21,2 +20,4 @@
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
@@ -26,3 +27,17 @@
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
@@ -61,3 +76,3 @@ ifelse(IFACE,[CGI],,dnl
61 76
62) 77])
63 78
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,3 +1,3 @@
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;;;;
@@ -17,3 +17,2 @@
17(define-module (ellinika i18n) 17(define-module (ellinika i18n)
18 #:use-syntax (ice-9 syncase)
19 #:export-syntax (_) 18 #:export-syntax (_)
@@ -21,2 +20,5 @@
21 20
21(if (= (string->number (major-version)) 1)
22 (use-modules (ice-9 syncase)))
23
22(define-syntax _ 24(define-syntax _

Return to:

Send suggestions and report system problems to the System administrator.