aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2006-07-20 10:04:35 +0000
committerLudovic Court`es2006-07-20 10:04:35 +0000
commitee55493f9c05aeeb039f51ab169f1392c8593457 (patch)
treedc4d5ba79f4186040d9384ac5b94efe764d2d3d2
parent9edadfcf60d6f507038585010b83813132a41c03 (diff)
downloadskribilo-ee55493f9c05aeeb039f51ab169f1392c8593457.tar.gz
skribilo-ee55493f9c05aeeb039f51ab169f1392c8593457.tar.lz
skribilo-ee55493f9c05aeeb039f51ab169f1392c8593457.zip
Renamed `(skribilo runtime)' to `(skribilo utils strings)'.
... and updated users. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-18
-rw-r--r--src/guile/skribilo/Makefile.am2
-rw-r--r--src/guile/skribilo/biblio.scm2
-rw-r--r--src/guile/skribilo/biblio/abbrev.scm4
-rw-r--r--src/guile/skribilo/biblio/author.scm2
-rw-r--r--src/guile/skribilo/biblio/bibtex.scm6
-rw-r--r--src/guile/skribilo/coloring/lisp.scm2
-rw-r--r--src/guile/skribilo/module.scm2
-rw-r--r--src/guile/skribilo/utils/Makefile.am2
-rw-r--r--src/guile/skribilo/utils/strings.scm (renamed from src/guile/skribilo/runtime.scm)43
-rw-r--r--src/guile/skribilo/verify.scm1
10 files changed, 29 insertions, 37 deletions
diff --git a/src/guile/skribilo/Makefile.am b/src/guile/skribilo/Makefile.am
index 8c17711..8de8774 100644
--- a/src/guile/skribilo/Makefile.am
+++ b/src/guile/skribilo/Makefile.am
@@ -2,7 +2,7 @@ guilemoduledir = $(GUILE_SITE)/skribilo
dist_guilemodule_DATA = biblio.scm color.scm config.scm \
debug.scm engine.scm evaluator.scm \
lib.scm module.scm output.scm prog.scm \
- reader.scm resolve.scm runtime.scm \
+ reader.scm resolve.scm \
source.scm parameters.scm verify.scm \
writer.scm ast.scm location.scm \
condition.scm
diff --git a/src/guile/skribilo/biblio.scm b/src/guile/skribilo/biblio.scm
index 04a8bfd..7905593 100644
--- a/src/guile/skribilo/biblio.scm
+++ b/src/guile/skribilo/biblio.scm
@@ -21,7 +21,7 @@
(define-module (skribilo biblio)
- :use-module (skribilo runtime)
+ :use-module (skribilo utils strings)
:use-module (skribilo utils syntax) ;; `when', `unless'
:autoload (srfi srfi-34) (raise)
diff --git a/src/guile/skribilo/biblio/abbrev.scm b/src/guile/skribilo/biblio/abbrev.scm
index 1e88e82..4440f1c 100644
--- a/src/guile/skribilo/biblio/abbrev.scm
+++ b/src/guile/skribilo/biblio/abbrev.scm
@@ -20,8 +20,8 @@
(define-module (skribilo biblio abbrev)
:use-module (srfi srfi-13)
- :autoload (skribilo ast) (markup? markup-body-set!)
- :autoload (skribilo runtime) (make-string-replace)
+ :autoload (skribilo ast) (markup? markup-body-set!)
+ :autoload (skribilo utils strings) (make-string-replace)
:autoload (ice-9 regex) (regexp-substitute/global)
:export (is-abbreviation? is-acronym? abbreviate-word
abbreviate-string abbreviate-markup
diff --git a/src/guile/skribilo/biblio/author.scm b/src/guile/skribilo/biblio/author.scm
index 43269ab..b9d78db 100644
--- a/src/guile/skribilo/biblio/author.scm
+++ b/src/guile/skribilo/biblio/author.scm
@@ -24,7 +24,7 @@
:use-module (skribilo biblio abbrev)
:autoload (skribilo ast) (markup-option markup-body markup-ident)
:autoload (skribilo lib) (skribe-error)
- :autoload (skribilo runtime) (make-string-replace)
+ :autoload (skribilo utils strings) (make-string-replace)
:export (comma-separated->author-list
comma-separated->and-separated-authors
diff --git a/src/guile/skribilo/biblio/bibtex.scm b/src/guile/skribilo/biblio/bibtex.scm
index be5ed36..ac6cf2a 100644
--- a/src/guile/skribilo/biblio/bibtex.scm
+++ b/src/guile/skribilo/biblio/bibtex.scm
@@ -20,9 +20,9 @@
(define-module (skribilo biblio bibtex)
- :autoload (skribilo runtime) (make-string-replace)
- :autoload (skribilo ast) (markup-option ast->string)
- :autoload (skribilo engine) (engine-filter find-engine)
+ :autoload (skribilo utils strings) (make-string-replace)
+ :autoload (skribilo ast) (markup-option ast->string)
+ :autoload (skribilo engine) (engine-filter find-engine)
:use-module (skribilo biblio author)
:use-module (srfi srfi-39)
:export (print-as-bibtex-entry))
diff --git a/src/guile/skribilo/coloring/lisp.scm b/src/guile/skribilo/coloring/lisp.scm
index e3458b1..b3efc51 100644
--- a/src/guile/skribilo/coloring/lisp.scm
+++ b/src/guile/skribilo/coloring/lisp.scm
@@ -24,7 +24,7 @@
:use-module (skribilo utils syntax)
:use-module (skribilo source)
:use-module (skribilo lib)
- :use-module (skribilo runtime)
+ :use-module (skribilo utils strings)
:use-module (srfi srfi-39)
:use-module (ice-9 match)
:autoload (ice-9 regex) (make-regexp)
diff --git a/src/guile/skribilo/module.scm b/src/guile/skribilo/module.scm
index 6a6301b..1206747 100644
--- a/src/guile/skribilo/module.scm
+++ b/src/guile/skribilo/module.scm
@@ -48,10 +48,10 @@
(skribilo utils syntax) ;; `unless', `when', etc.
(skribilo utils compat) ;; `skribe-load-path', etc.
(skribilo utils keywords) ;; `the-body', `the-options'
+ (skribilo utils strings) ;; `make-string-replace', etc.
(skribilo module)
(skribilo ast) ;; `<document>', `document?', etc.
(skribilo config)
- (skribilo runtime) ;; `make-string-replace', etc.
(skribilo biblio)
(skribilo lib) ;; `define-markup', `unwind-protect', etc.
(skribilo resolve)
diff --git a/src/guile/skribilo/utils/Makefile.am b/src/guile/skribilo/utils/Makefile.am
index 8f1d481..9d9df6f 100644
--- a/src/guile/skribilo/utils/Makefile.am
+++ b/src/guile/skribilo/utils/Makefile.am
@@ -1,5 +1,5 @@
guilemoduledir = $(GUILE_SITE)/skribilo/utils
dist_guilemodule_DATA = syntax.scm compat.scm files.scm images.scm \
- keywords.scm
+ keywords.scm strings.scm
## arch-tag: 3a18b64b-1da2-417b-8338-2c534bca277f
diff --git a/src/guile/skribilo/runtime.scm b/src/guile/skribilo/utils/strings.scm
index 73d776c..aea45c6 100644
--- a/src/guile/skribilo/runtime.scm
+++ b/src/guile/skribilo/utils/strings.scm
@@ -1,4 +1,4 @@
-;;; runtime.scm -- Skribilo runtime system
+;;; strings.scm -- Convenience functions to manipulate strings.
;;;
;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
@@ -18,28 +18,21 @@
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;; USA.
-(define-module (skribilo runtime)
- ;; FIXME: Useful procedures are scattered between here and
- ;; `(skribilo skribe utils)'.
- :export (;; Utilities
- strip-ref-base string-canonicalize
-
- ;; String writing
+(define-module (skribilo utils strings)
+ :export (strip-ref-base string-canonicalize
make-string-replace)
:autoload (skribilo parameters) (*ref-base*)
:use-module (skribilo lib)
:use-module (srfi srfi-13))
-
-;;; ======================================================================
+
;;;
-;;; U T I L I T I E S
+;;; Utilities.
;;;
-;;; ======================================================================
-
-;;FIXME: Remonter cette fonction
(define (strip-ref-base file)
+ ;; Given FILE, a file path (a string), remove `(*ref-base*)' from it.
+ ;; This is useful, e.g., for hyperlinks.
(if (not (string? (*ref-base*)))
file
(let ((l (string-length (*ref-base*))))
@@ -54,8 +47,9 @@
(substring file (+ l 1) (string-length file)))))))
-;; FIXME: Remonter cette fonction
(define (string-canonicalize old)
+ ;; Return a string that is a canonical summarized representation of string
+ ;; OLD. This is a one-way function.
(let* ((l (string-length old))
(new (make-string l)))
(let loop ((r 0)
@@ -88,11 +82,10 @@
-;;; ======================================================================
+
;;;
-;;; S T R I N G - W R I T I N G
+;;; String writing.
;;;
-;;; ======================================================================
;;
;; (define (%make-html-replace)
@@ -136,17 +129,17 @@
str)
(get-output-string out)))))
-(define string->html
- (%make-general-string-replace '((#\" "&quot;") (#\& "&amp;") (#\< "&lt;")
- (#\> "&gt;"))))
+(define %html-replacements
+ '((#\" "&quot;") (#\& "&amp;") (#\< "&lt;") (#\> "&gt;")))
+
+(define %string->html
+ (%make-general-string-replace %html-replacements))
(define (make-string-replace lst)
(let ((l (sort lst (lambda (r1 r2) (char<? (car r1) (car r2))))))
(cond
- ((equal? l '((#\" "&quot;") (#\& "&amp;") (#\< "&lt;") (#\> "&gt;")))
- string->html)
+ ((equal? l %html-replacements)
+ %string->html)
(else
(%make-general-string-replace lst)))))
-
-
diff --git a/src/guile/skribilo/verify.scm b/src/guile/skribilo/verify.scm
index 1bd874a..dfc3c0d 100644
--- a/src/guile/skribilo/verify.scm
+++ b/src/guile/skribilo/verify.scm
@@ -27,7 +27,6 @@
:export (verify))
(use-modules (skribilo debug)
- (skribilo runtime)
(skribilo ast)
(skribilo utils syntax)
(oop goops))