summaryrefslogtreecommitdiffabout
path: root/src/ellinika
Side-by-side diff
Diffstat (limited to 'src/ellinika') (more/less context) (ignore whitespace changes)
-rw-r--r--src/ellinika/cgi.scm425
-rw-r--r--src/ellinika/i18n.scm6
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,4 +1,3 @@
-;;;; -*- 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
;;;;
@@ -21,2 +20,4 @@
#: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
@@ -26,3 +27,17 @@
-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
@@ -61,3 +76,3 @@ ifelse(IFACE,[CGI],,dnl
-)
+])
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 @@
;;;; This file is part of Greek Dictionary Web Engine
-;;;; Copyright (C) 2006, 2007 Sergey Poznyakoff
+;;;; Copyright (C) 2006, 2007, 2015 Sergey Poznyakoff
;;;;
@@ -17,3 +17,2 @@
(define-module (ellinika i18n)
- #:use-syntax (ice-9 syncase)
#:export-syntax (_)
@@ -21,2 +20,5 @@
+(if (= (string->number (major-version)) 1)
+ (use-modules (ice-9 syncase)))
+
(define-syntax _

Return to:

Send suggestions and report system problems to the System administrator.