/[cl-gsl]/cl-gsl/util.lisp
ViewVC logotype

Contents of /cl-gsl/util.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Wed Mar 2 01:04:53 2005 UTC (9 years, 1 month ago) by edenny
Branch: cl-gsl, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
Initial Import
1 edenny 1.1 ;;;; -*- Mode: Lisp; Synatx: ANSI-Common-Lisp; Base: 10 -*-
2     ;;;;
3     ;;;; Copyright (C) 2005 Edgar Denny <edgardenny@comcast.net>
4     ;;;; This file is part of CL-GSL.
5     ;;;;
6     ;;;; This program is free software; you can redistribute it and/or modify
7     ;;;; it under the terms of the GNU General Public License as published by
8     ;;;; the Free Software Foundation; either version 2 of the License, or
9     ;;;; (at your option) any later version.
10     ;;;;
11     ;;;; This program is distributed in the hope that it will be useful,
12     ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13     ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     ;;;; GNU General Public License for more details.
15     ;;;;
16     ;;;; You should have received a copy of the GNU General Public License
17     ;;;; along with this program; if not, write to the Free Software
18     ;;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19    
20     (in-package #:cl-gsl)
21    
22     (defparameter *debug-output* t)
23     (defparameter *output-path* "/home/edenny/cl-gsl/debug.out")
24    
25     (defun reset-debug ()
26     (when *debug-output*
27     (with-open-file (strm *output-path*
28     :direction :output
29     :if-exists :supersede )
30     (format strm ""))))
31    
32     (defun debug-out (&rest args)
33     (when *debug-output*
34     (with-open-file (strm *output-path*
35     :direction :output
36     :if-exists :append)
37     (apply #'format (push strm args))
38     (format strm "~%")
39     (force-output strm))))
40    
41     (defmacro defconstant-export (symb val)
42     `(progn
43     (defconstant ,symb ,val)
44     (export '(,symb))))
45    
46     (defmacro register-constants (lst)
47     `(progn
48     ,@(mapcar #'(lambda (elm)
49     `(defconstant-export ,(car elm) ,(cadr elm)))
50     lst)))

  ViewVC Help
Powered by ViewVC 1.1.5