~ubuntu-branches/ubuntu/trusty/libctl/trusty-proposed

« back to all changes in this revision

Viewing changes to base/include.scm

  • Committer: Bazaar Package Importer
  • Author(s): Thorsten Alteholz
  • Date: 2009-07-29 19:00:01 UTC
  • mfrom: (1.1.5 upstream) (3.2.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090729190001-gpap13w4i2x8wh24
Tags: 3.1.0-1
* new upstream release
  - New ellipsoid_overlap_with_object function, analogous to 
    box_overlap_with_object function.
  - Bug fix in include function for recent versions of Guile, to properly 
    keep track of the current include directory.
  - Bug fix in numerical-derivative routine, which didn't converge when the 
    error was exactly zero. 
* as there is no NLopt package availabe, NLopt is disabled
* changed Standards-Version to 3.8.2
* changed copyright notice from GPL to GPL-2 (pedantic lintian hint)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
; libctl: flexible Guile-based control files for scientific software 
2
 
; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006, Steven G. Johnson
 
2
; Copyright (C) 1998-2009, Steven G. Johnson
3
3
;
4
4
; This library is free software; you can redistribute it and/or
5
5
; modify it under the terms of the GNU Lesser General Public
28
28
; the path of the top-level Guile invocation, which may not be the
29
29
; same as the path of the current Scheme file.  Our include function
30
30
; remembers the path of the current file and loads relative to this.
 
31
;
 
32
; Note that this problem of Guile's "load" function was fixed a long
 
33
; time ago, apparently.  But I still find it useful to have my own
 
34
; "include" function to keep track of the currently-loaded filename,
 
35
; which is used to prepend the ctl filename to output files.
31
36
 
32
37
(define (string-suffix? suff s)
33
38
  (if (> (string-length suff) (string-length s))
76
81
    (if (pathname-absolute? (car pathpair))
77
82
        (begin
78
83
          (set! include-dir (car pathpair))
79
 
          (load pathname))
 
84
          (primitive-load pathname))
80
85
        (begin
81
86
          (set! include-dir (string-append include-dir (car pathpair)))
82
 
          (load (string-append include-dir (cdr pathpair)))))
 
87
          (primitive-load (string-append include-dir (cdr pathpair)))))
83
88
    (set! include-dir save-include-dir))
84
89
  (set! include-files (cdr include-files)))
85
90