Sun-Spots-Request@Rice.edu (William LeFebvre) (11/04/88)
SUN-SPOTS DIGEST Wednesday, 2 November 1988 Volume 7 : Issue 3 Today's Topics: Re: possible compiler bug on Sun 4, sys4-3.2 Re: nd question Re: Problem with Textsw windows Re: Hard vs Soft Mounts Re: Project Planning Software Re: 50's and SunOs 4.0 Re: locking down systems Re: Frame Maker to (di)troff translator Framemaker sun 3/50 memory upgrade Mail problem Memory for Sun 4's Wren V 94181 SCSI configuration? fast communication over RS232 on Sun 3/60? Differences among Sun4's, and what version are you running? Starting Sunview in SunOS 4.0? SunLink SNA 3270: How to transfer a directory with ibmftp? SunLink 3270? Postscript Interpreter? Send contributions to: sun-spots@rice.edu Send subscription add/delete requests to: sun-spots-request@rice.edu Bitnet readers can subscribe directly with the CMS command: TELL LISTSERV AT RICE SUBSCRIBE SUNSPOTS My Full Name Recent backissues are available via anonymous FTP from "titan.rice.edu". For volume X, issue Y, "get sun-spots/vXnY". They are also accessible through the archive server: mail the request "send sun-spots vXnY" to "archive-server@rice.edu" or mail the word "help" to the same address for more information. ---------------------------------------------------------------------- Date: Wed, 26 Oct 88 10:30:02 PDT From: stevo@judy.jpl.nasa.gov (Steve Groom) Subject: Re: possible compiler bug on Sun 4, sys4-3.2 Reference: v6n274 >From: mc%miranda.uucp@moc.jpl.nasa.gov (Mike Caplinger) > >Consider the following C program: > >typedef union { > int *i; > char *s; > float *f; >} vp; > >main() { > int i; > char *s = "hi there"; > float f; > > printf("%x %x %x\n", &i, s, &f); > foo(&i); > foo(s); > foo(&f); >} > >foo(a) >vp a; >{ > printf("%d %x %x %x\n", sizeof(a), a.i, a.s, a.f); >} This program is broken. Lint will hint at it, but it's a subtle and oft-ignored error message - 'foo, arg. 1 used inconsistently...' Broken programs are not guaranteed to be portable. The problem is that 'main' passes one type of argument and the 'foo' expects another. A union is not the same type as anything but an identical union. Structures and unions, when passed as arguments, are guaranteed to be passed by value. However, all that means is that the function gets a copy of the value, and not a reference to the caller's copy. It does not mean that you can pass a value of one type and expect to receive a value of another type. In the 680x0 compilers, pass-by-value was implemented by stuffing the value onto the stack. This applied to structures and unions as well. However, the Sun4 C compilers pass structure and union arguments in a different way. The pass-by-value semantics are preserved, but the method of deliberatly mismatching parameter types to perform implicit type conversions no longer works. By the way, there is a discussion of commonly used non-portable constructs such as these in "Porting Software to SPARC Systems," Sun P/N 800-1596-10. In particular, the section "Passing Mismatched Parameter Types" will probably be of interest. This manual should have been included with your Sun4. Just to beat the subject to death, here is a fixed version of the above program, which works as expected on both Sun3's and Sun4's under SunOS 4.0. typedef union { int *i; char *s; float *f; } vp; main() { int i; char *s = "hi there"; float f; vp u; printf("%x %x %x\n", &i, s, &f); u.i = &i; foo(u); u.s = s; foo(u); u.f = &f; foo(u); } foo(a) vp a; { printf("%d %x %x %x\n", sizeof(a), a.i, a.s, a.f); a.i = 0; } -steve [[ Thanks to Richard O'Keefe, Mike McCants, and others for also making this point. --wnl ]] Steve Groom, Jet Propulsion Laboratory, Pasadena, CA 91109 Internet: stevo@elroy.jpl.nasa.gov UUCP: {ames,cit-vax}!elroy!stevo Disclaimer: (thick German accent) "I know noothingg! Noothingg!" ------------------------------ Date: Thu, 27 Oct 88 06:55:00 EDT From: Bennett Todd <bet@bent.mc.duke.edu> Subject: Re: nd question I stand corrected, you in fact don't have to repartition, just re-mkfs to leave some spare room at the end off an extant partition. Indeed, if you are out of free partitions (as someone else pointed out, the reason for Sun suggesting the 'c' partition) that is all you will really want to do. However, since the take-it-down/back-it-up/mkfs/restore cycle is all the work, that is really the same effort as repartitioning (I discovered to my relief that using stand/diag to repartition a disk doesn't trash any filesystems whose partitions remain the same, which is as it should be). Since I so far haven't run out of partitions I like the protection of having to get the partition sizes and boundaries right *once*, then working nd.local off a separate designated partition so as to protect filesystems on other partitions from demolition due to typos. -Bennett bet@orion.mc.duke.edu (Reply *still* doesn't work, however I have heard rumors of the existence of a genuine sendmail wizard in these parts. I hope to track him down and see if I can't bribe him into helping us out). ------------------------------ Date: Thu, 27 Oct 88 08:10:11 EDT From: Chuck Musciano <chuck@trantor.harris-atd.com> Subject: Re: Problem with Textsw windows I had a problem similar to this in contool, and solved it by doing deletes at the appropriate time. Since you are clearing the whole window, why don't you just call textsw_reset() to clear the whole thing out? This is more likely to free the internal memory buffers. You can, I think, fix things so you don't get an annoying confirmer when you call textsw_reset(). Chuck Musciano Advanced Technology Department Harris Corporation (407) 727-6131 ARPA: chuck@trantor.harris-atd.com ------------------------------ Date: Thu, 27 Oct 88 13:05:14 BST From: James Davenport <jhd%maths.bath.ac.uk@nss.cs.ucl.ac.uk> Subject: Re: Hard vs Soft Mounts In v6n272, jimc@math.ucla.edu says: > forever. Thus if the client is writing, the write absolutely will take > place (after the Sun FE shows up, replaces the board, etc. on the > server), provided the client isn't rebooted by an impatient user. This is almost true. It will NOT take place (ESTALE being returned) if the FE replaces the disc. The new disc will have a different file system identification on it (even if it mounted in the same place). If you think about it, this is an inherent consequence of the implementation: the inode number of a file is part of the file handle, and restore does not preserve inode numbers. James Davenport jhd@maths.bath.ac.uk [via any gateway you can think of] ------------------------------ Date: Thu, 27 Oct 88 10:05:24 CDT From: schultz@mmm.3m.com (John C Schultz) Subject: Re: Project Planning Software >I am using the SunTrac program from Sun to do project planning with.... >I would definately recommend it.... Unless SunTrac has improved a lot since I investigated, it is missing a rather essential feature for many projects. It does not permit tracking individuals. For example there seems to be no way to keep from assigning Mr. Foo Bar to several hundred hours per month. Along similar lines, there is no way to put varying personnel costs in (senior personnel "cost" more). Such accounting is required by many large companies and the Federal Government. I was forced to use a spreadsheet (SC) which was non-trivial.-- ------------------------------ Date: Thu, 27 Oct 88 11:44:55 -0400 From: Henry B.J. Krempel <krempel@pacrat.npac.syr.edu> Subject: Re: 50's and SunOs 4.0 I've heard a lot of talk about 3/50's not being able to run 4.0 well due to memory limitations. I run a cluster with 6 50's and a number of other 8MB systems on it, and we don't have any speed problems. What's worse is, the stations are all running GENERIC kernels! Henry B. J. Krempel <krempel@pacrat.npac.syr.edu> Syracuse University 250 Machinery Hall Syracuse, N.Y. 13244 ------------------------------ Date: Thu, 27 Oct 88 01:01:27 EDT From: attcan!utzoo!henry@uunet.uu.net Subject: Re: locking down systems >... How would one go about >chaining a workstation down? Are there products on the market? R.B. Stopping a really determined thief is next to impossible. However, you can stop the less motivated types merely by making life more difficult for them. You can buy kits that are basically a cable, a lock, and two large and very sticky pads. One goes on a desk or something else nice and solid, the other goes on the machine. This has the advantage that it's not tied to a specific physical design, like some of the PC-lockdown products are. One very sneaky trick that used to be quite useful was to just chain the power cord to something. Easy enough to do with a light chain (i.e. one that could wrap tightly around the cord near the plug) and a small padlock or two. Unfortunately, practically all hardware nowadays uses removable cords, so this doesn't work any more. Henry Spencer at U of Toronto Zoology uunet!attcan!utzoo!henry henry@zoo.toronto.edu ------------------------------ Date: Thu, 27 Oct 88 08:42:59 EDT From: scott@cs.rochester.edu Subject: Re: Frame Maker to (di)troff translator We, too, are interested in a WYSIWYG document system that could dump its files into a text description language that could be edited on Ascii terminals. Dave FitzGerald asks specifically about Frame Maker to ditroff, but we would be equally happy to see any of the commercial systems dump to latex, troff with macros, or any other description language that a human being would be willing to use outside the WYSIWYG world. This appears to be a very difficult problem; producing raw tex or troff is probably not too tough, but producing something you'd be willing to edit by hand is considerably harder. Some commercial systems are able to take input *from* tex or troff, but none seem to be able to produce it. I think the first vendor to offer the inverse function is going to make a mint. ------------------------------ Date: Thu, 27 Oct 88 04:40:32 EDT From: g73!grant@lownlab.harvard.edu Subject: Framemaker As an up to now satisfied user of Framemaker I just wanted to point out a fairly serious problem I ran into today. It does not seem posible to make "floating anchors" to text figures within a document. What is a floating anchor? If you are composing a document with embedded figures you often want to anchor the figures as close as possible to where you reference the figure ie. " see Figure 3" and have the figure bump up to this reference at the first available chunk of space. Framemaker allows only fixed offset points from the original reference. Where this is really a problem is when you edit any text in front of the reference to the figure--you end up with all sorts of holes in the text. What one has to do is fiddle around with all of the text cut and paste, cut and paste, cut and paste around the figure. The people at Frame said they were aware of the problem but... Anybody writing a grant on this product will be tearing their hair out, as I am now. ....Grant Balkema@Boston College grant@g73.harvard.edu ------------------------------ Date: Wed, 26 Oct 88 16:38:02 PDT From: pjg@unrvax.unr.edu (Paul Graham) Subject: sun 3/50 memory upgrade i assume people are starting to get their postcards from helios about the memory upgrade. i had heard that they were looking for someone to do board maint. when you installed this and became ineligible for sun maint. at that time it was supposed to involve some soldering to make the upgrade. now it appears to be some plug-in daughter card (in the cpu socket?) that regular users can pull off. a friend notes that this is cheaper than 4 meg. for his 3/60. such a deal. maybe motorola will take a stab at maintaining these things. pjg@solstice.unr.edu ------------------------------ Date: Wed, 26 Oct 88 20:25:05 PDT From: versatc!tran@sun.com Subject: Mail problem We recently decided to mount our mailhost's /usr/spool/mail directory to each and every subsidiary machine's /usr/spool/mail {or /var/spool/mail on the SUN 4.0 system}, and we noticed that some of the mail files under /usr/spool/mail/user_name was created with the ownership of NOBODY and group WHEEL. As a result, mail was sent but users cannot read them. Any ideas what went wrong? Tony Tran Versatec, Inc. ------------------------------ Date: Tue, 25 Oct 88 21:47:41 EDT From: hsi!stepstone.com!aad@uunet.uu.net (Anthony A. Datri) Subject: Memory for Sun 4's As for memory and SunOs 4.0, I called Sun about prices on Sun 4's and RoadRunners, and it seems that they won't sell you a roadrunner with only 4 meg, since SunOS 4.0 is too slow on it. They quoted $3400 more for the additional 4 meg -- even with a 40% discount, can better be had? Anthony A. Datri @SysAdmin(Stepstone Corporation) aad@stepston.com, stpstn!aad ------------------------------ Date: Mon, 24 Oct 88 17:53:01 EDT From: <wzd@geovision.uucp> Subject: Wren V 94181 SCSI configuration? Has anyone out there configured a Wren V 94181(702mb) disk on a Sun 3/60. If so, I would appreciate the cylinder/head/track information. Thanks Walter Dolegowski ------------------------------ Date: Thu, 27 Oct 88 03:02:12 EDT From: mboasson@ajpo.sei.cmu.edu Subject: fast communication over RS232 on Sun 3/60? We try to use our Sun 3/60 in an almost real-time application. Communication with other machines takes place over one or both RS232 ports at 19200 baud. Unfortunately, Unix scheduling slows the actual datarate to something like 1500 baud. Thta is, with relatively short messages: < 100 bytes. It is impossible to communicate with long messages through buffering. Is there a trick to get around the scheduler - or anything else that will speed up communication? When running this application, the machine does not have to run other programs. mboasson@ajpo.sei.cmu.edu (Maarten Boasson) ------------------------------ Date: Tue, 25 Oct 88 21:51:51 EDT From: hsi!stepstone.com!aad@uunet.uu.net (Anthony A. Datri) Subject: Differences among Sun4's, and what version are you running? I'm investigating obtaining a Sun4 for purposes of product support, and I have a dim memory of people saying that the 4/110 (the cheapest, right?) is somehow different than the other models. How wrong am I? Also, I'd like an idea of which version of SunOS Sun4 owners are running -- are you running the 3.2 version, 4.0, or something I haven't heard about yet? Anthony A. Datri @SysAdmin(Stepstone Corporation) stpstn!aad ------------------------------ Date: 27 Oct 88 08:19:07 EDT (Thu) From: osu-cis!n8emr!lwv%killer.Central@sun.com (Larry W. Virden) Subject: Starting Sunview in SunOS 4.0? I am attempting to start a program up in my .sunview file which needs a parameter with embedded blanks. For instance, it might look like: less '-P%f Hit return to continue' myfile When I put something like this at the end of a shelltool command line, I get the shelltool window, a flash of a set of error msgs from Less, who appears to be attempting to open files -P%f, Hit, return, to, and continue, and then I get myfile opened. Yet, if I say " fgrep less .sunview | ksh" I get the window as I really need it. Any suggestions as to how best to handle this problem? ------------------------------ Date: Thu, 27 Oct 88 17:12:01 SET From: Danielle Heinzer <ESC1298@ESOC.BITNET> Subject: SunLink SNA 3270: How to transfer a directory with ibmftp? Is there any possibility to transfer more than one file at a time between the IBM MainFrame and the SUN workstation via "ibmftp" ? SunOS 3.2, SunLink SNA Rel.5.0 Danielle Heinzer ESA Computer Department/Computer Services European Space Operations Centre Robert-Bosch-str. 5 6100 Darmstadt West-Germany Tel int : 49-6151-886540 ------------------------------ Date: Thu, 27 Oct 88 12:25:51 EDT From: larryd%bnrmtl.UUCP@larry.mcrcim.mcgill.edu (Larry Dunkelman) Subject: SunLink 3270? Does anyone have any experience using SunLink 3270 ? I would appreciate any information regarding its use, hardware required and whether the software runs on 4.0 Larry Dunkelman Bell-Northern Research (Montreal) bnrmtl!larryd@larry.mcrcim.mcgill.edu ------------------------------ Date: Thu, 27 Oct 88 08:57:08 SST From: TNG TH <ISSTTH@NUSVM.BITNET> Subject: Postscript Interpreter? Does anyone know if there is a public domain Postscript Interpreter running on SUN with full source? [[ There's "ghostscript" from the gnu project. Sorry, I don't know any more about it. --wnl ]] ------------------------------ End of SUN-Spots Digest ***********************