HDTenEightyP/NetNews huggingface dataset:
From: ralph@merlin.anu.edu.au (Ralph Sutherland)
Subject: Re: DESPERATE: switching pixmaps w/ SetPortPix
Organization: Mt. Stromlo and Siding Spring Observatories
Date: Thu, 13 Aug 92 07:00:30 GMT

Newsgroups: comp.sys.mac.programmer
Subject: Re: DESPERATE: switching pixmaps w/ SetPortPix
Summary: 
Expires: 
Followup-To: 
Distribution: 
Organization: Mt. Stromlo and Siding Spring Observatories
Keywords: 

 In Article 21019 in comp.sys.mac.programmer:
 envy@reed.edu!envy.Reed.Edu!pcalahan (Patrick John Calahan) Wrote:

>I still need a few lines of code which will do the following.
>
>SetPortPix(myOffscreenPixMap);
>

I tried email but it bounced and there didn't ssem to be any further posts
So...


Is this pseudocode more useful? (excuse the tabs, and as always no guarantees):

variables:

	aPort:Grafptr;              {general purpose port vriable}
    Coffport:CGrafPtr;          {temp colour port}
    oldpix:PixMapHandle;        {save the old pixmap}
    offpix:PixMapHandle;        {offscreen pixmap, initialised elsewhere}
    pwidth,pheight:integer;     {offscreen size}
    r:rect;                     {offscreen size}
    anRGB:RGBColor;             {anRGB color!}

.
.
.

      GetPort(aPort);

      Coffport := nil; {paranoia}

      Coffport := cGrafPtr(NewPtr(sizeof(cGrafport)));
                                      {allocate temp port to hold pixmap}

      if (Coffport <> nil)) and (Memerror = Noerr) then {Always check....}
       begin

           OpenCPort(Coffport);             {init port}
           oldpix := Coffport^.portPixMap;  {save pixmap}

           setport(Grafptr(CoffPort));     {set port is a good idea}
           SetPortpix(offpix);             {use the offpix}
           portsize(pwidth, pheight);      {Size IS important}
           rectrgn(CoffPort^.VisRgn, r);   {needed if the pixmap is
                                            larger than the screen}
           cliprect(r);                    { just so we have a clip}
           with anRGB do
             begin
                  red := $C000;
                  green := $C000;
                  blue := $4000;
             end;
           RGBForeColor(anRGB);           {sort of yellow...}
           Fillrect(brect, black);        {solid colour}

           SetPortpix(oldpix);            {put back the pix,
                                          I don't know if you really
                                          have to restore the visrgn}

           setPort(aPort);                { move to another port
                                            *before* you dispose!}

           CloseCPort(CoffPort);          {dispose}
           disposPtr(Pointer(CoffPort));  {clean Up}

         end;
.
.
.

Hope this helps

cheers
Ralph Sutherland


-- 
---- Ralph S. Sutherland      Mount Stromlo & Siding Spring Observatories.
---- ralph@madras.anu.edu.au  The Australian National University.
---- rss100@cscgpo.anu.edu.au --------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: frantzen@nosc.mil (Louise E. Frantzen)
Subject: AIFF and 'extended' type
Keywords: AIFF sound
Organization: Naval Ocean Systems Center, San Diego, CA
Date: Mon, 17 Aug 1992 20:41:16 GMT

Hello all, 

I have a question regarding the AIFF file format and the 'extended' type
which is used for the SampleRate.  I am using THINK C 5.0.  I have been
studying the info on AIFF in IM Vol VI and am stumped on this one.  On 
page 22-49 of IM VI, in listing 22-13, the hex value "400DADDD1745D145826B"
is given as "AIFFSampleRate (22kHz in extended type)".  I have looked through
Types.h and do not understand how the above hex value translates into the
sample rate of 22254.5455 Hz.  If anyone can give me some direction on how
to understand this or tell me what other documentation to look at I would
be very appreciative.

Thanks, 
Louise 

-------------------------------------------------------------------------
Louise Frantzen		"Well they say women shouldn't be the president
NRaD, San Diego		'cause we go crazy from time to time.  Well push 
(619) 553-7863		my button, baby, here I come.  I'm at high tide."
frantzen@nosc.mil		- Laurie Anderson, Beautiful Red Dress
Quote above does not reflect official US Navy position
--------------------------------------------------------------------------
From: strickli@cs.utk.edu (Michael C. Stricklin)
Newsgroups: comp.sys.mac.programmer
Subject: color dialogs
Date: 20 Aug 92 19:41:18 GMT
Organization: University of Tennessee, Knoxville - CS Department
NNTP-Posting-Host: duncan.cs.utk.edu


Is it honestly true that there is no trap to load a color dialog
box from a resource?  My superior intuitive skills tell me that it
would be called 'GetCDialog,' but I can't find reference to it in
any of the IM's, or any of Thimk (sic) C's header files.  Regardless,
could anyone tell me what's wrong with this snippet below?  It will
allocate the dialog properly, and (with ShowWindow, SetPort, and 
ModalDialog calls) display the dialog properly in 16 million+
beautiful colors.  Unfortunately, when I try to call it a second time,
it bombs out during the NewCDialog call.  Am I allocating memory
improperly?  I'm running Think C 5.0.2, Sys 7 on a Quadra 900 ( regretably
not mine :-[....).

void  MyDialog( void ) {
	Handle		theDITLHandle;
	DialogPtr	dialog;
	DialogRecord	theDialog;
	Rect		theRect = { 40, 40, 252, 634 };
	Boolean		dialogDone;

	theDITLHandle = GetResource( 'DITL', 128 );

	dialog = NewCDialog( &theDialog, &theRect, "\p", false,
		dBoxProc, (WindowPtr)-1L, false, 128, theDITLHandle );

	ShowWindow( dialog );
	SetPort( dialog );
	while( ! dialogDone ) {
		ModalDialog( nil, &itemHit );
		if ( itemHit == ok )
			dialogDone = true;
	}

	DisposDialog( dialog );

	return;
}


This should be boilerplate Mac programming, but I can't get it to
work.  Any help would be appreciated.

Michael C. Stricklin
mcs@memws.ssd.ornl.gov
strickli@cs.utk.edu
Newsgroups: comp.sys.mac.programmer
From: niko@iastate.edu (Nikolaus E Schuessler)
Subject: ** Mac hardware documentation
Organization: Iowa State University, Ames, IA
Date: Sun, 23 Aug 1992 16:00:30 GMT

Are the macintosh hardware technical manuals detailed enough
for writing your own disk/video drivers, etc? And, what are the
official titles/ISBN's for these?

-- 
Niko Schuessler               
Project Vincent Systems Manager              email: niko@iastate.edu
Iowa State University Computation Center     voice: (515) 294-1672
Ames IA 50010                                snail: 272 Durham
From: kazim@Apple.COM (Alex Kazim)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Dear Mr. Sculley
Summary: Marketing weenies
Date: 14 Aug 92 21:38:03 GMT
Organization: Apple Computer Inc., Cupertino, CA

In article <ceWcw2e00iUyE3BlQs@andrew.cmu.edu> gb2a+@andrew.cmu.edu (George J. Baxter) writes:
>
>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

There are two theories at work here: hit a lot of singles or swing for the
fences.  Most of the industry has switched to the former in an attempt to
be more competitive and reactive to the changing marketplace.  And, to be
honest, I'm not sure if one is better than the other.

An example, frequently quoted, is the original Mac Portable.  As far as the
box went, it had some pretty amazing technology: a 12 hour battery, a unique
power management system, active matrix display, full size keyboard, all the
i/o ports, etc.  The engineers spent a number of YEARS getting it right, but
by the time it came out, the market had moved, and the whole project was
a very, very expensive whiff.

I know it can be aggravating watching the incremental updates roll by,
but the problem we have to wrestle with is: do we delay a product intro
because the 400Mb drive isn't ready?  Will people buy it with 200Mb drives
instead?
 
And, one of the other things we hope the new theory will do is to let us
learn from our mistakes and fix them as quickly as possible.  So, like it or
not, it's here to stay, (which at Apple means about 12-18 mos.).

Perhaps you should be lobbying for a trade-in policy?

========================================================================
Alex Kazim, Apple Computer
Not a marketing guy
========================================================================
From: png@dciem.dciem.dnd.ca (Peter Ng)
Newsgroups: comp.sys.mac.programmer
Subject: Tracing mouse cursor movements ...
Date: 18 Aug 92 14:14:32 GMT
Distribution: na
Organization: Defence and Civil Institute of Environmental Medicine

Is there any "nice" way of tracing mouse cursor movements?? For example,
I have an application in which the user clicks on various areas of the
screen etc... What I would like to do is track the mouse cursor and
later on, "replay" the movements of the mouse.  A brute force method
would be to record the mouse cursor location at set intervals, then
redraw the mouse cursor at the points recorded.  This however, would
create a "jerky" playback and secondly, require large disk space to
store all the points! Any ideas or suggestions???? Please email
responses to me directly at: png@dretor.dciem.dnd.ca

Much thanx in advance.  Cheers!

Peter.
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Newsgroups: comp.sys.mac.programmer
Subject: C.S.M.P. Digest V1 #166 Available
Date: 13 Aug 92 11:26:26 GMT
Followup-To: poster
Organization: University of Oregon Computer and Information Sciences Dept.


C.S.M.P. Digest             Thu, 13 Aug 92       Volume 1 : Issue 166

Today's Topics:

	Determining if Color is available
	Distributed and background processing
	MacApp versus TCL



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
From: eric@homebase.vistachrome.com (Eric Brunson)
Subject: Re: bad f-line instruction
Keywords: f-line, major bug, frustration
Organization: Vista-Chrome Incorporated
Date: Mon, 17 Aug 1992 13:19:46 GMT

benescc@mentor.cc.purdue.edu (Chris Benes) writes:

>The UNIX source extensively uses the various memory allocation routines 
>which could be screwing up the Memory Manager.

I would highly recommend changing all mallocs and allocs to Mac toolbox 
calls, I have had problems before with Think C and their memory libraries.

Just a small suggestion, but I hope it helps.

-- 
Eric "Ra" Brunson      |
eric@vistachrome.com   |     These opinions are mine alone, but
brunson@math.fsu.edu   |   they could be yours for a low monthly fee.
From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
Newsgroups: comp.sys.mac.programmer
Subject: Blitting PixMaps with a mask
Date: 13 Aug 1992 13:54:02 GMT
Followup-To: comp.sys.mac.programmer
Organization: UTHSCH Academic Computing

I need some info on whether or not the following is possible using any
existing toolbox calls (e.g. CopyMask, CopyDeepMask, CalcMask, etc.)

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'd like to use the color image itself as the source for calculating a mask
or region *quickly* (i.e. using CopyMask or BitMapToRgn). However, it
appears that BitMapToRgn only only calculates regions for 1 bit deep
pixmaps. If I move the color image to a 1 bit gworld, I end up with a swiss
cheese region or mask, since the lighter colors turn white.

CopyDeepMask comes closest to working, using the color image for both the
source and mask and using srcCopy. (BTW, it seems that CopyDeepMask WON'T
work if the source and mask are exactly the same PixMap. Is this right?).
However, since the mask (i.e. the original color image) isn't all black,
various amounts of the background image bleed through.

I'd like to avoid the painful task of building custom regions, since the
source data is fairly dynamic. Is there a way to do this copy easily that
I've overlooked? It looks like a combination of CalcCMask with a matchProc
and CopyMask would work. If the matchProc just returned a 1 for every
non-white pixel, things would work fine. However, I can't find any
documentation on how to write a matchProc or what the args are in IM V or
VI.

Thanks,
Chuck

p.s. In the meantime, I'm off to wade through Principia Offscreen again.
From: sold@kit.uni-kl.de (Christoph Sold)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Dialog box TEdit character trapping.
Date: 14 Aug 92 20:31:33 GMT
Organization: Universitaet Kaiserslautern

In article <46293@shamash.cdc.com> ldh@svl.cdc.com (Lawrence D. Hare) writes:
>Subject: Dialog box TEdit character trapping.
>From: ldh@svl.cdc.com (Lawrence D. Hare)
>Date: 10 Aug 92 21:38:58 GMT
>Given a dialog box which contains, amongst other stuff, a TextEdit item,
>how can I trap characters typed by the user while under the enspiring
>auspices of the dialog manager?
>
>The application here is the age old one of password entry. Given that
>there is no password on file, throw up a dialog requesting one.
>Characters typed by the user are displayed with a blob for security.
>The actual character is retained by the application for use as the
>password.
>
>I can see doing this with TextEdit, but I would like to use the
>simplicity of the dialog manager. Any ideas as to how this can be done?
>
>--
>Lawrence D. Hare       Control Data - Silicon Valley Operations
>Consultant             Voice: (408) 496 4339 - C/N [234] 4339
>ldh@svl.cdc.com        Mail: SVLa60  FAX: (408) 496-4106

Lawrence,

check Inside Macintosh, every chapter of Dialog Manager, and guess what? 
there is a filter function for ModalDialog. That's easy, huh?

-Christoph

Christoph P. Sold                   CATS Software GmbH
                                    Mussbacher Landstr.2
                                    W-6730 Neustadt (Weinstrasse)
ger.xse0035@applelink.apple.com     Germany

"If an apple is fun, what the heck is an appletree?"
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Subject: Re: Porting code using fork() to the Mac
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<1992Aug16.001018.26666@reed.edu>
Date: Sun, 16 Aug 1992 20:35:10 GMT

.edu> orpheus@reed.edu (P. Hawthorne) writes:

     In the docs, there is some interesting discussion of a scheme for marking
   all unused code resources purgeable. The idea was to mark all code
   resources purgeable with the obvious exception of one resource, followed by
   a walk of the stack looking for anything resembling a return address, so
   that the relevant resources could be marked as non-purgeable.

     Has anyone given that a shot?

Don't forget the registers ! And the stacks for all OTHER threads !

However, that's exactly how many garbage collection schemes work
in various dynamic languages (such as LISP)

-- 
- I have decided that it is not boxes but my lack of skill that's the problem.
- Traitor! This kind of attitude will get you nowhere around here. If you must
  know, it's not your boxes that are the problem, it's your lack of a
  sufficient number of boxes. Go out and buy something.
Newsgroups: comp.sys.mac.programmer,misc.education,soc.college
From: gregf@shaman.sps.mot.com (Greg Ferguson)
Subject: PowerPoint file format
Originator: root@mogate.sps.mot.com
Keywords: powerPoint format
Reply-To: gregf@shaman.sps.mot.com
Organization: SPS
Date: Wed, 19 Aug 1992 16:40:17 GMT

Hi,

I need to know if anyone's done any investigating into the file formats used  
by PowerPoint and/or Aldus Persuasion.

We have a need to be able to port between PP and Persuasion, and do a better  
job of translation than using the scrapbook/clipboard.

Any tips or ideas would be welcome.

Thanks,

Greg Ferguson
rtmd30@email.sps.mot.com
gregf@shaman.sps.mot.com
Newsgroups: comp.sys.mac.programmer
Subject: Re: Toolbox init (was Re: What is a memory error -113 ?)
From: Bruce.Hoult@bbs.actrix.gen.nz
Date: Thu, 13 Aug 1992 13:31:58 GMT
Organization: Actrix Information Exchange

In article <1992Aug13.181036.10085@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
> 
> "You don't need floppies in an open client/server environment."
> 			    -- quote in a recent Computerworld


I missed that one.  Sounds like the last gasp attempt of the high priests
of the MIS department to keep users under their control.
-- 
Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
"Cray's producing a 500 MIPS personal computer with 256MB RAM and 8 GB
hard disk that fits in your pocket!"   "Great!  Is it PC compatible?"
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: StripAddress (was Re: Checksumming MemErr...)
Date: 19 Aug 92 10:19:53 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <Bt74v9.KGF@taligent.com>, keith@taligent.com (Keith Rollin) writes:

> I've got a Quadra 900 with 7.0.1, Tune-Up
> 1.1.1, and a bunch of skanky INITs. If anyone is going to have a goofy version
> of StripAddress, I would. However, StripAddress is still run from ROM on my
> machine, and it looks like this:
>
>      +0000  4080D764   BTST       #$00,$1EFC
>      +0006  4080D76A   BNE.S      _StripAddress+000C         ; 4080D770
>      +0008  4080D76C   AND.L      MaskBC,D0
>      +000C  4080D770   RTS

Interesting. I had a look on my IIfx, and my StripAddress entry point
is at 4080D76C--that is, my StripAddress routine consists of only the
last two of the above instructions. The preceding BTST and BNE are still
there, in the same place, but they're not part of StripAddress. Not
according to MacsBug, anyway.

My machine is running in 24-bit mode. Maybe I should go home and check
my LC (which runs in 32-bit mode) and see if that agrees with Keith...

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
From: franke@llnl.gov (Norman Franke, III)
Newsgroups: comp.sys.mac.programmer
Subject: Re: ThinkC project resource problems
Date: 21 Aug 92 20:58:23 GMT
Organization: Lawrence Livermore National Laboratory
X-UserAgent: Nuntius v1.1.1d7
X-XXDate: Fri, 21 Aug 92 22:00:31 GMT

In article <1992Aug21.145255.8244@digi.lonestar.org> Jon Jacobson,
jjacobso@digi.lonestar.org writes:

	I have been through the source code several times and I'm
	confident that everything is typed properly.  The program
	"behaves" as long as you don't try the popup menus (of
	course it doesn't like 0x00000000 for menu handles). 

Sorry, I don't have an idea about this. Other than checking to make sure
you are using the correct resource file in the appliation. (i.e. if you
use another resource file for something.)

I have a similarly weird problem. I created popup menus in
a dialog. I load the resource, insert it, do the popup all
nice and fine. Delete the menu, then I release the menu
handle then close the dialog. Then I repeat the process
again, and it crashes. However, if I keep the menu handles
around, everything works. Does anyone have an idea?

| | | |   +----------------------------------------+
| | | |   | Lawrence Livermore National Laboratory |
| | | |__ |        Computer Scientist - EPD        |
| | |___/ |     T-5475, R-1321, (510) 422-7440     |
\ \____/  | Norman Franke, III - frankee@.llnl.gov |
 \____/   -----------------------------------------+
From: cconstantine@galaxy.gov.bc.ca
Newsgroups: comp.sys.mac.programmer
Subject: GIF, QuickDraw & new IM questions.
Date: 12 Aug 92 16:29:31 -0700
Organization: BC Systems Corporation

I have just a couple (3 really) questions.  One of which I've never really got
an adequate answer for.  Here they are:

1) I currently have a copy of the GIF(tm) specs. document dated June 15, 1987. 
Is there a newer version of this document (say in Word format or something)
that someone can e-mail to me - also could someone e-mail me some code (C
and/or Pascal is fine) on how to open, view (display), close and save a GIF
file.

2) This one is in respect to QuickDraw.  I'm writting a quick and dirty pie
charting program.  I can get the program to draw the slices etc., but I can't
get it to put an outline around an entire _slice_ of pie.  IM says that there
isn't a procedure to outline an entire Wedge like most of the other QD
commands.  It also says that xxxxArc() procedures aren't mathematecally added
to a Region.  Some one please help me out here.  I saw a routine in THINK
Reference that looked something like this (algorithymically): PaintArc(),
InsetREct(10,10), PaintArc(white) to get the "outline" around a wedge.  I tried
this and it don't work.  Anything I am doing wrong here????

Last but not least...
3) regarding the new Inside Macintosh.  Will the examples be in Pascal, C or
both?? I prefere both.  I think it would be more benificial to have it that way
, especially for new Mac Programmers that have Pascal OR C experience.

Please e-mail or post replies.

Carl B. Constantine
CCONSTANTINE@galaxy.gov.bc.ca
From: Mary.Hicks@p0.f222.n125.z1.FIDONET.ORG (Mary Hicks)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Prograph/Serius Database De
Date: 21 Aug 92 20:34:13 GMT
Organization: FidoNet node 1:125/222.0 - Macademe/Emma, San Francisco CA

I am also using Prograph to develop applications, do you have any sample 
code in prograph?



--  
Mary Hicks - via FidoNet node 1:125/555
    UUCP: ...!uunet!hoptoad!kumr!fidogate!222.0!Mary.Hicks
INTERNET: Mary.Hicks@p0.f222.n125.z1.FIDONET.ORG
Newsgroups: comp.sys.mac.programmer