Commit df5e8310 authored by Erick's avatar Erick

Big source code patch with no modification: files are now encoded in UTF-8

parent 92418c9b
......@@ -6,7 +6,7 @@
mandir = $(prefix)/share/man
man_MANS = stklos.1 stklos-config.1 stklos-compile.1 stklos-genlex.1 \
stklos-pkg.1
stklos-pkg.1
EXTRA_DIST = $(man_MANS)
DOCDB = DOCDB
......@@ -39,7 +39,7 @@ skribe:
$(DOCDB): $(OTHERDB)
cat $(OTHERDB) > $(DOCDB)
../src/$(DOCDB):
../src/$(DOCDB):
(cd ../src; $(MAKE) doc)
../lib/$(DOCDB):
......
......@@ -215,7 +215,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
man_MANS = stklos.1 stklos-config.1 stklos-compile.1 stklos-genlex.1 \
stklos-pkg.1
stklos-pkg.1
EXTRA_DIST = $(man_MANS)
DOCDB = DOCDB
......@@ -567,7 +567,7 @@ skribe:
$(DOCDB): $(OTHERDB)
cat $(OTHERDB) > $(DOCDB)
../src/$(DOCDB):
../src/$(DOCDB):
(cd ../src; $(MAKE) doc)
../lib/$(DOCDB):
......
......@@ -45,6 +45,6 @@ clean:
rm -rf ./stklos-ref.* *~ *.mp html/* $(PDF)
install: Html Pdf
rm -rf ../html/*.html ../html/images/*;
rm -rf ../html/*.html ../html/images/*;
cp -a html/* ../html
cp -a $(PDF) ../pdf
;; ======================================================================
;;
;;
;; STklos Reference Manual
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
......
;;;; -*- Scheme -*-
;;;; biblio.skbib -- The biblio Data File STklos Doc
;;;;
;;;;
;;;; Copyright 2004-2005 Erick Gallesio - I3S-CNRS/ESSI <eg@essi.fr>
;;;;
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 1-Sep-2004 18:01 (eg)
;;;; Last file update: 3-Mar-2005 18:43 (eg)
......
;; ======================================================================
;;
;;
;; STklos Reference Manual
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
......@@ -60,8 +60,8 @@ exception handler.])
(insertdoc 'raise)
(insertdoc 'guard)
(insertdoc 'current-exception-handler))
(section :title "Conditions"
(p [The following text is extracted from ,(link-srfi 35), from which ,(stklos)
......@@ -128,9 +128,9 @@ condition, the expression])
(index "SRFI-35")
(index "SRFI-36")
(p [,(stklos) implements all the conditions types which are defined in
,(link-srfi 35) and ,(link-srfi 36).
However, the access functions which are (implicitely) defined
(p [,(stklos) implements all the conditions types which are defined in
,(link-srfi 35) and ,(link-srfi 36).
However, the access functions which are (implicitely) defined
in those SRFIs are only available if the file |"full-conditions.stk"| is
loaded. This can be done with the following call])
......@@ -140,7 +140,7 @@ loaded. This can be done with the following call])
(p [The following hierarchy of conditions is predefined:])
(raw-code [
&condition
&condition
&message (has "message" slot)
&serious
&error
......
;; ======================================================================
;;
;;
;; STklos Reference Manual
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
......
/*
* CSS for STklos Documentation
*
*
* Author: Erick Gallesio [eg@essi.fr]
* Creation date: 13-Oct-2004 11:42 (eg)
* Last file update: 10-Aug-2010 00:13 (eg)
*/
html {
html {
background: #F1EEE0;
}
h3 {
h3 {
font-size: 150%;
}
h4 {
h4 {
font-size: 120%;
}
......@@ -33,18 +33,18 @@ h4 {
.code {
border: 1px solid;
border: 1px solid;
border-bottom: 2px solid;
border-right: 2px solid;
}
A:link, A:visited {
color: #0B4796 ;
text-decoration: none;
text-decoration: none;
}
A:hover {
background: #aaaaff;
text-decoration: none;
background: #aaaaff;
text-decoration: none;
}
......@@ -13,7 +13,7 @@
%% Section
%%
\setuphead[section][
alternative=inmargin, textstyle=bold,
alternative=inmargin, textstyle=bold,
textcommand={\ss\color[darkred]}]
%%
......@@ -37,7 +37,7 @@
%%
%% Interaction
%% Interaction
%%
%\setupinteraction[state=start,color=blue]
......
;;;;
;;;; eg-web-book -- A variation of Manuel Web-book
;;;; eg-web-book -- A variation of Manuel Web-book
;;;;
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
......@@ -10,14 +10,14 @@
(define *html-engine* (environment-engine (skribe-environment)))
;;
;; Change default chapter title builder
;; Change default chapter title builder
;;
(define (html-build-chapter-n-*section-title type n e)
(let* ((doc (ast-document n))
(tparent (markup-ref doc 'title))
(tnode (markup-ref n 'title))
(tnum (markup-ref n 'number)))
(list tparent
(list tparent
(hrule :width 10. :align 'center)
tnum
(if tnum ". " "")
......@@ -30,33 +30,33 @@
(define (toc-browsing d c e)
(let ((chaps (find-down chapter? (markup-body d))))
(apply table :width 97. :border 1 :frame 'box :cellpadding 0 :cellspacing 0
(tr (th :align 'center :colspan 2 :bg "#ACE919"
(tr (th :align 'center :colspan 2 :bg "#ACE919"
(color :fg "darkolivegreen" "Contents")))
(tr :class "navnorm"
(td "")
(td :align 'left (ref :handle (handle d) :text "*Top*")))
(map (lambda (x)
(tr :class (if (eq? x c) "navsel" "navnorm")
(td :width 8. :align 'left :valign 'top
(td :width 8. :align 'left :valign 'top
(html-container-number (chapter-number x) e)
(symbol "nbs"))
(if (eq? x c)
(td :align 'left
(td :align 'left
(ref :handle (handle x))
(linebreak)
(toc :chapter #t :class "truc" :section #t :subsection #f
(handle c)))
(td :align 'left (ref :handle (handle x))))))
chaps))))
;; ----------------------------------------------------------------------
;; Environment Customization ...
;; ----------------------------------------------------------------------
(define *border-bg* "#8A8983")
(customize-environment!
(html
(customize-environment!
(html
:main-browing-extra #f
:chapter-file #t
:css "doc-style.css"
......
;; ======================================================================
;;
;;
;; STklos Reference Manual
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
......@@ -22,7 +22,7 @@
;;
;; ======================================================================
;; ======================================================================
;;
;; Expressions
......@@ -34,8 +34,8 @@
constructions are given
very succinctly here for reference. See ,(ref :bib "R5RS") for a complete
description.])
;;
;; LITERAL EXPRESSIONS
;;
......@@ -44,7 +44,7 @@ description.])
;;
;; PROCEDURES
;;
;;
(section :title "Procedures"
(index ":optional parameter")
(index ":rest parameter")
......@@ -64,7 +64,7 @@ description.])
;;
;; ASSIGNMENTS
;;
;;
(section :title "Assignments"
(index "assignment")
(insertdoc 'set!)
......@@ -72,7 +72,7 @@ description.])
;;
;; CONDITIONALS
;;
;;
(section :title "Conditionals"
(index "conditional")
......@@ -86,13 +86,13 @@ description.])
(insertdoc 'unless))
;;
;; BINDING constructs
;;
;; BINDING constructs
;;
(section :title "Binding Constructs"
(index "binding constructs")
[The three binding constructs ,(code "let"), ,(code "let*"), and
,(code "letrec") are available in STklos.
[The three binding constructs ,(code "let"), ,(code "let*"), and
,(code "letrec") are available in STklos.
These constructs differ in the regions they establish for
their variable bindings. In a ,(code "let") expression, the initial values are
computed before any of the variables become bound; in a ,(code "let*")
......@@ -133,13 +133,13 @@ values are being computed, thus allowing mutually recursive definitions.
(index "call by need")
(index "lazy evaluation")
(index "promise")
(insertdoc 'delay)
(insertdoc 'promise?))
;;
;; QUASIQUOTE
;;
;;
(section :title "Quasiquotation"
(index "quasiquote")
(index "backquote")
......@@ -148,8 +148,8 @@ values are being computed, thus allowing mutually recursive definitions.
(index ", in quasiquote")
(index ",@ in quasiquote")
(insertdoc 'quasiquote))
;;
;; MACROS
;;
......@@ -171,7 +171,7 @@ called ,(emph "Macro by Example") (Eugene Kohlbecker, R4RS) done by Dorai
Sitaram. This implementation generates low level STklos
macros. This implementation of hygienic macros is not expensive.])
(index "macros" :note "referentially transparent")
(index "macros" :note "referentially transparent")
(p [The major drawback of this implementation is that the macros are
not ,(emph "referentially transparent") (see section `Macros' in
R4RS for details). Lexically scoped macros
......@@ -182,11 +182,11 @@ macros. This implementation of hygienic macros is not expensive.])
large-scale disaster unless you're using system-function names as
local variables with unintuitive bindings that the macro can't
use. However, if you must have the full R5RS macro
functionality, you can do
functionality, you can do
,(fontified-code [(require "full-syntax")])
to have access to the more featureful (but also more expensive)
versions of ,(code "syntax-rules"). Requiring ,(code "\"full-syntax\"")
loads the version 2.1 of an implementation of hygienic macros by
to have access to the more featureful (but also more expensive)
versions of ,(code "syntax-rules"). Requiring ,(code "\"full-syntax\"")
loads the version 2.1 of an implementation of hygienic macros by
Robert Hieb and R. Kent Dybvig.])
(TODO "DOCUMENT THE LOW LEVEL EXPANDER MECHANISM")
......@@ -199,6 +199,6 @@ macros. This implementation of hygienic macros is not expensive.])
(index "Macros" :note "expansion")
(insertdoc 'macro-expand)
)
)
;;;;
;;;; ffi.skb -- FFI documentation
;;;;
;;;;
;;;; Copyright © 2007 Erick Gallesio - I3S-CNRS/ESSI <eg@essi.fr>
;;;;
;;;;
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2 of the License, or
;;;; (at your option) any later version.
;;;;
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;;; GNU General Public License for more details.
;;;;
;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this program; if not, write to the Free Software
;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;;; USA.
;;;;
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 22-Jun-2007 23:45 (eg)
;;;; Last file update: 25-Jun-2007 14:49 (eg)
......@@ -35,7 +35,7 @@ system should works on the following architectures/systems:
gcc_ppc_osx, gcc_sparc_unix, gcc_x64_unix, gcc_x86_unix.]). Moreover,
since FFI allows very low level access, it is easy to crash the
,(stklos) VM when using an external C function.])
(p (bold [Note that the support for FFI is still minimal and that it will
evolve in future versions.]))
......@@ -51,8 +51,8 @@ between the C and the Scheme worlds.])
(figure :legend "FFI types"
(center
(table :rules 'cols :frame 'border :width 90.
(tr :bg "#eeeeee"
(th :align "left" "Name")
(tr :bg "#eeeeee"
(th :align "left" "Name")
(th :align "left" "Corresponding C type")
(th :align "left" "Corresponding Scheme Type"))
(tr (tdl (bold ":void")) (tdl "void") (tdl "none"))
......@@ -76,13 +76,13 @@ between the C and the Scheme worlds.])
; (tr (tdl (bold ":int64")) (tdl "") (tdl ""))
(tr (tdl (bold ":obj")) (tdl "void *") (tdl "Any Scheme object passed as is")))))
(insertdoc 'define-external)
(insertdoc 'define-external)
(p [Hereafter, there are some commented definitions of external functions:])
(fontified-code [
(define-external isatty ((fd :int))
(define-external isatty ((fd :int))
:return-type :boolean)
(define-external system ((cmd :string))
......@@ -94,19 +94,19 @@ between the C and the Scheme worlds.])
(p [All these functions are defined in the C standard library, hence it is not
necessary to specify the ,(tt ":library-name") option.])
(itemize
(itemize
(item [,(emph "istty") is declared here as a function which takes an
integer and returns a boolean (in fact, the value returned by the
C function ,(emph "isatty") is an ,(emph "int"), but we ask here to the FFI
system to translate this result as a boolean value in the Scheme
world).])
(item [,(emph "system") is a function which takes a string as parameter
and returns an ,(emph "int").])
(item [,(emph "ttyname") is a function whih takes an int and returns a string.
Note that in this function the name of the parameter has been omitted
(item [,(emph "ttyname") is a function whih takes an int and returns a string.
Note that in this function the name of the parameter has been omitted
as within C prototypes.]))
(bold "TODO: describe malloc and malloc_atomic and their
......
;; ======================================================================
;;
;;
;; STklos Reference Manual
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
......
;; ======================================================================
;;
;;
;; STklos Reference Manual
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
......@@ -30,7 +30,7 @@
;; Introduction
;;
;; ======================================================================
(chapter :title "Introduction" :file #f
(chapter :title "Introduction" :file #f
;;; ======================================================================
;;;
......@@ -67,14 +67,14 @@ preferred GUI system is now based on GTK+
,(ref :bib "GTK"). Programmers used to GUI programming using
,(stklos) classes will find that both system, even if not
identical in every points, share the same philosophy.]))
;;; ======================================================================
;;;
;;; Section "Lexical Conventions"
;;;
;;; ======================================================================
(section :title " Lexical Conventions"
;; ----------------------------------------------------------------------
;; Subsection "Identifiers"
......@@ -99,29 +99,29 @@ section,(~),(ref :section "Keywords") for more information]))
(index "SRFI-30")
(p [There are four types of comments in ,(stklos):])
(itemize
(item [a semicolon ,(q (code ";")) indicates the start of a
comment. This kind of comment extends to the end of the line (as
described in ,(rfive)).])
(item [ multi-lines comment use the classical Lisp convention:
a comment begins with ,(q (code "#|")) and ends with ,(q (code "|#")).
This form of comment is now defined by ,(link-srfi 30).])
(item [a sharp sign followed by a semicolon ,(q (code "#;"))
comments the next Scheme expression. This is useful to comment
comments the next Scheme expression. This is useful to comment
a piece of code which spans multiple lines])
(item [comments can also be introduced by ,(q (code "#!"))''.
Such a comment extends to the end of the line which introduces
it. This extension is particularly useful for building ,(stklos)
scripts. On most Unix implementations, if the first line of a
script looks like this:
script looks like this:
,(pre [ #!/usr/local/bin/stklos -file ])
then the script can be started directly as if it was a binary
program. ,(stklos) is loaded behind the scene and
executes the script as a Scheme program. This form is compatible with
executes the script as a Scheme program. This form is compatible with
the notation introduced in ,(link-srfi 22)]
(p [Note that, as a special case, that the sequences
,(q (code "#!key")), ,(q (code "#!optional")) and
......@@ -137,11 +137,11 @@ DSSSL lambdas ,(ref :bib "dsssl:96").])) ))
(subsection :title "Here Strings"
(index "here string")
(index "string" :note "here")
(p [Here strings permit to easily enter multilines strings in programs.
The sequence of characters ,(emph "#<<") starts a here string. The characters
(p [Here strings permit to easily enter multilines strings in programs.
The sequence of characters ,(emph "#<<") starts a here string. The characters
following this sequence #<< until a newline character define a terminator for
the here string. The content of the string includes all characters between
the here string. The content of the string includes all characters between
the ,(emph "#<<") line and a line whose only content is the specified terminator.
No escape sequences are recognized between the starting and terminating lines.])
(p (bold "Example: ") "the sequence")
......@@ -153,25 +153,25 @@ def
EOF])
(p [is equivalent to the string ])
(pre ["abc\\ndef\\n ghi"]))
;; ----------------------------------------------------------------------
;; Subsection "Other Notations"
;; ----------------------------------------------------------------------
(subsection :title "Other Notations"
(p [,(stk) accepts all the notations defined in ,(rfive) plus])
(itemize
(item [,(q (code "[]")) Brackets are equivalent to