HDTenEightyP/NetNews huggingface dataset:
From: zstern@adobe.com (Zalman Stern)
Subject: Re: message queue with ATK
Organization: Adobe Systems Incorporated
Date: Wed, 18 Nov 1992 19:35:47 GMT

In article <gf2ZSdw91Jbd17dlp5@rchland.ibm.com> tinglett+@rchland.ibm.com  
(Todd Inglett) writes:
> Excerpts from ext.misc.info-andrew: 17-Nov-92 Re: messagequeue with ATK
> Zalman Stern@decwrl.dec. (1573)
> 
> > The namespace for System V message queues is disjoint from the file
> > descriptor namespace. They do not work with select and hence donot fit  
into
> ATK interaction model.
> 
> This may be true in general, but be sure to look closely at the
> selectcall on your system.  In AIX, for example, the first argument to
> selectindicates how many file descriptors and message queues are
> specified in theother arguments.  The lower 16 bits of the first
> argument specify the # offiles and the upper 16 bits specify the # of
> message queues.  Because it wouldbe impossible to specify 64535 file
> descriptors (AIX has a limit of around2000 or so), it is completely
> compatible with the `old' select.

It is best to ignore braindamage like this. Shooting the person responsible  
might make you feel better, but is generally not worth the consequences.
--
Zalman Stern		   zalman@adobe.com		    (415) 962 3824
Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900
  "Yeah. Ask 'em if they'll upgrade my shifters too." Bill Watterson
From: bobg@zindigo.z-code.com (Bob Glickstein)
Newsgroups: comp.soft-sys.andrew
Subject: Flakiness on SGI Indigo
Date: 17 Nov 92 07:31:09 GMT
Reply-To: Bob Glickstein <bobg@z-code.z-code.com>
Organization: Z-Code Software Corp., Marin County, CA

I've just built most of the Andrew sources as they appear on the
CD-ROM release.  The build proceeded without a hitch, but I can't say
the same for actually running Ez.  When reading text with a large
inset visible, scrolling backwards via a right-click in the scrollbar
sometimes causes a core dump.

My platform is an SGI Indigo running Irix 4.0.5F.  Before I go hunting
for the cause of this bug, can anyone tell me whether I'd be
duplicating someone else's efforts?  And incidentally, how much has
the source changed since the CD-ROM release (I hesitate to ask)?

Finally, I too would like to know what my printing alternatives are
these days in the absence of ditroff.  Has anyone tried using groff
with Andrew?

-- 
Bob Glickstein
Z-Code Software Corp.
4340 Redwood Highway  Suite B-50
San Rafael, CA  94903
(415) 499-8649

Newsgroups: comp.soft-sys.andrew
From: isabelle@shamin.genie.uottawa.ca (Isabelle Tourneux)
Subject: communication between Adew controllers
Originator: isabelle@shamin.genie.uottawa.ca
Organization: MCRLab - University of Ottawa
Date: Fri, 20 Nov 92 20:55:16 GMT


First, thank you very much for all the detailed answers you have
given me concerning message queues. This has however led me to
other questions :

I have several adew "view+controller" in the same machine, which
are spawned successively with forks and execs. I would like to have
them communicate with each other. So I have looked at all the
possible means of communication between these controllers. I am
using System V.

- FIFO and message queues work but they are not directly usable to
read a message that can come any time. I would have to be waiting
for it or to have an infinite loop in the code of the adew
controller, which is not possible. I know it is possible to
modify xim.c and to add a message queue to the select, , but I do
not wish to do such low-level modifications on xim.c.

- interruptions would be a nice solution, but I have not managed
to get the pid of the controller without clicking somewhere on the
view. A getpid() in controller_go gives the pid of runadew I guess.
Moreover, runadew puts the group id of the controller equal to the
pid of this controller, so I cannot get the group id of the
controller without clicking on the view, as for the pid. Is it
possible to change the code of runadew to prevent it from
initializing the group id of the controller ? Do you think
interruptions would work as I am working under System V and Xwindows
?

- I know sockets would be a solution, but I would prefer not to
use them for internal communication between processes runing on
the same machine : I am afraid I will not be able to send a huge
file through a socket without cutting it into smaller parts, and I
would like to avoid that. Do you think Unix Domain Sockets could
allow me to send huge file without cutting them ?

- as all my controllers have got different names, I have thought
about memorizing the pointers on each controller in a memory shared
by all the processes :
 struct controlleri * ptri ( i = 1, 2...),
and call functions of a controller from another controller, using
this pointers : controller1_thisFunction(ptr1) in the code of the
2nd controller for instance.
The 1st controller is running, but the function is not called
successfully, and there is a segmentation fault. Before, I had
never had problems with memorizing pointers on an ATK view or
dataobject in another ATK view or dataobject, and calling
functions with these pointers. Is there something specific to adew
which prevents from doing that ? 


                         I am trying at any rate to establish a
communication between Adew controllers, but it is hard because adew
and runadew were not written for that kind of application, but were
supposed to be used only for prototyping. Anyway I really want to
find a way of establishing these connections, even if the solution 
is not the most elegant.

Thanks for your help.

isabelle Tourneux
Multimadia Lab of the University of Ottawa.
isabelle@shamin.genie.uottawa.ca
From: ameroni@DSMISP.MI.INFN.IT (Alberto Meroni)
Newsgroups: comp.soft-sys.andrew
Subject: please subscribe
Date: 17 Nov 92 10:26:40 GMT
Organization: The Internet

please subscribe me to this mailing list
ameroni@dsmisp.mi.infn.it
Alberto Meroni
From: Craig_Everhart@TRANSARC.COM
Newsgroups: comp.soft-sys.andrew
Subject: Re: Question about AMDS message delivery
Date: 16 Nov 92 20:10:33 GMT
Distribution: world
Organization: The Internet

Excerpts from internet.other.info-andrew: 13-Nov-92 Question about AMDS
message.. Neil Weisenfeld@ucbvax.B (1023)

> Our AMDS system is set up so that a number of machines may deliver the
> same message.  Is there any sort of locking system used to keep them
> from stepping on each other's toes?   I'm writing a biff program and it
> seems to suffer from two ailments:

> 1. Sometimes the user gets informed about a message twice since its
> modification time changes twice.

> 2. Sometimes the biff program starts scanning the message for headers
> as the message is being written and subsequently winds up hitting EOF
> before finding all of the headers.


> Now I know that I could solve #1 by keying off of the filename and not
> checking the same file twice, but how about #2?  Is there some lock
> mechanism for the Mailbox directory or the message files, or is it just 
> a free for all?

Sure, there's a locking mechanism.  You can solve both problems by using it.

The delivery protocol for new messages being created in ~userid/Mailbox/
is as follows.  The delivery agent (the producer) follows one protocol,
and the reader (the consumer) follows another.

Delivery agent/producer:
    (d1) invent a filename (generally with an ams_genid() call); call it FOO
    (d2) create ~userid/Mailbox/FOO with open(), getting a file
    descriptor (``fd'')
    (d3) flock(fd) with an exclusive lock.
        -- on failure, close the file, leaving a zero-length file;
        restart at step (d1), creating a new file name.
    (d4) write the contents of the file
    (d5) close the file, releasing the lock in the process.

Reader/consumer:
For each file in the ~/Mailbox directory (here named FOO):
    (r1) open the ~/Mailbox/FOO file with open(), getting a file
    descriptor (``fd'')
    (r2) flock(fd) with an exclusive lock.
        -- on failure, close the file and skip processing FOO.
    (r3) get file status with fstat(fd) or whatever, to check the file
    length and age.
        -- if zero-length and under 20 minutes old, close the file and
        skip processing FOO.
        -- else if zero-length, ignore it as an orphan.
    (r4) read the file and unlink it from ~/Mailbox when done.

At at least one point I believed that this would be an adequate
interlock model.  The down-side is that if (r1+r2) interleaves between
(d2) and (d3), the delivery process leaves an orphaned zero-length file
that has to be reaped somehow; hence the heuristic measure as the last
clause of (r3).

An amds-biff process would be excellent, and could simply follow the
same protocol as does the reader, except for unlinking the file in step
(r4).  I'd argue that both your problems arise when your biff checks new
files between (d2) and (d4), and that you can dodge the problem with the
flock() protocol.

		Craig
From: tinglett+@rchland.ibm.com (Todd Inglett)
Newsgroups: comp.soft-sys.andrew
Subject: Re: message queue with ATK
Date: 18 Nov 92 14:48:09 GMT
Reply-To: "Todd Inglett" <tinglett@vnet.ibm.com>
Distribution: world
Organization: The Internet

Excerpts from ext.misc.info-andrew: 17-Nov-92 Re: messagequeue with ATK
Zalman Stern@decwrl.dec. (1573)

> The namespace for System V message queues is disjoint from the file
> descriptor namespace. They do not work with select and hence donot fit into
ATK interaction model.

This may be true in general, but be sure to look closely at the
selectcall on your system.  In AIX, for example, the first argument to
selectindicates how many file descriptors and message queues are
specified in theother arguments.  The lower 16 bits of the first
argument specify the # offiles and the upper 16 bits specify the # of
message queues.  Because it wouldbe impossible to specify 64535 file
descriptors (AIX has a limit of around2000 or so), it is completely
compatible with the `old' select.

Still, this means that you must modify ATK at a very low level. 
Inparticular, you must add at least two new class procedures
toatk/basics/common/im.ch and their implementations in im.c:

    AddMsgQHandler(int msgqid, procedure proc, char *procdata,
    longpriority) returns boolean;
    RemoveMsgQHandler(int msgqid);

You will have to add an array of MsgQHandlers to the struct
im_GlobalDataType(scroll down in im.ch), and write the two new class
procedures to add/removethe handlers from this MsgQHandlers list. 
Finally, you must modifyxim__HandleFiles in atk/basics/x/xim.c so that
the select system callis given the appropriate arguments.  This code is
a little tricky, but with alittle persistence I am sure you can get it
to work.

Now your ADEW application can call im_AddMsgQHandler to setup acallback
whenever input arrives from the queue.  But remember, this will onlywork
if your select supports both queues and file descriptors.  Ifyour select
doesn't support message queues, how about the poll systemcall (if you
have one)?  It could be used in place of select.

-todd inglett
Newsgroups: comp.soft-sys.andrew
From: mayer@gmd.de (Hans Mayer)
Subject: Building Andrew on SunOS 4.1.3
Organization: GMD, Sankt Augustin, Germany
Date: Tue, 17 Nov 1992 09:45:54 GMT

I'm trying to install Andrew on SunOS 4.1.3 and X11R5 patchlevel 19.

The build fails in .../andrew/atk/basics/common with:
/opt/andrew/bin/makedo -d /opt/andrew/lib -b /opt/andrew/bin -s -o region.do region.o /opt/X11R5/lib/libX11.a

Is there a patch available? If yes, where?
Why does Andrew generate Makefiles that suddenly try to use static libraries?
I'm shure I'm not the first one with this problem but I couldn't find any
discussion on it or a FAQ (I've tried to go back a few hundred articles but
all but the last forty are already expired).

Any help appreciated! Thanks - Hans
--
Hans J. Mayer, mayer@gmd.de
German National Research Center for Computer Science (GMD)
From: cynthia@maths.uwa.oz.au (Cynthia Belonogoff)
Newsgroups: comp.soft-sys.andrew
Subject: ezprint
Date: 17 Nov 92 06:21:58 GMT
Distribution: world
Organization: The Internet
X-Unparsable-Date: Tue, 17 Nov 92 14:07:38 WST

We have just installed the Anrew toolkit at out site and are very
impressed by the ez editor and help system.  However, printing appears
to require ditroff to work properly.  Is the source or binary for
a Sun sparc station available anywhere?

Cynthia Belonogoff
Systems Programmer
From: susan+@ANDREW.CMU.EDU (Susan Straub)
Newsgroups: comp.soft-sys.andrew
Subject: Re:
Date: 18 Nov 92 20:47:57 GMT
Distribution: world
Organization: The Internet

Excerpts from misc: 18-Nov-92 Pete Newson@dcs.bbk.ac.u (183)

finger help@atk.ic.cmu.edu

The correct address is help@atk.itc.cmu.edu, but that machine is down
and in the queue to be repaired.  We hope it will be up early next week.
 

A note will be posted to info-andrew when rdemo is again available. 
Sorry for the inconvenience.  

Susan Straub
Andrew Consortium
From: rr2b+@ANDREW.CMU.EDU (Robert Andrew Ryan)
Newsgroups: comp.soft-sys.andrew
Subject: Re: Flakiness on SGI Indigo
Date: 17 Nov 92 16:11:25 GMT
Distribution: world
Organization: The Internet

Excerpts from internet.other.info-andrew: 16-Nov-92 Flakiness on SGI
Indigo Bob Glickstein@zindigo.z (830)

> When reading text with a large inset visible, scrolling backwards via a
right-click in the scrollbar sometimes causes a core dump.

We have fixed some code wrt scrolling insets, but I don't think any
core-dumps were fixed.

Excerpts from internet.other.info-andrew: 16-Nov-92 Flakiness on SGI
Indigo Bob Glickstein@zindigo.z (830)

> And incidentally, how much has the source changed since the CD-ROM
> release (I hesitate to ask)?

Volume wise not a great deal, but quite a bit of change has ...

Changes...
Support for color images and colormaps is being built into im, graphic
and view.
Observable objects (text, buttons, views, etc...) are now refcounted (in
such a way applications written before should generally continue to work
without modification)
Core leak fixes in xim

Totally new stuff...
Figure editor, replacing zip which has moved to contrib.
Preferences editor.
Color image inset
Bison (the Andrew Consortium version), eventually to replace all use of yacc.
atk/syntax (including Bison) is intended to provide parsing support so
duplication of effort can be avoided among applications where it is
useful to use lex/yacc.

The above is entirely from memory it may or may not be complete or
accurate.  I imagine we will post an official list of changes with the
announcement of the members only release later this month.

-Rob Ryan
Andrew Consortium
Newsgroups: comp.soft-sys.andrew
From: zstern@adobe.com (Zalman Stern)
Subject: Re: message queue with ATK
Organization: Adobe Systems Incorporated
Date: Tue, 17 Nov 1992 23:46:22 GMT

In article <1992Nov17.163509.662@csi.uottawa.ca>  
isabelle@shamin.genie.uottawa.ca (Isabelle Tourneux) writes:
> 
> I would like to use message queues with ATK and ADEW.
> 
> - is it possible to use the usual msgrcv and msgsnd in an
> infinite loop ? I have tried to put an infinite loop in the
> "controller_go" of an Adew view-controller, but it disturbs the
> usual functionnning of the controller.
> 
> - does an object-oriented function (a sort of "im_AddMessageQueue")
> exist to set an input handler when something arrives on a
> message queue, just as it does for sockets in im_AddFileHandler ?
> 
> In short, is there a way I can use message queues, or can I use 
> only sockets to communicate with other processes ?
> 
> Thanks
> 
> Isabelle Tourneux
> Multimedia Lab of the University of Ottawa,
> isabelle@shamin.genie.uottawa.ca
The namespace for System V message queues is disjoint from the file  
descriptor namespace. They do not work with select and hence do not fit into  
ATK interaction model. In short the SysV message and shared memory  
interfaces are evil crud which never should have been implemented in a UNIX  
kernel. Use the BSD send and recv calls instead. Or if you have SysVr4, you  
might try putmsg and getmsg on streams but I'm not sure how that stuff  
interacts with select. (And it undoubtedly depends on the particular version  
of UNIX you are running.)
--
Zalman Stern		   zalman@adobe.com		    (415) 962 3824
Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900
  "Yeah. Ask 'em if they'll upgrade my shifters too." Bill Watterson
Organization: School of Computer Science, Carnegie Mellon, Pittsburgh, PA
Newsgroups: comp.soft-sys.andrew
Date: Tue, 17 Nov 1992 17:39:01 -0500 
From: Robert Andrew Ryan <rr2b+@andrew.cmu.edu>
Subject: Re: message queue with ATK

Excerpts from netnews.comp.soft-sys.andrew: 17-Nov-92 message queue with
ATK Isabelle Tourneux@shamin (691)

> - is it possible to use the usual msgrcv and msgsnd in an
> infinite loop ? I have tried to put an infinite loop in the
> "controller_go" of an Adew view-controller, but it disturbs the
> usual functionnning of the controller.

Yes, the normal function of an interactive ATK function assumes that the
event loop in im/xim is run whenever waiting for input.  You could peek
into the internals of im and xim, and add the appropriate select call
and then call im_Interact(FALSE) if there is input for im.  I'm not very
familiar with message queues, as far as I can tell the only way to know
when a message has arrived is to be waiting for it, or to poll
continually.

Excerpts from netnews.comp.soft-sys.andrew: 17-Nov-92 message queue with
ATK Isabelle Tourneux@shamin (691)


> - does an object-oriented function (a sort of "im_AddMessageQueue")
> exist to set an input handler when something arrives on a
> message queue, just as it does for sockets in im_AddFileHandler ?

No.  Adding such a function might be quite difficult.  You could use
im_EnqueueEvent to periodically poll a message queue, but this could
hurt performance substantially.  

In an environment without threads I don't see how message queues make
sense to use.  (Though some of their features are certianly useful.)

If the main feature you're looking for is access control via the
permission bits, then a unix domain socket, or fifo might be better than
message queues for use with ATK.

-Rob
Newsgroups: comp.soft-sys.andrew
From: opus@draco.unm.edu (Colby Kraybill)
Subject: Printing, using groff, DEC MIPS...
Date: Tue, 17 Nov 92 05:45:00 GMT
Organization: University of New Mexico, Albuquerque
Keywords: FRUSTRATED...

Hello I've run into just hours of fun while trying to print out something
with EZ.

Here is the exact configuration of the stuff that I am using, 
EZ Version 7.0, ATK 5.1 on a DEC MIPS 5000/120 running under X11 R5.
I am using groff version 1.05.
I've put in my global.prf:
*.formatcommand: groff -pte -E /tmp/%s.n |
*.PrintCommand:  lpr -Pljea1 -Dpostscript 

The printer is an HP IIIsi.


Now then, if I try to print, all I get is a cover page.  If I sit there and
do lpq's I see the job shoot through the printer via stdin with a size of
about 6K.

I've gone outside of EZ and done a groff manually on the .n file and *Finally*
got the thing to print out, however it would be convient to print right
from EZ.  Any suggestions?





-- 
Colby Kraybill
Space and Planetary Image Facility
University of New Mexico
opus@pioneer.unm.edu
From: meirpr@cs.technion.ac.il (Meir Preizler)
Newsgroups: comp.soft-sys.khoros
Subject: Change to digestified mail list
Date: 15 Nov 92 08:50:37 GMT

I am currently receiving mail as a regular KHOROS subscriber. However,the amount
of mail I get is a little overwhelming. Could you please transfer me to the
digestified mail list.

Thanks

Meir Preiszler
Computer Science Department
Technion
Haifa, Israel
From: Peter.Averkamp@e20.physik.tu-muenchen.de (Peter Averkamp)
Newsgroups: comp.soft-sys.khoros
Subject: Re:  raw2viff, animate
Date: 19 Nov 92 11:04:14 GMT

> I am trying to convert a headerless, multi-image, binary file to viff format,
> using the raw2viff routine.  The example file has 8 sequentially stored
> images, and so I set the number of data bands to 8, the rows and columns set
> to the single-image values.  I left all of the other parameters at their
> default values.  (Note: using 1 data band, I can successfully convert a single
> image file using these parameters.)  I run raw2viff in cantata, and the
> output file is created successfully.  When I try to run animate to display
> the resulting sequence, it informs me that my viff file contains only one
> data band.  What am I doing wrong?

I bet what you're doing is typing in the values rows,coloums and bands into
the raw2viff pane and then executing it. The number of bands-argument is
otional, though. So you have to click the button to the left of the numeric
field to realy use the number in the field.

hope this helps,

\Peter


Peter Averkamp,                      | email:
Physics Department E20               | petav@e20.physik.tu-muenchen.de
Techn. Univ. of Munich               | Phone: ++49 (89) 3209-2408 and -2814
D-8046 Garching, Germany             | Fax:   ++49 (89) 3209-2338
From: diskin@emb00.larc.nasa.gov (Glenn S. Diskin)
Newsgroups: comp.soft-sys.khoros
Subject: Re: raw2viff, animate
Date: 19 Nov 1992 13:49:28 GMT
Organization: NASA Langley Research Center, Hampton, VA  USA
Distribution: world
Reply-To: diskin@emb00.larc.nasa.gov (Glenn S. Diskin)
NNTP-Posting-Host: b1247amac8.larc.nasa.gov

In article <41716@pprg.eece.unm.edu.pprg.unm.edu>, donna@peabody.eece.unm.edu 
(Donna Koechner) writes:
> 
> On Nov 18,  1:50pm, Glenn S. Diskin wrote:
> } Subject: raw2viff, animate
> } I'm sorry if this ends up being a re-post, but the question I sent to the 
e-
> } mail didn't seem to end up on the newsgroup.
> } 
> } I am trying to convert a headerless, multi-image, binary file to viff 
format, 
> } using the raw2viff routine.  The example file has 8 sequentially stored 
> } images, and so I set the number of data bands to 8, the rows and columns 
set 
> } to the single-image values.  I left all of the other parameters at their 
> } default values.  (Note: using 1 data band, I can successfully convert a 
single
> } image file using these parameters.)  I run raw2viff in cantata, and the 
> } output file is created successfully.  When I try to run animate to 
display 
> } the resulting sequence, it informs me that my viff file contains only one 
> } data band.  What am I doing wrong?
> } 
> } Any help will be greatly appreciated.  Thanks in advance.
> } 
> } Glenn Diskin
> } NASA Langley Research Center
> } diskin@emb00.larc.nasa.gov
> }-- End of excerpt from Glenn S. Diskin
> 
> 
> I think all you need to do is set the number of data bands to 8 and
> animate the resulting image.  (make sure that the number of data
> bands option button is selected).
> 
> Donna

 Thanks, that did the trick, but now I'm having some colormap problems.
I tried setting the colormap to false, and pixmap to false, but I still get
my animation sequence displayed with a colormap not of my choosing.  Actually,
The animation display pane shows up with a colormap when the mouse cursor is
not in the display pane; when it is in the display pane, I get a gray scale
image, but the entire screen becomes black and I can't see any of the buttons,
etc.  I'm running this on a Sun SPARCStation 2 with OpenWindows version 2.
I've read about the openwin2 colormap problems.  Is this just another example
of this or am I doing something wrong?

Glenn
diskin@emb00.larc.nasa.gov


Newsgroups: comp.soft-sys.khoros