~ chicken-core (chicken-5) c3d916c026f2fdaacbea1c34613df65588e0dc1f
commit c3d916c026f2fdaacbea1c34613df65588e0dc1f Author: felix <felix@call-with-current-continuation.org> AuthorDate: Thu Dec 2 08:32:29 2010 -0500 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Thu Dec 2 08:32:29 2010 -0500 cleanups diff --git a/c-platform.scm b/c-platform.scm index 6ddff9d5..94ec7d37 100644 --- a/c-platform.scm +++ b/c-platform.scm @@ -84,7 +84,7 @@ check-syntax to-stdout no-usual-integrations case-insensitive no-lambda-info profile inline keep-shadowed-macros ignore-repository fixnum-arithmetic disable-interrupts optimize-leaf-routines - lambda-lift ;XXX removed + lambda-lift ; OBSOLETE compile-syntax tag-pointers accumulate-profile disable-stack-overflow-checks raw emit-external-prototypes-first release local inline-global diff --git a/compiler.scm b/compiler.scm index df653f14..2cc164a5 100644 --- a/compiler.scm +++ b/compiler.scm @@ -1400,7 +1400,7 @@ (for-each export-variable syms))) ((emit-external-prototypes-first) (set! external-protos-first #t) ) - ((lambda-lift) #f) ;XXX removed, remove this as well later + ((lambda-lift) #f) ; OBSOLETE ((inline) (if (null? (cdr spec)) (set! inline-locally #t) diff --git a/csc.scm b/csc.scm index ac9ab12c..55407855 100644 --- a/csc.scm +++ b/csc.scm @@ -133,7 +133,7 @@ '(-explicit-use -no-trace -no-warnings -no-usual-integrations -optimize-leaf-routines -unsafe -block -disable-interrupts -fixnum-arithmetic -to-stdout -profile -raw -accumulate-profile -check-syntax -case-insensitive -shared -compile-syntax -no-lambda-info - -lambda-lift ;XXX removed + -lambda-lift ; OBSOLETE -dynamic -disable-stack-overflow-checks -local -emit-external-prototypes-first -inline -release -scrutinize -analyze-only -keep-shadowed-macros -inline-global -ignore-repository diff --git a/library.scm b/library.scm index 9719e7d6..ffb9ff6d 100644 --- a/library.scm +++ b/library.scm @@ -801,7 +801,7 @@ EOF (fp-check-flonum x 'fpceiling) (##core#inline_allocate ("C_a_i_flonum_ceiling" 4) x)) -(define ##sys#floor fpfloor) ;XXX needed for backwards compatibility with "numbers" egg +(define ##sys#floor fpfloor) ;XXX needed for backwards compatibility with "numbers" egg (really?) (define ##sys#truncate fptruncate) (define ##sys#ceiling fpceiling) diff --git a/manual/Using the interpreter b/manual/Using the interpreter index 886e6a54..5248a991 100644 --- a/manual/Using the interpreter +++ b/manual/Using the interpreter @@ -121,6 +121,27 @@ to the shell. Any non-numeric result exits with status zero: 0 #;3> +When {{csi}} is started with the {{-script}} option, the feature identifier {{chicken-script}} +is defined, so can conditionally execute code depending on wether the file is +executed as a script or normally loaded into the interpreter, say for debugging purposes: + +<enscript highlight=scheme> +#!/bin/sh +#| demonstrates a slightly different way to run a script on UNIX systems +exec csi -s "$@" +|# + +(define (main args) ...) + +(cond-expand + (chicken-script + (main (command-line-arguments))) + (else)) +</enscript> + +See also the documentation for the {{-ss}} option above. + + === Toplevel commands The toplevel loop understands a number of special commands:Trap