HDTenEightyP/NetNews huggingface dataset:
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Subject: Re: Subverting the Think C Editor
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Thu, 28 Jan 1993 12:06:27 GMT

In <lind-270193094558@lind.ils.nwu.edu> lind@ils.nwu.edu (Jeff Lind) writes:

>Well, perhaps I'm spoiled by having worked in MCL for a while now, but in
>playing with THINK C lately I've been consistently dissapointed off by the
>weak editor.  It doesn't know anything about coding, really. I mean, it
>won't match parentheses, it hardly does any indentation, it has very few
>searching commands, it has no concept of a word or an expression, so you
>can't do nice things like control-rightarrow to skip an entire word or
>expression. It's basically teach-text.

Huh!? Both cmd-rightarrow and option-rightarrow do stuff like move word
and move line. Not to mention you can type cmd-b-rightarrow to match
parentheses and move to the end of the expression.

Add a few QuickKeys macros, and HEY! There you are.

>So the question is: is there any way to *not* use this editor and
>substitute some other one in some smooth way?  I'd rather not run MPW or
>MCL all the time, just for the editor.

Try Alpha; however, you have to compile by switching to
Think C and hit "Make." This will be changed in TC6, I believe.

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: potts@oit.itd.umich.edu (Paul Potts)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Is MacTutor still alive?
Date: 28 Jan 1993 18:27:34 GMT
Organization: Instructional Technology Laboratory, University of Michigan
NNTP-Posting-Host: helen.oit.itd.umich.edu

In article <47490001@hpkslx.mayfield.HP.COM> ted@hpkslx.mayfield.HP.COM (Ted Johnson) writes:
>
>  I think that if I hadn't 
>noticed it, they never would have sent me a check.  As it was, it took 
>over three weeks of me calling them every few days before they finally 
>mailed me a check ($400.).  They kept coming up with lame excuses, which 
>included: "We don't mail out checks until a month after we publish someone's 
>article", "The person who signs the checks is on vacation", "Oops, we forgot 
>to mail it out", etc.

If it's any consolation, I think their policy really _is_ not to send out
checks until after the article is published. At least, when I got an article
published in it in 88 or 89, that's how it worked. It also took them many
months between submission and publication of the article.

Mine is pretty much out of date too by now... 

-- 
Politics is crime pursued by other means.              
potts@oit.itd.umich.edu      CI$ 71561,3362 (rarely)
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Subject: Re: Arcade-style animation...
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Wed, 27 Jan 1993 16:32:53 GMT

In <34994@goofy.apple.COM> chris_russo@gateway.qm.apple.com (Christopher Russo) writes:

>Speaking of which, anyone have some low-level info, like where the screen 
>pointer is kept, and the procedure for changing it?  Come on, give with the 
>info.

There is no such beast for all macs. There is for b/w Macs, there
might be for Macs with Apple video cards, there definately isn't
for Macs with SCSI screens or accellerator cards.

Cheers,

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

   What we need is a good GNU [...] licence manager implementation.
                     -- Raphael Manfredi
From: REE700A@MAINE.MAINE.EDU
Newsgroups: comp.sys.mac.programmer
Subject: More on TCL Nightmare.....................................
Date: 23 Jan 93 17:15:59 GMT
 <1993Jan22.010015.17871@netcom.com>
Organization: University of Maine System


  Well, I posted that last & returned home from the network.  Wonder of
wonders, it drew.  (I was in CStarterPane::Draw... that was an error of
separation... 5 miles between my mac and Bowdoin's network.  Today its
120 miles between said mac and U. Maine... Ow well.)

  So... I altered things a little.  When CStarterDoc::BuildWindow ()
is called, I called SetBounds ( -300000, -300000, 300000, 300000 ); and,
of course, UseLongCoordinates ( TRUE );...
  I placed a loop in CSP::Draw () to get the bounds, generate LongRects
which ran the width of the bounds (less 40 pixels) and were 50 pixels
high.  One LongRect every 100 pixels, vertically.
  Now, this amounts to 60,000 LongRects (hence 240,000 LongInt assigns,
and 120,000 LongInt adds, so the math of generation is non-negigible.
These were not stored ( obviously ) but were created and drawn on the fly.
  I did something which amounts to converting the area Rect to a Frame
LongRect, SectLongRect the refresh area with the desired rectangle and
finally convert the intersection back to QuickDraw coord's.  I then
FillRect'ed them.
  A simple scroll - refresh took 10 seconds on my SE/30 !  Obviously,
this ain't no Quadra and it is a lot of drawing, but seriously...

  Any useful suggestions on how to speed this process up?

  BTW - HOW DO I GET THE DEBUGGER INTO THE EVENT HANDLING PORTION OF
        MY APPLICATION WITHOUT MANUALLY SETING THE EVENT MESSAGE?

        THIS SEEMS REAL USELESS!

   Finally, sometimes the scroll causes the whole screen to be filled in.
  If anyone want's to help ridicule my code, I'll post the actual Draw()
  routine or e-mail it to them Monday (when I'm in the same county as the
  code).

  Many thanks.
  Jeff Andle

  P.S.  I'm glad I didn't define my Pattern in Floating point, as
originally planned!  (Then again, ... ;-)   )
Newsgroups: comp.sys.mac.programmer
Subject: Pop-up menus
From: dpb@huelings.harvard.edu (David Baker)
Date: 28 Jan 93 16:41:32
Distribution: comp
Organization: Department of Psychology, Harvard University

OK, I'm going batty.

I have some pop-up menus set up in my System 7 app as controls--you know,
value=0, visible=true, min=menu id, max=space for title, procID=1008, the
works.  I have it in a DITL in a DLOG, and everything else comes up fine--but
there's no pop-up!  I tried InsertMenuing the menu (with a position of -1),
which is what you're supposed to do for the old menus, but it still didn't
work.  Does anyone know what I'm doing wrong?  Thanks.

--
--------------------------------------+----------------------------------------
David P. Baker			      | 
Work: dpb@huelings.harvard.edu	      | The only reason we think we're free is 
Home: baker4@husc.harvard.edu	      | that we cannot imagine the alternative.
Office: William James Hall 844	      |	
	Department of Psychology      | 
	Harvard University	      |	N.B.: If responding by mail, please
	(617) 495-3773		      |	      use my "Work" address above.
--------------------------------------+----------------------------------------

Newsgroups: comp.sys.mac.programmer
From: danny@martha.utcc.utk.edu (Danny William McCampbell)
Subject: Programming Primer C question....
Organization: University of Tennessee Computing Center
X-Newsreader: Tin 1.1 PL3
Distribution: world 
Date: Fri, 22 Jan 1993 19:25:15 GMT

Hi all, its me the dummy again.

I have finished typing the EventTrigger Program in the Mac C Programming
Primer.  Well it doesn't work so I started debugging and found the
following:

When I call AESend it returns a -903 error.  There is not mention of
what
this error means in IM Vol. 6.  Does anyone have any insight what is
going on, and yes I have the EventTracker application open.  I have
followed the instruction to the tee and I have double and triple
checked myself.  Thanks in advance.


--
Danny McCampbell
UT Computing Center
danny@utkux1.utk.edu
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.apps
From: eblackle@cbnewse.cb.att.com (eric.l.blackledge)
Subject: Xlisp on the Mac
Organization: AT&T
Distribution: usa
Date: Thu, 21 Jan 1993 19:11:35 GMT
Followup-To: comp.sys.mac.programmer
Keywords: where? macstuff.h Xlisp Mac executables

I have downloaded all of the source for Xlisp 2.1 to my Mac.  Missing,
however, is the macstuff.h file and other files that are needed to compile
on my Mac.

Does anyone know where this (these) files might be located?  I have looked
on sumex and umich in their language directories and they don't have any 
xlisp stuff.  

If someone could point me in the right direction to these files or better
yet point me to where xlisp executables for the Mac reside, it would
really be appreciated.

Thanks,

Eric Blackledge
AT&T Bell Labs
eblackle@ihlpb.att.com


Newsgroups: comp.sys.mac.programmer
From: hshubs@cis.umassd.edu (Howard S Shubs)
Subject: Re: Morph Alogrithm ??
Organization: University of Massachusetts Dartmouth
Date: Fri, 22 Jan 1993 17:13:19 GMT

In <1380@taniwha.UUCP> paul@taniwha.UUCP (Paul Campbell) writes:
>In article <eaeu209-150193173343@714-725-3176.nts.uci.edu> eaeu209@orion.oac.uci.edu (Rodney G. Ramos) writes:
>>A friend of mine told me that the algorithm is published in some
>>programmer association (the name eludes me right now) that's the
>>equivalent of IEEE for engineers.

Probably something like the ACM (Association for Computing Machinery).
Lessee... SIGGRAPH (Special Interest Group on computer GRAPHics)?
-- 
Howard S Shubs                            For to win 100 victories in 100
The Denim Adept   hshubs@cis.umassd.edu   battles is not the acme of skill.
Newsgroups: comp.sys.mac.programmer
From: mark@pokey.jsc.nasa.gov (Mark Manning)
Subject: Re: Mac cross-compiler (or cross-assembler)
Organization: NASA
Distribution: usa
Date: Thu, 28 Jan 1993 22:40:44 GMT

One of the cross compiliers which seems to pop up every once in a while
is the Astec C compilers.  From what I remember, Astec C offers cross
compiliers for the Apple series, the Mac series, the IBM series, the
Amiga series, and the Atari series.  They may also have main frame stuff
but I do not remember hearing anything about it.

Sorry - don't have the phone number or address or anything with me.
But I do have Astec C at home (Apple version).
From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
Newsgroups: comp.sys.mac.programmer
Subject: Re: &StringPtr -vs- StringPtr?
Date: 25 Jan 93 21:16:52 GMT
Article-I.D.: kronos.1993Jan25.211652.28191
Organization: NASA/ARC Information Sciences Division

In article <1993Jan22.220940.21096@hobbes.kzoo.edu> k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
>joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91) writes:
>>damurphy@wc.novell.com (Duane Murphy) writes:
>>>
>>>I have received some code...  The MPW compiler says nothing, but
>>>Think C whines about types not matching.  Here is where the problem is:
>>>
>>>	Str255	msg1, msg2;
>>>	GetIndString(&msg1, errResID, errStringIndex);
>>>
>>>The problem is &msg1.  The prototype for GetIndString is:
>>>(from ToolUtils.h)
>>>

((( josh had suggested casting it with ConstStr255Param. ))), and said:
>>msg1 is the address of the first element, and &msg1 has no real
>>meaning (thoug usually is interpreted as just &msg1[0], or msg1).
>
>Well, "&msg1" does have a well-defined meaning.  The expression "msg1"
>does have the type "pointer to unsigned char," and is equivalent to
>the more-logical-looking "&msg1[0]".  But "&msg1", while it points to
>the same place, has the type "pointer to array of 256 unsigned chars."
>That's not the same thing.

I stand corrected.
>

>To quote gospel at you:  "If the type of an expression or subexpression
>is 'array of T,' for some type T, then the value of the expression is a
>pointer to the first object in the array, and the type of the expression
>is altered to 'pointer to T.'  This conversion does not take place if
>the expression is the operand of the unary & operator, or of ++, --,
>sizeof, or as the left operand of an assignment operator or the .
>operator."  (K&R, 2nd ed., A7.1, p. 200.)  So, "msg1" by itself is a
>pointer to unsigned char;  "&msg1" is a pointer to an array of 256
>unsigned chars;  "sizeof(msg1)" returns the size of the array instead of
>the size of a pointer;  "++msg1" increments the pointer 256 bytes
>instead of one, and so on.  Ain't C grand?
>
>>I would say that if you passed msg1 (not &msg1), it SHOULD accept it.
>>I believe I usually must cast in that situation as well, though.
>I don't think so.  At least, I don't have to, and I keep ThC on its
>strictest type-checking.


Hmmm.  Did you recompile MacHeaders with the strcit prototype #define
chosen?  I think the (ConstStr255Param) need only cropped up after
I made that change.`

Interesting, that bit about sizeof(msg).  What happens at  sizeof(&msg) ( ;-) )?

>-- 
> Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy


-- 
----------------------------------
#include <std/disclaimer.h>     Josh Rabinowitz, Mac TCL programmer
joshr@kronos.arc.nasa.gov
"Me lost my cookie at the disco." -- Cookie Monster
Newsgroups: comp.sys.mac.programmer
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Subject: Re: Arcade-style animation...
Organization: High Risk Ventures
Date: Sat, 23 Jan 1993 22:26:07 GMT

In article <1993Jan23.014127.5750@cs.ucla.edu> tj@kona.cs.ucla.edu (Tom Johnson) writes:
>It looks like drawing directly to the window's pix map will be required.

Yep.  And you'll have to write it in assembly.

>But!  If I'm drawing directly to the screen, how do I handle the
>"EraseSprite()" function?  Since I want to support a complex color
>background (ie a 256 color pict, not just a black bacground with a few
>stars like most other games I've seen), I need to restore the old location
>of the sprite.                                                

You'll have to keep a copy of your background in another offscreen pixmap,
and copy the appropriate pixels from there to erase each sprite.

Later,

Mike.
-- 
_____________________________________________________________________________
Michael A. Kelly                                               Senior Partner
mkelly@cs.uoregon.edu                                      High Risk Ventures
_____________________________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: Duane Murphy <damurphy@wc.novell.com>
Subject: &StringPtr -vs- StringPtr?
X-Xxdate: Fri, 22 Jan 93 17:01:17 GMT
Organization: Novell, Inc.
X-Useragent: Nuntius v1.1.1d12
Date: Fri, 22 Jan 1993 16:53:48 GMT


I have received some code (from a source to remain anonyumous) that is 
supposed to work with MPW and Think C.  The MPW compiler says nothing, 
but Think C whines about types not matching.  Here is where the problem 
is:

	Str255	msg1, msg2;

... // code deleted

	GetIndString(&msg1, errResID, errStringIndex);

The problem is &msg1.  The prototype for GetIndString is:
(from ToolUtils.h)

pascal void GetIndString(Str255 theString,short strListID,short index); 

I have changed the call to:

	GetIndString(msg1, errResID, errStringIndex);

which seems (to me) to match to prototype better.

Who is right (according to ANSI)?  Is MPW being a slacker?  Is Think C 
being picky?


Thanks,
...Duane

  +------------------------+--------------------------------------------+
  | Duane Murphy           | My opinions are mine, mine, and only mine; |
  | damurphy@wc.novell.com |      Except when they are also yours.      |
  | Macintosh Software QA  |                                            |
  +------------------------+--------------------------------------------+
Newsgroups: comp.sys.mac.programmer,comp.multimedia
From: olevi@daimi.aau.dk (Ole Villumsen)
Subject: Q: QuickTime: Timed call back(-s not?)
Keywords: callback movie time NewCallBack CallMeWhen
Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
Date: Wed, 27 Jan 93 14:19:21 GMT

Hi programmers using QuickTime,

Can you help me with this question: How do you invoke a timed call back more
than once?

I had no problem having the call back be invoked using the GetMovieTimeBase,
NewCallBack and CallMeWhen functions in the movie toolbox. But if I'm playing
the movie several times, I'd like to see the call back each time a certain
point in time is reached. This doesn't just happen, since "The Movie Toolbox
calls this function (CancelCallBack! /Ole) automatically when it invokes your
callback function." (QuickTime 1.5 Developer Kit page 2-331.)

I thought I was smart: I called CallMeWhen again from inside my callback
function. This caused an infinite loop! It seems that after the call back has
returned, the movie toolbox looks to see if there's more to be done at this
point, and then immediately calls my callback function again. And so on
forever.

Anyone else experienced this behaviour? Any suggestions? I'd appreciate your
input. Hasn't Apple thought about repeated invocation of a timed call back?

With a callMeAtRate type call back it does work to call CallMeWhen again from
within the callback function. But as I said, not with a callMeAtTime type call
back.

The funny thing is, when using the HyperCard-QuickTime XCMDs it seems that a
timed call back is automatically invoked repeatedly if the movie is played
again.

I am using the programming language Beta on a Quadra 900 with QuickTime 1.5.

Please email any responses or comments, and I'll summarize. Thanks in advance.

Ole

----------------------------------------------------------------------
Ole Villumsen, Computer Science Department, Aarhus University, Denmark
ovillumsen@daimi.aau.dk                                 Trade, not aid
From: keith@taligent.com (Keith Rollin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MPW Lib/Make question
Date: 22 Jan 93 07:50:55 GMT
Followup-To: comp.sys.mac.programmer
Organization: Taligent

In article <1993Jan22.114118.13376@waikato.ac.nz>, ldo@waikato.ac.nz
(Lawrence D'Oliveiro, Waikato University) wrote:
> 
> In article <1993Jan20.060444.8192@gn.ecn.purdue.edu>, jess@gn.ecn.purdue.edu (Jess M Holle) writes:
> >>
> >>I now am having some problems understanding the use of lib and
> >>make under MPW.  What I want to do is to be able to automatically
> >>rebuild any of the huge libraries which we use, while only having
> >>to re-compile the files which need it.  I also don't want to keep
> >>old object files hanging around.
> >>
> >>In other words, I have one library that is almost 1 MB in size.
> >>When I change 1 source file, I'd like to be able to "make" the
> >>library again and have only the one file recompiled and the
> >>updated information overwrite the old information in the library.
> 
> As far as I'm aware, the Lib tool hasn't got any function for *updating*
> a library, you have to rebuild it from scratch. This is probably because
> there is no actual object library format under MPW; library files are just
> concatenations of object modules from separate .o files.


You can sort of update a library using the Lib tool (although it's close to
rebuilding from scratch, like you say). Use something like:

Lib -d -o NewLib Updated1.o Updated2.o OldLib
Rename -y NewLib OldLib

Just remember to specify the .o files with the updated routines before the
library holding the old routines, and that Lib doesn't like to write its
output to any of the input files.


> 
> Here's the sort of rule I have in my makefiles for rebuilding an object
> library (I'm using "\" to indicate "hold down the option key and press the
> following key"):
> 
> 	MyLib.o \f \d
> 		Component1.p.o \d
> 		Component2.a.o \d
> 		Component3.mod.o
> 	    Lib -o MyLib.o \d
> 		Component1.p.o \d
> 		Component2.a.o \d
> 		Component3.mod.o
> 
> As you can see, it's quite simple (apart from the nuisance of having to write
> out the list of object files twice!). If you edit any of the source files,
> Make will recompile just those, and rebuild the entire library.


You don't have to specify the list of object files twice. Use either of the
following instead:

----------

MyLib.o \f \d
 		Component1.p.o \d
 		Component2.a.o \d
 		Component3.mod.o
 	    Lib -o {Targ} {Deps}

--- or ---

MyObjects = \d
 		Component1.p.o \d
 		Component2.a.o \d
 		Component3.mod.o

MyLib \f {MyObjects}
   Lib -o {Targ} {MyObjects}

----------


> You know you've been programming the Mac a long time when...
> ...you know all the arguments to CopyBits by heart.


How about Munger? Or NewWindow? Or DragGrayRgn? Or AESend? Or when you can
fill in the necessary fields of a parameter block for a low-level File
Manager call (like PBCatSearch)? Heck, CopyBits is easy...

-----
Keith Rollin
Phantom Programmer
Taligent, Inc.
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: &StringPtr -vs- StringPtr?
Organization: Kalamazoo College
Date: Tue, 26 Jan 1993 06:39:28 GMT

joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91) writes:
>k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
>>josh writes:
>>>I would say that if you passed msg1 (not &msg1), it SHOULD accept it.
>>>I believe I usually must cast in that situation as well, though.
>> 
>>I don't think so.  At least, I don't have to, and I keep ThC on its
>>strictest type-checking.
>
>Hmmm.  Did you recompile MacHeaders with the strcit prototype #define
>chosen?  I think the (ConstStr255Param) need only cropped up after
>I made that change.

Yep, SIMPLIFY_PROTOTYPES is 0.

K&R sez:  "Except that it should diagnose explicit attempts to change
'const' objects, a compiler may ignore [the const keyword]."  (p. 211)
I don't see any special notes about const in ch. 22 of the ThC user's
manual.

Passing an (unsigned char*) to a function that expects a (const unsigned
char*) should be perfectly legal.  The "const" only hints that the
function won't change the value of the pointer, not that the pointer has
to be special in any way.  Perhaps you had the "pascal strings are of
type (unsigned char*)" box unchecked, so that your strings were (char*)?
That'd trip an error, and casting would fix it, but you could have
casted to (StringPtr) as well as (ConstStr255Param).

Boy, you learn all kinds of interesting things going through the header
files.  Get this, the Types.h macro "Length(s)" returns the length byte
of the string s.  I never knew that was there...

>Interesting, that bit about sizeof(msg).
>What happens at  sizeof(&msg) ( ;-) )?

I'd expect you'd get the size of the pointer:  4.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "The woman hung out a sign that said 'baby welcome' when she had sex."
   - krueger@galileo.physics.arizona.edu (Ted Krueger)
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: undefined: screenBits. WHY???
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Tue, 26 Jan 1993 16:49:17 GMT

In <1993Jan26.021801.369@physc1.byu.edu> seth@physc1.byu.edu writes:

>*aRect = screenBits.bounds;

>WHen I compile there is no prblem, BUT when I link I get a link error that
>says "undefined: screenBits"

Include MacTraps.

It's also called qd . scheenBits now, for MPW compaitibility.
(screenBits is also supported, for a while)

Cheers,

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

   This article printed on 100% recycled electrons.
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: Calling external code resources - how?
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Mon, 25 Jan 1993 00:52:16 GMT

In <01050014.odph61@blanc.north.de> jochen@blanc.north.de (Jochen Meyer) writes:

>Where can I find information on how to do this? The Segment Manager
>chapter of IM gives no clues on this. Anyone has got some sample code
>on this?

Your extensions can't get at your globals, however,
you're not lost.

Define an interface for the extensions, consisting of ONE
function that takes a lot of interesting parameters,
like a handle to some data and a command, and a handle to
put retusn data in, and returns an err code.

The just load in the resource, lock it, and call the dereferenced
resource as a function pointers with the right arguments.

Something like:

typedef short ( * myFuncType ) ( short code , Handle dataIn , Handle dataOut ) ;

Code resources have a main with the same arguments, and
you call 'em like:

	Handle h = GetResource ( 'Xtns' , 128 ) ; /* Whatever */
	HLockHi ( h ) ;
	result = ( * h ) ( theCode , theInData , theOutData ) ;
	ReleaseResource ( h ) ;

Cheers,

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

   There's no sex act that can't be made better with Yell-O.