Requests for Comments
Please write to tell us about any flaws you find in this manual or how you think it could be
improved, to help us provide you with the best documentation possible.
Our U.S. mail address, phone numbers, and e-mail addresses are as follows:
O’Reilly and Associates, Inc.
103 Morris Street, Suite A
Sebastopol, CA 95472
in USA and Canada 1-800-998-9938,
international +1 707-829-0515
UUCP: uunet!ora!xview Internet: xview@ora.com
Obtaining the Example Programs
The example programs in this book are available electronically in a number of ways: by ftp,
ftpmail, bitftp, and uucp. The cheapest, fastest, and easiest ways are listed first. If you read
from the top down, the first one that works for you is probably the best. Use ftp if you are
directly on the Internet. Use ftpmail if you are not on the Internet but can send and receive
electronic mail to internet sites (this includes CompuServe users). Use
BITFTP if you send
electronic mail via BITNET. Use UUCP if none of the above works.
FTP
To use FTP, you need a machine with direct access to the Internet. A sample session is
shown, with what you should type in boldface.
% ftp ftp.uu.net
Connected to ftp.uu.net.
220 FTP server (Version 6.21 Tue Mar 10 22:09:55 EST 1992) ready.
Name (ftp.uu.net:eileen): anonymous
331 Guest login ok, send domain style e-mail address as password.
Password: eileen@ora.com (use your user name and host here)
230 Guest login ok, access restrictions apply.
ftp> cd /published/oreilly/xbook/xview
250 CWD command successful.
ftp> binary (Very important! You must specify binary transfer for compressed files.)
200 Type set to I.
ftp> get xview.ora.examples.tar.Z
200 PORT command successful.
150 Opening BINARY mode data connection for xview.ora.examples.tar.Z.
226 Transfer complete.
ftp> quit
221 Goodbye.
%
xxxviii XView Programming Manual
If the file is a compressed tar archive, extract the files from the archive by typing:
% zcat xview.ora.examples.tar.Z | tar xvf –
System V systems require the following tar command instead:
% zcat xview.ora.examples.tar.Z | tar xovf –
If zcat is not available on your system, use separate uncompress and tar commands.
FTPMAIL
FTPMAIL is a mail server available to anyone who can send and receive electronic mail to
and from Internet sites. This includes most workstations that have an email connection to the
outside world, and CompuServe users. You do not need to be directly on the Internet. Here’s
how to do it.
You send mail to ftpmail@decwrl.dec.com. In the message body, give the name of the anon-
ymous ftp host and the ftp commands you want to run. The server will run anonymous ftp for
you and mail the files back to you. To get a complete help file, send a message with no sub-
ject and the single word “help” in the body. The following is an example mail session that
should get you the examples. This command sends you a listing of the files in the selected
directory, and the requested examples file. The listing is useful in case there’s a later version
of the examples you’re interested in.
% mail ftpmail@decwrl.dec.com
Subject:
reply jerry@ora.com (where you want files mailed)
connect ftp.uu.net
chdir /published/oreilly/xbook/xview
dir
binary
uuencode (or btoa if you have it)
get xview.ora.examples.tar.Z
quit
%
A signature at the end of the message is acceptable as long as it appears after “quit.”
All retrieved files will be split into 60KB chunks and mailed to you. You then remove the
mail headers and concatenate them into one file, and then uudecode or btoa it. Once you’ve
got the desired file, follow the directions under FTP to extract the files from the archive.
VMS, DOS, and Mac versions of uudecode, btoa, uncompress, and tar are available. The
VMS versions are on gatekeeper.dec.com in /archive/pub/VMS.
Preface
Preface xxxix
BITFTP
BITFTP is a mail server for BITNET users. You send it electronic mail messages requesting
files, and it sends you back the files by electronic mail. BITFTP currently serves only users
who send it mail from nodes that are directly on BITNET, EARN, or NetNorth. BITFTP is a
public service of Princeton University. Here’s how it works.
To use BITFTP, send mail containing your ftp commands to BITFTP@PUCC. For a complete
help file, send HELP as the message body.
The following is the message body you should send to BITFTP:
FTP ftp.uu.net NETDATA
USER anonymous
PASS
your Internet email address (not your bitnet address)
CD /published/oreilly/xbook/xview
DIR
BINARY
GET xview.ora.examples.tar.Z
QUIT
Once you’ve got the desired file, follow the directions under FTP to extract the files from the
archive. Since you are probably not on a UNIX system, you may need to get versions of
uudecode, uncompress, btoa, and tar for your system. VMS, DOS, and Mac versions are
available. The VMS versions are on gatekeeper.dec.com in /archive/pub/VMS.
Questions about BITFTP can be directed to Melinda Varian, MAINT@PUCC on BITNET.
UUCP
UUCP
is standard on virtually all
UNIX systems, and is available for IBM-compatible PCs and
Apple Macintoshes. The examples are available by UUCP via modem from UUNET;
UUNET’s connect-time charges apply.
You can get the examples from UUNET whether you have an account or not. If you or your
company has an account with UUNET, you will have a system with a direct UUCP connection
to
UUNET. Find that system, and type:
uucp uunet\!˜published/oreilly/xbook/xview/xview.ora.examples.tar.Z yourhost\!˜/yourname/
The backslashes can be omitted if you use the Bourne shell (sh) instead of csh. The file
should appear some time later (up to a day or more) in the directory /usr/spool/uucppub-
lic/yourname. If you don’t have an account but would like one so that you can get electronic
mail, then contact
UUNET at 703-204-8000.
If you don’t have a UUNET account, you can set up a UUCP connection to UUNET using the
phone number 1-900-468-7727. As of this writing, the cost is 50 cents per minute. The
charges will appear on your next telephone bill. The login name is “uucp” with no password.
For example, an L.sys/Systems entry might look like:
uunet Any ACU 19200 1-900-468-7727 login:--login: uucp
xl XView Programming Manual
Your entry may vary depending on your UUCP configuration. If you have a PEP-capable
modem, make sure s50=255s111=30 is set before calling.
It’s a good idea to get the file /published/oreilly/xbook/ls-lR.Z as a short test file containing
the filenames and sizes of all the files in the directory.
Once you’ve got the desired file, follow the directions under FTP to extract the files from the
archive.
Acknowledgments
I always wanted to do this—but for my first record album! :-)
This book was influenced by an amalgamation of several sources: The SunView Program-
mer’s Manual for design and structure of the chapters, the people on the XView development
team at Sun Microsystems for technical detail and the latest up-to-the-minute changes, and
my personal experience in programming for narrative content. Chapter 1, XView and the X
Window System, is based on Chapter 1 of Volume Four, X Toolkit Intrinsics Programming
Manual, by Adrian Nye.
This book was created using SoftQuad’s sqtroff, a PostScript laser printer and a Sun 3/60
color workstation.
Special thanks to everyone at O’Reilly & Associates for their diligent efforts. In particular,
Dale Dougherty, Daniel Gilly, Laurel Katz, Lenny Muellner, Chris Reilley, Ruth Terry, and
Sue Willing. Many others pitched in for the final push to complete this book.
At Sun Microsystems, I’d like to thank Richard Probst who helped make this entire project
possible, Tom Jacobs, for keeping everything in order and reading all that e-mail, Tony
Hillman, and the rest of the reviewing squad.
Also, Bart Schaefer, for taking care of Mush while I’ve been too busy. Mike Ilnicki for con-
tinuing to play racquetball with me. Penguin’s frozen yogurt for nutrition. David Letterman
for being on at the perfect time: dinner.
. . . and most of all, I’d like to thank Tim O’Reilly—the only one who could talk me, a
cast-in-stone programmer, into trying my hand at technical writing. Thanks for the confi-
dence in me.
Preface
Preface xli
Acknowledgments for XView Version 3 Update
Thanks to John Stone for all his help in preparing this manual. John dealt with formatting
issues and helped produce several review drafts. Special thanks also go to Darci Chapman
for her assistance. Jon Lee edited several chapters of the draft.
Dale Dougherty kept the big picture in sight and managed this project. Thanks to Chris Reil-
ley who did the illustrations. Lenny Muellner, Sue Willing, Michael Sierra, and Eileen Kra-
mer put the final manual together.
The XView developers at Sun Microsystems spent many hours reviewing the new chapters as
well as the draft of the complete, updated manual. In particular, Chris Kasso added exten-
sively to the new Version 3 material and answered numerous questions. Thanks to Isa
Hashim who made many additions and corrections. Mitch Jerome was very helpful and pro-
vided a large amount of new material. Darren Austin, Sri Atreya, Shirley Joe, and Shanmugh
Natarajan reviewed several drafts and helped in numerous ways. Stan Raichlen helped to test
the code and update the figures. Thanks also go to Tony Hillman, Bhaskar Prabhala, and
Greg Kimura. Carole Coffland, Dave Borders, Jeremy Uejio, Dipti Ranganathan, Richard
Goldstein, and Martha Venegas read the draft of this manual and made helpful suggestions.
Despite all the reviews, any errors that remain are my own.
xlii XView Programming Manual
Get Volume 7A: XView Programming Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.