[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: porting scigraph to other platforms



At 13:48 18/08/93 -0500, Kalman Reti wrote :
>At 11:17 8/18/93 -0500, Sheldon S. Ball wrote:
>>The next obstacle I have encountered in loading scigraph is in the file
>>dwim:tv.lisp. The code below presents a problem. I am using clim-1.1 &
>>MCL 2.0.
>>
>>;;;************** Code from tv.lisp ***********
>>
>>(defvar *default-server-path*
>>    #FEATURE-CASE
>>  (((and :clim-1.0 :genera) '(:sheet :screen (tv:console-default-superior)))
>>   ((and :clim-1.0 :xlib (not :genera)) '(:clx))
>>   (:clim-0.9 '(:clx))
>>   (:clim-2 '(:motif))
>>   ((not :clim) nil)))
>>
>>;;;*************** End code from tv.lisp **********
>>
>>Any suggestions would be appreciated.
>>Thanks,
>>Sheldon
>Well, #F isn't a defined dispatching macro character in Common Lisp.   Either
>this code is
>relying on some non-Common-Lisp feature of one or more Lisp implementations,
>or it defines
>this dispatching macro somewhere in itself but through some bug, it isn't
>enabled in your
>MCL environment at the time you try to load this file.
>
>You only have two options:  1) find source code for the #F reader macro and
>the resulting
>#FEATURE-CASE implementation and get it working or 2) recode the above as
>separate
>clauses each with their own #- and #+ clauses.

Kalman is right about that.  To go further: once you have modified
#FEATURE-CASE to use #+ and #-, you could use the code below to determine
how to open a clim root window on different platforms (which seems to be
what the *default-server-path* variable will be used for).

Good luck.

(this code can be downloaded from the clim library at cambridge.apple.com. 
It is named "/pub/clim/clim-1/portable-make-root-window.lisp")

;;; -*- Mode: LISP; Syntax: Common-lisp; Package: CLIM-USER; Base: 10 -*-

;;;This code is a compilation of ideas and code from (at least) Oliver Christ
;;;<oli@adler.ims.uni-stuttgart.de>, Meir Laker <meir@watson.ibm.com>, Koenraad
;;;de Smedt <desmedt@ruls40.leidenuniv.nl>, John Aspinall <jga@harlequin.com>,
;;;<lgm@iexist.att.com> and myself.
;;;
;;;It creates a root window on quite a number of clim platforms and stores it
;;;in the *portable-root-window* variable.  It is CLIM 1.1.
;;;
;;;Send bugs, improvements and comments to <keunen@montefiore.ulg.ac.be>
;;;
;;;Vincent
;;;
;;;Keunen Vincent                  Network Research Belgium
;;;R&D, Software Engineer          Parc Industriel des Hauts-Sarts
;;;tel 32 41 407282                2e Avenue, 65
;;;fax 32 41 481170                BE-4040 Herstal, Belgium
;;;<keunen@montefiore.ulg.ac.be> or <keunen@nrb.be>

(in-package :clim-user)

(defvar *portable-root-window* nil)

(defun make-root-window ()
  "Stores a root window in *portable-root-window* (unless there is one already)
   and returns it."
  (unless (and (boundp '*portable-root-window*) *portable-root-window*)
    (setq *portable-root-window*
          
          #+Lucid (open-root-window
                   :clx
                   :host (lcl:environment-variable "DISPLAY"))
          #+Allegro-v4.1 (open-root-window
                          :clx
                          :host (system:getenv "DISPLAY"))
          #+Lispworks (open-root-window
                      :clx
                      :host (sys::getenv "DISPLAY"))
          #+MCL          (open-root-window :mcl)
          #+Genera       (when (equal "Symbolics Common Lisp"
                                      (lisp-implementation-type))
                           (open-root-window :sheet))
          #+Cloe         (when (equal "Symbolics Cloe"
                                      (lisp-implementation-type))
                           (open-root-window :cloe))
          ;;Please contact keunen@montefiore.ulg.ac.be if you modify
          ;;this source code, for instance if you add new platforms support.
          ;;Thanks.
          ))
  (or (and (boundp '*portable-root-window*) *portable-root-window*)
      (error "~2&Unknown CLIM/LISP combination.  Couldn't establish a root
window!")))

(make-root-window)

Vincent

--
Keunen Vincent
R&D, Software Engineer
keunen@montefiore.ulg.ac.be
tel: +32 41 407282
fax: +32 41 481170