'\"!  tbl | mmdoc
.if n .pH port.chap13 @(#)chap13	40.4
.\" Porting manual: Ch. 13 NeWS Clients
.\"
.\" @(#)compilers.mex 1.2 89/07/20 Copyright 1989 Sun Micro
.\"
.\" Ps = POSTSCRIPT
.\" Sd = NeWS
.\" Cs = CSCRIPT

.\" .BK "\s-2X11/Ne\h'-0.2n'WS\s+2 Porting Manual"
.\" .RV "Revision A of \n(dy"
.\" .RV "3 October 1989--Chapter 7, NeWS Clients"

.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
.ds Sd \s-2Ne\h'-0.2n'WS\s+2
.ds Cs \CS\s-2CRIPT\s+2
.BK "Porting the X11/NeWS Server"
.CH "NeWS Clients" 13
.H 1 "NeWS Clients" 
.H 2 "Introduction"
This section describes how to get the NeWS clients running. 
Most clients should require 
no changes of any kind. This chapter consists of following sections:
.BL
.LI
Client Categorization
.LI
Porting Procedure by Category

.LE
.H 1 "Client Categorization"
.P
There are essentially four categories of \*(Sd clients. The type and
degree of porting effort required for the clients in each category
are similar.  The client categories are:
.AL
.LI
Shell Scripts - clients written as shell scripts. These clients
should require no changes to run.
.LI 
PostScript Clients - clients written entirely in PostScript.
These clients should also require no changes, but will
require 
.UI psh 
in order to test.
.LI
CPS (C to \*(Ps)clients - clients that require cps preprocessing 
in order to compile.  The cps preprocessor is used to interface C code
to \*(Ps code.  These may require a small number of changes.
.LI 
C Program Clients - clients written in C. These clients are
generally the most complex and will require the greatest
amount of effort. 
.LE
.P
The following is a comprehensive list of each client and its category.
Note that some of the clients are a combination of shell script 
and PostScript code.
.TS
center;
l l.
Key:	PS  = PostScript
	CPS = cps clients
	C   = regular C clients
	SH  = shell script
.TE
.TS
center, box;
l l | l l.
client:		category:	client:		category:
_
24to8	C	NeWSico	CPS
calcul	PS	chalk	C
colormap	PS	colornames	PS
colorwheel	PS	fader	PS
fish	PS	flyinglogos	PS
gammon	C	go	CPS
hyperview	C	imagedemo	PS
imagedump	SH/PS	journaldemo	C
kbmode	C	languagedemo	PS
lines	PS	magnify	PS
monaeyes	PS	newshost	SH
newsserverstr	C	nxlogo	PS
objectdiff	C	objectwatcher	SH
pageview	CPS	pam	PS
piechart	PS	poly	PS
psh	C	psindent	C
psman	SH	psps	PS
roundclock	PS	rubber	PS
say	CPS	scaledtext	PS
buildmenu	C	spin	PS
spiral	PS	technichron	CPS
test.psh	PS	tetris	PS
text	PS	vectors	PS
widedemo	PS	wink	PS
world	PS	xvplaces	SH/PS
.TE
.H 1 "Porting Procedure by Category"
.P
Although not critical, it is logical to start with the easier clients and 
work toward the harder ones.  The order described here can therefore be 
taken as a recommended order, except where specifically stated otherwise.
.P 
Note that 
.UI psh 
is required to test the PostScript clients. If 
.UI psh 
has not yet been ported, do so now.
.P
Before starting on the cps clients, you will need 
.UI libcps.a 
to have been created and the 
.UI cps 
command should be available in the 
.UI $DESTDIR/usr/bin directory . 
The steps required to generate these are described in the chapter 
on porting the PostScript Interpreter.

.H 2 "Shell Scripts"
Those clients which are written entirely as shell scripts
should require no changes. Simply execute these clients to test them.
.H 2 "PostScript Clients"
The PostScript clients should not require any changes
at all. It should be sufficient to test them one by one
using 
.UI psh . 
For example, 
.UI "psh bounce &" 
should bring up the bounce demo on the screen.
.H 2 "CPS Programs and Regular C Programs"
These may require some general portability changes. Compile
and test them.
If they don not work, refer to the following section for 
guidance.
.H 1 "General Porting Issues"
It shouldn't be necessary to introduce many changes to the clients
if they're being copied to a standard System V or Berkeley system, but
here are some of the things to watch out for:
.P
.H 2 ref/config.h
The file 
.UI ref/config.h 
has appropriate type declaration defined according
to machine architecture. Make sure all type declarations such as
int and unsigned long have been converted to the 
appropriate portable type (e.g., Unsgn16) and 
.UI ref/config.h
has been included in each file.
.H 2 "Makefiles"
.P
It may be necessary to include extra libraries to
compile some of the source on a new system.
.H 2 "Include Files"
It may be necessary to include more or different
include files. Make sure these changes are 
ifdef'd
appropriately to avoid losing portability.
.H 2 "System Calls"
If your system is missing some of the required
BSD system calls, it will be necessary to add them
to the compatability library.

