ftp.nice.ch/pub/next/unix/text/Webster.a5.s.tar.gz#/Webster/Clients/xwebster.motif

Imakefile
 
README
 
README.mayer
 
Xwebster.ad
 
Xwebster.ad.hp_widgets
 
controlpanel.c
[View controlpanel.c] 
display_def.c
[View display_def.c] 
patchlevel.h
[View patchlevel.h] 
user_prefs.h
[View user_prefs.h] 
wordlist.c
[View wordlist.c] 
xwebster.c
[View xwebster.c] 
xwebster.h
[View xwebster.h] 
xwebster.man
[View xwebster.man] 

README

                      Xwebster Motif


Please NOTE I do not have the address of any webster servers (niether
does Niels) I am sorry about this, but if you want more details please
read README.mayer.

If you have any suggestion/comments please direct them to me,
(cattelan@everest.ee.umn.edu) not Niels.

Whats new?
	Well not alot, for the most part this is still the same program just
redone to use the Motif Widgets. 
	The most significant change is the additional support for the
NeXT version of websterd by Steve Hayman. Since the NeXTS also have
the 9th edition Thesaurus as well the 9th edition Dictionary online
Steve's version of websterd now has the "INDEX" directive, that allows
slections of which data base to use.
	To support both version of websterd I have added an additonal
application resource "dictionarySource" by default this is set to the
string "next" (Since that is the one I am using) if your webster
server is not the NeXT version set this string to something else. 
(ie "other").

	It is important to note that the NeXT websterd will be set
into "dictionary mode" or "thesaurus mode" depending upon which button
is clicked.  Clicking on Define will put it into dictionary mode,
clicking on Thesaurus will put it into thesaurus mode. It will remain
in a particular mode until set to something different, which means
typing a word into the input box and then hitting <Return>  will do a
lookup based on whatever mode the websterd is currently in. 

For example typing "moon" and then clicking the Thesaurus button will
set the websterd into thesaurus mode and do a lookup of the word "moon".
If you then type "cow" and hit <Return> you will get a thesaurus
lookup of the word cow. It will continue to do thesaurus lookup until 
the Define button is clicked.

	The Xwebster.ad has been set up with emacs keybindings for
both the word input box, and the definition display box if you do not
care for these bindings either comment them out of the Xwebster.ad
file or change them to your liking. 


Compiling should be fairly straight forward.

%xmkmf
%make
Finally check the values of "hostAddrList" and "hostPort" in the
Xwebster.ad file and...
%make install



This should put the Xwebster.ad in the "app-defaults" directory and
xwebster in your BINDIR directory.

Any comments, suggestions drop me a line.

--------------------------------------------------------------
						Russell Cattelan
					cattelan@everest.ee.umn.edu
			University of Minnesota, Electrical Engineering dept

README.mayer

If you have questions/contributions/changes to make to xwebster, please
send them to cattelan@everest.ee.umn.edu, and not to Niels Mayer
(mayer@hplabs.hp.com).

PLEASE NOTE THAT REQUESTS FOR INFORMATION ON GETTING WEBSTER DATABASE
SERVERS WILL BE CHEERFULLY IGNORED. FOR MORE INFORMATION ON WEBSTER
DATABASE SERVERS, READ THE FOLLOWING USENET POSTINGS:

==============================================================================

Path: hplabsz!hplabs!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!bloom-beacon!UMIACS.UMD.EDU!steve
From: steve@UMIACS.UMD.EDU
Newsgroups: comp.windows.x
Subject: XWebster servers -- the whole story?
Message-ID: <9011201440.AA29872@skippy.umiacs.UMD.EDU>
Date: 20 Nov 90 14:40:09 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Reply-To: steve@umiacs.umd.edu
Organization: The Internet
Lines: 51

[ *Please* reply directly to me -- there's no sense in rehashing this issue
every six months! ]

   I brought this up with the editor of the Frequently-Asked Questions
blurbs, and it seemed like there was some interest in clarifying the matter
there.  Since I guess I volunteered, I'd like to arrive at the One True
Version of the facts, which we can then put in the FAQ sheet.  So here's
what I understand to be the case, and if you know differently, I'd
appreciate your comments and corrections...  Please do *not* take this as
gospel (at least, not yet (-:  ).

   Once upon a time, various sites (SRI, Boston University, and others)
ended up with an online copy of some edition of Webster's Dictionary.  This
copy was somehow research-related; I gather that after the pertinent
research was done, the sites involved were allowed to keep the online
dictionary.  However, Webster's still owns the copyright, and therefore
thoses sites weren't allowed to redistribute the online copy.

   After a while, someone decided that it would be a neat hack to have a
webster server running -- you'd fire off a query of some sort, and you'd get
back a set of responses, straight from the horse's mouth.  (I agree that
this is a neat hack, for what that's worth.)  There wasn't a whole lot of
security designed into the system, so while the initial set of people using
the servers was pretty small (and confined to the sites with the legal right
to use the dictionary), word eventually got out, and people started writing
software to use the webster servers.  Eventually (as xwebster and the
gnumacs webster hacks started spreading like wildfire), the folks at
Webster's realized what was going on, and asked the sites running webster
servers to cease doing so.  These sites would continue to be allowed to use
the dictionary at their own sites, but were not allowed to let others do so.

   Also for what it's worth, lest someone decide to hack out a server that
runs on NeXT machines (which also come with Webster's online), I think I
heard somewhere that one can access any NeXT-resident copy of Webster's from
any machine licensed for the online Webster's -- which pretty much means
from any NeXT machine.

   So if you're looking for a Webster server, you're probably out of luck,
and if you find one, you're probably doing something illegal.  Should a
*provably legal* Webster server exist somewhere, and should the providers of
that service not mind the extra load of providing that service to possibly
many people, I'd love to know about it; lots of people here screamed bloody
murder when we yanked our webster software, and I'm sure that they (and I)
would like to have it back.  For that matter, if you know what it takes to
get an online copy *legally*, it might be worth putting that into the FAQ,
too.

	-Steve

Spoken: Steve Miller    Domain: steve@umiacs.umd.edu    UUCP: uunet!mimsy!steve
Phone: +1-301-405-6736  USPS: UMIACS, Univ. of Maryland, College Park, MD 20742

==============================================================================

Path: hplabsz!hplabs!ucbvax!ucsd!usc!apple!hercules!sparkyfs!davy
From: davy@sparkyfs.istc.sri.com (David Curry)
Newsgroups: comp.windows.x
Subject: Re: xwebster server
Message-ID: <32543@sparkyfs.istc.sri.com>
Date: 9 Aug 90 16:02:27 GMT
References: <LEGOWIK.90Aug6162504@tobor.cme.nist.gov> <chris.650042683@sage0> <5751@hplabsz.HPL.HP.COM> <NARTEN.90Aug8135615@percival.albany.edu>
Reply-To: davy@intrepid.itstd.sri.com.UUCP (David Curry)
Distribution: comp.windows.x
Organization: SRI International, Menlo Park, CA 94025
Lines: 70

I suppose, being the author of the UNIX version of the webster
client/server, that I should stick my nose into this and clear up some
of the confusion.  Whoever maintains the "commonly asked questions"
document might want to consider adding this information.  The query
seems to reappear every couple of months.

The following is what I sent out a few years ago to holders of the
dictionary who are/were using the dictionary:

----------------
							November 25, 1987

This is Webster's 7th Collegiate Dictionary.  It is Copyright (C) 1963 by
Merriam-Webster, Inc.  The machine-readable version of this dictionary is
due to a government contract with System Development Corporation, who had
the dictionary transcribed via keypunch in the early 1970's.

I have contacted Merriam-Webster about the status of this dictionary, and
have been asked by them to state the following:

        1. This dictionary may be used for research purposes only.  It
           may not be made commercially available, and the data from the
           dictionary may not be used in any publications without express
           written consent of the publisher.

        2. This dictionary may not be redistributed, as Webster is trying
           to prevent the increased distribution of this information
           (which was never intended for distribution in the first place).

        3. This dictionary may not be made available over any wide-area
           networks such as the ARPAnet.

        4. This dictionary, and the software accompanying it, are most
           definitely NOT in the public domain.
----------------

They had three reasons they didn't want the dictionary distributed:

	1. It's a dictionary from 1963.  A bit out-of-date, to say the
	   least.
	2. They had no quality-control over the keypunching.  There are
	   numerous typos.
	3. They have their own electronic dictionary products (the Franklin
	   consumer electronics things).

I do not know if M-W or anyone else is offering a machine-readable
dictionary, other than the OED on the NeXT machine.  I've heard
someone (at Indiana Univ.???) has modified the webster server to use
this dictionary, but I don't know about availability.

Even if you didn't read the rest of the article, please read this part:

	1. NO, I CANNOT GIVE YOU A COPY OF THE DICTIONARY.  Please
	   don't ask.  Re-read the above if you want to know why.

	2. NO, I CANNOT GIVE OUT THE NAMES OF PLACES WHICH HAVE IT.
	   Please don't ask.  Most of them no longer make the
	   dictionary available to the outside world, anyway.

	3. NO, I DO NOT HAVE THE DICTIONARY SERVER RUNNING ON ANY
	   MACHINES LOCALLY.  Please don't bang on our machines
	   looking for one.

Queries for the above items will be cheerfully ignored.

Yes, this means that unless you already have a copy of the dictionary
and server, or know where a server is, "webster" and "xwebster" are
pretty useless.  Sorry.

Dave Curry

==============================================================================

Path: hplabsz!hplabs!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!pasteur!icsi.Berkeley.EDU!stolcke
From: stolcke@icsi.Berkeley.EDU (Andreas Stolcke)
Newsgroups: comp.windows.x
Subject: Re: FYI: a working xwebster host
Message-ID: <24831@pasteur.Berkeley.EDU>
Date: 8 May 90 02:29:25 GMT
References: <DRICH.90May4131044@klaatu.lanl.gov> <5256@hplabsz.HPL.HP.COM>
Sender: news@pasteur.Berkeley.EDU
Reply-To: stolcke@icsi.Berkeley.EDU (Andreas Stolcke)
Distribution: comp
Organization: International Computer Science Institute, Berkeley
Lines: 40

In article <5256@hplabsz.HPL.HP.COM>, mayer@hplabsz.HPL.HP.COM (Niels
Mayer) writes:
|> In article <DRICH.90May4131044@klaatu.lanl.gov> drich@klaatu.lanl.gov
(David O. Rich) writes:
|> >   Try:
|> >
|> >   128.32.136.1 (agate.Berkeley.EDU)
|> >   in the hostAddrList.
|> 
|> Well, now that this info is public, we'll see how long this webster server
|> port lasts....
|> 

I too am wondering.  A while ago I posted a similar query for webster servers
and was lucky to find a local one (said agate.Berkeley.EDU).
I would strongly encourage xwebster users to post a request to their local news
group (or whereever) to locate a nearby server.

To save poor old agate at least from folks at Toronto, Indiana and Brown,
here are some more addresses I found in my quest:

	neat.cs.toronto.edu	128.100.1.65
	iuvax.cs.indiana.edu	129.79.254.19
	bu-it.bu.edu		128.197.2.40

You'll need

	xwebster.hostPort:     2627

in your resources to access these.

Now, if you have a NeXT machine on your network somewhere (and are
entitled to using it) you might want to tap its on-line Webster using
the webster daemon
written by Steve Hayman (sahayman@iuvax.cs.indiana.edu).

- ----
Andreas Stolcke
International Computer Science Institute	stolcke@icsi.Berkeley.EDU
1957 Center St., Suite 600, Berkeley, CA 94704	(415) 642-4274 ext. 126

==============================================================================

Path: hplabsz!hplabs!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!unixhub!shelby!neon!lucid.com!jwz
From: jwz@lucid.com (Jamie Zawinski)
Newsgroups: comp.mail.multi-media
Subject: dictionary servers
Message-ID: <JWZ.90Nov8173416@kolyma.lucid.com>
Date: 9 Nov 90 01:34:16 GMT
Sender: jwz@lucid.com
Organization: Lucid, Inc., Menlo Park, CA
Lines: 73

I know of two formats in which Webster's dictionary can be found online.
I have a GNU Emacs package (by Jason Glasgow) for talking to one of them,
and a Unix program (by Ed James) for talking to the other.  

mintaka.lcs.mit.edu runs a server of the first kind, and pasteur.berkeley.edu
runs a server of the second kind; but pasteur won't talk to any machines not
at berkeley, so I can't use it any more.  This is unfortunate, because the
second format is a better one.  So my first question is, are there any
machines out there which run a server of the second sort which will talk to me?

My second question is, are either of these formats the same as that which
the NeXT webster server uses?  If not, what is the format that the NeXT server
uses?  And are there any NeXTs out there which will answer webster connections
to arbitrary machines on inet?

Here is a brief description of the two formats I know of, so you will know
what I'm talking about;

The mintaka kind uses port 103; it is very simple, supporting single-word
commands of the form "DEFINE word"; it does spelling correction as well, when
you ask for the definition of a word that it doesn't know about, or when you
issue the command "SPELL word".  There is also a command for listing all
words beginning with a given prefix.  The definition which is sent back looks
like 

 phi.lis.tine \'fil-*-.ste-n; f*-'lis-t*n, -.te-n; 'fil-*-st*n\ \-.iz-*m\ n
   cap  1: a native or ingabitant of ancient Philistia  often cap  2a: a crass
   prosaic often priggish individual guided by material rather tha n
   intellectual or artistic values : BABBITT 2b: one uninformed in a special
   area of knowledge  - philistine aj

that is, the paragraphs come filled, and lines are pre-wrapped at 79 columns.
There is little hope for making this look any prettier, since it's been 
chewed on already.

The other kind of server, of which pasteur.berkeley.edu is a variety, uses
port 1964, and has an interface very much like SMTP or NNTP - responses begin
with three digit numbers, 2-- means ok, 5-- means failure, etc.  The big win
of this server is that it preserves font-change and special-character
information.  The definition body that comes back is broken up into records.
There are two levels of encoding; at the first level structural elements of
the definition are sent one per line, in a form like

   <character> : <field-1> ; <field-2> ; <field-3> ...

where the character says what kind of record this is (definition, label, 
cross-reference, etc).  Each kind of record has a fixed number of fields in
it, separated by semicolons.  This means that if a word has several
definitions (as philistine does, above) then each definition will be in its
own record.

When the fields contain text, as definitions do, they contain typesetter
information.  Special characters and font-changes are encoded with
"overstruck" characters, that is, a sequence like <char-1> <backspace> <char-2>
will either change the font, or will map to one or more different characters.
No line-breaks are included, so a client gets to format and wrap the
definitions as it likes.

One interesting fact is that it is apparently that the mintaka database was
derived from the pasteur database (or a common source) because I have come
across definitions in mintaka's dictionary which have had the font-information
improperly stripped out!  Parts of the font change codes were still visible in
a few cases.

So, any answers?
			-- Jamie

PS: if you have access to a server of the same genotype as pasteur, and you
have a TI Explorer Lisp Machine, you can use the code in
/usr/jwz/public/dictionary-client.lisp on spice.cs.cmu.edu to talk to it with
a hypertextized interface (clicking on words defines them, making it easy to
navigate around the dictionary).  GNU Emacs code for talking to the other kind
is available at your favorite emacs archive site.

==============================================================================

Path: hplabsz!hplabs!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!royle
From: royle@iuvax.cs.indiana.edu (Keenan Royle)
Newsgroups: comp.mail.multi-media
Subject: Re: dictionary servers
Message-ID: <70749@iuvax.cs.indiana.edu>
Date: 9 Nov 90 04:58:02 GMT
References: <JWZ.90Nov8173416@kolyma.lucid.com>
Organization: Computer Science Department, Indiana University
Lines: 11


iuvax.cs.indiana.edu is a webster server.

it is also the home of the software to use NeXT as a webster
server for a generic UNIX clients. (anon ftp)

-- 

Keenan Royle
royle@cs.indiana.edu                         	postmaster@cs.indiana.edu
royle@iubacs.bitnet

==============================================================================

Path: hplabsz!hplabs!ucbvax!ziploc!eps
From: eps@toaster.SFSU.EDU (Eric P. Scott)
Newsgroups: comp.sys.next
Subject: Re: Webster via remote logins. Is it possible?
Summary: Available by anonymous FTP from sutro.sfsu.edu
Message-ID: <184@toaster.SFSU.EDU>
Date: 11 Dec 89 13:33:04 GMT
References: <1989Dec10.195312.18995@zaphod.mps.ohio-state.edu>
Reply-To: eps@cs.sfsu.edu
Organization: San Francisco State University
Lines: 36

In article <1989Dec10.195312.18995@zaphod.mps.ohio-state.edu>,
	nevai@function.mps.ohio-state.edu (Paul Nevai) writes:
> Is it possible to use Wbster via remote logins?

Sure.  There are two pieces: websterd, a TCP server that will run
on any NeXT, and webster, a client that will run on any UNIX
system that talks TCP (including the NeXT).

In ~ftp/pub on sutro.sfsu.edu:

The file NeXT-websterd.shar is Steve Hayman's server program.
Read the enclosed instructions about setting the oknets[]
array--and remember to list net 127 so you can access it
from your own machine!  You will have to add a line to services
in netinfo:

x400	103/tcp	dictionary	webster

That's right, it "traditionally" co-opts the x.400 port.
(Except at Stanford, where they advocate 2627)

webster.tar.Z also has a table that needs to be modified, in this
case the hosts that you want to try (in order) for webster servers.
If you're compiling this on a NeXT, the first one should be
localhost.  It works without modification on SunOS and HP/UX, and
shouldn't have any problems on your favorite networked UNIX.
We've even set it up as a login shell for a non-passworded
"webster" username on non-NeXT machines.

There's a webster.el for GNU emacs in this package as well.  I've
found its performance to be somewhat erratic.

As is, as always.  I worked on part of the webster client, but
the rest is strictly not-invented-here.

					-=EPS=-
==============================================================================

 ... thanks ...

-------------------------------------------------------------------------------
            Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
                  Human-Computer Interaction Department
                       Hewlett-Packard Laboratories
                              Palo Alto, CA.
                                   *


	Xwebster, A Dictionary Browser
		Niels P. Mayer
		Hewlett-Packard Laboratories
		Software Technology Lab.
		Human-Computer Interaction Department.
------------------------------------------------------------------------------

Xwebster is used to look up words in the online copy of Webster's 7th
dictionary, stored at SRI-NIC  and also available on machines located at
Boston U., Indiana U, Purdue U., MIT, Stanford, etc. In order to run xwebster
you must have access to a webster server. In order to make xwebster run faster
and more reliably (the "arpanet" can be flaky), you may want to ask your 
system administrators whether there is a webster server running locally.
Chances are, if people at your site are using the tty-based webster(1) 
interface, there is probably a webster server "nearby".

Using xwebster is simple -- words are typed into a TextEdit widget in
xwebster, and then one of three actions can be taken:

	1) mousing [Define] (or hitting <ret>) after typing in a
	word will attempt to show you a complete dictionary entry for the
	word including definitions,  pronunciation, and derivation. If the word
	is misspelled, then a browser of similar words will be presented. If
	the word contains wildcard characters (%=any char; *=any char seq),
	then a browser of all matching words will be presented.
	
	2) mousing [Complete] (or hitting <esc>) after a partial word has
	been typed will attempt to complete what you have typed so far.  If 
	what you have typed is a unique abbreviation for a word, the word is 
	completed. Otherwise xwebster will beep and indicate the ambiguity of 
	the partial word.

	3) mousing [Endings] (or hitting <?>) after a partial word has been
	entered will display a browser of all the words matching the partial
	word.

Anytime there are words in the word browser panel, clicking on a word will
cause its definition to be dispayed. 

				----------
COMPILING:

Xwebster expects to use the X11r3 HP Xwidgets library, libXw.a, and the
X11R3 Xt intrinsics, libXt.a (with the latest patches, particularly
fixes/fix8). The HP widgets are on the X11R3 tape (under
contrib/widgets/Xhp/Xw/), and require a set of fixes by Martin Friedmann
<martin@citi.umich.edu> in order to work under R3. These will probably be
available from the usual archive sites, and in particular, from
expo.lcs.mit.edu:contrib/Xhp.patch.works.tar.Z.

Xwebster has been tested under HPUX 6.2 and SunOS3.5. I've avoided any
particularly hairy SYSVisms, so you sholdn't have any trouble getting it to
run on your machine. You'll need the strtok() call - if your system doesn't
have it (HPUX, System V, SunOS have it), get Henry Spencer's public domain
strings(3) library from some comp.sources.unix archive site.

				----------

CUSTOMIZING:

All the resources for xwebster are specified in the application default
file Xwebster.ad, which MUST be installed in APPDEFAULTSDIR/Xwebster.  Fully
qualified resource names are used in this app-defaults file so as to
document the widget hierarchy in the application. Documentation on
customizing xwebster also appears in this defaults file.  (APPDEFAULTSDIR
is set in the imake defaults, it is usually /usr/lib/X11/app-defaults/)

Parameters for connecting to a webster server are contained in the
resources "hostAddrList", "hostPort", and "hostServiceName". See the
Xwebster.ad file for details and documentation.

Xwebster allows dictionary definitions to be viewed in either a scrolled
StaticText widget (for those who like scrollbars), or in a TextEdit widget
(for those who like Emacs, and need better control of cut/paste
operations). The resource that controls this is "useEditorAsDisplay"

I personally use the following set of .Xdefaults for xwebster, in addition
to the defaults provided by APPDEFAULTSDIR/Xwebster:

#
# Global Defaults.
#
*foreground:			White
*background:			DarkSlateGray
*font:				6x13
*Sash*background:		wheat
*Sash*foreground:		black
*topShadowColor:		light blue
*topShadowTile:			foreground
*bottomShadowColor:		black
*bottomShadowTile:		foreground
*TextEdit*background:		IndianRed
*TextEdit*foreground:		Green
*TextEdit*highlightThickness:	1
*TextEdit*font:			fixed
*StaticText*background:         DarkSlateGray
*StaticText*foreground:         White
*StaticText.BorderWidth:	1
*StaticText.ShadowOn:		yes
*StaticText*font:		variable
*PushButton*background: 	Blue
*PushButton*foreground:		White
*PushButton*font:		variable

#
# Xwebster
#
xwebster*hostAddrList: 26.0.0.73 10.0.0.51
xwebster*hostPort: 103
xwebster*useEditorAsDisplay: TRUE
xwebster*highlightColor: white
xwebster*highlightTile: foreground
xwebster*display.foreground: White
xwebster*display.background: IndianRed
xwebster*word_input*foreground: Green
xwebster*word_input*background: IndianRed

				----------

HISTORY/THANKS/AUTHORS:

This program was inspired by the webster(1) tty-based client to a webster
server written by Dave Curry <davy@riacs.edu>, although most of the code
was written from scratch because I didn't find the webster(1) source code
until after the application was prototyped. The original webster
client/server was written in MIDAS and ran under Tops-20, it was probably
done by someone at SRI-NIC.

Xwebster was originally written and released by Niels Mayer
<mayer@hplabs.hp.com> on the X11r3 contrib tape. Mark Moraes
<moraes@csri.toronto.edu> took that version, updated it to work with the r3
HP Xwidgets and r3 Toolkit Intrinsics, and fixed a bunch of stupid bugs
that were making xwebster dump core an a SUN. He also made xwebster
disconnect gracefully after the webster dictionary server times out.
Finally, he wrote up a manual page and put together an Imake file. Thanks
Mark! 

If you have contributions to make to xwebster, please send them to me via
email.

-------------------------------------------------------------------------------
	    Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
		       Hewlett-Packard Laboratories
			      Palo Alto, CA.
				   *

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.