Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Problems using PHIGS from Lucid Common Lisp/DECsystem
@ 1992-02-28  2:08 George S Kardaras
  0 siblings, 0 replies; only message in thread
From: George S Kardaras @ 1992-02-28  2:08 UTC (permalink / raw)


Hello,

I'm trying to use PHIGS from Lucid Common Lisp/DECsystem, but there is a 
problem and it seems that the system doesn't recognize the environment variables
even though they are set through LISP. A session showing my problem is as
follows:

--------------------------------------------------------------------------
> (popenphigs 0 0)
41713665
> (popenws 1 0 0)
%VAXPHIGS-F-ERROR_NEG_2432, Internal PHIGS error: Error loading image PHIGS$WORKSTATION_n, check wstype logicals.
--------------------------------------------------------------------------

Having no clue as to what is wrong, I include the code for the LISP functions
used to access popenphigs and popenws along with the declaration of the
environment variables hoping that there will be someone who can help me solve
my problem.

Thanks in advance,
George S. Kardaras

--------------------------------------------------------------------------
(in-package "USER")

;; POPENPHIGS
(def-foreign-function (libphigs-popenphigs (:return-type :signed-32bit)
					   (:name "popenphigs")
					   (:language :C))
					   
  (error_file (:pointer :signed-32bit))
  (memory (:pointer :signed-32bit)))

(defun popenphigs (error-file memory)
  (let ((f-error (malloc-foreign-pointer :type `(:pointer :signed-32bit)))
	(f-mem (malloc-foreign-pointer :type `(:pointer :signed-32bit))))
    (setf (foreign-value f-error) error-file
      	  (foreign-value f-mem) memory)
    (prog1 (libphigs-popenphigs f-error f-mem)
      (free-foreign-pointer f-error)
      (free-foreign-pointer f-mem))))

;; POPENWS
(def-foreign-function (libphigs-popenws (:return-type :signed-32bit)
					(:name "popenws")
					(:language :C))
  (ws (:pointer :signed-32bit))
  (connection (:pointer :signed-32bit))
  (type (:pointer :signed-32bit)))

(defun popenws (ws connection type)
  (check-type ws integer)
  (check-type connection integer)
  (check-type type integer)
  (let ((f-ws (malloc-foreign-pointer :type '(:pointer :signed-32bit)))
	(f-con (malloc-foreign-pointer :type '(:pointer :signed-32bit)))
	(f-type (malloc-foreign-pointer :type '(:pointer :signed-32bit))))
       (setf (foreign-value f-ws) ws
	     (foreign-value f-con) connection
	     (foreign-value f-type) type)
       (prog1 (libphigs-popenws f-ws f-con f-type)
	      (free-foreign-pointer f-ws)
	      (free-foreign-pointer f-con)
	      (free-foreign-pointer f-type))))

(load-foreign-libraries nil '("-lddif" "-ldwt" "-lcursesX" "-lc" "-lX11" "-lm" "-lc" "-lPHIGSC"))

(setf (system::environment-variable "PHIGSwstype") "211")
(setf (system::environment-variable "PHIGSconid") "droid:0.0")
(setf (system::environment-variable "CONID") "droid:0.0")
(setf (system::environment-variable "DISPLAY") "droid:0.0")
--------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-02-28  2:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1992-02-28  2:08 Problems using PHIGS from Lucid Common Lisp/DECsystem George S Kardaras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox