Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa10026; 12 Jul 89 10:41 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ab09678; 12 Jul 89 10:30 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa09596; 12 Jul 89 10:17 EDT Received: from cunyvm.cuny.edu by SMOKE.BRL.MIL id aa04936; 12 Jul 89 8:03 EDT Received: from DDATHD21.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 8742; Wed, 12 Jul 89 00:44:02 EDT Received: from BR2.THD.DA.D.EUROPE by DDATHD21.BITNET via GNET with RJE ; 12 Jul 89 06:43:14 Date: Wed, 12 Jul 89 06:43:44 +0200 (Central European Summer Time) From: Knobi der Rechnerschrat Subject: Virtual space per process To: info-iris@BRL.MIL X-VMS-To: X%"info-iris@brl.mil" Message-ID: <8907120803.aa04936@SMOKE.BRL.MIL> Hallo, just a small question: what is the maximal available virtual address space (not counting swap space or physical memory) for each process on: an IRIS 4D/20 an IRIS 4D/50/60/70/80 (using the MIPS 20xx chips) a Power Series machine (using the MIPS 30xx chips) Regards Martin Knoblauch TH-Darmstadt Physical Chemistry 1 Petersenstrasse 20 D-6100 Darmstadt, FRG BITNET:   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa11926; 12 Jul 89 12:17 EDT Received: by VMB.BRL.MIL id ad11562; 12 Jul 89 12:09 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa11295; 12 Jul 89 11:25 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa10838; 12 Jul 89 11:06 EDT Received: from ccc.mfecc.llnl.gov by SMOKE.BRL.MIL id aa10316; 12 Jul 89 10:31 EDT Received: from fsu.mfenet by ccc.mfenet with Tell via MfeNet ; Wed, 12 Jul 89 07:35:24 PDT Date: Wed, 12 Jul 89 07:35:24 PDT From: MINUIT%FSU.MFENET@ccc.mfecc.llnl.gov Message-Id: <890712073524.3040012e@CCC.MFECC.LLNL.GOV> Subject: Hitachi's Address To: INFO-IRIS@BRL.MIL Comment: From MINUIT@FSU.MFENET on 12-JUL-1989 10:17:45.64 EDT phri!manhat!dasys1!rpaul%rutgers.edu Do you happen to have an address/phone number for Hitachi? We had the same problem with one our monitors about a year ago and ended up paying for a new monitor. - David LaSalle SCRI Florida State University Tallahassee, FL 32306-4052 (904)644-8532 arpanet: minuit@scri1.scri.fsu.edu (128.186.4.1) or minuit%fsu@nmfecc.arpa   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12226; 12 Jul 89 12:40 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab11926; 12 Jul 89 12:30 EDT Received: from adm.brl.mil by VMB.BRL.MIL id aa11832; 12 Jul 89 12:10 EDT Received: from wucs1.wustl.edu by ADM.BRL.MIL id aa17114; 12 Jul 89 11:59 EDT Return-Path: Received: from wucs2.wustl.edu by wucs1.wustl.edu (5.59/1.35); id AA19079; Wed, 12 Jul 89 10:40:11 CDT Received: from castor.wustl.edu by wucs2. (4.0/SMI-4.0) id AA08066; Wed, 12 Jul 89 10:42:16 CDT Received: by castor.wustl.edu (5.52/SGI) id AA02390; Wed, 12 Jul 89 10:37:25 CDT Date: Wed, 12 Jul 89 10:37:25 CDT From: Lewis Yuchan Message-Id: <8907121537.AA02390@castor.wustl.edu> To: info-iris@BRL.MIL Subject: /debug size Is there any way to reduce the size of /debug, as it acts like it takes up 50Mb on our system? Is this a wise thing to do? Thanks. -- lewis@castor.wustl.edu "The blonde spat at me and threw Lewis Yuchan Geer herself on my leg and tried to bite Campus Box 8131 that. I cracked her on the head with Radiation Oncology/MIR the gun, not very hard, and tried to Washington University Medical School stand up. She rolled down my legs St. Louis, MO 63110 and wrapped her arms around them. I (314) 362-2951 fax: (314) 362-8521 fell back on the davenport. The blonde was strong with the madness of love or fear, or a mixture of both, or maybe she was just strong." -- Raymond Chandler, _The Big Sleep_   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa04639; 12 Jul 89 16:38 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03645; 12 Jul 89 15:57 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa03382; 12 Jul 89 15:39 EDT Received: from AERO4.LARC.NASA.GOV by SMOKE.BRL.MIL id aa00205; 12 Jul 89 14:57 EDT Received: Wed, 12 Jul 89 14:20:59 EDT by aero4.larc.nasa.gov (5.52/5.6) Date: Wed, 12 Jul 89 14:20:59 EDT From: "Brent L. Bates TAD/TAB ms294 x42854" Message-Id: <8907122120.AA01870@aero4.larc.nasa.gov> To: fsfacca@lerc08.lerc.nasa.gov Subject: Re: Screen Saver for 4D Cc: info-iris@BRL.MIL On the 3000's blanktime stays in effect until you issue another blanktime, whether someone is logged on or not. Not having blanktime work on 4D with no one on the machine is pretty stupid. Personally, I think that is THE most important time for it to work. -- Brent L. Bates NASA-Langley Research Center M.S. 294 Hampton, Virginia 23665-5225 (804) 864-2854 E-mail: blbates@aero4.larc.nasa.gov or blbates@aero2.larc.nasa.gov   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa05410; 12 Jul 89 17:49 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa05132; 12 Jul 89 17:28 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa05108; 12 Jul 89 17:15 EDT Received: from prandtl.nas.nasa.gov by SMOKE.BRL.MIL id aa04116; 12 Jul 89 16:53 EDT Received: Wed, 12 Jul 89 10:47:45 pdt by prandtl.nas.nasa.gov (5.51/1.2) Received: Wed, 12 Jul 89 13:41:49 EDT by lerc08.lerc.nasa.gov (5.52/LeRC(1.0)) Date: Wed, 12 Jul 89 13:41:49 EDT From: Tony Facca Message-Id: <8907121741.AA02396@lerc08.lerc.nasa.gov> To: blbates@aero4.larc.nasa.gov Subject: Re: Screen Saver for 4D Cc: info-iris%brl.mil@prandtl.nas.nasa.gov >> What about blanktime? I know it doesn't give you a floating >> "SUN", but it blanks out the screen after a set amount of time. >> This is on the 3000's. I don't know about the 4D's, but I would >> think it would be there too. You'd think so, wouldn't you? Unfortunately, its only available "after" you are logged in (and 4Sight is running), once you logout the console screen stays on, and after about 3 months, its burned into the console -- I wonder if SGI will replace these monitors under the terms of the service contract? On the Personal Iris's I've noticed that the problem is fixed.. anyone know why (rev10 PROMS perhaps?) ? Won't someone from SGI please comment on what is being done to resolve this -- it is quite annoying. -- ----------------------------------------------------------------------------- Tony Facca | phone: 216-433-8318 NASA Lewis Research Center | Cleveland, Ohio 44135 | email: fsfacca@lerc08.lerc.nasa.gov -----------------------------------------------------------------------------   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ac00426; 13 Jul 89 17:25 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ac00083; 13 Jul 89 17:14 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ac25311; 13 Jul 89 16:23 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa28222; 13 Jul 89 15:56 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA08862; Wed, 12 Jul 89 16:13:51 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 12 Jul 89 22:16:16 GMT From: "Jeffrey M. Currier" Organization: NASA Ames Research Center Subject: dog on IRIS 3130 Message-Id: <2489@amelia.nas.nasa.gov> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL We have two IRIS 3130's and we used to be able to fly air to air combat with the dog demo program. We used to have to use the 3000.xns kernel, but now with whatever kernel it try I get the error message: "Ethernet init failed" Does anyone know what the solution might be. Thanks in advance. ----------------------------------------------------------------- Jeff Currier (602)621-4948 | "Live each day as your last, Computational Fluid Mechanics Lab | because to die already dead University of Arizona, Tucson | is the worst death of all." currier@prandtl.nas.nasa.gov | -----------------------------------------------------------------   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab03254; 14 Jul 89 1:02 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ab03087; 14 Jul 89 0:51 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab02972; 14 Jul 89 0:28 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa09824; 13 Jul 89 0:36 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA23128; Wed, 12 Jul 89 20:53:21 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 13 Jul 89 01:26:18 GMT From: Jim Barton Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: RAM Message-Id: <37817@sgi.SGI.COM> References: <8907111747.aa25894@SMOKE.BRL.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907111747.aa25894@SMOKE.BRL.MIL>, frobinso@cirm.northrop.com (Fletcher Robinson) writes: > Does anyone know if CPU main memory(RAM) in a 4D70GT is dual-ported ? > i.e. is it accessible from the VMEBUS ? The answer is yes and no. Only the lower 8 megabytes of CPU memory are addressable from the VMEBus. For a description, see the 'system' file in /usr/sysgen. Better yet, buy a Power Series upgrade, and address everything in the world. -- Jim Barton Silicon Graphics Computer Systems "UNIX: Live Free Or Die!" jmb@sgi.sgi.com, sgi!jmb@decwrl.dec.com, ...{decwrl,sun}!sgi!jmb   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03254; 14 Jul 89 1:02 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id aa03087; 14 Jul 89 0:51 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa02972; 14 Jul 89 0:28 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa09822; 13 Jul 89 0:36 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA23136; Wed, 12 Jul 89 20:53:34 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 13 Jul 89 01:47:28 GMT From: Jim Barton Organization: Silicon Graphics, Inc., Mountain View, CA Subject: On VMEBus addressing, again Message-Id: <37818@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I made a mistake in the last posting. On a 4D70GT, if your VMEBus card supports A32 access, than all of physical memory can be accessed. The 8 Mb limitation applies to A24 accesses only. -- Jim Barton Silicon Graphics Computer Systems "UNIX: Live Free Or Die!" jmb@sgi.sgi.com, sgi!jmb@decwrl.dec.com, ...{decwrl,sun}!sgi!jmb   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ac03254; 14 Jul 89 1:02 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ac03087; 14 Jul 89 0:51 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa02976; 14 Jul 89 0:30 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12765; 13 Jul 89 7:42 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA10541; Thu, 13 Jul 89 02:41:50 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 12 Jul 89 14:43:08 GMT From: "Dr. Arthur G. Ryman" Organization: U. of Waterloo, Ontario Subject: Prolog on Personal Iris Message-Id: <10641@watcgl.waterloo.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I am starting a project that needs a Prolog environment on a Personal Iris. I'd appreciate any information on available Prolog's, and on people's experiences with them (quality, performance, support). Reply by e-mail. Thx.   Received: from VMB.BRL.MIL by VMB.brl.MIL id ac03460; 14 Jul 89 1:30 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id af03254; 14 Jul 89 1:11 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab03221; 14 Jul 89 1:02 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa28284; 13 Jul 89 15:58 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA01930; Wed, 12 Jul 89 14:11:51 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 12 Jul 89 19:30:34 GMT From: "Douglas P. Katzman" Organization: University of Pennsylvania Subject: KCL available for Silicon Graphics IRIS4D (maybe MIPS R2000) Message-Id: <12808@netnews.upenn.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I have a bunch of diffs that make Kyoto Common Lisp run for me on an IRIS4D/70G. The compiler, fasloader, and faslinker all work. The patches take up about 16K uncompressed. I will give them to anyone who sends me a request via email, since our anonymous ftp directory is 105% full. Tell me if you want the stuff compressed and uuencoded. You'll have to get the latest KCL distribution (probably from rascal.ics.utexas.edu). A couple comments on the fixes: * Do a "make" in the unixport directory, not the attport * Several files are built from scratch; they should be obvious * Order of the arguments to "ld" is more critical than for VAXen Stripping raw_kcl of local symbols speeds up the fasloader. Leave the ld commands as they are unless you know something I don't * You get the BSD si:catch-bad-signals function. I've never gotten a bus error with the latest version of my fixes, but I like to put (si:catch-bad-signals) in init.lsp to avoid 4 Meg coredumps. * The patches might break KCL on any machine besides a mips Let me know if you have any trouble making KCL. I don't know how to make a patch file for Larry Wall's patcher, but if someone will tell me, I'll do it. Douglas Katzman katzman@eniac.seas.upenn.edu   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa24716; 13 Jul 89 15:51 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id aa23657; 13 Jul 89 15:41 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa23534; 13 Jul 89 15:23 EDT Received: from prandtl.nas.nasa.gov by SMOKE.BRL.MIL id aa26548; 13 Jul 89 14:53 EDT Received: Thu, 13 Jul 89 11:52:15 pdt by prandtl.nas.nasa.gov (5.51/1.2) Received: Thu, 13 Jul 89 14:53:46 EDT by lerc08.lerc.nasa.gov (5.52/LeRC(1.0)) Date: Thu, 13 Jul 89 14:53:46 EDT From: Tony Facca Message-Id: <8907131853.AA02448@lerc08.lerc.nasa.gov> To: info-iris%brl.mil@prandtl.nas.nasa.gov Subject: Re: /debug size >> Is there any way to reduce the size of /debug, as it acts like it takes >> up 50Mb on our system? Is this a wise thing to do? Thanks. As far as I can determine, this is not physical disk space, but rather some sort of virtual disk. The size allocated to /debug changes as users on the system do thier work. Even if you were to remove the files in /debug, you would not gain any disk space to use for permanent storage, so its probably not wise to do anything with it. So why even show it in the "df" display? These are just some observations, since no one from SGI offered any advice, I thought I'd try to help. Now, if I could just find a fast and reliable polygon fill algorithm.. -- ----------------------------------------------------------------------------- Tony Facca | phone: 216-433-8318 NASA Lewis Research Center | Cleveland, Ohio 44135 | email: fsfacca@lerc08.lerc.nasa.gov -----------------------------------------------------------------------------   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa25381; 13 Jul 89 16:25 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa24982; 13 Jul 89 16:14 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ac24720; 13 Jul 89 15:52 EDT Received: from prandtl.nas.nasa.gov by SMOKE.BRL.MIL id aa27207; 13 Jul 89 15:16 EDT Received: Thu, 13 Jul 89 12:16:26 pdt by prandtl.nas.nasa.gov (5.51/1.2) Received: Thu, 13 Jul 89 15:17:57 EDT by lerc08.lerc.nasa.gov (5.52/LeRC(1.0)) Date: Thu, 13 Jul 89 15:17:57 EDT From: Tony Facca Message-Id: <8907131917.AA02619@lerc08.lerc.nasa.gov> To: info-iris%brl.mil@prandtl.nas.nasa.gov Subject: Re: Screen Saver for 4D >> We have a 4D-120GTX running IRIX 3.1D, and our blanktime runs all the >> time. After about 10 minutes, the screen goes black whether anyone is >> logged in or not. This is the same on our new 4D-220 also. I wonder >> why there appears to be a difference in the blanktime operation between >> your machines and these? These are fairly new, so maybe there have been >> some recent mods. Like I mentioned, the Personal Iris's don't have any problem either. I have just finished installing rev10 PROMS (this gives you the menu when you start the system) and version 3.1D on the 4D/70G's and the screen STILL doesn't blank after you logout. So it must be something else... -- ----------------------------------------------------------------------------- Tony Facca | phone: 216-433-8318 NASA Lewis Research Center | Cleveland, Ohio 44135 | email: fsfacca@lerc08.lerc.nasa.gov -----------------------------------------------------------------------------   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00426; 13 Jul 89 17:25 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id aa00083; 13 Jul 89 17:14 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa25311; 13 Jul 89 16:22 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa28031; 13 Jul 89 15:51 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22460; Thu, 13 Jul 89 07:05:36 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 13 Jul 89 13:23:16 GMT From: "K. V. Rao" Subject: dvi2ps, LaTeX, 4D, Iris Message-Id: <2503@amelia.nas.nasa.gov> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Has anybody ported dvi2ps on a 4D/240 GTX or a PI? I am having trouble doing so and would appreciate any help, including any anonymous ftp sources. Also, while trying to port LaTeX on our 240GTX, I encountered problems with some X11 stuff. It could'nt find some include files Xlib.h and Xutil.h. Any comments, suggestions? Thanx in advance. Please send E-mail to rao@amelia.nas.nasa.gov K. V. Rao Advanced Turbomachinery Department Allison Gas Turbine Division, Indianapolis   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab00426; 13 Jul 89 17:25 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ab00083; 13 Jul 89 17:14 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab25311; 13 Jul 89 16:22 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa28051; 13 Jul 89 15:52 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA05470; Thu, 13 Jul 89 11:17:22 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 13 Jul 89 17:13:57 GMT From: Mark Grossman Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: BITBLT for 3030? Message-Id: <37889@sgi.SGI.COM> References: <8907071121.aa24621@VMB.BRL.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907071121.aa24621@VMB.BRL.MIL>, moss@BRL.MIL ("Gary S. Moss", VLD/VMB) writes: > however: If the destination rectangle of the rectcopy() had an X coordinate > which was a multiple of 16 (i.e., rectopy's 5th argument), than the copy > was *very* fast, but anything else was blindingly slow. I don't recall if > the source rectangle's position was a factor or not (either it wasn't or > my source rectangle happened to be aligned). What I used to do was allow Actually, this speedup can be achieved by ensuring that the DIFFERENCE between the source and destination rectangle positions is a multiple of 16.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ad03254; 14 Jul 89 1:02 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ae03087; 14 Jul 89 0:51 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa02990; 14 Jul 89 0:36 EDT Received: from uunet.UU.NET by SMOKE.BRL.MIL id aa29948; 13 Jul 89 17:10 EDT Received: from suntc.UUCP by uunet.uu.net (5.61/1.14) with UUCP id AA05728; Thu, 13 Jul 89 17:09:03 -0400 Received: by suntc.uucp (3.2/SMI-3.2) id AA18098; Thu, 13 Jul 89 15:58:15 CDT Date: Thu, 13 Jul 89 15:58:15 CDT From: john howell Message-Id: <8907132058.AA18098@suntc.uucp> To: uunet!BRL.MIL!info-iris@uunet.uu.net Subject: /debug size lewis@castor writes ... >Is there any way to reduce the size of /debug, as it acts like it takes >up 50Mb on our system? Is this a wise thing to do? Thanks. I believe that /debug represents the swap space on your system. Personally I think 50 MB is just barely enough.   Received: from VMB.BRL.MIL by VMB.brl.MIL id ab03460; 14 Jul 89 1:30 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ae03254; 14 Jul 89 1:11 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa03221; 14 Jul 89 1:00 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa27866; 13 Jul 89 15:49 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA05446; Thu, 13 Jul 89 11:16:52 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 13 Jul 89 16:53:53 GMT From: Ted Wilcox Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: RAM Message-Id: <37879@sgi.SGI.COM> References: <8907111747.aa25894@SMOKE.BRL.MIL>, <37817@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <37817@sgi.SGI.COM>, jmb@patton.sgi.com (Jim Barton) writes: > > In article <8907111747.aa25894@SMOKE.BRL.MIL>, frobinso@cirm.northrop.com (Fletcher Robinson) writes: > > Does anyone know if CPU main memory(RAM) in a 4D70GT is dual-ported ? > > i.e. is it accessible from the VMEBUS ? > > The answer is yes and no. Only the lower 8 megabytes of CPU memory are > addressable from the VMEBus. For a description, see the 'system' file > in /usr/sysgen. Also, you need to note that the memory will answer ONLY to NON-PRIVILEGED data access requests (address modifiers 0x39 0x9). If you try to assert supervisory address modifiers, the memory will not answer. -- Ted. ted@sgi.com {sun|decwrl|pyramid|ucbvax}!sgi!ted   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03586; 14 Jul 89 1:40 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id aa03460; 14 Jul 89 1:30 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id am03221; 14 Jul 89 1:04 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa04197; 13 Jul 89 23:05 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA03704; Thu, 13 Jul 89 19:53:52 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 14 Jul 89 02:17:39 GMT From: "D. Christopher Dunlap" Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: dog on IRIS 3130 Message-Id: <37983@sgi.SGI.COM> References: <2489@amelia.nas.nasa.gov> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <2489@amelia.nas.nasa.gov>, currier@prandtl.nas.nasa.gov (Jeffrey M. Currier) writes: > We have two IRIS 3130's and we used to be able to fly > air to air combat with the dog demo program. We used to have > to use the 3000.xns kernel, but now with whatever kernel it try > I get the error message: > > "Ethernet init failed" > > Does anyone know what the solution might be. Thanks in advance. > > ----------------------------------------------------------------- > Jeff Currier (602)621-4948 | "Live each day as your last, > Computational Fluid Mechanics Lab | because to die already dead > University of Arizona, Tucson | is the worst death of all." > currier@prandtl.nas.nasa.gov | > ----------------------------------------------------------------- The "dog" program you're running is the xns version. The kernel you're running isn't. You might use the "kernels" command to see what kernel you're using and change to the xns version, or even better, get the TCP version of dog. (Anyone remember how folks can get copies of that?) later, chris -- D. Christopher Dunlap email: dunlap@sgi.sgi.com Hardware Product Support Customer Support Division Silicon Graphics Computer Systems   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa04337; 15 Jul 89 8:47 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab04126; 15 Jul 89 8:37 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab04115; 15 Jul 89 8:27 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa13523; 15 Jul 89 8:04 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA13087; Sat, 15 Jul 89 04:48:49 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 13 Jul 89 20:08:34 GMT From: Jeremy Nussbaum Organization: /jeremy/jeremy/jeremy/.organization Subject: gnu emacs 18.54, gnus3.12, gethostbyname Message-Id: Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I just bought up gnu emacs 18.54 (and 18.53) on an sgi 4d workstation under release 3.1 of the sgi os. I had been using 18.51, compiled on an earlier release of the os. Under 18.51, gnus started up w/o trouble. Now, as soon as it tries to connect to the nntp server it gets a segmentation violation. The traceback shows index.index called by res_init.res_init called by res_search called by _gethostbyname_named called by gethostbyname called by Fopen_network_stream. I have verified that I am still calling gethostbyname with the same valid hostname, and that a small program can make the call successfully. I don't actually have the named up and running. Any ideas on what might be causing the segmentation violation, and what I might do to get around the problem? Thanks in advance, -- Jeremy Nussbaum (jeremy@jeremy.prime.com, ...!harvard!prmcad!jeremy) Prime Computer/2 Crosby Drive MS 16-2 /Bedford, Ma. 01730 (617)275-1800 x6745 Standard Disclaimer: The opinions expressed are mine and not my employer's.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab04337; 15 Jul 89 8:48 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ac04126; 15 Jul 89 8:37 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ac04115; 15 Jul 89 8:27 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa13532; 15 Jul 89 8:07 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA13168; Sat, 15 Jul 89 04:50:16 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 14 Jul 89 03:30:12 GMT From: Jeremy Nussbaum Organization: Prime Computer, Bedford, Ma. Subject: Re: gnu emacs 18.54, gnus3.12, gethostbyname Message-Id: References: Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article jeremy@lana.prime.com (Jeremy Nussbaum) writes: Summary: gethostbyname problem under gnuemacs 18.53/4 with irix 3.1 Date: 13 Jul 89 20:08:34 GMT Lines: 18 Xref: cvbnet2 comp.sys.sgi:1051 gnu.emacs:109 comp.emacs:5879 I just bought up gnu emacs 18.54 (and 18.53) on an sgi 4d workstation under release 3.1 of the sgi os. I had been using 18.51, compiled on an earlier release of the os. Under 18.51, gnus started up w/o trouble. Now, as soon as it tries to connect to the nntp server it gets a segmentation violation. The traceback shows index.index called by res_init.res_init called by res_search called by _gethostbyname_named called by gethostbyname called by Fopen_network_stream. I have verified that I am still calling gethostbyname with the same valid hostname, and that a small program can make the call successfully. I don't actually have the named up and running. Any ideas on what might be causing the segmentation violation, and what I might do to get around the problem? Thanks in advance, -- Jeremy Nussbaum (jeremy@jeremy.prime.com, ...!harvard!prmcad!jeremy) OK, I worked on it some more, and finally figured out that it is the programmers workbench library that is causing the problem. I haven't yet ascertained which routine is being redefined, but I have "successfully" gotten a three line program to dump core consistenly simply by linking in the libPW library. Followups to comp.sys.sgi. -- Jeremy Nussbaum jeremy@jeremy.prime.com, ...!harvard!prmcad!jeremy Prime Computer 2 Crosby Drive MS 16-2 Bedford, Ma. 01730 (617)275-1800 x6745   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa07903; 14 Jul 89 8:36 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id aa06360; 14 Jul 89 8:26 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa06303; 14 Jul 89 8:12 EDT Received: from AERO4.LARC.NASA.GOV by SMOKE.BRL.MIL id aa08647; 14 Jul 89 7:44 EDT Received: Fri, 14 Jul 89 07:44:13 EDT by aero4.larc.nasa.gov (5.52/5.6) Date: Fri, 14 Jul 89 07:44:13 EDT From: "Brent L. Bates TAD/TAB ms294 x42854" Message-Id: <8907141444.AA08943@aero4.larc.nasa.gov> To: amelia!prandtl.nas.nasa.gov!currier@ames.arc.nasa.gov Subject: Re: dog on IRIS 3130 Cc: info-iris@BRL.MIL I used to have that problem. We run TCP/IP and the dog that comes with the machine is XNS. I got the TCP/IP dog source a while back and compiled it, now I no longer get the "Ethernet init failed". As far as I know, you only get an "Ethernet init failed" if you are trying to run a version of dog that doesn't match the protocal your machine is using. The only problem I have now is that it floods the network with too many packets sent to broadcast, thus over loading the network. I wish dog had the ability to read in a file of machine names and only send packets to those machines. Has anyone done this? Without this option I can't try the network option of dog. -- Brent L. Bates NASA-Langley Research Center M.S. 294 Hampton, Virginia 23665-5225 (804) 864-2854 E-mail: blbates@aero4.larc.nasa.gov or blbates@aero2.larc.nasa.gov   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa11270; 14 Jul 89 9:59 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ab10858; 14 Jul 89 9:48 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa10700; 14 Jul 89 9:35 EDT Received: from ugw.utcs.utoronto.ca by SMOKE.BRL.MIL id aa11661; 14 Jul 89 9:09 EDT Received: from VM.NRC.CA (stdin) by ugw.utcs.utoronto.ca with BSMTP id 57348; Fri, 14 Jul 89 09:00:10 EDT Received: from NRCNET.NRC.CA by VM.NRC.CA (Mailer R2.03B) with BSMTP id 1239; Fri, 14 Jul 89 08:57:59 EDT Date: Fri, 14 Jul 89 09:53:00 EDT From: Martin Serrer - Systems Manager Subject: Colour editor To: info-iris@BRL.MIL X-VMS-To: NRCNET::IN%"info-iris@BRL.MIL" Message-Id: <89Jul14.090010edt.57348@ugw.utcs.utoronto.ca> Hello out there... Does any one out there have a CEDIT like tool which reports the RGB values in HEX rather than in base 10. (for cpack(); ) My brain doesn't work the conversions very fast. Or is there an option on CEDIT which I am missing?? Also is there a RPN calculator available which uses the keypad or any calculator which uses the keypad??? Question... Why does 4Sight V1.2 stop working after 3-4 hours of use. The windows lock up one by one. The fix is to log out and log back in (a pain). Sometimes a reboot is the only thing that will save it.(a much bigger pain) The only extra software running on the system is 4DDN (DECnet endnode). The system is currently being used only to edit/compile/run small 'real rate' graphics programs (no major load on the system or so I would have thought.) This is all on a 4D50/GT with 8Meg +------------------------------------------------------------------------------+ | Martin Serrer - Systems Munger | | | +---+ /----\ | | Systems Laboratory, Bldg. M-3 RM.118 | |\ | | | | \ | | Division of Mechanical Engineering | | \ | | | | | | National Research Council of Canada | | \ | |---+ | | | Ottawa, Ontario, Canada K1A-0R6 | | \ | | \ | | | serrer@syslab.nrc.ca (BITNET) | | \| | \ | / | | (613) 993-9442 (Bell) | | | | \ \----/ | +------------------------------------------------------------------------------+ + Software Rusts... Rust never Sleeps... + +------------------------------------------------------------------------------+   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa11811; 14 Jul 89 10:28 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ab11270; 14 Jul 89 10:07 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa11185; 14 Jul 89 9:55 EDT Received: from AERO4.LARC.NASA.GOV by SMOKE.BRL.MIL id aa09596; 14 Jul 89 8:14 EDT Received: Fri, 14 Jul 89 08:14:38 EDT by aero4.larc.nasa.gov (5.52/5.6) Date: Fri, 14 Jul 89 08:14:38 EDT From: "Brent L. Bates TAD/TAB ms294 x42854" Message-Id: <8907141514.AA09052@aero4.larc.nasa.gov> To: sgi!dunlap%bigboote.csd.sgi.com@ucbvax.berkeley.edu Subject: Re: dog on IRIS 3130 Cc: info-iris@BRL.MIL The only way I know of getting the dog source is to buy the IRIS Software Exchange Release tape for the 2000/3000 Series. They also have a release tape for non-GT 4D's. The 2000/3000 tape has: SGI Demo Source Princeton Toolkit ICARE Slidemaker, Naval Postgraduate School S/W Elecro-Paint & Panel Library The 4D tape has: SGI Demo Source Elecro-Paint & Panel Library Oper Slidemaker Both tapes cost $100.00. Make sure you request that the dog software be on the tape, you can also get arena if you ask for it. Someone at SGI had made changes to dog to allow it to use icons on 4D's, but in the process "broke" it for the 3000's. It took me a while to get it fixed, but I did it with some help from someone at SGI. Hopefully, they have fixed it. Send your request to: User Services Silicon Graphics, Inc. Mailstop 2U-420 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311 Attn: Monica Schulze -- Brent L. Bates NASA-Langley Research Center M.S. 294 Hampton, Virginia 23665-5225 (804) 864-2854 E-mail: blbates@aero4.larc.nasa.gov or blbates@aero2.larc.nasa.gov   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab14085; 14 Jul 89 11:10 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ab12756; 14 Jul 89 10:59 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa12717; 14 Jul 89 10:45 EDT Received: from uxc.cso.uiuc.edu by SMOKE.BRL.MIL id aa14726; 14 Jul 89 10:32 EDT Received: from kailand.UUCP by uxc.cso.uiuc.edu with UUCP (5.61+/IDA-1.2.8) id AA14170; Fri, 14 Jul 89 09:23:37 -0500 Received: by kailand.kai.com (4.12/kai2.5c/09-20-88) id AA29981; Fri, 14 Jul 89 09:14:49 cdt Message-Id: <8907141414.AA29981@kailand.kai.com> Organization: Kuck and Associates, Inc., 1906 Fox Drive, Champaign IL 61820, voice 217-356-2288, fax 217-356-5199 Date: Fri, 14 Jul 89 09:14:48 CDT X-Mailer: Mail User's Shell (6.5.5 6/26/89) From: Patrick Wolfe To: info-iris@BRL.MIL Subject: Re: A port of lpd /* Written 8:23 am Jul 14, 1989 by srp@cgl.ucsf.edu in kailand:kai.sgi */ > I would be willing to send (or post, should that be appropriate) **diffs** > to the 4.3 BSD source, but I cannot post the source code in it's entirety > (legal issues, you know). The entire source to the BSD "lpr" package (lpc, lpd, lpr, lprm, etc.) as distributed with BSD 4.3-tahoe is available via anonymous ftp at uunet.uu.net (look in /bsd-sources/usr.lib/lpr). This is one of the pieces of software that has been determined to be completely free of AT&T source code, and freely distributable (in other words, you don't need an source license to get, use or distribute it). -- Patrick Wolfe (pat@kai.com, kailand!pat) System Manager, Kuck & Associates, Inc.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa16070; 14 Jul 89 13:14 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa15616; 14 Jul 89 13:04 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa15607; 14 Jul 89 12:54 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa18549; 14 Jul 89 12:20 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA13158; Fri, 14 Jul 89 09:02:28 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 14 Jul 89 15:10:11 GMT From: Gary Tarolli Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: gl2 library routines for faster graphics Message-Id: <38000@sgi.SGI.COM> References: <8907112203.AA22556@uxa.cso.uiuc.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907112203.AA22556@uxa.cso.uiuc.edu>, ha90353@UXA.CSO.UIUC.EDU (Homayoon Akhiani) writes: > > We are doing real-time simulation using iris 3000 series. > In the gl2 library I found routines which are not documented > in the manuals, but are very fast: > gl_sincos() calculates sin and cos of a angle in about 10 times > faster than the math and floating point library. > gl_identifymatrix() whichpush and loads an identity matrix. > > Does anyone has any information about the routines that are > in the gl library which is not documented ? > > ------------------------------------------------------------------------- You would be wise not to use internal GL routines as they are not guarenteed to be the same, or even exist on all machines. Yes, gl_sincos() is a fast table lookup that appears in all GL's. Use it if you like, but don't call us if it breaks or disappears. gl_identifymatrix simply sets a matrix to the Identity matrix. Both of these routines are fairly trivial and so to be safe you should write them yourself so they are in your code. That way things are in your control and even if they disappear from the GL you wont care. There might be other routines in the GL that could help you out. But that is not the right way to go about optimizing your code. First identify your bottlenecks using prof or other profiling tools. Then optimize the critical sections. Chances are, your application's needs are slightly different from the GL's and so a customized gl_sincos() routine might be more optimal for your application. -- Gary Tarolli   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa21514; 14 Jul 89 17:49 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab20945; 14 Jul 89 17:39 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ah20720; 14 Jul 89 17:21 EDT Received: from masig1.ocean.fsu.edu by SMOKE.BRL.MIL id aa02778; 14 Jul 89 15:00 EDT Received: by masig1.ocean.fsu.edu (5.52/25-eef) id AA23103; Fri, 14 Jul 89 15:03:41 EDT Date: Fri, 14 Jul 89 15:03:41 EDT From: Alan Davis Message-Id: <8907141903.AA23103@masig1.ocean.fsu.edu> To: info-iris@BRL.MIL Subject: scrsave.c Several months ago our group bought a Tektronix 4693D printer for our IRIS. After learning that SGI first was, then wasn't going to release their driver for that printer, I wrote our own driver for a 3130 machine. The software works great and a number of other people have requested it for their 4D machine. Unfortunately there are a couple of window manager compatability problems. First, on the 3130 you can copy the whole screen as when the mex is running you have to be in colormap mode. This is not the case on the 4D as you can mix colormap and RGB modes. Second I am unable to copy the screen outside of an existing window. Upon doing a little investigation on a Personal IRIS I discovered the new version of scrsave.c used by icut which has no trouble copying the whole screen in any mode. There are two undocumented routines in there: wmplanes() and gl_readscreen() which look rather suspicious. Does anyone have some info concerning these routines and/or has anyone sucessfully used them or are there other routines which I should be using? Thanks for your help. -- Alan Davis | Mesoscale Air-Sea Interaction Group | TCP/IP davis@masig1.ocean.fsu.edu Florida State University | (128.186.3.1) 435 OSB Meteorology Annex | SPAN scri::"davis@masig1.ocean.fsu.edu" Tallahassee, FL 32306-3041 | BITNET davis%masig1.ocean.fsu.edu@cunyvm (904) 644-3798 | _______________________________________________________________________________   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab21571; 14 Jul 89 18:08 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa20945; 14 Jul 89 17:39 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ac20720; 14 Jul 89 17:20 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa01593; 14 Jul 89 14:04 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA19735; Fri, 14 Jul 89 11:00:28 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 14 Jul 89 17:12:52 GMT From: Eugene Miya Organization: NASA Ames Research Center, Calif. Subject: Re: NCGA's GPC committee. Message-Id: <4335@eos.UUCP> References: <890711112427.00000160031@rsgate.RSG.HAC.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL NCGA GPC: This effort is dorminant. Our effort is largely dorminant (Bay Area ACM/SIGGRAPH Technical Interest Group on Performance Evaluation of Graphics Systems). We have to start meeting again (typically at SUN or SGI). Contact brian@sun.com. Another gross generalization from --eugene miya, NASA Ames Research Center, eugene@aurora.arc.nasa.gov resident cynic at the Rock of Ages Home for Retired Hackers: "You trust the `reply' command with all those different mailers out there?" "If my mail does not reach you, please accept my apology." {ncar,decwrl,hplabs,uunet}!ames!eugene Live free or die.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00399; 14 Jul 89 22:58 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00335; 14 Jul 89 22:47 EDT Received: from Outlaw.UWyo.Edu by VMB.BRL.MIL id aa05298; 14 Jul 89 7:15 EDT Received: from uwyo.edu by CORRAL.UWyo.Edu with INTERNET ; Fri, 14 Jul 89 00:14:23 MDT Received: by uwyo.edu (4.0/SMI-4.0) id AA01169; Fri, 14 Jul 89 00:04:39 MDT Date: Fri, 14 Jul 89 00:04:39 MDT From: oliver%sunshine@CORRAL.UWyo.Edu (Mark Oliver) Message-Id: <8907140604.AA01169@uwyo.edu> To: info-iris-request%vmb.brl.mil@CORRAL.UWyo.Edu Subject: attaching DRL to x-window Resent-Date: Fri, 14 Jul 89 22:33:39 EDT Resent-From: Chuck Kennedy Resent-To: info-iris@BRL I am looking for information leading to the ability (or lack there of) of doing GL/DGL graphics in an Iris X-window. Knowing it cannot be done is just as valuable to me as knowing it can. Any hints or pointers to missed manual sections would be well received Thanks in advance Mark Oliver captain@outlaw.uwyo.edu   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01568; 15 Jul 89 2:03 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab01444; 15 Jul 89 1:42 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab01438; 15 Jul 89 1:32 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa11051; 15 Jul 89 1:18 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA24306; Fri, 14 Jul 89 22:14:10 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 14 Jul 89 17:10:08 GMT From: "D. Christopher Dunlap" Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: /debug size Message-Id: <38011@sgi.SGI.COM> References: <8907121537.AA02390@castor.wustl.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907121537.AA02390@castor.wustl.edu>, lewis@CASTOR.WUSTL.EDU (Lewis Yuchan) writes: > Is there any way to reduce the size of /debug, as it acts like it takes > up 50Mb on our system? Is this a wise thing to do? Thanks. > > -- > > lewis@castor.wustl.edu "The blonde spat at me and threw > Lewis Yuchan Geer herself on my leg and tried to bite The "/debug" filesystem doesn't take up any space. You can look at it as a sort of logical construct that acts as a window into the virtual memory space. It's size is the combination of Real User memory space and Swap Space. (So I guess reducing swapspace would make /debug smaller, but that's usually not a good idea. Most people want to INCREASE swapsace.) The Files shown are actually the processes that are runnning. Things like debugers use /debug as a way to get at running processes in a more elegant and reasonable way. I think there was a more lucid discussion of how all this works a while back in this newsgroup. chris -- D. Christopher Dunlap email: dunlap@sgi.sgi.com Hardware Product Support Customer Support Division Silicon Graphics Computer Systems   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01861; 15 Jul 89 2:34 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01444; 15 Jul 89 1:42 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa01438; 15 Jul 89 1:32 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa11049; 15 Jul 89 1:18 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA24390; Fri, 14 Jul 89 22:15:54 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 14 Jul 89 22:19:26 GMT From: Mike Thompson Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: Virtual space per process Message-Id: <38058@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907120803.aa04936@SMOKE.BRL.MIL>, XBR2D96D@DDATHD21.BITNET (Knobi der Rechnerschrat) writes: > Hallo, > > just a small question: what is the maximal available virtual address space > (not counting swap space or physical memory) for each process on: > > an IRIS 4D/20 > an IRIS 4D/50/60/70/80 (using the MIPS 20xx chips) > a Power Series machine (using the MIPS 30xx chips) > > > Regards > Martin Knoblauch The maximum per-process virtual address space on all the 4D machines is 2 Gb. A smaller per-process virtual address space can be enforced by changing the MAXUMEM definition in the /usr/sysgen/master.d/kernel file and lboot'ing a new kernel (MAXUMEM is expressed in 4K pages). Michael Yohn Thompson   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa25863; 20 Jul 89 18:11 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa25407; 20 Jul 89 17:33 EDT Received: from adm.brl.mil by VMB.BRL.MIL id aa25403; 20 Jul 89 17:24 EDT Received: from NRTC.NORTHROP.COM by ADM.BRL.MIL id aa03050; 20 Jul 89 17:12 EDT Received: from cirm.northrop.com by nrtc.nrtc.northrop.com id ab03026; 14 Jul 89 15:03 PDT Date: Fri, 14 Jul 89 15:04:54 PDT From: Fletcher Robinson To: info-iris@BRL.MIL Subject: FX Message-ID: <8907201712.aa03050@ADM.BRL.MIL> When setting parameters for disk drive formating using 'fx', it defaults to a data rate of (3). How does this translate into megabits per second ?   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06929; 16 Jul 89 4:13 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab06820; 16 Jul 89 3:41 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab06803; 16 Jul 89 3:22 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa20272; 16 Jul 89 3:05 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA03921; Sun, 16 Jul 89 00:00:33 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 16 Jul 89 05:45:32 GMT From: Chris Ott Organization: Computer Aided Engineering Lab, U of A, Tucson, AZ Subject: /debug size Message-Id: <1008@amethyst.math.arizona.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL lewis@castor.wustl.edu (Lewis Yuchan Geer) writes: > Is there any way to reduce the size of /debug, as it acts like it takes > up 50Mb on our system? Is this a wise thing to do? Thanks. No, it's not a wise thing to do. The /debug partition is actually the swap partition for the IRIX system. Reducing its size will reduce the amount of virtual memory available to all of the processes on the system. fsfacca@LERC08.LERC.NASA.GOV (Tony Facca) writes: > As far as I can determine, this is not physical disk space, but rather some > sort of virtual disk. No, it is actual, physical disk space. It is required for virtual memory. > The size allocated to /debug changes as users on the > system do thier work. This is _not_ true. The amount of space _available_ in /debug changes as users do their work, but the amount allocated is determined when the hard disk is partitioned, just like the / and /usr filesystems. > Even if you were to remove the files in /debug, you would not gain any > disk space to use for permanent storage, so its probably not wise to do > anything with it. Considering that each file in the /debug partition represents the virtual memory of a process on the system, I'd say deleting any of them would be unwise, at best. Notice, also (in "df") that /debug's filesystem type is "dbg", while the others are "efs" or "nfs". I wouldn't advise writing any normal files there, even though it appears to be possible. Do an "ls" on /debug. Notice that all of the files' names are numbers, rather than words. Now do a "ps". Notice that most of the PIDs listed by "ps" match the file names in the /debug partition. Reading and writing these files is the same as reading and writing the memory space of the corresponding process. It is used mostly by the debugger for reading and writing variables, hence the name /debug. Quite an ingenious idea on Silicon Graphics' part, in my opinion (if it was they who invented it). > So why even show it in the "df" display? Probably because it's a file system, just like / and /usr. The amount of memory available (displayed by "df") represents the amount of virtual memory left on your system. Personally, I like it. > since no one from SGI offered any advice, I > thought I'd try to help. Yeah, I'm surprised at this. They're usually pretty helpful. Maybe it's because it's the weekend... Chris ------------------------------------------------------------------------------- Chris Ott Forensic Productions, Inc. Infatuation is blind, not love. A Tucson, Arizona person in love can see the other's faults, but loves them anyway. Internet: chris@spock.ame.arizona.edu UUCP: {allegra,cmcl2,hao!noao}!arizona!amethyst!spock!chris -------------------------------------------------------------------------------   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa08216; 16 Jul 89 14:52 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa08123; 16 Jul 89 13:49 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa08114; 16 Jul 89 13:41 EDT Received: from Anaconda.Stanford.EDU by SMOKE.BRL.MIL id aa23435; 16 Jul 89 13:28 EDT Received: by anaconda.Stanford.EDU (4.0/SMI-3.2) id AA17013; Sun, 16 Jul 89 10:27:05 PDT Date: Sun, 16 Jul 89 10:27:05 PDT From: Byung-Uk Lee Message-Id: <8907161727.AA17013@anaconda.Stanford.EDU> To: info-iris@BRL.MIL Subject: Re: /debug size Cc: bul@anaconda.stanford.edu One problem with the /debug size is that it builds up. My guess is that there are some processes that claims swap spaces even after the process is killed. The only way to refresh the /debug directory seems to be rebooting the machine. Byung-Uk Lee   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa21400; 17 Jul 89 14:32 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa17772; 17 Jul 89 12:37 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa17748; 17 Jul 89 12:24 EDT Received: from AERO4.LARC.NASA.GOV by SMOKE.BRL.MIL id aa10836; 17 Jul 89 11:57 EDT Received: Mon, 17 Jul 89 11:57:51 EDT by aero4.larc.nasa.gov (5.52/5.6) Date: Mon, 17 Jul 89 11:57:51 EDT From: "Brent L. Bates TAD/TAB ms294 x42854" Message-Id: <8907171857.AA00297@aero4.larc.nasa.gov> To: davis@masig1.ocean.fsu.edu Subject: Re: scrsave.c Cc: info-iris@BRL.MIL When I wrote my screen dump routines, I didn't bother to use scrsave, since it wasn't documented, and wrote my own. Mine copies only the entire screen, not just part of it or just one window. We have a 3130. A few people have requested my software, but I haven't had a chance to put it on info-iris yet, sorry. I'll try to get that done. -- Brent L. Bates NASA-Langley Research Center M.S. 294 Hampton, Virginia 23665-5225 (804) 864-2854 E-mail: blbates@aero4.larc.nasa.gov or blbates@aero2.larc.nasa.gov   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa23373; 17 Jul 89 15:52 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22759; 17 Jul 89 15:42 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa22613; 17 Jul 89 15:29 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa17879; 17 Jul 89 15:04 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA09662; Mon, 17 Jul 89 11:42:06 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 17 Jul 89 14:47:43 GMT From: "D. Christopher Dunlap" Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: /debug size Message-Id: <38126@sgi.SGI.COM> References: <1008@amethyst.math.arizona.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <1008@amethyst.math.arizona.edu>, chris@spock.ame.arizona.edu (Chris Ott) writes: > > lewis@castor.wustl.edu (Lewis Yuchan Geer) writes: > > Is there any way to reduce the size of /debug, as it acts like it takes > > up 50Mb on our system? Is this a wise thing to do? Thanks. > > No, it's not a wise thing to do. The /debug partition is actually > the swap partition for the IRIX system. Reducing its size will reduce > the amount of virtual memory available to all of the processes on the > system. > Almost right. It's actually ALL the virtual space. Real memory AND swapspace. > Do an "ls" on /debug. Notice that all of the files' names are > numbers, rather than words. Now do a "ps". Notice that most of the PIDs > listed by "ps" match the file names in the /debug partition. Reading and > writing these files is the same as reading and writing the memory space of > the corresponding process. It is used mostly by the debugger for reading > and writing variables, hence the name /debug. Quite an ingenious idea on > Silicon Graphics' part, in my opinion (if it was they who invented it). > Yep. That's how it works. I'm not sure of the origin of the idea. > > So why even show it in the "df" display? > > Probably because it's a file system, just like / and /usr. The > amount of memory available (displayed by "df") represents the amount of > virtual memory left on your system. Personally, I like it. > I think it's mostly to make work for the Hotline. ;-} > > since no one from SGI offered any advice, I > > thought I'd try to help. > > Yeah, I'm surprised at this. They're usually pretty helpful. Maybe > it's because it's the weekend... > > Chris Hmmmm. I posted an article some time ago. (When I first saw the original) Maybe it didn't get out? Or maybe my .signature isn't getting stuck on my postings all of a sudden? So I'll put one on manually just to be sure... See ya, chris ------ D. Christopher Dunlap Support Team Manager Hardware Product Support (aka "The Geometry Hotline") Customer Support Division Silicon Graphics Computer Systems -- D. Christopher Dunlap email: dunlap@sgi.sgi.com Hardware Product Support Customer Support Division Silicon Graphics Computer Systems   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab24600; 17 Jul 89 16:42 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa24228; 17 Jul 89 16:31 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa24164; 17 Jul 89 16:19 EDT Received: from TACOM-EMH2.ARMY.MIL by SMOKE.BRL.MIL id aa19710; 17 Jul 89 15:43 EDT Received: (from user GJACKSON) by tacom-prime.arpa; 17 Jul 89 12:26:41 UT Subject: Laserwriter to 4D SGI Connection To: info-iris@vmb.brl.mil From: GJACKSON@TACOM-EMH2.ARMY.MIL Date: 17 Jul 89 12:26:41 UT Message-ID: <8907171543.aa19710@SMOKE.BRL.MIL> I have recently obtained an old Apple LaserWriter. I remember that some time ago there was some info on the info-iris net that gave some advice on hooking the LaserWriter to the Iris machines. Also, there was discussion on using 4Dgifts to 'capture' images from the screen and putting those in black & White on a LaserWriter. Could anyone offer me some starting advice on hooking up the LaserWriter to an IRIS 4D70GT via an RS232 port (eg. cable wiring, inittab mods, etc.). Also, I would appreciate any advice on using 4Dgifts to dump an image to the LaserWriter Thanks in advance... Gerry Jackson US Army Tank-Automotive Command Warren, MI ph 313-574-5032 gjackson@tacom-prime.arpa   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa26614; 17 Jul 89 19:14 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id aa26553; 17 Jul 89 19:03 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa26466; 17 Jul 89 18:49 EDT Received: from cunyvm.cuny.edu by SMOKE.BRL.MIL id aa23773; 17 Jul 89 18:30 EDT Received: from physics.swarthmore.edu by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 5374; Mon, 17 Jul 89 18:30:54 EDT Return-path: BUG%campus.swarthmore.edu@CUNYVM.CUNY.EDU Received: from campus.swarthmore.edu by physics.swarthmore.edu; Mon, 17 Jul 89 18:31 EDT Date: Mon, 17 Jul 89 18:26 EDT From: BUG%campus.swarthmore.edu@cunyvm.cuny.edu Subject: input to serial ports To: info-iris@BRL.MIL X-VMS-To: IN%"info-iris@brl.mil" Message-ID: <8907171830.aa23773@SMOKE.BRL.MIL> Can I have advice from someone on sending integers in ASCII format to my 4D/70 through one of the RS-232 ports on the back the towers? We are building/have built a joystick and would like to send a stream of triples of numbers: x y z in a way which can be comprehended by a graphics routine. Do we need (horrors!) some fancy driver in order to accomplish this? Thanks! Amy Bug, Dept. of Physics and Astronomy, Swarthmore College BUG@SWARTHMORE (BITNET) bug@campus.swarthmore.edu   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa29700; 18 Jul 89 3:57 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id aa29622; 18 Jul 89 3:25 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa29608; 18 Jul 89 3:16 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa00113; 18 Jul 89 3:05 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA18884; Tue, 18 Jul 89 00:00:51 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 17 Jul 89 18:07:16 GMT From: Chris Ott Organization: Computer Aided Engineering Lab, U of A, Tucson, AZ Subject: Shelltool for the IRIS Message-Id: <1010@amethyst.math.arizona.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I was wondering if anyone out there has anything resembling Sun's "shelltool" for the IRIS. It would be really handy to have the "stuff" feature. I really miss it in "wsh". Thanks, Chris ------------------------------------------------------------------------------- Chris Ott Forensic Productions, Inc. Infatuation is blind, not love. A Tucson, Arizona person in love can see the other's faults, but loves them anyway. Internet: chris@spock.ame.arizona.edu UUCP: {allegra,cmcl2,hao!noao}!arizona!amethyst!spock!chris -------------------------------------------------------------------------------   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa28229; 19 Jul 89 13:03 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa26594; 19 Jul 89 11:39 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa26544; 19 Jul 89 11:31 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa07764; 19 Jul 89 11:05 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA28299; Wed, 19 Jul 89 08:01:49 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 18 Jul 89 00:31:32 GMT From: "Thomas P. Mitchell" Organization: Silicon Graphics Computer Systems, Mountain View CA. Subject: Re: /debug size Message-Id: <215@odin.SGI.COM> References: <8907161727.AA17013@anaconda.Stanford.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907161727.AA17013@anaconda.Stanford.EDU> bul@ANACONDA.STANFORD.EDU (Byung-Uk Lee) writes: > >One problem with the /debug size is that it builds up. My guess is that there >are some processes that claims swap spaces even after the process is killed. >The only way to refresh the /debug directory seems to be rebooting the machine Please, the size of /debug is not real. /debug is a data structure which is used by the debugging tools to locate running processes. Users need do nothing with it. Except perhaps omit it in backups. The size is not real. Remember one of the primary goals of Unix/Irix(1) is to reuse code. When 'dbx' was enhanced to permit attaching running processes the model of a filesystem was apparently selected because there was a lot of code which was easy to reuse. As a side effect things like 'df' could return interesting things. The nature of 'interesting' is a result of the whims of the kernel programer. In other words things may change. What is documented is the -p flag to dbx. Let us review; /debug was designed as a hook for dbx. ^ *PERIOD* It happens to look like a filesystem. But that makes things like open/close/lseek etc. work in ordinary ways. Remember the part about reusing code. -------- (1) Both Trademarks. UNIX is AT&T's Irix is Silicon Graphics' -- Thomas P. Mitchell (ARPA:mitch@csd.sgi.com, UUCP: {decwrl,ucbvax}!sgi!mitch ) Rainbows -- The best (well second best) reason for windows. Thomas P. Mitchell (ARPA:mitch@csd.sgi.com, UUCP: {decwrl,ucbvax}!sgi!mitch ) Rainbows -- The best (well second best) reason for windows.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa14264; 18 Jul 89 15:36 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12160; 18 Jul 89 14:54 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa12052; 18 Jul 89 14:37 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa18490; 18 Jul 89 14:23 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA23859; Tue, 18 Jul 89 11:11:03 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 18 Jul 89 17:09:29 GMT From: Dave Ciemiewicz Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: Shelltool for the IRIS Message-Id: <38219@sgi.SGI.COM> References: <1010@amethyst.math.arizona.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <1010@amethyst.math.arizona.edu>, chris@spock.ame.arizona.edu (Chris Ott) writes: > > I was wondering if anyone out there has anything resembling Sun's > "shelltool" for the IRIS. It would be really handy to have the "stuff" > feature. I really miss it in "wsh". > A feature similar to stuff will be available in the 4D1-3.2A release which is coming out in the near future. I don't know the scheduled release date. Hope this helps a little. -- =============================================================================== Form: 27B-6 Submitted by: Central Services Operative, DC-473 Task: Duct repair Status: Emergency ===============================================================================   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa16878; 18 Jul 89 17:08 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab16709; 18 Jul 89 16:58 EDT Received: from ew09.nas.nasa.gov by VMB.BRL.MIL id aa16674; 18 Jul 89 16:40 EDT Received: by ew09.nas.nasa.gov (5.61/1.34) id AA28300; Tue, 18 Jul 89 13:32:17 -0700 Date: Tue, 18 Jul 89 13:32:17 -0700 From: raible@ew09.nas.nasa.gov (Eric L. Raible) Message-Id: <8907182032.AA28300@ew09.nas.nasa.gov> To: info-iris@vmb.brl.mil In-Reply-To: GJACKSON@tacom-emh2.army.mil's message of 18 Jul 89 14:14:39 UT <8907181427.aa18389@SMOKE.BRL.MIL> Subject: gdb on 4D's Reply-To: raible@orville.nas.nasa.gov Has anyone gotten gdb working on 4D's? - Eric (raible@orville.nas.nasa.gov)   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa18640; 18 Jul 89 23:10 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa18421; 18 Jul 89 22:18 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa18361; 18 Jul 89 22:04 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa25993; 18 Jul 89 21:48 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA19006; Tue, 18 Jul 89 18:36:11 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 19 Jul 89 00:46:49 GMT From: George Elkins Organization: Rutgers Univ., New Brunswick, N.J. Subject: Re: gdb on 4D's Message-Id: References: <8907181427.aa18389@SMOKE.BRL.MIL>, <8907182032.AA28300@ew09.nas.nasa.gov> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907182032.AA28300@ew09.nas.nasa.gov>, raible@EW09.NAS.NASA.GOV ("Eric L. Raible") writes: > > Has anyone gotten gdb working on 4D's? > > - Eric (raible@orville.nas.nasa.gov) Has anyone gotten gcc working on the 4D's? It might be an improvement over the one already here, the MIPS C compiler, which doesn't seem to support ANSI C. (I cannot even get it to compile some simple C language examples in the "GT Graphics Library User's Guide" without change, due to the way structures are initialized in the declarations.) George Elkins   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa20076; 19 Jul 89 5:30 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa20042; 19 Jul 89 5:10 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa20029; 19 Jul 89 5:00 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa29712; 19 Jul 89 4:49 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA11079; Wed, 19 Jul 89 01:42:35 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 18 Jul 89 22:11:39 GMT From: "Thomas P. Mitchell" Organization: Silicon Graphics Computer Systems, Mountain View CA. Subject: Re: /debug size Message-Id: <221@odin.SGI.COM> References: <8907161727.AA17013@anaconda.Stanford.EDU>, <215@odin.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL One of our engineers sent me some gentle flames about my last posting. The following is a summary of his note and our discussions. Both of us were concerned about a possible memory leak in the OS or some application. My initial posting was to keep people from using the equivalent of cotton clothes line to climb mountains. Now on to a possible real problem. A memory leak in SGI code is wrong and needs to be identified so we can fix it. As I indicated /debug can return fun things. In article <215@odin.SGI.COM> mitch@rock.sgi.com (Thomas P. Mitchell) writes: >In article <8907161727.AA17013@anaconda.Stanford.EDU> bul@ANACONDA.STANFORD.EDU (Byung-Uk Lee) writes: >> >>One problem with the /debug size is that it builds up. > >are some processes that claims swap spaces even after the process is killed. > >The only way to refresh the /debug directory seems to be rebooting the machine > > Please, the size of /debug is not real. /debug is a data > structure which is used by the debugging tools to locate > running processes. Users need do nothing with it. Except > perhaps omit it in backups. > > The size is not real. Remember one of the primary goals of > Unix/Irix(1) is to reuse code. When 'dbx' was enhanced to > permit attaching running processes the model of a filesystem > was apparently selected because there was a lot of code > which was easy to reuse. As a side effect things like 'df' > could return interesting things. The nature of > 'interesting' is a result of the whims of the kernel > programer. In other words things may change. > > What is documented is the -p flag to dbx. Let us review; > /debug was designed as a hook for dbx. > ^ *PERIOD* Thom is correct in that /debug is modelled after an early version of the the AT&T /proc mechanism. He is also correct in that /debug was implemented as a facility for multiprocess/arbitrary process debugging. The /debug mechanism replaced the ptrace mechanism for process control. AT&T will be implementing /proc in the System V.4 release. The semantics of /debug may be changed or replaced by the new /proc mechanism in the future. Though Thom refers to other "artifacts" of /debug being a file system as whimsical, I counter that much of what you see is a logical extension of the file system concept. For instance do a "df -ik /debug" to show the number of inodes and display all information in 1KB blocks. For instance: Filesystem Type kbytes use avail %use iuse ifree %iuse Mounted /debug dbg 51048 16664 34384 33% 46 50 48% /debug The field "iuse" shows the number of file system inodes in use. There is one inode per process file. Thus there are 46 processes running on this system. "ifree" shows the number of available inodes left on the file system. This means I could run 50 more processes (one inode per process) on the system. The default process limit (/usr/sysgen/kernel:#define NPROC) on a 4D is 96 processes. At one inode per process, we have 96 available inodes on /debug. 46 inodes in use plus 50 inodes free equals 96 inodes. The "kbytes" field represents the total size of the swap partition (a very real size). The "use" field indicates how much of my swap partition is in use and "avail" shows the remainder. Now, lets do an "ls -lsa /debug". total 42253 4 dr-xr-xr-x 2 root sys 1568 Jul 18 10:45 . 1 drwxr-xr-x 17 root sys 512 Jul 12 17:21 .. 232 -rw------- 1 root sys 118784 Jul 12 17:20 00001 . . . 2184 -rw------- 1 root engr 1118208 Jul 12 17:26 00240 1144 -rw------- 1 ciemo engr 585728 Jul 12 17:26 00241 472 -rw------- 1 ciemo engr 241664 Jul 12 17:26 00243 2320 -rw------- 1 root engr 1187840 Jul 12 17:58 00477 464 -rw------- 1 ciemo engr 237568 Jul 12 17:58 00478 The first column (ls -s) represents the size of the process in swap in 512 byte blocks. The permissions show that only root can write into the swap partition. Imagine all of the security breaches that could occur if just anybody could write into the swap partition. No, no, no. You don't want to be able to write arbitrary data into the swap space. Notice, also, that no one else has write permissions for my process but myself. This is the permissions of the running process and all writing into the process is done on my behalf by the kernel (root). The number of links is 1 (one inode per process). The uid/gid are those of the running process. The size in bytes is the size of the virtual memory taken up by the process. The date shows the creation time of the process (a liberty taken since "ls" usually shows the last modification time). The file name is the process id. To correct Thom, these numbers are real. I hate to admit that something running on your system may be growing due to a memory leak. It would be most useful to yourself and SGI if you could watch your system and periodically note the change in size of long running processes. Try doing an "ls -s > /usr/tmp/ls.atboot" right after booting your system. If your system seems to have lost swap space "permanently", do another "ls -s > /usr/tmp/ls.chk1". You might want to sample at a couple points to get a good handle on memory usage. The representations of /debug by "ls" and "df" match up well with the concept of processes as files. The caveat here is that changes in IRIX and adoption of external standards will possibly change the semantics of these operations of /debug. > > It happens to look like a filesystem. But that makes things > like open/close/lseek etc. work in ordinary ways. Remember > the part about reusing code. > > -------- > (1) Both Trademarks. > UNIX is AT&T's > Irix is Silicon Graphics' =============================================================================== Form: 27B-6 Submitted by: Central Services Operative, DC-473 Task: Duct repair Status: Emergency =============================================================================== Thomas P. Mitchell (ARPA:mitch@csd.sgi.com, UUCP: {decwrl,ucbvax}!sgi!mitch ) Rainbows -- The best (well second best) reason for windows.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00123; 19 Jul 89 14:24 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab29502; 19 Jul 89 14:04 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab29362; 19 Jul 89 13:48 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12263; 19 Jul 89 13:34 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA06326; Wed, 19 Jul 89 10:24:46 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 18 Jul 89 19:02:14 GMT From: Super User Organization: Institute for Theoretical Physics, SUNY at Stony Brook, New York. Subject: Re: kermit for IRIS (really easy) Message-Id: <595@noether.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Newsgroups: comp.sys.sgi Subject: Re: Utilities for SGI Workstations Summary: Expires: References: <8907101758.aa28643@SMOKE.BRL.MIL> Sender: Reply-To: rosalia@noether.UUCP (Mark Galassi) Followup-To: Distribution: Organization: Institute for Theoretical Physics, SUNY at Stony Brook, New York. Keywords: In article <8907101758.aa28643@SMOKE.BRL.MIL> FRASER@ALCANKTN.BITNET writes: > Am looking for a couple of utilities for SGI systems: > 1) an up-to-date version of KERMIT; If you take straight Ckermit from uunet or something, then you can compile it with the SYSTEM V release 3 flags and it will work just fine. You have to run through the configuration options a a few things: for example the lock directory is in /usr/spool/locks instead of /usr/spool/uucp, or something like that. But I remember having a a distinct LACK of problems in compiling kermit.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00353; 19 Jul 89 14:35 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa29502; 19 Jul 89 14:03 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa29362; 19 Jul 89 13:48 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12250; 19 Jul 89 13:33 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA06349; Wed, 19 Jul 89 10:25:06 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 18 Jul 89 19:27:12 GMT From: Super User Organization: Institute for Theoretical Physics, SUNY at Stony Brook, New York. Subject: Re: dvi2ps, LaTeX, 4D, Iris Message-Id: <596@noether.UUCP> References: <2503@amelia.nas.nasa.gov> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <2503@amelia.nas.nasa.gov> rao@amelia.nas.nasa.gov (K. V. Rao) writes: > > Has anybody ported dvi2ps on a 4D/240 GTX or a PI? >I am having trouble doing so and would appreciate >any help, including any anonymous ftp sources. The standard common TeX distribution compiles just fine on the IRIS. You can just compile it withe the BIG option. It comes with the entri "dvi" set of stuff, include dvialw which converts to postscript (the "alw" stands for apple laser writer). Mark Galassi rosalia@mozart.UUCP rosalia@noether.sunysb.edu rosalia@sunysbnp.BITNET   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06658; 19 Jul 89 18:11 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06327; 19 Jul 89 17:29 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa06254; 19 Jul 89 17:12 EDT Received: from [192.12.31.1] by SMOKE.BRL.MIL id aa17842; 19 Jul 89 16:49 EDT Date: Wed, 19 Jul 89 16:40:16 EDT From: "David F. Rogers" To: info-iris@BRL.MIL cc: dfr@cad.usna.mil Subject: TeX on the Iris Message-ID: <8907191640.aa01464@CAD.USNA.MIL> G'day, Mike Gigante and I will be distributing TeX LaTeX dvi2ps TeXsgi (0.5 version) -- a previewer BibTeX misc utilities for the Iris 4D the end of this week/beginning of next week. Dave Rogers   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06959; 19 Jul 89 19:23 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06873; 19 Jul 89 19:02 EDT Received: from adm.brl.mil by VMB.BRL.MIL id aa06859; 19 Jul 89 18:48 EDT Received: from wucs1.wustl.edu by ADM.BRL.MIL id aa22465; 19 Jul 89 18:21 EDT Return-Path: Received: from wucs2.wustl.edu by wucs1.wustl.edu (5.59/1.35); id AA03299; Wed, 19 Jul 89 17:19:18 CDT Received: from castor.wustl.edu by wucs2. (4.0/SMI-4.0) id AA26241; Wed, 19 Jul 89 17:21:21 CDT Received: by castor.wustl.edu (5.52/SGI) id AA04848; Wed, 19 Jul 89 17:16:20 CDT Date: Wed, 19 Jul 89 17:16:20 CDT From: John Yuson Message-Id: <8907192216.AA04848@castor.wustl.edu> To: INFO-IRIS@BRL.MIL How does one obtain "Larry Wall's" patcher for diff files? Thanks in advance. John Y. Geer Dept. of Radiation Oncology/Physics Washington University Medical Center   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa07369; 19 Jul 89 21:45 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa07250; 19 Jul 89 21:14 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa07248; 19 Jul 89 21:07 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa19687; 19 Jul 89 20:33 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA29395; Wed, 19 Jul 89 17:20:25 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 19 Jul 89 21:45:28 GMT From: sgi!keith%hilda@ucbvax.berkeley.edu Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: NCGA's GPC committee. Message-Id: <38323@sgi.SGI.COM> References: <890711112427.00000160031@rsgate.RSG.HAC.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Silicon Graphics is one of the sponsors of the GPC project. The benchmarks are currently in the final stage before the first release. The GPC committee expects to demonstrate full working versions of the benchmarks at SIGGRAPH. Anyone may bring their own data set and run it on all of the sponsors' machines at the show. To get more information about the benchmark ( including a copy of the file formats ), contact Bob Willis at NCGA: National Computer Graphics Association 2722 Merrilee Drive Suite 200 Fairfax, VA 22031 (703) 698-9600 Silicon Graphics intends to have a Graphics Library version of the benchmark in our booth at the show. You will need to ask for Mark Daly at our booth for a demonstration. Gene Miya responded to the original GPC query by refering to TIGPE. Silicon Graphics is also participating in the TIGPE group. This group is cooperating with the GPC committee ( and actually has members who attend both groups' meetings). The work done by GPC is on a "Picture Level Benchmark (PLB)" while the work being done by TIGPE is more of a features benchmarks (e.i. vectors per second or polygons per second). If you have any further questions on these, you can contact me directly via e-mail. Keith Seto keith@sgi.com   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22147; 20 Jul 89 14:48 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa21401; 20 Jul 89 14:38 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa21348; 20 Jul 89 14:22 EDT Received: from AERO4.LARC.NASA.GOV by SMOKE.BRL.MIL id aa05778; 20 Jul 89 13:59 EDT Received: Thu, 20 Jul 89 13:59:57 EDT by aero4.larc.nasa.gov (5.52/5.6) Date: Thu, 20 Jul 89 13:59:57 EDT From: "Brent L. Bates AAD/TAB MS294 x42854" Message-Id: <8907202059.AA10649@aero4.larc.nasa.gov> To: sgi!keith%hilda@ucbvax.berkeley.edu Subject: Re: NCGA's GPC committee. Cc: info-iris@BRL.MIL So what exactly will the benchmarks at SIGGRAPH show? Are these just how fast you can display a canned picture? -- Brent L. Bates NASA-Langley Research Center M.S. 294 Hampton, Virginia 23665-5225 (804) 864-2854 E-mail: blbates@aero4.larc.nasa.gov or blbates@aero2.larc.nasa.gov   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00819; 21 Jul 89 20:28 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00612; 21 Jul 89 19:04 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab00580; 21 Jul 89 18:52 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa01296; 21 Jul 89 18:29 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA15112; Fri, 21 Jul 89 13:05:05 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 20 Jul 89 16:04:39 GMT From: Super User Organization: Institute for Theoretical Physics, SUNY at Stony Brook, New York. Subject: Re: Gnu emacs Message-Id: <597@noether.UUCP> References: <8907122031.aa07152@SMOKE.BRL.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907122031.aa07152@SMOKE.BRL.MIL> zsd@PIG.DREA.DND.CA (Jim Diamond) writes: > >I would like to bring up Gnu Emacs on our 4D/50 running >Release 4D1-3.14711181642 WITHOUT becoming an gnu emacs guru. > GNU emacs compiles just fine if you follow the instructions. The only hitch is that the "make install" procedure does not work since the "install" program on the iris is not the right one, and the iris also lacks "cpset". So just set up the Makefile (for paths) and config.h files (to include m-iris4D.h and s-iris3-6.h), and modify the 3rd or 4th line of etc/Makefile, and you can go. If anyone needs it, I include here a "tarmail" file of the main Makefile, the etc/Makefile and src/config.h. Note that src/Makefile does not want to be touched. This compiled on a personal iris and and iris 4D/220. Mark Galassi rosalia@mozart.UUCP rosalia@noether.sunysb.edu rosalia@sunysbnp.BITNET xbtoa Begin +.\Kf_Q51r-4QG"!"pbdaKVAULCb\&S4F4lLl4/HK!9JS#)sQ@08bDp;PZi&1MG.FW)it],.:`3C$^j?37]tn11^sd##WB8)**!+TV 6]:31AYGmY%"gjoh6ghPh^..jrSE3b]eQ9gE:en)RJ7=NCDgm$[0XeFB#Og]=l!)/k19**(1I0ih[I JP[G;pk8_M)emYba$CN-0un4D\ac:3!R@C,!`L4=";=IZciXP,LdBW#F.f3l?rs"@?#Q\3V&Fn/&dO "%DbR&LGcXc^gLXE9O@Ogu$$b;Dhham('1"TD6kWB7#buo]]YMN+@p&DU<,S3dfJt:QC8Qh7)`L)p"<1dr"p,e)bu$r5#i6_ m??=U>#'+aK0nra,EE:G*RPeLV'1!Tm71Yf<0SQO.\dE3k*dYpG#d'+aLE(B2@3$;4\8W#s(sW0&$$ 6(-7Zi$Lc!Q(qWL=,:ant,T1)<\.m7sj^Dk=/ihQ1\Z.>`H/YH*&-g SRpbkLdlpXV05jiC\dd16-RcNfb@H%8LS_'N%p_?A+]W`WbE_?CpAuqGa/=t497kdEP>OEaEs>[MH\R;F6l/)UkbDlB3RGSm3^P8m!pYuG.0'3hL$\pSe%+H4ndS TF+&,O$Fh3I&OTM@`=tmG;+026T,mTaZ$.11gdXghK\p:(704#^#UWX%[c4#1d"Q%mB_V<;N^+Mt *R8?jOo`0QNLG[&!hiGF6>$Tm;*4?M#R54ZQUTHQ^ZVpLKMcp46"ej`=#nW2C/pOq4K;C]g-&U<&s0P$Bi!'=8Q;: hQ(+j#<<8QrXeJ$@Zrb;$2@L(& LA>-#eDEHm!AP#R:]?E!I`Fi'/OZ6%OnIGR,MX$(%U;`.fe[(hkJu:PJEE#:a$6<=KK6_NjHK;^:Yf:js2io.>kH*t2.5D).EiAT<^a,2hnGaKKX"SaN$&bi81-`sob 6Pb"lUI21!93^BZ/e)3NufoD`1c^ZlsE".+Ep2oZ3#Cu\rcHBc6Ndh$XE1.TR'360%^5ji\tR+;(\RrL^j\Oh(Ga6V[];ZNWScE <1sND_V`>:**oO9%[1#4Ye766_eNs%'04Zm?4;^teFp /*NN<+*.sZ=cDDHYC*G%QAGJR;1>b"ZKaLMm./5D&2;bj&!N`>Qo,oK:g9gSq!cp3j=BF.:E:kKY8? mQW"JIH-E".[I0i=K?eKSiA()p"[#&^Ru,2pUrR+(Y^jf%#\o(`4Lmdl!r;K=$A4L/Erq?2g@tFeiI X#Vk9E5p4&)MQeTGZ2kI^pLb,mo,AU0@HC6t3OiJB60blbk;n)+cX#W'2K686=?p.,W"9(T+DhHbkD `b&`uau*Clo#>05(&LVRkGV,fof-fF]C73'?;9WBC66k^p4G M;%Hon:=VqFQjb=NR@1#@m65$g!*BEoZC-i!#nEU8_Z-r_[f_UVNL;0!nNJ8rn'#V4_<>I=M+Y\*?I W_e,'aN884?ETFR*).iY.u1k;:_u__8ga+a!4)r*k8,6YS5VG%,D8Q8 Stfo7K#YJh"in.^TpTfKUOGAh$1O7DO&WEd"fuJkUdu2j\SI2[(W1B8e0k-?=\e\:Q;'1p,ms9.2YL 5QjFSKjZ9],*RU[(j/0\F'GRCe.jo;-Sh742I58G"`X`mj#:C[KJ"Z9g80JB_h<;;KlNK6FguU:#;: '!M/=%E6TBm3-p2(6GBNLCB;gZWBSgY@Ki$rg2\L.?J72_(ge)8V\aFSCZ%G_F!`#C*.j[b()T(Wi=>C"e8!lt@R8aHI"rWR2n9FgB2kkRar5R#u\#2eul!4 @*Nf6(Gu),N$k/N7F(q)*F?/!d+6W2(0`eXIbR#5M]_3pb0\XN 5KN_$[)9iqObR@.[NN\(U/T8AZ58X`^pRLk=E?h9Z'3MV-#R`d^\/P2#kl'msYS'9P$cD`Ne.\)U"U m!7(]=FHQ3MenhTa1r>[o],knJg,[STNgB9D>!T[rp]PF6)R9k8B'/`#f$!.3:kAZQpWYI5j;Y I,pHE!u,X0c'2[Q5!D"Th3P"B>F's!O!J_B>kh/A'jo1\_]T1*,kY)'Ud#r=^Nq*slDnoY+!gV&hK^S3!Wi l7#JC.cJ'fs!0eW#E.V;K^Cd=a"B9mS:U"saO3U5e3l40H=dm*6Pk;h OBBcYr!sd!N#B,]grcAB2ZNa?T*dBu:#W`s?&[6"YTHYMSbV0.@tAirEb`_D/?D]uc^G(JQt+d$IfXVa.E`Y; TXUE?J.W_;c"2dFP3iu>M: ,C)$Fl=AGOWhHJE_4&I&*'nUf,9_`"pl.__\WMon8eLQ-qCL^5qlXa=sQo@P)0cBmf2b.m0\?!70_(obp(eXoMGs JV&>8?`R+Paf7(L`m=9,2TuC$cZ=6\#;k13KU.+k:$TpnB%"Z+o6A'#Nf9&6pbV.suCl`*kAC[t2'g ZnQ?)`HFigF1`c;OK?]"2QB2i$FH;Aar7>^[fWY)F8RY5]Q-"0(2_3bciF1l0ZPW+*&GqC2P;uQYf! g!_j:5\&*U"*S+B)BRC]Z$RU7[`TOPGPh*f\*6)AF``(ne8';[T*%tir! ,NXZDB-J^4+I@$b)e_*?=GOeV8p2qSuE.>Jugmpb?eDXa9G;^'K?s8gg.%@:7*$?N%`=>!_"k",m&JesJ*SOC:$b `u_5^tr&*AS7Tp9AZ2&UuYN+R6&4gVV;jVcj2/co]DT=-F[sM'5u3,4D$NfJCmg@^/fr"\oU39u(h7 C^./&0A-((.ImU/?.;A-"dH[&V2WNCpb9qebT?e3n0';`Dg.9bu *?X%sbdD@LcQX8oe'"Rfrn8.Yp,o*&7c"V[p_:N-JF#>O;1*m1Gujs#1TcnK!]Gj89HHed(r4aSD-c u_PgIi[0o?.cB:fH?:-Hem:QJH[d$8r='(N#d:i9GIPEXK*qdOfb:?I0Yf`&l5_cEhK)"dXZ[K#'`D ;Y@>N[/)/Yfd$4_9P+9FX%0E#Yg9"6,VEK9Rc-@I$fgR%9?Z=N0gY)f%g=MjZO=f,o)Sp;V0Xo9HB+ !2m.kesQ[W9_[8`CJj9I68.Hf1#9E58mPM?OAn\nJ4e^THJPbph-co)E?*g^Xb$f/M[ElhgM)!d%`,dK!'1)[*Di?"`P$]P5JOk_-5),8HZVLd.[+r9 Fmj/,ZudD6#9i8-MXPd,qno\Dd4ATn^p!`^oX7o7l3nf)jn1HVhffc74C^lneN,!s`_M]]e@-?;@2n)CQr`796?^]h'[+*,HZ!?T*j#P+#^@3?Oh!=%q4!Xm8\F: kic,(-'S+nT%UFgIS8n`BO3l6dbg6,6Or4W2's#A=%QGOPe9d1mHb/F)#GNE[3l:)0RBlAD(rDbRtA Jjg.o]D/W_*(71QHlZP=m:G8DhY;Q:-c-icQHB(Sf?VoW.2(TT#6cmJO([`f'#'M0nC#%R"UcCH_3H s-,R^fln*q#3&9s9@/:8>GgT?X4TOa_0"t6\VZ_n,$.2e3 0]%_7CE!7De^,#`k0VH`kDtWpjok<5+,3&8[*;7W=p3ocmB!:l$0H+T>p27)+As"*QN%\?r0840n.F '.Y&dI*'/UjG56,U`2@O).>a*,f6A!;CROidbU"5k^FprABGd2nX5_?4'r2P'J3^#r4b3]r`3>#5>n %Fbk/g:MIZH(OQ4IlaZPqirE/1>qkE5Lom>#(<]2_-d)X^Y1Ytr.n\1eUQf1c00VI"@mtF:`oqbQfA j57;#GugUH$V0RaBmioIe^H6EM!=qtQuYdh3Z'[M20o=+0&+)r5O$Z0o("GPg:_*ARUJ?W]Pjbni'O Y3rKdMLSM.;5D+OGG*s`u:U:^`ugq5BnhGd6R2%^`mn?c=j&@#Zqhc^eJSnEpF.85@Cu#JjtKN(78s TANVZtrP%1[a_QKhn@cO!"r5@CfTBKuO")tMGL7.+hp-0PP7LX&/>e'qMT!DB.kRFcID4,Uq@FA*,9 *Lu2=(Ru=0VH76#_5jA'SKnfgkpo+7>nF\du#f2r83"&6naAFO/8A(;Jm2plqDLG_=Qr%beWi-iKuN >dJm/&Gr$,#06\T+8DlD;i@?75PT3s'SuT!$1+k6\\G6Hrta8bgCDY(G)Z\'-Pc,A$g`@j$ij&+!@S `khuSdG$8>rE&`DbD*8kA;)%l@=ahh1O$YuFf]S3jL([AkCa:!?g0DpO>0Gk/7@7UfbTeSZaa=nK(" 98E% xbtoa End N 5741 166d E f9 S a58a9 R 544e67e5   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa23470; 28 Jul 89 4:14 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa23393; 28 Jul 89 4:03 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa26228; 20 Jul 89 19:19 EDT Received: from Apl.Stanford.EDU by SMOKE.BRL.MIL id aa12017; 20 Jul 89 18:57 EDT Date: Thu, 20 Jul 89 15:54:52 PDT From: Misha Pavel To: info-iris-request@BRL.MIL Subject: HELP: Low level terminal I/O Cc: mis@apl.stanford.edu Message-ID: <8907201857.aa12017@SMOKE.BRL.MIL> Resent-Date: Fri, 28 Jul 89 3:48:11 EDT Resent-From: Chuck Kennedy Resent-To: info-iris@BRL I have a problem that probably reflects more my understanding of the low-level I/O than its inherent difficulty, but I am not shure how to proceed. I need to read a tty line and return immediately even if there is nothing in the system buffer for that tty. To do that I set the terminal in raw mode with the folowing settings: term.c_iflag = IGNBRK; term.c_oflag = 0; term.c_lflag = 0; term.c_cflag = B9600 | CS8 | CREAD | PARENB | PARODD; term.c_cc[VMIN] = 1; term.c_cc[VTIME] = 0; I was hoping that the term.c_cc[VTIME] = 0 would do the job. But the system seems to be still waiting for at least one char. Is there any way to look at the system buffer and or return from read() when no input was generated? (Because of the real-time application I cannot afford to run a separate terminal process on my IRIS-2400). Any ideas? Thanks in advance Misha Pavel   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa29172; 21 Jul 89 7:21 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa28769; 21 Jul 89 6:29 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa28757; 21 Jul 89 6:19 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa03032; 21 Jul 89 6:04 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA12829; Fri, 21 Jul 89 02:59:21 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 21 Jul 89 07:23:58 GMT From: David A Higgen Organization: Silicon Graphics, Inc., Mountain View, CA Subject: fx and data rate Message-Id: <38476@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL > From frobinso@cirm.northrop.com Fri Jul 14 15:04:54 1989 > When setting parameters for disk drive formating using 'fx', > it defaults to a data rate of (3). How does this translate into > megabits per second ? Unfortunately, the 'data rate' part of the parameters mentioned by older versions of fx is historical garbage. It's not used by any current controllers, and has no relationship to the actual data rate... I believe this has been removed from current versions since it is now meaningless. Dave Higgen   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00083; 21 Jul 89 13:53 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06634; 21 Jul 89 13:32 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa06590; 21 Jul 89 13:20 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12789; 21 Jul 89 12:49 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA03484; Fri, 21 Jul 89 09:44:52 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 21 Jul 89 14:40:00 GMT From: "Douglas P. Katzman" Organization: University of Pennsylvania Subject: KCL patches Message-Id: <13115@netnews.upenn.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I couldn't reach a bunch of you by email. You know who you are. The patches should be available on info-iris. doug katzman   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01214; 21 Jul 89 22:18 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00996; 21 Jul 89 21:05 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa00990; 21 Jul 89 20:49 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa02632; 21 Jul 89 20:34 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA00811; Fri, 21 Jul 89 17:31:33 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 21 Jul 89 21:43:28 GMT From: Mark Bradley Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: FX Message-Id: <38516@sgi.SGI.COM> References: <8907201712.aa03050@ADM.BRL.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907201712.aa03050@ADM.BRL.MIL>, frobinso@cirm.northrop.com (Fletcher Robinson) writes: > When setting parameters for disk drive formating using 'fx', > it defaults to a data rate of (3). How does this translate into > megabits per second ? This is a vestigal remnant of a previously required field in the unit initialization block of our old controllers. It has no relationship with drive or controller transfer rate today. markb -- Mark Bradley "Faster, faster, until the thrill of IO Subsystems speed overcomes the fear of death." Silicon Graphics Computer Systems Mountain View, CA ---Hunter S. Thompson   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01565; 22 Jul 89 0:31 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01371; 21 Jul 89 23:38 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa01342; 21 Jul 89 23:28 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa03791; 21 Jul 89 23:19 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA09220; Fri, 21 Jul 89 20:18:47 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 22 Jul 89 02:54:31 GMT From: George Elkins Organization: Rutgers Univ., New Brunswick, N.J. Subject: Re: kermit for IRIS (really easy) Message-Id: References: <595@noether.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <595@noether.UUCP>, root@noether.UUCP (Super User) writes: > If you take straight Ckermit from uunet or something, then you can compile > it with the SYSTEM V release 3 flags and it will work just fine. You have > to run through the configuration options a a few things: for example > the lock directory is in /usr/spool/locks instead of /usr/spool/uucp, Here is the change I made to the ckermit files. (Note that Makefile is ckuker.mak after renaming appropriately.) The files were originally from uunet.uu.edu. I was compiling this on an Iris 4D/120 GTX. :::::::::::::: Makefile.diff :::::::::::::: 135,141d134 < # For Iris 4D, use "make sys5r3", but < # 1. Remove $(LNKFLAGS) from the line that links wart to < # produce an executable from ckwart.o. The -i option < # causes wart to dump core when executed. < # 2. Change the string "char *lockdir = /usr/spool/uucp" to < # "char *lockdir = /usr/spool/locks" in the file ckutio.c. < # 209c202 < $(CC) -o wart ckwart.o --- > $(CC) $(LNKFLAGS) -o wart ckwart.o :::::::::::::: ckutio.c.diff :::::::::::::: 793c793 < char *lockdir = "/usr/spool/locks"; --- > char *lockdir = "/usr/spool/uucp";   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02902; 22 Jul 89 6:32 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02592; 22 Jul 89 5:09 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa02573; 22 Jul 89 4:55 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa06458; 22 Jul 89 4:34 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA24179; Sat, 22 Jul 89 01:27:05 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 21 Jul 89 20:29:58 GMT From: Christopher Hull Organization: EMBA-CF, University of Vermont Subject: colormaps in .im8 rasterfiles Message-Id: <1236@uvm-gen.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I have been trying to display some rasterfiles(.im8) images from my own program. The files in particular are the ones the NeWS imagedemo program uses (/usr/NeWS/smi) on the personal irises. The problem I am having is interpreting the colormap in the file. My program displays the image and it is recognizable however the colors are definitely incorrect. Right now I am using each byte in the image as an direct offset into each of the red, green, and blue colormaps, and plotting a pixel with those components. I have tried reversing and/or invert- ing the colormaps with out any success. Does anyone know how to correctly interpret the colormaps, or know how the NeWS operator `imagecanvas' interprets the rasterfiles? Any help or pointers would be greatly appreciated. Thanx, Christopher Hull EMBA-CF University of Vermont, Burlington, VT -------------------- hull@uvm-gen.uvm.edu   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03801; 22 Jul 89 16:11 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03700; 22 Jul 89 15:08 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa03692; 22 Jul 89 14:58 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa10398; 22 Jul 89 14:49 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA18169; Sat, 22 Jul 89 11:24:52 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 22 Jul 89 12:46:56 GMT From: Christopher Hull Organization: EMBA Computer Facility, Univ. of Vermont, Burlington. Subject: re: colormaps in .im8 rasterfiles Message-Id: <1237@uvm-gen.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Well it looks like I was looking really hard in the wrong place for my colormap problem. I have found the problem, and it wasn't my interpretation of the colormaps after all. Thanx anyway, Christopher Hull EMBA-CF University of Vermont, Burlington, VT. ---------------- hull@uvm-gen.uvm.edu   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03885; 22 Jul 89 16:57 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03862; 22 Jul 89 16:47 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa03852; 22 Jul 89 16:32 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa11251; 22 Jul 89 16:19 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22503; Sat, 22 Jul 89 13:11:12 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 22 Jul 89 18:48:07 GMT From: "Steve S. Roy" Subject: XUI toolkit on System V Message-Id: <9557@phoenix.Princeton.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Has anyone out there gotten the DEC XUI toolkit to work under System V? Specificly, has anyone gotten it to work on Silicon Graphics 4D's? I have had no difficulty at all getting it to run on Sun 3's, and would really like to get it running on Irises. I was able to get the library to compile without errors by putting -I/usr/include/bsd on the end of the include list and -DUNIX_SYSV in the defines. However, when I link in the test progam xsh it dies with a bus error in XtInitialize. Any ideas? Any help at all would be greatly appreciated. I really don't want to try to debug this on my own. ---------------------------------------------------------------------- Real Name: Steve Roy e-mail: ssr@courant.princeton.edu telephone: (609)452-5384 (office) Address: office: Program of Applied and Computational Mathematics Princeton University Princetion NJ 08544-1000 ----------------------------------------------------------------------   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06666; 23 Jul 89 22:28 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06611; 23 Jul 89 22:07 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa06599; 23 Jul 89 21:57 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa22429; 23 Jul 89 21:38 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA07388; Sun, 23 Jul 89 18:33:08 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 24 Jul 89 01:22:32 GMT From: Robert Lansdale Organization: EECG, University of Toronto Subject: Achieving CBREAK without Curses Message-Id: <1989Jul23.212232.12996@jarvis.csri.toronto.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL While porting my 3d graphics package from a SUN to an IRIS/4D several weeks ago I came across a minor compatibility problem between SUN's BSD Unix and the IRIX System V Unix; namely that the sgtty structure does not have the CBREAK bit. Since this was my first port to SYS V, I was stuck. Eventually I came across the cbreak() function in the curses library, but it seems that I have to open a window (and use the usual window I/O) just so I can call this routine - I don't want to have to use curses just to set the tty to cbreak! My question: is the SYS V 'raw' bit in the sgtty struct functionally similar to putting the tty into cbreak on a BSD system? From experience, 'raw' mode under BSD Unix bypasses all terminal translation routines and in some cases returns unexpected data (ie: on IBM terminals). Are there other ways to achieve cbreak()? ---------------------------------------------------------------------------- CSNET: lansd%eecg.toronto.edu, ARPA: lansd%eecg.toronto.edu@relay.cs.net Electrical Engineering Computer Group, University of Toronto. From postnews Sun Jul 23 21:20:42 1989 Subject: Achieving CBREAK without Curses Newsgroups: comp.sys.sgi Distribution: na While porting my 3d graphics package from a SUN to an IRIS/4D several weeks ago I came across a minor compatibility problem between SUN's BSD Unix and the IRIX System V Unix; namely that the sgtty structure does not have the CBREAK bit. Since this was my first port to SYS V, I was stuck. Eventually I came across the cbreak() function in the curses library, but it seems that I have to open a window (and use the usual window I/O) just so I can call this routine - I don't want to have to use curses just to set the tty to cbreak! My question: is the SYS V 'raw' bit in the sgtty struct functionally similar to putting the tty into cbreak on a BSD system? From experience, 'raw' mode under BSD Unix bypasses all terminal translation routines and in some cases returns unexpected data (ie: on IBM terminals). Are there other ways to achieve cbreak()? ---------------------------------------------------------------------------- CSNET: lansd%eecg.toronto.edu, ARPA: lansd%eecg.toronto.edu@relay.cs.net Electrical Engineering Computer Group, University of Toronto.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12974; 24 Jul 89 11:17 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09914; 24 Jul 89 9:54 EDT Date: Mon, 24 Jul 89 9:44:00 EDT From: Gary S. Moss (VLD/VMB) To: Robert Lansdale cc: info-iris@BRL.MIL Subject: Re: Achieving CBREAK without Curses Message-ID: <8907240944.aa09661@VMB.BRL.MIL> Under System V, you should be using the termio structure rather than sgtty. The way to simulate CBREAK mode would be to turn canonical input processing OFF, and set up the VMIN and VTIME flags to 1 and zero respectively. Below is an excerpt from a library of mine which works on both BSD and SYSV, I have stripped out the BSD stuff for this example, and it is incomplete, but you should get the idea. The library is part of BRL CAD (libtermio), but if you don't have it and want just the library, send me a note, it is only a few pages of sources. -moss #include struct termio tio; /* clrCbreak() -- turn CBREAK mode off */ clrCbreak() { tio.c_lflag |= ICANON; /* Canonical input ON. */ tio.c_cc[VEOF] = 4; /* Defaults! Best we can do.... */ tio.c_cc[VEOL] = 0; (void) ioctl( 0, TCSETA, &tio ); } /* setCbreak() -- turn CBREAK mode on */ setCbreak() { tio.c_lflag &= ~ICANON; /* Canonical input OFF. */ tio.c_cc[VMIN] = 1; tio.c_cc[VTIME] = 0; (void) ioctl( 0, TCSETA, &tio ); }   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa05454; 24 Jul 89 17:25 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab04922; 24 Jul 89 16:53 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab04814; 24 Jul 89 16:37 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa13156; 24 Jul 89 16:24 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA00909; Mon, 24 Jul 89 13:17:37 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 24 Jul 89 19:53:54 GMT From: Tom Russo Organization: Center for Nonlinear Dynamics, University of Texas at Austin Subject: GCC Message-Id: Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Has anybody managed to get GCC ported to the SGI 4d series? I have tried making it for MIPS with the machine descriptors provide ingcc-1.35, but there are a number of things which fail. Has anybodyelse tried this and succeeded? Please oh please, if you have, couldyou send me diffs? (actually, send them to me AND FSF!)--+ |Thomas Russo | russo@chaos.utexas.edu | |Center for Nonlinear Dynamics, University of Texas at Austin | +----------------------------------------------------------------------+   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa07464; 24 Jul 89 22:45 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa07205; 24 Jul 89 21:53 EDT Received: by VMB.BRL.MIL id aa07164; 24 Jul 89 21:35 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa07106; 24 Jul 89 21:30 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa17170; 24 Jul 89 21:24 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA17926; Mon, 24 Jul 89 18:19:30 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 24 Jul 89 16:45:47 GMT From: Scott_Klosterman Organization: Structural Dynamics Research Corp., Cincinnati Subject: Is there an SGI Users Conference?????? Message-Id: <765@sdrc.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I think the title bar explains it all!!! uunet!sdrc!crscott Scott Klosterman S.D.R.C 2000 Eastman Dr. Cincinnati, Ohio 45150   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa08857; 25 Jul 89 2:27 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id aa08019; 25 Jul 89 0:43 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa07977; 25 Jul 89 0:21 EDT Received: from gatech.edu by SMOKE.BRL.MIL id aa18609; 24 Jul 89 23:51 EDT Received: from hydra.gatech.edu by gatech.edu (5.58/GATECH-8.6) id AA24938 for ; Mon, 24 Jul 89 23:31:38 EDT Received: by hydra.gatech.edu (4.12/2.5) id AA20644; Mon, 24 Jul 89 23:31:01 edt Date: Mon, 24 Jul 89 23:31:01 edt From: "SCHREIBER, O. A." Message-Id: <8907250331.AA20644@prism.gatech.edu> To: info-iris@BRL.MIL, sgi!tarolli%dragon.wpd.sgi.com@ucbvax.berkeley.edu Subject: Re: subroutines perpec and lookat Cc: ccsupos@prism.gatech.edu I cannot guess why your program does not work, I can only help clarify what perspective and lookat do. Perspective loads a matrix onto the matrix stack, destroying what was previously on top of the stack. Lookat multiplies a "lookat" matrix by the top of the stack and replaces the top of the stack with the result. Check the GL User's Guide to see the exact matrices that perspective and lookat generate. In general, you probably want to use perspective and lookat together, doing a perspective without a lookat or a lookat without a perspective is probably a bug. However, it is quite normal to load a perspective matrix, push it, and then apply a lookat. To apply a new lookat, do a popmatrix (gets back to the perspetive) do a pushmatrix (copies it on the stack) and then do another lookat. Hope this clears things up. To aid in debugging, write a routine to print a matrix out to the terminal, then call getmatrix and print the matrix out when things go awry. In reference to the above help message, I have straightened out my handling of the transformation matrices. However, the twist given to the projection does not always correspond to the one that is input. Has anyone ever had this problem? Thanks in advance. Olivier Schreiber   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ac27025; 25 Jul 89 16:10 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa26587; 25 Jul 89 15:51 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa26150; 25 Jul 89 15:29 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa07336; 25 Jul 89 15:11 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA11333; Tue, 25 Jul 89 11:58:14 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 24 Jul 89 17:45:25 GMT From: Ruth Milner Organization: University of Toronto Physics/Astronomy/CITA Computing Consortium Subject: CDC Sabres on Iris systems (long) Message-Id: <853@helios.toronto.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I am interested in hearing from those of you who have installed a combination of Xylogics 754 SMD controller/CDC Sabre 9720-1230 (1.23GB) disk(s) on your Iris systems, particularly the 4D/240 or 120. We have encountered numerous odd problems with ours, some of which have been solved. Some missing functionality for SMD drives was provided by upgrading to 3.1D. We also know that to eliminate intermittent hanging under heavy disk-loading conditions, we must reformat with a new 754, rev. 2.4 or higher (which we have installed, although we can't reformat until our Exabyte is working); Xylogics has modified the sector header layout in a way which cures this bug. My query concerns problems with flagging bad blocks on the drive using fx. Currently on each drive we have a bad block (actually a bad track, since fx maps out whole tracks at a time) which cannot be marked as bad. Neither one is among the special few which by definition cannot be mapped (see the 4D System Administrator's Guide, p. 4-10). From the hotline I gather that it is most likely due to the location of the defect coinciding with the bit in the sector header which is set to show that the block is mapped (I will restrain myself from commenting :-) on the wisdom of relying on a bit in a bad block to mark the block as bad, since there may be no other simple way to do it under the IRIX filesystem layout). What we saw during the initial fx run was the track mapped out as part of the manufacturer's defect list, and then mapped again during the badblock testing run which followed. As a result there are two entries for each of these tracks in the badblock list, both pointing to the same map track. However the system still doesn't recognize them as bad, and using fx online I can only remove one of the entries from the table. One of these tracks was in a second swap area, which we could remove from active use, but the other is in the middle of the partition used for everyone's home directories. Occasionally someone runs into it, and this has sometimes caused system crashes. There is some chance that the reformat will shift things around in the sector header enough that the "bad" bit will be readable. However I'm not counting on it. What I would like to know is whether other people have seen this on their CDC drives. If we replace these two drives, are we likely (statistically speaking) to see the same problem recur on the new ones? Did you buy your controller and/or disk(s) from SGI or from a third party? What did you have to do in order to fix it? Does anybody from SGI who knows a lot about SMD drives know any more about this problem? BTW, can I readin the badblock list before beginning the reformat (which keeps the sector header the same length), do the format, and write the list back out afterwards? I will be keeping the same partition table, so the mapping area will be in the same place. I strongly suspect that a simple format will lose the existing information, and I do not trust the testing program to do a *really* thorough job of finding bad spots. Nor do I particularly wish to type in the MDL by hand :-). Please reply directly to me, and I will summarize to the net if there is new information. (I'm also interested in finding out just how many people out there are using Sabres on their Irises; I know of only one other site in Canada). Thanks in advance. -- Ruth Milner UUCP - {uunet,pyramid}!utai!helios.physics!sysruth Systems Manager BITNET - sysruth@utorphys U. of Toronto INTERNET - sysruth@helios.physics.toronto.edu Physics/Astronomy/CITA Computing Consortium   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12571; 25 Jul 89 8:16 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12082; 25 Jul 89 8:05 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa11858; 25 Jul 89 7:59 EDT Received: from NSFNET-RELAY.AC.UK by SMOKE.BRL.MIL id aa22527; 25 Jul 89 7:42 EDT Received: from ean-relay.ac.uk by NSFnet-Relay.AC.UK via Janet with NIFTP id aa04144; 25 Jul 89 12:20 BST Received: from vax.oxford.ac.uk by Ean-Relay.AC.UK via Janet with NIFTP id aa04657; 25 Jul 89 13:14 BST Date: Tue, 25 JUL 89 12:20:51 BST From: HCART%vax.oxford.ac.uk@nsfnet-relay.ac.uk To: INFO-IRIS <@nsfnet-relay.ac.uk,@ean-relay.ac.uk:INFO-IRIS@BRL.MIL> Subject: HELP - things are going badly wrong! Message-ID: <8907250742.aa22527@SMOKE.BRL.MIL> Can anyone give advice about a couple of (indirectly) related problems? 1. The printer status file /usr/spool/lp/pstatus has accidentally been removed. What utility creates this? Now the system reports that my printer has 'disappeared' Creating an empty file with the appropriate name does not help. What should I do? 2. Don't say 'get the old pstatus off tape', because when I tried to do that, I got the message /dev/rmt2 no such device. I don't seem to be able to access the tape drive. (aaah!) I ran MAKEDEV and checked that the files /dev/rmt1-4 are present and readable, but I still can't read the tape. I am sure I am doing something stupid, but when you are a programmer, not a UNIX man that happens sometimes... I am running an Iris 3130. All information gratefully received. Hugh Cartwright.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa13066; 25 Jul 89 8:41 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12807; 25 Jul 89 8:31 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa12608; 25 Jul 89 8:17 EDT Received: from [192.12.31.1] by SMOKE.BRL.MIL id aa23199; 25 Jul 89 8:08 EDT Date: Tue, 25 Jul 89 7:52:29 EDT From: "David F. Rogers" To: info-iris@BRL.MIL, TeXhax-request@cs.washington.edu cc: dfr@cad.usna.mil Subject: TeX distribution for the SGI Message-ID: <8907250752.aa26672@CAD.USNA.MIL> G'day, The first release of TeX for the SGI Iris 4D series is ready for distribution. This has been used at RMIT (Royal Melbourne Institute of Technology) for some months and has worked reasonably well. There should be another release later this year with an improved previewer and any improvements/fixes that we make in reponse to comments of other TeX users on the 4D series. There are a number of improvements in the pipeline, including better support for pictures in a postscript output file, HP laserjet (and plus) output as well as a much better previewer. There isn't a good local guide as there should be. This will be fixed in the next release. --- Here is a brief description of the programs useful to most TeX users: In /usr/local/bin: tex - Native TeX v2.93 latex - LaTeX v2.09 bigtex - Increased size complex documents/macros -- Common TeX v2.9 biglatex - Increased size complex documents/macros -- Common TeX v2.9 tgrind - convert a source file into TeX and optionally (pretty) print it In /usr/local/tex/bin: initex - normal initex -- As described in the TeXbook virtex - normal virtex) -- As described in the TeXbook biginitex - initex enlarged for those extra big jobs (say picTeX) bigvirtex - initex enlarged for those extra big jobs (say picTeX) bibtex - BibTeX as documented in the LaTeX book. texsgi - version 0.5 of the Iris previewer dvi2ps - a dvi -> postscript converter (port of tex82/TeXdevices/mitdrivers/dvi2ps) dvi2tty - a (very) poor man's previewer dvitype - information about a dvi file tr2tex - convert a troff document to LaTeX --- You can send comments etc to Mike Gigante Applied Computer Graphics Lab Royal Melbourne Institute of Technology 124 Latrobe Street, Melbourne, Australia 3001 +61 3 660 2935 Email: mg@cidam.oz.au or to Prof. David F. Rogers Aerospace Engineering Dept. U.S. Naval Academy Annapolis, MD 21402, USA (301) 267 3283/4/5 Email: dfr@usna.navy.mil who has offered to act as the US distribution point. email comments should be sent to both Mike Gigante and Dave Rogers. Distribution: Binaries are located on vgr.brl.mil (192.5.23.6) at BRL in directory /usr/spool/ftp/info-iris in file texbin.tar.Z and may be obtained by anonymous ftp. The compressed tar file is approximately 5.8 megabytes! Dave Rogers will provide a distribution (US & Canada only) on SGI hi-density cartridge tapes if you ABSOLUTELY cannot ftp them. To get these tapes send three (3) 3M DC600A 600 ft, 12,500 ftpi hi-density cartridge tapes to him at the above address. Mike Gigante will provide a similar service for the rest of the world. To install the distribution ftp file: zcat texbin.tar.Z | tar xvf - cartridge tape: tar xv Place the following in your path: /usr/local/bin and /usr/local/tex/bin and you are ready to go. A README file is in /usr/local/tex/README. !!!!!!!!!!!!! NOTE !!!!!!!!!!!!! Absolute path names were used to simplify our distribution task. The compressed tar file will expand into an estimated 15-18 megabytes in /usr. MAKE SURE YOU HAVE ENOUGH DISC SPACE. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! You will need to set the following environment variables to use dvi2tty, it is suggested that you put this in /etc/cshrc (/etc/profile) so that everyone gets it by default.. setenv DVI2TTY "" (or for Bourne shell users DVI2TTY=""; export DVI2TTY) It is recommended that you use the -q option for the present implementation of the texsgi previewer. Dave Rogers Mike Gigante 7/24/89   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22859; 25 Jul 89 13:30 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22113; 25 Jul 89 13:00 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa21870; 25 Jul 89 12:44 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa01751; 25 Jul 89 12:23 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA01995; Tue, 25 Jul 89 09:07:54 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 25 Jul 89 15:21:36 GMT From: Thant Tessman Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: subroutines perpec and lookat Message-Id: <38766@sgi.SGI.COM> References: <8907250331.AA20644@prism.gatech.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907250331.AA20644@prism.gatech.edu>, ccsupos%prism@GATECH.EDU ("SCHREIBER, O. A.") writes: > > > In reference to the above help message, I have straightened out > my handling of the transformation matrices. However, the twist > given to the projection does not always correspond to the one that > is input. Has anyone ever had this problem? > Thanks in advance. > Olivier Schreiber This is probably due you assuming that z is up (a perfectly reasonable assumption, one would think) but that the 'lookat' for historical reasons thinks that y is up, not z. To use lookat with geometry where z is up, you can follow lookat with rotate(-900, 'x'); and pretend that z is y and y is -z. Or you can look how the lookat matrix is built (Appendix C of the Graphics Library User's Guide, Volume II) and build your own. Hope this helps. thant@sgi.com   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa23291; 25 Jul 89 13:41 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22399; 25 Jul 89 13:19 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa22227; 25 Jul 89 13:00 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa01741; 25 Jul 89 12:23 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA02473; Tue, 25 Jul 89 09:16:22 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 25 Jul 89 15:51:17 GMT From: Pablo Fernicola Organization: Machine Intelligence Laboratory Subject: Menubar/Pull down menus Message-Id: <20632@bikini.cis.ufl.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL We are using a Personal Iris and would like to have a permanent, fixed, menu bar in one of our applications. If anybody has examples of how this can be done, could you please mail them to me. Thanks!! -- pff@beach.cis.ufl.edu Pablo Fernicola - Machine Intelligence Laboratory - UF "That has nothing to do with computers; it is software."   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa24708; 25 Jul 89 14:43 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab22113; 25 Jul 89 13:00 EDT Received: from jarvis.csri.toronto.edu by VMB.BRL.MIL id aa21900; 25 Jul 89 12:46 EDT Received: by jarvis.csri.toronto.edu id 13185; Tue, 25 Jul 89 12:41:07 EDT Subject: Re: TeX distribution for the SGI Distribution: list References: <8907250752.aa26672@CAD.USNA.MIL> Date: Tue, 25 Jul 89 12:38:31 EDT From: lamy@ai.utoronto.ca (Jean-Francois Lamy) Message-Id: <89Jul25.123843edt.10419@neat.cs.toronto.edu> To: info-iris@vmb.brl.mil The normal Unix TeX from University of Washington compiles quite easily, for those who prefer going that route (as do all the normal TeX and Metafont tools included there). Jean-Francois Lamy lamy@ai.utoronto.ca, uunet!ai.utoronto.ca!lamy AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa27025; 25 Jul 89 16:02 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab26073; 25 Jul 89 15:34 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa25966; 25 Jul 89 15:22 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa06973; 25 Jul 89 15:01 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA09701; Tue, 25 Jul 89 11:32:13 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 25 Jul 89 17:45:54 GMT From: john howell Organization: Deere & Co. Technical Center, Moline,IL Subject: image dump of NeWS window Message-Id: <106@suntc.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Does anyone know how to save the entire contents of a SGI NeWS window as a imagefile? I have used icut, but it is difficult to position the cut window in exactly the right place. Essentially what I would like to do is point at a window and save "save this". Is this possible? ======================================================================== John Howell uucp: uunet!suntc!jrh Deere & Company MCImail: John R. Howell, 360-4047 Technical Center CompuServe: john howell [76666,2505] 3300 River Drive FAX: (309)765-3807 Moline, IL 61265 Voice: (309)765-3784 ========================================================================   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa27487; 25 Jul 89 16:21 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa26073; 25 Jul 89 15:34 EDT Received: from adm.brl.mil by VMB.BRL.MIL id aa25881; 25 Jul 89 15:20 EDT Received: from ucbvax.Berkeley.EDU by ADM.BRL.MIL id aa12615; 25 Jul 89 14:16 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA06560; Tue, 25 Jul 89 10:29:26 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 25 Jul 89 17:29:15 GMT From: Mike Gigante Organization: Royal Melbourne Institute of Technology, Melbourne Australia Subject: Re: TeX distribution for the SGI Message-Id: <30199@ucbvax.BERKELEY.EDU> References: <8907250752.aa26672@CAD.USNA.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Of course, you can always make a symbolic link to some otherplace e.g. (as root) # mkdir /d/tex (assuming /usr/local exists and /usr/local/tex doesn't) # ln -s /d/tex /usr/local/tex # zcat texbin.tar.Z | tar xvf - If you don't want to extract to the absolute pathnames, you can always do # zcat texbin.tar.Z | tar xvRf - One final thing is that I built TeX and friends assuming the absolute pathnames as distributed in texbin.tar.Z, if you want to move it elsewhere you can do so but will need to set a number of environment variables TEXINPUTS [/usr/local/tex/inputs] TEXFORMATS [/usr/local/tex/formats] & [/usr/local/tex/bigformats] TEXFONTS [/usr/local/tex/fonts/tfm] (for TeX) (it is different for TeXsgi) There may be more that I have forgotten... Anyhow,good luck! Mike Gigante   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab27487; 25 Jul 89 16:21 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab27025; 25 Jul 89 16:10 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa26655; 25 Jul 89 15:48 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa07083; 25 Jul 89 15:04 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA09680; Tue, 25 Jul 89 11:31:56 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 25 Jul 89 17:42:04 GMT From: john howell Organization: Deere & Co. Technical Center, Moline,IL Subject: imagefile rotate? Message-Id: <105@suntc.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Does anyone have a program/filter that will take as input a 'standard' sgi imagefile and output it as a 'standard' image file except rotated 90 degrees? This would be easy enough to write if only there were getcol and putcol (columns) routines in the imagelib in addition to getrow and putrow. I would like to dump full screen imagefiles to a color printer, but alas it prints in portrait instead of landscape mode. It would be extremely handy if such a tool used standard input and output so it could be used as a filter instead of creating files like all the other image tools do. Thanks. o __ / o / ( o / -' ======================================================================== John Howell uucp: uunet!suntc!jrh Deere & Company MCImail: John R. Howell, 360-4047 Technical Center CompuServe: john howell [76666,2505] 3300 River Drive FAX: (309)765-3807 Moline, IL 61265 Voice: (309)765-3784 ========================================================================   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa28110; 25 Jul 89 16:56 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ac27487; 25 Jul 89 16:29 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa27468; 25 Jul 89 16:19 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa08354; 25 Jul 89 15:53 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA13898; Tue, 25 Jul 89 12:41:43 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 25 Jul 89 18:44:52 GMT From: George Elkins Organization: Rutgers Univ., New Brunswick, N.J. Subject: Connecting a LaserWriter to a /dev/ttyf* serial port Message-Id: Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Does anyone know the exact Iris 9-pin to LaserWriter 25-pin connections for a ttyf[5,6,7,8,9,10] port? (I am using the 6-port RS-232 option on an Iris 4D 120.) It seems easy to get a LaserWriter working on a ttyd type of serial port (since only three pins matter), but I would like to take advantage of the flow control offered by those extra unused pins. Is it currently possible at all to use more than the "Transmit Data", "Recieve Data", and "Signal Ground" pins in these serial ports? thanks, George Elkins   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00087; 26 Jul 89 8:47 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01632; 26 Jul 89 7:49 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa01569; 26 Jul 89 7:32 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa02462; 26 Jul 89 7:20 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA02390; Wed, 26 Jul 89 04:08:49 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 25 Jul 89 23:13:36 GMT From: "Thomas P. Mitchell" Organization: Silicon Graphics Computer Systems, Mountain View CA. Subject: Re: (none) Message-Id: <248@odin.SGI.COM> References: <8907192216.AA04848@castor.wustl.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907192216.AA04848@castor.wustl.edu> yuson@CASTOR.WUSTL.EDU (John Yuson) writes: > > How does one obtain "Larry Wall's" patcher for diff files? > The best place is lwall's machine: jpl-devvax.jpl.nasa.gov (128.149.8.43) OR the archives on 'uunet'. The version I have is Version 2.0 at Patchlevel 12. $Header: patch.c,v 2.0.1.6 88/06/22 20:46:39 lwall Locked $ Patch level: 12 So as a last resort ask me. Thomas P. Mitchell (ARPA:mitch@csd.sgi.com, UUCP: {decwrl,ucbvax}!sgi!mitch ) Rainbows -- The best (well second best) reason for windows.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00083; 26 Jul 89 18:42 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa13339; 26 Jul 89 18:36 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa13325; 26 Jul 89 18:22 EDT Received: from SGI.COM by SMOKE.BRL.MIL id aa16688; 26 Jul 89 18:01 EDT Received: from sgidallas.dallas.sgi.com by sgi.sgi.com via UUCP (5.52/890711.SGI) (for ) id AA21870; Wed, 26 Jul 89 14:45:51 PDT Received: by sgidallas.dallas.sgi.com (5.52/890619.SGI) (for sgi!BRL.MIL!info-iris) id AA03906; Wed, 26 Jul 89 09:34:00 CDT Date: Wed, 26 Jul 89 09:34:00 CDT From: Thomas E Reed Message-Id: <8907261434.AA03906@sgidallas.dallas.sgi.com> To: info-iris@BRL.MIL Subject: looking for ICON editor Hi All; I'm looking for anything that resembles an ICON editor for IRIS 4D systems.. Any kind for editor..... Any kind of ICON........ Thanks in advance.. -- Tom Reed SGI - Dallas email: treed@sgi.com vmail: 8705 phone: 214-788-4122   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00277; 26 Jul 89 19:12 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00235; 26 Jul 89 19:02 EDT Received: from adm.brl.mil by VMB.BRL.MIL id aa00213; 26 Jul 89 18:46 EDT Received: from [128.32.133.1] by ADM.BRL.MIL id aa00319; 26 Jul 89 19:13 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA09211; Wed, 26 Jul 89 15:54:14 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 26 Jul 89 22:54:08 GMT From: Mike Gigante Organization: School of Education, UC-Berkeley Subject: Re: TeX distribution for the SGI Message-Id: <30232@ucbvax.BERKELEY.EDU> References: <8907250752.aa26672@CAD.USNA.MIL>, <89Jul25.123843edt.10419@neat.cs.toronto.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL From ucbvax!ai.utoronto.ca!lamy Wed Jul 26 15:49:08 PDT 1989 > >The normal Unix TeX from University of Washington compiles quite easily, for >those who prefer going that route (as do all the normal TeX and Metafont tools >included there). > >Jean-Francois Lamy lamy@ai.utoronto.ca, uunet!ai.utoronto.ca!lamy >AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4 > > Except that you won't get the previewer that way.... Mike   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00878; 26 Jul 89 22:33 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa00542; 26 Jul 89 20:43 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa00486; 26 Jul 89 20:27 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa00679; 26 Jul 89 20:06 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA16119; Wed, 26 Jul 89 17:56:35 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 27 Jul 89 00:14:26 GMT From: Tom Stockfisch Organization: Chemistry Dept, UC San Diego Subject: nice(1) not very nice Message-Id: <510@chem.ucsd.EDU> References: <8907161727.AA17013@anaconda.Stanford.EDU>, <215@odin.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL The nice command of csh (on the 4D series machines, at least) does not nice things very far. nice +19 is supposed to be the maximum niceness, but the split in cpu time between a job so nice'ed and a job with not niced is only 20/80. That is if you have one nice +19 job and one not-nice'ed job, 20% of the cpu time still goes to the nice'ed job. I would much prefer that the split be more like 2/98. Does anyone know if there is a way to reconfigure things so that this is possible? -- || Tom Stockfisch, UCSD Chemistry tps@chem.ucsd.edu   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01250; 27 Jul 89 0:36 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01049; 26 Jul 89 23:34 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab01032; 26 Jul 89 23:15 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa01703; 26 Jul 89 22:48 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA21249; Wed, 26 Jul 89 19:36:23 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 26 Jul 89 21:44:02 GMT From: Mark Bradley Organization: Silicon Graphics, Inc., Mountain View, CA Subject: fx defect handling Message-Id: <38882@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL The forwarding of bad tracks was incorrect, albeit to the spec provided for the SMD controller. This has been made correct in the upcoming 3.2 release and will increase yields of this drive on SGI systems (for those of you doing your own integration :{) ). Side note is that the software support for the Exabyte tape drive is in 3.1G and in 3.2. The drive will not work terribly well prior to that unless it is purchased from SGI. SGI provides an option tape (for those wanting to run this device but not in a position to upgrade their software revision) as part of the shipment from us. Back to SMD; if you received SMD disk drives from SGI, they should not exhibit such a problem. It was recently found, however, that some "quest- ionable" units may have made it to customers due to some process problems. If you are the recipient of such a unit, please call the SGI hotline to arrange a patch tape. markb -- Mark Bradley "Faster, faster, until the thrill of IO Subsystems speed overcomes the fear of death." Silicon Graphics Computer Systems Mountain View, CA ---Hunter S. Thompson   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02645; 27 Jul 89 7:08 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02413; 27 Jul 89 6:47 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa02382; 27 Jul 89 6:32 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa04150; 27 Jul 89 6:05 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA12366; Thu, 27 Jul 89 02:52:36 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 27 Jul 89 07:40:35 GMT From: Dana Roode Organization: University of California, Irvine Subject: enp0: packet too small: length = 0 errors Message-Id: <2373@orion.cf.uci.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL An associate of mine has an IRIS 4D60GT connected to our network that complains to its console "enp0: packet too small: length = 0" (or something quite close to this). The errors come in groups of many - users of the system can no longer use their console windows. It would seem that someone on the network is putting out bad packets, except that none of the other systems on the network (Suns, IRIS, Apollo) ever complain. Does anyone have insight they'd care to share with me on this problem? Please contact me at "roode@orion.cf.uci.edu" if so. Dana Roode UC Irvine Office of Academic Computing   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa08514; 27 Jul 89 10:45 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab07250; 27 Jul 89 10:03 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa07236; 27 Jul 89 9:55 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa01367; 27 Jul 89 9:35 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22531; Thu, 27 Jul 89 06:36:16 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 27 Jul 89 13:24:37 GMT From: Jean-Francois Lamy Subject: Re: TeX distribution for the SGI Message-Id: <89Jul27.092332edt.10420@neat.cs.toronto.edu> References: <8907250752.aa26672@CAD.USNA.MIL>, <89Jul25.123843edt.10419@neat.cs.toronto.edu>, <30232@ucbvax.BERKELEY.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL mg@dewey.soe.berkeley.edu (Mike Gigante) writes: >Except that you won't get the previewer that way.... I count at least 4 Irises around here with plain terminals as their consoles. A 4d/240 makes a nice compute server, y'know. And it does run X client applications just fine so far... Jean-Francois Lamy lamy@ai.utoronto.ca, uunet!ai.utoronto.ca!lamy AI Group, Department of Computer Science, University of Toronto, Canada M5S 1A4   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09472; 27 Jul 89 11:17 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa08032; 27 Jul 89 10:35 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa07974; 27 Jul 89 10:21 EDT Received: from NSFNET-RELAY.AC.UK by SMOKE.BRL.MIL id aa01931; 27 Jul 89 9:48 EDT Received: from ean-relay.ac.uk by NSFnet-Relay.AC.UK via Janet with NIFTP id aa05906; 27 Jul 89 14:21 BST Received: from vax.oxford.ac.uk by Ean-Relay.AC.UK via Janet with NIFTP id aa05587; 27 Jul 89 15:15 BST Date: Thu, 27 JUL 89 14:22:15 BST From: HCART%vax.oxford.ac.uk@nsfnet-relay.ac.uk To: INFO-IRIS <@nsfnet-relay.ac.uk,@ean-relay.ac.uk:INFO-IRIS@BRL.MIL> Subject: How can I see control characters? Message-ID: <8907270948.aa01931@SMOKE.BRL.MIL> Is there any way that, under vi, one can make visible on the screen any embedded control characters in a piece of text? I have a moderately-long piece of Fortran which drives the printer wild when I try to print it out. It seems to me as though there may be some hidden character which I may have entered into the document by mistake which the printer takes as some (unwanted) instruction, but I can't see it to delete it. Other documents print OK. Any ideas? Thanks, Hugh Cartwright (HCART@VAX.OXFORD.AC.UK)   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa16201; 27 Jul 89 13:50 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa13518; 27 Jul 89 12:27 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa13449; 27 Jul 89 12:15 EDT Received: from [192.12.31.1] by SMOKE.BRL.MIL id aa05249; 27 Jul 89 11:14 EDT Date: Thu, 27 Jul 89 10:55:42 EDT From: "David F. Rogers" To: ai.utoronto.ca!lamy@uunet.uu.net, info-iris@BRL.MIL Subject: TeX on the SGI Message-ID: <8907271055.aa08667@CAD.USNA.MIL> G'day, Re Jean-Francois Lamy's comments w.r.t the recent TeX-SGI distribution. I tried the std U of W distribution and it did not compile. Hummm .... If you are a novice, then wandering around the U of W distribution is not fun. The distribution is designed for those who want to use TeX and don't really want to be bothered with all the set up. Some people do not have X-client machines. If you don't like what we have done then fine -- but either shut-up about it or do one better. If you do one better then send it to me and I'll use it. Professor David F. Rogers Aerospace Engineering Department U.S. Naval Academy Annapolis, MD 21402 USA Tel: 301-267-3283/4/5 ARPANET: dfr@usna.navy.mil UUCP: ~uunet!usna!dfr   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa20157; 27 Jul 89 18:56 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab19953; 27 Jul 89 18:45 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab19916; 27 Jul 89 18:32 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa19119; 27 Jul 89 18:20 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22585; Thu, 27 Jul 89 15:18:52 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 27 Jul 89 22:04:57 GMT From: prism!capone.gatech.edu!scott@gatech.edu Organization: Georgia Institute of Technology Subject: MIPS Fortran I/O problem Message-Id: <1248@hydra.gatech.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I am attempting to port install Precsion Visual's TEXTPRO fonts on a sgi 4D. Part of the installation involves converting font files from ascii text format to binary. The binary file is opened as a direct access, unformatted with a record length of 480. Each record is basicly 120 integers. The last record in the file is not full...there are only about 51 integers in it. On most other systems, the last record gets padded with zeros...however, on the SGI it gets truncated. I even tried adding RECORDTYPE='fixed', which according to the manual should force padding of incomplete records, with no luck. In this situation, the code is fairly readable and I can force it to pad by filling the arrays it writes with zeros. However, I may not be so lucky in other parts of the code I am trying to port. I am niether a FORTRAN jock or very familiar with SGI...thus I am not sure if the problem is the result of poor code or a bug in the MIPS compiler. Any and all clues appreciated... - Scott ----- This is my signature. There are many like it, but this one is mine. Scott Holt, Systems Analyst Internet: scott@prism.gatech.edu Georgia Tech BITNET: CCUSESH@GITNVE2 Office of Computing Services 404-894-6168   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa20228; 27 Jul 89 19:11 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa19953; 27 Jul 89 18:45 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa19916; 27 Jul 89 18:32 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa19115; 27 Jul 89 18:19 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22084; Thu, 27 Jul 89 15:11:28 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 27 Jul 89 21:57:38 GMT From: Eric Pearce Organization: BD&HR (Beer Drinkers & Hell Raisers) Subject: Re: gdb on 4D's Message-Id: <35406@bu-cs.BU.EDU> References: <8907181427.aa18389@SMOKE.BRL.MIL>, <8907182032.AA28300@ew09.nas.nasa.gov>, Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article elkins@topaz.rutgers.edu (George Elkins) says: > >Has anyone gotten gcc working on the 4D's? I obtained the latest pre-release of gcc ( version 1.35.95 ) and it builds and runs fine so far. The FSF has indicated they don't want a pre-release distributed, but the release of 1.36 is supposedly very soon. -e -- ------------------------------------------------------------------------------- Eric Pearce eap@bu-it.bu.edu Boston University Information Technology 111 Cummington Street Boston MA 02215 617-353-2780 voice 617-353-6260 fax   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab20228; 27 Jul 89 19:11 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab20157; 27 Jul 89 19:00 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa19995; 27 Jul 89 18:47 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa19169; 27 Jul 89 18:34 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22916; Thu, 27 Jul 89 15:24:18 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 27 Jul 89 22:08:26 GMT From: prism!capone.gatech.edu!scott@gatech.edu Organization: Georgia Institute of Technology Subject: MIPS Fortran I/O Problem? Message-Id: <1250@hydra.gatech.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I am attempting to install Precsion Visual's TEXTPRO fonts on an SGI Iris 4D. Part of the installation involves converting font files from ascii text format to a binary format. The binary file is opened as a direct access, unformatted with a record length of 480. Each record is basicly 120 integers. The last record in the file is not full...there are only about 51 integers in it. On most other systems, the last record gets padded with zeros...however, on the SGI it gets truncated. I even tried adding RECORDTYPE='fixed', which according to the manual should force padding of incomplete records, with no luck. In this situation, the code is fairly readable and I can force it to pad by filling the arrays it writes with zeros. However, I may not be so lucky in other parts of the code I am trying to port. I am niether a FORTRAN jock or very familiar with SGI...thus I am not sure if the problem is the result of poor code or a bug in the MIPS compiler. Any and all clues appreciated... - Scott ----- This is my signature. There are many like it, but this one is mine. Scott Holt, Systems Analyst Internet: scott@prism.gatech.edu Georgia Tech BITNET: CCUSESH@GITNVE2 Office of Computing Services 404-894-6168   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab20351; 27 Jul 89 19:32 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab19857; 27 Jul 89 18:29 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab19831; 27 Jul 89 18:18 EDT Received: from uxc.cso.uiuc.edu by SMOKE.BRL.MIL id aa18228; 27 Jul 89 17:54 EDT Received: from kailand.UUCP by uxc.cso.uiuc.edu with UUCP (5.61+/IDA-1.2.8) id AA03323; Thu, 27 Jul 89 16:24:29 -0500 Received: by kailand.kai.com (4.12/kai2.5c/09-20-88) id AA10622; Thu, 27 Jul 89 14:58:57 cdt Date: Thu, 27 Jul 89 14:58:57 cdt From: Mike Heins Message-Id: <8907271958.AA10622@kailand.kai.com> To: info-iris@BRL.MIL Subject: How you can see control characters Just use the command "set list" at the colon prompt. This will also work in your .exrc file. The control characters will be displayed, with newlines appearing as $. Mike Heins mheins@kai.COM Kuck and Associates, Inc. 1906 Fox Drive (217) 356-2288 uunet!kailand!mheins Champaign, IL 61820   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22711; 28 Jul 89 1:25 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22661; 28 Jul 89 1:15 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa22589; 28 Jul 89 0:59 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa22367; 28 Jul 89 0:34 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA12481; Thu, 27 Jul 89 21:24:22 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 27 Jul 89 20:50:20 GMT From: "Louis M. McDonald" Organization: The Aerospace Corporation, El Segundo, CA Subject: Re: TeX distribution for the SGI Message-Id: <55010@aerospace.AERO.ORG> References: <8907250752.aa26672@CAD.USNA.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Can a copy of the just the IRIS previewer from the TeX distribution be put on vgr.brl.mil? I already have UNIX TeX installed, so all I really want is the previewer. It would be a shame to pull over everything, unpack it, and only use a small portion of it (not to mention the amount of time and disk space required). Louis McDonald   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab22711; 28 Jul 89 1:25 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab22661; 28 Jul 89 1:15 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab22589; 28 Jul 89 0:59 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa22372; 28 Jul 89 0:34 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA12643; Thu, 27 Jul 89 21:27:22 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 04:14:02 GMT From: Rayan Zachariassen Subject: digging out stuff from process address space Message-Id: <89Jul28.001337edt.10423@neat.cs.toronto.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL q1: (curiosity) How can I reliably determine the end of the envp strings in the process address space? I.e. what is between the last environment string value and stackbas(0) (from core.h) ? q2: (problem) What magic do I need to read the top of user stack through /debug/? I tried the following sequence: fd = open("/debug/", 0); fcntl(fd, DFCSTOP, 0); nfd = fcntl(fd, DFCOPENT, x); lseek(nfd, stackbas(some low number), 0) read(nfd, buf, sizeof buf) fcntl(fd, DFCRUN, &(something which is CLEARNOSIG)) with x being variously 0, i, and &i, where i=0 or i=stackbas(some low number) without luck. I also tried seeking and reading from fd, but got something that looks like initialized data and/or symbol table. stackbas(some low number) ~= 0x7fffc700 q3: (curiosity) What is the reason to require the process to be stopped before doing DFCOPENT or read() from it? This limits the usefulness of the operations provided. My purpose is to rummage through the inherited environment of an arbitrary, running, possibly critical, process (like login shells...). Thanks for any info rayan   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa25874; 28 Jul 89 8:18 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab25364; 28 Jul 89 8:07 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa25312; 28 Jul 89 7:58 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa25863; 28 Jul 89 7:49 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA03169; Fri, 28 Jul 89 04:42:58 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 11:24:21 GMT From: Unix Engihacker Organization: Cornell Theory Center, Cornell University, Ithaca NY Subject: Emacs 18.54 on SGI Iris 3xxx ?? Message-Id: <8508@batcomputer.tn.cornell.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I'm having some difficulty putting up 18.54 on our SGI 3xxx series machines. I've defined 'm-sgi3000.h' and 's-iris3-6.h' in my configuration file, and it compiled fine, but when I try to run it, it bombs (I think with Fatal Error 11).... Anybody got any ideas ?? Do I need to increase the amount of swap space (I'm pretty sure its at the default value for the 3xxx series machines) If you've gotten emacs up successfully on your SGI Iris 3030 (or 3130), I'd sure appreciate hearinf how you did it. AWF -- Internet: feigin@tcgould.tn.cornell.edu Adam Feigin Bitnet: feigin@crnlthry Workstation Consultant {backbonz}!cornell!batcomputer!feigin Cornell National Supercomputer Facility Workstation Technologies Group   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02112; 28 Jul 89 10:27 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01546; 28 Jul 89 10:16 EDT Date: Fri, 28 Jul 89 10:05:04 EDT From: Gary S. Moss (VLD/VMB) To: Misha Pavel cc: info-iris@BRL Subject: Re: HELP: Low level terminal I/O Message-ID: <8907281005.aa01485@VMB.BRL.MIL> [Misha Pavel writes] < Is there any way to look at the system buffer and or return < from read() when no input was generated? Probably the better way to go, rather than mucking around with the terminal settings, is to use fcntl() as follows: Where fd is a file descriptor returned from creat(), open(), dup(), fcntl(), or pipe(). #include (void) fcntl( fd, F_SETFL, O_NDELAY ); /* to check the buffer... */ if( read( fd, bufptr, bytes ) == 0 ) ; /* nothing to read */ To be portable to BSD systems, the following is more correct: got = read( fd, bufptr, bytes); #ifdef BSD if( got == -1 && errno == EWOULDBLOCK ) got = 0; /* act like System V */ #endif if( got == 0 ) ; /* nothing to read */ Do a 'man fcntl' for more info. -moss   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06500; 28 Jul 89 14:08 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06051; 28 Jul 89 13:40 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa06034; 28 Jul 89 13:34 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa05864; 28 Jul 89 13:20 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA19338; Fri, 28 Jul 89 10:16:59 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 16:58:10 GMT From: Pablo Fernicola Organization: UF CIS Department Subject: Rubber band lines Message-Id: <20650@bikini.cis.ufl.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Could somebody guide me as to how to implement rubber band lines. Once the user selects a point using the mouse, a line would be drawn to the present position of the mouse. If the user moves the mouse the line would move, until the mouse is pressed again. If you could mail pseudo code that would be very useful too. Thanks. -- pff@beach.cis.ufl.edu Pablo Fernicola - Machine Intelligence Laboratory - UF "That has nothing to do with computers; it is software."   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab06500; 28 Jul 89 14:08 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa06210; 28 Jul 89 13:57 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa06059; 28 Jul 89 13:36 EDT Received: from LANL.GOV by SMOKE.BRL.MIL id aa06001; 28 Jul 89 13:28 EDT Received: by p.lanl.gov (5.54/1.14) id AA08534; Fri, 28 Jul 89 11:28:57 MDT Received: from localhost.ARPA by infidel.lanl.gov (4.0/5.17) id AA11613; Fri, 28 Jul 89 11:27:29 MDT Message-Id: <8907281727.AA11613@infidel.lanl.gov> To: info-iris@BRL.MIL Subject: Memory/Disk upgrades for 4D-80? Date: Fri, 28 Jul 89 11:27:28 MST From: peter%infidel@lanl.gov Could anyone provide advice on upgrading the memory and disk for a 4D-80 (as in 3rd party upgrades)? I would really like to hear if anyone has hooked up CDC WrenV's to an IRIS, since we have several which we could move from Suns to the IRIS. Peter Ford Center for Nonlinear Studies Los Alamos National Labs peter@lanl.gov   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa07443; 28 Jul 89 15:00 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab07161; 28 Jul 89 14:50 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa07096; 28 Jul 89 14:40 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa08050; 28 Jul 89 14:34 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA23849; Fri, 28 Jul 89 11:28:10 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 18:22:31 GMT From: agate!mica.berkeley.edu!glass@ucbvax.berkeley.edu Organization: University of California, Berkeley Subject: File Sharing and UNIX Diskless Workstations Message-Id: <26750@agate.BERKELEY.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I've been asked to write an essay on how clusters of diskless UNIX workstations manage to share file systems -- without stepping on one another's "toes" and maintaining their individual identities. There are two issues here. The first is: How do manufacturers arrange the file system so that the files which give the machines their individual identities appear different to each machine, while others are shared? Remember that, due to the ad-hoc growth of UNIX, many configuration files are in the same directories as data files, utilities, and applications that can and should be shared. Second, how does a server handle diskless clients with different architectures (or running different versions of the OS)? For example, a Sun 4 can't use the same binaries as a Sun 3 -- and if the server is a VAX, it will need separate binaries as well. I've begun to get a handle on how Sun addresses this problem in SunOS 4.0 (though more info would be welcome). However, I have no idea how (or if) Apollo, ULTRIX, HP, Sequent (which really is a network in a box), AIX, A/UX, POSIX, and OSF propose to handle these problems. (I have heard that the Apollo machines implement some trick whereby environment variables can be included in the pathnames of files, but the person who mentioned this to me didn't know any of the details, nor how pervasive this technique was.) If you have insights on how any or all UNIX implementations address these problems, please send mail. I will summarize (and perhaps interject some ideas) in the essay, which I hope to publish shortly. ============================================================================ "One of the nicest things about mathematics, or anything else you might care to learn, is that many of the things which can never be, often are." Norton Juster, "The Phantom Tollbooth" ============================================================================   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09470; 28 Jul 89 17:21 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09390; 28 Jul 89 17:10 EDT Received: from adm.brl.mil by VMB.BRL.MIL id aa09268; 28 Jul 89 16:59 EDT Received: from ucbvax.Berkeley.EDU by ADM.BRL.MIL id aa22978; 28 Jul 89 16:51 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA01771; Fri, 28 Jul 89 13:40:50 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 18:57:05 GMT From: Gary Tarolli Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: subroutines perpec and lookat Message-Id: <39135@sgi.SGI.COM> References: <8907250331.AA20644@prism.gatech.edu>, <38766@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <38766@sgi.SGI.COM>, thant@horus.sgi.com (Thant Tessman) writes: > In article <8907250331.AA20644@prism.gatech.edu>, ccsupos%prism@GATECH.EDU ("SCHREIBER, O. A.") writes: > > > This is probably due you assuming that z is up (a perfectly reasonable > assumption, one would think) but that the 'lookat' for historical reasons > thinks that y is up, not z. > > I think it is perfectly reasonable for y to be the up axis. Its not a historical reason, its a logical one. If z was up, then zbuffers would be called ybuffers wouldn't they? Zbuffers are called zbuffers because the z axis runs along the line of sight! This implies x and y are therefore up/down and right/left. -- Gary Tarolli   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09611; 28 Jul 89 17:36 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab09470; 28 Jul 89 17:25 EDT Received: from adm.brl.mil by VMB.BRL.MIL id aa09437; 28 Jul 89 17:10 EDT Received: from SNOW-WHITE.MERIT-TECH.COM by ADM.BRL.MIL id aa22649; 28 Jul 89 16:38 EDT Received: by snow-white.merit-tech.com (4.1/SMI-DDN) id AA16027; Fri, 28 Jul 89 08:07:35 CDT Date: Fri, 28 Jul 89 08:07:35 CDT From: Mike Goss Message-Id: <8907281307.AA16027@snow-white.merit-tech.com> To: info-iris@BRL.MIL, mis@apl.stanford.edu Subject: Low level terminal I/O Regarding the message: > From: Misha Pavel > Message-Id: <8907201857.aa12017@SMOKE.BRL.MIL> > > I need to read a tty line and return immediately > even if there is nothing in the system buffer for that tty. > To do that I set the terminal in raw mode with the folowing > settings: > > term.c_iflag = IGNBRK; > term.c_oflag = 0; > term.c_lflag = 0; > term.c_cflag = B9600 | CS8 | CREAD | PARENB | PARODD; > term.c_cc[VMIN] = 1; > term.c_cc[VTIME] = 0; If you set term.c_cc[VMIN] to 0, a read will return immediately, even if no data is in the buffer. Mike Goss Merit Technology Inc.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09785; 28 Jul 89 18:01 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09732; 28 Jul 89 17:50 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa09717; 28 Jul 89 17:44 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa00486; 28 Jul 89 17:34 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA04595; Fri, 28 Jul 89 14:24:58 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 20:08:52 GMT From: john howell Organization: Deere & Co. Technical Center, Moline,IL Subject: Wanted SGI to SUN Image File Translator Message-Id: <108@suntc.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Does someone have a 'tosun' image file translator that will translate SGI imagefiles to Sun Rasterfiles? If so could you send it to me. I would be very appreciative. o __ / o / ( o / -' ======================================================================== John Howell uucp: uunet!suntc!jrh Deere & Company MCImail: John R. Howell, 360-4047 Technical Center CompuServe: john howell [76666,2505] 3300 River Drive FAX: (309)765-3807 Moline, IL 61265 Voice: (309)765-3784 ========================================================================   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09934; 28 Jul 89 18:11 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab09390; 28 Jul 89 17:10 EDT Received: from adm.brl.mil by VMB.BRL.MIL id ab09268; 28 Jul 89 16:59 EDT Received: from ucbvax.Berkeley.EDU by ADM.BRL.MIL id aa23024; 28 Jul 89 16:53 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA01870; Fri, 28 Jul 89 13:42:28 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 19:39:18 GMT From: Vernon Schryver Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: HELP: Low level terminal I/O Message-Id: <39141@sgi.SGI.COM> References: <8907201857.aa12017@SMOKE.BRL.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907201857.aa12017@SMOKE.BRL.MIL>, mis@APL.STANFORD.EDU (Misha Pavel) writes: > ... > I was hoping that the term.c_cc[VTIME] = 0 would do the job. > But the system seems to be still waiting for at least one char. > > Is there any way to look at the system buffer and or return > from read() when no input was generated? > ... > > Misha Pavel System V has a confusing notion of VTIME/VMIN. It likes to wait for at least one character. I seem to recall that there is a combination which does not wait, but there is no reason to suffer the pain of reading the SVID (the only place I know where it is half way documented), or of reading either SGI's stty_ld.c or the standard SVR3 line discipline code. You could use the FIONNBIO ioctl(2) on an FD that is a tty or socket. I would use select(2) instead. Select(2) has always worked on streams (tty's) and sockets. It allows fine grain timeouts and simultaneous polling of lots of FD's, for reading and/or writing. It now works on everything. Now is 3.2, or maybe some version of 3.1. It was added to lboot(1), cdev[], etc. seemingly a long time ago. Vernon Schryver Silicon Graphics vjs@sgi.com   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa11510; 29 Jul 89 2:42 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa11242; 29 Jul 89 1:39 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa11156; 29 Jul 89 1:28 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa01706; 29 Jul 89 1:20 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA28891; Fri, 28 Jul 89 22:21:07 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 22:44:06 GMT From: Thant Tessman Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: subroutines perpec and lookat Message-Id: <39166@sgi.SGI.COM> References: <8907250331.AA20644@prism.gatech.edu>, <38766@sgi.SGI.COM>, <39135@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <39135@sgi.SGI.COM>, tarolli@dragon.wpd.sgi.com (Gary Tarolli) writes: > In article <38766@sgi.SGI.COM>, thant@horus.sgi.com (Thant Tessman) writes: > > In article <8907250331.AA20644@prism.gatech.edu>, ccsupos%prism@GATECH.EDU ("SCHREIBER, O. A.") writes: > > > > > > This is probably due you assuming that z is up (a perfectly reasonable > > assumption, one would think) but that the 'lookat' for historical reasons > > thinks that y is up, not z. > > > > > > I think it is perfectly reasonable for y to be the up axis. Its not a > historical reason, its a logical one. If z was up, then zbuffers would > be called ybuffers wouldn't they? Zbuffers are called zbuffers because > the z axis runs along the line of sight! This implies x and y are > therefore up/down and right/left. > -- > Gary Tarolli > > These are exactly the historical reasons I was refering to. It's logical to computer scientists who started out having to address pixels on a screen using x and y. (Zbuffers are called zbuffers because X and Y were taken already.) Unfortunately for computer scientists, the rest of the world thinks z is up. If we were building these things just for computer scientists it would have also had a left handed coordinate system (gods be praised it doesn't). Seriously, the hotline has spent a man-century or two trying to explain why the 'twist' never seems to do what people thought it did. thant@sgi.com   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12232; 29 Jul 89 7:37 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12183; 29 Jul 89 7:26 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa12169; 29 Jul 89 7:16 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa03437; 29 Jul 89 7:05 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA14574; Sat, 29 Jul 89 04:04:30 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 28 Jul 89 20:35:15 GMT From: Jeff Doughty Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: digging out stuff from process address space Message-Id: <266@odin.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I can answer two of the three questions. Perhaps one of my colleagues can answer #1. > q2: (problem) What magic do I need to read the top of user stack through > /debug/? I tried the following sequence: > > fd = open("/debug/", 0); > fcntl(fd, DFCSTOP, 0); > nfd = fcntl(fd, DFCOPENT, x); > lseek(nfd, stackbas(some low number), 0) > read(nfd, buf, sizeof buf) > fcntl(fd, DFCRUN, &(something which is CLEARNOSIG)) This is almost correct. The problem is that you are reading the wrong file descriptor. DFCOPENT returns the file descriptor of the file that contains the binary. For example, if you are running "/usr/tmp/prog", the file descriptor returned is as if your code said open("/usr/tmp/prog", 0). This is of interest to debuggers who need symbol tables, but you are interested in reading from the running process. So read from fd, not nfd. > q3: (curiosity) What is the reason to require the process to be stopped > before doing DFCOPENT or read() from it? This limits the usefulness > of the operations provided. This is due to a sticky implementation issue - I'll try to explain briefly. Our kernel works on multiprocessors as well as uniprocessors. Therefore shared data must be protected from simultaneous access, which implies a lock of some kind. If an arbitrary process was to examine the address space of another processor, the structures that hold this information would have to be locked. Well, in 99.9% of the time, this data is private to the process, and need not be locked. It needs only to be protected when dbx (which is the primary user of /debug) is debugging the process. By stopping a process, we don't need locks since you know that the data structures aren't going to be mucked with. In addition, it is arguably desirable that the process be stopped when being examined by the debugger. In the future, we may be relaxing this restriction by only locking when modifying the virtual address space - a relatively infrequent event. In the meantime, your code above is correct - stop the process and restart it. > Thanks for any info > rayan Hope this helps. Jeff Doughty   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03496; 30 Jul 89 16:20 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa03370; 30 Jul 89 14:57 EDT Received: from jarvis.csri.toronto.edu by VMB.BRL.MIL id aa03357; 30 Jul 89 14:39 EDT Received: by jarvis.csri.toronto.edu id 12627; Sun, 30 Jul 89 14:38:27 EDT To: info-iris@vmb.brl.mil From: lamy@ai.utoronto.ca (Jean-Francois Lamy) Subject: should this be useful to anyone... Date: Sun, 30 Jul 89 14:38:03 EDT Message-Id: <89Jul30.143827edt.12627@jarvis.csri.toronto.edu> Available for anonymous FTP: Our current source tree for TeX / LaTeX / BibTeX / MetaFont and the standard associated tools, as well as the local collection of goodies (an improved dvi2ps, an imagen driver, and other things). All programs are in C or sh. ** This is *emphatically* not a distribution, and *absolutely* not meant to ** compete with the recently posted announcement. Should any of this get ** picked up and redistributed in the recently announced TeX/SGI distribution, ** so much the better, but it doesn't even matter. At one point or another this stuff has been installed here and on half a dozen sites on this campus (BSD4.3 Vaxen, Ultrix Vaxen, SunOS 3.x and 4.0.x Sun 2, 3 and 4s, MIPS, and SGI IRIX under 3.1F). It should still work on all those platforms, but I haven't checked. So really all you get is an example of how things have been made to work on several different architectures and heterogenous machines on this campus. If it happens to work for you so much the better, but you get no warrantee whatsoever -- it may depend on localisms that are bound to develop on any campus, though I doubt it does. I have absolutely no intention of supporting this -- I am not even supporting it here anymore, I'm supposed to do AI research, after all... In short, what you get is all you get, period. The first two levels of the extracted directory are as follows: README doc/ doc/LocalGuide doc/aaai doc/bibtex doc/svma drivers/ drivers/dvi2ps.3.13 drivers/dvi2tty drivers/dvidoc drivers/imagen drivers/iptex drivers/prtex localmacros/ localmacros/bibtex localmacros/latex mftools/ mftools/CMFware mftools/pkgen packages/ packages/amstex packages/latex packages/mf packages/pictex packages/psfig packages/slitex packages/tex packages/tex.sh textools/ textools/bibtex textools/detex textools/r2bib textools/scripts textools/texchk web2c/ web2c/cmf web2c/ctex web2c/fmtdump web2c/mfdir web2c/site.h.tmpl web2c/site.h.tmpl.4d web2c/texdir web2c/texware web2c/web2cdir The whole thing is a tar file tad over 4.5Mb, compressed. It does not include the standard fonts and macros, which are available from the standard TeX distribution (we have 16 Megs of fonts here, a bit much for FTP :-) HOW TO GET: FTP from neat.cs.utoronto.ca (128.100.1.65) -- login: anonymous, password: your login name, cd to directory pub. For FTP purposes the tar file has been split as follows (you need to get all the parts, cat them together, uncompress, and untar. -rw-r--r-- 1 root 500000 Jul 28 17:34 tex.tar.Z.aa -rw-r--r-- 1 root 500000 Jul 28 17:34 tex.tar.Z.ab -rw-r--r-- 1 root 500000 Jul 28 17:34 tex.tar.Z.ac -rw-r--r-- 1 root 500000 Jul 28 17:34 tex.tar.Z.ad -rw-r--r-- 1 root 500000 Jul 28 17:35 tex.tar.Z.ae -rw-r--r-- 1 root 500000 Jul 28 17:35 tex.tar.Z.af -rw-r--r-- 1 root 500000 Jul 28 17:35 tex.tar.Z.ag -rw-r--r-- 1 root 500000 Jul 28 17:35 tex.tar.Z.ah -rw-r--r-- 1 root 500000 Jul 28 17:35 tex.tar.Z.ai -rw-r--r-- 1 root 41367 Jul 28 17:35 tex.tar.Z.aj BRINGING IT UP: In order to bring it up on an Iris 4d, all you should have to do is move web2c/site.tmpl.h.4d to web2c/site.tmpl.h, edit the top-level Makefile to suit the local religious preferences about local software installation, make sure that you have the following shell script in your path, named "cc", and type make #! /bin/sh - # Fake CC driver that includes local and bsd stuff and links compatibility # bsd routines. Also defines __iris4d__ and __irix3.1__, as well # as linking in /local/lib libraries before system defaults. # Also munges output error messages from cc to BSD format, so it can # be automatically parsed by Jove. # Mark Moraes, University of Toronto realcc=/usr/bin/cc includes= args= for i do case "$i" in -I*) includes="$includes $i";; -v) set -x;; esac done includes="$includes -I/local/include -I/usr/include/bsd" tmp=/tmp/cc.bsd.$$ trap 'rm -f $tmp; exit $status' 0 $realcc -D__iris4d__ -D__irix3.1__ $includes -L/local/lib "$@" -lbsd >$tmp 2>&1 status=$? sed 's/^[^:]*: \([^:]*: \)\([^,]*\), \([^:]*: \)\(.*\)/"\2", \3\1\4/' $tmp   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09720; 31 Jul 89 10:41 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa09464; 31 Jul 89 10:31 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa09202; 31 Jul 89 10:17 EDT Received: from cunyvm.cuny.edu by SMOKE.BRL.MIL id aa15579; 31 Jul 89 10:02 EDT Received: from DHHUNI4.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 0899; Mon, 31 Jul 89 09:59:53 EDT From: RZ20130%DHHUNI4.BITNET@cunyvm.cuny.edu To: info-iris@BRL.MIL Date: 89-07-31 15:47:31 MEZ Message-ID: <8907311003.aa15579@SMOKE.BRL.MIL> Dear Reader Who can help us to find - both commercial and public domain - graphics and animation programs for the following requirements, NOT ALL OF WHICH HAVE TO BE MET although we would be happy if a major portion would? We would like to create some 100 to 200 signs and to also cre- ate, or obtain ready-made, numbers, mathematical symbols and - possibly even non-Latin - alphabets (all of which signs and characters being referred to below as symbols) for processing on our IRIS 31/30 in the following ways: having the symbols write themselves on the screen as if they were written by an invisible pen (or brush for that matter); linking the individual symbols to individual keys, so that striking them triggers the "auto"writing process which itself would occur pursuant to set characteristics (like shape, shadow, size, colour, surface structure, etc.); modeling the symbols (and having them write themselves) in dif- ferent ways (2 or 3D), giving them different shapes, colours, lighting and surface structures; increasing and reducing the size of the symbols; changing - espe- cially slowly - their form, surface structure, lighting, colour, brightness, the angle from which they are looked at or from which light is cast upon them; having them move, or turn around different axes or - which is important - fade away; having other symbols gradually appear instead of fading symbols; all by way of animation; said manipulations occurring one by one or cumulatively to one, or simultaneously to more than one, symbol of those displayed, and even to several symbols scattered among - even many - others that are not modified at the same time; as the display is zooming in to the close-ups, the symbols not focussed being be made to be pushed over the screen edges; everything occurring at variable speed and being reversible; onscreen interactive animation data change facilities being welcome; transparency not required; programs being comfortable, requiring no or little programming themselves, relying on the mouse as much as possible, making economic use of stores. Wolfgang Wiedl Rechenzentrum der Universit{t Hamburg Rothenbaumchaussee 81 D-2000 HAMBURG 13 Fed.Rep.Germany RZ20130@DHHUNI4.BITNET   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa14472; 31 Jul 89 15:09 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12996; 31 Jul 89 14:06 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa12802; 31 Jul 89 13:54 EDT Received: from ugw.utcs.utoronto.ca by SMOKE.BRL.MIL id aa22199; 31 Jul 89 13:43 EDT Received: from VM.NRC.CA (stdin) by ugw.utcs.utoronto.ca with BSMTP id 57404; Mon, 31 Jul 89 13:40:14 EDT Received: from NRCNET.NRC.CA by VM.NRC.CA (Mailer R2.03B) with BSMTP id 5215; Mon, 31 Jul 89 13:36:13 EDT Date: Mon, 31 Jul 89 14:31:00 EDT From: Martin Serrer - Systems Manager Subject: Re: subroutines perpec and lookat To: info-iris@BRL.MIL X-VMS-To: NRCNET::IN%"info-iris@BRL.MIL" Message-Id: <89Jul31.134014edt.57404@ugw.utcs.utoronto.ca> Hi , Just thought I would get my two cents in. >>>In article <39135@sgi.SGI.COM>, tarolli@dragon.wpd.sgi.com (Gary Tarolli) >>>+ writes: >>> In article <38766@sgi.SGI.COM>, thant@horus.sgi.com (Thant Tessman) writes: >> > In article <8907250331.AA20644@prism.gatech.edu>, ccsupos%prism@GATECH.EDU ( >+ "SCHREIBER, O. A.") writes: >> > >> > This is probably due you assuming that z is up (a perfectly reasonable >> > assumption, one would think) but that the 'lookat' for historical reasons >> > thinks that y is up, not z. >> > >> > >> >> I think it is perfectly reasonable for y to be the up axis. Its not a >> historical reason, its a logical one. If z was up, then zbuffers would >> be called ybuffers wouldn't they? Zbuffers are called zbuffers because >> the z axis runs along the line of sight! This implies x and y are >> therefore up/down and right/left. >> -- >> Gary Tarolli > >These are exactly the historical reasons I was refering to. It's logical >to computer scientists who started out having to address pixels on a >screen using x and y. (Zbuffers are called zbuffers because X and Y were >taken already.) Unfortunately for computer scientists, the >rest of the world thinks z is up. If we were building these things just >for computer scientists it would have also had a left handed coordinate >system (gods be praised it doesn't). Yes but... If you talk to mechanical dynamicists Z is down, not up. (Gravity sucks you know) The bottom line is that each discipline seems to have their own preferrence for various reasons. +------------------------------------------------------------------------------+ | Martin Serrer - Systems Munger | | | +---+ /----\ | | Systems Laboratory, Bldg. M-3 RM.118 | |\ | | | | \ | | Division of Mechanical Engineering | | \ | | | | | | National Research Council of Canada | | \ | |---+ | | | Ottawa, Ontario, Canada K1A-0R6 | | \ | | \ | | | serrer@syslab.nrc.ca (BITNET) | | \| | \ | / | | (613) 993-9442 (Bell) | | | | \ \----/ | +------------------------------------------------------------------------------+ + Software Rusts... Rust never Sleeps... + +------------------------------------------------------------------------------+   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa16679; 31 Jul 89 17:23 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa16440; 31 Jul 89 17:13 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa16337; 31 Jul 89 16:56 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa27641; 31 Jul 89 16:47 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA14315; Mon, 31 Jul 89 13:41:34 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 31 Jul 89 16:35:06 GMT From: "Calvin H. Vu" Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: MIPS Fortran I/O Problem? Message-Id: <39239@sgi.SGI.COM> References: <1250@hydra.gatech.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <1250@hydra.gatech.EDU>, scott@capone.gatech.edu writes: > > The binary file is opened as a direct access, unformatted with a > record length of 480. Each record is basicly 120 integers. > The last record in the file is not full...there are only about 51 > integers in it. On most other systems, the last record gets > padded with zeros...however, on the SGI it gets truncated. This is a bug in the MIPS Fortran I/O as you suspected. I have personally fixed this bug and sent the fix to MIPS to be integrated in their next compiler release. The fix will be in our next 3.2 release. > > - Scott > Calvin Vu Silicon Graphics calvin@sgi.com   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa16913; 31 Jul 89 18:15 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab16440; 31 Jul 89 17:13 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab16337; 31 Jul 89 16:56 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa27666; 31 Jul 89 16:49 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA14455; Mon, 31 Jul 89 13:43:03 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 31 Jul 89 16:48:07 GMT From: Jim Barton Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: HELP: Low level terminal I/O Message-Id: <39240@sgi.SGI.COM> References: <8907201857.aa12017@SMOKE.BRL.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8907201857.aa12017@SMOKE.BRL.MIL>, mis@APL.STANFORD.EDU (Misha Pavel) writes: ... > I need to read a tty line and return immediately > even if there is nothing in the system buffer for that tty. > To do that I set the terminal in raw mode with the folowing > settings: > > term.c_iflag = IGNBRK; > term.c_oflag = 0; > term.c_lflag = 0; > term.c_cflag = B9600 | CS8 | CREAD | PARENB | PARODD; > term.c_cc[VMIN] = 1; > term.c_cc[VTIME] = 0; > ... > Misha Pavel Several others have posted valid solutions to this problem, but there is one valid one which is portable (although somewhat ugly) and used by many programs out there. You have the VMIN and VTIME settings backwards. The proper way to do this is to set: term.c_cc[VMIN] = 0; term.c_cc[VTIME] = 1; This tells the terminal driver to return if no characters have arrived in the last 1/10 second, thus your program would sleep for 1/10 of a second each time it polled the variable. The proper way to read a single character is then to perform the read as: if (read(fd, &c, 1) == 1) /* got a character */ ... This style of handling the terminal is oriented towards efficient yet responsive data passing. For instance, let's say I write a program which reads from the tty line and writes to a file (or a pty, for instance). In that case, I could set up a small buffer to take either a maximum number of characters or time out after a certain point: term.c_cc[VMIN] = 0; term.c_cc[VTIME] = 2; ... while ((count = read(ifd, buf, 10) > 0) write(ofd, buf, count); This makes for high throughput while still insuring that single characters make it through quickly. It is useless in real-time applications. As Vernon and Mike pointed out, IRIX is fairly rich in ways to do this operation while still being real-time. -- Jim Barton Silicon Graphics Computer Systems "UNIX: Live Free Or Die!" jmb@sgi.sgi.com, sgi!jmb@decwrl.dec.com, ...{decwrl,sun}!sgi!jmb   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa17567; 31 Jul 89 22:31 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa17443; 31 Jul 89 22:10 EDT Received: from jarvis.csri.toronto.edu by VMB.BRL.MIL id aa17424; 31 Jul 89 21:58 EDT Received: by jarvis.csri.toronto.edu id 13352; Mon, 31 Jul 89 21:57:54 EDT To: info-iris@vmb.brl.mil From: rayan@cs.toronto.edu (Rayan Zachariassen) Subject: Re: digging out stuff from process address space Organization: Department of Computer Science, University of Toronto Date: Mon, 31 Jul 89 21:57:36 EDT Message-Id: <89Jul31.215754edt.13352@jarvis.csri.toronto.edu> Jeff, thanks for your response. It did indeed guide me the right way. My confusion about DFCOPENT was due to its description in the manual page: DFCOPENT If the given argument is zero, return the file descriptor corresponding to the text region of the process. If the given argument is non-zero, interpret this value as a virtual address of the process. Return the file descriptor corresponding to the region containing this address. This call may be used to locate symbol tables of the process. This gave me the impression that opening /debug/ would give only the text segment of the process and one would have to use DFCOPENT with a virtual address to get the stack segment, for example. I got even more confused by seeing strange things in the top page of the stack segment as read from a /debug/ fd... once it was a symbol table, another time it was the contents of the root crontab (which I had edited shortly before). I get the feeling that page isn't being cleared when mapped into the process address space (if so, you will want to fix it, if not, I remain confused). For people listening in, the reason I was wondering about this was to be able to print the hosts people are logged in from in a who listing. We have this (suid, of course) in /local/bin/who. I really hate having to stop login shells like this. #include #include #include #include #include #include #include main(argc, argv) int argc; char *argv[]; { int i; char *at, *host; struct utmp *utp; extern struct utmp *getutent(); extern char *ctime(), *gethost(); /* if this isn't a normal everyday vanilla 'who', punt to the SGI one */ if (argc > 1) { (void) execv("/bin/who", argv); (void) execv("/usr/bin/who", argv); fprintf(stderr, "%s: can't find normal 'who', giving up.\n", argv[0]); exit(1); } /* setup for critical region in gethost() */ /* ignore all signals */ for (i = 1; i < MAXSIG; ++i) (void) signal(i, SIG_IGN); /* up my priority so this runs fast... */ (void) schedctl(NDPRI, 0, NDPHIMAX); while ((utp = getutent()) != NULL) { if (utp->ut_type != USER_PROCESS) continue; at = ctime(&utp->ut_time); at[16] = '\0'; printf("%-8.8s %-8.8s%s", utp->ut_name, utp->ut_line, at+4); if ((host = gethost(utp->ut_pid)) != NULL) printf(" (%s)", host); putchar('\n'); } exit(0); } char * gethost(pid) int pid; { register char *cp; int fd, n, i; static char buf[0x3000]; extern char *strchr(); (void) sprintf(buf, "/debug/%d", pid); if ((fd = open(buf, 0)) < 0) { perror("open"); return NULL; } /* critical section start */ if (fcntl(fd, DFCSTOP, 0) < 0) { perror("fcntl 1"); return NULL; } if (lseek(fd, (long)stackbas(sizeof buf), 0) < 0) { perror("lseek"); return NULL; } if ((n = read(fd, buf, sizeof buf)) < 0) { perror("read"); return NULL; } i = CLEARNOSIG; if (fcntl(fd, DFCRUN, &i) < 0) { perror("fcntl 3"); return NULL; } /* critical section end */ cp = buf + n; while (--cp > buf) { if (*cp == 'R' && *(cp+1) == 'E' && strncmp(cp, "REMOTEHOST=",11) == 0) return strchr(cp, '=') + 1; } return NULL; }   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa18457; 1 Aug 89 2:15 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa18338; 1 Aug 89 1:54 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa18330; 1 Aug 89 1:38 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa01841; 1 Aug 89 1:30 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA13023; Mon, 31 Jul 89 22:29:36 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 31 Jul 89 22:16:01 GMT From: Ruth Milner Organization: University of Toronto Physics/Astronomy/CITA Computing Consortium Subject: Followup to 4D/240-CDC Sabre problems Message-Id: <921@helios.toronto.edu> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Here is the promised followup concerning major problems running CDC Sabre disks on Iris 4D systems (at least). I received only a few replies (which would seem to indicate that the number of systems running the Xylogics 754/CDC Sabre combination is quite small). Most of them were from others who have experienced the same problems we have. One of them was from SGI, and has been very helpful. The current method of flagging bad blocks by setting a bit in the block's sector header is actually the Xylogics spec. SGI has a version of fx which I believe uses this method where possible, but in the situation where the defect is in the header itself, handles it differently - and successfully. At the moment I have only a standalone version, but that will be enough to do our reformatting. I strongly recommend that those of you who are still having problems getting your Sabres working contact your local office, explain the problem, and get them to get hold of a copy of this for you. If your system is on software support, it should make no difference whether you bought your disks from SGI or not (we didn't, though the 754 is theirs). The problem is in the software, not the hardware. If it isn't covered, well, you can try, but getting software patches free from any vendor is generally dependent on buying software support. You could probably arrange to buy it, I don't know for sure. Don't be discouraged if they haven't heard of it; it will probably take some research on their part. I do not know for sure whether this has a bug number assigned to it. As a side note, some of you may be interested in the resolution of the problems with our Exabyte. We are hanging this directly off the SGI SCSI interface, by means of a SCSI extender cable from SGI, daisy-chained off the tower containing the 1/4" tape and small disk. We were told before we purchased the system that this would work, but even at 3.1F it doesn't. It is necessary to either apply a special options tape, or upgrade to 3.1G or 3.2. These versions have proper support for the Exabyte. Finally, some advice based on a lot of frustration :-) : If any of you are still trying to run SMD disks at 3.1C, you should upgrade to at least 3.1D. There was a lot of added support for SMD in this release, as well as some NFS fixes. You should also make sure that your 754 is at least rev. 2.4. Prior to this there were problems which cause the system to hang under heavy disk loading. Upgrading will require reformatting any existing disks, though it need not be done immediately as the new revs can read the old format. This is why we have to go through it. For those of you thinking of purchasing the 754/Sabre combination, you will want to make sure you have all the right bits and pieces ahead of time. One of the people I heard from has tried 5 Sabre 1230's and had this problem with every single one of them. We have seen it on both of our two. So the chances of it happening to others are probably high. Hope this helps some people :-). -- Ruth Milner UUCP - {uunet,pyramid}!utai!helios.physics!sysruth Systems Manager BITNET - sysruth@utorphys U. of Toronto INTERNET - sysruth@helios.physics.utoronto.ca Physics/Astronomy/CITA Computing Consortium   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa23697; 1 Aug 89 10:44 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22979; 1 Aug 89 10:12 EDT Date: Tue, 1 Aug 89 10:00:01 EDT From: Gary S. Moss (VLD/VMB) To: Jim Barton cc: info-iris@BRL.MIL Subject: Re: HELP: Low level terminal I/O Message-ID: <8908011000.aa22873@VMB.BRL.MIL> [Jim Barton writes] < Several others have posted valid solutions to this problem, but there is one < valid one which is portable (although somewhat ugly) and used by many < programs out there. < < You have the VMIN and VTIME settings backwards. The proper way to do < this is to set: < < term.c_cc[VMIN] = 0; < term.c_cc[VTIME] = 1; I don't believe that this is portable, except on System V based machines. It will work on some BSD-based systems, but not all, especially older implementations. For example, here is an excerpt from the termio(4V) manual page on my Sun (Release 3.2): " 3. The MIN and TIME values supported by other implementations can be set, but this has no effect on the terminal driver. The driver behaves as if MIN were 1 and TIME were 0." Basic BSD systems use the sgtty structures rather than termio; though later versions have some compatibility with System V built in, you may not get the behavior you want. -moss   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02192; 1 Aug 89 17:42 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01378; 1 Aug 89 16:39 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa01300; 1 Aug 89 16:23 EDT Received: from scri1.scri.fsu.edu by SMOKE.BRL.MIL id aa21801; 1 Aug 89 16:17 EDT Date: Tue, 1 Aug 1989 16:17:38 EDT From: "VAXINO::DAVID"@scri1.scri.fsu.edu Message-Id: <890801161738.20220b2f@SCRI1.SCRI.FSU.EDU> Subject: problems with dbx To: info-iris@BRL.MIL X-Vmsmail-To: SCRI::SMTP%"info-iris@BRL.MIL" I am using dbx and edge to debug some rather large fortran programs (~20k lines) on a 3130. I have been able to get dbx to die several times with the following error: dbx: internal error: skimsource: too many lines This error has occurred with both the List command and when the debugger attempts to display the source code of a break point. I have also been able to get the debugger to die in such a way that it actually HANGS the machine! This error normally occurs while the debugger is loading in the symbolic information but before it prints "(dbx)". These errors both seem to go away when I run my code through egrep just before compilation to remove of the comment lines (code size ~10k lines). A third error that I have come across is not being able to print out the contents of arrays that are passed in to a subroutine. The error is some gibberish about null pointers. The only way that I have found around this error is to reference the variables from the calling procedure. For example: print main.var1[1] - David LaSalle SCRI Florida State University Tallahassee, FL 32306-4052 (904)644-8532 arpanet: minuit@scri1.scri.fsu.edu (128.186.4.1) or minuit%fsu@nmfecc.arpa   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02616; 1 Aug 89 19:16 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02573; 1 Aug 89 19:05 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa02559; 1 Aug 89 18:57 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa24332; 1 Aug 89 18:45 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA06303; Tue, 1 Aug 89 15:37:12 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 1 Aug 89 21:52:57 GMT From: Bevis Ip Organization: University of Toronto Mechanical Engineering Subject: iris4d tcsh patch Message-Id: <89Aug1.175305edt.19236@me.utoronto.ca> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Those who have picked up the tcsh from BRL or Ruth Milner (thanks Ruth) might want to pick this up too; it's for my 4d port only. The patch fixes two things: tty setup (tty stuck on ONLRET, eg. after one does "stty sane") and builtin time command (gave wrong times). Anonymous ftp to me.toronto.edu (128.100.49.1) and fetch the file "pub/tcsh/PATCH.4d", file is <4K. bevis -- Bevis Ip <> ip@me.toronto.edu, ip@me.utoronto.ca University of Toronto <> {pyramid,uunet}!utai!me!ip Mechanical Engineering <> {allegra,decwrl}!utcsri!me!ip   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02491; 1 Aug 89 18:40 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa02252; 1 Aug 89 18:09 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa02239; 1 Aug 89 17:59 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa23570; 1 Aug 89 17:48 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA02690; Tue, 1 Aug 89 14:35:13 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 1 Aug 89 21:16:01 GMT From: Philip Budne Organization: Boston U. Comp. Sci. Subject: Diffs for BSD 4.3-Tahoe lpr/lpd on SGI Message-Id: <35660@bu-cs.BU.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Here are diffs to the 4.3-Tahoe lpr/lpd available from UUNET to allow it to be used on an SGI machine. Here are the particulars of the system on which I ported it; grizzly% uname -a grizzly grizzly 4D1-3.1F 04141631 IP5 It has NOT been used to drive local printers at all, but only to provide access to printers on BSD hosts. Some assembly required -- and remember, you get what you pay for! I don't read this group, but would be happy to hear about real fixes or improvements via mail. Phil Budne, Boston University budd@bu-it.bu.edu {mit-eddie,harvard}!buita!budd ================ snip here (actually I just use "unshar") #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh Makefile.diff <<'END_OF_Makefile.diff' X*** Makefile.orig Thu Sep 29 12:29:09 1988 X--- Makefile Mon Jul 17 15:49:53 1989 X*************** X*** 21,29 X # DAEMON someone special X # SPGRP the group id of the spooling programs X # X! CFLAGS= -O X! LIBDIR= /usr/lib X! BINDIR= /usr/ucb X SPLDIR= /usr/spool/lpd X DAEMON= daemon X SPGRP= daemon X X--- 21,30 ----- X # DAEMON someone special X # SPGRP the group id of the spooling programs X # X! CFLAGS= -g -I/usr/include/bsd X! LIBDIR= /usr/local/lib X! BINDIR= /usr/local/bin X! ETCDIR= /usr/local/etc X SPLDIR= /usr/spool/lpd X DAEMON= daemon X SPGRP= daemon X*************** X*** 27,33 X SPLDIR= /usr/spool/lpd X DAEMON= daemon X SPGRP= daemon X! LIBC= /lib/libc.a X L1SRCS= lpd.c printjob.c recvjob.c displayq.c rmjob.c startdaemon.c \ X lpdchar.c common.c printcap.c X L1OBJS= lpd.o printjob.o recvjob.o displayq.o rmjob.o startdaemon.o \ X X--- 28,34 ----- X SPLDIR= /usr/spool/lpd X DAEMON= daemon X SPGRP= daemon X! #LIBC= /lib/libc.a X L1SRCS= lpd.c printjob.c recvjob.c displayq.c rmjob.c startdaemon.c \ X lpdchar.c common.c printcap.c X L1OBJS= lpd.o printjob.o recvjob.o displayq.o rmjob.o startdaemon.o \ X*************** X*** 32,39 X lpdchar.c common.c printcap.c X L1OBJS= lpd.o printjob.o recvjob.o displayq.o rmjob.o startdaemon.o \ X lpdchar.o common.o printcap.o X! L2SRCS= lpr.c startdaemon.c printcap.c X! L2OBJS= lpr.o startdaemon.o printcap.o X L3SRCS= lpq.c displayq.c common.c printcap.c X L3OBJS= lpq.o displayq.o common.o printcap.o X L4SRCS= lprm.c rmjob.c startdaemon.c common.c printcap.c X X--- 33,40 ----- X lpdchar.c common.c printcap.c X L1OBJS= lpd.o printjob.o recvjob.o displayq.o rmjob.o startdaemon.o \ X lpdchar.o common.o printcap.o X! L2SRCS= lpr.c startdaemon.c printcap.c common.c X! L2OBJS= lpr.o startdaemon.o printcap.o common.o X L3SRCS= lpq.c displayq.c common.c printcap.c X L3OBJS= lpq.o displayq.o common.o printcap.o X L4SRCS= lprm.c rmjob.c startdaemon.c common.c printcap.c X*************** X*** 53,59 X MAN= ${MAN1} ${MAN8} X ALL= lpd lpr lpq lprm lpc lptest pac X X! all: ${ALL} FILTERS VFILTERS X X lpd: ${L1OBJS} ${LIBC} X ${CC} -o $@ ${L1OBJS} X X--- 54,61 ----- X MAN= ${MAN1} ${MAN8} X ALL= lpd lpr lpq lprm lpc lptest pac X X! #all: ${ALL} FILTERS VFILTERS X! all: ${ALL} X X lpd: ${L1OBJS} ${LIBC} X ${CC} -o $@ ${L1OBJS} -lbsd X*************** X*** 56,62 X all: ${ALL} FILTERS VFILTERS X X lpd: ${L1OBJS} ${LIBC} X! ${CC} -o $@ ${L1OBJS} X X lpr: ${L2OBJS} ${LIBC} X ${CC} -o $@ ${L2OBJS} X X--- 58,64 ----- X all: ${ALL} X X lpd: ${L1OBJS} ${LIBC} X! ${CC} -o $@ ${L1OBJS} -lbsd X X lpr: ${L2OBJS} ${LIBC} X ${CC} -o $@ ${L2OBJS} -lbsd X*************** X*** 59,65 X ${CC} -o $@ ${L1OBJS} X X lpr: ${L2OBJS} ${LIBC} X! ${CC} -o $@ ${L2OBJS} X X lpq: ${L3OBJS} ${LIBC} X ${CC} -o $@ ${L3OBJS} X X--- 61,67 ----- X ${CC} -o $@ ${L1OBJS} -lbsd X X lpr: ${L2OBJS} ${LIBC} X! ${CC} -o $@ ${L2OBJS} -lbsd X X lpq: ${L3OBJS} ${LIBC} X ${CC} -o $@ ${L3OBJS} -lbsd X*************** X*** 62,68 X ${CC} -o $@ ${L2OBJS} X X lpq: ${L3OBJS} ${LIBC} X! ${CC} -o $@ ${L3OBJS} X X lprm: ${L4OBJS} ${LIBC} X ${CC} -o $@ ${L4OBJS} X X--- 64,70 ----- X ${CC} -o $@ ${L2OBJS} -lbsd X X lpq: ${L3OBJS} ${LIBC} X! ${CC} -o $@ ${L3OBJS} -lbsd X X lprm: ${L4OBJS} ${LIBC} X ${CC} -o $@ ${L4OBJS} -lbsd X*************** X*** 65,71 X ${CC} -o $@ ${L3OBJS} X X lprm: ${L4OBJS} ${LIBC} X! ${CC} -o $@ ${L4OBJS} X X lpc: ${L5OBJS} ${LIBC} X ${CC} -o $@ ${L5OBJS} X X--- 67,73 ----- X ${CC} -o $@ ${L3OBJS} -lbsd X X lprm: ${L4OBJS} ${LIBC} X! ${CC} -o $@ ${L4OBJS} -lbsd X X lpc: ${L5OBJS} ${LIBC} X ${CC} -o $@ ${L5OBJS} -lbsd X*************** X*** 68,74 X ${CC} -o $@ ${L4OBJS} X X lpc: ${L5OBJS} ${LIBC} X! ${CC} -o $@ ${L5OBJS} X X lptest: ${L6OBJS} ${LIBC} X ${CC} ${CFLAGS} -o $@ ${L6OBJS} X X--- 70,76 ----- X ${CC} -o $@ ${L4OBJS} -lbsd X X lpc: ${L5OBJS} ${LIBC} X! ${CC} -o $@ ${L5OBJS} -lbsd X X lptest: ${L6OBJS} ${LIBC} X ${CC} ${CFLAGS} -o $@ ${L6OBJS} -lbsd X*************** X*** 71,77 X ${CC} -o $@ ${L5OBJS} X X lptest: ${L6OBJS} ${LIBC} X! ${CC} ${CFLAGS} -o $@ ${L6OBJS} X X pac: ${L7OBJS} ${LIBC} X ${CC} -o $@ ${L7OBJS} X X--- 73,79 ----- X ${CC} -o $@ ${L5OBJS} -lbsd X X lptest: ${L6OBJS} ${LIBC} X! ${CC} ${CFLAGS} -o $@ ${L6OBJS} -lbsd X X pac: ${L7OBJS} ${LIBC} X ${CC} -o $@ ${L7OBJS} -lbsd X*************** X*** 74,80 X ${CC} ${CFLAGS} -o $@ ${L6OBJS} X X pac: ${L7OBJS} ${LIBC} X! ${CC} -o $@ ${L7OBJS} X X FILTERS: X cd filters; make ${MFLAGS} X X--- 76,82 ----- X ${CC} ${CFLAGS} -o $@ ${L6OBJS} -lbsd X X pac: ${L7OBJS} ${LIBC} X! ${CC} -o $@ ${L7OBJS} -lbsd X X FILTERS: X cd filters; make ${MFLAGS} X*************** X*** 97,103 X cd filters; make ${MFLAGS} depend X cd vfilters; make ${MFLAGS} depend X X! install: ${MAN} X install -s -o root -g ${SPGRP} -m 6711 lpd ${DESTDIR}/${LIBDIR}/lpd X install -s -o root -g ${SPGRP} -m 6711 lpr ${DESTDIR}/${BINDIR}/lpr X install -s -o root -g ${SPGRP} -m 6711 lpq ${DESTDIR}/${BINDIR}/lpq X X--- 99,106 ----- X cd filters; make ${MFLAGS} depend X cd vfilters; make ${MFLAGS} depend X X! #install: ${MAN} X! install: X install -s -o root -g ${SPGRP} -m 6711 lpd ${DESTDIR}/${LIBDIR}/lpd X install -s -o root -g ${SPGRP} -m 6711 lpr ${DESTDIR}/${BINDIR}/lpr X install -s -o root -g ${SPGRP} -m 6711 lpq ${DESTDIR}/${BINDIR}/lpq X*************** X*** 102,108 X install -s -o root -g ${SPGRP} -m 6711 lpr ${DESTDIR}/${BINDIR}/lpr X install -s -o root -g ${SPGRP} -m 6711 lpq ${DESTDIR}/${BINDIR}/lpq X install -s -o root -g ${SPGRP} -m 6711 lprm ${DESTDIR}/${BINDIR}/lprm X! install -s -o bin -g ${SPGRP} -m 2711 lpc ${DESTDIR}/etc/lpc X install -s -o bin -g bin -m 755 lptest ${DESTDIR}/${BINDIR}/lptest X install -s -o bin -g bin -m 755 pac ${DESTDIR}/etc/pac X /etc/chown ${DAEMON} ${DESTDIR}/${SPLDIR} X X--- 105,111 ----- X install -s -o root -g ${SPGRP} -m 6711 lpr ${DESTDIR}/${BINDIR}/lpr X install -s -o root -g ${SPGRP} -m 6711 lpq ${DESTDIR}/${BINDIR}/lpq X install -s -o root -g ${SPGRP} -m 6711 lprm ${DESTDIR}/${BINDIR}/lprm X! install -s -o bin -g ${SPGRP} -m 2711 lpc ${DESTDIR}/${ETCDIR}/lpc X install -s -o bin -g bin -m 755 lptest ${DESTDIR}/${BINDIR}/lptest X install -s -o bin -g bin -m 755 pac ${DESTDIR}/${ETCDIR}/pac X X*************** X*** 104,117 X install -s -o root -g ${SPGRP} -m 6711 lprm ${DESTDIR}/${BINDIR}/lprm X install -s -o bin -g ${SPGRP} -m 2711 lpc ${DESTDIR}/etc/lpc X install -s -o bin -g bin -m 755 lptest ${DESTDIR}/${BINDIR}/lptest X! install -s -o bin -g bin -m 755 pac ${DESTDIR}/etc/pac X! /etc/chown ${DAEMON} ${DESTDIR}/${SPLDIR} X! chgrp ${SPGRP} ${DESTDIR}/${SPLDIR} X! chmod 775 ${DESTDIR}/${SPLDIR} X! install -c -o bin -g bin -m 444 ${MAN1} ${DESTDIR}/usr/man/cat1 X! install -c -o bin -g bin -m 444 ${MAN8} ${DESTDIR}/usr/man/cat8 X! cd filters; make ${MFLAGS} DESTDIR=${DESTDIR} install X! cd vfilters; make ${MFLAGS} DESTDIR=${DESTDIR} install X X lint: ${SRCS} X lint ${CFLAGS} ${L1SRCS} X X--- 107,121 ----- X install -s -o root -g ${SPGRP} -m 6711 lprm ${DESTDIR}/${BINDIR}/lprm X install -s -o bin -g ${SPGRP} -m 2711 lpc ${DESTDIR}/${ETCDIR}/lpc X install -s -o bin -g bin -m 755 lptest ${DESTDIR}/${BINDIR}/lptest X! install -s -o bin -g bin -m 755 pac ${DESTDIR}/${ETCDIR}/pac X! X! # /etc/chown ${DAEMON} ${DESTDIR}/${SPLDIR} X! # chgrp ${SPGRP} ${DESTDIR}/${SPLDIR} X! # chmod 775 ${DESTDIR}/${SPLDIR} X! # install -c -o bin -g bin -m 444 ${MAN1} ${DESTDIR}/usr/man/cat1 X! # install -c -o bin -g bin -m 444 ${MAN8} ${DESTDIR}/usr/man/cat8 X! # cd filters; make ${MFLAGS} DESTDIR=${DESTDIR} install X! # cd vfilters; make ${MFLAGS} DESTDIR=${DESTDIR} install X X lint: ${SRCS} X lint ${CFLAGS} ${L1SRCS} END_OF_Makefile.diff if test 7606 -ne `wc -c README.BU <<'END_OF_README.BU' X4.3 Tahoe lpr/lpd (from uunet) hacked for SGI/Irix X Xprintcap capabilities for terminal mode bits (fc, fs, xc, xs) have not Xbeen implemented! We do not use local printers on our SGIs. (Why not Xuse the native lp?) X XSimulation of BSD fc/fs/xc/xs would allow quicker porting of BSD Xfilters and printcap files, but not the full latitude of termio modes. X XAllowing full access to termio would require; X {set,clear} x {cflags,iflags,oflags,lflags} X VMIN X VTIME X Xie; 10 capabilities. X X Phil Budne X Boston University END_OF_README.BU if test 509 -ne `wc -c cmds.c.diff <<'END_OF_cmds.c.diff' X*** cmds.c.orig Thu Jun 30 21:00:19 1988 X--- cmds.c Mon Jul 17 14:58:31 1989 X*************** X*** 160,166 X } X } X X! select(d) X struct direct *d; X { X int c = d->d_name[0]; X X--- 160,166 ----- X } X } X X! Select(d) X struct direct *d; X { X int c = d->d_name[0]; X*************** X*** 211,217 X ; X lp[-1] = '/'; X X! nitems = scandir(SD, &queue, select, sortq); X if (nitems < 0) { X printf("\tcannot examine spool directory\n"); X return; X X--- 211,217 ----- X ; X lp[-1] = '/'; X X! nitems = scandir(SD, &queue, Select, sortq); X if (nitems < 0) { X printf("\tcannot examine spool directory\n"); X return; END_OF_cmds.c.diff if test 631 -ne `wc -c cmdtab.c.diff <<'END_OF_cmdtab.c.diff' X*** cmdtab.c.orig Thu Jun 30 21:00:19 1988 X--- cmdtab.c Mon Jul 17 15:00:52 1989 X*************** X*** 61,64 X { 0 }, X }; X X! int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]); X X--- 61,64 ----- X { 0 }, X }; X X! int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]) - 1; /* budd */ END_OF_cmdtab.c.diff if test 279 -ne `wc -c displayq.c.diff <<'END_OF_displayq.c.diff' X*** displayq.c.orig Thu Jun 30 21:00:20 1988 X--- displayq.c Mon Jul 17 16:07:38 1989 X*************** X*** 154,159 X warn(); X else { X register char *cp; X X /* get daemon pid */ X cp = current; X X--- 154,160 ----- X warn(); X else { X register char *cp; X+ register c; X X /* get daemon pid */ X cp = current; X*************** X*** 157,164 X X /* get daemon pid */ X cp = current; X! while ((*cp = getc(fp)) != EOF && *cp != '\n') X! cp++; X *cp = '\0'; X i = atoi(current); X if (i <= 0 || kill(i, 0) < 0) X X--- 158,165 ----- X X /* get daemon pid */ X cp = current; X! while ((c = getc(fp)) != EOF && c != '\n') X! *cp++ = c; X *cp = '\0'; X i = atoi(current); X if (i <= 0 || kill(i, 0) < 0) X*************** X*** 166,173 X else { X /* read current file name */ X cp = current; X! while ((*cp = getc(fp)) != EOF && *cp != '\n') X! cp++; X *cp = '\0'; X /* X * Print the status file. X X--- 167,174 ----- X else { X /* read current file name */ X cp = current; X! while ((c = getc(fp)) != EOF && c != '\n') X! *cp++ = c; X *cp = '\0'; X /* X * Print the status file. END_OF_displayq.c.diff if test 1197 -ne `wc -c lp.h.diff <<'END_OF_lp.h.diff' X*** lp.h.orig Thu Jun 30 21:00:21 1988 X--- lp.h Sun Jul 16 01:07:57 1989 X*************** X*** 27,32 X #include X #include X #include X #include X #include X #include X X--- 27,33 ----- X #include X #include X #include X+ #ifndef sgi /* budd */ X #include X #endif /* budd */ X #include X*************** X*** 28,33 X #include X #include X #include X #include X #include X #include X X--- 29,35 ----- X #include X #ifndef sgi /* budd */ X #include X+ #endif /* budd */ X #include X #include X #include END_OF_lp.h.diff if test 778 -ne `wc -c lp.local.h.diff <<'END_OF_lp.local.h.diff' X*** lp.local.h.orig Thu Jun 30 21:00:21 1988 X--- lp.local.h Mon Jul 17 15:57:25 1989 X*************** X*** 29,34 X #include X #include X X #ifndef A_MAGIC1 /* must be a VM/UNIX system */ X # define A_MAGIC1 OMAGIC X # define A_MAGIC2 NMAGIC X X--- 29,35 ----- X #include X #include X X+ #ifndef sgi X #ifndef A_MAGIC1 /* must be a VM/UNIX system */ X # define A_MAGIC1 OMAGIC X # define A_MAGIC2 NMAGIC X*************** X*** 36,41 X # undef ARMAG X # define ARMAG 0177545 X #endif X X /* X * Defaults for line printer capabilities data base X X--- 37,43 ----- X # undef ARMAG X # define ARMAG 0177545 X #endif X+ #endif X X /* X * Defaults for line printer capabilities data base X*************** X*** 44,50 X #define DEFLOCK "lock" X #define DEFSTAT "status" X #define DEFSPOOL "/usr/spool/lpd" X! #define DEFDAEMON "/usr/lib/lpd" X #define DEFLOGF "/dev/console" X #define DEFDEVLP "/dev/lp" X #define DEFRLPR "/usr/lib/rlpr" X X--- 46,52 ----- X #define DEFLOCK "lock" X #define DEFSTAT "status" X #define DEFSPOOL "/usr/spool/lpd" X! #define DEFDAEMON "/usr/lib/lpd" /* budd: never used? */ X #define DEFLOGF "/dev/console" X #define DEFDEVLP "/dev/lp" X #define DEFRLPR "/usr/lib/rlpr" X*************** X*** 48,54 X #define DEFLOGF "/dev/console" X #define DEFDEVLP "/dev/lp" X #define DEFRLPR "/usr/lib/rlpr" X! #define DEFBINDIR "/usr/ucb" X #define DEFMX 1000 X #define DEFMAXCOPIES 0 X #define DEFFF "\f" X X--- 50,56 ----- X #define DEFLOGF "/dev/console" X #define DEFDEVLP "/dev/lp" X #define DEFRLPR "/usr/lib/rlpr" X! #define DEFBINDIR "/usr/ucb" /* budd: never used? */ X #define DEFMX 1000 X #define DEFMAXCOPIES 0 X #define DEFFF "\f" X*************** X*** 77,82 X /* X * path name of files created by lpd. X */ X #define MASTERLOCK "/usr/spool/lpd.lock" X #define SOCKETNAME "/dev/printer" X X X--- 79,88 ----- X /* X * path name of files created by lpd. X */ X+ #ifdef sgi X+ /* budd: keep everything under /usr/spool/lpd */ X+ #define MASTERLOCK "/usr/spool/lpd/lpd.lock" X+ #else X #define MASTERLOCK "/usr/spool/lpd.lock" X #endif X X*************** X*** 78,83 X * path name of files created by lpd. X */ X #define MASTERLOCK "/usr/spool/lpd.lock" X #define SOCKETNAME "/dev/printer" X X /* X X--- 84,91 ----- X #define MASTERLOCK "/usr/spool/lpd/lpd.lock" X #else X #define MASTERLOCK "/usr/spool/lpd.lock" X+ #endif X+ X #define SOCKETNAME "/dev/printer" X X /* END_OF_lp.local.h.diff if test 2417 -ne `wc -c lpc.c.diff <<'END_OF_lpc.c.diff' X*** lpc.c.orig Sun Nov 20 22:11:03 1988 X--- lpc.c Mon Jul 17 14:55:45 1989 X*************** X*** 109,114 X quit(); X if (cmdline[0] == 0) X break; X makeargv(); X c = getcmd(margv[0]); X if (c == (struct cmd *)-1) { X X--- 109,116 ----- X quit(); X if (cmdline[0] == 0) X break; X+ if (cmdline[0] == '\n') /* budd */ X+ continue; /* budd */ X makeargv(); X c = getcmd(margv[0]); X if (c == (struct cmd *)-1) { END_OF_lpc.c.diff if test 437 -ne `wc -c lpd.c.diff <<'END_OF_lpd.c.diff' X*** lpd.c.orig Thu Jun 30 21:00:22 1988 X--- lpd.c Sun Jul 16 01:13:37 1989 X*************** X*** 65,71 X int argc; X char **argv; X { X! int f, funix, finet, options, defreadfds, fromlen; X struct sockaddr_un sun, fromunix; X struct sockaddr_in sin, frominet; X int omask, lfd; X X--- 65,73 ----- X int argc; X char **argv; X { X! int f, finet, options, defreadfds, fromlen; X! # ifndef sgi X! int funix; X struct sockaddr_un sun, fromunix; X # endif X struct sockaddr_in sin, frominet; X*************** X*** 67,72 X { X int f, funix, finet, options, defreadfds, fromlen; X struct sockaddr_un sun, fromunix; X struct sockaddr_in sin, frominet; X int omask, lfd; X X X--- 69,75 ----- X # ifndef sgi X int funix; X struct sockaddr_un sun, fromunix; X+ # endif X struct sockaddr_in sin, frominet; X int omask, lfd; X X*************** X*** 127,132 X syslog(LOG_ERR, "%s: %m", MASTERLOCK); X exit(1); X } X signal(SIGCHLD, reapchild); X /* X * Restart all the printers. X X--- 130,139 ----- X syslog(LOG_ERR, "%s: %m", MASTERLOCK); X exit(1); X } X+ # ifdef Xsgi X+ signal(SIGCLD, SIG_IGN); /* never make zombies */ X+ /* doesn't seem to work */ X+ # else X signal(SIGCHLD, reapchild); X # endif X /* X*************** X*** 128,133 X exit(1); X } X signal(SIGCHLD, reapchild); X /* X * Restart all the printers. X */ X X--- 135,141 ----- X /* doesn't seem to work */ X # else X signal(SIGCHLD, reapchild); X+ # endif X /* X * Restart all the printers. X */ X*************** X*** 132,137 X * Restart all the printers. X */ X startup(); X (void) unlink(SOCKETNAME); X funix = socket(AF_UNIX, SOCK_STREAM, 0); X if (funix < 0) { X X--- 140,146 ----- X * Restart all the printers. X */ X startup(); X+ # ifndef sgi X (void) unlink(SOCKETNAME); X funix = socket(AF_UNIX, SOCK_STREAM, 0); X if (funix < 0) { X*************** X*** 153,158 X sigsetmask(omask); X defreadfds = 1 << funix; X listen(funix, 5); X finet = socket(AF_INET, SOCK_STREAM, 0); X if (finet >= 0) { X struct servent *sp; X X--- 162,168 ----- X sigsetmask(omask); X defreadfds = 1 << funix; X listen(funix, 5); X+ # endif X finet = socket(AF_INET, SOCK_STREAM, 0); X if (finet >= 0) { X struct servent *sp; X*************** X*** 188,193 X syslog(LOG_WARNING, "select: %m"); X continue; X } X if (readfds & (1 << funix)) { X domain = AF_UNIX, fromlen = sizeof(fromunix); X s = accept(funix, &fromunix, &fromlen); X X--- 198,204 ----- X syslog(LOG_WARNING, "select: %m"); X continue; X } X+ # ifndef sgi X if (readfds & (1 << funix)) { X domain = AF_UNIX, fromlen = sizeof(fromunix); X s = accept(funix, &fromunix, &fromlen); X*************** X*** 191,197 X if (readfds & (1 << funix)) { X domain = AF_UNIX, fromlen = sizeof(fromunix); X s = accept(funix, &fromunix, &fromlen); X! } else if (readfds & (1 << finet)) { X domain = AF_INET, fromlen = sizeof(frominet); X s = accept(finet, &frominet, &fromlen); X } X X--- 202,210 ----- X if (readfds & (1 << funix)) { X domain = AF_UNIX, fromlen = sizeof(fromunix); X s = accept(funix, &fromunix, &fromlen); X! } else X! # endif X! if (readfds & (1 << finet)) { X domain = AF_INET, fromlen = sizeof(frominet); X s = accept(finet, &frominet, &fromlen); X } X*************** X*** 206,211 X signal(SIGINT, SIG_IGN); X signal(SIGQUIT, SIG_IGN); X signal(SIGTERM, SIG_IGN); X (void) close(funix); X (void) close(finet); X dup2(s, 1); X X--- 219,225 ----- X signal(SIGINT, SIG_IGN); X signal(SIGQUIT, SIG_IGN); X signal(SIGTERM, SIG_IGN); X+ # ifndef sgi X (void) close(funix); X # endif X (void) close(finet); X*************** X*** 207,212 X signal(SIGQUIT, SIG_IGN); X signal(SIGTERM, SIG_IGN); X (void) close(funix); X (void) close(finet); X dup2(s, 1); X (void) close(s); X X--- 221,227 ----- X signal(SIGTERM, SIG_IGN); X # ifndef sgi X (void) close(funix); X+ # endif X (void) close(finet); X dup2(s, 1); X (void) close(s); X*************** X*** 222,228 X reapchild() X { X union wait status; X- X while (wait3(&status, WNOHANG, 0) > 0) X ; X } X X--- 237,242 ----- X reapchild() X { X union wait status; X while (wait3(&status, WNOHANG, 0) > 0) X ; X } X*************** X*** 401,406 X f->sin_port = ntohs(f->sin_port); X if (f->sin_family != AF_INET || f->sin_port >= IPPORT_RESERVED) X fatal("Malformed from address"); X hp = gethostbyaddr(&f->sin_addr, sizeof(struct in_addr), f->sin_family); X if (hp == 0) X fatal("Host name for your address (%s) unknown", X X--- 415,424 ----- X f->sin_port = ntohs(f->sin_port); X if (f->sin_family != AF_INET || f->sin_port >= IPPORT_RESERVED) X fatal("Malformed from address"); X+ # ifdef sgi X+ if( inet_netof( f->sin_addr ) == 127 ) /* loopback? */ X+ return; X+ # endif X hp = gethostbyaddr(&f->sin_addr, sizeof(struct in_addr), f->sin_family); X if (hp == 0) X fatal("Host name for your address (%s) unknown", END_OF_lpd.c.diff if test 4953 -ne `wc -c lpr.c.diff <<'END_OF_lpr.c.diff' X*** lpr.c.orig Thu Jun 30 21:00:24 1988 X--- lpr.c Mon Jul 17 15:46:58 1989 X*************** X*** 90,95 X char *argv[]; X { X extern struct passwd *getpwuid(); X struct passwd *pw; X struct group *gptr; X extern char *itoa(); X X--- 90,98 ----- X char *argv[]; X { X extern struct passwd *getpwuid(); X+ # ifdef sgi X+ extern struct group *getgrnam(); X+ # endif X struct passwd *pw; X struct group *gptr; X extern char *itoa(); X*************** X*** 258,263 X */ X mktemps(); X tfd = nfile(tfname); X (void) fchown(tfd, DU, -1); /* owned by daemon for protection */ X card('H', host); X card('P', person); X X--- 261,269 ----- X */ X mktemps(); X tfd = nfile(tfname); X+ # ifdef sgi X+ (void) chown(tfname, DU, -1); /* owned by daemon for protection */ X+ # else X (void) fchown(tfd, DU, -1); /* owned by daemon for protection */ X # endif X card('H', host); X*************** X*** 259,264 X mktemps(); X tfd = nfile(tfname); X (void) fchown(tfd, DU, -1); /* owned by daemon for protection */ X card('H', host); X card('P', person); X if (hdr) { X X--- 265,271 ----- X (void) chown(tfname, DU, -1); /* owned by daemon for protection */ X # else X (void) fchown(tfd, DU, -1); /* owned by daemon for protection */ X+ # endif X card('H', host); X card('P', person); X if (hdr) { X*************** X*** 462,467 X printf("%s: cannot create %s\n", name, n); X cleanup(); X } X if (fchown(f, userid, -1) < 0) { X printf("%s: cannot chown %s\n", name, n); X cleanup(); X X--- 469,480 ----- X printf("%s: cannot create %s\n", name, n); X cleanup(); X } X+ # ifdef sgi X+ if (chown(n, userid, -1) < 0) { X+ printf("%s: cannot chown %s\n", name, n); X+ cleanup(); X+ } X+ # else X if (fchown(f, userid, -1) < 0) { X printf("%s: cannot chown %s\n", name, n); X cleanup(); X*************** X*** 466,471 X printf("%s: cannot chown %s\n", name, n); X cleanup(); X } X if (++n[inchar] > 'z') { X if (++n[inchar-2] == 't') { X printf("too many files - break up the job\n"); X X--- 479,485 ----- X printf("%s: cannot chown %s\n", name, n); X cleanup(); X } X+ # endif X if (++n[inchar] > 'z') { X if (++n[inchar-2] == 't') { X printf("too many files - break up the job\n"); X*************** X*** 515,520 X test(file) X char *file; X { X struct exec execb; X register int fd; X register char *cp; X X--- 529,543 ----- X test(file) X char *file; X { X+ # ifdef sgi X+ union { X+ unsigned short ma_short; X+ struct filehdr ma_f; X+ # ifdef SARMAG X+ char ma_str[ SARMAG ]; X+ # endif X+ } magic; X+ # else /* BSD, COFF pdp-11/ibm370 */ X struct exec execb; X # endif X register int fd; X*************** X*** 516,521 X char *file; X { X struct exec execb; X register int fd; X register char *cp; X X X--- 539,545 ----- X } magic; X # else /* BSD, COFF pdp-11/ibm370 */ X struct exec execb; X+ # endif X register int fd; X register char *cp; X X*************** X*** 539,544 X printf("%s: cannot open %s\n", name, file); X return(-1); X } X if (read(fd, &execb, sizeof(execb)) == sizeof(execb)) X switch(execb.a_magic) { X case A_MAGIC1: X X--- 563,590 ----- X printf("%s: cannot open %s\n", name, file); X return(-1); X } X+ X+ # ifdef sgi X+ /* if COFF file is shorter than SARMAG this can fail X+ * seems a BIT unlikely! X+ */ X+ if( read(fd, &magic, sizeof(magic)) == sizeof(magic) ) { X+ if( ISCOFF(magic.ma_f.f_magic) ) { X+ printf("%s: %s is an executable program", name, file); X+ goto error1; X+ } X+ if( X+ # ifdef SARMAG X+ strncmp(magic.ma_str,ARMAG,SARMAG) == 0 X+ # else X+ magic.ma_short == ARMAG X+ # endif X+ ) { X+ printf("%s: %s is an archive file", name, file); X+ goto error1; X+ } X+ } /* read ok */ X+ # else X if (read(fd, &execb, sizeof(execb)) == sizeof(execb)) X switch(execb.a_magic) { X case A_MAGIC1: X*************** X*** 554,559 X printf("%s: %s is an archive file", name, file); X goto error1; X } X (void) close(fd); X if (rflag) { X if ((cp = rindex(file, '/')) == NULL) { X X--- 600,606 ----- X printf("%s: %s is an archive file", name, file); X goto error1; X } X+ # endif /* not sgi */ X (void) close(fd); X X if (rflag) { X*************** X*** 555,560 X goto error1; X } X (void) close(fd); X if (rflag) { X if ((cp = rindex(file, '/')) == NULL) { X if (access(".", 2) == 0) X X--- 602,608 ----- X } X # endif /* not sgi */ X (void) close(fd); X+ X if (rflag) { X if ((cp = rindex(file, '/')) == NULL) { X if (access(".", 2) == 0) X*************** X*** 679,684 X return(s); X } X X /*VARARGS1*/ X fatal(msg, a1, a2, a3) X char *msg; X X--- 727,733 ----- X return(s); X } X X+ # ifndef sgi /* sgi uses copy from common.c */ X /*VARARGS1*/ X fatal(msg, a1, a2, a3) X char *msg; X*************** X*** 688,690 X putchar('\n'); X exit(1); X } X X--- 737,740 ----- X putchar('\n'); X exit(1); X } X+ # endif END_OF_lpr.c.diff if test 4879 -ne `wc -c printjob.c.diff <<'END_OF_printjob.c.diff' X*** printjob.c.orig Thu Jun 30 21:00:26 1988 X--- printjob.c Sun Jul 16 02:47:40 1989 X*************** X*** 65,71 X char pxwidth[10] = "-x"; /* page width in pixels */ X char pxlength[10] = "-y"; /* page length in pixels */ X char indent[10] = "-i0"; /* indentation size in characters */ X! char tmpfile[] = "errsXXXXXX"; /* file name for filter output */ X X printjob() X { X X--- 65,71 ----- X char pxwidth[10] = "-x"; /* page width in pixels */ X char pxlength[10] = "-y"; /* page length in pixels */ X char indent[10] = "-i0"; /* indentation size in characters */ X! char TmpFile[] = "errsXXXXXX"; /* file name for filter output */ X X printjob() X { X*************** X*** 92,98 X signal(SIGQUIT, abortpr); X signal(SIGTERM, abortpr); X X! (void) mktemp(tmpfile); X X /* X * uses short form file names X X--- 92,98 ----- X signal(SIGQUIT, abortpr); X signal(SIGTERM, abortpr); X X! (void) mktemp(TmpFile); X X /* X * uses short form file names X*************** X*** 134,139 X if (nitems == 0) /* no work to do */ X exit(0); X if (stb.st_mode & 01) { /* reset queue flag */ X if (fchmod(lfd, stb.st_mode & 0776) < 0) X syslog(LOG_ERR, "%s: %s: %m", printer, LO); X } X X--- 134,142 ----- X if (nitems == 0) /* no work to do */ X exit(0); X if (stb.st_mode & 01) { /* reset queue flag */ X+ # ifdef sgi X+ if (chmod(LO, stb.st_mode & 0776) < 0) X+ # else X if (fchmod(lfd, stb.st_mode & 0776) < 0) X # endif X syslog(LOG_ERR, "%s: %s: %m", printer, LO); X*************** X*** 135,140 X exit(0); X if (stb.st_mode & 01) { /* reset queue flag */ X if (fchmod(lfd, stb.st_mode & 0776) < 0) X syslog(LOG_ERR, "%s: %s: %m", printer, LO); X } X openpr(); /* open printer or remote */ X X--- 138,144 ----- X if (chmod(LO, stb.st_mode & 0776) < 0) X # else X if (fchmod(lfd, stb.st_mode & 0776) < 0) X+ # endif X syslog(LOG_ERR, "%s: %s: %m", printer, LO); X } X openpr(); /* open printer or remote */ X*************** X*** 170,175 X if (stb.st_mode & 01) { X for (free((char *) q); nitems--; free((char *) q)) X q = *qp++; X if (fchmod(lfd, stb.st_mode & 0776) < 0) X syslog(LOG_WARNING, "%s: %s: %m", X printer, LO); X X--- 174,182 ----- X if (stb.st_mode & 01) { X for (free((char *) q); nitems--; free((char *) q)) X q = *qp++; X+ # ifdef sgi X+ if (chmod(LO, stb.st_mode & 0776) < 0) X+ # else X if (fchmod(lfd, stb.st_mode & 0776) < 0) X # endif X syslog(LOG_WARNING, "%s: %s: %m", X*************** X*** 171,176 X for (free((char *) q); nitems--; free((char *) q)) X q = *qp++; X if (fchmod(lfd, stb.st_mode & 0776) < 0) X syslog(LOG_WARNING, "%s: %s: %m", X printer, LO); X break; X X--- 178,184 ----- X if (chmod(LO, stb.st_mode & 0776) < 0) X # else X if (fchmod(lfd, stb.st_mode & 0776) < 0) X+ # endif X syslog(LOG_WARNING, "%s: %s: %m", X printer, LO); X break; X*************** X*** 210,216 X if (TR != NULL) /* output trailer */ X (void) write(ofd, TR, strlen(TR)); X } X! (void) unlink(tmpfile); X exit(0); X } X goto again; X X--- 218,224 ----- X if (TR != NULL) /* output trailer */ X (void) write(ofd, TR, strlen(TR)); X } X! (void) unlink(TmpFile); X exit(0); X } X goto again; X*************** X*** 580,586 X if ((child = dofork(DORETURN)) == 0) { /* child */ X dup2(fi, 0); X dup2(fo, 1); X! n = open(tmpfile, O_WRONLY|O_CREAT|O_TRUNC, 0664); X if (n >= 0) X dup2(n, 2); X for (n = 3; n < NOFILE; n++) X X--- 588,594 ----- X if ((child = dofork(DORETURN)) == 0) { /* child */ X dup2(fi, 0); X dup2(fo, 1); X! n = open(TmpFile, O_WRONLY|O_CREAT|O_TRUNC, 0664); X if (n >= 0) X dup2(n, 2); X for (n = 3; n < NOFILE; n++) X*************** X*** 947,954 X printf("\ncould not be printed without an account on %s\n", host); X break; X case FILTERERR: X! if (stat(tmpfile, &stb) < 0 || stb.st_size == 0 || X! (fp = fopen(tmpfile, "r")) == NULL) { X printf("\nwas printed but had some errors\n"); X break; X } X X--- 955,962 ----- X printf("\ncould not be printed without an account on %s\n", host); X break; X case FILTERERR: X! if (stat(TmpFile, &stb) < 0 || stb.st_size == 0 || X! (fp = fopen(TmpFile, "r")) == NULL) { X printf("\nwas printed but had some errors\n"); X break; X } X*************** X*** 1007,1013 X */ X abortpr() X { X! (void) unlink(tmpfile); X kill(0, SIGINT); X if (ofilter > 0) X kill(ofilter, SIGCONT); X X--- 1015,1021 ----- X */ X abortpr() X { X! (void) unlink(TmpFile); X kill(0, SIGINT); X if (ofilter > 0) X kill(ofilter, SIGCONT); X*************** X*** 1227,1233 X */ X setty() X { X- struct sgttyb ttybuf; X register struct bauds *bp; X X if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) { X X--- 1235,1240 ----- X */ X setty() X { X register struct bauds *bp; X # ifdef sgi X struct termio tt; X*************** X*** 1229,1234 X { X struct sgttyb ttybuf; X register struct bauds *bp; X X if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) { X syslog(LOG_ERR, "%s: ioctl(TIOCEXCL): %m", printer); X X--- 1236,1243 ----- X setty() X { X register struct bauds *bp; X+ # ifdef sgi X+ struct termio tt; X X /* X * set terminal modes; (THIS HAS NOT BEEN TESTED) X*************** X*** 1230,1235 X struct sgttyb ttybuf; X register struct bauds *bp; X X if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) { X syslog(LOG_ERR, "%s: ioctl(TIOCEXCL): %m", printer); X exit(1); X X--- 1239,1290 ----- X # ifdef sgi X struct termio tt; X X+ /* X+ * set terminal modes; (THIS HAS NOT BEEN TESTED) X+ * X+ * should simulate BSD sgtty and local flags (32 in all), to X+ * facilitate use of BSD printcap files. But as we don't use X+ * locally attatched printers on any of our SGI boxes, I just X+ * stuck in the modes set by transcript -- your mileage may X+ * vary. X+ */ X+ X+ if (ioctl(pfd, TCGETA, (char *)&tt) < 0) { X+ syslog(LOG_ERR, "%s: ioctl(TCGETA): %m", printer); X+ exit(1); X+ } X+ X+ tt.c_iflag &= ~(IGNBRK|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IUCLC|IXANY); X+ tt.c_iflag |= BRKINT|INPCK|IXON; X+ X+ tt.c_oflag |= OPOST; X+ X+ tt.c_lflag &= ~(ISIG|ICANON|XCASE); X+ X+ tt.c_cflag &= ~(CSIZE|CLOCAL); X+ tt.c_cflag |= CS8|CREAD; X+ X+ tt.c_cc[VMIN] = 1; X+ tt.c_cc[VTIME] = 4; X+ X+ if (BR > 0) { X+ for (bp = bauds; bp->baud; bp++) X+ if (BR == bp->baud) X+ break; X+ if (!bp->baud) { X+ syslog(LOG_ERR, "%s: illegal baud rate %d", printer, BR); X+ exit(1); X+ } X+ tt.c_cflag &= ~CBAUD; X+ tt.c_cflag |= bp->speed; X+ } X+ if (ioctl(pfd, TCSETA, (char *)&tt) < 0) { X+ syslog(LOG_ERR, "%s: ioctl(TCSETA): %m", printer); X+ exit(1); X+ } X+ # else X+ struct sgttyb ttybuf; X+ X if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) { X syslog(LOG_ERR, "%s: ioctl(TIOCEXCL): %m", printer); X exit(1); X*************** X*** 1274,1279 X exit(1); X } X } X } X X /*VARARGS1*/ X X--- 1329,1335 ----- X exit(1); X } X } X+ # endif X } X X /*VARARGS1*/ END_OF_printjob.c.diff if test 6929 -ne `wc -c recvjob.c.diff <<'END_OF_recvjob.c.diff' X*** recvjob.c.orig Thu Jun 30 21:00:27 1988 X--- recvjob.c Sun Jul 16 01:42:29 1989 X*************** X*** 25,30 X */ X X #include "lp.h" X #include X X char *sp = ""; X X--- 25,33 ----- X */ X X #include "lp.h" X+ #ifdef sgi X+ #include X+ #else X #include X #endif X X*************** X*** 26,31 X X #include "lp.h" X #include X X char *sp = ""; X #define ack() (void) write(1, sp, 1); X X--- 29,35 ----- X #include X #else X #include X+ #endif X X char *sp = ""; X #define ack() (void) write(1, sp, 1); X*************** X*** 33,38 X char tfname[40]; /* tmp copy of cf before linking */ X char dfname[40]; /* data files */ X int minfree; /* keep at least minfree blocks available */ X char *ddev; /* disk device (for checking free space) */ X int dfd; /* file system device descriptor */ X X X--- 37,45 ----- X char tfname[40]; /* tmp copy of cf before linking */ X char dfname[40]; /* data files */ X int minfree; /* keep at least minfree blocks available */ X+ # ifdef sgi X+ dev_t ddev; /* device to check */ X+ # else X char *ddev; /* disk device (for checking free space) */ X int dfd; /* file system device descriptor */ X X*************** X*** 37,42 X int dfd; /* file system device descriptor */ X X char *find_dev(); X X recvjob() X { X X--- 44,50 ----- X int dfd; /* file system device descriptor */ X X char *find_dev(); X+ # endif X X recvjob() X { X*************** X*** 74,79 X } X } else if (stat(SD, &stb) < 0) X frecverr("%s: %s: %m", printer, SD); X minfree = read_number("minfree"); X ddev = find_dev(stb.st_dev, S_IFBLK); X if ((dfd = open(ddev, O_RDONLY)) < 0) X X--- 82,88 ----- X } X } else if (stat(SD, &stb) < 0) X frecverr("%s: %s: %m", printer, SD); X+ X minfree = read_number("minfree"); X # ifdef sgi X ddev = stb.st_dev; X*************** X*** 75,80 X } else if (stat(SD, &stb) < 0) X frecverr("%s: %s: %m", printer, SD); X minfree = read_number("minfree"); X ddev = find_dev(stb.st_dev, S_IFBLK); X if ((dfd = open(ddev, O_RDONLY)) < 0) X syslog(LOG_WARNING, "%s: %s: %m", printer, ddev); X X--- 84,92 ----- X frecverr("%s: %s: %m", printer, SD); X X minfree = read_number("minfree"); X+ # ifdef sgi X+ ddev = stb.st_dev; X+ # else X ddev = find_dev(stb.st_dev, S_IFBLK); X if ((dfd = open(ddev, O_RDONLY)) < 0) X syslog(LOG_WARNING, "%s: %s: %m", printer, ddev); X*************** X*** 78,83 X ddev = find_dev(stb.st_dev, S_IFBLK); X if ((dfd = open(ddev, O_RDONLY)) < 0) X syslog(LOG_WARNING, "%s: %s: %m", printer, ddev); X signal(SIGTERM, rcleanup); X signal(SIGPIPE, rcleanup); X X X--- 90,96 ----- X ddev = find_dev(stb.st_dev, S_IFBLK); X if ((dfd = open(ddev, O_RDONLY)) < 0) X syslog(LOG_WARNING, "%s: %s: %m", printer, ddev); X+ # endif X signal(SIGTERM, rcleanup); X signal(SIGPIPE, rcleanup); X X*************** X*** 85,90 X printjob(); X } X X char * X find_dev(dev, type) X register dev_t dev; X X--- 98,104 ----- X printjob(); X } X X+ # ifndef sgi X char * X find_dev(dev, type) X register dev_t dev; X*************** X*** 114,119 X frecverr("cannot find device %d, %d", major(dev), minor(dev)); X /*NOTREACHED*/ X } X X /* X * Read printer jobs sent by lpd and copy them to the spooling directory. X X--- 128,134 ----- X frecverr("cannot find device %d, %d", major(dev), minor(dev)); X /*NOTREACHED*/ X } X+ # endif X X /* X * Read printer jobs sent by lpd and copy them to the spooling directory. X*************** X*** 259,264 X chksize(size) X int size; X { X struct stat stb; X register char *ddev; X int spacefree; X X--- 274,284 ----- X chksize(size) X int size; X { X+ # ifdef sgi X+ struct ustat us; /* use SVR2 ustat() -- its soo simple! */ X+ if( ustat( ddev, &us ) == 0 && us.f_tfree < minfree ) X+ return(0); X+ # else X struct stat stb; X register char *ddev; X int spacefree; X*************** X*** 272,277 X size = (size + 1023) / 1024; X if (minfree + size > spacefree) X return(0); X return(1); X } X X X--- 292,298 ----- X size = (size + 1023) / 1024; X if (minfree + size > spacefree) X return(0); X+ # endif X return(1); X } X END_OF_recvjob.c.diff if test 4122 -ne `wc -c startdaemon.c.diff <<'END_OF_startdaemon.c.diff' X*** startdaemon.c.orig Thu Jun 30 21:00:28 1988 X--- startdaemon.c Fri Jun 30 15:54:19 1989 X*************** X*** 26,31 X #include X #include X #include X #include X #include "lp.local.h" X X X--- 26,32 ----- X #include X #include X #include X+ #ifndef sgi X #include X #endif X #include "lp.local.h" X*************** X*** 27,32 X #include X #include X #include X #include "lp.local.h" X X startdaemon(printer) X X--- 28,34 ----- X #include X #ifndef sgi X #include X+ #endif X #include "lp.local.h" X X startdaemon(printer) X*************** X*** 32,38 X startdaemon(printer) X char *printer; X { X! struct sockaddr_un sun; X register int s, n; X char buf[BUFSIZ]; X X X--- 34,42 ----- X startdaemon(printer) X char *printer; X { X! # ifndef sgi X! struct sockaddr_in sin; X! # endif X register int s, n; X char buf[BUFSIZ]; X X*************** X*** 36,41 X register int s, n; X char buf[BUFSIZ]; X X s = socket(AF_UNIX, SOCK_STREAM, 0); X if (s < 0) { X perr("socket"); X X--- 40,48 ----- X register int s, n; X char buf[BUFSIZ]; X X+ # ifdef sgi X+ s = getport( "localhost" ); X+ # else X s = socket(AF_UNIX, SOCK_STREAM, 0); X if (s < 0) { X perr("socket"); X*************** X*** 48,53 X (void) close(s); X return(0); X } X (void) sprintf(buf, "\1%s\n", printer); X n = strlen(buf); X if (write(s, buf, n) != n) { X X--- 55,61 ----- X (void) close(s); X return(0); X } X+ # endif X (void) sprintf(buf, "\1%s\n", printer); X n = strlen(buf); X if (write(s, buf, n) != n) { END_OF_startdaemon.c.diff if test 1653 -ne `wc -c Organization: RUC - Roskilde University Center, Denmark Subject: What does the "(null)" in "4D1-3.147 IP6 yrsa ((null))" mean? Message-Id: <64@harald.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL When I logon (using telnet) to a SUN running SunOS it normally displays something like: SunOS UNIX (hostname) I'm setting up an IRIS-4D workstation named yrsa (defined in /etc/sys_id) which shows 4D1-3.147 IP6 yrsa ((null)) instead. What does this "(null)" mean and how do I change it? I'm not running YP if that is of any importance. I have looked in all the manuals, but without success. -- Jan B. Andersen ("SIMULA does it with CLASS") -- Jan B. Andersen ("SIMULA does it with CLASS")   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab14165; 2 Aug 89 15:14 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa13735; 2 Aug 89 15:03 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa13586; 2 Aug 89 14:46 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa03261; 2 Aug 89 14:31 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA05603; Wed, 2 Aug 89 11:31:35 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 2 Aug 89 15:20:17 GMT From: Jim Barton Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: HELP: Low level terminal I/O Message-Id: <39380@sgi.SGI.COM> References: <8908011000.aa22873@VMB.BRL.MIL> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <8908011000.aa22873@VMB.BRL.MIL>, moss@BRL.MIL ("Gary S. Moss", VLD/VMB) writes: > [Jim Barton writes] ... > I don't believe that this is portable, except on System V based machines. > It will work on some BSD-based systems, but not all, especially older > implementations. For example, here is an excerpt from the termio(4V) manual > page on my Sun (Release 3.2): ... > -moss Sorry, I meant portable to other System V machines. Of course this is nonsense on non-conforming implementations. Bezerkely has better ways to do this, and IRIX has picked those up. -- Jim Barton Silicon Graphics Computer Systems "UNIX: Live Free Or Die!" jmb@sgi.sgi.com, sgi!jmb@decwrl.dec.com, ...{decwrl,sun}!sgi!jmb   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa14537; 2 Aug 89 15:25 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa12125; 2 Aug 89 13:44 EDT Received: from adm.brl.mil by VMB.BRL.MIL id aa11863; 2 Aug 89 13:21 EDT Received: from ucbvax.Berkeley.EDU by ADM.BRL.MIL id aa14191; 2 Aug 89 13:16 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA00863; Wed, 2 Aug 89 10:03:33 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 2 Aug 89 16:43:28 GMT From: Paul Connally Organization: University of Colorado, Boulder Subject: 4D/20 manuals Message-Id: <10435@boulder.Colorado.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL What manuals are supposed to come with the basic PI? (just the standard software, no C, no NFS, etc.) Paul Connally paulc@boulder.colorado.edu University of Colorado High Voltage Electron Microscope Lab MCDB - Box 347 "A higher potential for Boulder, CO 80309 better penetration."   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa17340; 2 Aug 89 20:06 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa17225; 2 Aug 89 19:03 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa17218; 2 Aug 89 18:46 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa10632; 2 Aug 89 18:31 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA17954; Wed, 2 Aug 89 15:17:48 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 2 Aug 89 20:39:43 GMT From: psuvm!sml108@psuvax1.cs.psu.edu Organization: Penn State University - Center for Academic Computing Subject: lighting models Message-Id: <89214.163943SML108@PSUVM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Hi, is there any example code out there to illustrate how to use the lighting subroutines on the Iris-4D. I am drawing a set of spheres as a polygon mesh, and would like to properly shade them using a light source, but there seems to be a scarcity of example code on how to do this.... Thanks, Scott Le Grand   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa17779; 2 Aug 89 23:02 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa17751; 2 Aug 89 22:51 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa17722; 2 Aug 89 22:37 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12154; 2 Aug 89 22:15 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA29181; Wed, 2 Aug 89 19:12:31 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 2 Aug 89 21:06:07 GMT From: Vernon Schryver Organization: Silicon Graphics, Inc., Mountain View, CA Subject: Re: What does the "(null)" in "4D1-3.147 IP6 yrsa ((null))" mean? Message-Id: <39408@sgi.SGI.COM> References: <64@harald.UUCP> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL In article <64@harald.UUCP>, jba@harald.ruc.dk (Jan B. Andersen) writes: > ...[telnetd says]... > > 4D1-3.147 IP6 yrsa ((null)) > -- > Jan B. Andersen ("SIMULA does it with CLASS") There was a bug introduced in telnetd some time ago, and fixed not long afterwards which caused this symptom. It was an error in translating stuff to use uname(2)--an extra %s in an sprintf(3) pattern. The problem does not seem evident in 3.1G. Even better, 3.1G identifies itself as "4D1-3.1G." Vernon Schryver Silicon Graphics vjs@sgi.com   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa17834; 2 Aug 89 23:21 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab17779; 2 Aug 89 23:11 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa17767; 2 Aug 89 22:59 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12390; 2 Aug 89 22:46 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA00298; Wed, 2 Aug 89 19:33:41 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 3 Aug 89 01:05:58 GMT From: Daniel A Haug Organization: Lockheed Austin Div. Subject: defining popup menu colors Message-Id: <310@shrike.AUSTIN.LOCKHEED.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL I am having problems with colors in the pop-up menu facility. We have a map-graphics (i.e. color map display) system that uses the normal 12 bitplanes for doing its drawing. However, the application code that I execute in the same window (all the same program) performs pop up calls (e.g. defpup, dopup). The problem is that the color of the menus that pop up are very bizarre. Certainly seems like this map-graphics system is responsible. But, it only happens on our 4D/70, not our personal iris. That is, the exact same program on the personal iris still generates nice black & white menus, but the one running on the 4D/70 generates orange and red menus. I figured that I could override this behaviour by altering the color map in the PUPDRAW overlay. So, I inserted the following code in front of the "defpup" and "dopup" calls. The result was no effect, until I exited the program. Then all of the popups on the windows (e.g. 4-sight menus) were effected by this color-map. What is wrong here? Don't defpup and dopup use the PUPDRAW overlay? If so, how could one screw up the color-map so that my code would not work? I don't have source-code access to this map-graphics package on which my application is running. I don't know what it is doing. Any help or hints are certainly appreciated. ====================== code to override colormap in PUPDRAW mode ======= set_pop_up_colors() { short r,g,b; Colorindex i; drawmode(PUPDRAW); i = 0; r = 0; g = 0; b = 0; mapcolor (i,r,g,b); i = 1; r = 255; g = 0; b = 0; mapcolor (i,r,g,b); i = 2; r = 0; g = 255; b = 0; mapcolor (i,r,g,b); i = 3; r = 0; g = 0; b = 255; mapcolor (i,r,g,b); ... perform defpup and dopup here ... return; } ========================================================================= dan haug -- Internet: haug@austin.lockheed.com UUCP: ut-emx!lad-shrike!aihaug   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa22228; 3 Aug 89 8:58 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa21845; 3 Aug 89 8:47 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa21421; 3 Aug 89 8:31 EDT Received: from NSFNET-RELAY.AC.UK by SMOKE.BRL.MIL id aa16176; 3 Aug 89 7:51 EDT Received: from ean-relay.ac.uk by NSFnet-Relay.AC.UK via Janet with NIFTP id aa04793; 3 Aug 89 12:19 BST Received: from vax.oxford.ac.uk by Ean-Relay.AC.UK via Janet with NIFTP id aa04489; 3 Aug 89 13:13 BST Date: Thu, 3 AUG 89 12:24:36 BST From: HCART%vax.oxford.ac.uk@nsfnet-relay.ac.uk To: INFO-IRIS <@nsfnet-relay.ac.uk,@ean-relay.ac.uk:INFO-IRIS@BRL.MIL> Subject: How do I start accounting? Message-ID: <8908030751.aa16176@SMOKE.BRL.MIL> Can anyone let me know how to start the accounting programs on an Iris 3130? I have RTM, but they seem to be clearer on how one runs the utilities to analyse accounting files than on how the accounting package is actually started. I have made all the directories I think are needed, but when I run /usr/lib/acct/startup, I get accton: cannot setuid, check mode and owner Can anyone give me a pointer to which file(s) accton is probably objecting to at this stage? Thanks. Hugh Cartwright, Physical Chemistry, Oxford.   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa24637; 3 Aug 89 11:23 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa24259; 3 Aug 89 11:02 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa24237; 3 Aug 89 10:48 EDT Received: from aviary.stars.reston.unisys.com by SMOKE.BRL.MIL id aa19383; 3 Aug 89 9:05 EDT Received: by aviary.Stars.Reston.Unisys.COM (4.1/Domain/jpb/2.9) id AA03654; Thu, 3 Aug 89 08:39:02 EDT Date: Thu, 3 Aug 89 08:39:02 EDT From: Fred Lowenstein Message-Id: <8908031239.AA03654@aviary.Stars.Reston.Unisys.COM> To: info-iris@BRL.MIL Subject: GL2 calls for the Intergraph Interpro Has anybody ever implemented the Silicon Graphics GL2 library on an Intergraph Interpro computer??? I would like to port some graphics programs from a Iris 3030 to the Interpro. Maybe somebody out there has created a library that simulates the 3030?? Any information would be appreciated. Thanks in advance, Fred Loewenstein   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa29770; 3 Aug 89 16:10 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa29337; 3 Aug 89 15:46 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa29317; 3 Aug 89 15:36 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa00375; 3 Aug 89 15:16 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA20114; Thu, 3 Aug 89 12:09:30 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 3 Aug 89 17:46:22 GMT From: "Steve S. Roy" Subject: Looking for really fast FFT Message-Id: <9740@phoenix.Princeton.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Has anybody out there written or seen some really fast 1D and 2D Fast Fourier Transform packages for the mips processor in general or for the Iris 4D2XX in particular? I am planning to do a 3D spectral simulation and I'm trying to decide where to run it. If I can get and Iris 2XX to run fast enough I won't bother with supercomputer time. ---------------------------------------------------------------------- Real Name: Steve Roy e-mail: ssr@acm.princeton.edu telephone: (609)452-5384 (office) Address: office: Program of Applied and Computational Mathematics Princeton University Princetion NJ 08544-1000 ----------------------------------------------------------------------   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01978; 3 Aug 89 22:52 EDT Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa01848; 3 Aug 89 22:10 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa01846; 3 Aug 89 22:04 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa05991; 3 Aug 89 21:45 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA10453; Thu, 3 Aug 89 18:36:03 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 4 Aug 89 01:14:55 GMT From: Jason Heirtzler Organization: Boston University Distributed Systems Group Subject: Problems with Exabyte Message-Id: <35820@bu-cs.BU.EDU> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL Is anyone using an Exabyte tape drive from Introl with a multi-processor SGI ? This is supposedly the people that SGI recommends, but it won't work with a multi-processor machine ! When I installed the driver as per their instructions and booted up, the screen hung as soon as the windowing system started. So, I waited (about a month) while they changed their driver (the response I got from the person who wrote the driver was "we never tried that") but still it doesn't work correctly. It's hard to believe that no one tried it with a multi-processor until now.. As it stands right now, we can't read tapes unless we specify the no rewind device (/dev/dk2300Ta) and Introl is waiting for us to send them a copy of the kernel printfs.. The machine in question is an IRIS-4D GTX running 3.1F Any information would be appreciated. Thanks.. Jason Heirtzler ------------------------------------------------------------------------- Jason Heirtzler (617) 353-2780 jdh@bu-it.bu.edu Information Technology Boston University ..!harvard!bu-cs!bu-it!jdh   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ab10858; 4 Aug 89 9:34 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ad09293; 4 Aug 89 9:23 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id ab09178; 4 Aug 89 9:04 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12758; 4 Aug 89 8:52 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22215; Thu, 3 Aug 89 22:50:26 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 3 Aug 89 21:52:18 GMT From: Jim Barton Organization: Silicon Graphics, Inc., Mountain View, CA Subject: BSD "screen" program for the 4D [Part 1/3] Message-Id: <39503@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL "screen" for the IRIS 4D series, Part 1/3 This is a port of the BSD4.3 based "screen" program to the IRIS 4D. It works exactly as described in the man page, except for the "suspend" sequence (detaching works just fine, though). More details are available in the file SGI.README. Screen allows you multiple virtual terminal sessions on the same physical display screen, whether that be a terminal or a window. A group of virtual terminals sessions can be detached from the current display and reattached later, or at a different terminal (as long as it is the same type of terminal). This may also be an interesting example of porting total BSD 4.3 oriented code onto the 4D, for those who are interested. Note that the load average code turns itself on automatically on 3.2 and later versions of IRIX. -- Jim Barton Silicon Graphics Computer Systems "UNIX: Live Free Or Die!" jmb@sgi.sgi.com, sgi!jmb@decwrl.dec.com, ...{decwrl,sun}!sgi!jmb #--------------------------------CUT HERE------------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -rw-r--r-- 1 jmb sys 1815 Aug 3 11:27 Makefile # -r--r--r-- 1 jmb sys 3987 Aug 3 11:24 README # -r--r--r-- 1 jmb sys 2033 Aug 3 11:24 SGI.README # -r--r--r-- 1 jmb sys 36576 Aug 3 11:24 ansi.c # echo 'x - Makefile' if test -f Makefile; then echo 'shar: not overwriting Makefile'; else sed 's/^X//' << '________This_Is_The_END________' > Makefile X# The following options can be set: X# X# -DLOADAV -- your system maintains a load average like 4.3 BSD does X# (an array of three doubles called _avenrun; it is read X# from /dev/kmem; _avenrun is taken from the namelist of X# /vmunix). X# -DSUNLOADAV -- the load average maintained by the kernel is in the X# Sun format (three longs). Set this in addition to X# LOADAV. X# -DGETTTYENT -- your system has the new format /etc/ttys (like 4.3 BSD) X# and the getttyent(3) library functions. X# X# -DUSEBCOPY -- use the bcopy() from the system's C-library. If this X# is set, bcopy must support overlapping source and X# destination. If USEBCOPY is not set, screen uses its X# own version of bcopy. X# X# -DSYSV -- use System V terminal control and such. Does not deal with X# the lack of the select(2) system call, but does get around X# needing UNIX-domain sockets. X# X# -Dsgi -- certain special hacks to make things a bit better on an X# SGI 4D series machine. X# X# You should install as set-uid with owner root, so that it can read/write X# /etc/utmp, read /dev/kmem, and chown/chmod the allocated pseudo-ttys. X XOPTIONS= -DUSEBCOPY -DSYSV -I/usr/include/bsd -DLOADAV -DSUNLOADAV XCFLAGS = -O2 X XCFILES= screen.c ansi.c XOFILES= $(CFILES:.c=.o) X Xdefault: hyper X Xscreen: $(OFILES) X $(CC) $(CFLAGS) -o screen $(OFILES) -ltermcap -lsun -lbsd -lmld -lc_s X Xscreen.o: screen.h X Xansi.o: screen.h X X# X# Following rule runs the maximum optimization against the program X# to get the best performance. X# Xhyper: X $(CC) $(OPTIONS) -O3 screen.c ansi.c -o screen -ltermcap -lsun \ X -lbsd -lmld -lc_s X X.c.o: X $(CC) $(OPTIONS) $(CFLAGS) -c $*.c X Xclean: X rm -f *.[oui] X Xclobber: clean X rm -f screen ________This_Is_The_END________ if test `wc -l < Makefile` -ne 58; then echo 'shar: Makefile was damaged during transit (should have been 58 bytes)' fi fi ; : end of overwriting check echo 'x - README' if test -f README; then echo 'shar: not overwriting README'; else sed 's/^X//' << '________This_Is_The_END________' > README X"screen" is a window manager that allows you to handle several independent Xscreens (UNIX ttys) on a single physical terminal; each screen has its own Xset of processes connected to it (typically interactive shells). Each Xvirtual terminal created by "screen" emulates a DEC VT100 plus several ANSI XX3.64 and ISO 2022 functions (including DEC VT102 features such as line and Xcharacter deletion and insertion). X XSince "screen" uses pseudo-ttys, the select system call, and UNIX-domain Xsockets, it will not run under a system that does not include these Xfeatures of 4.2 and 4.3 BSD UNIX. X XIf you want to get a quick idea how "screen" works but don't want to read Xthe entire manual, do the following: X X - call "screen" without arguments X - wait for the shell prompt; execute some commands X - type ^A ^C (Control-A followed by Control-C) X - wait for the shell prompt; do something in the new window X - type ^A ^A repeatedly to switch between the two windows X - terminate the first shell ("screen" switches to the other window) X - terminate the second shell X XIf you have got "vttest" (the VT100 test program from mod.sources) you Xmay want to run it from within "screen" to verify that it correctly Xemulates a VT100 on your terminal (except for 132 column mode and Xdouble width/height characters, of course). X XBy the way, "screen" can be used to compensate for certain bugs of "real" XVT100 terminals. For instance, our 4.2 BSD version of mille(6) garbles Xthe display on terminals of the VT100 family, but it works quite fine Xwhen it is invoked from within "screen". In addition, "screen" enables Xyou to use EMACS on terminals that are unable to generate Control-S and XControl-Q from the keyboard or that require flow control using Control-S Xand Control-Q. This is the reason why I have an alias like X alias emacs "screen emacs" Xin my .cshrc file. X X XMajor changes between this and the previous release are: X X* "screen" allows you to `detach' the "screen" session from the physical X terminal and resume it at a later point in time (possibly on a X different terminal or in a different login session). X X To get an impression of this functionality do the following: X X - call "screen" and create a couple of windows X - type Control-A Control-D (screen terminates; you are back X in the shell) X - call "screen -r" to resume the detached "screen" X X* "screen" supports multiple character sets and the ISO 2022 control X functions to designate and switch between character sets. X This allows you, for instance, to make use of the VT100 graphics X character set or national character sets X X XBefore typing "make", you should have a look into the Makefile. XIf your system maintains a 4.3-BSD-style load average, add -DLOADAV to Xthe compiler options. If the load average maintained by your system Xis in the Sun format (three longs; not three doubles), set -DSUNLOADAV Xin addition to -DLOADAV. X XIn addition, you must set -DGETTTYENT if your system has the new format X/etc/ttys and the getttyent(3) routines. X XIf the bcopy() from your system's C library supports overlapping Xsource and destination addresses, add -DUSEBCOPY. Otherwise screen Xuses its own (possibly slower) version of bcopy(). If you are in Xdoubt or don't know what bcopy() is, leave the option out. X X"screen" should be granted read and write access to /etc/utmp and, if X-DLOADAV has been specified, read access to /vmunix and /dev/kmem. X"screen" should be installed with set-uid and owner root to enable it Xto correctly change the owner of newly allocated virtual terminals. XFailing to do this (e.g. if you fear a trojan horse) doesn't have any Xmajor disadvantages, except that w(1) and some other utilities may have Xsome problems with the tty files of your virtual terminals. X X XRegards, X Oliver Laumann X Technical University of Berlin, X Communications and Operating Systems Research Group. X X net@tub.BITNET US: pyramid!tub!net Europe: unido!tub!net ________This_Is_The_END________ if test `wc -l < README` -ne 86; then echo 'shar: README was damaged during transit (should have been 86 bytes)' fi fi ; : end of overwriting check echo 'x - SGI.README' if test -f SGI.README; then echo 'shar: not overwriting SGI.README'; else sed 's/^X//' << '________This_Is_The_END________' > SGI.README XBSD 'screen' program for the IRIS 4D X------------------------------------ X XThe version of 'screen' in this directory was ported to the Silicon Graphics X4D series computers for releases 3.1 and later of IRIX. Everything works Xas advertised, except there are some "System V-isms" that change some things. X XI have supplied a tic file for the 'screen' terminal definition. If you Xwant, just run "tic screen.tic" as root and the terminal description will Xbe automatically installed in /usr/lib/terminfo. If you want it somewhere Xelse, set and export the TERMINFO environment variable with a path to a Xdirectory where you wish to keep the terminal descriptions. Remember to Xexport TERMINFO out of your profile to make sure that your local area Xis searched first whenever curses is invoked. An "ansi" terminal description Xshould probably work instead, but it won't be as slick. X XThe suspend command, ^Az, is automatically disabled in pre-3.3 releases Xof IRIX due to a bug in SIGCONT handling. Use the "detach" command (^Ad) Xcommand in this case. Also, the ^At time status line will include the load Xaverage on 3.2 and later systems if the program is setuid-to-root. X XIf you make 'screen' setuid-to-root, then it will update /etc/utmp Xas you create and destroy screens as well. X XTo build the program, simply type 'make' and copy the program into your Xpath somewhere. Each user who uses 'screen' must have a directory in Xtheir home directory called ".screen". This is where 'screen' creates Xthe communication pipes it uses for each session. You should probably Xmake the directory mode 700 for safety, although 'screen' does have Xbuilt in checks against someone else attaching to your screens. X XIf problems arise, send me some mail and I'll try to help you out. But, Xas usual with all free software, there is no warranty that this program, Xas ported, is suitable for any purpose. To the best of my knowledge, Xthere are no bugs. X XJim Barton XSilicon Graphics Computer Systems Xjmb@sgi.sgi.com X XJuly 25, 1989 XMountain View, California ________This_Is_The_END________ if test `wc -l < SGI.README` -ne 42; then echo 'shar: SGI.README was damaged during transit (should have been 42 bytes)' fi fi ; : end of overwriting check echo 'x - ansi.c' if test -f ansi.c; then echo 'shar: not overwriting ansi.c'; else sed 's/^X//' << '________This_Is_The_END________' > ansi.c X/* Copyright (c) 1987,1988 Oliver Laumann, Technical University of Berlin. X * Not derived from licensed software. X * X * Permission is granted to freely use, copy, modify, and redistribute X * this software, provided that no attempt is made to gain profit from it, X * the author is not construed to be liable for any results of using the X * software, alterations are clearly marked as such, and this notice is X * not modified. X */ X Xchar AnsiVersion[] = "ansi 2.0a 19-Oct-88"; X X#include X#include X#include X#include "screen.h" X X#define A_SO 0x1 /* Standout mode */ X#define A_US 0x2 /* Underscore mode */ X#define A_BL 0x4 /* Blinking */ X#define A_BD 0x8 /* Bold mode */ X#define A_DI 0x10 /* Dim mode */ X#define A_RV 0x20 /* Reverse mode */ X#define A_MAX 0x20 X X/* Types of movement used by Goto() */ Xenum move_t { X M_NONE, X M_UP, X M_DO, X M_LE, X M_RI, X M_RW, X M_CR, X}; X X#define EXPENSIVE 1000 X X#define G0 0 X#define G1 1 X#define G2 2 X#define G3 3 X X#define ASCII 0 X Xextern char *getenv(), *tgetstr(), *tgoto(), *malloc(); X Xint rows, cols; Xint status; Xint flowctl; Xchar Term[] = "TERM=screen"; Xchar Termcap[1024]; Xchar *blank; Xchar PC; Xint ISO2022; Xtime_t TimeDisplayed; X Xstatic char tbuf[1024], tentry[1024]; Xstatic char *tp = tentry; Xstatic char *TI, *TE, *BL, *VB, *BC, *CR, *NL, *CL, *IS, *CM; Xstatic char *US, *UE, *SO, *SE, *CE, *CD, *DO, *SR, *SF, *AL; Xstatic char *CS, *DL, *DC, *IC, *IM, *EI, *UP, *ND, *KS, *KE; Xstatic char *MB, *MD, *MH, *MR, *ME, *PO, *PF; Xstatic char *CDC, *CDL, *CAL; Xstatic AM; Xstatic char GlobalAttr, TmpAttr, GlobalCharset, TmpCharset; Xstatic char *OldImage, *OldAttr, *OldFont; Xstatic last_x, last_y; Xstatic struct win *curr; Xstatic display = 1; Xstatic StrCost; Xstatic UPcost, DOcost, LEcost, NDcost, CRcost, IMcost, EIcost; Xstatic tcLineLen = 100; Xstatic char *null; Xstatic StatLen; Xstatic insert; Xstatic keypad; X Xstatic char *KeyCaps[] = { X "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7", "k8", "k9", X "kb", "kd", "kh", "kl", "ko", "kr", "ku", X 0 X}; X X/* X * Altered this string and AddCap below to enable captoinfo on System V X * to generate a terminfo entry. Only get it if you define WANTCAP, X * otherwise don't slow down shell fork, etc., by passing all this mess X * in the environment. X */ X#ifndef SYSV Xstatic char TermcapConst[] = "TERMCAP=\ XSC|screen|VT 100/ANSI X3.64 virtual terminal|\\\n\ X\t:DO=\\E[%dB:LE=\\E[%dD:RI=\\E[%dC:UP=\\E[%dA:bs:bt=\\E[Z:\\\n\ X\t:cd=\\E[J:ce=\\E[K:cl=\\E[2J\\E[H:cm=\\E[%i%d;%dH:ct=\\E[3g:\\\n\ X\t:do=\\E[B:nd=\\E[C:pt:rc=\\E8:rs=\\Ec:sc=\\E7:st=\\EH:up=\\E[A:le=^H:"; X#else X#ifdef WANTCAP Xstatic char TermcapConst[] = "TERMCAP=\ XSC|screen|VT 100/ANSI X3.64 virtual terminal|\ X:DO=\\E[%dB:LE=\\E[%dD:RI=\\E[%dC:UP=\\E[%dA:bs:bt=\\E[Z:\ X:cd=\\E[J:ce=\\E[K:cl=\\E[2J\\E[H:cm=\\E[%i%d;%dH:ct=\\E[3g:\ X:do=\\E[B:nd=\\E[C:pt:rc=\\E8:rs=\\Ec:sc=\\E7:st=\\EH:up=\\E[A:le=^H:"; X#else Xstatic char TermcapConst[] = "X=Y"; X#endif X#endif X XInitTerm () { X register char *s; X X if ((s = getenv ("TERM")) == 0) X Msg (0, "No TERM in environment."); X if (tgetent (tbuf, s) != 1) X Msg (0, "Cannot find termcap entry for %s.", s); X cols = tgetnum ("co"); X rows = tgetnum ("li"); X if (cols <= 0) X cols = 80; X if (rows <= 0) X rows = 24; X if (tgetflag ("hc")) X Msg (0, "You can't run screen on a hardcopy terminal."); X if (tgetflag ("os")) X Msg (0, "You can't run screen on a terminal that overstrikes."); X if (tgetflag ("ns")) X Msg (0, "Terminal must support scrolling."); X if (!(CL = tgetstr ("cl", &tp))) X Msg (0, "Clear screen capability required."); X if (!(CM = tgetstr ("cm", &tp))) X Msg (0, "Addressable cursor capability required."); X if (s = tgetstr ("ps", &tp)) X PC = s[0]; X flowctl = !tgetflag ("NF"); X AM = tgetflag ("am"); X if (tgetflag ("LP")) X AM = 0; X TI = tgetstr ("ti", &tp); X TE = tgetstr ("te", &tp); X if (!(BL = tgetstr ("bl", &tp))) X BL = "\007"; X VB = tgetstr ("vb", &tp); X if (!(BC = tgetstr ("bc", &tp))) { X if (tgetflag ("bs")) X BC = "\b"; X else X BC = tgetstr ("le", &tp); X } X if (!(CR = tgetstr ("cr", &tp))) X CR = "\r"; X if (!(NL = tgetstr ("nl", &tp))) X NL = "\n"; X IS = tgetstr ("is", &tp); X if (tgetnum ("sg") <= 0) { X US = tgetstr ("us", &tp); X UE = tgetstr ("ue", &tp); X SO = tgetstr ("so", &tp); X SE = tgetstr ("se", &tp); X MB = tgetstr ("mb", &tp); X MD = tgetstr ("md", &tp); X MH = tgetstr ("mh", &tp); X MR = tgetstr ("mr", &tp); X ME = tgetstr ("me", &tp); X /* X * Does ME also reverse the effect of SO and/or US? This is not X * clearly specified by the termcap manual. X * Anyway, we should at least look whether ME and SE/UE are equal: X */ X if (SE && UE && ME && (strcmp (SE, UE) == 0 || strcmp (ME, UE) == 0)) X UE = 0; X if (SE && ME && strcmp (SE, ME) == 0) X SE = 0; X } X CE = tgetstr ("ce", &tp); X CD = tgetstr ("cd", &tp); X if (!(DO = tgetstr ("do", &tp))) X DO = NL; X UP = tgetstr ("up", &tp); X ND = tgetstr ("nd", &tp); X SR = tgetstr ("sr", &tp); X if (!(SF = tgetstr ("sf", &tp))) X SF = NL; X AL = tgetstr ("al", &tp); X DL = tgetstr ("dl", &tp); X CS = tgetstr ("cs", &tp); X DC = tgetstr ("dc", &tp); X IC = tgetstr ("ic", &tp); X CDC = tgetstr ("DC", &tp); X CDL = tgetstr ("DL", &tp); X CAL = tgetstr ("AL", &tp); X IM = tgetstr ("im", &tp); X EI = tgetstr ("ei", &tp); X if (tgetflag ("in")) X IC = IM = 0; X if (IC && IC[0] == '\0') X IC = 0; X if (IM && IM[0] == '\0') X IM = 0; X if (EI && EI[0] == '\0') X EI = 0; X KS = tgetstr ("ks", &tp); X KE = tgetstr ("ke", &tp); X ISO2022 = tgetflag ("G0"); X PO = tgetstr ("po", &tp); X if (!(PF = tgetstr ("pf", &tp))) X PO = 0; X blank = malloc (cols); X null = malloc (cols); X OldImage = malloc (cols); X OldAttr = malloc (cols); X OldFont = malloc (cols); X if (!(blank && null && OldImage && OldAttr && OldFont)) X Msg (0, "Out of memory."); X MakeBlankLine (blank, cols); X bzero (null, cols); X UPcost = CalcCost (UP); X DOcost = CalcCost (DO); X LEcost = CalcCost (BC); X NDcost = CalcCost (ND); X CRcost = CalcCost (CR); X IMcost = CalcCost (IM); X EIcost = CalcCost (EI); X PutStr (IS); X PutStr (TI); X PutStr (CL); X} X XFinitTerm () { X PutStr (TE); X PutStr (IS); X} X Xstatic AddCap (s) char *s; { X register n; X X#ifdef WANTCAP X#ifndef SYSV X if (tcLineLen + (n = strlen (s)) > 55) { X strcat (Termcap, "\\\n\t:"); X tcLineLen = 0; X } X#endif X strcat (Termcap, s); X tcLineLen += n; X#endif X} X Xchar *MakeTermcap (aflag) { X char buf[1024]; X register char **pp, *p; X X strcpy (Termcap, TermcapConst); X sprintf (buf, "li#%d:co#%d:", rows, cols); X AddCap (buf); X if (VB) X AddCap ("vb=\\E[?5h\\E[?5l:"); X if (US) { X AddCap ("us=\\E[4m:"); X AddCap ("ue=\\E[24m:"); X } X if (SO) { X AddCap ("so=\\E[3m:"); X AddCap ("se=\\E[23m:"); X } X if (MB) X AddCap ("mb=\\E[5m:"); X if (MD) X AddCap ("md=\\E[1m:"); X if (MH) X AddCap ("mh=\\E[2m:"); X if (MR) X AddCap ("mr=\\E[7m:"); X if (MB || MD || MH || MR) X AddCap ("me=\\E[0m:"); X if ((CS && SR) || AL || CAL || aflag) { X AddCap ("sr=\\EM:"); X AddCap ("al=\\E[L:"); X AddCap ("AL=\\E[%dL:"); X } X if (CS || DL || CDL || aflag) { X AddCap ("dl=\\E[M:"); X AddCap ("DL=\\E[%dM:"); X } X if (CS) X AddCap ("cs=\\E[%i%d;%dr:"); X if (DC || CDC || aflag) { X AddCap ("dc=\\E[P:"); X AddCap ("DC=\\E[%dP:"); X } X if (IC || IM || aflag) { X AddCap ("im=\\E[4h:"); X AddCap ("ei=\\E[4l:"); X AddCap ("ic=:"); X AddCap ("IC=\\E[%d@:"); X } X if (KS) X AddCap ("ks=\\E=:"); X if (KE) X AddCap ("ke=\\E>:"); X if (ISO2022) X AddCap ("G0:"); X if (PO) { X AddCap ("po=\\E[5i:"); X AddCap ("pf=\\E[4i:"); X } X for (pp = KeyCaps; *pp; ++pp) X if (p = tgetstr (*pp, &tp)) { X MakeString (*pp, buf, p); X AddCap (buf); X } X return Termcap; X} X Xstatic MakeString (cap, buf, s) char *cap, *buf; register char *s; { X register char *p = buf; X register unsigned c; X X *p++ = *cap++; *p++ = *cap; *p++ = '='; X while (c = *s++) { X switch (c) { X case '\033': X *p++ = '\\'; *p++ = 'E'; break; X case ':': X sprintf (p, "\\072"); p += 4; break; X case '^': case '\\': X *p++ = '\\'; *p++ = c; break; X default: X if (c >= 200) { X sprintf (p, "\\%03o", c & 0377); p += 4; X } else if (c < ' ') { X *p++ = '^'; *p++ = c + '@'; X } else *p++ = c; X } X } X *p++ = ':'; *p = '\0'; X} X XActivate (wp) struct win *wp; { X RemoveStatus (wp); X curr = wp; X display = 1; X NewRendition (GlobalAttr, curr->LocalAttr); X GlobalAttr = curr->LocalAttr; X NewCharset (GlobalCharset, curr->charsets[curr->LocalCharset]); X GlobalCharset = curr->charsets[curr->LocalCharset]; X if (CS) X PutStr (tgoto (CS, curr->bot, curr->top)); X Redisplay (); X KeypadMode (curr->keypad); X} X XResetScreen (p) register struct win *p; { X register i; X X bzero (p->tabs, cols); X for (i = 8; i < cols; i += 8) X p->tabs[i] = 1; X p->wrap = 1; X p->origin = 0; X p->insert = 0; X p->vbwait = 0; X p->keypad = 0; X p->top = 0; X p->bot = rows - 1; X p->saved = 0; X p->LocalAttr = 0; X p->x = p->y = 0; X p->state = LIT; X p->StringType = NONE; X p->ss = 0; X p->LocalCharset = G0; X for (i = G0; i <= G3; i++) X p->charsets[i] = ASCII; X} X XWriteString (wp, buf, len) struct win *wp; register char *buf; { X register c, intermediate = 0; X X if (!len) X return; X curr = wp; X display = curr->active; X if (display) X RemoveStatus (wp); X do { X c = *buf++; X if (c == '\0' || c == '\177') X continue; XNextChar: X switch (curr->state) { X case PRIN: X switch (c) { X case '\033': X curr->state = PRINESC; break; X default: X PrintChar (c); X } X break; X case PRINESC: X switch (c) { X case '[': X curr->state = PRINCSI; break; X default: X PrintChar ('\033'); PrintChar (c); X curr->state = PRIN; X } X break; X case PRINCSI: X switch (c) { X case '4': X curr->state = PRIN4; break; X default: X PrintChar ('\033'); PrintChar ('['); PrintChar (c); X curr->state = PRIN; X } X break; X case PRIN4: X switch (c) { X case 'i': X curr->state = LIT; X PrintFlush (); X break; X default: X PrintChar ('\033'); PrintChar ('['); PrintChar ('4'); X PrintChar (c); X curr->state = PRIN; X } X break; X case TERM: X switch (c) { X case '\\': X curr->state = LIT; X *(curr->stringp) = '\0'; X if (curr->StringType == PM && display) { X MakeStatus (curr->string, curr); X if (status && len > 1) { X curr->outlen = len-1; X bcopy (buf, curr->outbuf, curr->outlen); X return; X } X } X break; X default: X curr->state = STR; X AddChar ('\033'); X AddChar (c); X } X break; X case STR: X switch (c) { X case '\0': X break; X case '\033': X curr->state = TERM; break; X default: X AddChar (c); X } X break; X case ESC: X switch (c) { X case '[': X curr->NumArgs = 0; X intermediate = 0; X bzero ((char *)curr->args, MAXARGS * sizeof (int)); X bzero (curr->GotArg, MAXARGS); X curr->state = CSI; X break; X case ']': X StartString (OSC); break; X case '_': X StartString (APC); break; X case 'P': X StartString (DCS); break; X case '^': X StartString (PM); break; X default: X if (Special (c)) X break; X if (c >= ' ' && c <= '/') { X intermediate = intermediate ? -1 : c; X } else if (c >= '0' && c <= '~') { X DoESC (c, intermediate); X curr->state = LIT; X } else { X curr->state = LIT; X goto NextChar; X } X } X break; X case CSI: X switch (c) { X case '0': case '1': case '2': case '3': case '4': X case '5': case '6': case '7': case '8': case '9': X if (curr->NumArgs < MAXARGS) { X curr->args[curr->NumArgs] = X 10 * curr->args[curr->NumArgs] + c - '0'; X curr->GotArg[curr->NumArgs] = 1; X } X break; X case ';': case ':': X curr->NumArgs++; break; X default: X if (Special (c)) X break; X if (c >= '@' && c <= '~') { X curr->NumArgs++; X DoCSI (c, intermediate); X if (curr->state != PRIN) X curr->state = LIT; X } else if ((c >= ' ' && c <= '/') || (c >= '<' && c <= '?')) { X intermediate = intermediate ? -1 : c; X } else { X curr->state = LIT; X goto NextChar; X } X } X break; X default: X if (!Special (c)) { X if (c == '\033') { X intermediate = 0; X curr->state = ESC; X } else if (c < ' ') { X break; X } else { X if (curr->ss) X NewCharset (GlobalCharset, curr->charsets[curr->ss]); X if (curr->x < cols-1) { X if (curr->insert) { X InsertAChar (c); X } else { X if (display) X putchar (c); X SetChar (c); X } X curr->x++; X } else if (curr->x == cols-1) { X SetChar (c); X if (!(AM && curr->y == curr->bot)) { X if (display) X putchar (c); X Goto (-1, -1, curr->y, curr->x); X } X curr->x++; X } else { X if (curr->wrap) { X Return (); X LineFeed (); X if (curr->insert) { X InsertAChar (c); X } else { X if (display) X putchar (c); X SetChar (c); X } X curr->x = 1; X } else curr->x = cols; X } X if (curr->ss) { X NewCharset (curr->charsets[curr->ss], GlobalCharset); X curr->ss = 0; X } X } X } X } X } while (--len); X curr->outlen = 0; X if (curr->state == PRIN) X PrintFlush (); X} X Xstatic Special (c) register c; { X switch (c) { X case '\b': X BackSpace (); return 1; X case '\r': X Return (); return 1; X case '\n': X LineFeed (); return 1; X case '\007': X PutStr (BL); X if (!display) X curr->bell = 1; X return 1; X case '\t': X ForwardTab (); return 1; X case '\017': /* SI */ X MapCharset (G0); return 1; X case '\016': /* SO */ X MapCharset (G1); return 1; X } X return 0; X} X Xstatic DoESC (c, intermediate) { X switch (intermediate) { X case 0: X switch (c) { X case 'E': X Return (); X LineFeed (); X break; X case 'D': X LineFeed (); X break; X case 'M': X ReverseLineFeed (); X break; X case 'H': X curr->tabs[curr->x] = 1; X break; X case '7': X SaveCursor (); X break; X case '8': X RestoreCursor (); X break; X case 'c': X ClearScreen (); X Goto (curr->y, curr->x, 0, 0); X NewRendition (GlobalAttr, 0); X SetRendition (0); X NewCharset (GlobalCharset, ASCII); X GlobalCharset = ASCII; X if (curr->insert) X InsertMode (0); X if (curr->keypad) X KeypadMode (0); X if (CS) X PutStr (tgoto (CS, rows-1, 0)); X ResetScreen (curr); X break; X case '=': X KeypadMode (1); X curr->keypad = 1; X break; X case '>': X KeypadMode (0); X curr->keypad = 0; X break; X case 'n': /* LS2 */ X MapCharset (G2); break; X case 'o': /* LS3 */ X MapCharset (G3); break; X case 'N': /* SS2 */ X if (GlobalCharset == curr->charsets[G2]) X curr->ss = 0; X else X curr->ss = G2; X break; X case 'O': /* SS3 */ X if (GlobalCharset == curr->charsets[G3]) X curr->ss = 0; X else X curr->ss = G3; X break; X } X break; X case '#': X switch (c) { X case '8': X FillWithEs (); X break; X } X break; X case '(': X DesignateCharset (c, G0); break; X case ')': X DesignateCharset (c, G1); break; X case '*': X DesignateCharset (c, G2); break; X case '+': X DesignateCharset (c, G3); break; X } X} X Xstatic DoCSI (c, intermediate) { X register i, a1 = curr->args[0], a2 = curr->args[1]; X X if (curr->NumArgs >= MAXARGS) X curr->NumArgs = MAXARGS; X for (i = 0; i < curr->NumArgs; ++i) X if (curr->args[i] == 0) X curr->GotArg[i] = 0; X switch (intermediate) { X case 0: X switch (c) { X case 'H': case 'f': X if (!curr->GotArg[0]) a1 = 1; X if (!curr->GotArg[1]) a2 = 1; X if (curr->origin) X a1 += curr->top; X if (a1 < 1) X a1 = 1; X if (a1 > rows) X a1 = rows; X if (a2 < 1) X a2 = 1; X if (a2 > cols) X a2 = cols; X a1--; a2--; X Goto (curr->y, curr->x, a1, a2); X curr->y = a1; X curr->x = a2; X break; X case 'J': X if (!curr->GotArg[0] || a1 < 0 || a1 > 2) X a1 = 0; X switch (a1) { X case 0: X ClearToEOS (); break; X case 1: X ClearFromBOS (); break; X case 2: X ClearScreen (); X Goto (0, 0, curr->y, curr->x); X break; X } X break; X case 'K': X if (!curr->GotArg[0] || a1 < 0 || a1 > 2) X a1 %= 3; X switch (a1) { X case 0: X ClearToEOL (); break; X case 1: X ClearFromBOL (); break; X case 2: X ClearLine (); break; X } X break; X case 'A': X CursorUp (curr->GotArg[0] ? a1 : 1); X break; X case 'B': X CursorDown (curr->GotArg[0] ? a1 : 1); X break; X case 'C': X CursorRight (curr->GotArg[0] ? a1 : 1); X break; X case 'D': X CursorLeft (curr->GotArg[0] ? a1 : 1); X break; X case 'm': X SelectRendition (); X break; X case 'g': X if (!curr->GotArg[0] || a1 == 0) X curr->tabs[curr->x] = 0; X else if (a1 == 3) X bzero (curr->tabs, cols); X break; X case 'r': X if (!CS) X break; X if (!curr->GotArg[0]) a1 = 1; X if (!curr->GotArg[1]) a2 = rows; X if (a1 < 1 || a2 > rows || a1 >= a2) X break; X curr->top = a1-1; X curr->bot = a2-1; X PutStr (tgoto (CS, curr->bot, curr->top)); X if (curr->origin) { X Goto (-1, -1, curr->top, 0); X curr->y = curr->top; X curr->x = 0; X } else { X Goto (-1, -1, 0, 0); X curr->y = curr->x = 0; X } X break; X case 'I': X if (!curr->GotArg[0]) a1 = 1; X while (a1--) X ForwardTab (); X break; X case 'Z': X if (!curr->GotArg[0]) a1 = 1; X while (a1--) X BackwardTab (); X break; X case 'L': X InsertLine (curr->GotArg[0] ? a1 : 1); X break; X case 'M': X DeleteLine (curr->GotArg[0] ? a1 : 1); X break; X case 'P': X DeleteChar (curr->GotArg[0] ? a1 : 1); X break; X case '@': X InsertChar (curr->GotArg[0] ? a1 : 1); X break; X case 'h': X SetMode (1); X break; X case 'l': X SetMode (0); X break; X case 'i': X if (PO && curr->GotArg[0] && a1 == 5) { X curr->stringp = curr->string; X curr->state = PRIN; X } X break; X } X break; X case '?': X if (c != 'h' && c != 'l') X break; X if (!curr->GotArg[0]) X break; X i = (c == 'h'); X if (a1 == 5) { X if (i) { X curr->vbwait = 1; X } else { X if (curr->vbwait) X PutStr (VB); X curr->vbwait = 0; X } X } else if (a1 == 6) { X curr->origin = i; X if (curr->origin) { X Goto (curr->y, curr->x, curr->top, 0); X curr->y = curr->top; X curr->x = 0; X } else { X Goto (curr->y, curr->x, 0, 0); X curr->y = curr->x = 0; X } X } else if (a1 == 7) { X curr->wrap = i; X } X break; X } X} X Xstatic PutChar (c) { X putchar (c); X} X Xstatic PutStr (s) char *s; { X if (display && s) X tputs (s, 1, PutChar); X} X Xstatic CPutStr (s, c) char *s; { X if (display && s) X tputs (tgoto (s, 0, c), 1, PutChar); /* XXX */ X} X Xstatic SetChar (c) register c; { X register struct win *p = curr; X X p->image[p->y][p->x] = c; X p->attr[p->y][p->x] = p->LocalAttr; X p->font[p->y][p->x] = p->charsets[p->ss ? p->ss : p->LocalCharset]; X} X Xstatic StartString (type) enum string_t type; { X curr->StringType = type; X curr->stringp = curr->string; X curr->state = STR; X} X Xstatic AddChar (c) { X if (curr->stringp >= curr->string+MAXSTR-1) X curr->state = LIT; X else X *(curr->stringp)++ = c; X} X Xstatic PrintChar (c) { X if (curr->stringp >= curr->string+MAXSTR-1) X PrintFlush (); X else X *(curr->stringp)++ = c; X} X Xstatic PrintFlush () { X if (curr->stringp > curr->string) { X tputs (PO, 1, PutChar); X (void) fflush (stdout); X (void) write (1, curr->string, curr->stringp - curr->string); X tputs (PF, 1, PutChar); X (void) fflush (stdout); X curr->stringp = curr->string; X } X} X X/* Insert mode is a toggle on some terminals, so we need this hack: X */ Xstatic InsertMode (on) { X if (on) { X if (!insert) X PutStr (IM); X } else if (insert) X PutStr (EI); X insert = on; X} X X/* ...and maybe keypad application mode is a toggle, too: X */ Xstatic KeypadMode (on) { X if (on) { X if (!keypad) X PutStr (KS); X } else if (keypad) X PutStr (KE); X keypad = on; X} X Xstatic DesignateCharset (c, n) { X curr->ss = 0; X if (c == 'B') X c = ASCII; X if (curr->charsets[n] != c) { X curr->charsets[n] = c; X if (curr->LocalCharset == n) { X NewCharset (GlobalCharset, c); X GlobalCharset = c; X } X } X} X Xstatic MapCharset (n) { X curr->ss = 0; X if (curr->LocalCharset != n) { X curr->LocalCharset = n; X NewCharset (GlobalCharset, curr->charsets[n]); X GlobalCharset = curr->charsets[n]; X } X} X Xstatic NewCharset (old, new) { X char buf[8]; X X if (old == new) X return; X if (ISO2022) { X sprintf (buf, "\033(%c", new == ASCII ? 'B' : new); X PutStr (buf); X } X} X Xstatic SaveCursor () { X curr->saved = 1; X curr->Saved_x = curr->x; X curr->Saved_y = curr->y; X curr->SavedLocalAttr = curr->LocalAttr; X curr->SavedLocalCharset = curr->LocalCharset; X bcopy ((char *)curr->charsets, (char *)curr->SavedCharsets, X 4 * sizeof (int)); X} X Xstatic RestoreCursor () { X if (curr->saved) { X curr->LocalAttr = curr->SavedLocalAttr; X NewRendition (GlobalAttr, curr->LocalAttr); X GlobalAttr = curr->LocalAttr; X bcopy ((char *)curr->SavedCharsets, (char *)curr->charsets, X 4 * sizeof (int)); X curr->LocalCharset = curr->SavedLocalCharset; X NewCharset (GlobalCharset, curr->charsets[curr->LocalCharset]); X GlobalCharset = curr->charsets[curr->LocalCharset]; X Goto (curr->y, curr->x, curr->Saved_y, curr->Saved_x); X curr->x = curr->Saved_x; X curr->y = curr->Saved_y; X } X} X X/*ARGSUSED*/ Xstatic CountChars (c) { X StrCost++; X} X Xstatic CalcCost (s) register char *s; { X if (s) { X StrCost = 0; X tputs (s, 1, CountChars); X return StrCost; X } else return EXPENSIVE; X} X Xstatic Goto (y1, x1, y2, x2) { X register dy, dx; X register cost = 0; X register char *s; X int CMcost, n, m; X enum move_t xm = M_NONE, ym = M_NONE; X X if (!display) X return; X if (x1 == cols || x2 == cols) { X if (x2 == cols) --x2; X goto DoCM; X } X dx = x2 - x1; X dy = y2 - y1; X if (dy == 0 && dx == 0) X return; X if (y1 == -1 || x1 == -1 || y2 >= curr->bot || y2 <= curr->top) { XDoCM: X PutStr (tgoto (CM, x2, y2)); X return; X } X CMcost = CalcCost (tgoto (CM, x2, y2)); X if (dx > 0) { X if ((n = RewriteCost (y1, x1, x2)) < (m = dx * NDcost)) { X cost = n; X xm = M_RW; X } else { X cost = m; X xm = M_RI; X } X } else if (dx < 0) { X cost = -dx * LEcost; X xm = M_LE; X } X if (dx && (n = RewriteCost (y1, 0, x2) + CRcost) < cost) { X cost = n; X xm = M_CR; X } X if (cost >= CMcost) X goto DoCM; X if (dy > 0) { X cost += dy * DOcost; X ym = M_DO; X } else if (dy < 0) { X cost += -dy * UPcost; X ym = M_UP; X } X if (cost >= CMcost) X goto DoCM; X if (xm != M_NONE) { X if (xm == M_LE || xm == M_RI) { X if (xm == M_LE) { X s = BC; dx = -dx; X } else s = ND; X while (dx-- > 0) X PutStr (s); X } else { X if (xm == M_CR) { X PutStr (CR); X x1 = 0; X } X if (x1 < x2) { X if (curr->insert) X InsertMode (0); X for (s = curr->image[y1]+x1; x1 < x2; x1++, s++) X putchar (*s); X if (curr->insert) X InsertMode (1); X } X } X } X if (ym != M_NONE) { X if (ym == M_UP) { X s = UP; dy = -dy; X } else s = DO; X while (dy-- > 0) X PutStr (s); X } X} X Xstatic RewriteCost (y, x1, x2) { X register cost, dx; X register char *p = curr->attr[y]+x1, *f = curr->font[y]+x1; X X if (AM && y == rows-1 && x2 == cols-1) X return EXPENSIVE; X cost = dx = x2 - x1; X if (dx == 0) X return 0; X if (curr->insert) X cost += EIcost + IMcost; X do { X if (*p++ != GlobalAttr || *f++ != GlobalCharset) X return EXPENSIVE; X } while (--dx); X return cost; X} X Xstatic BackSpace () { X if (curr->x > 0) { X if (curr->x < cols) { X if (BC) X PutStr (BC); X else X Goto (curr->y, curr->x, curr->y, curr->x-1); X } X curr->x--; X } X} X Xstatic Return () { X if (curr->x > 0) { X curr->x = 0; X PutStr (CR); X } X} X Xstatic LineFeed () { X if (curr->y == curr->bot) { X ScrollUpMap (curr->image); X ScrollUpMap (curr->attr); X ScrollUpMap (curr->font); X } else if (curr->y < rows-1) { X curr->y++; X } X PutStr (NL); X} X Xstatic ReverseLineFeed () { X if (curr->y == curr->top) { X ScrollDownMap (curr->image); X ScrollDownMap (curr->attr); X ScrollDownMap (curr->font); X if (SR) { X PutStr (SR); X } else if (AL) { X Goto (curr->top, curr->x, curr->top, 0); X PutStr (AL); X Goto (curr->top, 0, curr->top, curr->x); X } else Redisplay (); X } else if (curr->y > 0) { X CursorUp (1); X } X} X Xstatic InsertAChar (c) { X register y = curr->y, x = curr->x; X X if (x == cols) X x--; X bcopy (curr->image[y], OldImage, cols); X bcopy (curr->attr[y], OldAttr, cols); X bcopy (curr->font[y], OldFont, cols); X bcopy (curr->image[y]+x, curr->image[y]+x+1, cols-x-1); X bcopy (curr->attr[y]+x, curr->attr[y]+x+1, cols-x-1); X bcopy (curr->font[y]+x, curr->font[y]+x+1, cols-x-1); X SetChar (c); X if (!display) X return; X if (IC || IM) { X if (!curr->insert) X InsertMode (1); X PutStr (IC); X putchar (c); X if (!curr->insert) X InsertMode (0); X } else { X RedisplayLine (OldImage, OldAttr, OldFont, y, x, cols-1); X ++x; X Goto (y, last_x, y, x); X } X} X Xstatic InsertChar (n) { X register i, y = curr->y, x = curr->x; X X if (x == cols) X return; X bcopy (curr->image[y], OldImage, cols); X bcopy (curr->attr[y], OldAttr, cols); X bcopy (curr->font[y], OldFont, cols); X if (n > cols-x) X n = cols-x; X bcopy (curr->image[y]+x, curr->image[y]+x+n, cols-x-n); X bcopy (curr->attr[y]+x, curr->attr[y]+x+n, cols-x-n); X bcopy (curr->font[y]+x, curr->font[y]+x+n, cols-x-n); X ClearInLine (0, y, x, x+n-1); X if (!display) X return; X if (IC || IM) { X if (!curr->insert) X InsertMode (1); X for (i = n; i; i--) { X PutStr (IC); X putchar (' '); X } X if (!curr->insert) X InsertMode (0); X Goto (y, x+n, y, x); X } else { X RedisplayLine (OldImage, OldAttr, OldFont, y, x, cols-1); X Goto (y, last_x, y, x); X } X} X Xstatic DeleteChar (n) { X register i, y = curr->y, x = curr->x; X X if (x == cols) X return; X bcopy (curr->image[y], OldImage, cols); X bcopy (curr->attr[y], OldAttr, cols); X bcopy (curr->font[y], OldFont, cols); X if (n > cols-x) X n = cols-x; X bcopy (curr->image[y]+x+n, curr->image[y]+x, cols-x-n); X bcopy (curr->attr[y]+x+n, curr->attr[y]+x, cols-x-n); X bcopy (curr->font[y]+x+n, curr->font[y]+x, cols-x-n); X ClearInLine (0, y, cols-n, cols-1); X if (!display) X return; X if (CDC && !(n == 1 && DC)) { X CPutStr (CDC, n); X } else if (DC) { X for (i = n; i; i--) X PutStr (DC); X } else { X RedisplayLine (OldImage, OldAttr, OldFont, y, x, cols-1); X Goto (y, last_x, y, x); X } X} X Xstatic DeleteLine (n) { X register i, old = curr->top; X X if (n > curr->bot-curr->y+1) X n = curr->bot-curr->y+1; X curr->top = curr->y; X for (i = n; i; i--) { X ScrollUpMap (curr->image); X ScrollUpMap (curr->attr); X ScrollUpMap (curr->font); X } X if (DL || CDL) { X Goto (curr->y, curr->x, curr->y, 0); X if (CDL && !(n == 1 && DL)) { X CPutStr (CDL, n); X } else { X for (i = n; i; i--) X PutStr (DL); X } X Goto (curr->y, 0, curr->y, curr->x); X } else if (CS) { X PutStr (tgoto (CS, curr->bot, curr->top)); X Goto (-1, -1, curr->bot, 0); X for (i = n; i; i--) X PutStr (SF); X PutStr (tgoto (CS, curr->bot, old)); X Goto (-1, -1, curr->y, curr->x); X } else Redisplay (); X curr->top = old; X} X Xstatic InsertLine (n) { X register i, old = curr->top; X X if (n > curr->bot-curr->y+1) X n = curr->bot-curr->y+1; X curr->top = curr->y; X for (i = n; i; i--) { X ScrollDownMap (curr->image); X ScrollDownMap (curr->attr); X ScrollDownMap (curr->font); X } X if (AL || CAL) { X Goto (curr->y, curr->x, curr->y, 0); X if (CAL && !(n == 1 && AL)) { X CPutStr (CAL, n); X } else { X for (i = n; i; i--) X PutStr (AL); X } X Goto (curr->y, 0, curr->y, curr->x); X } else if (CS && SR) { X PutStr (tgoto (CS, curr->bot, curr->top)); X Goto (-1, -1, curr->y, 0); X for (i = n; i; i--) X PutStr (SR); X PutStr (tgoto (CS, curr->bot, old)); X Goto (-1, -1, curr->y, curr->x); X } else Redisplay (); X curr->top = old; X} X Xstatic ScrollUpMap (pp) char **pp; { X register char *tmp = pp[curr->top]; X X bcopy ((char *)(pp+curr->top+1), (char *)(pp+curr->top), X (curr->bot-curr->top) * sizeof (char *)); X if (pp == curr->image) X bclear (tmp, cols); X else X bzero (tmp, cols); X pp[curr->bot] = tmp; X} X Xstatic ScrollDownMap (pp) char **pp; { X register char *tmp = pp[curr->bot]; X X bcopy ((char *)(pp+curr->top), (char *)(pp+curr->top+1), X (curr->bot-curr->top) * sizeof (char *)); X if (pp == curr->image) X bclear (tmp, cols); X else X bzero (tmp, cols); X pp[curr->top] = tmp; X} X Xstatic ForwardTab () { X register x = curr->x; X X if (curr->tabs[x] && x < cols-1) X ++x; X while (x < cols-1 && !curr->tabs[x]) X x++; X Goto (curr->y, curr->x, curr->y, x); X curr->x = x; X} X Xstatic BackwardTab () { X register x = curr->x; X X if (curr->tabs[x] && x > 0) X x--; X while (x > 0 && !curr->tabs[x]) X x--; X Goto (curr->y, curr->x, curr->y, x); X curr->x = x; X} X Xstatic ClearScreen () { X register i; X X PutStr (CL); X for (i = 0; i < rows; ++i) { X bclear (curr->image[i], cols); X bzero (curr->attr[i], cols); X bzero (curr->font[i], cols); X } X} X Xstatic ClearFromBOS () { X register n, y = curr->y, x = curr->x; X X for (n = 0; n < y; ++n) X ClearInLine (1, n, 0, cols-1); X ClearInLine (1, y, 0, x); X Goto (curr->y, curr->x, y, x); X curr->y = y; curr->x = x; X} X Xstatic ClearToEOS () { X register n, y = curr->y, x = curr->x; X X if (CD) X PutStr (CD); X ClearInLine (!CD, y, x, cols-1); X for (n = y+1; n < rows; n++) X ClearInLine (!CD, n, 0, cols-1); X Goto (curr->y, curr->x, y, x); X curr->y = y; curr->x = x; X} X Xstatic ClearLine () { X register y = curr->y, x = curr->x; X X ClearInLine (1, y, 0, cols-1); X Goto (curr->y, curr->x, y, x); X curr->y = y; curr->x = x; X} X Xstatic ClearToEOL () { X register y = curr->y, x = curr->x; X X ClearInLine (1, y, x, cols-1); X Goto (curr->y, curr->x, y, x); X curr->y = y; curr->x = x; X} X Xstatic ClearFromBOL () { X register y = curr->y, x = curr->x; X X ClearInLine (1, y, 0, x); X Goto (curr->y, curr->x, y, x); X curr->y = y; curr->x = x; X} X Xstatic ClearInLine (displ, y, x1, x2) { X register i, n; X X if (x1 == cols) x1--; X if (x2 == cols) x2--; X if (n = x2 - x1 + 1) { X bclear (curr->image[y]+x1, n); X bzero (curr->attr[y]+x1, n); X bzero (curr->font[y]+x1, n); X if (displ && display) { X if (x2 == cols-1 && CE) { X Goto (curr->y, curr->x, y, x1); X curr->y = y; curr->x = x1; X PutStr (CE); X return; X } X if (y == rows-1 && AM) X --n; X if (n == 0) X return; X SaveAttr (0); X Goto (curr->y, curr->x, y, x1); X for (i = n; i > 0; i--) X putchar (' '); X curr->y = y; curr->x = x1 + n; X RestoreAttr (0); X } X } X} X Xstatic CursorRight (n) register n; { X register x = curr->x; X X if (x == cols) X return; X if ((curr->x += n) >= cols) X curr->x = cols-1; X Goto (curr->y, x, curr->y, curr->x); X} X Xstatic CursorUp (n) register n; { X register y = curr->y; X X if ((curr->y -= n) < curr->top) X curr->y = curr->top; X Goto (y, curr->x, curr->y, curr->x); X} X Xstatic CursorDown (n) register n; { X register y = curr->y; X X if ((curr->y += n) > curr->bot) X curr->y = curr->bot; X Goto (y, curr->x, curr->y, curr->x); X} X Xstatic CursorLeft (n) register n; { X register x = curr->x; X X if ((curr->x -= n) < 0) X curr->x = 0; X Goto (curr->y, x, curr->y, curr->x); X} X Xstatic SetMode (on) { X register i; X X for (i = 0; i < curr->NumArgs; ++i) { X switch (curr->args[i]) { X case 4: X curr->insert = on; X InsertMode (on); X break; X } X } X} X Xstatic SelectRendition () { X register i, old = GlobalAttr; X X if (curr->NumArgs == 0) X SetRendition (0); X else for (i = 0; i < curr->NumArgs; ++i) X SetRendition (curr->args[i]); X NewRendition (old, GlobalAttr); X} X Xstatic SetRendition (n) register n; { X switch (n) { X case 0: X GlobalAttr = 0; break; X case 1: X GlobalAttr |= A_BD; break; X case 2: X GlobalAttr |= A_DI; break; X case 3: X GlobalAttr |= A_SO; break; X case 4: X GlobalAttr |= A_US; break; X case 5: X GlobalAttr |= A_BL; break; X case 7: X GlobalAttr |= A_RV; break; X case 22: X GlobalAttr &= ~(A_BD|A_SO|A_DI); break; X case 23: X GlobalAttr &= ~A_SO; break; X case 24: X GlobalAttr &= ~A_US; break; X case 25: X GlobalAttr &= ~A_BL; break; X case 27: X GlobalAttr &= ~A_RV; break; X } X curr->LocalAttr = GlobalAttr; X} X Xstatic NewRendition (old, new) register old, new; { X register i; X X if (old == new) X return; X for (i = 1; i <= A_MAX; i <<= 1) { X if ((old & i) && !(new & i)) { X PutStr (UE); X PutStr (SE); X PutStr (ME); X if (new & A_US) PutStr (US); X if (new & A_SO) PutStr (SO); X if (new & A_BL) PutStr (MB); X if (new & A_BD) PutStr (MD); X if (new & A_DI) PutStr (MH); X if (new & A_RV) PutStr (MR); X return; X } X } X if ((new & A_US) && !(old & A_US)) X PutStr (US); X if ((new & A_SO) && !(old & A_SO)) X PutStr (SO); X if ((new & A_BL) && !(old & A_BL)) X PutStr (MB); X if ((new & A_BD) && !(old & A_BD)) X PutStr (MD); X if ((new & A_DI) && !(old & A_DI)) X PutStr (MH); X if ((new & A_RV) && !(old & A_RV)) X PutStr (MR); X} X Xstatic SaveAttr (newattr) { X NewRendition (GlobalAttr, newattr); X NewCharset (GlobalCharset, ASCII); X if (curr->insert) X InsertMode (0); X} X Xstatic RestoreAttr (oldattr) { X NewRendition (oldattr, GlobalAttr); X NewCharset (ASCII, GlobalCharset); X if (curr->insert) X InsertMode (1); X} X Xstatic FillWithEs () { X register i; X register char *p, *ep; X X curr->y = curr->x = 0; X SaveAttr (0); X for (i = 0; i < rows; ++i) { X bzero (curr->attr[i], cols); X bzero (curr->font[i], cols); X p = curr->image[i]; X ep = p + cols; X for ( ; p < ep; ++p) X *p = 'E'; X } X RestoreAttr (0); X Redisplay (); X} X Xstatic Redisplay () { X register i; X X PutStr (CL); X TmpAttr = GlobalAttr; X TmpCharset = GlobalCharset; X InsertMode (0); X last_x = last_y = 0; X for (i = 0; i < rows; ++i) X DisplayLine (blank, null, null, curr->image[i], curr->attr[i], X curr->font[i], i, 0, cols-1); X if (curr->insert) X InsertMode (1); X NewRendition (TmpAttr, GlobalAttr); X NewCharset (TmpCharset, GlobalCharset); X Goto (last_y, last_x, curr->y, curr->x); X} X Xstatic DisplayLine (os, oa, of, s, as, fs, y, from, to) X register char *os, *oa, *of, *s, *as, *fs; { X register i, x, a, f; X X if (to == cols) X --to; X if (AM && y == rows-1 && to == cols-1) X --to; X a = TmpAttr; X f = TmpCharset; X for (x = i = from; i <= to; ++i, ++x) { X if (s[i] == os[i] && as[i] == oa[i] && as[i] == a X && of[i] == fs[i] && fs[i] == f) X continue; X Goto (last_y, last_x, y, x); X last_y = y; X last_x = x; X if ((a = as[i]) != TmpAttr) { X NewRendition (TmpAttr, a); X TmpAttr = a; X } X if ((f = fs[i]) != TmpCharset) { X NewCharset (TmpCharset, f); X TmpCharset = f; X } X putchar (s[i]); X last_x++; X } X} X Xstatic RedisplayLine (os, oa, of, y, from, to) char *os, *oa, *of; { X if (curr->insert) X InsertMode (0); X NewRendition (GlobalAttr, 0); X TmpAttr = 0; X NewCharset (GlobalCharset, ASCII); X TmpCharset = ASCII; X last_y = y; X last_x = from; X DisplayLine (os, oa, of, curr->image[y], curr->attr[y], X curr->font[y], y, from, to); X NewRendition (TmpAttr, GlobalAttr); X NewCharset (TmpCharset, GlobalCharset); X if (curr->insert) X InsertMode (1); X} X Xstatic MakeBlankLine (p, n) register char *p; register n; { X do *p++ = ' '; X while (--n); X} X XMakeStatus (msg, wp) char *msg; struct win *wp; { X struct win *ocurr = curr; X int odisplay = display; X register char *s, *t; X register max = AM ? cols-1 : cols; X X for (s = t = msg; *s && t - msg < max; ++s) X if (isprint(*s)) *t++ = *s; X *t = '\0'; X curr = wp; X display = 1; X if (status) { X if (time ((time_t *)0) - TimeDisplayed < 2) X sleep (2); X RemoveStatus (wp); X } X if (t > msg) { X status = 1; X StatLen = t - msg; X Goto (curr->y, curr->x, rows-1, 0); X SaveAttr (A_SO); X printf ("%s", msg); X RestoreAttr (A_SO); X (void) fflush (stdout); X time (&TimeDisplayed); X } X curr = ocurr; X display = odisplay; X} X XRemoveStatus (p) struct win *p; { X struct win *ocurr = curr; X int odisplay = display; X X if (!status) X return; X status = 0; X curr = p; X display = 1; X Goto (-1, -1, rows-1, 0); X RedisplayLine (null, null, null, rows-1, 0, StatLen); X Goto (rows-1, last_x, curr->y, curr->x); X curr = ocurr; X display = odisplay; X} ________This_Is_The_END________ if test `wc -l < ansi.c` -ne 1680; then echo 'shar: ansi.c was damaged during transit (should have been 1680 bytes)' fi fi ; : end of overwriting check exit 0   Received: from VMB.BRL.MIL by VMB.BRL.MIL id aa10858; 4 Aug 89 9:33 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ac09293; 4 Aug 89 9:22 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa09178; 4 Aug 89 9:04 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12738; 4 Aug 89 8:52 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22264; Thu, 3 Aug 89 22:51:00 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 3 Aug 89 22:01:28 GMT From: Jim Barton Organization: Silicon Graphics, Inc., Mountain View, CA Subject: BSD "screen" program for the 4D [Part 2/3] Message-Id: <39504@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL "screen" for the IRIS 4D series, Part 2/3 #--------------------------------CUT HERE------------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -r--r--r-- 1 jmb sys 21153 Aug 3 11:24 screen.1 # echo 'x - screen.1' if test -f screen.1; then echo 'shar: not overwriting screen.1'; else sed 's/^X//' << '________This_Is_The_END________' > screen.1 X.if n .ds Q \&" X.if n .ds U \&" X.if t .ds Q `` X.if t .ds U '' X.TH SCREEN 1 "2 March 1987" X.UC 4 X.SH NAME Xscreen \- screen manager with VT100/ANSI terminal emulation X.SH SYNOPSIS X.B screen X[ X.B \-a X] [ X.B \-f X] [ X.B \-n X] [ X.B \-e\fIxy\fP X] [ X.BR \fIcmd args\fP ] X.br X.B screen \-r X[ X.BR \fIhost.tty\fP ] X.ta .5i 1.8i X.SH DESCRIPTION X.I screen Xis a full-screen window manager that Xmultiplexes a physical terminal between several processes (typically Xinteractive shells). Each virtual terminal provides the functions Xof the DEC VT100 terminal and, in addition, several control functions Xfrom the ANSI X3.64 (ISO 6429) and ISO 2022 standards X(e.\|g. insert/delete line and support for multiple character sets). X.PP XWhen X.I screen Xis called, it creates a single window with a shell; the pathname of the Xshell is taken from the environment symbol $SHELL; if this is not Xdefined, \*Q/bin/sh\*U is used. XNew windows can be created at any time by calling X.I screen Xfrom within a previously created window. XThe program to be started in a newly created Xwindow and optional arguments to the program can be supplied when X.I screen Xis invoked. XFor instance, X.IP Xscreen csh X.PP Xwill create a window with a C-Shell and switch to that window. XWhen the process associated with the currently displayed window Xterminates (e.\|g. ^D has been typed to a shell), X.I screen Xswitches to the previously displayed window; Xwhen no more windows are left, X.I screen Xexits. X.PP XWhen \*Q/etc/utmp\*U is writable by X.IR screen , Xan appropriate record is written to this file for each window and Xremoved when the window is terminated. X.PP XThe X.B \-r Xoption is used to resume a X.I screen Xsession that has been \fIdetached\fP from the terminal by means Xof the \*Qdetach\*U command key (see below). XThis mechanism allows a user to disconnect X.I screen Xtogether with all currently active windows from the terminal Xand resume it at a later point in time, e.\|g. at a later Xlogin session, and possibly on a different terminal. XThe type of terminal on which a detached X.I screen Xis resumed must of course be compatible to the type of terminal Xon which X.I screen Xhas originally been invoked. XWhen more than one detached X.I screen Xexist, the X.B \-r Xoption displays a list of X.I host.tty Xpairs identifying the detached X.IR screens . XIn this case an additional X.I host.tty Xargument can be given to resume a specific X.I screen Xsession. X.SH "COMMAND KEYS" XThe standard way to create a new window is to type \*QC-a c\*U (the notation X\*QC-x\*U will be used as a shorthand for Control-x in this manual; x is Xan arbitrary letter). X\*QC-a c\*U creates a new window running a shell and switches to that Xwindow immediately, regardless of the state of the process running Xin the current window. X.I Screen Xrecognizes several such commands; each command consists of X\*QC-a\*U followed by a one-letter function. XFor convenience, the letter after a \*QC-a\*U can be entered both with or Xwithout the control key pressed (with the exception of X\*QC-a C-a\*U and \*QC-a a\*U; see below), thus, \*QC-a c\*U as well as X\*QC-a C-c\*U can be used to create a window. X.PP XThe following commands are recognized by X.IR screen : X.IP "\fBC-a c\fP or \fBC-a C-c\fP" XCreate a new window with a shell and switch to that window. X.IP "\fBC-a k\fP or \fBC-a C-k\fP" XKill the current window and switch to the previously displayed window. X.IP "\fBC-a C-\e\fP" XKill all windows and terminate X.IR screen . X.IP "\fBC-a d\fP or \fBC-a C-d\fP" XDetach X.I screen X(disconnect it from the terminal and put it into the Xbackground). XA detached X.I screen Xcan be resumed by invoking X.I screen Xwith the X.B \-r Xoption. X.IP "\fBC-a C-a\fP\0\0\0\0\0" XSwitch to the previously displayed window. X.IP "\fBC-a 0\fP to \fBC-a 9\fP" XSwitch to the window with the number 0 (1, 2, .., 9, respectively). XWhen a new window is established, the first available number from the Xrange 0..9 is assigned to this window. XThus, the first window can be activated by \*QC-a 0\*U; at most X10 windows can be present at any time. X.IP "\fBC-a space\fP or \fBC-a C-space\fP or \fBC-a n\fP or \fBC-a C-n\fP" XSwitch to the next window. This function can be used repeatedly to Xcycle through the list of windows. X(Control-space is not supported by all terminals.) X.IP "\fBC-a p\fP or \fBC-a C-p\fP or \fBC-a -\fP" XSwitch to the previous window (the opposite of \fBC-a space\fP). X.IP "\fBC-a l\fP or \fBC-a C-l\fP" XRedisplay the current window. X.IP "\fBC-a z\fP or \fBC-a C-z\fP" XSuspend X.IR screen . X.IP "\fBC-a h\fP or \fBC-a C-h\fP" XWrite a hardcopy of the current window to the file \*Qhardcopy.\fIn\fP\*U Xin the window's current directory, Xwhere \fIn\fP is the number of the current window. X.IP "\fBC-a .\fP (Control-a dot)" XWrite the termcap entry for the virtual terminal of the currently active Xwindow to the file \*Q.termcap\*U in the directory \*Q$HOME/.screen\*U. XThis termcap entry is identical to the value of the environment symbol XTERMCAP that is set up by X.I screen Xfor each window. X.IP "\fBC-a w\fP or \fBC-a C-w\fP" XDisplay a list of all windows. XFor each window, the number of the window and the process that has been Xstarted in the window is displayed; the current window is marked with a X`*'. X.IP "\fBC-a t\fP or \fBC-a C-t\fP" XPrint in the message line the time of day, the host name, the load averages Xover 1, 5, and 15 minutes (if this is available on your system), Xthe cursor position of the current window in the form \*Q(colum,row)\*U Xstarting with \*U(0,0)\*U, an indication if flow control Xand (for the current window) Xinsert mode, origin mode, wrap mode, and keypad application Xmode are enabled or not (indicated by a '+' or '-'), Xthe currently active character set (\fIG0\fP, \fIG1\fP, \fIG2\fP, Xor \fIG3\fP), and the terminal character sets that are currently Xdesignated as \fIG0\fP through \fIG3\fP. X.IP "\fBC-a v\fP or \fBC-a C-v\fP" XDisplay the version. X.IP "\fBC-a a\fP\0\0\0\0\0" XSend the character \*QC-a\*U to the processes running in the window. X.IP "\fBC-a s\fP or \fBC-a C-s\fP" XSend a Control-s to the program running in the window. X.IP "\fBC-a q\fP or \fBC-a C-q\fP" XSend a Control-q to the program running in the window. X.IP X.PP XThe X.B \-e Xoption can be used to specify a different command character and Xa character which, when typed immediately after the command character, Xgenerates a literal command character. XThe defaults for these two characters are \*QC-a\*U and `a'. X(Note that the function to switch to the previous window is actually the Xcommand character typed twice; for instance, when X.I screen Xis called with the option \*Q\fB\-e]x\fP\*U (or \*Q\fB\-e ]x\fP\*U), Xthis function becomes \*Q]]\*U). X.SH CUSTOMIZATION XWhen X.I screen Xis invoked, it executes initialization commands from the file X\*Q.screenrc\*U in the user's home directory. XCommands in \*Q.screenrc\*U are mainly used to automatically Xestablish a number of windows each time X.I screen Xis called, and to bind functions to specific keys. XEach line in \*Q.screenrc\*U contains one initialization command; lines Xstarting with `#' are ignored. XCommands can have arguments; arguments are separated by tabs and spaces Xand can be surrounded by single quotes or double quotes. X.PP XThe following initialization commands are recognized by X.IR screen : X.PP X.ne 3 X.B "escape \fIxy\fP" X.PP XSet the command character to \fIx\fP and the character generating a literal Xcommand character to \fIy\fP (see the \-e option above). X.PP X.ne 3 X.B "bell \fImessage\fP" X.PP XWhen a bell character is sent to a background window, X.I screen Xdisplays a notification in the message line (see below). XThe notification message can be re-defined by means of the \*Qbell\*U Xcommand; each occurrence of `%' in \fImessage\fP is replaced by Xthe number of the window to which a bell has been sent. XThe default message is X.PP X Bell in window % X.PP XAn empty message can be supplied to the \*Qbell\*U command to suppress Xoutput of a message line (bell ""). X.PP X.ne 3 X.B "mode \fImode\fP" X.PP XThe mode of each newly allocated pseudo-tty is set to \fImode\fP. X\fIMode\fP is an octal number. XWhen no \*Qmode\*U command is given, mode 0622 is used. X.PP X.ne 3 X.B "screen [\fIn\fP] [\fIcmds args\fP]" X.PP XEstablish a window. XIf an optional number \fIn\fP in the range 0..9 is given, the window Xnumber \fIn\fP is assigned to the newly created window (or, if this Xnumber is already in use, the next higher number). XNote that \fIn\fP has a value of zero for the standard shell window Xcreated after \*Q.screenrc\*U has been read. XIf a command is specified after \*Qscreen\*U, this command (with the given Xarguments) is started in the window; if no command is given, a shell Xis created in the window. XThus, if your \*Q.screenrc\*U contains the lines X.PP X.nf X # example for .screenrc: X screen 1 X screen 2 telnet foobar X.fi X.PP X.I screen Xcreates a shell window (window #1), a window with a TELNET connection Xto the machine foobar (window #2), and, finally, a second shell window X(the default window) which gets a window number of zero. XWhen the initialization is completed, X.I screen Xalways switches to the default window, so window #0 is displayed Xwhen the above \*Q.screenrc\*U is used. X.PP X.ne 3 X.B "chdir [\fIdirectory\fP]" X.PP XChange the \fIcurrent directory\fP of X.I screen Xto the specified directory or, if called without an argument, Xto the home directory (the value of the environment symbol $HOME). XAll windows that are created by means of the \*Qscreen\*U command Xfrom within \*Q.screenrc\*U or by means of \*QC-a c'' are running Xin the \fIcurrent directory\fP; the \fIcurrent directory\fP is Xinitially the directory from which the shell command X.I screen Xhas been invoked. XHardcopy files are always written to the directory in which the current Xwindow has been created (that is, \fInot\fP in the current directory Xof the shell running in the window). X.PP X.ne 3 X.B "bind \fIkey\fP [\fIfunction\fP | \fIcmd args\fP]" X.PP XBind a function to a key. XBy default, each function provided by X.I screen Xis bound to one or more keys as indicated by the above table, e.\|g. the Xfunction to create a new window is bound to \*QC-c\*U and \*Qc\*U. XThe \*Qbind\*U command can be used to redefine the key bindings and to Xdefine new bindings. XThe \fIkey\fP Xargument is either a single character, a sequence of the form X\*Q^x\*U meaning \*QC-x\*U, or an octal number specifying the XASCII code of the character. XIf no further argument is given, any previously established binding Xfor this key is removed. XThe \fIfunction\fP argument can be one of the following keywords: X.PP X.nf X shell Create new window with a shell X kill Kill the current window X quit Kill all windows and terminate X detach Detach \fIscreen\fP X other Switch to previously displayed window X next Switch to the next window X prev Switch to the previous window X redisplay Redisplay current window X hardcopy Make hardcopy of current window X termcap Write termcap entry to $HOME/.screen/.termcap X suspend Suspend \fIscreen\fP X windows Display list of window X info Print useful information in the message line X xon Send Control-q X xoff Send Control-s X version Display the version X select0 Switch to window #0 X \0\0... X select9 Switch to window #9 X.fi X.PP XIn addition, a key can be bound such that a window is created running Xa different command than the shell when that key is pressed. XIn this case, the command optionally followed by Xarguments must be given instead of one of the above-listed keywords. XFor example, the commands X.PP X.nf X bind ' ' windows X bind ^f telnet foobar X bind 033 su X.fi X.PP Xwould bind the space key to the function that displays a list Xof windows (that is, the function usually invoked by \*QC-a C-w\*U Xor \*QC-a w\*U would also be available as \*QC-a space\*U), Xbind \*QC-f\*U to the function \*Qcreate a window with a TELNET Xconnection to foobar\*U, and bind \*Qescape\*U to the function Xthat creates a window with a super-user shell. X.SH "VIRTUAL TERMINAL" X.I Screen Xprints error messages and other diagnostics in a \fImessage line\fP above Xthe bottom of the screen. XThe message line is removed when a key is pressed or, automatically, Xafter a couple of seconds. XThe message line facility can be used by an application running in Xthe current window by means of the ANSI \fIPrivacy message\fP Xcontrol sequence (for instance, from within the shell, something like X.IP Xecho '^[^Hello world^[\e' (where ^[ is an \fIescape\fP) X.PP Xcan be used to display a message line. X.PP XWhen the `NF' capability is found in the termcap entry of the Xterminal on which X.I screen Xhas been started, flow control is turned off for the terminal. XThis enables the user to send XON and XOFF characters to the Xprogram running in a window (this is required by the \fIemacs\fP Xeditor, for instance). XThe command line options X.B \-n Xand X.B \-f Xcan be used to turn flow control off or on, respectively, independently Xof the `NF' capability. X.PP X.I XScreen Xnever writes in the last position of the screen, unless the boolean Xcapability `LP' is found in the termcap entry of the terminal. XUsually, X.I screen Xcannot predict whether or not a particular terminal scrolls when Xa character is written in the last column of the last line; X`LP' indicates that it is safe to write in this position. XNote that the `LP' capability is independent of `am' (automatic Xmargins); for certain terminals, such as the VT100, it is reasonable Xto set `am' as well as `LP' in the corresponding termcap entry X(the VT100 does not move the cursor when a character is written in Xthe last column of each line). X.PP X.I Screen Xputs into the environment of each process started in a newly created Xwindow the symbols \*QWINDOW=\fIn\fP\*U (where \fIn\fP is the number Xof the respective window), \*QTERM=screen\*U, and a TERMCAP variable Xreflecting the capabilities of the virtual terminal emulated by X.IR screen . XThe actual set of capabilities supported by the virtual terminal Xdepends on the capabilities supported by the physical terminal. XIf, for instance, the physical terminal does not support standout mode, X.I screen Xdoes not put the `so' and `se' capabilities into the window's TERMCAP Xvariable, accordingly. XHowever, a minimum number of capabilities must be supported by a Xterminal in order to run X.IR screen , Xnamely scrolling, clear screen, and direct cursor addressing X(in addition, X.I screen Xdoes not run on hardcopy terminals or on terminals that overstrike). X.PP XWhen the boolean `G0' capability is present in the termcap entry Xfor the terminal on which X.I screen Xhas been called, the terminal emulation of X.I screen Xsupports multiple character sets. XThis allows an application to make use of, for instance, Xthe VT100 graphics character set or national character sets. XThe following control functions from ISO 2022 are supported: X\fIlock shift G0\fP (\fISI\fP), \fIlock shift G1\fP (\fISO\fP), X\fIlock shift G2\fP, \fIlock shift G3\fP, \fIsingle shift G2\fP, Xand \fIsingle shift G3\fP. XWhen a virtual terminal is created or reset, the ASCII character Xset is designated as \fIG0\fP through \fIG3\fP. X.PP XWhen the `po' and `pf' capabilities are present in the terminal's Xtermcap entry, applications running in a X.I screen Xwindow can send output to the printer port of the terminal. XThis allows a user to have an application in one window Xsending output to a printer connected to the terminal, while all Xother windows are still active (the printer port is enabled Xand disabled again for each chunk of output). XAs a side-effect, programs running in different windows can Xsend output to the printer simultaneously. XData sent to the printer is not displayed in the window. X.PP XSome capabilities are only put into the TERMCAP Xvariable of the virtual terminal if they can be efficiently Ximplemented by the physical terminal. XFor instance, `dl' (delete line) is only put into the TERMCAP Xvariable if the terminal supports either delete line itself or Xscrolling regions. XIf X.I screen Xis called with the X.B \-a Xoption, \fIall\fP capabilities are put into the environment, Xeven if X.I screen Xmust redraw parts of the display in order to implement a function. X.PP XThe following is a list of control sequences recognized by X.IR screen . X\*Q(V)\*U and \*Q(A)\*U indicate VT100-specific and ANSI- or XISO-specific functions, respectively. X.PP X.nf X.TP 20 X.B "ESC E" X Next Line X.TP 20 X.B "ESC D" X Index X.TP 20 X.B "ESC M" X Reverse Index X.TP 20 X.B "ESC H" X Horizontal Tab Set X.TP 20 X.B "ESC 7" X(V) Save Cursor and attributes X.TP 20 X.B "ESC 8" X(V) Restore Cursor and Attributes X.TP 20 X.B "ESC c" X Reset to Initial State X.TP 20 X.B "ESC =" X(V) Application Keypad Mode X.TP 20 X.B "ESC >" X(V) Numeric Keypad Mode X.TP 20 X.B "ESC # 8" X(V) Fill Screen with E's X.TP 20 X.B "ESC \e" X(A) String Terminator X.TP 20 X.B "ESC ^" X(A) Privacy Message (Message Line) X.TP 20 X.B "ESC P" X(A) Device Control String (not used) X.TP 20 X.B "ESC _" X(A) Application Program Command (not used) X.TP 20 X.B "ESC ]" X(A) Operating System Command (not used) X.TP 20 X.B "Control-N" X(A) Lock Shift G1 (SO) X.TP 20 X.B "Control-O" X(A) Lock Shift G0 (SI) X.TP 20 X.B "ESC n" X(A) Lock Shift G2 X.TP 20 X.B "ESC o" X(A) Lock Shift G3 X.TP 20 X.B "ESC N" X(A) Single Shift G2 X.TP 20 X.B "ESC O" X(A) Single Shift G3 X.TP 20 X.B "ESC ( Pcs" X(A) Designate character set as G0 X.TP 20 X.B "ESC ) Pcs" X(A) Designate character set as G1 X.TP 20 X.B "ESC * Pcs" X(A) Designate character set as G2 X.TP 20 X.B "ESC + Pcs" X(A) Designate character set as G3 X.TP 20 X.B "ESC [ Pn ; Pn H" X Direct Cursor Addressing X.TP 20 X.B "ESC [ Pn ; Pn f" X Direct Cursor Addressing X.TP 20 X.B "ESC [ Pn J" X Erase in Display X.TP 20 X\h'\w'ESC 'u'Pn = None or \fB0\fP X From Cursor to End of Screen X.TP 20 X\h'\w'ESC 'u'\fB1\fP X From Beginning of Screen to Cursor X.TP 20 X\h'\w'ESC 'u'\fB2\fP X Entire Screen X.TP 20 X.B "ESC [ Pn K" X Erase in Line X.TP 20 X\h'\w'ESC 'u'Pn = None or \fB0\fP X From Cursor to End of Line X.TP 20 X\h'\w'ESC 'u'\fB1\fP X From Beginning of Line to Cursor X.TP 20 X\h'\w'ESC 'u'\fB2\fP X Entire Line X.TP 20 X.B "ESC [ Pn A" X Cursor Up X.TP 20 X.B "ESC [ Pn B" X Cursor Down X.TP 20 X.B "ESC [ Pn C" X Cursor Right X.TP 20 X.B "ESC [ Pn D" X Cursor Left X.TP 20 X.B "ESC [ Ps ;...; Ps m" X Select Graphic Rendition X.TP 20 X\h'\w'ESC 'u'Ps = None or \fB0\fP X Default Rendition X.TP 20 X\h'\w'ESC 'u'\fB1\fP X Bold X.TP 20 X\h'\w'ESC 'u'\fB2\fP X(A) Faint X.TP 20 X\h'\w'ESC 'u'\fB3\fP X(A) \fIStandout\fP Mode (ANSI: Italicised) X.TP 20 X\h'\w'ESC 'u'\fB4\fP X Underlined X.TP 20 X\h'\w'ESC 'u'\fB5\fP X Blinking X.TP 20 X\h'\w'ESC 'u'\fB7\fP X Negative Image X.TP 20 X\h'\w'ESC 'u'\fB22\fP X(A) Normal Intensity X.TP 20 X\h'\w'ESC 'u'\fB23\fP X(A) \fIStandout\fP Mode off (ANSI: Italicised off) X.TP 20 X\h'\w'ESC 'u'\fB24\fP X(A) Not Underlined X.TP 20 X\h'\w'ESC 'u'\fB25\fP X(A) Not Blinking X.TP 20 X\h'\w'ESC 'u'\fB27\fP X(A) Positive Image X.TP 20 X.B "ESC [ Pn g" X Tab Clear X.TP 20 X\h'\w'ESC 'u'Pn = None or \fB0\fP X Clear Tab at Current Position X.TP 20 X\h'\w'ESC 'u'\fB3\fP X Clear All Tabs X.TP 20 X.B "ESC [ Pn ; Pn r" X(V) Set Scrolling Region X.TP 20 X.B "ESC [ Pn I" X(A) Horizontal Tab X.TP 20 X.B "ESC [ Pn Z" X(A) Backward Tab X.TP 20 X.B "ESC [ Pn L" X(A) Insert Line X.TP 20 X.B "ESC [ Pn M" X(A) Delete Line X.TP 20 X.B "ESC [ Pn @" X(A) Insert Character X.TP 20 X.B "ESC [ Pn P" X(A) Delete Character X.TP 20 X.B "ESC [ Ps ;...; Ps h" X Set Mode X.TP 20 X.B "ESC [ Ps ;...; Ps l" X Reset Mode X.TP 20 X\h'\w'ESC 'u'Ps = \fB4\fP X(A) Insert Mode X.TP 20 X\h'\w'ESC 'u'\fB?5\fP X(V) Visible Bell (\fIOn\fP followed by \fIOff\fP) X.TP 20 X\h'\w'ESC 'u'\fB?6\fP X(V) \fIOrigin\fP Mode X.TP 20 X\h'\w'ESC 'u'\fB?7\fP X(V) \fIWrap\fP Mode X.TP 20 X.B "ESC [ 5 i" X(A) Start relay to printer (ANSI Media Copy) X.TP 20 X.B "ESC [ 4 i" X(A) Stop relay to printer (ANSI Media Copy) X.fi X.SH FILES X.nf X.ta 2i X$(HOME)/.screenrc \fIscreen\fP initialization commands X.br X$(HOME)/.screen Directory created by \fIscreen\fP X.br X$(HOME)/.screen/\fIhost.tty\fP Socket created by \fIscreen\fP X.br Xhardcopy.[0-9] Screen images created by the hardcopy function X.br X/etc/termcap Terminal capability data base X.br X/etc/utmp Login records X.fi X.SH "SEE ALSO" Xtermcap(5), utmp(5) X.SH AUTHOR XOliver Laumann X.SH BUGS XStandout mode is not cleared before newline or cursor addressing. X.PP XIf `LP' is not set but `am' is set, the last character in the last line is never Xwritten, and it is not correctly re-displayed when the screen is Xscrolled up or when a character is deleted in the last line. X.PP XThe VT100 \*Qwrap around with cursor addressing\*U bug is not compensated Xwhen X.I screen Xis running on a VT100. X.PP X`AL,' `DL', and similar parameterized capabilities are not used if present. X.PP X`dm' (delete mode), `xn', and `xs' are not handled Xcorrectly (they are ignored). X.PP XThe \fIGR\fP set of ISO 2022 is not supported. X.PP X`ms' is not advertised in the termcap entry (in order to compensate Xa bug in X.IR curses (3X)). X.PP XScrolling regions are only emulated if the physical terminal supports Xscrolling regions. X.PP X.I Screen Xdoes not make use of hardware tabs. X.PP X.I Screen Xmust be installed as set-uid with owner root in order to be able Xto correctly change the owner of the tty device file for each Xwindow. XSpecial permission may also be required to write the file \*Q/etc/utmp\*U. X.PP XEntries in \*Q/etc/utmp\*U are not removed when X.I screen Xis killed with SIGKILL. ________This_Is_The_END________ if test `wc -l < screen.1` -ne 726; then echo 'shar: screen.1 was damaged during transit (should have been 726 bytes)' fi fi ; : end of overwriting check exit 0   Received: from VMB.BRL.MIL by VMB.BRL.MIL id ac10858; 4 Aug 89 9:34 EDT Received: from VMB.BRL.MIL by VMB.brl.MIL id ae09293; 4 Aug 89 9:23 EDT Received: from smoke.brl.mil by VMB.BRL.MIL id aa09222; 4 Aug 89 9:05 EDT Received: from ucbvax.Berkeley.EDU by SMOKE.BRL.MIL id aa12761; 4 Aug 89 8:53 EDT Received: by ucbvax.Berkeley.EDU (5.61/1.37) id AA22293; Thu, 3 Aug 89 22:51:33 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 3 Aug 89 22:02:38 GMT From: Jim Barton Organization: Silicon Graphics, Inc., Mountain View, CA Subject: BSD "screen" program for the 4D [Part 3/3] Message-Id: <39506@sgi.SGI.COM> Sender: info-iris-request@BRL.MIL To: info-iris@BRL.MIL "screen" for the IRIS 4D series, Part 3/3 #--------------------------------CUT HERE------------------------------------- #! /bin/sh # # This is a shell archive. Save this into a file, edit it # and delete all lines above this comment. Then give this # file to sh by executing the command "sh file". The files # will be extracted into the current directory owned by # you with default permissions. # # The files contained herein are: # # -r--r--r-- 1 jmb sys 43860 Aug 3 11:24 screen.c # -r--r--r-- 1 jmb sys 2247 Aug 3 11:24 screen.h # -r--r--r-- 1 jmb sys 633 Aug 3 11:24 screen.tic # echo 'x - screen.c' if test -f screen.c; then echo 'shar: not overwriting screen.c'; else sed 's/^X//' << '________This_Is_The_END________' > screen.c X/* Copyright (c) 1987,1988 Oliver Laumann, Technical University of Berlin. X * Not derived from licensed software. X * X * Permission is granted to freely use, copy, modify, and redistribute X * this software, provided that no attempt is made to gain profit from it, X * the author is not construed to be liable for any results of using the X * software, alterations are clearly marked as such, and this notice is X * not modified. X */ X Xstatic char ScreenVersion[] = "screen 2.0a 19-Oct-88 SGI 4D Series"; X X#include X#include X#include X#include X#include X# ifndef sgi X#include X# endif X#include X#include X#ifdef SUNLOADAV X#ifndef sgi X#include X#endif X#endif X#ifdef sgi X#include X#include Xstatic char is3_3 = 0; X#define setpgrp BSDsetpgrp X#define getpgrp BSDgetpgrp X#endif X X#include X#ifndef SYSV X#include X#endif X#include X#include X#include X#include X#include X#include X#include X#ifdef SYSV X# include X# include X#endif X X#include "screen.h" X X#ifndef SYSV X#ifdef GETTTYENT X# include X#else X static struct ttyent { X char *ty_name; X } *getttyent(); X static char *tt, *ttnext; X static char ttys[] = "/etc/ttys"; X#endif X#endif X X#define MAXWIN 10 X#define MSGWAIT 5 X X#define Ctrl(c) ((c)&037) X Xextern char *blank, Term[], **environ; Xextern rows, cols; Xextern ISO2022; Xextern status; Xextern time_t TimeDisplayed; Xextern char AnsiVersion[]; Xextern short ospeed; Xextern flowctl; Xextern errno; Xextern sys_nerr; Xextern char *sys_errlist[]; Xextern char *index(), *rindex(), *malloc(), *getenv(), *MakeTermcap(); Xextern char *getlogin(), *ttyname(); Xstatic AttacherFinit(), Finit(), SigHup(), SigChld(); Xstatic char *MakeBellMsg(), *Filename(), **SaveArgs(), *GetTtyName(); X Xstatic char PtyName[32], TtyName[32]; Xstatic char *ShellProg; Xstatic char *ShellArgs[2]; Xstatic char inbuf[IOSIZE]; Xstatic inlen; Xstatic ESCseen; Xstatic GotSignal; Xstatic char DefaultShell[] = "/bin/sh"; Xstatic char DefaultPath[] = ":/usr/ucb:/bin:/usr/bin"; Xstatic char PtyProto[] = "/dev/ptyXY"; Xstatic char TtyProto[] = "/dev/ttyXY"; Xstatic int TtyMode = 0622; Xstatic char SockPath[512]; Xstatic char SockDir[] = ".screen"; Xstatic char *SockNamePtr, *SockName; Xstatic ServerSocket; Xstatic char *NewEnv[MAXARGS]; Xstatic char Esc = Ctrl('a'); Xstatic char MetaEsc = 'a'; Xstatic char *home; Xstatic HasWindow; Xstatic utmp, utmpf; Xstatic char UtmpName[] = "/etc/utmp"; Xstatic char *LoginName; Xstatic char *BellString = "Bell in window %"; Xstatic mflag, nflag, fflag, rflag; Xstatic char HostName[MAXSTR]; Xstatic Detached; Xstatic AttacherPid; /* Non-Zero in child if we have an attacher */ Xstatic DevTty; X#ifdef SYSV Xstatic char proexec = 0; Xstatic char chanopen = 0; X#endif X#ifdef LOADAV X static char KmemName[] = "/dev/kmem"; X#ifdef sequent X static char UnixName[] = "/dynix"; X#else X#ifdef sgi X static char UnixName[] = "/unix"; X#else X static char UnixName[] = "/vmunix"; X#endif X#endif X#ifdef alliant X static char AvenrunSym[] = "_Loadavg"; X#else X#ifdef sgi X static char AvenrunSym[] = "avenrun"; X#else X static char AvenrunSym[] = "_avenrun"; X#endif X#endif X static struct nlist nl[2]; X static avenrun, kmemf; X#ifdef SUNLOADAV X long loadav[3]; X#else X#ifdef alliant X long loadav[4]; X#else X double loadav[3]; X#endif X#endif X X#ifdef sgi X#ifndef FSCALE X#define FSCALE 1000 X#endif X#endif X X#endif X Xstruct mode { X#ifdef SYSV X struct termio m_tty; X int m_oldpgrp; X#else X struct sgttyb m_ttyb; X struct tchars m_tchars; X struct ltchars m_ltchars; X int m_ldisc; X int m_lmode; X#endif X} OldMode, NewMode; X Xstatic struct win *curr, *other; Xstatic CurrNum, OtherNum; Xstatic struct win *wtab[MAXWIN]; X X#define KEY_IGNORE 0 X#define KEY_HARDCOPY 1 X#define KEY_SUSPEND 2 X#define KEY_SHELL 3 X#define KEY_NEXT 4 X#define KEY_PREV 5 X#define KEY_KILL 6 X#define KEY_REDISPLAY 7 X#define KEY_WINDOWS 8 X#define KEY_VERSION 9 X#define KEY_OTHER 10 X#define KEY_0 11 X#define KEY_1 12 X#define KEY_2 13 X#define KEY_3 14 X#define KEY_4 15 X#define KEY_5 16 X#define KEY_6 17 X#define KEY_7 18 X#define KEY_8 19 X#define KEY_9 20 X#define KEY_XON 21 X#define KEY_XOFF 22 X#define KEY_INFO 23 X#define KEY_TERMCAP 24 X#define KEY_QUIT 25 X#define KEY_DETACH 26 X#define KEY_CREATE 27 X Xstruct key { X int type; X char **args; X} ktab[256]; X Xchar *KeyNames[] = { X "hardcopy", "suspend", "shell", "next", "prev", "kill", "redisplay", X "windows", "version", "other", "select0", "select1", "select2", "select3", X "select4", "select5", "select6", "select7", "select8", "select9", X "xon", "xoff", "info", "termcap", "quit", "detach", X 0 X}; X Xmain (ac, av) char **av; { X register n, len; X register struct win **pp, *p; X char *ap; X int s, r, w, x = 0; X int aflag = 0; X struct timeval tv; X time_t now; X char buf[IOSIZE], *myname = (ac == 0) ? "screen" : av[0]; X char rc[256]; X struct stat st; X X while (ac > 0) { X ap = *++av; X if (--ac > 0 && *ap == '-') { X switch (ap[1]) { X case 'c': /* Compatibility with older versions. */ X break; X case 'a': X aflag = 1; X break; X case 'm': X mflag = 1; X break; X case 'n': X nflag = 1; X break; X case 'f': X fflag = 1; X break; X case 'r': X rflag = 1; X if (ap[2]) { X SockName = ap+2; X if (ac != 1) goto help; X } else if (--ac == 1) { X SockName = *++av; X } else if (ac != 0) goto help; X break; X case 'e': X if (ap[2]) { X ap += 2; X } else { X if (--ac == 0) goto help; X ap = *++av; X } X if (strlen (ap) != 2) X Msg (0, "Two characters are required with -e option."); X Esc = ap[0]; X MetaEsc = ap[1]; X break; X default: X help: X Msg (0, "Use: %s [-a] [-f] [-n] [-e xy] [cmd args]\n\ X or: %s -r [host.tty.pid]", myname, myname); X } X } else break; X } X if (nflag && fflag) X Msg (0, "-f and -n are conflicting options."); X if ((ShellProg = getenv ("SHELL")) == 0) X ShellProg = DefaultShell; X#ifdef SYSV X#define MINUSMAX 32 X if (ac == 0) { X char shbuf[MINUSMAX]; X char *s; X X if ((s = strrchr(ShellProg, '/')) == NULL) s = ShellProg; else s++; X strcpy(shbuf, "-"); X if (strlen(s) + 2 > MINUSMAX) X Msg(0, "Path to shell in SHELL variable is too long."); X strcat(shbuf, s); X ShellArgs[0] = shbuf; X ac = 1; X av = ShellArgs; X proexec = 1; X } X#else X ShellArgs[0] = ShellProg; X if (ac == 0) { X ac = 1; X av = ShellArgs; X } X#endif X if ((home = getenv ("HOME")) == 0) X Msg (0, "$HOME is undefined."); X#ifdef sgi X { X struct utsname ubuf; X X /* X * Releases eariler than 3.3 don't handle X * SIGCONT properly, so disable the facility. X */ X uname(&ubuf); X if (strncmp(ubuf.release, "4D1-", 4) == 0) { X if (ubuf.release[4] >= '3' && X ubuf.release[6] >= '3') X is3_3 = 1; X } X } X#endif X sprintf (SockPath, "%s/%s", home, SockDir); X if (stat (SockPath, &st) == -1) { X if (errno == ENOENT) { X if (mkdir (SockPath, 0700) == -1) X Msg (errno, "Cannot make directory %s", SockPath); X (void) chown (SockPath, getuid (), getgid ()); X } else Msg (errno, "Cannot get status of %s", SockPath); X } else { X if ((st.st_mode & S_IFMT) != S_IFDIR) X Msg (0, "%s is not a directory.", SockPath); X if ((st.st_mode & 0777) != 0700) X Msg (0, "Directory %s must have mode 700.", SockPath); X if (st.st_uid != getuid ()) X Msg (0, "You are not the owner of %s.", SockPath); X } X (void) gethostname (HostName, MAXSTR); X HostName[MAXSTR-1] = '\0'; X if (ap = index (HostName, '.')) X *ap = '\0'; X strcat (SockPath, "/"); X SockNamePtr = SockPath + strlen (SockPath); X if ((DevTty = open ("/dev/tty", O_RDWR|O_NDELAY)) == -1) X Msg (errno, "/dev/tty"); X if (rflag) { X Attach (MSG_ATTACH); X Attacher (); X /*NOTREACHED*/ X } X if (GetSockName ()) { X s = MakeClientSocket (1); X SendCreateMsg (s, ac, av, aflag); X close (s); X exit (0); X } X switch (fork ()) { X case -1: X Msg (errno, "fork"); X /*NOTREACHED*/ X case 0: X break; X default: X Attacher (); X /*NOTREACHED*/ X } X AttacherPid = getppid (); X ServerSocket = s = MakeServerSocket (); X InitTerm (); X if (fflag) X flowctl = 1; X else if (nflag) X flowctl = 0; X MakeNewEnv (); X GetTTY (0, &OldMode); X#ifdef SYSV X ospeed = (short)(OldMode.m_tty.c_cflag & CBAUD); X#else X ospeed = (short)OldMode.m_ttyb.sg_ospeed; X#endif X InitUtmp (); X#ifdef LOADAV X InitKmem (); X#endif X signal (SIGHUP, SigHup); X signal (SIGINT, Finit); X signal (SIGQUIT, Finit); X signal (SIGTERM, Finit); X signal (SIGTTIN, SIG_IGN); X signal (SIGTTOU, SIG_IGN); X InitKeytab (); X sprintf (rc, "%.*s/.screenrc", 245, home); X ReadRc (rc); X#ifdef SYSV X if ((n = MakeWindow ((proexec ? ShellProg : *av), X av, aflag, 0, (char *)0)) == -1) { X#else X if ((n = MakeWindow (ShellProg, av, aflag, 0, (char *)0)) == -1) { X#endif X SetTTY (0, &OldMode); X FinitTerm (); X Kill (AttacherPid, SIGHUP); X#ifdef SYSV X if (chanopen) X unlink(SockPath); X#endif X exit (1); X } X SetCurrWindow (n); X HasWindow = 1; X SetMode (&OldMode, &NewMode); X SetTTY (0, &NewMode); X signal (SIGCHLD, SigChld); X tv.tv_usec = 0; X while (1) { X if (status) { X time (&now); X if (now - TimeDisplayed < MSGWAIT) { X tv.tv_sec = MSGWAIT - (now - TimeDisplayed); X } else RemoveStatus (curr); X } X r = 0; X w = 0; X if (inlen) X w |= 1 << curr->ptyfd; X else X r |= 1 << 0; X for (pp = wtab; pp < wtab+MAXWIN; ++pp) { X if (!(p = *pp)) X continue; X if ((*pp)->active && status) X continue; X if ((*pp)->outlen > 0) X continue; X r |= 1 << (*pp)->ptyfd; X } X r |= 1 << s; X (void) fflush (stdout); X if (GotSignal && !status) { X SigHandler (); X continue; X } X if (select (32, &r, &w, &x, status ? &tv : (struct timeval *)0) == -1) { X if (errno == EINTR) X continue; X HasWindow = 0; X Msg (errno, "select"); X /*NOTREACHED*/ X } X if (GotSignal && !status) { X SigHandler (); X continue; X } X if (r & (1 << s)) { X RemoveStatus (curr); X ReceiveMsg (s); X } X if (r & (1 << 0)) { X RemoveStatus (curr); X if (ESCseen) { X inbuf[0] = Esc; X inlen = read (0, inbuf+1, IOSIZE-1) + 1; X ESCseen = 0; X } else { X inlen = read (0, inbuf, IOSIZE); X } X if (inlen > 0) X inlen = ProcessInput (inbuf, inlen); X if (inlen > 0) X continue; X } X if (GotSignal && !status) { X SigHandler (); X continue; X } X if (w & (1 << curr->ptyfd) && inlen > 0) { X if ((len = write (curr->ptyfd, inbuf, inlen)) > 0) { X inlen -= len; X bcopy (inbuf+len, inbuf, inlen); X } X } X if (GotSignal && !status) { X SigHandler (); X continue; X } X for (pp = wtab; pp < wtab+MAXWIN; ++pp) { X if (!(p = *pp)) X continue; X if (p->outlen) { X WriteString (p, p->outbuf, p->outlen); X } else if (r & 1 << p->ptyfd) { X if ((len = read (p->ptyfd, buf, IOSIZE)) == -1) { X if (errno == EWOULDBLOCK) X len = 0; X } X if (len > 0) X WriteString (p, buf, len); X } X if (p->bell) { X p->bell = 0; X Msg (0, MakeBellMsg (pp-wtab)); X } X } X if (GotSignal && !status) X SigHandler (); X } X /*NOTREACHED*/ X} X Xstatic SigHandler () { X while (GotSignal) { X GotSignal = 0; X DoWait (); X } X} X Xstatic SigChld () { X GotSignal = 1; X} X Xstatic SigHup () { X Detach (0); X} X Xstatic DoWait () { X register pid; X register struct win **pp; X union wait wstat; X X while ((pid = wait3 (&wstat, WNOHANG|WUNTRACED, NULL)) > 0) { X for (pp = wtab; pp < wtab+MAXWIN; ++pp) { X if (*pp && pid == (*pp)->wpid) { X if (WIFSTOPPED (wstat)) { X (void) killpg (getpgrp ((*pp)->wpid), SIGCONT); X } else { X KillWindow (pp); X } X } X } X } X#ifdef SYSV X signal(SIGCHLD, SigChld); X#endif X CheckWindows (); X} X Xstatic KillWindow (pp) struct win **pp; { X if (*pp == curr) X curr = 0; X if (*pp == other) X other = 0; X FreeWindow (*pp); X *pp = 0; X} X Xstatic CheckWindows () { X register struct win **pp; X X /* If the current window disappeared and the "other" window is still X * there, switch to the "other" window, else switch to the window X * with the lowest index. X * If there current window is still there, but the "other" window X * vanished, "SetCurrWindow" is called in order to assign a new value X * to "other". X * If no window is alive at all, exit. X */ X if (!curr && other) { X SwitchWindow (OtherNum); X return; X } X if (curr && !other) { X SetCurrWindow (CurrNum); X return; X } X for (pp = wtab; pp < wtab+MAXWIN; ++pp) { X if (*pp) { X if (!curr) X SwitchWindow (pp-wtab); X return; X } X } X Finit (); X} X Xstatic Finit () { X register struct win *p, **pp; X X for (pp = wtab; pp < wtab+MAXWIN; ++pp) { X if (p = *pp) X FreeWindow (p); X } X SetTTY (0, &OldMode); X FinitTerm (); X printf ("[screen is terminating]\n"); X Kill (AttacherPid, SIGHUP); X#ifdef SYSV X if (chanopen) X unlink(SockPath); X#endif X exit (0); X} X Xstatic InitKeytab () { X register i; X X ktab['h'].type = ktab[Ctrl('h')].type = KEY_HARDCOPY; X ktab['z'].type = ktab[Ctrl('z')].type = KEY_SUSPEND; X ktab['c'].type = ktab[Ctrl('c')].type = KEY_SHELL; X ktab[' '].type = ktab[Ctrl(' ')].type = X ktab['n'].type = ktab[Ctrl('n')].type = KEY_NEXT; X ktab['-'].type = ktab['p'].type = ktab[Ctrl('p')].type = KEY_PREV; X ktab['k'].type = ktab[Ctrl('k')].type = KEY_KILL; X ktab['l'].type = ktab[Ctrl('l')].type = KEY_REDISPLAY; X ktab['w'].type = ktab[Ctrl('w')].type = KEY_WINDOWS; X ktab['v'].type = ktab[Ctrl('v')].type = KEY_VERSION; X ktab['q'].type = ktab[Ctrl('q')].type = KEY_XON; X ktab['s'].type = ktab[Ctrl('s')].type = KEY_XOFF; X ktab['t'].type = ktab[Ctrl('t')].type = KEY_INFO; X ktab['.'].type = KEY_TERMCAP; X ktab[Ctrl('\\')].type = KEY_QUIT; X ktab['d'].type = ktab[Ctrl('d')].type = KEY_DETACH; X ktab[Esc].type = KEY_OTHER; X for (i = 0; i <= 9; i++) X ktab[i+'0'].type = KEY_0+i; X} X Xstatic ProcessInput (buf, len) char *buf; { X register n, k; X register char *s, *p; X register struct win **pp; X X for (s = p = buf; len > 0; len--, s++) { X if (*s == Esc) { X if (len > 1) { X len--; s++; X k = ktab[*s].type; X if (*s == MetaEsc) { X *p++ = Esc; X } else if (k >= KEY_0 && k <= KEY_9) { X p = buf; X SwitchWindow (k - KEY_0); X } else switch (ktab[*s].type) { X case KEY_TERMCAP: X p = buf; X WriteFile (0); X break; X case KEY_HARDCOPY: X p = buf; X WriteFile (1); X break; X case KEY_SUSPEND: X#ifdef sgi X if (!is3_3) { X Msg(0,"Suspend not supported on this release"); X break; X } X#endif X p = buf; X Detach (1); X break; X case KEY_SHELL: X p = buf; X if ((n = MakeWindow (ShellProg, ShellArgs, X 0, 0, (char *)0)) != -1) X SwitchWindow (n); X break; X case KEY_NEXT: X p = buf; X if (MoreWindows ()) X SwitchWindow (NextWindow ()); X break; X case KEY_PREV: X p = buf; X if (MoreWindows ()) X SwitchWindow (PreviousWindow ()); X break; X case KEY_KILL: X p = buf; X FreeWindow (wtab[CurrNum]); X if (other == curr) X other = 0; X curr = wtab[CurrNum] = 0; X CheckWindows (); X break; X case KEY_QUIT: X for (pp = wtab; pp < wtab+MAXWIN; ++pp) X if (*pp) FreeWindow (*pp); X Finit (); X /*NOTREACHED*/ X case KEY_DETACH: X p = buf; X Detach (0); X break; X case KEY_REDISPLAY: X p = buf; X Activate (wtab[CurrNum]); X break; X case KEY_WINDOWS: X p = buf; X ShowWindows (); X break; X case KEY_VERSION: X p = buf; X Msg (0, "%s %s", ScreenVersion, AnsiVersion); X break; X case KEY_INFO: X p = buf; X ShowInfo (); X break; X case KEY_OTHER: X p = buf; X if (MoreWindows ()) X SwitchWindow (OtherNum); X break; X case KEY_XON: X *p++ = Ctrl('q'); X break; X case KEY_XOFF: X *p++ = Ctrl('s'); X break; X case KEY_CREATE: X p = buf; X if ((n = MakeWindow (ktab[*s].args[0], ktab[*s].args, X 0, 0, (char *)0)) != -1) X SwitchWindow (n); X break; X } X } else ESCseen = 1; X } else *p++ = *s; X } X return p - buf; X} X Xstatic SwitchWindow (n) { X if (!wtab[n]) X return; X SetCurrWindow (n); X Activate (wtab[n]); X} X Xstatic SetCurrWindow (n) { X /* X * If we come from another window, this window becomes the X * "other" window: X */ X if (curr) { X curr->active = 0; X other = curr; X OtherNum = CurrNum; X } X CurrNum = n; X curr = wtab[n]; X curr->active = 1; X /* X * If the "other" window is currently undefined (at program start X * or because it has died), or if the "other" window is equal to the X * one just selected, we try to find a new one: X */ X if (other == 0 || other == curr) { X OtherNum = NextWindow (); X other = wtab[OtherNum]; X } X} X Xstatic NextWindow () { X register struct win **pp; X X for (pp = wtab+CurrNum+1; pp != wtab+CurrNum; ++pp) { X if (pp == wtab+MAXWIN) X pp = wtab; X if (*pp) X break; X } X return pp-wtab; X} X Xstatic PreviousWindow () { X register struct win **pp; X X for (pp = wtab+CurrNum-1; pp != wtab+CurrNum; --pp) { X if (pp < wtab) X pp = wtab+MAXWIN-1; X if (*pp) X break; X } X return pp-wtab; X} X Xstatic MoreWindows () { X register struct win **pp; X register n; X X for (n = 0, pp = wtab; pp < wtab+MAXWIN; ++pp) X if (*pp) ++n; X if (n <= 1) X Msg (0, "No other window."); X return n > 1; X} X Xstatic FreeWindow (wp) struct win *wp; { X register i; X X RemoveUtmp (wp->slot); X (void) chmod (wp->tty, 0666); X (void) chown (wp->tty, 0, 0); X close (wp->ptyfd); X for (i = 0; i < rows; ++i) { X free (wp->image[i]); X free (wp->attr[i]); X free (wp->font[i]); X } X free (wp->image); X free (wp->attr); X free (wp->font); X free (wp); X} X Xstatic MakeWindow (prog, args, aflag, StartAt, dir) X char *prog, **args, *dir; { X register struct win **pp, *p; X register char **cp; X register n, f; X int tf; X int mypid; X char ebuf[10]; X X pp = wtab+StartAt; X do { X if (*pp == 0) X break; X if (++pp == wtab+MAXWIN) X pp = wtab; X } while (pp != wtab+StartAt); X if (*pp) { X Msg (0, "No more windows."); X return -1; X } X n = pp - wtab; X if ((f = OpenPTY ()) == -1) { X Msg (0, "No more PTYs."); X return -1; X } X (void) fcntl (f, F_SETFL, FNDELAY); X if ((p = *pp = (struct win *)malloc (sizeof (struct win))) == 0) { Xnomem: X Msg (0, "Out of memory."); X return -1; X } X if ((p->image = (char **)malloc (rows * sizeof (char *))) == 0) X goto nomem; X for (cp = p->image; cp < p->image+rows; ++cp) { X if ((*cp = malloc (cols)) == 0) X goto nomem; X bclear (*cp, cols); X } X if ((p->attr = (char **)malloc (rows * sizeof (char *))) == 0) X goto nomem; X for (cp = p->attr; cp < p->attr+rows; ++cp) { X if ((*cp = malloc (cols)) == 0) X goto nomem; X bzero (*cp, cols); X } X if ((p->font = (char **)malloc (rows * sizeof (char *))) == 0) X goto nomem; X for (cp = p->font; cp < p->font+rows; ++cp) { X if ((*cp = malloc (cols)) == 0) X goto nomem; X bzero (*cp, cols); X } X if ((p->tabs = malloc (cols+1)) == 0) /* +1 because 0 <= x <= cols */ X goto nomem; X ResetScreen (p); X p->aflag = aflag; X p->active = 0; X p->bell = 0; X p->outlen = 0; X p->ptyfd = f; X strncpy (p->cmd, Filename (args[0]), MAXSTR-1); X p->cmd[MAXSTR-1] = '\0'; X strncpy (p->tty, TtyName, MAXSTR-1); X (void) chown (TtyName, getuid (), getgid ()); X (void) chmod (TtyName, TtyMode); X p->slot = SetUtmp (TtyName); X switch (p->wpid = fork ()) { X case -1: X Msg (errno, "fork"); X free ((char *)p); X return -1; X case 0: X signal (SIGHUP, SIG_DFL); X signal (SIGINT, SIG_DFL); X signal (SIGQUIT, SIG_DFL); X signal (SIGTERM, SIG_DFL); X signal (SIGTTIN, SIG_DFL); X signal (SIGTTOU, SIG_DFL); X setuid (getuid ()); X setgid (getgid ()); X if (dir && chdir (dir) == -1) { X SendErrorMsg ("Cannot chdir to %s: %s", dir, sys_errlist[errno]); X exit (1); X } X mypid = getpid (); X ioctl (DevTty, TIOCNOTTY, (char *)0); X if ((tf = open (TtyName, O_RDWR)) == -1) { X SendErrorMsg ("Cannot open %s: %s", TtyName, sys_errlist[errno]); X exit (1); X } X (void) dup2 (tf, 0); X (void) dup2 (tf, 1); X (void) dup2 (tf, 2); X for (f = getdtablesize () - 1; f > 2; f--) X close (f); X ioctl (0, TIOCSPGRP, &mypid); X (void) setpgrp (0, mypid); X SetTTY (0, &OldMode); X NewEnv[2] = MakeTermcap (aflag); X sprintf (ebuf, "WINDOW=%d", n); X NewEnv[3] = ebuf; X execvpe (prog, args, NewEnv); X SendErrorMsg ("Cannot exec %s: %s", prog, sys_errlist[errno]); X exit (1); X } X return n; X} X Xstatic execvpe (prog, args, env) char *prog, **args, **env; { X register char *path, *p; X char buf[1024]; X char *shargs[MAXARGS+1]; X register i, eaccess = 0; X X if (prog[0] == '/') X path = ""; X else if ((path = getenv ("PATH")) == 0) X path = DefaultPath; X do { X p = buf; X while (*path && *path != ':') X *p++ = *path++; X if (p > buf) X *p++ = '/'; X strcpy (p, prog); X if (*path) X ++path; X execve (buf, args, env); X switch (errno) { X case ENOEXEC: X shargs[0] = DefaultShell; X shargs[1] = buf; X for (i = 1; shargs[i+1] = args[i]; ++i) X ; X execve (DefaultShell, shargs, env); X return; X case EACCES: X eaccess = 1; X break; X case ENOMEM: case E2BIG: case ETXTBSY: X return; X } X } while (*path); X if (eaccess) X errno = EACCES; X} X Xstatic WriteFile (dump) { /* dump==0: create .termcap, dump==1: hardcopy */ X register i, j, k; X register char *p; X register FILE *f; X char fn[1024]; X int pid, s; X X if (dump) X sprintf (fn, "hardcopy.%d", CurrNum); X else X sprintf (fn, "%s/%s/.termcap", home, SockDir); X switch (pid = fork ()) { X case -1: X Msg (errno, "fork"); X return; X case 0: X setuid (getuid ()); X setgid (getgid ()); X if ((f = fopen (fn, "w")) == NULL) X exit (1); X if (dump) { X for (i = 0; i < rows; ++i) { X p = curr->image[i]; X for (k = cols-1; k >= 0 && p[k] == ' '; --k) ; X for (j = 0; j <= k; ++j) X putc (p[j], f); X putc ('\n', f); X } X } else { X if (p = index (MakeTermcap (curr->aflag), '=')) { X fputs (++p, f); X putc ('\n', f); X } X } X (void) fclose (f); X exit (0); X default: X while ((i = wait (&s)) != pid) X if (i == -1) return; X if ((s >> 8) & 0377) X Msg (0, "Cannot open \"%s\".", fn); X else X Msg (0, "%s written to \"%s\".", dump ? "Screen image" : X "Termcap entry", fn); X } X} X Xstatic ShowWindows () { X char buf[1024]; X register char *s; X register struct win **pp, *p; X X for (s = buf, pp = wtab; pp < wtab+MAXWIN; ++pp) { X if ((p = *pp) == 0) X continue; X if (s - buf + 5 + strlen (p->cmd) > cols-1) X break; X if (s > buf) { X *s++ = ' '; *s++ = ' '; X } X *s++ = pp - wtab + '0'; X if (p == curr) X *s++ = '*'; X else if (p == other) X *s++ = '-'; X *s++ = ' '; X strcpy (s, p->cmd); X s += strlen (s); X } X Msg (0, buf); X} X Xstatic ShowInfo () { X char buf[1024], *p; X register struct win *wp = curr; X register i; X struct tm *tp; X time_t now; X X time (&now); X tp = localtime (&now); X sprintf (buf, "%2d:%02.2d:%02.2d %s", tp->tm_hour, tp->tm_min, tp->tm_sec, X HostName); X#ifdef LOADAV X if (avenrun && GetAvenrun ()) { X p = buf + strlen (buf); X#ifdef SUNLOADAV X sprintf (p, " %2.2f %2.2f %2.2f", (double)loadav[0]/FSCALE, X (double)loadav[1]/FSCALE, (double)loadav[2]/FSCALE); X#else X#ifdef alliant X sprintf (p, " %2.2f %2.2f %2.2f %2.2f", (double)loadav[0]/100, X (double)loadav[1]/100, (double)loadav[2]/100, X (double)loadav[3]/100); X#else X sprintf (p, " %2.2f %2.2f %2.2f", loadav[0], loadav[1], loadav[2]); X#endif X#endif X } X#endif X p = buf + strlen (buf); X sprintf (p, " (%d,%d) %cflow %cins %corg %cwrap %cpad", wp->y, wp->x, X flowctl ? '+' : '-', X wp->insert ? '+' : '-', wp->origin ? '+' : '-', X wp->wrap ? '+' : '-', wp->keypad ? '+' : '-'); X if (ISO2022) { X p = buf + strlen (buf); X sprintf (p, " G%1d [", wp->LocalCharset); X for (i = 0; i < 4; i++) X p[i+5] = wp->charsets[i] ? wp->charsets[i] : 'B'; X p[9] = ']'; X p[10] = '\0'; X } X Msg (0, buf); X} X X#ifdef sgi Xstatic int XOpenPTY() X{ X int fd; X int pnum; X struct stat sb; X X fd = open("/dev/ptc", O_RDWR|O_NDELAY); X if (fd >= 0) { X if (fstat(fd, &sb) < 0) { X close(fd); X return -1; X } X pnum = minor(sb.st_rdev); X sprintf(TtyName, "/dev/ttyq%d", pnum); X } X return fd; X} X#else Xstatic OpenPTY () { X register char *p, *l, *d; X register i, f, tf; X X strcpy (PtyName, PtyProto); X strcpy (TtyName, TtyProto); X for (p = PtyName, i = 0; *p != 'X'; ++p, ++i) ; X for (l = "qpr"; *p = *l; ++l) { X for (d = "0123456789abcdef"; p[1] = *d; ++d) { X if ((f = open (PtyName, O_RDWR)) != -1) { X TtyName[i] = p[0]; X TtyName[i+1] = p[1]; X if ((tf = open (TtyName, O_RDWR)) != -1) { X close (tf); X return f; X } X close (f); X } X } X } X return -1; X} X#endif X Xstatic SetTTY (fd, mp) struct mode *mp; { X#ifdef SYSV X ioctl (fd, TCSETA, &mp->m_tty); X#else X ioctl (fd, TIOCSETP, &mp->m_ttyb); X ioctl (fd, TIOCSETC, &mp->m_tchars); X ioctl (fd, TIOCSLTC, &mp->m_ltchars); X ioctl (fd, TIOCLSET, &mp->m_lmode); X ioctl (fd, TIOCSETD, &mp->m_ldisc); X#endif X} X Xstatic GetTTY (fd, mp) struct mode *mp; { X#ifdef SYSV X ioctl (fd, TCGETA, &mp->m_tty); X#else X ioctl (fd, TIOCGETP, &mp->m_ttyb); X ioctl (fd, TIOCGETC, &mp->m_tchars); X ioctl (fd, TIOCGLTC, &mp->m_ltchars); X ioctl (fd, TIOCLGET, &mp->m_lmode); X ioctl (fd, TIOCGETD, &mp->m_ldisc); X#endif X} X Xstatic SetMode (op, np) struct mode *op, *np; { X *np = *op; X#ifdef SYSV X np->m_tty.c_lflag = 0; X np->m_tty.c_iflag = IGNBRK; X np->m_tty.c_oflag = 0; X if (flowctl) X np->m_tty.c_iflag |= IXON|IXOFF; X np->m_tty.c_cc[VMIN] = 1; X np->m_tty.c_cc[VTIME] = 0; X#else X np->m_ttyb.sg_flags &= ~(CRMOD|ECHO); X np->m_ttyb.sg_flags |= CBREAK; X np->m_tchars.t_intrc = -1; X np->m_tchars.t_quitc = -1; X if (!flowctl) { X np->m_tchars.t_startc = -1; X np->m_tchars.t_stopc = -1; X } X np->m_ltchars.t_suspc = -1; X np->m_ltchars.t_dsuspc = -1; X np->m_ltchars.t_flushc = -1; X np->m_ltchars.t_lnextc = -1; X#endif X} X Xstatic char *GetTtyName () { X register char *p; X register n; X X for (p = 0, n = 0; n <= 2 && !(p = ttyname (n)); n++) X ; X if (!p || *p == '\0') X Msg (0, "screen must run on a tty."); X return p; X} X Xstatic ScreenInUse () { X Msg (0, "The screen is already attached elsewhere."); X} X Xstatic Attach (how) { X register s, lasts, found = 0; X register DIR *dirp; X register struct direct *dp; X struct msg m; X char last[MAXNAMLEN+1]; X X if (SockName) { X if ((lasts = MakeClientSocket (0)) == -1) X if (how == MSG_CONT) X Msg (0, X "This screen has already been continued from elsewhere."); X else X Msg (0, "There is no screen to be resumed from %s", SockName); X } else { X if ((dirp = opendir (SockPath)) == NULL) X Msg (0, "Cannot open %s", SockPath); X while ((dp = readdir (dirp)) != NULL) { X SockName = dp->d_name; X if (SockName[0] == '.') X continue; X if ((s = MakeClientSocket (0)) != -1) { X if (found == 0) { X strcpy (last, SockName); X lasts = s; X } else { X if (found == 1) { X printf ("There are detached screens on:\n"); X printf (" %s\n", last); X close (lasts); X } X printf (" %s\n", SockName); X close (s); X#ifdef SYSV X chanopen = 0; X#endif X } X found++; X } X } X if (found == 0) X Msg (0, "There is no screen to be resumed."); X if (found > 1) X#ifdef SYSV X Msg (0, "Type \"screen -r host.tty.pid\" to resume one of them."); X#else X Msg (0, "Type \"screen -r host.tty\" to resume one of them."); X#endif X closedir (dirp); X strcpy (SockNamePtr, last); X SockName = SockNamePtr; X } X m.type = how; X strcpy (m.m.attach.tty, GetTtyName ()); X m.m.attach.apid = getpid (); X /* X * Don't overlook the fact that we could get SIGHUP as a result X * of this call, if we attempt to attach to a window which is X * not detached. If we do, issue a meaningful message. X */ X signal(SIGHUP, ScreenInUse); X if (write (lasts, (char *)&m, sizeof (m)) != sizeof (m)) X Msg (errno, "write"); X} X Xstatic AttacherFinit () { X exit (0); X} X Xstatic ReAttach () { X Attach (MSG_CONT); X#ifdef SYSV X signal(SIGCONT, ReAttach); X#endif X} X Xstatic Attacher () { X signal (SIGHUP, AttacherFinit); X signal (SIGCONT, ReAttach); X while (1) X pause (); X} X Xstatic Detach (suspend) { X register struct win **pp; X X if (Detached) X return; X signal (SIGHUP, SIG_IGN); X SetTTY (0, &OldMode); X FinitTerm (); X if (suspend) { X Kill (AttacherPid, SIGTSTP); X } else { X for (pp = wtab; pp < wtab+MAXWIN; ++pp) X if (*pp) RemoveUtmp ((*pp)->slot); X printf ("\n[detached]\n"); X Kill (AttacherPid, SIGHUP); X AttacherPid = 0; X } X close (0); X close (1); X close (2); X ioctl (DevTty, TIOCNOTTY, (char *)0); X Detached = 1; X do { X ReceiveMsg (ServerSocket); X } while (Detached); X if (!suspend) X for (pp = wtab; pp < wtab+MAXWIN; ++pp) X if (*pp) (*pp)->slot = SetUtmp ((*pp)->tty); X signal (SIGHUP, SigHup); X} X Xstatic Kill (pid, sig) { X if (pid != 0) X (void) kill (pid, sig); X} X Xstatic GetSockName () { X register client; X static char buf[3*MAXSTR]; X X if (!mflag && (SockName = getenv ("STY")) != 0 && *SockName != '\0') { X client = 1; X setuid (getuid ()); X setgid (getgid ()); X } else { X#ifdef SYSV X sprintf (buf, "%s.%s.%d", HostName, Filename (GetTtyName ()), X getpid()); X#else X sprintf (buf, "%s.%s", HostName, Filename (GetTtyName ())); X#endif X SockName = buf; X client = 0; X } X return client; X} X Xstatic MakeServerSocket () { X register s; X#ifndef SYSV X struct sockaddr_un a; X#endif X char *p; X X#ifdef SYSV X int oflags; X X strcpy (SockNamePtr, SockName); X if (access(SockPath, 06) != -1) { X p = Filename (SockPath); X Msg (0, "You have already a screen running on %s.\n\ XIf it has been detached, try \"screen -r\".", p); X /*NOTREACHED*/ X } X if (mknod(SockPath, 010600) == -1) X Msg (errno, "named pipe"); X if ((s = open(SockPath, O_RDWR)) == -1) X Msg (errno, "named pipe open"); X chanopen = 1; X (void) chown (SockPath, getuid (), getgid ()); X return(s); X#else X if ((s = socket (AF_UNIX, SOCK_STREAM, 0)) == -1) X Msg (errno, "socket"); X a.sun_family = AF_UNIX; X strcpy (SockNamePtr, SockName); X strcpy (a.sun_path, SockPath); X if (connect (s, (struct sockaddr *)&a, strlen (SockPath)+2) != -1) { X p = Filename (SockPath); X Msg (0, "You have already a screen running on %s.\n\ XIf it has been detached, try \"screen -r\".", p); X /*NOTREACHED*/ X } X if (bind (s, (struct sockaddr *)&a, strlen (SockPath)+2) == -1) X Msg (errno, "bind"); X (void) chown (SockPath, getuid (), getgid ()); X if (listen (s, 5) == -1) X Msg (errno, "listen"); X return s; X#endif X} X Xstatic MakeClientSocket (err) { X register s; X#ifndef SYSV X struct sockaddr_un a; X#endif X X#ifdef SYSV X int oflags; X X strcpy (SockNamePtr, SockName); X if ((s = open(SockPath, O_WRONLY|O_NDELAY)) == -1) { X if (err) { X Msg (errno, "connect: %s", SockPath); X } else { X close (s); X return -1; X } X } X chanopen = 1; X (void) chown (SockPath, getuid (), getgid ()); X oflags = fcntl(s, F_GETFL); X oflags &= ~O_NDELAY; X fcntl(s, F_SETFL, oflags); X#else X if ((s = socket (AF_UNIX, SOCK_STREAM, 0)) == -1) X Msg (errno, "socket"); X a.sun_family = AF_UNIX; X strcpy (SockNamePtr, SockName); X strcpy (a.sun_path, SockPath); X if (connect (s, (struct sockaddr *)&a, strlen (SockPath)+2) == -1) { X if (err) { X Msg (errno, "connect: %s", SockPath); X } else { X close (s); X return -1; X } X } X#endif X return s; X} X Xstatic SendCreateMsg (s, ac, av, aflag) char **av; { X struct msg m; X register char *p; X register len, n; X X m.type = MSG_CREATE; X p = m.m.create.line; X#ifdef SYSV X if (proexec) X strcpy(p, ShellProg); X else X strcpy(p, *av); X p = p + strlen(p) + 1; X#endif X for (n = 0; ac > 0 && n < MAXARGS-1; ++av, --ac, ++n) { X len = strlen (*av) + 1; X if (p + len >= m.m.create.line+MAXLINE) X break; X strcpy (p, *av); X p += len; X } X m.m.create.nargs = n; X m.m.create.aflag = aflag; X if (getwd (m.m.create.dir) == 0) X Msg (0, "%s", m.m.create.dir); X if (write (s, (char *)&m, sizeof (m)) != sizeof (m)) X Msg (errno, "write"); X} X X/*VARARGS1*/ Xstatic SendErrorMsg (fmt, p1, p2, p3, p4, p5, p6) char *fmt; { X register s; X struct msg m; X X s = MakeClientSocket (1); X m.type = MSG_ERROR; X sprintf (m.m.message, fmt, p1, p2, p3, p4, p5, p6); X (void) write (s, (char *)&m, sizeof (m)); X close (s); X sleep (2); X} X Xstatic ReceiveMsg (s) { X#ifndef SYSV X register ns; X struct sockaddr_un a; X int left, len = sizeof (a); X#else X int left, len; X#endif X struct msg m; X char *p; X X#ifndef SYSV X if ((ns = accept (s, (struct sockaddr *)&a, &len)) == -1) { X Msg (errno, "accept"); X return; X } X p = (char *)&m; X left = sizeof (m); X while (left > 0 && (len = read (ns, p, left)) > 0) { X p += len; X left -= len; X } X close (ns); X#else X p = (char *)&m; X len = read (s, p, sizeof(m)); X left = sizeof(m) - len; X#endif X if (len == -1) X Msg (errno, "read"); X if (left > 0) X return; X switch (m.type) { X case MSG_CREATE: X if (!Detached) X ExecCreate (&m); X break; X case MSG_CONT: X if (m.m.attach.apid != AttacherPid || !Detached) X break; /* Intruder Alert */ X /*FALLTHROUGH*/ X case MSG_ATTACH: X if (Detached) { X if (kill (m.m.attach.apid, 0) == 0 && X open (m.m.attach.tty, O_RDWR) == 0) { X (void) dup (0); X (void) dup (0); X AttacherPid = m.m.attach.apid; X Detached = 0; X GetTTY (0, &OldMode); X SetMode (&OldMode, &NewMode); X SetTTY (0, &NewMode); X Activate (wtab[CurrNum]); X } X } else { X Kill (m.m.attach.apid, SIGHUP); X Msg (0, "Not detached."); X } X break; X case MSG_ERROR: X Msg (0, "%s", m.m.message); X break; X default: X Msg (0, "Invalid message (type %d).", m.type); X } X} X Xstatic ExecCreate (mp) struct msg *mp; { X char *args[MAXARGS]; X register n; X register char **pp = args, *p = mp->m.create.line; X X#ifdef SYSV X char *xprog; X X xprog = p; X p += strlen(p) + 1; X#endif X for (n = mp->m.create.nargs; n > 0; --n) { X *pp++ = p; X p += strlen (p) + 1; X } X *pp = 0; X#ifdef SYSV X if ((n = MakeWindow (xprog, args, mp->m.create.aflag, 0, X#else X if ((n = MakeWindow (mp->m.create.line, args, mp->m.create.aflag, 0, X#endif X mp->m.create.dir)) != -1) X SwitchWindow (n); X} X Xstatic ReadRc (fn) char *fn; { X FILE *f; X register char *p, **pp, **ap; X register argc, num, c; X char buf[256]; X char *args[MAXARGS]; X int key; X X ap = args; X if (access (fn, R_OK) == -1) X return; X if ((f = fopen (fn, "r")) == NULL) X return; X while (fgets (buf, 256, f) != NULL) { X if (p = rindex (buf, '\n')) X *p = '\0'; X if ((argc = Parse (fn, buf, ap)) == 0) X continue; X if (strcmp (ap[0], "escape") == 0) { X p = ap[1]; X if (argc < 2 || strlen (p) != 2) X Msg (0, "%s: two characters required after escape.", fn); X Esc = *p++; X MetaEsc = *p; X } else if (strcmp (ap[0], "chdir") == 0) { X p = argc < 2 ? home : ap[1]; X if (chdir (p) == -1) X Msg (errno, "%s", p); X } else if (strcmp (ap[0], "mode") == 0) { X if (argc != 2) { X Msg (0, "%s: mode: one argument required.", fn); X } else if (!IsNum (ap[1], 7)) { X Msg (0, "%s: mode: octal number expected.", fn); X } else (void) sscanf (ap[1], "%o", &TtyMode); X } else if (strcmp (ap[0], "bell") == 0) { X if (argc != 2) { X Msg (0, "%s: bell: one argument required.", fn); X } else { X if ((BellString = malloc (strlen (ap[1]) + 1)) == 0) X Msg (0, "Out of memory."); X strcpy (BellString, ap[1]); X } X } else if (strcmp (ap[0], "screen") == 0) { X num = 0; X if (argc > 1 && IsNum (ap[1], 10)) { X num = atoi (ap[1]); X if (num < 0 || num > MAXWIN-1) X Msg (0, "%s: illegal screen number %d.", fn, num); X --argc; ++ap; X } X if (argc < 2) { X ap[1] = ShellProg; argc = 2; X } X ap[argc] = 0; X (void) MakeWindow (ap[1], ap+1, 0, num, (char *)0); X } else if (strcmp (ap[0], "bind") == 0) { X p = ap[1]; X if (argc < 2 || *p == '\0') X Msg (0, "%s: key expected after bind.", fn); X if (p[1] == '\0') { X key = *p; X } else if (p[0] == '^' && p[1] != '\0' && p[2] == '\0') { X c = p[1]; X if (isupper (c)) X p[1] = tolower (c); X key = Ctrl(c); X } else if (IsNum (p, 7)) { X (void) sscanf (p, "%o", &key); X } else { X Msg (0, X "%s: bind: character, ^x, or octal number expected.", fn); X } X if (argc < 3) { X ktab[key].type = 0; X } else { X for (pp = KeyNames; *pp; ++pp) X if (strcmp (ap[2], *pp) == 0) break; X if (*pp) { X ktab[key].type = pp-KeyNames+1; X } else { X ktab[key].type = KEY_CREATE; X ktab[key].args = SaveArgs (argc-2, ap+2); X } X } X } else Msg (0, "%s: unknown keyword \"%s\".", fn, ap[0]); X } X (void) fclose (f); X} X Xstatic Parse (fn, buf, args) char *fn, *buf, **args; { X register char *p = buf, **ap = args; X register delim, argc = 0; X X argc = 0; X for (;;) { X while (*p && (*p == ' ' || *p == '\t')) ++p; X if (*p == '\0' || *p == '#') X return argc; X if (argc > MAXARGS-1) X Msg (0, "%s: too many tokens.", fn); X delim = 0; X if (*p == '"' || *p == '\'') { X delim = *p; *p = '\0'; ++p; X } X ++argc; X *ap = p; ++ap; X while (*p && !(delim ? *p == delim : (*p == ' ' || *p == '\t'))) X ++p; X if (*p == '\0') { X if (delim) X Msg (0, "%s: Missing quote.", fn); X else X return argc; X } X *p++ = '\0'; X } X} X Xstatic char **SaveArgs (argc, argv) register argc; register char **argv; { X register char **ap, **pp; X X if ((pp = ap = (char **)malloc ((argc+1) * sizeof (char **))) == 0) X Msg (0, "Out of memory."); X while (argc--) { X if ((*pp = malloc (strlen (*argv)+1)) == 0) X Msg (0, "Out of memory."); X strcpy (*pp, *argv); X ++pp; ++argv; X } X *pp = 0; X return ap; X} X Xstatic MakeNewEnv () { X register char **op, **np = NewEnv; X static char buf[MAXSTR]; X char envbuf[MAXSTR]; X X if (strlen (SockName) > MAXSTR-5) X SockName = "?"; X sprintf (buf, "STY=%s", SockName); X *np++ = buf; X *np++ = Term; X np += 2; X#ifdef SYSV X sprintf(envbuf, "LINES=%d", rows); X *np++ = strdup(envbuf); X sprintf(envbuf, "COLS=%d", cols); X *np++ = strdup(envbuf); X#endif X for (op = environ; *op; ++op) { X if (np == NewEnv + MAXARGS - 1) X break; X if (!IsSymbol (*op, "TERM") && !IsSymbol (*op, "TERMCAP") X && !IsSymbol (*op, "STY")) X *np++ = *op; X } X *np = 0; X} X Xstatic IsSymbol (e, s) register char *e, *s; { X register char *p; X register n; X X for (p = e; *p && *p != '='; ++p) ; X if (*p) { X *p = '\0'; X n = strcmp (e, s); X *p = '='; X return n == 0; X } X return 0; X} X X/*VARARGS2*/ XMsg (err, fmt, p1, p2, p3, p4, p5, p6) char *fmt; { X char buf[1024]; X register char *p = buf; X X if (Detached) X return; X sprintf (p, fmt, p1, p2, p3, p4, p5, p6); X if (err) { X p += strlen (p); X if (err > 0 && err < sys_nerr) X sprintf (p, ": %s", sys_errlist[err]); X else X sprintf (p, ": Error %d", err); X } X if (HasWindow) { X MakeStatus (buf, curr); X } else { X printf ("%s\r\n", buf); X Kill (AttacherPid, SIGHUP); X#ifdef SYSV X if (chanopen && AttacherPid) X unlink(SockPath); X#endif X exit (1); X } X} X Xbclear (p, n) char *p; { X bcopy (blank, p, n); X} X Xstatic char *Filename (s) char *s; { X register char *p; X X p = s + strlen (s) - 1; X while (p >= s && *p != '/') --p; X return ++p; X} X Xstatic IsNum (s, base) register char *s; register base; { X for (base += '0'; *s; ++s) X if (*s < '0' || *s > base) X return 0; X return 1; X} X Xstatic char *MakeBellMsg (n) { X static char buf[MAXSTR]; X register char *p = buf, *s = BellString; X X for (s = BellString; *s && p < buf+MAXSTR-1; s++) X *p++ = (*s == '%') ? n + '0' : *s; X *p = '\0'; X return buf; X} X Xstatic InitUtmp () { X struct passwd *p; X X#ifdef SYSV X if (setutent() == NULL) X return; X#else X if ((utmpf = open (UtmpName, O_WRONLY)) == -1) { X if (errno != EACCES) X Msg (errno, UtmpName); X return; X } X#endif X if ((LoginName = getlogin ()) == 0 || LoginName[0] == '\0') { X if ((p = getpwuid (getuid ())) == 0) X return; X LoginName = p->pw_name; X } X utmp = 1; X} X Xstatic SetUtmp (name) char *name; { X register char *p; X register struct ttyent *tp; X register slot = 1; X struct utmp u; X X if (!utmp) X return 0; X if (p = rindex (name, '/')) X ++p; X else p = name; X#ifndef SYSV X setttyent (); X while ((tp = getttyent ()) != NULL && strcmp (p, tp->ty_name) != 0) X ++slot; X if (tp == NULL) X return 0; X strncpy (u.ut_line, p, 8); X time (&u.ut_time); X strncpy (u.ut_name, LoginName, 8); X u.ut_host[0] = '\0'; X (void) lseek (utmpf, (long)(slot * sizeof (u)), 0); X (void) write (utmpf, (char *)&u, sizeof (u)); X return slot; X#else X { X int len = strlen(p); X X setutent(); X bzero((char *) &u, sizeof(u)); X strncpy(u.ut_line, p, 8); X u.ut_type = USER_PROCESS; X strncpy (u.ut_name, LoginName, 8); X u.ut_id[0] = 's'; u.ut_id[3] = '\0'; X u.ut_id[1] = p[len - 2]; u.ut_id[2] = p[len - 1]; X slot = *((int *) u.ut_id); X time (&u.ut_time); X pututline(&u); X return slot; X } X#endif X} X Xstatic RemoveUtmp (slot) int slot; { X struct utmp u; X X if (slot) { X#ifdef SYSV X struct utmp *y; X X setutent(); X bzero((char *) &u, sizeof(u)); X *((int *) u.ut_id) = slot; X u.ut_type = USER_PROCESS; X if ((y = getutid(&u)) == 0) X return; X strncpy (u.ut_name, "screen", 8); X strncpy (u.ut_line, y->ut_line, 12); X u.ut_type = DEAD_PROCESS; X time (&u.ut_time); X pututline(&u); X#else X bzero ((char *)&u, sizeof (u)); X (void) lseek (utmpf, (long)(slot * sizeof (u)), 0); X (void) write (utmpf, (char *)&u, sizeof (u)); X#endif X } X} X X#ifndef SYSV X#ifndef GETTTYENT X Xstatic setttyent () { X struct stat s; X register f; X register char *p, *ep; X X if (ttnext) { X ttnext = tt; X return; X } X if ((f = open (ttys, O_RDONLY)) == -1 || fstat (f, &s) == -1) X Msg (errno, ttys); X if ((tt = malloc (s.st_size + 1)) == 0) X Msg (0, "Out of memory."); X if (read (f, tt, s.st_size) != s.st_size) X Msg (errno, ttys); X close (f); X for (p = tt, ep = p + s.st_size; p < ep; ++p) X if (*p == '\n') *p = '\0'; X *p = '\0'; X ttnext = tt; X} X Xstatic struct ttyent *getttyent () { X static struct ttyent t; X X if (*ttnext == '\0') X return NULL; X t.ty_name = ttnext + 2; X ttnext += strlen (ttnext) + 1; X return &t; X} X X#endif X#endif X X#ifdef LOADAV X Xstatic InitKmem () { X if ((kmemf = open (KmemName, O_RDONLY)) == -1) X return; X nl[0].n_name = AvenrunSym; X nlist (UnixName, nl); X if (nl[0].n_type == 0 || nl[0].n_value == 0) X return; X avenrun = 1; X} X Xstatic GetAvenrun () { X if (lseek (kmemf, nl[0].n_value & ~0x80000000, 0) == -1) X return 0; X if (read (kmemf, loadav, sizeof (loadav)) != sizeof (loadav)) X return 0; X return 1; X} X X#endif X X#ifndef USEBCOPY Xbcopy (s1, s2, len) register char *s1, *s2; register len; { X if (s1 < s2 && s2 < s1 + len) { X s1 += len; s2 += len; X while (len-- > 0) { X *--s2 = *--s1; X } X } else { X while (len-- > 0) { X *s2++ = *s1++; X } X } X} X#endif X X#ifdef SYSV Xkillpg(grp, sig) X int grp; X int sig; X{ X return( kill (-grp, sig) ); X} X#endif ________This_Is_The_END________ if test `wc -l < screen.c` -ne 1953; then echo 'shar: screen.c was damaged during transit (should have been 1953 bytes)' fi fi ; : end of overwriting check echo 'x - screen.h' if test -f screen.h; then echo 'shar: not overwriting screen.h'; else sed 's/^X//' << '________This_Is_The_END________' > screen.h X/* Copyright (c) 1987,1988 Oliver Laumann, Technical University of Berlin. X * Not derived from licensed software. X * X * Permission is granted to freely use, copy, modify, and redistribute X * this software, provided that no attempt is made to gain profit from it, X * the author is not construed to be liable for any results of using the X * software, alterations are clearly marked as such, and this notice is X * not modified. X */ X Xenum state_t { X LIT, /* Literal input */ X ESC, /* Start of escape sequence */ X STR, /* Start of control string */ X TERM, /* ESC seen in control string */ X CSI, /* Reading arguments in "CSI Pn ; Pn ; ... ; XXX" */ X PRIN, /* Printer mode */ X PRINESC, /* ESC seen in printer mode */ X PRINCSI, /* CSI seen in printer mode */ X PRIN4 /* CSI 4 seen in printer mode */ X}; X Xenum string_t { X NONE, X DCS, /* Device control string */ X OSC, /* Operating system command */ X APC, /* Application program command */ X PM, /* Privacy message */ X}; X X#define MAXSTR 128 X#define MAXARGS 64 X X#define IOSIZE 80 X Xstruct win { X int wpid; X int ptyfd; X int aflag; X char outbuf[IOSIZE]; X int outlen; X char cmd[MAXSTR]; X char tty[MAXSTR]; X int args[MAXARGS]; X char GotArg[MAXARGS]; X int NumArgs; X int slot; X char **image; X char **attr; X char **font; X int LocalCharset; X int charsets[4]; X int ss; X int active; X int x, y; X char LocalAttr; X int saved; X int Saved_x, Saved_y; X char SavedLocalAttr; X int SavedLocalCharset; X int SavedCharsets[4]; X int top, bot; X int wrap; X int origin; X int insert; X int keypad; X enum state_t state; X enum string_t StringType; X char string[MAXSTR]; X char *stringp; X char *tabs; X int vbwait; X int bell; X}; X X#define MAXLINE 1024 X X#define MSG_CREATE 0 X#define MSG_ERROR 1 X#define MSG_ATTACH 2 X#define MSG_CONT 3 X Xstruct msg { X int type; X union { X struct { X int aflag; X int nargs; X char line[MAXLINE]; X char dir[1024]; X } create; X struct { X int apid; X char tty[1024]; X } attach; X char message[MAXLINE]; X } m; X}; ________This_Is_The_END________ if test `wc -l < screen.h` -ne 98; then echo 'shar: screen.h was damaged during transit (should have been 98 bytes)' fi fi ; : end of overwriting check echo 'x - screen.tic' if test -f screen.tic; then echo 'shar: not overwriting screen.tic'; else sed 's/^X//' << '________This_Is_The_END________' > screen.tic Xscreen, X xon, X cols#80, lines#24, X bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, X clear=\E[2J\E[H, cr=\r, csr=\E[%i%p1%d;%p2%dr, X cub=\E[%p1%dD, cub1=\b, cud=\E[%p1%dB, cud1=\n, X cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, X cuu=\E[%p1%dA, cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, X el=\E[K, ht=\t, hts=\EH, il=\E[%p1%dL, il1=\E[L, X ind=\n, kbs=\b, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, X kcuu1=\EOA, kf0=\EOy, kf1=\EOP, kf2=\EOQ, kf3=\EOR, X kf4=\EOS, kf5=\EOt, kf6=\EOu, kf7=\EOv, kf8=\EOl, X kf9=\EOw, rc=\E8, rev=\E[7m, ri=\EM, rmkx=\E>, X rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, sgr0=\E[0m, X smkx=\E=, smso=\E[3m, smul=\E[4m, tbc=\E[3g, ________This_Is_The_END________ if test `wc -l < screen.tic` -ne 15; then echo 'shar: screen.tic was damaged during transit (should have been 15 bytes)' fi fi ; : end of overwriting check exit 0