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
|
current-wwdate
current-isodate
*this-exe-dir*
*this-exe-name*
*this-exe-fullpath*
)
(import scheme chicken.base chicken.port chicken.process chicken.io chicken.pathname chicken.process-context chicken.time chicken.process chicken.condition chicken.time.posix chicken.process-context.posix chicken.format chicken.file.posix)
(import regex ansi-escape-sequences test srfi-1 chicken.irregex slice srfi-13 rfc3339)
;;scsh-process ;; dropping scsh-process, it was clobbering posix's process and process*
;;(import directory-utils uuid-lib filepath srfi-19 ) ; linenoise
(import directory-utils filepath srfi-19 ) ; linenoise
;; plugs a hole in posix-extras in latter chicken versions
(import pathname-expand chicken.file chicken.string)
(define ##sys#expand-home-path pathname-expand)
(define (realpath x) (print "Path: " x) (normalize-pathname (pathname-expand (or x "/dev/null")) ))
;;(define (realpath x) (pathname-expand (or x "/dev/null")))
;; (include "mimetypes.scm") ; provides ext->mimetype
;; (include "workweekdate.scm")
;; gathered from macosx:
;; cat /etc/apache2/mime.types | grep -v '^#' | perl -ne 'print "(\"$2\" . \"$1\")\n" if /(\S+)\s+(\S+)/' > mimetypes.scm
;; + manual manipulation
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
>
>
|
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
|
current-wwdate
current-isodate
*this-exe-dir*
*this-exe-name*
*this-exe-fullpath*
)
(import scheme
chicken.base
chicken.condition
chicken.file
chicken.file.posix
chicken.format
chicken.io
chicken.pathname
chicken.port
chicken.process
chicken.process
chicken.process-context
chicken.process-context.posix
chicken.irregex
chicken.string
chicken.time
chicken.time.posix
)
(import regex ansi-escape-sequences test srfi-1 slice srfi-13 rfc3339)
;;scsh-process ;; dropping scsh-process, it was clobbering posix's process and process*
;;(import directory-utils uuid-lib filepath srfi-19 ) ; linenoise
(import directory-utils filepath srfi-19 ) ; linenoise
;; plugs a hole in posix-extras in latter chicken versions
;; (import pathname-expand chicken.file chicken.string)
;; (define ##sys#expand-home-path pathname-expand)
;; (define (realpath x) (print "Path: " x) (normalize-pathname (pathname-expand (or x "/dev/null")) ))
;;(define (realpath x) (pathname-expand (or x "/dev/null")))
(define (realpath x)
(with-input-from-pipe (conc "readlink -f " x) read-line))
;; (include "mimetypes.scm") ; provides ext->mimetype
;; (include "workweekdate.scm")
;; gathered from macosx:
;; cat /etc/apache2/mime.types | grep -v '^#' | perl -ne 'print "(\"$2\" . \"$1\")\n" if /(\S+)\s+(\S+)/' > mimetypes.scm
;; + manual manipulation
|