Overview
Comment:90% ported to chicken-scheme v4.7.0
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | move-to-ck4.7.x
Files: files | file ages | folders
SHA1: 45412597aa7ebb9eb8d84eb49315b41d10c148e4
User & Date: matt on 2011-10-02 22:22:54
Other Links: branch diff | manifest | tags
Context
2011-10-02
23:35
95% ported to chicken-scheme v4.7 check-in: 361599ef76 user: matt tags: move-to-ck4.7.x
22:22
90% ported to chicken-scheme v4.7.0 check-in: 45412597aa user: matt tags: move-to-ck4.7.x
19:47
Mostly ported to Chicken 4.7.x check-in: 2274e4ac36 user: matt tags: move-to-ck4.7.x
Changes

Modified session.scm from [4f92f7adcd] to [95d0573588].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
;; TODO
;;  Concept of order num incremented with each page access
;;     if a branch is taken then a new session would need to be created
;;

;; make-vector-record session session dbtype dbinit conn params path-params session-key session-id domain toppage page curr-page content-type page-type sroot twikidir pagedat alt-page-dat pagevars pagevars-before sessionvars sessionvars-before globalvars globalvars-before logpt formdat request-method session-cookie curr-err log-port logfile seen-pages page-dir-style debugmode
(define (make-sdat)(make-vector 33))
(define-inline (sdat-get-dbtype               vec)    (vector-ref  vec 0))
(define-inline (sdat-get-dbinit               vec)    (vector-ref  vec 1))
(define-inline (sdat-get-conn                 vec)    (vector-ref  vec 2))
(define-inline (sdat-get-params               vec)    (vector-ref  vec 3))
(define-inline (sdat-get-path-params          vec)    (vector-ref  vec 4))
(define-inline (sdat-get-session-key          vec)    (vector-ref  vec 5))
(define-inline (sdat-get-session-id           vec)    (vector-ref  vec 6))
(define-inline (sdat-get-domain               vec)    (vector-ref  vec 7))
(define-inline (sdat-get-toppage              vec)    (vector-ref  vec 8))
(define-inline (sdat-get-page                 vec)    (vector-ref  vec 9))
(define-inline (sdat-get-curr-page            vec)    (vector-ref  vec 10))
(define-inline (sdat-get-content-type         vec)    (vector-ref  vec 11))
(define-inline (sdat-get-page-type            vec)    (vector-ref  vec 12))
(define-inline (sdat-get-sroot                vec)    (vector-ref  vec 13))
(define-inline (sdat-get-twikidir             vec)    (vector-ref  vec 14))
(define-inline (sdat-get-pagedat              vec)    (vector-ref  vec 15))
(define-inline (sdat-get-alt-page-dat         vec)    (vector-ref  vec 16))
(define-inline (sdat-get-pagevars             vec)    (vector-ref  vec 17))
(define-inline (sdat-get-pagevars-before      vec)    (vector-ref  vec 18))
(define-inline (sdat-get-sessionvars          vec)    (vector-ref  vec 19))
(define-inline (sdat-get-sessionvars-before   vec)    (vector-ref  vec 20))
(define-inline (sdat-get-globalvars           vec)    (vector-ref  vec 21))
(define-inline (sdat-get-globalvars-before    vec)    (vector-ref  vec 22))
(define-inline (sdat-get-logpt                vec)    (vector-ref  vec 23))
(define-inline (sdat-get-formdat              vec)    (vector-ref  vec 24))
(define-inline (sdat-get-request-method       vec)    (vector-ref  vec 25))
(define-inline (sdat-get-session-cookie       vec)    (vector-ref  vec 26))
(define-inline (sdat-get-curr-err             vec)    (vector-ref  vec 27))
(define-inline (sdat-get-log-port             vec)    (vector-ref  vec 28))
(define-inline (sdat-get-logfile              vec)    (vector-ref  vec 29))
(define-inline (sdat-get-seen-pages           vec)    (vector-ref  vec 30))
(define-inline (sdat-get-page-dir-style       vec)    (vector-ref  vec 31))
(define-inline (sdat-get-debugmode            vec)    (vector-ref  vec 32))
(define-inline (sdat-set-dbtype!              vec val)(vector-set! vec 0 val))
(define-inline (sdat-set-dbinit!              vec val)(vector-set! vec 1 val))
(define-inline (sdat-set-conn!                vec val)(vector-set! vec 2 val))
(define-inline (sdat-set-params!              vec val)(vector-set! vec 3 val))
(define-inline (sdat-set-path-params!         vec val)(vector-set! vec 4 val))
(define-inline (sdat-set-session-key!         vec val)(vector-set! vec 5 val))
(define-inline (sdat-set-session-id!          vec val)(vector-set! vec 6 val))
(define-inline (sdat-set-domain!              vec val)(vector-set! vec 7 val))
(define-inline (sdat-set-toppage!             vec val)(vector-set! vec 8 val))
(define-inline (sdat-set-page!                vec val)(vector-set! vec 9 val))
(define-inline (sdat-set-curr-page!           vec val)(vector-set! vec 10 val))
(define-inline (sdat-set-content-type!        vec val)(vector-set! vec 11 val))
(define-inline (sdat-set-page-type!           vec val)(vector-set! vec 12 val))
(define-inline (sdat-set-sroot!               vec val)(vector-set! vec 13 val))
(define-inline (sdat-set-twikidir!            vec val)(vector-set! vec 14 val))
(define-inline (sdat-set-pagedat!             vec val)(vector-set! vec 15 val))
(define-inline (sdat-set-alt-page-dat!        vec val)(vector-set! vec 16 val))
(define-inline (sdat-set-pagevars!            vec val)(vector-set! vec 17 val))
(define-inline (sdat-set-pagevars-before!     vec val)(vector-set! vec 18 val))
(define-inline (sdat-set-sessionvars!         vec val)(vector-set! vec 19 val))
(define-inline (sdat-set-sessionvars-before!  vec val)(vector-set! vec 20 val))
(define-inline (sdat-set-globalvars!          vec val)(vector-set! vec 21 val))
(define-inline (sdat-set-globalvars-before!   vec val)(vector-set! vec 22 val))
(define-inline (sdat-set-logpt!               vec val)(vector-set! vec 23 val))
(define-inline (sdat-set-formdat!             vec val)(vector-set! vec 24 val))
(define-inline (sdat-set-request-method!      vec val)(vector-set! vec 25 val))
(define-inline (sdat-set-session-cookie!      vec val)(vector-set! vec 26 val))
(define-inline (sdat-set-curr-err!            vec val)(vector-set! vec 27 val))
(define-inline (sdat-set-log-port!            vec val)(vector-set! vec 28 val))
(define-inline (sdat-set-logfile!             vec val)(vector-set! vec 29 val))
(define-inline (sdat-set-seen-pages!          vec val)(vector-set! vec 30 val))
(define-inline (sdat-set-page-dir-style!      vec val)(vector-set! vec 31 val))
(define-inline (sdat-set-debugmode!           vec val)(vector-set! vec 32 val))

;; (define-class <session> ()
;;   (dbtype       ;; 'pg or 'sqlite3
;;    dbinit
;;    conn
;;    params       ;; params from the key=val&key1=val2 string
;;    path-params  ;; remaining params from the path







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
;; TODO
;;  Concept of order num incremented with each page access
;;     if a branch is taken then a new session would need to be created
;;

;; make-vector-record session session dbtype dbinit conn params path-params session-key session-id domain toppage page curr-page content-type page-type sroot twikidir pagedat alt-page-dat pagevars pagevars-before sessionvars sessionvars-before globalvars globalvars-before logpt formdat request-method session-cookie curr-err log-port logfile seen-pages page-dir-style debugmode
(define (make-sdat)(make-vector 33))
(define (sdat-get-dbtype               vec)    (vector-ref  vec 0))
(define (sdat-get-dbinit               vec)    (vector-ref  vec 1))
(define (sdat-get-conn                 vec)    (vector-ref  vec 2))
(define (sdat-get-params               vec)    (vector-ref  vec 3))
(define (sdat-get-path-params          vec)    (vector-ref  vec 4))
(define (sdat-get-session-key          vec)    (vector-ref  vec 5))
(define (sdat-get-session-id           vec)    (vector-ref  vec 6))
(define (sdat-get-domain               vec)    (vector-ref  vec 7))
(define (sdat-get-toppage              vec)    (vector-ref  vec 8))
(define (sdat-get-page                 vec)    (vector-ref  vec 9))
(define (sdat-get-curr-page            vec)    (vector-ref  vec 10))
(define (sdat-get-content-type         vec)    (vector-ref  vec 11))
(define (sdat-get-page-type            vec)    (vector-ref  vec 12))
(define (sdat-get-sroot                vec)    (vector-ref  vec 13))
(define (sdat-get-twikidir             vec)    (vector-ref  vec 14))
(define (sdat-get-pagedat              vec)    (vector-ref  vec 15))
(define (sdat-get-alt-page-dat         vec)    (vector-ref  vec 16))
(define (sdat-get-pagevars             vec)    (vector-ref  vec 17))
(define (sdat-get-pagevars-before      vec)    (vector-ref  vec 18))
(define (sdat-get-sessionvars          vec)    (vector-ref  vec 19))
(define (sdat-get-sessionvars-before   vec)    (vector-ref  vec 20))
(define (sdat-get-globalvars           vec)    (vector-ref  vec 21))
(define (sdat-get-globalvars-before    vec)    (vector-ref  vec 22))
(define (sdat-get-logpt                vec)    (vector-ref  vec 23))
(define (sdat-get-formdat              vec)    (vector-ref  vec 24))
(define (sdat-get-request-method       vec)    (vector-ref  vec 25))
(define (sdat-get-session-cookie       vec)    (vector-ref  vec 26))
(define (sdat-get-curr-err             vec)    (vector-ref  vec 27))
(define (sdat-get-log-port             vec)    (vector-ref  vec 28))
(define (sdat-get-logfile              vec)    (vector-ref  vec 29))
(define (sdat-get-seen-pages           vec)    (vector-ref  vec 30))
(define (sdat-get-page-dir-style       vec)    (vector-ref  vec 31))
(define (sdat-get-debugmode            vec)    (vector-ref  vec 32))
(define (sdat-set-dbtype!              vec val)(vector-set! vec 0 val))
(define (sdat-set-dbinit!              vec val)(vector-set! vec 1 val))
(define (sdat-set-conn!                vec val)(vector-set! vec 2 val))
(define (sdat-set-params!              vec val)(vector-set! vec 3 val))
(define (sdat-set-path-params!         vec val)(vector-set! vec 4 val))
(define (sdat-set-session-key!         vec val)(vector-set! vec 5 val))
(define (sdat-set-session-id!          vec val)(vector-set! vec 6 val))
(define (sdat-set-domain!              vec val)(vector-set! vec 7 val))
(define (sdat-set-toppage!             vec val)(vector-set! vec 8 val))
(define (sdat-set-page!                vec val)(vector-set! vec 9 val))
(define (sdat-set-curr-page!           vec val)(vector-set! vec 10 val))
(define (sdat-set-content-type!        vec val)(vector-set! vec 11 val))
(define (sdat-set-page-type!           vec val)(vector-set! vec 12 val))
(define (sdat-set-sroot!               vec val)(vector-set! vec 13 val))
(define (sdat-set-twikidir!            vec val)(vector-set! vec 14 val))
(define (sdat-set-pagedat!             vec val)(vector-set! vec 15 val))
(define (sdat-set-alt-page-dat!        vec val)(vector-set! vec 16 val))
(define (sdat-set-pagevars!            vec val)(vector-set! vec 17 val))
(define (sdat-set-pagevars-before!     vec val)(vector-set! vec 18 val))
(define (sdat-set-sessionvars!         vec val)(vector-set! vec 19 val))
(define (sdat-set-sessionvars-before!  vec val)(vector-set! vec 20 val))
(define (sdat-set-globalvars!          vec val)(vector-set! vec 21 val))
(define (sdat-set-globalvars-before!   vec val)(vector-set! vec 22 val))
(define (sdat-set-logpt!               vec val)(vector-set! vec 23 val))
(define (sdat-set-formdat!             vec val)(vector-set! vec 24 val))
(define (sdat-set-request-method!      vec val)(vector-set! vec 25 val))
(define (sdat-set-session-cookie!      vec val)(vector-set! vec 26 val))
(define (sdat-set-curr-err!            vec val)(vector-set! vec 27 val))
(define (sdat-set-log-port!            vec val)(vector-set! vec 28 val))
(define (sdat-set-logfile!             vec val)(vector-set! vec 29 val))
(define (sdat-set-seen-pages!          vec val)(vector-set! vec 30 val))
(define (sdat-set-page-dir-style!      vec val)(vector-set! vec 31 val))
(define (sdat-set-debugmode!           vec val)(vector-set! vec 32 val))

;; (define-class <session> ()
;;   (dbtype       ;; 'pg or 'sqlite3
;;    dbinit
;;    conn
;;    params       ;; params from the key=val&key1=val2 string
;;    path-params  ;; remaining params from the path

Modified tests/test.scm from [6a4cc3871f] to [9cca07365b].

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

(load "./requirements.scm")
(load "./cookie.so")
(load "./misc-stml.scm")
(load "./formdat.scm")
(load "./stml.scm")
(load "./session.scm")
;(load "./sqltbl.scm")
(load "./html-filter.scm")
(load "./keystore.scm")

;; Test the primitive dbi interface

(system "rm -f tests/test.db")
(define db (dbi:open 'sqlite3 '((dbname . "tests/test.db"))))







|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

(load "./requirements.scm")
(load "./cookie.so")
(load "./misc-stml.scm")
(load "./formdat.scm")
(load "./stml.scm")
(load "./session.scm")
(load "./sqltbl.scm")
(load "./html-filter.scm")
(load "./keystore.scm")

;; Test the primitive dbi interface

(system "rm -f tests/test.db")
(define db (dbi:open 'sqlite3 '((dbname . "tests/test.db"))))