HDTenEightyP/NetNews huggingface dataset:
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: Gestalt Selectors in APPL
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 23 Dec 1992 20:40:12 GMT

I need an application to install a gestalt selector. 
I know I need to load it into the System Heap but I 
have a few questions and comments.

1) Can I perform a "6-byte-xdef" type trick on this 
code? I'm not sure I can since even if I mark the 
6-byte resource as sysHeap the code it points to is 
still in my application heap.

2) If I place my Gestalt selector function in a separate 
CODE resource, can I mark that resource as sysHeap and 
have it work properly? This would be WITHOUT any 6-byte 
tricks.

3) How can I remove the Gestalt selector once the app 
quits? Will

    err = ReplaceGestalt(selector, nil, &oldGestaltFunction);

work or will this cause the System to jump to location 0 
the next time someone calls my selector?

What's the easiest way? Thanks in advance! :)

Joe Zobkiw

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

macintosh.midi.synthesis.c.oop.asm.communications.graphics...
Newsgroups: comp.sys.mac.programmer
From: speno@clam.rutgers.edu (John P. Speno)
Newsgroups: comp.sys.mac.programmer
Subject: Assembler?
Date: 25 Dec 92 04:56:47 GMT
Distribution: comp.sys.mac.programmer
Organization: Rutgers University -- Camden, New Jersey.


Could someone please let me know where I can find a decent Assembler
for the mac preferably new and free :). Must be available for
anonymous ftp and all that junk...

--
=A==l===================+==l===============ro=======a================d=====s= 
John P. Speno		| Disclaimer: Everything I say is my own propaganda.
Trumps R' Us		|  Rutgers Camden, Computer Science Club Secretary. 
speno@clam.rutgers.edu	|		Resistance Is Futile.
==le===========a=======d+=====t=o====Am=========b===========e============r===
From: peirce@outpost.SF-Bay.org (Michael Peirce)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Uniquely identifying a Mac? How?
Date: 25 Dec 92 00:00:36 GMT
Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
Organization: Peirce Software
X-Mailer: uAccess - Macintosh Release: 1.6v1


In article <01050023.lbu8j5@chinchilla.cars.com> (comp.sys.mac.programmer), niel@cars.com (Niel Bornstein) writes:
> 
> In article <9235010.4295@mulga.cs.mu.OZ.AU> (comp.sys.mac.programmer), mtc@mundil.cs.mu.OZ.AU (Michael Trevor CUTTER) writes:
> >We are looking for a way to uniquely identify a Mac, probably one on a network,
> >but not necessarily. Is the serial number or similar available somewhere in the
> >ROMs or parameter RAM? (Highly unlikely, I know - specially since PRAM can be
> >reset)
> 
> 
> How about the AppleTalk address?  I know, they are assigned dynamically,
> but if the network is mature it will stabilize.  Are machines being
> added to or taken off the network a lot?  

If you have PowerBook users, there very well may be many machines
coming and going from your network on a regular basis.  

You might take the approach that Apple used with Aliases.  They store
a number of tidbits of information when trying to track a file (things
like name, location on a volume, create date, etc) and use a number
of rules to figure out if that file out there that looks like the
one we want is *really* it.

You might use something like a combination of AppleTalk address, user
name, machine name, machine type, boot volume create date, etc.

Then you use some rules like:

(1) if only AT address changed, figure it's the same machine as yesterday.
(2) if only user name changed, figure it's the same machine asas yesterday. 
(3) if only the boot volume create date changed,  figure it's the same machine as yesterday.
(4) etc.

If you are careful in how you choose these variables and rules you
will probably do OK.  You still may want to through up your hands
every now and ask the user (as they do with Aliases).

Good luck...

--  Michael Peirce      --   peirce@outpost.SF-Bay.org
--  Peirce Software     --   Suite 301, 719 Hibiscus Place
--                      --   San Jose, California USA 95117
--  Drop by booth #4463 --   voice: (408) 244-6554 fax: (408) 244-6882
--  at MacWorld Expo/SF --   AppleLink: peirce & America Online: AFC Peirce
Newsgroups: comp.sys.mac.programmer
From: geek@casbah.acns.nwu.edu (Myrland Gray)
Subject: Re: What am I doin wrong?
Keywords: pixmap
Organization: Northwestern University, Evanston Illinois.
Distribution: usa
Date: Mon, 28 Dec 1992 22:44:11 GMT

In article <1992Dec27.133008.1@vax1.mankato.msus.edu> t303grey@vax1.mankato.msus.edu writes:
>  Please read the code following and tell me why it not working. I'm totaly
>lost in these cases and have no other way to find an enlightment other than
>asking the infinite wisdom of the net.
>
>*** problem 1: (Error checking code are deleted, assume best case)
>    GetGWorld( &oldPort, &oldDevice );
>    Err = NewGWorld( &offWorld, 8, &theScreen, NULL, NULL, 0 );
>    SetGWorld( offWorld, NULL );
>    pixBase = GetGWorldPixMap( offWorld );
>    LockPixels( pixBase );
>    EraseRect( &theScreen );
>    SetGWorld( oldPort, oldDevice );
>    CopyBits( &pixBase,
>                &(*(GrafPtr) pCWindow).portBits,
>                &theScreen, &theScreen, srcCopy, NULL );
>    UnlockPixels( pixBase );
>
> Strange thing about this code is if I substitute the 1st argument of CopyBits
>call to &(*(GrafPtr) offWorld).portBits it works fine. But according to IM7 we
>should never dereference GWorld (p21-5 paragraph 3) to get to pixMap. Right?

It looks to me like the problem is that you are passing the address of the
handle to your pixmap, rather than a pointer to a pixmap. In other words, with
your first parameter to CopyBits, three dereferences are necessary in order to
access the contents of the pixmap. However, CopyBits will only do a single
dereference of its first (and second) parameters to get to the "guts" and so
who really knows what you were blasting into your window (if anything). The fix
is to lock your pixel map, pass *pixBase (maybe type-casted as a BitMap* ???),
and then unlock your pixel map. That should work. I've done exactly what you
seem to have done so many times, I could solve this in my sleep!

As some of the other responses to your query have pointed out, the routines you
are using are specific to system 7. Just make sure that's really what you want.

Joey Gray
geek@casbah.acns.nwu.edu

Newsgroups: comp.sys.mac.programmer
From: russotto@eng.umd.edu (Matthew T. Russotto)
Subject: Re: Curves in QuickDraw GX
Date: Thu, 31 Dec 92 22:49:23 GMT
Organization: Project GLUE, University of Maryland, College Park

In article <ksand-301292141154@wintermute.apple.com> ksand@apple.com (Kent Sandvik ) writes:
>
>Well, concerning a PowerPC port it makes sense, because asm is no-no
>or 'if-you-really-need-it' option on this platform.

Uhhh.... why?

-- 
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,comp.sys.mac.comm,vms.networks.desktop.pathworks,comp.os.vms
From: vec@alnitak.Kodak.COM (Vance Cochrane)
Newsgroups: comp.sys.mac.programmer
Subject: Re: New to macintosh programming...
Date: 28 Dec 92 20:42:13 GMT
Organization: Eastman Kodak Co., Rochester, NY

In article <chuckb.725567825@milton>, chuckb@milton.u.washington.edu (Chuck Bass) writes:
>I am an experienced C programmer beginning work on a 
>Mac (coming from workstation/PC programming).  I am wondering if
>there is a specific book or other reference to help my
>transition to the mac.  I would like learn specifics about
>portability issues such as memory allocation and file IO.
>
>If anyone has any info, anecdotes, references on making this
>transition I would apprecitate it.
>
>chuckb
>
>(I'm using Think C)

I am in roughly the same boat, X windows, Unix, C, etc. 
The book I am using is 

	Mactintosh C Programming Primer Vols. 1 & 2.
	Dave Mark & Cartwright Reed
	Addison Wesley 1992
	ISBN 0-201-60838-3 (vol 1)
	ISBN 0-201-57016-5 (vol 2)

These are excellent books and make programming the mac
very understandable. I also think C and so do the books.
Also you may want to get copies of Inside Macintosh (both
the old and new versions) beware these are multi-volume 
sets and may cost a bit if that is an issue.

good luck..
vec
-- 
+------------------------------------------------------+
+ Vance Cochrane                Email: vec@Kodak.COM   +
+ Research Laboratories	        Voice: (716) 722-3709  +
+ Eastman Kodak Company	        Fax:   (716) 477-8681  +
+ Rochester, NY 14650-1826                             +
+ USA                                                  +
+------------------------------------------------------+
From: Barry_Wolman@transarc.com
Newsgroups: comp.sys.mac.programmer
Subject: Getting Size of Large Files
Date: 28 Dec 92 17:28:37 GMT
Article-I.D.: transarc.ofDwLZCSMUI3IEX0Ef
Organization: Carnegie Mellon, Pittsburgh, PA

I'm trying to track down a problem in my SerialPrint II DA.  SP II
prints TEXT files on serial printers using the text fonts defined in
the printers.  The process is quite simple:  open appropriate serial
port, open the file specified by user, loop reading lines from file
and sending lines to serial port.
	
Recently a user reported a problem printing "large" files.  When I
investigated, I found that files smaller than 65536 were handled
properly.  Files 65536 characters or larger _always_ got an error -51
(bad iorefNum) in the code that determines the size of the file by
calling PBGetEOF.  I reviewed the code and checked Think Reference; I
can't understand why the code works for small files and fails for
large ones.  I'd check Inside Mac, but I'm still unpacking from my
recent move and my copies of IM haven't surfaced yet.

I'd appreciate hearing from anyone who can help me with this problem.
My code is appended to this message.

Thanks,
Barry

--------------------

ffopen ()
{
	static	SFReply frommac;
	register ParmBlkPtr pb;
	OSErr iErr;

	pb = &filepb;
	
	SFGetFile (where, 0L, 0L, 1, mytypelist, 0L, &frommac);
	if (frommac.good) {
		pb->ioParam.ioNamePtr = frommac.fName;
		pb->ioParam.ioCompletion = nil;
		pb->ioParam.ioVersNum = 0;
		pb->ioParam.ioMisc = _iobuf;
		pb->ioParam.ioVRefNum = frommac.vRefNum;
		pb->ioParam.ioPermssn = fsRdPerm;
		pb->ioParam.ioPosMode = 3456;
		PBOpen(pb,FALSE);
		if(pb->ioParam.ioResult) {
			show_error(SFGET_ALERT,pb->ioParam.ioResult);
			return (FALSE);
		}
		else {
			if ((iErr = PBGetEOF(pb,0)) != noErr) {
				show_error(GETEOF_ALERT,iErr);
				return (FALSE);
			}

			filelength = (long)(pb->ioParam.ioMisc);
			return (TRUE);
		}
	}
	else return (FALSE);
}
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Two more questions from a newbie
Date: 28 Dec 92 10:36:56 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <w=Z=wfB@engin.umich.edu> positron@engin.umich.edu (Jonathan Scott Haas) writes:

>to have different names under Think C. I'd rather write code the
>way Inside Mac says to, so I've created a file called thinkc.h
>that currently contains:

>     #define AppendResMenu AddResMenu
>     #define GetMenuHandle GetMHandle
>     #define GetMenuItemText GetItem

>...and so on. My question is: why? Why doesn't Think C use the
>"standard" names for these functions?

My Inside Mac tells me AddResMenu, GetMHandle and GetItem are
the correct versions. My Think C agrees. Maybe you have the new
Inside Mac, assuming a new set of headers? Maybe you misread it?

Btw; MPW is another development environment. If you need scripting,
you will want it; otherwise it's larger and slower and less slick
than Think C.

Cheers,

							/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

  "From now on I will re-label the EQ on the deck as Fizz and Wobble
   instead of HF and LF."
From: amanda@intercon.com (Amanda Walker)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Programming Group and the 32k TextEdit barrier
Date: Wed, 23 Dec 1992 13:28:29 -0500
Organization: InterCon Systems Corporation
Distribution: world
Reply-To: amanda@intercon.com (Amanda Walker)
NNTP-Posting-Host: chaos.intercon.com
X-Newsreader: InterCon TCP/Connect II 1.1b26

siegel@world.std.com (Rich Siegel) writes:
> I disagree. A text engine, while nontrivial, is not complicated enough 
> to warrant the effort of more than one or two programmers. 

In fact, clarity of design is sufficiently important for something like this 
that I would avoid putting more than one (experienced :)) programmer on it, 
at least until the basic code is up and running.

Also, as an early Capps' customer, I'll put in a plug for Rich's PE Package.  
Good job, Rich!



Amanda Walker
InterCon Systems Corporation
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Looking at a bit in a bitmap truly bytes. Help!
Date: 22 Dec 92 20:54:09 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1992Dec22.004631.14531@midway.uchicago.edu> greg@zaphod.uchicago.edu (Greg Kuperberg) writes:

>Icon's mask, already a moral violation of the Object-Oriented
>mentality, and then I have to either find a grafPort somewhere and set

Uh?

What's non-oo about chasing down the mask? Don't you store objects
of icons in a decent data structure, check which one was clicked
and call the GetMask method of it? Or even better, have the Icon
object know how to check its own mask.

>the grafPort's bits to the mask and finally use GetPixel, or I have to
>monkey with the raw bits of the mask packed into bytes.  The first
>method is in practice a really kludgey way to try to stay PC, and maybe

Well, cheking the bits directly is not TOO platform-dependent, since
the format of ICN# resources is well defined and won't change...

What I would do is open a new port, SetPortBits to
a known scratch space one longword long, and move
the origin and clip so that you know what's going on,
and draw the icon MASK into that port, then DisposePort
the port.

Cheers,

						/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
   The word "politics" is derived from the word "poly", meaning
   "many", and the word "ticks", meaning "blood sucking parasites".
                     -- Larry Hardiman
From: geek@casbah.acns.nwu.edu (Myrland Gray)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MPW Compile errors, Help!!! (long)
Date: 31 Dec 92 16:14:17 GMT
Distribution: usa
Organization: Northwestern University, Evanston Illinois.

In article <1992Dec23.075909.1414@galaxy.gov.bc.ca> cconstantine@galaxy.gov.bc.
ca writes:
>I used the routine
>found in Dave Mark & Cartwright Reed's C book 2, chapter 4 and just modified
>it so that all I want is the 8-bit depth.  However, I get the following error
>message when I compile:
>
># 7:55:00 AM ----- Build of AR DataLogger/Mac.
># 7:55:00 AM ----- Analyzing dependencies.
># 7:55:02 AM ----- Executing build commands.
>    Rez 'AR DataLogger/Mac.r' -append -o 'AR DataLogger/Mac'
>    C -r -i ":Hdrs:" -sym on ":Src:"Main.c -o ":Obj:"Main.c.o
>#		pixDepth = GetPixelDepth( curDev );
>#		if ( pixDepth <> 8 )
>#		               ?     
>### Error 22 error in factor
>#		                 ?   
>### Error 29 ')' expected
>#		                   ? 
>### Error 30 ';' expected
>#		                   ? 
>### Error 22 error in factor

Let me guess...you used to be a Pascal programmer? Try using != instead of <>.
It's not MPW you're having problems with, it's C. Seriously though, it is an
easy mistake to make when switching around between languages ;-)

Joey Gray
geek@casbah.acns.nwu.edu
From: rotenber@cco.caltech.edu (James Michael Rotenberry)
Newsgroups: comp.sys.mac.programmer
Subject: argc and argv in Think C
Date: 2 Jan 1993 21:42:03 GMT
Organization: California Institute of Technology, Pasadena
Distribution: NA
NNTP-Posting-Host: alumni.caltech.edu
Keywords: Think vs. ANSI C

   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.

                                               Mike Rotenberry

  rotenber@alumni.caltech.edu
From: pmbrando@sgipm3.sdrc.com (Brandon Livingston)
Newsgroups: comp.sys.mac.programmer
Subject: Programming QuickCapture Board
Date: 31 Dec 92 16:51:59 GMT
Organization: SDRC



I have a Data Translation QuickCapture Board installed in my IIx.
I am trying to write software to use the board to capture images.

First of all I am new to the world of mac programming as well as C,
so bare with me on this one.

Anyway,  The quickcapture documentation says the board is memory
mapped to the mac and it uses two 8-bit control registers at memory 
locations:   $FSF8 0000  and $FSF8 0004  where S is the slot number.
These registers are used for control and status purposes. Each bit
at these locations serves a purpose.  ie. bit 3 at $FSF8 0004 is 
0 if the board is a 60Hz model type or 1 for the 50Hz model.

The quickcapture documentation says that these registers can be
accessed at any time through standard memory instructions.  
When I try to access a register in C by setting a pointer to it
my values are nothing like what they should be.  For example:
when I get the status of bit 3 at $FSF8 0004 I get 1, but I know
my board is not a 50Hz model.  I've tried using 32 bit addressing 
which didn't work either.  

What am I doing wrong?  What do I need to know to be able to do 
this?

If anybody has any good advice and feels like helping out a novice
please post to this group or send me e-mail at:

				blivings@uceng.uc.edu

Please don't send e-mail to my sdrc address because this is my last
day here for a few months. (I'm a co-op)

Thanks,
Brandon
Newsgroups: comp.sys.mac.programmer
From: peter@cujo.curtin.edu.au (Peter N Lewis)
Subject: Re: Uniquely identifying a Mac? How?
Followup-To: comp.sys.mac.programmer
Organization: NCRPDA, Curtin University
Date: Mon, 21 Dec 1992 05:39:52 GMT

In article <1992Dec17.105813.18407@jarvis.csri.toronto.edu>,
ematias@dgp.toronto.edu (Edgar Matias) wrote:
> 
> 
> > In article <1gm3ioINN9uh@calvin.NYU.EDU>, roy@mchip00.med.nyu.edu (Roy Smith) writes:
> > >
> > > I personally think it was a major mistake for Apple
> > > to not have put some sort of machine-readable serial number in each machine.

> > Can you say "copy protection"...?

> Isn't that the idea?  If you are going to have a copy protection scheme,
> I'd think that would be the best type.  Least amount of hassle for the
> user, yet still protects the software industry's interests.  Of course,
> if you're in the habit of pirating software maybe it's not in your 
> interests...
> 
> I'm a little surprised that the software industry hasn't latched onto
> this idea and lobbied hard for it.  It seems like the ideal solution
> to software piracy.  Of course, it wouldn't stop piracy entirely but
> it would certainly put a serious dent in it.

Isn't it clear why its not done?  If Apple put a serial number on the 
machine, and people successfully copy protect their programs, the immediate
consequence of this is that the value of the machine drops a great deal.
All those users can't pirate the programs they want, so they stop buying
the machines, and buy other machines where they can get the programs 
they want for free.  This may not be moral, but I haven't found much
connection between morality and reality.  Besides, its not Apple's 
problem if people pirate (non-apple) software, quite the opposite,
Apple benifits by this.

I'm not condoning piracy - the world would probably be a better place
if their was no piracy, but the world would be better off if no one
went hungry as well, and neither of these outcomes are going to happen
any time soon, and the latter is far more important than the former anyway.

There have actually been a few examples of hardware with serial numbers
on them, but they've mostly gone out of business now...

Have fun all,
   Peter.

_______________________________________________________________________
Peter N Lewis <peter@cujo.curtin.edu.au>             Ph: +61 9 368 2055
Newsgroups: comp.sys.mac.programmer
From: ppc1@cec2.wustl.edu (Peter Pui Tak Chiu)
Subject: QuickDraw
Organization: Washington University, St. Louis MO
Date: Thu, 31 Dec 1992 01:29:47 GMT

hi...

i am trying to do some animation using MPW in assembly language.

i want to prepare some graphics in some other area of the quickdraw coordinate
plane while i am showing a frame and then when the new frame is done, i set
the viewing rectangle to the newly drawn frame and draw the next frame
somewhere else.

does anyone know if there is any quickdraw routine that let me set the
viewing rectangle?

please email to ppc1@cec1.wustl.edu

thanks a lot in advance

peter
Newsgroups: comp.sys.mac.programmer
Subject: HELP! needed with Mac print dirver
From: dreuben@eagle.wesleyan.edu
Date: 22 Dec 92 00:22:53 EST
Organization: Wesleyan University

Hi-

The following was posted with the incorrect subject line of:
"help needed with print driver for MS Windows".

Needless to say, that is probably not a topic of much interest to this group!

Sorry about the repost, but hopefully the corrected subject line will attract
some responses. 

Thanks,

-Doug
________________________________________________________________________

I'm trying to write a print driver that can be used by Microsoft Word
and other applications. Even though I've got a simple driver that
worked with the chooser, it still gets rejected by applications... MS
Word just beeps a few times when you do "Print..." and then hangs. I've
included all the resource types mentioned in Inside Mac, but there are
some other resources in most print drivers that are never mentioned
anywhere in Inside Mac. Is there a good book that talks about this stuff
that I can buy? 

Thanks in advance for any help!

-Doug

dreuben@eagle.wesleyan.edu
dreuben@wesleyan.bitnet
From: yjc@po.cwru.edu (Jerome 'TofuSoft' Chan)
Newsgroups: comp.sys.mac.programmer
Subject: How do I find a hole in the DeskTop?!
Followup-To: comp.sys.mac.programmer
Date: 25 Dec 1992 06:29:04 GMT
Organization: The Tofu Society of Singapore
Distribution: world
NNTP-Posting-Host: yjc-slip.dialin.cwru.edu

How do I find a clear section of the desktop which is NOT covered by
Windows?! I've want my clock application window to slowly creep to the
nearest uncovered region on the desktop.

---
The Evil Tofu
Newsgroups: comp.sys.mac.programmer
From: niko@iastate.edu (Nikolaus E Schuessler)
Subject: Re: * Disks, tracks, and rpm
Organization: Iowa State University, Ames, IA
Date: Fri, 1 Jan 1993 18:48:30 GMT

Oops. That table was for a 400k disk... then i guess I need info
for 800k as well ... 









-- 
Niko Schuessler               
Project Vincent Systems Manager              email: niko@iastate.edu
Iowa State University Computation Center     voice: (515) 294-1672
Ames IA 50011                                snail: 272 Durham
From: chuckb@milton.u.washington.edu (Chuck Bass)
Newsgroups: comp.sys.mac.programmer
Subject: New to macintosh programming...
Date: 28 Dec 92 18:37:05 GMT
Organization: University of Washington
NNTP-Posting-Host: milton.u.washington.edu

I am an experienced C programmer beginning work on a 
Mac (coming from workstation/PC programming).  I am wondering if
there is a specific book or other reference to help my
transition to the mac.  I would like learn specifics about
portability issues such as memory allocation and file IO.

If anyone has any info, anecdotes, references on making this
transition I would apprecitate it.

chuckb

(I'm using Think C)
Newsgroups: comp.sys.mac.programmer