HDTenEightyP/NetNews huggingface dataset:
From: swofford@uxh.cso.uiuc.edu (David Swofford )
Subject: Re: Think C versions: what's the latest?
Organization: University of Illinois at Urbana
Date: Thu, 31 Dec 1992 15:58:03 GMT

sal@pike.cis.upenn.edu (Marcos Salganicoff) writes:

>The bookstore here at Penn has v5.0 of Think C. I've seen people on the net
>refer to v 5.0.4. Are there any major bug patches between 5.0 and 5.0.4,
>or should I just go for v5.0. The price is $66, which seems pretty good. Also
>will Symantec send me the patches for free? Can they be gotten from the
>net etc.? mumble mumble...

It's likely that the version in your bookstore is 5.0.4; the box just gives
the major version number.  If it's less than 5.0.4, you can grab an updater
from sumex (sumex-aim.stanford.edu) in the info-mac/lang directory that will
convert whatever it is to 5.0.4.  The bug fixes were largely due to code
optimization problems as I remember.
-- 
David L. Swofford                 Phone:    (217)244-6959
Illinois Natural History Survey   FAX:      (217)333-4949
607 E. Peabody Drive              BITNET:   DAVESWOF@UIUCVMD
Champaign, Illinois 61820 USA     Internet: swofford@uxh.cso.uiuc.edu
From: bobert@informix.com (Robert Murphy)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Uniquely identifying a Mac? How?
Date: 29 Dec 92 22:23:02 GMT
Organization: Informix Software, Inc.

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?  

A Mac's AppleTalk address can potentially change every time the machine is
booted.

>Or if it's a TCP/IP network, there's the IP address.

If you're serious about uniquely identifying the Mac (e.g. tying program
execution to a particular Mac), this is a very ineffective way of doing
it.  All you have to do is change the IP address of the Mac.  If it would
conflict with another Mac on the network, pull your Mac off the network.

A client of mine has a product with execution control tied to an IP
address.  (This is on a Sun, by the way.)  You get the program, call in
with the invoice number and IP number, and get an authorization code.
At one of their customers, somebody called in with IP number
129.blah.blah.blah and got an auth code.  Then somebody else called in
with the same invoice number and a different IP number.  Big fireworks!  
"Why, 129.blah.blah.blah isn't even on our network!"  Turned out it was
one of IP numbers you get on out-of-the-box Suns.  As best as they can
tell, somebody intercepted the software in the customer's mailroom, called
and got the auth code, and then put the software back in the mailroom.
The pirate can run their Sun normally on the company's network, and when
they want to run this software, they unhook the ethernet connector,
change the IP number, and reboot the Sun.  My client got ripped off for
a $10,000 software package.

Needless to say, this client has changed his procedure for issuing auth
codes.

Regards,
Bob Murphy
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Async sound input: interruptRoutine
Date: 30 Dec 92 08:35:49 GMT
Followup-To: comp.sys.mac.programmer
Distribution: comp
Organization: Apple Computer, Inc.

In article <JELLINEK.92Dec29111534@rutabaga.adoc.xerox.com>,
jellinek@rutabaga.adoc.xerox.com (Herb Jellinek) wrote:
> 
> I'm writing an application that does asynchronous sound input, and I
> want to use the optional interruptRoutine feature of input sound
> parameter blocks.  I'm using Think C 5.0.4.
> 
> I've looked at the description of the interruptRoutine feature in
> Inside Mac VI, and I think I'm doing things right, but my machine
> hangs in the interrupt routine whenever it does anything other than
> save and restore A5.  From looking at things with MacsBug, I see that
> the value in A0 is wrong, accounting for the bad things that follow.
> I've been looking for code examples, to no avail: the otherwise
> excellent Async Sound Helper doesn't use this feature.
> 
> Here's the current version of the interrupt routine:
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Boolean interrupted = false;
> 
> #pragma parameter recordingInterrupt(__a0,__a1,__d0,__d1)
> void recordingInterrupt(SPBPtr spb, Ptr samples, long peak,
> 			Size byteCount) {
>   long oldA5 = SetA5(spb->userLong);
>   
>   // interrupted = true;
>   
>   SetA5(oldA5);
> }
> 
> ...
> 
> // (Fragmentary) code in init routine:
>   mySPB.userLong = SetCurrentA5();
>   mySPB.interruptRoutine = recordingInterrupt;
> 
> // Execute:
>   myErr = SPBRecord(&mySPB, true);

#pragma parameter only works for inlines, not for your routines.  You'll
need to write you own glue or inlines to obtain the values in the
registers.

-----------------------------------------------------------------------
Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
                             |          Sound Manager Expert
Apple Computer, Inc.         | "All opinions expressed are mine, and do
20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
Cupertino, CA 95014          |       employer, Apple Computer Inc."
Newsgroups: comp.sys.mac.programmer
From: jimlynch@netcom.com (Jim Lynch)
Newsgroups: comp.sys.mac.programmer,comp.os.ms-windows.programmer.tools,comp.windows.ms.programmer
Subject: Re: porting windows app to mac
Date: 2 Jan 93 14:04:39 GMT
Organization: Netcom Online Communications Services (408-241-9760 login: guest)

And what do you think is required to do that? Legislators don't understand yet.
Therefore, legislation _will_ be created. Do you think that's not true??

Thank God (or Clinton) that Sculley isn't in the cabinet...
Newsgroups: comp.sys.mac.programmer
From: phaedrus@halcyon.com (Mark Phaedrus)
Subject: Re: How do I find a hole in the DeskTop?!
Organization: The 23:00 News and Mail Service
Date: Mon, 28 Dec 1992 05:26:51 GMT

In article <1992Dec28.024044.3652@panix.com> rmah@panix.com (Robert Mah) writes:
>In <yjc-251292012254@yjc-slip.dialin.cwru.edu> yjc@po.cwru.edu (Jerome 'TofuSoft' Chan) writes:
>>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.
>GREAT IDEA.  I'm gonna use it too, if you don't mind.

     I'm not sure that this is such a good idea.  The user is always supposed
to be in control of the Mac interface.  When I put a window somewhere on my
screen, it means that I've decided that that's a perfectly fine place for that
window, and I would just assume it didn't try to crawl somewhere else on its
own, thank you very much. :)
     If you do decide to do this, be sure to make it user-configurable.  And
while you're making it user-configurable, add the option to make the window
just teleport to a clear location, rather than "creeping" there.  Even if I
wanted this feature, I'm not sure that I'd want a background application
like a clock using up the CPU time required to slowly move its window across
the screen.
-- 
\o\ Internet: phaedrus@halcyon.com  (Seattle, WA Public Access Unix)     \o\
 \o\ "How'd you like to move a few steps down the food chain, pal?"       \o\
  \o\ If you enjoy fantasy/SF stories with transformation themes, email me \o\
   \o\ for a copy of the Transformation Stories List.                       \o\
From: ngse18@castle.ed.ac.uk (J R Evans)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sozobon C - a free C for the Mac, too? [Correction]
Date: 2 Jan 93 11:12:59 GMT
Organization: Edinburgh University

In article <29848@castle.ed.ac.uk> ngse18@castle.ed.ac.uk (J R Evans) wrote:

>The few initial problems I had were
>connected with Sozobon's assumption that sizeof(int)=4, whereas Think C
>uses sizeof(int)=2, and Think C's little gotcha that sizeof(size_t) !=
>sizeof(integer constant).  

I've had several mail messages correctly querying this statement.  My
brain must have been out to lunch when I wrote it, because all publicly
available versions of Sozobon use sizeof(int)=2 [and sizeof(size_t)=2,
also].   The first (minor) problem I had was in no way connected with 
sizeof(int), but rather with padding of bitfields.  The second was that
the author of Sozobon (Johann Ruegg) had written a small integer constant
in contexts where a size_t was called for.  The small integer constant
is implicitly converted to (int), and whereas sizeof(int)=sizeof(size_t)
within Sozobon (and presumably other compilers that have hosted it),
this is not so within Think C version 4, which I am using.  I guess that
a strict ANSI C would have noticed the type mismatch, but Think C 4 missed
it, with horrible results when the small integer constant is the counter
argument to strncpy!

Think C 5 apparently has a switch to allow 4 byte integers.
	[Why don't I upgrade? -- because it would cost me 3x what I paid
	for the original compiler, due to US/UK pricing differentials]

For the record, I was working with the source for version 2.0 of Sozobon;
The source for Ian Lepore's divergent line (1.33) is not currently
available to me, but Chris Herborth <cherborth@ca.on.waterloo.tdkcs.semprini>
reports that release of his latest version -- 1.40, to include full sources
-- is imminent.

Thanks to all who took the trouble to write on this.

Russ
Newsgroups: comp.sys.mac.programmer
From: Dmitry Boldyrev <dmitry@chemistry.chem.utah.edu>
Subject: The same thing I have...
Organization: University of Utah
X-Useragent: Nuntius v1.0
Date: Tue, 29 Dec 92 19:40:58 GMT

Hello,
I have the same problem with thick lines..
Please help!
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: visRgn and New IM
Date: 23 Dec 92 22:56:33 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <hMX=7K_@engin.umich.edu> positron@engin.umich.edu (Jonathan Scott Haas) writes:

>Firstly, suppose I have a window onto a very large picture, that the user
>can scroll around in the usual way. Is it OK to redraw that very large
>picture at every updateEvt, trusting the visRgn to do the clipping... or
>will drawing (and discarding most of) such a large picture slow down
>my application intolerably?

Well, if the picture is in the form of a bit map, it would be OK.
What I would do is to draw the picture into an offscreen GWorld
matching the screens color setup, and CopyBits from there.
Remember to render the picture anew each time the color setup
changes.


>Secondly, is every volume of the New Inside Macintosh available yet? I

New Inside Mac WILL be a replacement for Old IM, but not until
late next year when the last of the volumes is to be released.
(Actually they'll add several volumes more on OCE, QDGX etc :-)

If you want to do development now, buy IM I, II, IV and VI.
Or buy a CD ROM reader and subscribe to _develop_ and get a CD
with all of them (and the new ones that are released!) online.

Cheers,

							/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  "It was, in fact, cool as all get-out.  Fortunately it was a little
   too late (historically speaking) to be groovy."
                     -- Dennis Pelton
Xref: sparky comp.sys.mac.programmer:20286 comp.sys.mac.comm:12392
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.comm
Distribution: world
From: Patrick_J._Toole@uu0570.foggybottom.com
Organization: Foggy Bottom / Washington, D.C.
Date: Wed, 23 Dec 1992 21:59:16 EST
Subject: Modem Program: HELP!

How come my program can successfully initialize the modem port, write to it,
and close it except when I hook it to a modem? What differences is there? If
the first character I send the modem is a 'A' then my program freezes. Why?

-Pat
Foggy Bottom - your FirstClass Mac connection in Washington, DC
From: wisdom@picasso.ocis.temple.edu (Robert Wisdom)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Beginner's Hierarchical Menu Problem
Date: 21 Dec 92 20:39:10 GMT
Organization: Temple University
X-Newsreader: TIN [version 1.1 PL8]

Richard J. Resnick (rjr@titan.ucc.umass.edu) wrote:
: I've tried to change the number of the FONT resource to > 128, and
: that didn't help. I tried to trace the problem, and it dies right at
: AddResMenu(aMenu, 'FONT').

	I just looked at this more carefully, I was WRONG to suggest that
having a res-id of 100 in this context was incorrect.  Nothing like
embarrassing yourself in front of the world.  Sorry.

: Richard Resnick
			Robert
----
Sign held by an abortion protester:        | Robert Wisdom
"Abortion Kills America's Future Soldiers" | wisdom@picasso.ocis.temple.edu
You figure it out (Because I can't!).      | My opinions are !yours.
----
From: hruska@ecs.umass.edu
Newsgroups: comp.sys.mac.programmer
Subject: Slider controls in think C...........
Date: 31 Dec 92 09:30:12 GMT

 
I'm not sure if my first post ever got out there so here it is again....
 
Hello,
 
Does anyone know if there is any simple PD source out there that shows how to
implement a slider (or dial) in think C.  I'm interested in making a two-indicator
slider to specify a sub-range in a larger range.  This could be done by using
two one-indicator sliders next to (or on top of) each other.  However, all of
the examples I have found are in assembly (in the case of the mac scroll bars)
or in pascal.  If anyone knows if there are any working examples of sliders
in think C 5.0 code out there (ftp accessable) please email me.
Thank You.
 
Mark Hruska
hruska@ecs.umass.edu
From: sunilg@access.digex.com (Sunil Gupta)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Curves in QuickDraw GX
Date: 1 Jan 1993 17:26:14 GMT
Organization: Express Access Online Communications, Greenbelt, MD USA
NNTP-Posting-Host: access.digex.com
X-Newsreader: Tin 1.1 PL3

werner@dewey.soe.berkeley.edu (John Werner) writes:
: 
: Also, hand-coding something in assembler for a RISC chip is MUCH
: harder than on a traditional processor.  There's a smaller instruction
: set, more registers, and you have to worry about pipelining.  A good
: optimizing compiler can usually do a better job than most humans can
: do (at least in a reasonable amount of time).

Your comment is true for RISC processors, but the complaint was being
made about the CISC implementation. My small (4 person) programming shop
maintains our code for a number of platforms. For CISC implementations
we usually tune critical sections in assembly and usually let the
compiler worry about that for RISC implementations. If we can do that,
I'm sure that a megabucks company can spare a few programmers for a
project that would greatly enhance their products.

Sunil Gupta
Monsoon Software, Inc.
sg@monsoon.com
Newsgroups: comp.sys.mac.programmer
From: The Mad Hacker <Mad@HackersRus>
Subject: Re: Telling the volume type
Organization: The Society for the Advancement of Hacking
X-Useragent: Nuntius v1.1
Date: Sun, 27 Dec 1992 22:41:33 GMT

To get more info on a volume, use the PBHGetVInfo function. You can use
the
   ioVDRefNum field to get the driver id for the device. Compare: the AFS
driver
   is always -42, SCSI devices are within a certain ranges, and floppies
(the
   .Sony driver) is constant also. Do a switch on the driver RefNum, and
you should
   be set.
More daring, however, is to use the slightly documented feature from IM
IV (the
   Disk Driver chapter), to get the physical drive icon from the driver
itself.
   Although it says it only works for the HD20, I believe most if not all
drivers
   accept the control param. (I have used the first, but not the second
method, and
   it seems to work).
 
fprefect@engin.umich.edu
Matt Slot, CAEN Mac-Systems
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Subject: Re: Getting Size of Large Files
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Tue, 29 Dec 1992 23:41:56 GMT

In <ofDwLZCSMUI3IEX0Ef@transarc.com> Barry_Wolman@transarc.com writes:

>calling PBGetEOF.  I reviewed the code and checked Think Reference; I
>can't understand why the code works for small files and fails for

You called PBOpen as well. WHy not at least use PBHOpen?
Or better yet, HOpen and GetEOF as high-level parts?


	SFGetFile...
	GetWDInfo ( reply . vRefNum , & vRefNum , & dirID , & junk ) ;
	HOpen ( vRefNum , dirID , reply . fName , fsRdPerm , & refNum ) ;
	GetEOF ( refNum , & len ) ;

With error checking of course. The use FSRead; and why read LINES
when you can read and spool BLOCKS of data? The printer doesn't
care, and it's faster and more efficient.

Cheers,

							/ h+

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

 -- I don't fear death, it's dying that scares me.
From: greg@zaphod.uchicago.edu (Greg Kuperberg)
Newsgroups: comp.sys.mac.programmer
Subject: Looking at a bit in a bitmap truly bytes.  Help!
Date: 22 Dec 92 00:46:31 GMT
Organization: Dept. of Mathematics, U. of Chicago

I have an icon and the user clicks the mouse and I'd like to know
whether the mouse click actually landed in the icon.  The obvious
method (TM) is to look in the icon's mask and see if the mouse click is
in there.  What could be simpler?  Famous last words.

This idea puts me in the most ridiculous quandary as far as Politically
Correct Toolbox Programming is concerned.  I have to chase down the
Icon's mask, already a moral violation of the Object-Oriented
mentality, and then I have to either find a grafPort somewhere and set
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
my code has a bug, but it doesn't seem to work.  (Yes, I remember that
data with a Handle can move.) The second method is un-PC
maybe to the point of being architecture-dependent.  Another possibility
is to CopyBits a single bit.

I think I can eventually find A Way to do this on my own, thank you.
What I want to know is:  What is the most Politically Correct,
future-compatible way?  A C code example would be helpful.

Please send a copy of your response by mail, thanks.
From: s33986s@kaira.hut.fi (Jarkko Kallio)
Newsgroups: comp.sys.mac.programmer
Subject: A PICT of a thin line is too thick on LaserWriter
Date: 29 Dec 92 16:37:30 GMT
Organization: Helsinki University of Technology, Finland

I make a PICT by drawing a simple line after setting PenSize
to WIDTH=1 and HEIGHT=1. THen I call PrGeneral to set the
resolution to XRes=300 and YRes=300 and print the PICT on
LaserWriter. The length of the line on paper is OK but the line
is too thick. I want as thin line as possible.

I have also trasferred the PICT via the Clipboard (scrap) to MacDraw
II. MacDraw understands that the line is one point thick. But, it is
possible to print thinner lines by setting the line to for example
0,1 points thick on MacDraw.

How to print a thinner line? (I use Macintosh Common Lisp).

*****************************************************************************
* Joku tolkku se on talkkunan sy|nniss{kin. * jkallio@otax                  *
*                                           *                               *
*****************************************************************************
From: thomas@camino.mic.cl (Thomas Fruin)
Newsgroups: comp.sys.mac.programmer
Subject: New CTB tool resource calls supported yet?
Organization: El Camino
Reply-To: Thomas Fruin <thomas@camino.mic.cl>
Distribution: world
X-Mailer: uAccess - Macintosh Release: 1.5v4
Date: Tue, 29 Dec 1992 20:55:16 CST

Here I am again with another question:

I'm using the new CTB v1.1, and linking the CommToolboxExtensions.o
file with my code. When I call Gestalt to get the Communications Resource
Manager attributes (with gestaltCRMAttr), I get back a long with only
the bit for the gestaltCRMPresent selector set. I was expecting to
see the new gestaltCRMToolRsrcCalls bit as well, so I can use the
new calls to get resources out of a tool file.

Well, I thought I would just ignore that bit, and assume the tool
resource calls are present anyway :) But when I call CRMGetToolResource
to get the tool's 'caps' resource, I get something which is not NULL
but not a handle either...

What is going on? Perhaps someone has some sample code using the new
calls, and parsing caps resources?

-- Thomas Fruin

   GroupWare Ltda
   Temuco Office
   CHILE

   thomas@camino.mic.cl
From: pershing@csn.org (Paul Pershing)
Newsgroups: comp.sys.mac.programmer
Subject: macsbug exit
Summary: Exit to macsbug, same error _always_
Keywords: crash, Supervisor data space, Macsbug
Date: 3 Jan 93 19:10:32 GMT
Organization: Colorado SuperNet, Inc.
Originator: pershing@teal.csn.org

Hello, can someone help? I use a IIfx, 16Mbyte RAM on board, currently
system 7.1, but formerly 7.0.1 and 6.0.8; I use Macsbug 6.2.2, and I
have a _lot_ of crashes, often - but not always - when I'm about to
enter a fileget/filesave dialog. In 97% of the cases, Macsbug reports
the same error - or same routine at the time of the crash:

"(some address here) Supervisor data space"

This can be when running Xpress, MPW, just about anything. Sometimes,
if I'm running an unusually large group of INITs (er, ah, "extensions,")
I can have this happen at boot time. I've not been able to isolate which
INIT causes it, if in fact this is what does.

Reply here or email, and thanks in advance.

Paul Pershing
Systems Editor
Rocky Mountain News, Denver, CO 80204 (303) 892 2633

ps - Where do the Userland Frontier programmers/hackers/users hang out
on the net?


-- 
------------------------------------------------------------------------------
******** Paul Pershing, Editorial Design/Systems, Rocky Mountain News ********
**** 400 W. Colfax Ave. Denver 80204 (303) 892-2633 * Disclaimers, etc. ****
------------------------------------------------------------------------------
-- 
------------------------------------------------------------------------------
******** Paul Pershing, Editorial Design/Systems, Rocky Mountain News ********
**** 400 W. Colfax Ave. Denver 80204 (303) 892-2633 * Disclaimers, etc. ****
------------------------------------------------------------------------------
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Quick TCL Question
Date: 22 Dec 92 20:56:47 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1992Dec22.015946.12196@rock.concert.net> tbl@rock.concert.net (Ted B Lowery -- Personal Account) writes:

>it is automatically sent a Open AppleEvent, which opens a blank document.  I
>do not want a blank document automatically opened, so I want to stop this
>default action.  But I cannot seem to find out how to do this without changing
>the core classes.  How should I go about doing this?

Go back and redo your homework. This one is simple.
Once you know it, of course :-) :-)=

Anyway, in your CMyApplication class, override CApplication :: DoAppleEvent,
and in your DoAppleEvent, check for the oapp AppleEvent and just do a
SetErrorResult ( noErr ) on it and return. Let all other AppleEvents
through to inherited :: DoAppleEvent.

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
Newsgroups: comp.sys.mac.programmer
Distribution: world
From: jacman@magicbb.uucp (Jordan Christensen)
Organization: MAGIC - Macintosh Awareness Group In Canada
Date: Tue, 22 Dec 1992 07:32:28 EST
Subject: Re: Volume icons?

>Hi all-
>Where can i find the icon definition for a mounted volume?
>I have looked through all the (I think) relevant material in
>IM I-VI, but obviously I've missed something somewhere, but all
>IM talks about are file icons. Help!

The volume icons are stored in an invisible file called 'Icon' in the root
directory, it's id is (not sure of this) '-16455'.

Hoped This Helped