HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.sys.mac.programmer
Subject: Re: HELP! INIT and patching probs
From: russells@ccu1.aukuni.ac.nz (Russell Street)
Date: Thu, 31 Dec 1992 01:59:59 GMT
Organization: University of Auckland, New Zealand.

cole@alexia.lis.uiuc.edu (Sandra Stewart-Cole) writes:


>        CreateResFile("\pTempFile");
>        TempRefNum=OpenResFile("\pTempFile");
>        AddResource(RHandle1,'DITL',128,"");
>        SetResAttrs(RHandle1,resSysHeap+resPurgeable);
>                        .  // a series of AddResource and  SetResAttrs calls
>                        .

You need to do a WriteResource before you do a SetResAttrs otherwise
if the resource gets purged the resource manager goes ape and
generally behaves badly (hence resources that are -4 gig in ResEdit
etc).  It took me ages to find this problem the first time I
encountered it!

I see in Think Reference that it says AddResource only sets the
changedResource flag and you should set any other flags _before_
writing the resource. I believe that TR is wrong here [for purgeable
resources].

You can also use SetResPurge to make sure the writing of changed
purged resources happen automatically -- but this is probably NOT a
good thing to do an INIT.

---------------------------------------------------------------
Russell Street (russells@ccu1.aukuni.ac.nz)
       "Now then, Seagoon, what made you join the army?"
    -- "An armed escort and two military police men."
       (The Goons Show, "The Nasty Affair At the Burami Oasis")
From: ksand@apple.com (Kent Sandvik )
Newsgroups: comp.sys.mac.programmer
Subject: Re: Macs closed, what me worry?
Date: 22 Dec 92 03:31:44 GMT
Followup-To: comp.sys.mac.programmer
Organization: (Evil Eye Creature from Mars, Inc.)

In article <1992Dec18.065911.7493@netcom.com>, nagle@netcom.com (John
Nagle) wrote:
>       It's because if you try to build a machine that runs Mac software,
> Apple sues you.

:-). That's news to me. I'm sure it's news to Outbound as well.

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
"Don't just do something!  Stand there!"  -- Mystery Science Theater 3000
Newsgroups: comp.sys.mac.programmer
From: rduta@nyx.cs.du.edu (Radu Duta)
Subject: Reading from a SCSI device (HD in particular)
Keywords: SCSI
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Date: Tue, 22 Dec 92 01:41:40 GMT


Ok, I want to read directly from a HD, in particular starting with absolute
secotr 0, I'm not too sure how to do this, since I've never tried it before,
and I'm not too familiar with SCSI commands, etc.  I was wandering if someone
could give me an ann ftp site where i can get some sapme code to help get
me started.  Actually anything having to do with SCSI would be fine since I
don't really know enough about SCSI to get far.

Thanks

Newsgroups: comp.sys.mac.programmer
From: wondertr@fraser.sfu.ca (wondertree learning center)
Subject: MAC development environments
Summary: MAC development environments
Keywords: MAC development environments
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Tue, 22 Dec 1992 17:56:48 GMT

I have a query regarding programming environments for the MAC.

Is there a development system available for the Mac that
uses its DTP and WYSIWYG capabilities?
I think that this would be a great help to those of use who are
more visually oriented.

Some of my ideas would include:
-bolding & italizing & coloring of KEYWORDS and IDENTIFIERS
-expanding and contracting (outline type) procedures & functions
-automatic indexing of variables etc.
-any other helps that could be added to enhance the environment

I know, I know, its not very traditional, but I thought that we're
supposed to be on the leading edge of technology and it seems
to me that "The Time Has Come" on this one.

TED

PS: I'd also be interested if any other systems have any of these 
enhancements.

Newsgroups: comp.sys.mac.programmer
From: j.cook@primerd.prime.com (C. James Cook)
Subject: Re: visRgn and New IM
Organization: Prime Computer R&D
Date: Wed, 23 Dec 1992 15:25:56 GMT

With regard to updates, the quick answer is "try it". If you are copying from
an offscreen bitmap, it is probably fast enough, assuming you aren't trying
for animation. If it is a lot of complicated lines and figures or computed
pictures, you may want to do the more intelligent thing.

No, the 15 (or 18?) new Inside Mac books are not all out yet.  Not by a long
shot.  "Processes", "Files", and "Memory" have been out for a few months. I
just saw "Toolbox Essentials" in the bookstore yesterday.  Since these things
tend to come out in threes, I suspect there must be another couple volumes
besides this also just out.

Good luck,
Jim
Newsgroups: comp.sys.mac.programmer
From: Dmitry Boldyrev <dmitry@chemistry.chem.utah.edu>
Subject: How to keep two active windows ?
Organization: University of Utah
X-Useragent: Nuntius v1.0
Date: Wed, 30 Dec 92 20:38:34 GMT

Hi Folks,
Does anyone know how to keep two active windows ?
When I'm creating my palette (Bar, Window), first window 
became inactive .. and I don't want to make first my window
inactive..
Please, if you know how to fix it, let me know.
= Dmitry =
Newsgroups: comp.sys.mac.programmer
From: russotto@eng.umd.edu (Matthew T. Russotto)
Subject: Re: Think C debugger problem
Date: Thu, 31 Dec 92 22:53:05 GMT
Organization: Project GLUE, University of Maryland, College Park

In article <C03K7J.DxJ@rice.edu> schmunk@spacsun.rice.edu (Robert Schmunk) writes:
>An application I have been working on (Think C 4 on a Mac LC II, sys 7)
>recently developed an inclination to unexpectedly quit and go back to the
>finder. I had just made a large number of changes so reversing the changes
>was out of the question and so I just decided to turn on Think C's
>debugger option. Unhappily, when the application fires up, I get the
>two debugger windows and everything freezes (reboot necessary). The
>debugger menu bar is blank and the only clue to the problem is a 
>"Bus error" message in the listing window. Has anybody got any suggestions
>as to how I can figure out what the problem is? If so, you'll earn my
>slavish appreciation.

1) Upgrade to Think C 5.0.4 or (if short on $$$) Think C 4.0.5.  4.0.5
was the first version to work under System 7, I believe.

2) Sounds like your project got corrupted.  "Remove objects" and
re-make everything.
-- 
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
Some news readers expect "Disclaimer:" here.
Just say NO to police searches and seizures.  Make them use force.
(not responsible for bodily harm resulting from following above advice)
Newsgroups: comp.sys.mac.programmer
From: ksand@apple.com (Kent Sandvik )
Subject: Re: Curves in QuickDraw GX
Date: Wed, 30 Dec 1992 22:13:09 GMT
Organization: (Evil Eye Creature from Mars, Inc.)
Followup-To: comp.sys.mac.programmer

In article <Bzp7x4.90D@iat.holonet.net>, bwilliam@iat.holonet.net (Bill
Williams) wrote:
> No assembly (very little) is used. Because they are greedy opportunistic
> pigs that are thinking of saving time porting it again and again
> naturally, but I feel that when 250,000 Motorola boxes from Apple ship per
> month they can afford to hire a few real programmers. GEEZ! Never in my
> life have I heard someone brag that almost none of their GRAPHICS ROUTINES
> are written in assembly.

Well, concerning a PowerPC port it makes sense, because asm is no-no
or 'if-you-really-need-it' option on this platform.
 
Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
"Don't just do something!  Stand there!"  -- Mystery Science Theater 3000
From: Leon.Moore@f421.n109.z1.fidonet.org (Leon Moore)
Sender: Uucp@blkcat.UUCP
Newsgroups: comp.sys.mac.programmer
Subject: MANDEL.MOOV
Date: Mon, 28 Dec 1992 21:01:04 -0500

has anyone else downloaded the mandel.MooV segments?  either I'm doing something
dumb (very possible!) or something is funny.  i downloaded four of the segments
the other night (mndl_qt1.cpt - mand_qt4.cpt).  the next day when i tried to
grab mand_qt5.cpt - mand_qt7.cpt, mand_qt5.cpt came over as 'binary' and the
other two segments as 'macbinary'.  tonight when i tried again mand_qt5.cpt
wants to come across as 'binary'.  so i thought i'd try mndl_qt1.cpt and
mand_qt5.cp as a zTerm (zmodem) download.  now mandl_qt1.cpt starts to transfer
as a 'binary' file.  zTerm is setup to receive and transfer files with the
zmodem protocol.  any suggestions as to what i'm doing wrong?

Newsgroups: comp.sys.mac.programmer
From: oster@well.sf.ca.us (David Phillip Oster)
Subject: Re: An Euphemism (was Re: Uniquely identifying a Mac? How?)
Organization: Whole Earth 'Lectronic Link
Date: Fri, 1 Jan 1993 05:02:48 GMT

The ethernet specification requires that each ethernet card be branded with
a unique serial number, that can be read by the operating system. This has
nothing to do with the IP address, it is at a lower level than TCP/IP.

But, just because the spec requires it, I don't know for sure if vendors
still follow this part of the spec.
Apologies if this has already bbeen discussed.
From: ksand@apple.com (Kent Sandvik )
Newsgroups: comp.sys.mac.programmer
Subject: Re: Need BOOK that explains how to write an INIT
Date: 31 Dec 92 23:39:58 GMT
Followup-To: comp.sys.mac.programmer
Distribution: comp.sys.mac.programmer
Organization: (Evil Eye Creature from Mars, Inc.)

In article <1992Dec21.113758.1944@random.ccs.northeastern.edu>,
chuck@ccs.northeastern.edu (Chuck Wells) wrote:
> I have quite a few Mac programming books, but none that explain the art of
> INIT writing.  Can anyone recommend such a book?

Just a hint, the MacHack CD has a lot of sample code in how to write Inits,
evil and otherwise.

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
"Don't just do something!  Stand there!"  -- Mystery Science Theater 3000
Newsgroups: comp.sys.mac.programmer
From: jlawrie@fraser.sfu.ca (John William Lawrie)
Subject: think c profiler problems
Summary: think c profiler problems
Keywords: think c profiler
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Sun, 3 Jan 1993 11:33:41 GMT

Is there anybody out there who can help me get the profiler in think c 5.04
to work properly.  I am using the starter project and did the instruction
listed in the think c user manual about how to make it work.  I turned on the
generate profile calls option and recompiled everything.  When I tried to run I got ther message data segment to big.  The manual said to turn on the use far
data option and try again.

So I turned it on and recompiled everything and got the same message.

If anybody can tell me how to get the profiler going, the help would be greatly
appreciated.

Thanx in advance

John Lawrie
From: tequila@ccwf.cc.utexas.edu (Mario Garcia)
Newsgroups: comp.sys.mac.programmer
Subject: FSOpen or HOpen ?
Date: 29 Dec 92 19:00:43 GMT
Reply-To: tequila@ccwf.cc.utexas.edu (Mario Garcia)
Organization: The University of Texas at Austin, Austin TX
Originator: tequila@dopey.cc.utexas.edu


What is the preferred way to open a file?  I have always used
FSOpen but I have seen code which calls HOpen.  What are the
advantages/disadvantages of each method ?
 
Thanks in advance
 
----------------------------------------------------------------------------
Mario L. Garcia                      E-mail mario@truth.asg.arlut.utexas.edu
Applied Research Laboratories
The University of Texas at Austin
----------------------------------------------------------------------------
From: grobbins@Apple.COM (Grobbins)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Detecting File Launch
Summary: don't rely on Process Serial Number
Date: 24 Dec 92 06:36:34 GMT
Organization: Experimental

In article <bobert.725056177@godzilla> bobert@informix.com (Robert Murphy) writes:
>>>In article <1992Dec21.040009.26063@mcs.drexel.edu>, udsugar@mcs.drexel.edu (David Sugar) writes:
>>>> I am looking for a way to detect how a file was launched.
>I just noticed a remark in a tech note to the effect that under System 7,
>an application launched as a startup item has a lower process id number
>than the Finder does.

That only applies to application extensions (appe's), not to startup
items.  Also, ordering of PSNs is not the kind of thing that is
guaranteed to be done in the same manner in the future.  

Grobbins             grobbins@apple.com

Usual disclaimers apply.
From: thomas@camino.mic.cl (Thomas Fruin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Preloading ALL code segments...?
Organization: El Camino
Reply-To: Thomas Fruin <thomas@camino.mic.cl>
X-Mailer: uAccess - Macintosh Release: 1.5v4
Date: Sat, 26 Dec 1992 18:55:22 CST


In article <keith-021292172408@kip-15.taligent.com> (comp.sys.mac.programmer),
keith@taligent.com (Keith Rollin) writes:

>By the way, you'd probably want a MoveHHi() in there before the HLock().
>Better yet, use HLockHi(). And if the handle's locked, you don't need the
>call to HNoPurge().
>
>-----
>Keith Rollin
>Phantom Programmer
>Taligent, Inc.

Hey, what is HLockHi()? I can guess what it does, but I have never seen it
documented anywhere. Is it MPW glue or a real trap?

-- Thomas Fruin

   thomas@camino.mic.cl

Newsgroups: comp.sys.mac.programmer
From: siegel@world.std.com (Rich Siegel)
Subject: Re: argc and argv in Think C
Keywords: Think vs. ANSI C
Organization: GCC Technologies
Distribution: NA
Date: Sat, 2 Jan 1993 23:32:07 GMT

In article <1i527bINNk39@gap.caltech.edu> rotenber@cco.caltech.edu (James Michael Rotenberry) writes:
>   I am trying to port a C program to the Mac.  Think C claims to
>   have ANSI C conformance, but I can find no reference to argc or
>   argv in the User Manual.  
>
>   Could someone indicate where I might find such a reference?  Thanks.

argc and argv are not ANSI C conformance features, so whether or not THINK C
supports them does not affect whether or not THINK C is a conforming ANSI
C implementation.

Nevertheless, the Console package supports the use of tty-type console windows,
and argc and argv. It's described starting on page 39 of the Standard Libraries
Reference.

R.



-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Senior Software Engineer
GCC Technologies
Newsgroups: comp.sys.mac.programmer
From: russotto@eng.umd.edu (Matthew T. Russotto)
Subject: Re: abs(-32768) = -32768 in Th C
Date: Tue, 22 Dec 92 02:18:29 GMT
Organization: Project GLUE, University of Maryland, College Park
Keywords: Think C

In article <Dec.21.20.22.18.1992.22767@remus.rutgers.edu> ficara@remus.rutgers.edu (ken ficara) writes:
>I'm having a problem with the library function abs in Think C 5.0.4.
>It's supposed to accept an int as argument. INT_MIN is defined as
>-32768. But when I take the abs of -32768, I get -32768 back. I
>realize that this is because the two's complement of 0x8000 is 0x8000
>with 2-byte ints. But shouldn't a function that receives an int deal
>with any possible in that could be passed to it? I mean, this is a
>classic boundary case.

It only has to deal with numbers in its domain.  The domain of abs can
be defined as -32767..32767.  More to the point, since 'abs' returns
an int and not a long, its range doesn't include 32768, so it couldn't
possibly work correctly.

>Corllary: when I say "printf("%d\n",INT_MIN);" I get "-32768." But
>when I open up <limits.h> and look at it, it says "#define INT_MIN
>(~32767)". Huh?

Think C's parser is a teensy bit brain damaged.  It can't represent
the constant -32768 as a 2-byte int.  So it uses (~32767) to get the
same bit pattern. (It can't use 0x8000 because that is of type
unsigned int)
-- 
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
Some news readers expect "Disclaimer:" here.
Just say NO to police searches and seizures.  Make them use force.
(not responsible for bodily harm resulting from following above advice)
Newsgroups: comp.sys.mac.programmer
From: rmah@panix.com (Robert Mah)
Subject: Re: Problem with patch to HFSDispatch
Date: Mon, 28 Dec 1992 02:28:01 GMT
Organization: PANIX Public Access Unix, NYC

Jon,

Thanks a bunch.  Also clears up a question I had regarding return addresses
that I asked Tim Dierks about in his reply.

Cool runnin'
Rob

-- 
[--------------------------------------------------]
[  Robert S. Mah   |  "Every day an adventure,     ]
[  rmah@panix.com  |   every moment a challenge."  ]
[--------------------------------------------------]
Newsgroups: comp.sys.mac.programmer
From: positron@engin.umich.edu (Jonathan Scott Haas)
Subject: Re: One routine works, the other doesnt, WHY??
Date: Thu, 31 Dec 92 18:45:34 EST
Organization: University of Michigan Engineering, Ann Arbor

In article <1992Dec29.121933.1426@galaxy.gov.bc.ca> cconstantine@galaxy.gov.bc.ca writes:
>Could someone please explain to me why the following routine gets compile time
>errors under MPW C 3.2.4:
>
>curDev = GetMainDevice();
>pixDepth = GetPixelDepth( curDev );                             
>if ( pixDepth <> 8 )                                            
>    DeathAlert( errNot8Bit );
>

Native speaker of Pascal, eh? :)

-- 
__/\__  Jonathan S. Haas         | Jake liked his women the way he liked
\    /  University of Michigan   | his kiwi fruit: sweet yet tart, firm-
/_  _\  positron@engin.umich.edu | fleshed yet yielding to the touch, and
  \/                             | covered with short brown fuzzy hair.
Newsgroups: comp.sys.mac.programmer
From: krobinso@acs.ucalgary.ca (Keith Robinson)
Subject: What is the structure of a Word 5 document?
Date: Mon, 21 Dec 92 23:36:49 GMT
Organization: The University of Calgary, Alberta


I'm looking for some info on the structure of Word 5.0 documents on
the Mac. I've has found some info on the document format for Word 1.0
written circa 1986 on sumex, but I'm trying to find something more
up-to-date. Anyone have any pointers to this type of info?

Keith Robinson
System Analyst
Dept. of Geomatics Engineering, The University of Calgary
Calgary, Alberta Canada
From: sal@pike.cis.upenn.edu (Marcos Salganicoff)
Newsgroups: comp.sys.mac.programmer
Subject: Think C versions: what's the latest?
Date: 29 Dec 92 21:41:14 GMT
Organization: Grasp Lab

The bookstore here at Penn has v5.0 of Think C. I've seen people on the net
refer to v 5.0.4. Are there any major bug patches between 5.0 and 5.0.4,
or should I just go for v5.0. The price is $66, which seems pretty good. Also
will Symantec send me the patches for free? Can they be gotten from the
net etc.? mumble mumble...

Marcos Salganicoff
GRASP Lab
UPENN
From: ansorge@kaleida.com (SeanEBoy)
Newsgroups: comp.sys.mac.programmer
Subject: Re: problem with animation program
Date: 21 Dec 92 23:58:17 GMT
Followup-To: comp.sys.mac.programmer
Organization: Kaleida Labs

I found the problem; seems I was indeed calling InvalRect, which does those
hideously nasty region operations. Mystery solved and things are very
speedy now.

.........................................................................
Sean Ansorge                                               (415) 966-0865
Kaleida Labs, Inc.                                    ansorge@kaleida.com
.........................................................................
From: udsugar@mcs.drexel.edu (David Sugar)
Newsgroups: comp.sys.mac.programmer
Subject: Detecting File Launch
Date: 21 Dec 92 04:00:09 GMT
Organization: Drexel University, Dept. of Math. and Comp. Sci.

I am looking for a way to detect how a file was launched.  For 
instance I need to know if an application was launched by 
being double clicked or weather it was started at startup
time because it was in the StartUp Items folder.  (I realize
that I can check to see if the application is in the Startup
Items folder but I need to see if it was user launched.)

The reason for this is because if the Application was double-
clicked I would like to bring up a preferences screen or
something like that, but if the Application was run because
it is startup time and the Application is in the Startup
Items folder I would like for the Application to do whatever
then quit without any user interaction.  

Any ideas??

Thanks for all suggestions

Dave Sugar
udsugar@mcs.drexel.edu
sugar@cedrus.com
Newsgroups: comp.sys.mac.programmer
From: neilg@fraser.sfu.ca (Neil K. Guy)
Subject: Re: How to write a balloons ?
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Fri, 1 Jan 1993 09:21:29 GMT

 Given this interesting discussion about putting balloon help into a
program comes a naive question...

 Is it possible, in theory, to add balloons to a program that doesn't
have them already? In other words, to add balloons to a piece of
software that's already been compiled, when it's not possible to go
back to the source code? I know ResEdit 2.1.1 has very limited support
for balloons and so can't do this at present but I was curious if it's
even possible at all. TIA!

 - Neil K. (n_k_guy@sfu.ca)
Newsgroups: comp.sys.mac.programmer
From: rowe@engin.umich.edu (Steven Rowe)
Subject: Re: Postscript download code?
Date: Thu, 24 Dec 92 17:47:04 EST
Organization: University of Michigan Engineering, Ann Arbor

In article <1992Dec24.155308.22365@midway.uchicago.edu> bmor@midway.uchicago.edu writes:
>Anyone out there know where I can get simple code to download a postscript
>program to a printer?  Thanks much!
>
>Brad Morris
>b-morris@uchicago.edu

Ditto.  There is an old ap called PrintPS which runs under system
6, but it doesn't work at all under 7.0.1.  Any sources?

                                    Steve
-- 
Steve Rowe: B0 f- w- c g+ k+ s- e+ r-
I drank too much beer, then tried to sober up by drinking
too much coffee.  The result was that I was still making
irrational decisions, but I was making them *FAST*!  -me
Newsgroups: comp.sys.mac.programmer
From: fixer@faxcsl.dcrt.nih.gov (Chris Feelin' Groovy Tate)
Subject: Re: Drag & Drop on an alias? What's missing?
Reply-To: fixer@faxcsl.dcrt.nih.gov
Organization: Computer Systems Laboratory, DCRT, NIH
Distribution: comp
Date: Thu, 31 Dec 1992 13:58:29 GMT

In article <jpugh-301292191717@kip2-31.apple.com>, jpugh@apple.com (Jon Pugh) writes:
>
>I have aliases galore on my desktop and I rebuild my desktop regularly.  I
>have found the simple trick is to keep aliases on the same volume as the
>original if you want drag and drop to work.  This works for me just fine,
>even after rebuilding.

The problem with this is if some of your aliases are to items on remote volumes
which you don't want to mount unless you need to.  Or, for that matter, if you
want aliases to things on various removable volumes, only one of which can be
in the drive at once.  Double-click on the alias (or drag-n-drop), and it pops
up the handy "Please insert the disk..." dialog.

Sadly, rebuilding the desktop doesn't seem to collect enough information
currently to support aliases to objects on other volumes.  Maybe in System 7.2?

------------------------------------------------------------------------------
Christopher Tate             | Return of the CryptoSig (tm):
Management Systems Designers |    LR KMBVALMH ZKM HD CNDMH, LV CLYY.  LR
                             |    MDVALMH AKT HDMU CNDMH, BDX'QU DQUNYDDEUJ
fixer@faxcsl.dcrt.nih.gov    |    TDIUVALMH.
Newsgroups: comp.sys.mac.programmer
From: mike@rahul.net (Mike Smithwick)
Subject: Extracting the color table from PICT
Organization: a2i network
Date: Tue, 22 Dec 1992 01:43:57 GMT

[]

Where is the colortable information in a PICT color image file. IM 5 isn't
quite as clear as I would like it to be in its PICT description. Is 
there any source code available??

mike


-- 
This message brought to you by the Happy Fun Ball! It's Happy! It's
fun!! It's the HAPPY FUN BALL!!! (Still legal in 16 states)
*** Mike Smithwick - mike@rahul.net 
*** No disclaimer is necessary since I only work for myself, HA! HA! HA! HA!
Newsgroups: comp.sys.mac.programmer