HDTenEightyP/NetNews huggingface dataset:
From: siegel@world.std.com (Rich Siegel)
Subject: Re: Think Reference 2.0 Review
Organization: GCC Technologies
Date: Thu, 28 Jan 1993 23:46:40 GMT

In article <0E010598.or65ob@kithrup.Irvine.CA.US> nagel@Kithrup.Irvine.CA.US writes:

>I just installed this at work and it seems very useful.  However,
>I hope there is a fixer-upper release soon, as I am concerned that
>the first few times I really tried to use it, I found spelling
>errors in symbolic constants.  I can live with the occasional typo
>in descriptive text, but there should be absolutely no errors in the
>spelling of symbolic constants or function names.  The example I came
>across was under Gestalt in the gestaltFindFolderAttr selector.  Since
>this was the first real lookup I had done, I am forced to wonder how
>prevalent this problem is in the databases.  All in all, though, a
>very useful product.

In defense of THINK Reference, I feel compelled to point out that even
the sainted Inside Macintosh contains errors in the spelling of
symbolic constants, (to say nothing of some of the descriptions) and
there are places where the interface headers and Inside Macintosh do
not agree.

The difference, of course, is that you can write in your Inside Macintosh
books, and correct the interfaces. :-)

R.
-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Senior Software Engineer
GCC Technologies
Newsgroups: comp.sys.mac.programmer
From: gray@tinman.asel.udel.edu (John Gray)
Subject: Re: PD TIFF reader code?
Organization: AI duPont Institute
Distribution: usa
Date: Thu, 21 Jan 1993 18:42:59 GMT

In article <pwh35v#@rpi.edu> raffuj@aix.rpi.edu (Jose Raffucci) writes:
>  I'm looking for any mac-specific code that will help me write
>some code to read in tiff files.  If anyone has gotten libtiff 
>working for the mac, I sure would like to get my hands on it.
>

I replied through email to Jose telling him that I have libtiff ported.
He then told me that there was considerable interest and asked that I
post that I have it and make it available.  Since libtiff is the work 
of Sam Leffler I thought I should clear this thought before making it
available.  He said that making available to the mac world
was fine, but asked that I serve as a go-between as far as Mac-oriented
problems were concerned.  He also asked that for such purposes I make it
clear which version I am suppling.  The Version will be 3.2b.  The only
question now is from where to make it available.  Any suggestion on
what archive site to put it and details how to go about that?  Sumex
perhaps?

John Gray
gray@asel.udel.edu
Newsgroups: comp.sys.mac.programmer
From: freek@phil.ruu.nl (Freek Wiedijk)
Subject: Re: Why the Piracy? Here's why...
Organization: Department of Philosophy, University of Utrecht, The Netherlands
Date: Sun, 24 Jan 1993 17:26:54 GMT

trebor@foretune.co.jp (Robert J Woodhead) writes:
>Forgive my arrogance, but poor under-bridge-dwellers don't have
>computers.  Anyone who can afford to buy a computer can afford
>to buy software.

It's amazing, but most of my friends are Ph.D.s in Computer
Science, and most of these friends don't own computers.
Probably this is because they cannot afford them.

Freek
--
Third theory of Phenomenal Dynamics:  The difference between
a symbol and an object is quantitative, not qualitative.
Newsgroups: comp.sys.mac.programmer
From: cantrell@lamar.ColoState.EDU (Carol Cantrell)
Subject: Color animation in After Dark...HELP!
Date: Thu, 21 Jan 1993 05:56:23 GMT
Organization: Colorado State University, Fort Collins, CO  80523

I'm writing an After Dark module that uses color table animation.  It copies
repeatedly some object from offscreen graphics worlds, some of which contain
colors to be animated, and some of which don't.  I want to copy the GWorlds to 
the screen color index for color index--that is, color #1 in the GWorld is color
on the screen, etc.  The obvious way to do this is to OR the ctFlags field
with $4000; however, this copies index numbers from the GWorld to index numbers
in the current PALETTE.  After Dark doesn't draw into a WINDOW, and therefore
DOESN'T HAVE A PALETTE!!!   Is there any way to do this?  Help!
 
 Paul Cantrell 
 Cantrell@Lamar.ColoState.EDU
Newsgroups: comp.sys.mac.programmer
From: jvanabra@nyx.cs.du.edu (Josh Van Abrahams)
Subject: Lightspeed Pascal Bug!
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Date: Thu, 21 Jan 93 22:06:51 GMT

My school is currently using Lightspeed Pascal Version 2.0 on Mac LC II's
to teach pascal on.  The editor works fine, however that code that it
generates creates a bus error when ran.  What can I do about that?  What
version is the current release?
Any help would be appreciated.

Josh Van Abrahams
jvanabra@nyx.cs.du.edu

Organization: Information Technology Center, Carnegie Mellon, Pittsburgh, PA
Newsgroups: comp.sys.mac.programmer
Date: Thu, 28 Jan 1993 16:34:54 -0500 
From: Todd Jonker <tj00+@andrew.cmu.edu>
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Subject: Re: Subverting the Think C Editor
	<1993Jan27.164242.7541@hobbes.kzoo.edu>

Jamie R. McCarthy sez;
> lind@ils.nwu.edu (Jeff Lind) writes:
> >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.
> Cmd-rightarrow skips a word.
> And as for skipping _expressions_...I'm glad it doesn't even try.  It
> would have to all but compile the code to parse it well enough to figure
> out where expressions start and stop.

Pooh.  Have you ever used GNU Emacs with c-mode? Such things are not
terribly difficult to do, and make coding unspeakably easier.  Things
are even better under Epoch, which lets you show code, comments, and
strings in different colors, which greatly improves readablity.  I
joyfully use this setup at work (actually using C++ and c++-mode), and
as a result I whimper silently to myself whenever I sit down at my Mac
and attempt to crawl around in ThinkC.

I haven't used Alpha since it's early days, and was much impressed even
then.  I avoided using it since it was a pain to switch back and forth
all the time.  Does the latest version do anything like c-mode?  Color? 
Are you there Pete?

> -- 
>  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
>  "I don't think people need optimization any more. ...  If you look at the
>   history of programming-language design, almost every major screw-up is a
>   consequence of people pandering to some optimization...."   - S. Wolfram


. . . Todd V. Jonker . . . . . Carnegie Mellon University . . .
. . . tjonker@cs.cmu.edu . . . Information Technology Center . . .

    ---> Free your mind, and the rest will follow <---
From: stern@comb1.comb.umd.edu (Brian Stern; COMB)
Newsgroups: comp.sys.mac.programmer
Subject: Re: setwindowpic
Date: 22 Jan 1993 11:33 EST
Organization: University of Maryland, Center of Marine Biotechnology
Distribution: world
NNTP-Posting-Host: comb1.comb.umd.edu
News-Software: VAX/VMS VNEWS 1.41    

In article <1993Jan21.145925.7504@neptune.inf.ethz.ch>, rmaag@iiic.ethz.ch (Rolf Maag) writes...
>Hi there...
> 
>i have some questions about getwindowpic and setwindowpic.
> 
>
I use the following code in my initialization unit to put up a
splash screen:
var
  aPicHand: PicHandle;
  PicWind: WindowPtr;
  PicWinRect: Rect;
  TempBool: Boolean;

{Read in the picture and display it}
  aPicHand := PicHandle(GetResource('PICT', 128));{Read in the picture}
  PicWind := NewWindow(nil, PicWinRect, '', True, altDBoxProc, WindowPtr(-1),False,0);

 SetWindowPic(PicWind, aPicHand);{Insert the picture into the window}
  TempBool := CheckUpdate(Event);{Make the win mgr draw the window pic}

It normally isn't necessary to call CheckUpdate to draw a picture
in a window but this example draws it immediately. A picture
inserted into the windowPic field of a window record will be
drawn the next time a call is made to WaitNextEvent. What actually
happens is that if there are no other events in the event queue of
a higher priority than an update event, WNE calls CheckUpdate.
CheckUpdate then walks the window list from front to back looking
for visible windows with non-null update regions. If it finds one
that also has a picture associated with it, it draws the picture
in the window. It then continues until it finds a window with a
non-null update region and no picture. It then returns an update
event for that window, which is processed by your program in
the usual way. Note that you will never receive an update event
for a window with a non-null windowPic field. If you insert a
picture into a window with SetWindowPic and later change it and
want it to be redrawn you can do an InvalRect
(theWindow^.portrect). The picture will be redrawn the next time
thru your event loop if no other events are pending. Update events
have the lowest priority except for null events so mouse clicks,
key presses will be processed first.

Good Luck,

Brian Stern
Stern@mbimail.umd.edu

__________________________________________________________________
According to a software licensing notice:
All trademarks are held by their respective owners.
__________________________________________________________________
>
From: jpm@cs.hut.fi (Jussi-Pekka Mantere)
Newsgroups: comp.sys.mac.programmer
Subject: Re: 'aete' TMPL wanted
Date: 22 Jan 93 00:29:27 GMT
Organization: Helsinki University of Technology, Finland
Distribution: inet
NNTP-Posting-Host: cardhu.cs.hut.fi
In-reply-to: povlphp@uts.uni-c.dk's message of Wed, 20 Jan 1993 18:40:06 GMT

Povl H. Pedersen <povlphp@uts.uni-c.dk> writes:

   Subject says it all. Please mail me an aete TNPL if you have one.
   I am going to start doing some AE stuff.

You'd rather want to use an aete HyperCard stack, found on the
Developer CD's.

(Sorry, I don't have the CD handy, but will look the path up if
necessary.)

Cheers,

Jussi-Pekka Mantere
From: Gary P. Warren <warren@tab00.larc.nasa.gov>
Newsgroups: comp.sys.mac.programmer
Subject: Converting Iris raster images to PICT
Date: 26 Jan 1993 12:55:56 GMT
Organization: NASA Langley Research Center
Distribution: world
NNTP-Posting-Host: maccfd1.larc.nasa.gov
X-UserAgent: Nuntius v1.1.1d12
X-XXMessage-ID: <A78A9EFB060218C9@maccfd1.larc.nasa.gov>
X-XXDate: Tue, 26 Jan 93 12:55:39 GMT

I need a program that will convert Iris raster images to pict
files.  Currently SGI has a program called "topict" but it assumes
classic quickdraw and converts everything to 8 colors.  Is there 
a program available anywhere that will convert these images 
using more than 8 colors????  I need this to make some quicktime
movies....
From: eapg070@orion.oac.uci.edu (Caroll Elke Pohl)
Subject: Calling assembly from C
Summary: using #pragma parameter doesn't work
Newsgroups: comp.sys.mac.programmer
Organization: University of California, Irvine
Keywords: C,assembly
Date: 25 Jan 93 07:32:33 GMT
Distribution: usa

thanx to the many who responded to my earlier post.
i took your suggestions but still i am stymied.

for those who don't remember, the challenge is to call an assembly language
routine from C passing the parameters in registers (using MPW 3.3).
towhit, i wrote the following source files:

/* test.c */
#pragma parameter __D0 PLUS(__D0,__D1)
long PLUS (long,long);

main ()
{
	long i,j,k;
	i = 1;
	j = 2;
	k = PLUS (i,j);
}

and of course:

;test.a
PLUS	proc	EXPORT
		add.l	d1,d0
		rts

		END

when linked together you would hope the C code would place i in D0,
j in D1, a JSR to PLUS and finally D0 placed in k.

in fact however, i and j are pushed onto the stack and the whole program
fails miserably.

as several good people pointed out, the syntax for these #pragma parameter
statements can be found in "Memory.h".  however, in these declarations,
the routines in question are really traps so they're declared more like

#pragma parameter __D0 FoobarTrap(__A0)
long FoobarTrap (void*)=0xAAAA;

which, as you may surmise, inserts the trap 0xAAAA instead of a standard
JSR. just for the fun of it, i declared my routine in this fashion to see
how it would compile and, sure enough, i and j got placed in D0 and D1.
of course the code was otherwise useless but it proved a point (what, i'm
not sure).

so, can anyone explain this and/or offer a solution?
i'm at my wits end.

help!
please e-mail

-caroll

p.s., to the guy who suggested an inline jsr, i only wish MPW did
 inline assembly!

                      ) """ (
                       (Q Q)
   Don't spook        (  |  )
    the horse!         \ A /
                       (___)
From: brad@tazboy.jpl.nasa.gov (Brad Pickering)
Newsgroups: comp.sys.mac.programmer
Subject: Free Development Tools
Date: 26 Jan 93 09:24:00
Organization: Jet Propulsion Laboratory, Pasadena, CA
Distribution: world
NNTP-Posting-Host: tazboy.jpl.nasa.gov


For those people who don't mind a little (alot?) headache, there are free
development tools that are useable on the Mac now.  The Sozobon C tools
for the ATARI ST, which include a K&R C compiler, an assembler, a linker,
and the make program, can be run under MacMiNT, a not quite complete port
of MiNT from the ATARI.  MacMiNT is still very buggy, and it can't run
some of the GNU programs yet, but it is working well enough to run the
Sozobon tools.

There are many obstacles involved in using MacMiNT, many of which you may
not realize until you've worked with it for a while.  Some of the obstacles
I can warn you about are:  the object and executable file formats are
different from the mac, you can't build regular mac programs (yet), and
you have to use a editor that can read and write DOS formated text files.

The different format object files mean that you can't use libraries that
where built with mpw or think compilers and visa versa.  The different
format executable files mean that issues like segment loading and global
variable reference are handled differently.  This can be very confusing
at first (actually I think that the Mac's way of handling segments and
globals is more confusing).

The reason you can't build regular Mac programs is because there is no way
provided for your programs to call the MacOS or Toolbox.  You could write
short assembly language stubs to call the toolbox/os but this is way too
tedious.  I am working on a perl script to create k&r headers and assembly
code from the MPW headers.  When I get this working I will distribute this
and other tools needed to build regular mac programs.

You also need to worry about different end of line conventions.  The ATARI
uses \r\n and the mac uses \r.  I use BBEdit because it can read and write
both formats.

At this point I can only recommend MacMiNT and the Sozobon tools to people
who have a lot of time, a lot of curriosity, or no money.  If you want
to do serios development you should still get MPW or THINK tools.  If you
are a hobbiest or a student, though, you might want to take a look at
MacMiNT.

MacMiNT is available at mac.archive.umich.edu.  The binary version is in
util/developer/macmint.sit.hqx.  The Think C 5.0 source is in
development/source/macmint.sit.hqx.  The Sozobon tools are available at
atari.archive.umich.edu.  The binary version is in Languages/sozobon1.zoo.
The source version is in Languages/sozobon2.zoo.

Brad Pickering
brad@tazboy.jpl.nasa.gov
Xref: sparky comp.sys.mac.programmer:22165 comp.sys.mac.system:16629
From: jdunning@phoenix.Princeton.EDU (John Alan Dunning)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
Subject: Re: Apple events/AppleScript/Toy Surprise - Applications Wanted
Date: 25 Jan 93 18:12:40 GMT
Organization: Princeton University
Originator: news@nimaster

In article <1993Jan21.224909.8236@news.media.mit.edu> dyoung@media.mit.edu (David Young) writes:
>
>Just yesterday I got the beta of AppleScript which comes with Toy Surprise
>- and was pretty psyched!  It looks really cool - especially the
>recordability of applications that are Apple event aware.  
>
>I played with Quill (the Apple event aware sample application that came
>with it) and now am searching for other applications that I can use with
>Toy Surprise.  I have Canvas - but haven't tried using it yet (I have
>version 3.01 and think I may need version 3.04) and I know that ReadySetGo
>is planning on releasing a version with pretty complete Apple Script
>support.  but in the mean time -can anyone tell me other graphic or
>page-layout applications that have devent Apple event support?

I think PageMaker 4.2 has a fairly complete set of AppleEvents, though
it's not recordable.  I haven't tried it myself, but I've seen some
Frontier scripts that call its events.

If you've got Frontier or QuicKeys2 you should be able to look up which
events a particular app supports, assuming the app uses the "aevt" (I think)
resource correctly, which not all of them do.  You may also be able to 
look up events with AppleScript.

John
Newsgroups: comp.sys.mac.programmer
From: Reid ELlis <rae@Alias.com>
Subject: Re: Unix-like environment
Organization: Alias Research, Inc., Toronto ON Canada
Date: Fri, 22 Jan 1993 16:08:39 GMT

Konrad Hinsen <HAC041@DJUKFA11.BITNET> writes:
|Are Emacs and the standard Unix-tools available for the Mac? If yes,
|where can they be obtained?

Jon Wtte <d88-jwa@hemul.nada.kth.se> writes:
|Emacs, no. Standalone tools, yes; most run under the MPW Shell which
|can be seen as a very strange kind of windowed UNIX shell...  Also,
|there's a good editor called "alpha" that looks a bit like emacs, on
|the "raw" MacOS side.

There is a Mac version of JOVE [Jonathan's Own Version of Emacs] if
you're into that..

Reid
--
Reid Ellis                                            
rae@utcs.utoronto.ca        ||           rae@Alias.com
CDA0610@applelink.apple.com ||  +1 416 362 9181 [work]
Newsgroups: comp.sys.mac.programmer
From: howlett@world.std.com (Joseph S Howlett)
Subject: Re: Arcade-style animation...
Organization: The World Public Access UNIX, Brookline, MA
Date: Thu, 28 Jan 1993 01:44:43 GMT

>Do people think it's worth bothering with synchronizing with the VBL
>when drawing sprites?  I'm writing a physics simulator with some

What I've done (and it seems to work beautifully so far) is to assume
that there will be a maximum dx and dy by which any sprite will
move in one frame.  I have custom assembly blitting and masking
routines which depend on the fact that I know in advance I am
copying 32x32 or 16x16 rectangles from my sprite buffers to the screen.

My animation goes like this:

Copy bg to offscreen
Copy bg to screen

For each frame of animation:
   Mask all sprites at current position to offscreen
   Blit rectangles for each sprite from offscreen to screen.
     The important thing here is that the rectangles are the
     bounding rects of the sprites PLUS the maximum dx or dy
     in each direction.  Thus, in one blit I simultaneously
     erase the old sprite and blit the new one.
   Blit bounding rectangles of each sprite from bg to offscreen,
     thus erasing all the sprites.
   Do collision detection, etc., and update sprite positions.

The routines which form the core of my graphics stuff are:

Blit 4x4,16x16,and 32x32 rects from source to dest pixmap
  (these are for erasing sprites by copying bg to offscreen)

Blit 12x12,24x24,and 40x40 rects from src to dest pixmap
  (these are for copying offscreen to screen)

Mask 4x4,16x16,and 32x32 icons to dest pixmap
  (these are for drawing sprites to the screen)

Collision detection between each combination of 4x4,16x16,and 32x32
sprites.

The blitting is basically done with unrolled loops of movem.l
instructions.

The masking is done with masks which have been converted to 8 bits
wide.

I tried VBL synching, but found that it really didn't make any
visual difference since I'm erasing & drawing the new sprites in
one blit, so I abandoned it. The VBL synching might also make your
program possibly run at different speeds on machines with monitors
which have different refresh rates, which is not good.

Hope this helps,
Scott Howlett

(insert witty .sig here)
From: d1pihlan@dtek.chalmers.se (Fredrik Pihlstr|m)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Reading numbers in TextEdit
Date: 26 Jan 93 17:42:32 GMT
Organization: Chalmers University of Technology, Sweden

sethi@pokey.cis.udel.edu (Adarshpal S Sethi) said:
>Nntp-Posting-Host: pokey.cis.udel.edu


>I have a Modeless Dialog with a TextEdit field that I want
>to use to read in a number. I would like to disable any
>character that is not a numeric character from being entered.
>Is there a way of doing this? I couldn't see anything in
>IM that was helpful. In the worst case, can I get access
>to each character that is entered in a TextEdit field, then
>check if it is a numeric character, if not delete the
>character from the text being entered and continue?
>If there is a sample program available somewhere that can
>do this, that would be great (I'm using Think C 5.0), but
>I would appreciate any help at all, whether it is a general
>outline of how to do this, or pointers to specific places in
>IM.

>Thanks,

>Adarsh Sethi
>sethi@udel.edu

The way I implement this in my dialogs is by check for keyDown and
autoKey events in my dialogfilter. If the character is not within the
valid range then the filter returns True, thus telling the Dialog
Manager that this event has been taken care of. If the character is a
number then just return False and the manager takes care of putting
the number in the TE.

Don't know if this is the proper way to do it, but it works...

Ho ho ho,
Pihlan
--
----------------------------------------------------------------------
Fredrik Pihlstr|m                            d1pihlan@dtek.chalmers.se
Tel:+46 (0)31 265 479  Snail: L. Skogsv. 25, S-433 70 Partille, Sweden
   Computer Science & Engineering, Chalmers Un of Tech, Gothenburg
From: jclark@zeus.calpoly.edu (Joseph Clarke)
Newsgroups: comp.sys.mac.programmer
Subject: MIDI/SCC programming question
Summary: How does the world of MIDI meet the world of Macintosh?
Keywords: MIDI, SCC
Date: 26 Jan 93 19:04:46 GMT
Organization: California Polytechnic State University, San Luis Obispo


Hello Mac Midi Programmers,
                           I would like to program the serial port so that
it may "talk" with my MIDI interface.  Normally, when configuring a MIDI
application, the program gives the user a choice of 3 speeds ( 500 KHz,
1 MHz and 1.5 MHz (I believe) ).  Therefore, it is possible to initialize
the SCC with speeds other than the standard baud2400, baud9600, etc.

Is this all there is to it?  Or is it a little more complicated than that?
What does it involve?  If there are those that have accomplished this
feat or those that are familiar with the SCC please reply.  Also if there's
any code, psuedo-code, ideas or just plain rumors, I'd like to know.


Thanks for your time and this wonderful medium of exchange,

Joseph Clarke ( jclark@trumpet.calpoly.edu )
-- 
Sound Monger, Midi Magician, (90 48 7F 90 4C 7F 90 4F 7F)!!!
--------------------jclark@eros or jclark@polyslo---------------------