HDTenEightyP/NetNews huggingface dataset:
From: maarten@fwi.uva.nl (Maarten Carels)
Subject: Re: How do I mount a SCSI device?
Organization: FWI, University of Amsterdam
Distribution: comp
Date: Tue, 1 Sep 1992 09:17:26 GMT

zobkiw@world.std.com (Joe Zobkiw) writes:
>In article <BtuqLx.2xE@acsu.buffalo.edu> triantos@acsu.buffalo.edu (Nick B Triantos) writes:
>>Hi,
>>Forgive me if this is in the FAQ, but I couldn't find it.  I'd like to write a
>>program for myself that, when launched, will simply mount all SCSI devices it
>>finds in the chain.  I've looked in IM for a magic SCSIMount function, or
>>something reasonably close, and I can't find anything which I can understand.

>Look at the low-level File Manager calls such as PBMountVol...I think this
>is what you want.

Guess not. There is much more to do for SCSI devices. You have to:
- determine it's there. Try to read block 0 from the device (you'll need it
  anyway). If you can't read the block, assume no device present.
- using block 0, locate the driver on the disk, allocate memory in the system
  heap, read the driver, and jsr to it with some parameters in registers.
- the driver should post a disk inserted event for any partition it wants
  to be mounted. Process all disk inserted events.

Documentation for all of this?
Inside Mac volume IV and V (SCSI manager, scsi disk layout)
some technotes
SCSI Development package (APDA, way out of date, but it some things are only
documented in comments in the example driver).

Are you sure you want to make such beastie?
SCSI hacking on macintoshes is fun, but it's not easy (I know, I made disk
drivers).

--maarten
-- 
In real life:	Maarten Carels
		Computer Science Department
		University of Amsterdam
email:		maarten@fwi.uva.nl
Newsgroups: comp.sys.mac.programmer
From: resnick@cogsci.uiuc.edu (Pete Resnick)
Subject: Re: Popup menus (help!!)
Organization: University of Illinois at Urbana
Date: Mon, 31 Aug 1992 23:24:09 GMT
Keywords: popup

bberqu@sagpd1 () writes:

>I have three popup menus within a dialog box and am trying to figure out
>the best way to handle them, I know system 7 has support for them, but 
>I would like my application to work with earlier versions of the OS also.

Suggestion 1: use the pop-up menu CDEF included with the System 6
Communications Toolbox for pre-System 7 machines.

>It seems like all I should have to do to handle popup menus is when 
>ModalDialog detects an event within the dialog it should pass the 
>information to my filterProc function. If I know where the event happened 
>and the dialog pointer I could call FindControl which would return me the 
>control....

More likely, you want to call FindDItem, not FindControl.

pr
-- 
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet: resnick@cogsci.uiuc.edu
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: incrementation differences/THINK C 4.0 vs. 5.0
Date: 27 Aug 92 23:01:39 GMT
Organization: SRI International, Menlo Park, California

In article <1992Aug27.182157.16567@qualcomm.com> sdorner@qualcom.qualcomm.com (Steve Dorner) writes:

>You will never see a C compiler that does this, and if you do you won't
>find me using it.  C is too sparse.  Fix the following fragment:

>	a=b=c d=e;

>What goes between c and d? I can think of 3 possibilities.


I entered that line into think c and it said "syntax error" which is
what its supposed to do. It doesn't know what the hell I'm talking about
and shouldn't do anthing in this case. But when I change it to

  a=b=c
  d=e;

then it selects the first line and say's "Missing ";" ". It knows where
the missing ";" should go.  So it should ask me "Missing ';' at the end
of this line. Should I add one and continue compiling?"

"Add and Continue" or "Cancel"

Of course you could give a bunch of special cases where it won't know what
to do but why would you want to program like that anyway? :-)


Is this not a common mistake forgetting the ";"?

What about this common bug that I think even shut down ATT long distance
system:

if (a=b) {
  //then do something
}

When the programmer really meant a==b. Should there be a option to check
if statements?

Matt







-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: eric_gorr@coglab_psych.uoregon.edu (Eric Gorr)
Subject: Crashing Bug - very strange!
Organization: University of Oregon Network Services
Distribution: usa
Date: Thu, 27 Aug 92 23:52:35 GMT

I am not looking for any specific fix to code, just some ideas.

Here's the set up:

the application = theApp
first XCMD      = XCMD1
second XCMD     = XCMD2
third XCMD      = XCMD3

I wrote theApp that accepts some custom apple-events from hypercard via the
XCMDs which create the event and calls AESend.

Now, when I execute XCMD1 and XCMD2 from hypercard, it works fine.

After this, I send XCMD3.  theApp registers that a custom AE was sent to
it, but theApp does not call the procedure associated with XCMD3.  If I
don't send XCMD1 and XCMD2 before XCMD3, then theApp does call the
procedure associated with XCMD3.

Also, When I quit out of the application and run it again, it crashes for
no reason that I can think of because it doesn't crash the first time it is
run and I am also forced to restart the computer - it becomes to unstable.

If you need more of an explanation, let me know.

Any ideas?  Bascally everything works (sort of) the first time, but when I
try to do it again, it crashes.  Something is getting seriously screwed up,
but I have no idea how to find it since all of the procedures which return
OSErr's, return noErr.

thanx...
From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
Newsgroups: comp.sys.mac.programmer
Subject: Re: GWorlds with B&W Macs
Date: 1 Sep 1992 18:11:45 GMT
Followup-To: comp.sys.mac.programmer
Organization: Academic Computing

In article <Jim_Holt-010992093710@jolt.sps.mot.com>,
Jim_Holt@aprdlgtr.sps.mot.com (Jim Holt) wrote:
> 
> 		SetGWorld (tempGWorld, nil);
> 
>   /********* program goes away on the following call !! ************/
> 
> 		DrawPicture(tempPic,&tempRect);

You didn't lock your pixMap before drawing to it. You need some code like:
  err=LockPixels(tempGWorld->portPixMap);
before you call DrawPicture.

--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton                      |    
Ass't Director, Academic Computing |       "This space for rent."
UT Health Science Center Houston   |  
cshotton@oac.hsc.uth.tmc.edu       |         
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Newsgroups: comp.sys.mac.programmer
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: Re: Zortech C++ - Comments? -
Organization: Symantec Corp.
Date: Thu, 27 Aug 1992 14:41:10 GMT

In article <vwbn6_a.nagle@netcom.com> nagle@netcom.com (John Nagle) writes:

	 Don't.  You'll be sorry.  The Zortech C++ product for Intel CPUs is
   good, but the 68000 code generator was botched, and the Mac product is
   lousy.  I am a very unhappy owner of this product.  I finally had to buy
   Apple's MPW C/C++ compiler.

	 Symantek now owns Zortech, and hasn't done much with the Mac product,
   although there are rumors of a Symantek C++/Bedrock product some time next
   year.  

While it's true that the original 2.1 release of Zortech C++ for MPW
was buggy, Symantec released a 2.1.3 version that fixed many of the
bugs not long after the acquisition of Zortech. There haven't been any
Mac releases since then (2.1.3 was released less than a year ago), but
a lot of work is being done on it.

Sorry, no comments on What or When...

	-phil
--
   Phil Shapiro                                   Software Engineer
   Language Products Group                     Symantec Corporation
		   Internet: phils@cs.brandeis.edu
From: davisw@aurs01.uucp (Walt Davis)
Newsgroups: comp.sys.mac.programmer
Subject: No Context Switch
Date: 26 Aug 92 11:58:27 GMT
Organization: Alcatel Network Systems, Raleigh NC

At the risk of providing further self-incriminating evidence in my
upcoming trial for heresy (at which I will plead nolo contendere), what
is the best and/or safest method to inhibit context switching from the
front-most application.  I don't even want the user to be able to
switch to the Finder until I say so (I being the front-most
application).  If you don't want to be named as a co-conspirator in my
trial, then email me, otherwise post away.

Walt Davis
davisw%aurfs1%aurgate@mcnc.org
From: Glen.Stewart@f175.n2240.z1.ieee.org (Glen Stewart)
Newsgroups: comp.sys.mac.programmer
Subject: RE: Computer Science ----  Undergraduate  <-- --> Graduate
Date: 23 Aug 92 17:34:43 GMT
Organization: FidoNet node 1:2240/175 - The Associati, Grand Blanc MI

I can imagine your frustration.  I've heard some interesting things about the
NeXt computer, and what Steve Jobs intends for their programming environment.  
I would think that a college/university supporting that computer would be
quite focused on object-oriented programming...

Certainly that will narrow the selection down for ya!  Good luck!


--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 Glen Stewart - Internet: Glen.Stewart@f175.n2240.z1.ieee.org
From: kanagn@athina.cc.uch.gr (Kostas Anagnostakis)
Newsgroups: comp.sys.mac.programmer
Subject: think-c-prog-guide.hqx Problem
Date: 27 Aug 92 07:36:53 GMT
Organization: Computer Science Department, University of Crete HELLAS
X-Newsreader: Tin 1.1 PL3

Hi..

I ftp'ed think-c-prog-guide.hqx from sumex and wanted to
extract the files in a readable form for the Unix box.
I didn't succeed in any of my attempts. Any helpers ?

Thanks,
Kostas
Newsgroups: comp.sys.mac.programmer
From: ross@bnr.ca (Ross Brown)
Subject: Re: Getting the alias'd name from a drag-and-drop app?
Organization: Bell-Northern Research
Date: Fri, 28 Aug 92 15:26:53 GMT

In article <alen.714928925@crash> alen@crash.cts.com (Alen Shapiro) writes:
>[stuff deleted]
>Is there a toolbox call that I should use instead of GetAppFiles
>that will stop it chaining down the alias chain and will cause
>it to deliver me the name and vRefNum of the alias itself?

No.  The alternative ('odoc' Apple event handling) would give you the same
thing.  The Finder and Standard File package always, always (see *EXCEPTION*
below) resolve aliases before handing files to your application.  This is good
for at least two reasons:  one, it allows most System-7-unaware applications to
continue to work under System 7 (since document aliases have the same creator
and type as the originals, how could the application be expected to know the
difference?); and two, it forces the vast majority of System-7-aware
applications to behave consistently in their handling of aliases, to the relief
of users everywhere.

In short, a drag-and-drop application can not do what you propose.  You might
decide to crawl the file system to find alias files directly; for example, you
could ask the user to pick a folder, then present a list of alias files in that
folder for the user to choose from.  Or, as an *EXCEPTION* to the Standard File
package's usual behavior, which you would have to explain carefully to your
user, you could override its handling of aliases using CustomGetFile and a
dialog hook proc like this:

pascal	short	DefeatAliasDialogHook( short item, DialogPtr theDialog, Ptr
myDataPtr )
{
#pragma	unused( theDialog, myDataPtr )
	switch( item )
	{
	case sfHookOpenAlias:
		return sfItemOpenButton;
	default:
		return item;
	}
}

This would give your application the alias's FSSpec, as you want it.  Hope this
helps!

W. Ross Brown                 |        from Brown's Bestiary of the Macintosh:
Advisor, Telemanagement Svcs. |  PBCatMoof:  A purring system trap shaped like
Bell-Northern Research Ltd.   | a dog with cow spots and a 3-hr. battery life.
Ottawa, Ontario, Canada       | ----------------------------------------------
ross@bnr.ca                   |      Any opinion expressed is mine, not BNR's.
From: ewu1@husc8.harvard.edu (Elwin Wu)
Newsgroups: comp.sys.mac.programmer
Subject: Beginner's question on StandardPutFile
Date: 1 Sep 92 12:01:59 GMT
Article-I.D.: husc8.ewu1.715348919

I'm having trouble getting the volume reference number returned by the
StandardPutFile routine.  I want to use SetVol and my code typically
looks something like this (I'm using Think C 5.0):

	StandardPutFile(prompt,defaultName,&theReply);
	SetVol(theReply.sfFile.vRefNum);

Should I use something other that SetVol???  Any help would be
appreciated.  Thanks
From: hp48sx@wupost.wustl.edu (HP48SX Archive Maintainer)
Newsgroups: comp.sys.mac.programmer
Subject: Wanted: FinderMenu source from MacHack
Date: 30 Aug 1992 07:56:57 -0500
Organization: Washington University in Saint Louis, MO USA
Reply-To: hp48sx@wuarchive.wustl.edu
NNTP-Posting-Host: wuarchive.wustl.edu

I have been told there is source out there for adding a menu to the
finder like Stuffit and DiskDoubler does. Anybody care to mail it to me
?

Thanks,
Povl
-- 
Povl H. Pedersen             hp48sx@wuarchive.wustl.edu
HP48sx archive maintainer

All Opinions (C) Copyright the Intergalactic Thought Association
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Keeping the cursor visible
Date: 2 Sep 92 12:33:30 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden
Originator: d88-jwa@dront.nada.kth.se

@claris.com (Scott Lindsey) writes:

   ShowCursor won't actually show the cursor if it's only obscured.  I don't
   think there's a legal way to unobscure a cursor, however, setting the low-
   memory global CrsrNew = 0xFF forces it to really redraw. (CrsrNew is 0x8CE
   and is a 1-byte value).

How abotu just calling InitCursor?

It sets the cursor to an arrow, and shows it (and clears
the show/hide count) and then you can call SetCursor to
set it to the shape you want.

-- 
Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069
White, Literate, Employed, Higher-Educated, Male, Straight and Not Poor.
I must be a bad guy.
From: zben@ni.umd.edu (Charles B. Cranston)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Which TechNotes for PictureComments?
Date: 2 Sep 92 20:06:47 GMT
Followup-To: comp.sys.mac.programmer
Organization: UM Home for the Terminally Analytical

In article <1992Sep2.124521.14471@neptune.inf.ethz.ch>,
cfranz@iiic.ethz.ch (Christian Steffen Ove Franz) wrote:

> I'm looking for the TechNote numbers that describe how to use
> the full resulution of a printer (i.e. printing a hairline on
> a stylewriter or laserwriter). 

How about:

TN 175: SetLineWidth Revealed

This technical note describes the internal implementation of,
and correct method of using, the SetLineWidth Picture Comment.

This was found under the heading "printing" in the second part of
TN 0, which comprises an index based on gross functional areas...

zben@ni.umd.edu     -KA3ZDF
From: cconstantine@galaxy.gov.bc.ca
Newsgroups: comp.sys.mac.programmer
Subject: INIT Conflicts...How can they be avoided?
Date: 2 Sep 92 07:21:30 -0700
Organization: BC Systems Corporation

Is there a general way to avoid INIT confilicts while programming?  Let me
illustrate.  I'm using THINK C 5.0.2 at home and have a few INIT's/System
Extentions and cdev's on my LCII running System 7.0.1 with Tune-up 1.1.1.

While trying to draw some graphics to the screen using OpenPicture()...
ClosePicture() (or even just straight drawing) it doesn't work.  However, If I
remove Suitcase 2.1.1 from my Extensions folder, my graphic (a pie chart)
displays just fine.  With Suitcase installed, I either get just the outline of
my chart or nothing at all?????

Suitcase 2.1.1 has the same problem with Excel 4.0's Pie Charts (This one is
actually a mix of INIT's plus Suitcae that causes the problem).

How can I avoid this.  I wan my programs to work on _any_ configuration.

Any ideas???  Is there a ROM call somewhere that I'm missing?? etc..

Please help, this means future development of good shareware software!!!!

Thanks much.
-- 
Carl B. Constantine
CCONSTANTINE@galaxy.gov.bc.ca
	"Opinions are mine only!!"
From: holiday@bnr.ca (Matthew Holiday)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MPW tool to debinhex? destuffit?
Date: 26 Aug 92 13:44:51 GMT
Reply-To: holiday@bnr.ca
Followup-To: comp.sys.mac.programmer
Organization: Bell-Northern Research, Richardson, TX

In article <1992Aug25.222659.24365@reed.edu>, bowman@reed.edu (Eric Bowman (bobo)) writes:
|> Anyone know of such beasts?  I would really like to have a tool which will
|> debinhex a whole bunch of stuff "batch style", but I haven't heard of any
|> such tool(s).
|> 

There's a tool called xbin which I believe I got from sumex-aim; if you can't find
it there, I can probably get it to you.  It de-binhexes files, and could be used in
a script.

StuffIt Deluxe comes with a tool to UnStuff files

-- 
Matt Holiday                                      #include <std/disclaimer>
holiday@bnr.ca
BNR Richardson, TX
Newsgroups: comp.sys.mac.programmer
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: Re: How do I mount a SCSI device?
Organization: The World Public Access UNIX, Brookline, MA
Distribution: comp
Date: Mon, 31 Aug 1992 17:02:01 GMT

In article <BtuqLx.2xE@acsu.buffalo.edu> triantos@acsu.buffalo.edu (Nick B Triantos) writes:
>Hi,
>
>Forgive me if this is in the FAQ, but I couldn't find it.  I'd like to write a
>program for myself that, when launched, will simply mount all SCSI devices it
>finds in the chain.  I've looked in IM for a magic SCSIMount function, or
>something reasonably close, and I can't find anything which I can understand.
>Please post any suggestions you might have, or pointers to code which may help
>me.
>

Look at the low-level File Manager calls such as PBMountVol...I think this
is what you want.












-- 
-------------------------------------------------------------
joe zobkiw         zobkiw@world.std.com        aol: aflzobkiw

Newsgroups: comp.sys.mac.programmer
From: system@asuvax.eas.asu.edu (Marc Lesure)
Subject: running on a FX
Organization: Arizona State University
Date: Thu, 27 Aug 1992 08:50:46 GMT

I have an application that seems to run fine on a Mac SE (System 6.0.5),
II (System 7.0), and IIci (System 7.0), but when I put on a fx (System 7.0)
it bombs with various errors.  Is the fx that different (I'm not a hardware
type)?  What type of programming problems should look for?  Any help or hints?

-----------------------------------------------------------------------
Marc Lesure / Arizona State University / Tempe, AZ
"Between the world of men and make-believe, I can be found..."
"False faces and meaningless chases, I travel alone..."
"And where do you go when you come to the end of your dream?"

UUCP:       ...!ncar!noao!asuvax!lesure  
Internet:   lesure@asuvax.eas.asu.edu
Newsgroups: comp.sys.mac.programmer
From: M. Nutter <manutter@grove.iup.edu>
Subject: Re: Simple Think C problem (Help!!!)
Organization: iup
X-Xxdate: Wed, 26 Aug 92 13:49:01 GMT
X-Useragent: Nuntius v1.1.1d7
Date: Wed, 26 Aug 1992 12:46:43 GMT
X-Posted-From: mozart.cc.iup.edu
X-Posted-Through: sol.ctr.columbia.edu

In article <1992Aug25.164824.12197@natinst.com> Stepan Riha,
stepan@natinst.com writes:
>Nick complains about getting a "'thePort' has not been declared" message
when
>compiling (in THINK C 5) a program he typed in from the Macintosh Primer.
>Also, nil does not seem to be defined.
>
>When the Primer was published the version of THINK C had the variable
thePort
>declared in <QuickDraw.h>.  In THINK C 5, to be compatible with MPW,
><QuickDraw.h> declares thePort as a field in the qd structure.  The
original
>declaration of thePort has been moved to <THINK.h>.
>nil is defined in <Types.h>.

Strange.  I have a utility file from my ThC 4.0 days that uses 
InitGraf(&thePort) without any problem under ThC 5, and I'm not doing
anything fancy like #include <THINK.h> or #include <Types.h>.  Could
Nick's problem be something simpler, like failing to include the
MacTools library?

+------------------------------------+
| Mark Nutter                        |
| manutter@grove.iup.edu             |
+------------------------------------+
| Apple Support Manager              |
| Indiana University of Pennsylvania |
| G-4 Stright, Indiana, PA 15705     |
+------------------------------------+
| Bonus question:  Which of these    |
|   two statements is correct?       |
|     A) Statement "B" is false.     |
|     B) Statement "A" is true.      |
+------------------------------------+
From: joseph@joebloe.maple-shade.nj.us (Joseph Nathan Hall)
Newsgroups: comp.sys.mac.programmer
Subject: Re: incrementation differences/THINK C 4.0 vs. 5.0
Date: Tue, 25 Aug 92 20:29:44 EDT
Organization: 5 Sigma Software
Reply-To: joseph@joebloe.maple-shade.nj.us
X-Mailer: uAccess - Macintosh Release: 1.5v5


In article <38119@unix.SRI.COM> (comp.sys.mac.programmer), mxmora@unix.SRI.COM (Matt Mora) writes:
) Also why can't the compiler say this when a ";" is missing.
) 
) Missing an ";" at the end of this line. Should I add one?"
) "Add one and Continue" or "Cancel"
) 
) instead of
) 
) "Missing a ";" at the end of statement."
) 
) and stop compiling. 

Well, that was PL/1C or whatever the error-CORRECTING PL/1 compiler
from c. 1970 was called.

You will notice that it wasn't the beginning of a trend.

Perhaps the conclusion of users was that compilers don't do a very
good job of "fixing" errors, eh???

:-)

uunet!joebloe!joseph   (609) 273-8200 day   joseph%joebloe@uunet.uu.net
v   v  sssss | Certified Guru: all-grain brewing,| 2102 Ryan's Run East
 v v  s   s  | C, synthesizer comp & arranging,  | Rt 38 & 41
  v    sss   | photography. Also not a bad cook. | Maple Shade NJ 08052
-----My employer isn't paying for this, and my opinions are my own-----
From: kuechenm@taurus.cs.nps.navy.mil
Newsgroups: comp.sys.mac.programmer
Subject: Think C 4.05 Compatibility
Date: 1 Sep 92 03:18:37 GMT
Distribution: usa
Organization: Naval Postgraduate School, Monterey CA

I'm still using a copy of Think C 4.05 with my Mac Plus and system
6.07 with no trouble. But on the LCII we just got, it appears the
Debugger isn't compatible with either the LCII or system 7.01.  The
debugger will start up and then display a bus error
message. The computer will freeze and I'll need to reboot to clear
everything out. Is this a well known problem with the 4.05 version? Is
there a fix or do I need to upgrade?

*******************************************************************************

David R. Kuechenmeister                  U.S. Naval Postgraduate School
(408)646-2491				 SMC 2394
kuechenm@taurus.cs.nps.navy.mil					 Monterey,CA 93943
Of course all opinions are my own ...
The Navy wouldn't let me speak for them even if I wanted to
Newsgroups: comp.sys.mac.programmer