HDTenEightyP/NetNews huggingface dataset:
From: John_Miller@mindlink.bc.ca (John Miller)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Blitting PixMaps with a mask
Date: 14 Aug 92 01:00:28 GMT
Organization: MIND LINK! - British Columbia, Canada
Distribution: world

In Message <cshotton-130892083933@bmb8.med.uth.tmc.edu>,
cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes

> I have a color image on a white background, residing happily in
> a gworld.  I'd like to blit that image (without the white
> background) over another complex background. I KNOW I can do this
> with no problem if I use a region that matches the outline of the
> color image and CopyBits.

I don't think you need a region or a mask.  Specify "transparent"
mode in the call to CopyBits.  (IM Volume V page 61)

John Miller
Symplex Systems
From: jpugh@apple.com (Jon Pugh)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Map (was: Australian Mac systems)
Date: 19 Aug 92 05:13:20 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

>This won't work for two reasons:
> 
>1. Most users don't bother to set their location in the Map control panel.
> 
I certainly haven't. Is there any advantage in doing so?
> 
> If you're using a powerbook, it really helps when you change back and forth 
> between timezones; if only it supported daylight saving time..

I wrote an XCMD to set the time so that I could click a button and change
the time from east to west coasts.  Then I realized that I should set the
Map location and did some experiments.  It turns out the Map cdev
automatically changes the time when you change the location.  So I wrote an
XFCN that returns the location and time zone from the map cdev.  I use it
to display a couple of clocks which have Eastern and Pacific time in
Hypercard.

I believe that I saw an astronomy program that allowed you to set its
location from the PRAM settings.

Jon
From: datpete@daimi.aau.dk (Peter Andersen)
Newsgroups: comp.sys.mac.programmer
Subject: MacsBug symbols from assembler code?
Date: 20 Aug 92 15:57:33 GMT
Reply-To: datpete@daimi.aau.dk (Peter Andersen)
Organization: DAIMI: Computer Science Department, Aarhus University, Denmark

How do I make a (global) symbol known to MacsBug?
I have tried adding 

   DC.B $8C, 'MySymbol'
   DC.W $0000

after the last RTS in the code of the procedure, as described in
the MacsBug manual (Appendix G, p.118, MacsBug version 6.1 manual),
but the symbol is not known to MacsBug, when I try to debug the code.

I am using MPW 3.2.2, System 7.0.1 (US), MacsBug version 6.2b2 on a 
Macintosh IIx.

I have also tried {MPW}:Examples:AExamples:Sample.a, but although it
tries to add MacsBug symbols with the macro BdgInfo, again these symbols
are not known to my MacsBug.

Am I missing something?

Peter Andersen, e-mail: datpete@daimi.aau.dk
From: bayes@hplvec.LVLD.HP.COM (Scott Bayes)
Date: Fri, 14 Aug 1992 21:43:48 GMT
Subject: Re: Need desperate help !
Organization: Hewlett-Packard Co., Loveland, CO
Newsgroups: comp.sys.mac.programmer

And with MPW 3.2 under 7.0/TuneUp1.1.1 on MacII/68881 I got

10078 with S/W math and
106785 with 68881 math and 68020 opcodes

Using 68881/68020 and changing to extended x.  I got 107366 (may not be
a significant difference), and using (extended) x += 1.0, I got 106824.
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Musings on the Think C Debugger
Date: 14 Aug 92 15:59:01 GMT
Organization: SRI International, Menlo Park, California

In article <1992Aug13.191622.15902@hobbes.kzoo.edu> k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:


>How does ThD redraw my windows for me!?

I think its an option you can set in TC. Before a switch it will
save the image in your windows in an offscreen buffer. If the
debugger windows wipe out part of your windows, it blasts the image
it saved back into your windows and probably calls a valid rect so
that your app won't "see" an update event. If you don't have this option
set then every time TCD stomps on your windows you app will receive
update events. This is a drag if you are trying to debug your window drawing
code. becuase you will end up in the update loop from hell. :-)


>Is there some automatic way that the ThD knows what lo-mem globals etc.
>to swap in and out when it hits a breakpoint?  Or do the programmers at
>Symantec know about some undocumented system call that'll do a context
>switch for you?

They probably do know. But if they tell you , then they'll have to kill you.
:-)
Debuggers are very strange beasts and need to do very strange things to
do its job. Hense teh need for updating them every time the system changes.

I always wanted to write a mini debugger for the mac. One that would bring
up a dialog (if it could) and ask this question. "Sorry system error occured.
And give you three choices. "Try and exit gracefully","Reboot" or "Macsbug"
What a pipe dream huh?

Matt




-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Subject: C.S.M.P. Digest V1 #168 Available
Followup-To: poster
Organization: University of Oregon Computer and Information Sciences Dept.
Date: Sun, 16 Aug 1992 11:03:55 GMT


C.S.M.P. Digest             Sun, 16 Aug 92       Volume 1 : Issue 168

Today's Topics:

	Dispose of my relocatable blocks?
	"remote" app termination
	How do I get a Spinning Watch?
	undocumented low-memory globals
	MPW on SE
	MPW Scripting Q - answer
	Debugger for daemons?
	Dragging Icons...HELP!
	DSAT error #28, ThinkPascal, and MacsBug (weird)
	When to HLock (and not HLock) handles



The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.

The digest is a collection of article threads from the internet newsgroup
comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
regularly and want an archive of the discussions.  If you don't know what a
newsgroup is, you probably don't have access to it.  Ask your systems
administrator(s) for details.  (This means you can't post questions to the
digest.)

Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject.  The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
cs.uoregon.edu).  Article threads are not added to the digest until the last
article added to the thread is at least one month old (this is to ensure that
the thread is dead before adding it to the digest).  Article threads that
consist of only one message are generally not included in the digest.

The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
[128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
file /pub/mac/csmp-digest/README before downloading any files.  The most
recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
archive has a mail server; send a message with the text '$MACarch help' (no
quotes) to LISTSERV@ricevm1.rice.edu for more information.

The digest is also available via email.  Just send a note saying that you
want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
automatically receive each new issue as it is created.  Sorry, back issues
are not available through the mailing list.

Send administrative mail to mkelly@cs.uoregon.edu.


-- 
_____________________________________________________________________________
Michael A. Kelly                                         University of Oregon
mkelly@cs.uoregon.edu                             Computer Science Department
_____________________________________________________________________________
From: scasterg@magnus.acs.ohio-state.edu (Stuart M Castergine)
Newsgroups: comp.sys.mac.programmer
Subject: Newsbie needs help. Getting data out of buffPtr
Summary: pointers types conversions buffers confusion
Date: 13 Aug 92 19:15:02 GMT
Organization: The Ohio State University


I'm very new at both C and Macintosh programming, so bear with me. My
first project is a Hypercard XFCN. Very simple to start with.

1. Path to a file is passed in as a parameter
2. Open File
3. Read some data from file.
4. Do some stuff with the data.
5. Write data to an output file.
6. Pass back the pathname of the output file to Hypercard.

Now, since I'm so new. Everything is difficult. I've got everything
down up through step 3. the data is read in, it's in the buffer
buffPtr (type Ptr).

My question is:

1. How do I get the data out of buffPtr and into a string or array of
char or whatever where I can look at it and work with it?  I'll
essentially be breaking the data into different chunks, writing some
to the output file, calculating numbers using some of the bits as lsb
and msb of the numbers I want and writing them to the output file and
repeating this for blocks of data read in from the input file until EOF.

I think I can handle the manipulation once I get the data somewhere
where I know how to work with it, but I'm having trouble with the
incompatible pointer types and other things I don't understand.

-- 
scasterg@magnus.acs.ohio-state.edu -- Stuart M. Castergine
Fiver: "Oh, Hazel, look! The field! It's covered with blood!"
Hazel: "Don't be silly, it's only the light of the sunset." -- Watership Down
Newsgroups: comp.sys.mac.programmer
From: crod@cc.curtin.edu.au (Scott Kevill)
Subject: Re: getting stuffit files via ftp
Organization: Curtin University of Technology
Date: Sun, 23 Aug 1992 06:53:32 GMT

In article <1992Aug22.175706.18497@cybernet.cse.fau.edu>, pollansw@cse.fau.edu (Warren Pollans) writes:
> Hello again,
> 	I'm trying to learn to download mac files from ftp archives.
> Text files are no problem, so far.  I transferred a stuffit (.sit)
> file to my host machine and kermitted it to my mac.  I couldn't
> unstuffit (after changing the TYPE and CREATOR to SIT!) using
> stuffit 1.5  -  I get a message indicating that the header is
> corrupted.  How do I go about getting a stuffit file home and
> unstuffitted?
> 	Could someone recommend a short .sit file and an archive from
> which to retreive it - so I can practice what you preach.  One that
> you've had some success with.
> 	BTW, what do the other suffixes stand for?  --  .hqz,  .z,
> .shar and others.  Are these compressed/archived files?  How do I
> undo them?  Where do I get the "undoers"?
> 
> Thanks,
> 
> Warren
> (pollansw@cse.fau.edu)

    I had the same problem for a while, until I discovered that
FTP defaults to ASCII transfers (that's why your text files were
OK). In order to get your stuffit files and others to work, you have
to type BINARY before downloading.
Your file types and creators should also be ok after this.

    As for the other suffixes :
.hqx -- BinHex4.0 -- Used for ASCII transfer of binary files (I think!)
.z   -- these are compressed with the UNIX compress command
        MacCompress3.2 will undo these
.shar -- not sure what it's used for - I think for storing multiple
         files in a single archive - UnShar will undo these.

My personal preference for .hqx files is SunTar1.31. I find it
more reliable than DeHQX, Stuffit, Compact Pro, and most others.

All these programs should be available at sumex-aim.stanford.edu in
the directory /info-mac/util (not positive about that path).

There is also a file named MacFTPSites.txt or similar somewhere at
that site that has a compression table listing these types (along
with many others) and the programs that undo them.

Hope this helps !

Scott Kevill

+-----------------------+--------------------------------------+
I Scott Kevill          I    "Be like me, be original"         I
I crod@cs.curtin.edu.au I                              -- Me   I
+-----------------------+--------------------------------------+
Newsgroups: comp.sys.mac.programmer
Subject: sndChannels, Mac Pluses, and -201
From: baker4@husc10.harvard.edu (David Baker)
Date: 17 Aug 92 10:53:29
Distribution: comp
Organization: Department of Psychology, Harvard University

I have a program that, among other things, opens up a sound channel (with
SndNewChannel, links it to the sampled sound synthesizer, and later attempts
to play a sound with SndPlay.  On anything with an ASC, all is well,
basically, but on, say, a Mac Plus, although I can open (and later close) the
channel with no problems, SndPlay does not play anything and returns a code of
-201, which I have found out is "notEnoughHardware."  However, I am only using
this one channel, which, I have heard, should not throw any Mac into fits.
The Mac Plus has System 7, which may be interesting because a previous version
of this program, which used almost exactly the same calls, did run on the Plus
under System 6.  To make things more confusing, when another part of this
program calls SndPlay with a NULL sound channel pointer, the sound plays.

Any help would be appreciated.

--
-------------------------------------------------------------------------------
David P. Baker				Misbrainer:
Work: dpb@huelings.harvard.edu		The onions impressed herein are mine,
Home: baker4@husc.harvard.edu		knot throes of my imploder.
Office: William James Hall 844		
	Department of Psychology
	Harvard University		Note: If responding by mail, please
	(617) 495-3773			use my "Work" address above.
-------------------------------------------------------------------------------

Newsgroups: comp.sys.mac.programmer
From: zben@ni.umd.edu (Charles B. Cranston)
Subject: Re: Packing Rects into the smallest possible container
Followup-To: comp.sys.mac.programmer,comp.sources.wanted
Organization: UM Home for the Terminally Analytical
Date: Wed, 12 Aug 1992 20:26:24 GMT

In article <1992Aug12.013521.28314@cs.ucla.edu>,
tj@kona.cs.ucla.edu (Tom Johnson) wrote:

> I have a bunch of rectangular objects, and I would like to pack them into
> the smallest possible rectangular container (we're only dealing with 2
> dimensions here, I'm not concerned with 3d boxes).  How do I do this?
> The objects may all have different sizes. 
> Any suggestions for algorithms? Ideas?

This sounds a lot like a two-dimensional version of what has come to be
called "the knapsack problem" in computer science literature.  You might
be able to find some work being done if you use this buzzword.

Actually, the knapsack problem is usually explained in terms of fitting
the maximum amount of stuff in a knapsack of known size, i.e., given a
set of integers {I} and a number N find the maximal subset {i} such
that  sum({i}) <= N  or something like that.  In your case it is more
like finding the minimal N which for the one-dimensional case is simply
sum({I}).

The knapsack problem is thought to be NP-complete.  In fact, it was one
of the other schemes besides the factoring problem (RSA) considered for
use in public-key encryption algorithms...

zben@ni.umd.edu     -KA3ZDF
From: kinsey@athena.cs.uga.edu (Kevin Kinsey)
Newsgroups: comp.sys.mac.programmer
Subject: byte alignment problem
Date: 17 Aug 92 23:37:39 GMT
Article-I.D.: athena.1992Aug17.233739.19308
Organization: University of Georgia, Athens

a quick question:

	if given a struct { char a; long b;} x;, what is the best method
	to create a buffer that contains 'a' followed by 'b' WITHOUT the
	implicit padding within the struct. This data must be written out
	such that it can be read by a machine that expects the long to
	straddle an even address boundary.

	any pointers about how to do this?

kevin
-----
kinsey@athena.cs.uga.edu
University of Georgia
Athens, GA 30309
Newsgroups: comp.sys.mac.programmer
From: Anders Wallgren <anders@verity.com>
Subject: Re: ETO #8 - Problems With MacApp 3.0.1 and Latest MPW
Organization: Verity, Inc., Mountain View, CA, USA
Date: Wed, 19 Aug 92 20:58:29 GMT
X-Xxmessage-Id: <A6B8047F5601C897@pokey.verity.com>
X-Useragent: Nuntius v1.1.1d8
X-Xxdate: Wed, 19 Aug 92 22:00:31 GMT

In article <1992Aug19.201204.23405@udel.edu> John Gray,
gray@brain.asel.udel.edu writes:
>Anyone know a simple fix that is safe.  I don't
>really know what the resource does so I am a bit reluctant to just
>delete it out of MacApp.r.

Yes, put the aedt definition back into either the MPW or the MacApp
header file.
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
From: francis@csli.stanford.edu (Dave Francis)
Subject: Localized System software
Organization: CSLI, Stanford University
Date: Wed, 12 Aug 1992 16:41:52 GMT

This question may have two answers given the release of system 7.1 (Cube-E).

How does one tell if the System running is Japanese or Persian or
whatever? Does this change with the introduction of system 7.1?

Thanks,
Dave Francis
From: gb2a+@andrew.cmu.edu (George J. Baxter)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Dear Mr. Sculley
Date: 13 Aug 92 08:34:10 GMT
Article-I.D.: andrew.ceWcw2e00iUyE3BlQs
	<BswI6y.A60@jfwhome.FUNHOUSE.COM>
Organization: Science & Technology Center, Carnegie Mellon, Pittsburgh, PA


>>Dear Mr. Sculley (via the graces of Travis Grundke),
>>    I once saw an article in MacWeek about how Apple was 'responding to
>>consumer demand for more frequent upgrades' for the Apple computers.  As
>>a developer, this didn't make much sense to me.  Eg. we bought two
>>Quadra 900s, and before we could even get the machines set up, somebody
>>gives me an article announcing the Quadra 950.  My response, of course,
>>was "AAAAAAAAAAARRRRRRRRRGGGGGGGGG!!!"
 
>I agree.  I'm sick and tired of Apple constantly coming out with newer and
>better machines.  Dammit, if the Mac 128K was good enough for Steve Jobs, it's
>good enough for me.

Don't be stupid.  I'm not criticizing normal upgrades, but an upgrade 6
months after initial release?  Puh-lease.  My point is that I wish Apple
had come out with the 950 in the first place, forget the 900.  This
'consumer demand for more frequent upgrades' is a questionable
statement.
From: resnick@cogsci.uiuc.edu (Pete Resnick)
Newsgroups: comp.sys.mac.programmer
Subject: Re: UDP Broadcast on a Mac?
Date: 20 Aug 92 21:11:54 GMT
Organization: University of Illinois at Urbana

wayne@jahangir.UUCP (wayne) writes:

>     Is the Mac capable of broadcast? Is there any
>reason why the Mac would not be able to do broadcast.

Sure, but you have to know the broadcast address for your net. Most
nowadays are all 1's, but there are still some (misconfigured) nets
around with broadcast as 0's.

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
Newsgroups: comp.sys.mac.programmer
From: keith@taligent.com (Keith Rollin)
Subject: Re: converting the vRefNum and DirID to just a vRefNum...
Organization: Taligent
Distribution: usa
Date: Thu, 20 Aug 1992 00:06:59 GMT

In article <1992Aug19.182018.29206@nntp.uoregon.edu>,
eric_gorr@coglab_psych.uoregon.edu (Eric Gorr) writes:
> 
> I have a vRefNum and a DirID and I want to use these two numbers so that I
> can have just a vRefNum to be used by SetVol.  
> 
> How can I do this?

Don't.

Calling SetVol is generally a bad idea. It would be better if you just kept
track of the vRefNum and dirID, and passed them to routines like HOpen,
HOpenResFile, FSpOpenDF, and FSpOpenResFile.

Probably the only reason for setting the default directory is if you are going
to call some lamoid C routines like fopen(). In that case, it would be better to
call HSetVol in the following sequence (syntax approximate):

    GetVol(&oldVol);
    HSetVol(newVRefNum, newDirID);
    myFile = fopen(myFileName, "r");
    SetVol(oldVol);

--
Keith Rollin
Phantom Programmer
Taligent, Inc.

Newsgroups: comp.sys.mac.programmer
From: umdenbo0@ccu.umanitoba.ca (David A. Denboer)
Subject: QuickTime programming
Organization: University of Manitoba, Winnipeg, Canada
Date: Thu, 13 Aug 1992 08:19:21 GMT

I have a few questions about programming for QuickTime 1.0.
Looking through some source code on the Apple CD, most programs use
GetNextEvent instead of WaitNextEvent.  Being from Apple, I would expect to
see WaitNextEvent used.  Would I get smoother playback with GetNextEvent?

When constructing a new movie, has anyone been able to get more than one
sound-track into the movie (not using a commercial movie making program!)

Have you seen any GOOD source code for QuickTime programming other than 
on the Apple CD?

Thanks for any help,
David A. den Boer
umdenbo0@CCU.UManitoba.CA
Musi Computer Products
Macintosh Users Show Intelligence
-- 

David  A.  den Boer
Musi Computer Products

Newsgroups: comp.sys.mac.programmer
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Subject: C.S.M.P. Digest V1 #170 Available
Followup-To: poster
Organization: University of Oregon Computer and Information Sciences Dept.
Date: Tue, 18 Aug 1992 12:19:31 GMT


C.S.M.P. Digest             Tue, 18 Aug 92       Volume 1 : Issue 170

Today's Topics:

	Sockets interface to MacTCP
	Beginner want to know about _Jackson
	Selecting graphics
	Building Installation Disks
	Gettting the size of a window or Graf Port
	How to play MIDI resources?
	What is LDIVT (referenced in an MPW .o/.lib file?)
	texedit records >32K (SUMMARY)
	Has anybody got disk dragging to work?
	ioCompletion and AppleTalk
	Catching phys ATalk connection



The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.

The digest is a collection of article threads from the internet newsgroup
comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
regularly and want an archive of the discussions.  If you don't know what a
newsgroup is, you probably don't have access to it.  Ask your systems
administrator(s) for details.  (This means you can't post questions to the
digest.)

Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject.  The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
cs.uoregon.edu).  Article threads are not added to the digest until the last
article added to the thread is at least one month old (this is to ensure that
the thread is dead before adding it to the digest).  Article threads that
consist of only one message are generally not included in the digest.

The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
[128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
file /pub/mac/csmp-digest/README before downloading any files.  The most
recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
archive has a mail server; send a message with the text '$MACarch help' (no
quotes) to LISTSERV@ricevm1.rice.edu for more information.

The digest is also available via email.  Just send a note saying that you
want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
automatically receive each new issue as it is created.  Sorry, back issues
are not available through the mailing list.

Send administrative mail to mkelly@cs.uoregon.edu.


-- 
_____________________________________________________________________________
Michael A. Kelly                                         University of Oregon
mkelly@cs.uoregon.edu                             Computer Science Department
_____________________________________________________________________________
Newsgroups: comp.sys.mac.programmer