~ubuntu-branches/ubuntu/saucy/libctl/saucy

« back to all changes in this revision

Viewing changes to base/include.scm

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2006-05-01 20:25:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060501202501-lytbmb3oevyoqzxi
Tags: 3.0.1-1
* New upstream release (closes: #361676).
* Major rework of the debian/ directory. Switch to cdbs.
* Migrate Scheme files to a versioned location to allow several
  versions to be installed at once.
* Write a Makefile to put with the example.
* Update copyright, the library is now GPL.
* Use gfortran for the F77 wrappers.
* Standards-version is 3.7.0.

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, Steven G. Johnson
 
2
; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006, 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
44
44
            last-index
45
45
            (string-find-previous-char (substring s 0 last-index) c)))))
46
46
 
 
47
(define (strip-suffix suff s)
 
48
  (if (string-suffix? suff s)
 
49
      (substring s 0 (- (string-length s) (string-length suff)))
 
50
      s))
 
51
 
47
52
(define (strip-trailing-slashes s)
48
53
  (if (string-suffix? "/" s)
49
54
      (strip-trailing-slashes (substring s 0 (- (string-length s) 1)))
62
67
 
63
68
(define include-dir "")
64
69
 
 
70
(define include-files '()) ; a list of included files, most recent first
 
71
 
65
72
(define (include pathname)
 
73
  (set! include-files (cons pathname include-files))
66
74
  (let ((save-include-dir include-dir)
67
75
        (pathpair (split-pathname pathname)))
68
76
    (if (pathname-absolute? (car pathpair))
72
80
        (begin
73
81
          (set! include-dir (string-append include-dir (car pathpair)))
74
82
          (load (string-append include-dir (cdr pathpair)))))
75
 
    (set! include-dir save-include-dir)))
 
83
    (set! include-dir save-include-dir))
 
84
  (set! include-files (cdr include-files)))
76
85
 
77
86
(define (fix-path pathname)
78
87
  (if (pathname-absolute? pathname)