[comp.windows.x] SunView-XView Conversion ?

himsolt@trillian-gw.fmi.uni-passau.de (Michael Himsolt) (10/16/90)

Hello,

I am trying to convert a SunView application to XView, using XView 2.0
with  X11R4.  I    wonder  whether  someone    has   experiences  with
SunView-XView conversion.

I have some questions :

- Sun claims easy conversion "within a view days". Any comments ?

- My program involves both (a lot  of) SunView windows  and a built-in
"graphic system"  using Pixrect.  What  about  XView performance under
these circumstances  ?   The  system must run  on a SUN-3/50 with good
performance (the SunView version had no problems).

I  have started  some work  on   porting and  ran  into the  following
problems :

- I could  not  print  the  'Book.ps' file  distributed   with   XView
(xview/doc/conversion/Book.ps)   on our laserwriter.  The  laserwriter
stopped at  page 13; the next feature  should have been a sample  Open
Look screen. Any ideas what has gone wrong ?

- Pixrect support seems to  be strange.   Without linking -lpixrect, I
get warnings that   mem_create and pr_text  are undefined,  the  other
routines seem to be defined.  [I tried  to link  -lpixrect, but then I
got a runtime error that  pr_vector is unsupported].  As stated above,
the program is   heavily based on  PixRect, so  I need it.  Is there a
reasonable PixRect support in XView ?

- Sun seems to provide some PixWin-compatible procedures, but  I could
not find anything about that in the XView Programming manual.

All suggestions are welcome - thanks in advance

-- Michael

--
Michael Himsolt, Universitaet Passau, Innstrasse 33,   D-8390 Passau, GERMANY
himsolt@fmi.uni-passau.de                           graphed@fmi.uni-passau.de

cook@sgi.com (Doug Cook) (10/16/90)

In article <HIMSOLT.90Oct15131455@trillian-gw.fmi.uni-passau.de> himsolt@trillian-gw.fmi.uni-passau.de (Michael Himsolt) writes:

>I am trying to convert a SunView application to XView, using XView 2.0
>with  X11R4.  I    wonder  whether  someone    has   experiences  with
>SunView-XView conversion.

>- Sun claims easy conversion "within a view days". Any comments ?

Sun's claim is both true and untrue.  You can probably get your application up 
and running fairly quickly.  However, if you use a lot of pw (pixwin) calls, 
you'll probably want to convert them over to Xlib drawing for performance 
reasons. XView supports most of pixwin for backwards compatibility, but there 
are serious performance penalties for using this functionality. That is
why most of the XView pixwin calls are (largely) undocumented; they're
not meant to be used for "serious" applications. This conversion to Xlib
may require a substantial amount of effort.

>- I could  not  print  the  'Book.ps' file  distributed   with   XView
>(xview/doc/conversion/Book.ps)   on our laserwriter.  The  laserwriter
>stopped at  page 13; the next feature  should have been a sample  Open
>Look screen. Any ideas what has gone wrong ?

There was a patch for this posted to the net a while back. I don't know
if the Book.ps file on expo was updated. 

	-Doug

Doug Cook				|"Why don't you break up with her?" I
Video Group, Advanced Systems Division	| asked.
Silicon Graphics, Inc.			|"WELL, SHE DOESN'T ALWAYS BEAT ME UP,"
Mountain View, CA			| Owen replied.
					|		-John Irving

tomj@snowking.Eng.Sun.COM (Tom Jacobs) (10/16/90)

In article <HIMSOLT.90Oct15131455@trillian-gw.fmi.uni-passau.de>,
himsolt@trillian-gw.fmi.uni-passau.de (Michael Himsolt) writes:
|> 
|> Hello,
|> 
|> I am trying to convert a SunView application to XView, using XView
2.0
|> with  X11R4.  I    wonder  whether  someone    has   experiences 
with
|> SunView-XView conversion.
|> 
|> I have some questions :
|> 
|> - Sun claims easy conversion "within a view days". Any comments ?

Experience has shown that conversion is heavily dependent upon how much
pixrect/pixwin graphics your program does.  We suggest that graphics 
programs take the extra time to convert their graphics logic to Xlib.
To help with this, Appendix E of the Conversion Guide provides a pretty
detailed logical conversion description.  Programs that are don't use
pixrect/pixwin have consistently been converted in only a few days.

|> - My program involves both (a lot  of) SunView windows  and a
built-in
|> "graphic system"  using Pixrect.  What  about  XView performance
under
|> these circumstances  ?   The  system must run  on a SUN-3/50 with
good
|> performance (the SunView version had no problems).

Whether you convert the graphics or not, it isn't clear that you'll
ever
get "as good" performance on X11 as you did in kernal-based SunView.  
However, converting from pixrect/pixwin to Xlib serves the additional
benefit of allowing you to update you programs logic to be more
maintainable
over the longer term.  Also, there are some displayability problems
with
pixwin emulation which conversion solves.

|> I  have started  some work  on   porting and  ran  into the 
following
|> problems :
|> 
|> - I could  not  print  the  'Book.ps' file  distributed   with  
XView
|> (xview/doc/conversion/Book.ps)   on our laserwriter.  The 
laserwriter
|> stopped at  page 13; the next feature  should have been a sample 
Open
|> Look screen. Any ideas what has gone wrong ?

A patch for this was sent out.  Send a request to xviewbugs@sun.com and
we'll
resend the patch.
 
|> - Pixrect support seems to  be strange.   Without linking -lpixrect,
I
|> get warnings that   mem_create and pr_text  are undefined,  the 
other
|> routines seem to be defined.  [I tried  to link  -lpixrect, but then
I
|> got a runtime error that  pr_vector is unsupported].  As stated
above,
|> the program is   heavily based on  PixRect, so  I need it.  Is there
a
|> reasonable PixRect support in XView ?

You need to xv_mem_create and pw_text if you're not linking with
libpixrect.
This is the pixwin emulation mode.  Sounds like you really need the
doc.
You might call Sun direct (800)USA-4-SUN and order the hardcopy manual
(just to be sure) using the part number 800-4836-10.  The charge is
minimal
and only covers material and shipping.

|> - Sun seems to provide some PixWin-compatible procedures, but  I
could
|> not find anything about that in the XView Programming manual.

The "XView Version 2 Reference Manual: Converting SunView Applications"
doc
described is the correct place for pixwin compatibility.  Sun
"officially"
suggests that you convert to Xlib graphics.

|> All suggestions are welcome - thanks in advance
|> 
|> -- Michael
|> 
|> --
|> Michael Himsolt, Universitaet Passau, Innstrasse 33,   D-8390 Passau,
GERMANY
|> himsolt@fmi.uni-passau.de                          
graphed@fmi.uni-passau.de

---
Tom Jacobs				ARPA: tomj@Eng.Sun.com
Windows & Graphics Software		UUCP: sun!tomj
Sun Microsystems, Inc.

sarima@tdatirv.UUCP (Stanley Friesen) (10/20/90)

I am posting this because I can never get any mail through snorkelwacker.

In article <HIMSOLT.90Oct15131455@trillian-gw.fmi.uni-passau.de> himsolt@trillian-gw.fmi.uni-passau.de (Michael Himsolt) writes:
>I am trying to convert a SunView application to XView, using XView 2.0
>with  X11R4.  I    wonder  whether  someone    has   experiences  with
>SunView-XView conversion.

Yes.

>- Sun claims easy conversion "within a view days". Any comments ?

In general they are correct.  There are a number of gotcha's though.
(The awk script that does the base conversion does a good job of pointing
most of them out though, so it is not too bad)

>- My program involves both (a lot  of) SunView windows  and a built-in
>"graphic system"  using Pixrect.  What  about  XView performance under
>these circumstances  ?   The  system must run  on a SUN-3/50 with good
>performance (the SunView version had no problems).

Well, the Pixrect stuff is the hardest to convert, it does not really exist
under X.   You will need to rewrite the Pixrect code into xlib calls on the
underlying window.  (Some of the most basic PixWin stuff is simulated with
macros under XView, but it is not very complete, or efficient).

This is the worst of the gotcha's - and the hardest part of the conversion.

>- Pixrect support seems to  be strange.   Without linking -lpixrect, I
>get warnings that   mem_create and pr_text  are undefined,  the  other
>routines seem to be defined.  [I tried  to link  -lpixrect, but then I
>got a runtime error that  pr_vector is unsupported].  As stated above,
>the program is   heavily based on  PixRect, so  I need it.  Is there a
>reasonable PixRect support in XView ?

No.  it looks like you will need to convert more completely.

>- Sun seems to provide some PixWin-compatible procedures, but  I could
>not find anything about that in the XView Programming manual.

Because they are provided for compatibility only, and are not supported.
(That is they are 'depreciated').   your best bet is to really convert to
xlib for the low-level graphics.

-- 
---------------
uunet!tdatirv!sarima				(Stanley Friesen)