HDTenEightyP/NetNews huggingface dataset:
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Set/Get Cursor
Date: 14 Sep 92 16:38:44 GMT
Followup-To: comp.sys.mac.programmer
Organization: SRI International, Menlo Park, California


In article <1992Sep10.184138.3458@amgen.com> mikeb@sam.amgen.com (Michael Brennan) writes:
>In article <1992Sep1.202106.2865@informix.com> Bill Stackhouse, sbill@informix.com writes:
>>Why does the following cause EvenBetterBusError detect a NIL pointer
>>problem?

>>   SetCursor(*GetCursor(iBeamCursor));

>Here's the code I use.  It works for me:

>	Cursor		myCursor;
>	CursHandle	hCurs = 0L;
>
>	hCurs = GetCursor( iBeamCursor );
>	myCursor = **hCurs;

>	SetCursor( &myCursor );
>	DisposeHandle( hCurs );
>	ShowCursor();

What is different about your code than the line above? Neither has any
error detection. Both will bomb with a nil handle. And is it really a good
idea to dispose of a system handle or it that your own IbeamCursor resource?

If your going to be changing the cursor all the time, you should just
load and lock the cursors when your program starts up. Then you won't
have to worry about a nil handle.

Matt





-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
From: paul@svl.cdc.com (Paul Kohlmiller)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Needed: Refrernces for programming MacTCP
Date: 14 Sep 92 21:00:41 GMT

Joe.Francis@dartmouth.edu (Joe Francis) writes:

>In article <1992Sep09.233857.15170@CS.ORST.EDU>
>noord@prism.CS.ORST.EDU (David Noor) writes:

>> I am *trying* to design a program for the Macintosh which will end up
>> using MacTCP. I need help, because the Inside Macintosh books do not have
>> anything about MacTCP in them. So can anyone out there tell me where to
>> maybe ftp, or some other way to get programming information for MacTCP?
>> I know about the APDA MacTCP developers kit, but the CS dept. wont loan it out
>> to students and i dont have $600+ free in my account or anything :).

>APDA sells the aforementioned kit for $100.00.  If you already have
>MacTCP and only need the documantation, you can purchase the MacTCP
>v.1.1 Documentation Kit through APDA for $60.00.
Also, you might want to get a hold of some PD code that uses MacTCP and does
the dirty little TCP calls for you.
There is something called KERBEROS that I think comes via MIT or some such place
and should be on the usual downloading areas.
We have tried to use this code and it works but there are some flaky areas.
It appears that the MAC can get really hosed up with TCP stuff and the timeouts
in the TCP code don't do enough for you, i.e. the Mac freezes up and is no 
longer counting time clicks or something.
We also use something called ZapTCP (I don't know where this came from) and 
this is supposed to help but it doesn't help much.
I suspect that you may end up like us hitting the reboot button or staring at
Macsbug screens like we did until things get stable.
Good luck.
--
     // Paul H. Kohlmiller             //  "Cybers, Macs and Mips"    //
     // Control Data Systems, Inc.    // Internet: paul@svl.cdc.com  //
     // Acronym under construction.  // America Online: Paul CDC    //
     // All comments are strictly my own. I won't lie but my       //
     // perception of reality is at best a personal hunch.        //
From: kw27+@andrew.cmu.edu (Kevin R. Walker)
Newsgroups: comp.sys.mac.programmer
Subject: sound and fft
Date: 6 Sep 92 07:06:50 GMT
Article-I.D.: andrew.weeVu_u00WBM81d4l0
Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA

Does anyone have any experience in using Fast fourier transforms in
relation to sampled sounds?  I wnat to do a frequency spectrem...

Thanks in advance.
Kip


----------
Kip Walker

kw27+@andrew.cmu.edu
kwalker+@cmu.edu
From: norbert@apple.com (Norbert Lindenberg)
Newsgroups: comp.sys.mac.programmer
Subject: Literate Programming Workshop 1.1
Date: 15 Sep 92 00:37:16 GMT

The Literate Programming Workshop 1.1 is now available via ftp.

The Literate Programming Workshop is an environment for the integrated
development of program source text and documentation in combined documents.
It consists of a WYSIWYG word processor based on a style sheet approach, a
mechanism to extract parts of the text in a document, and a project management
system that handles multi-document projects. The system is designed to be used
in conjunction with MPW: it prepares raw source text for the MPW compilers,
accepts MPW error messages, and shows them in the context of the original
documents. Automatic indexing and hypertext features allow for easy access to
both source text and documentation.

Compared to LPW 1.0, LPW 1.1 adds the following features:
- repeating tabs (the program editor kind)
- Shift Left and Shift Right commands
- triple clicking
- Close All and Save All commands
It also removes a few bugs.

LPW 1.1 is shareware - if you use it for more than two weeks, you have to
register your copy and pay the registration fee of $50.

You can get LPW 1.1 via anonymous ftp from ftp.apple.com, directory
pub/literate.prog. It is available as a StuffIt archive, in both binary and
BinHex versions. The archive contains:
- Literate Programming Workshop
- LPW User Manual
- ParseErrors, which is both an example project and a tool you need for your
  work with LPW

Have fun!
- Norbert Lindenberg
From: fonion@st-anns.ICS.UCI.EDU
Subject: How do I display my color icons?
Newsgroups: comp.sys.mac.programmer
Date: 15 Sep 92 16:37:01 GMT

I can't seem to get the icon for my application to be displayed in
color under System 7, it still shows up in B&W.  I have all the
icl[4,8], ics[4,8] resources in the 'BNDL' resource.  Also, my small
icons (ics) aren't being used by either the finder or multifinder.  Is
there some trick to getting these icons displayed?
			Thanks,
			  Fritz
From: rgonzal@gandalf.rutgers.edu (Ralph Gonzalez)
Newsgroups: comp.sys.mac.programmer
Subject: Minimal QuickBASIC upgrade.
Keywords: quickbasic
Date: 6 Sep 92 13:48:20 GMT
Organization: Rutgers Univ., New Brunswick, N.J.


I finally got the QuickBASIC upgrade for system 7. Rather
unimpressive. No new features, and it won't work with an 040 cache or
with System 7 in 32-bit mode. How's that for a compatibility upgrade
which is over a year late? I guess MS isn't interested in Mac QB!

-Ralph
-- 
Ralph Gonzalez, Computer Science, Rutgers Univ., Camden, NJ
Phone: (609) 757-6122; Internet: rgonzal@elbereth.rutgers.edu
--
From: myg@pacersoft.com (Mark Y. Geschelin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C 4.05 Compatibility
Date: 9 Sep 92 16:20:34 GMT
Organization: PacerSoftware
X-UserAgent: Nuntius v1.1

RE:Think C 4.05 Compatibility

	I use Think C 4.0.5 for an old product.  It is compatable with 7.0.1 on
a CI.
	Make Sure you aren't using Virtual Memory and you should upgrade.
Newsgroups: comp.sys.mac.programmer
From: mhall@occs.cs.oberlin.edu (Matthew Hall)
Subject: Re: How many colours have YOU got?
Organization: Oberlin College Computer Science
Date: Wed, 9 Sep 1992 03:23:15 GMT
X-Posted-From: occs.cs.oberlin.edu
X-Posted-Through: sol.ctr.columbia.edu

In article <Bu94Hs.4H4@csn.org> bell@teal.csn.org (Bell Scott) writes:
>
>	   Question:  In CycleSpy(tm), I have the Help and About windows set to
>   look at 'thePort' to determine the current colour depth.  However, occasionally
>   this will cause a crash because for some weird reason the PixMap field becomes
>   an invalid address.  The question is: How can I reliably tell what the current
>   colour depth is?  ie: The user can change it via the 'Monitors' CDEV without
>   my specific knowledge.  Before I refresh in response to an update event how do
>   I know what the depth is so I can display a legible window?
>
>   Scott R. Bell
>   PS:  Also, I am Colorado SuperNet using 'rn' under SunOS; how do I simply 'post'
>   a message?  Right now all I can do is press 'f' and delete the References....
>   SRB

The color depth for the current device is in
TheGDevice^^.gdpmap^^.pixelsize.
In multiscreen devices, your window may span more than one device.  To
figure out which device your window is in, look at all of the boundary
rectangles of all the devices (I believe the devices are in a linked
list).  How you choose which depth you want to use (the deepest, the
shallowest, or the one with the most area) is up to you.  The
structure of GDevices is in IMV and VI.  You should probably read
about them.

Hope This helps
-matt hall

p.s. in rn, go to the end of the articles (should say something like
'End of articles')  theres a key ($, &, or ? - should be in help) that
will do this.  Then hit f.  It should ask you if you want to compose a
new article.  This is from my experience on an epx system.  It should
be the same for you

--


-------------------------------------------------------------------------------
Matt Hall.    mhall@occs.cs.edu  OR  SMH9666@OBERLIN.BITNET
              (216)-775-5805 (That's a Cleveland Area code. Lucky Me)

"If a man comes up to you and says:
	'A dog just carried away your ear.'
Do you run after the dog, or search first for your ear?" - Moon over Morocco
  
Xref: sparky comp.sys.mac.programmer:15475 comp.lang.c++:13647
From: barker@wd0gol.WD0GOL.MN.ORG (Bob Barker)
Newsgroups: comp.sys.mac.programmer,comp.lang.c++
Subject: Possible bug in MPW C++ 3.2 with Handle-based classes
Keywords: Macintosh, MPW C++
Date: 14 Sep 92 21:40:09 GMT
Followup-To: poster
Organization: Robert Barker & Associates, Eden Prairie, MN.

We are having a problem using Handle-based classes with MPW C++.
If we have a forward declaration for a handle-based class, then actually
declare the class as handle-based later on, the compiler thinks it's a 
pointer-based class.  In the example below, class B has this problem.

Does anybody know of a fix or work-around for this problem?  We're in urgent
need of a solution!  Any help or ideas would be very much appreciated!

---------------------------- Example -------------------------------------
class B;                // forward declaration of class B

// declaration of class A
class A: public HandleObject {

public:
        B *ClassBPtr;

        .
        .
        .
};

//----- Later on -----
class B: public A { 
        .
        .
        .
};

-------------------------------------------------------
System Software:  System 7
Hardware:  Macintosh IIsi
MPW C++ Version:  3.2
MPW Development Evironment:  3.2.3

Thanks!

-Bob Barker
------------------------------------------------------------------------------
Bob Barker                                ...!uunet!umn-cs!tcnet!wd0gol!barker
Robert Barker & Associates                                barker@wd0gol.MN.ORG
(612) 949-0140
Newsgroups: comp.sys.mac.programmer
From: bell@teal.csn.org (Bell Scott)
Subject: Re: THINK C linker makes me sad
Organization: Colorado SuperNet, Inc.
Distribution: usa
Date: Wed, 9 Sep 1992 05:11:12 GMT

In article <fdrny7c.howard@netcom.com> howard@netcom.com (Howard Berkey) writes:
>So I was writing this really small, simple app. (a mac version of xclock,
>just for fun.)  It was only 3k.  Then I added a call to sprintf().  It 
>exploded the program to 22k.
>
>Please, no flames for this... I LOVE the THINK C environment, and I know
>
>grrr.....
>
>ok I'm better now.
>
>-Howard
>
>-- 
>Howard Berkey						howard@netcom.com

	No flames.

	Do you realise that sprintf(3) MUST call in ALL of the floating
point functions to deal with 64, 80, 96 bit precision IEEE?  I believe that
there is a version of the ANSI library that has printf(3) functions that
do not allow floating point calcs.  If not, then hack the code for the ANSI
library to remove them.

	Try doing a program in AT&T 'C'!
;)

Scott R. Bell
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help needed translating from MPW to THINK C ...
Date: 11 Sep 92 21:22:33 GMT
Followup-To: comp.sys.mac.programmer
Distribution: comp
Organization: Apple Computer, Inc.

In article <Bu6tnD.I96@acsu.buffalo.edu>, triantos@acsu.buffalo.edu (Nick B
Triantos) wrote:
> 
> Hi,
> 
> I'm trying to compile the source to Windows 3 (Name correct?), the program that
> lets me show everyone that my Mac can run Windows (Check it out before you
> flame me).  Anyway, I'm trying to compile it in THINK, and, after some minor
> changes, I'm getting errors caused by the line below.  It's used as follows:
> 
> extern void _DataInit();
> 
> /* This routine is part of the MPW runtime library. This external
>    reference to it is done so that we can unload its segment, %A5Init. */
> 
> 
> #pragma segment Main
> void main(void)
> {
> 	UnloadSeg((Ptr) _DataInit);		/* note that _DataInit must not
> 
> be in Main! */
> 	
> 	/* 1.01 - call to ForceEnvirons removed */
> 	
> 	/*	If you have stack requirements that differ from the default,
> 		then you could use SetApplLimit to increase StackSpace at 
> 		this point, before calling MaxApplZone. */
> 	MaxApplZone();					/* expand the heap so 
> code segments load at the top */
> 
> My question is, how can I make this part work in THINK?  I have tried just
> commenting it out ("When in doubt, comment it out"), and, well, that was a
> stupid idea.  Any others?

Think doesn't use the _DataInit method, so you don't need to call
UnloadSeg on this.  Delete the extern for it, and the UnloadSet.

-----------------------------------------------------------------------
Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
                             |          Sound Manager Expert
Apple Computer, Inc.         | RAll 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.S
Newsgroups: comp.sys.mac.programmer
Subject: Re: What is error -5016?
From: cwhi2@cs.aukuni.ac.nz (Craig Dean          Whitmore       )
Date: Mon, 14 Sep 1992 01:31:22 GMT
Organization: Computer Science Dept. University of Auckland

In <73gg03Cw81AJ00@amdahl.uts.amdahl.com> jsp@uts.amdahl.com (James Preston) writes:


>I'm calling ResolveAlias on an alias that references an unreachable
>AppleShare volume (because I'm not connected to the network at the
>time).  It returns error number -5016.  That number doesn't seem to
>be documented in Inside Mac volume VI.  Does anyone know the official
>meaning of that error number?  I'd like to be able to give a reasonable
>error message to the user; can I just assume that -5016 means, "You're
>not connected to the network, bozo"?

>--James Preston

This -5016 problem is a special error that programmers introduced to indicate
that the 680x0 was going into superviser mode and if the person didn't turn
the MAC off in the next five years that there MMU would cease to function.
I don't know why you should get that error - the only way that this error
came up was when programmers did a call to the operating system to open a
screen with dimensions of 244 x 199 and to turn on file sharing. - but that
didn't work all the time.   If this thing happens again you should in my
opinion sue macintosh for releasing macintosh computer without getting all
there bugs out of their machines.


-- 
----------------------------------------------------------------------------
|Craig Whitmore                     |  /////                               |
|Auckland University                | (<>_<>)                              |
|Auckland                           |  \---/                               |
From: bowman@reed.edu (Eric Bowman (bobo))
Newsgroups: comp.sys.mac.programmer
Subject: Re: THINK C linker makes me sad
Date: 8 Sep 92 08:51:20 GMT
Article-I.D.: reed.1992Sep8.085120.24380
Distribution: usa
Organization: Reed College, Portland, OR

In article <fdrny7c.howard@netcom.com> howard@netcom.com (Howard Berkey) writes:
>So I was writing this really small, simple app. (a mac version of xclock,
>just for fun.)  It was only 3k.  Then I added a call to sprintf().  It 
>exploded the program to 22k.

I hate to break it to you, but it ain't the linker's fault.  printf is BIG.
In MPW C you can get rid of some of it if you don't do any floating point
conversions; I suspect you can do something similar with Think.

Basically, using printf isn't such a great idea, IMO.  Sure, it's easy to
use, but I've found it better/smaller/faster in the long run to use
NumToString, etc.

>Please, no flames for this... I LOVE the THINK C environment, and I know
>that the 'open letter to symmantec' thread was months ago, but I do REALLY
>WISH that the THINK C linker (or loader) would recognize discrete blocks of 
>code at the function (rather than file) level.  

Isn't Think 5 better about this?

>	While I'm at it some revision control system would be nice too...

Gotta love Projector!  :-)

later,
bobo
bowman@reed.edu
George Clinton in '92
Congress No!  Parliament Yes!
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: DrawGrowIcon...somethings wrong
Date: 9 Sep 92 13:46:18 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <1992Sep4.144520.7678@utkux1.utk.edu>, danny@utkux1.utk.edu
(Danny W. McCampbell) wrote:
> 
> activateEvt: 
>     begin
>      TempLongInt := BitAnd(theEvent.modifiers, $000F);
>      if TempLongInt = 1 then
>       begin
>        HiliteControl(gScrollBarHandle, 0);
>        DrawGrowIcon(window);
>       end
>      else
>       begin
>        HiliteControl(gScrollBarHandle, 255);
>        DrawGrowIcon(window);
>       end;
>     end;
> 
> It's me again.  When I use this code to try to hide the DrawGrowIcon
> box and show it I get a Bus Error.  From what I understand from
> IM Vol I that when I call DrawGrowIcon when the window is inactive it
> will draw just the outline and actually hide the grow box.  Why
> do I get a bus error here?
> 

The code looks correct to me, so I would ask myself:
o  Is 'window' a valid pointer when this code runs?
o  Is the grafPort set to the 'window' when this code runs?
o  If you are using THINK Pascal, do you have the resource file / fork open
from some previous debugging work?  (I don't know THINK Pascal, but with
THINK C this can cause spectacular effects.)

Chuck Hoffman
chuck@gte.com
GTE Laboratories, Waltham, Massachusetts, USA
(617) 466-2131
=====================================
I'm not sure why we're here, but I am sure that while we're here we're
supposed to help each other.
=====================================
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@cyklop.nada.kth.se (Jon W{tte)
Subject: Re: Game Techniques (was: NON-QUICKDRAW GAMES)
Originator: d88-jwa@cyklop.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<1992Sep8.191342.15509@adobe.com>
	<D88-JWA.92Sep9134048@musta.nada.kth.se>
	<1992Sep9.153123.5159@lambda.msfc.nasa.gov>
Date: Wed, 9 Sep 1992 18:28:44 GMT

> robichau@lambda.msfc.nasa.gov (Paul Robichaux) writes:

   >However, your timings are off. If your mac has color, it's
   >a 030 mac

   Nope. The original Mac II and the original Mac LC were both '020 machines.

Yeah, right, but!

I think the timing case should be made for a 030, since that's
the mainstream processor (and the 040 is fast enough anuyway :-)

We are already discounting all people running Stepping Out, Radius
Pivots and SCSI screen boxes, since we don't use the ShieldCursor/
ShowCursor signalling mechanism.

-- 
Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069

Help eradicate FIDO-Net <-> Usenet gateways in our time!
Newsgroups: comp.sys.mac.programmer
From: gurgle@netcom.com (Pete Gontier)
Subject: new icon suite calls slow?
Date: Tue, 15 Sep 92 05:45:41 GMT
Organization: cellular
Keywords: new icon suite sweeticons

Have been experimenting lately with the icon suite calls recently
documented in a tech note. I defined a big grid in which to draw
a fair amount of icons. The grid resizes with the window, so I am
able to see what it's like to paint a whole screenful of icons. I've
one word for it: slow.

At first I thought it was the fact I was
calling a routine which drew the appropriate icon resource
given a resource ID. I figured the resource manager calls were slowing
things down. So I pre-loaded the resources into an array of
handles and used calls which accepted handles as parameters.
Still the overall effect was slow.

Are these calls just slow or is there something that can be done?
Granted nobody said _SweetIcons was a spreadsheet manager, but it
would be nice if I could do an icon grid like this.
Email me and I will summarize later.
-- 
 Pete Gontier // EC Technology // gurgle@netcom.com
From: Glen.Stewart@f175.n2240.z1.ieee.org (Glen Stewart)
Newsgroups: comp.sys.mac.programmer
Subject: RE: STUFFIT FORMAT
Date: 31 Aug 92 04:06:57 GMT
Organization: FidoNet node 1:2240/175 - The Associati, Grand Blanc MI

I have a couple programs here that examine StuffIt files.  One contains Pascal 
source code.  Perhaps one of them may help.  If so, feel free to call the BBS.


--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 Glen Stewart - Internet: Glen.Stewart@f175.n2240.z1.ieee.org
Xref: sparky comp.sys.mac.programmer:15532 comp.sys.mac.system:11892
From: stevem@cs.utexas.edu (Steve Anthony Mariotti)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
Subject: Re: Does anyone recognize _Jackson?
Date: 15 Sep 1992 20:21:10 -0500
Organization: U Texas Dept of Computer Sciences, Austin TX
NNTP-Posting-Host: tokio.cs.utexas.edu

In article <30569@goofy.Apple.COM> dwb@apple.com (David W. Berry) writes:
>In article <lbaaheINNmja@coltexo.cs.utexas.edu> Steve Anthony Mariotti,
>stevem@cs.utexas.edu writes:
>>A similar question to yours:  what the hell is _Bass?  I was getting some
>>crashes when a program I was fixing thrashed thePort, and my stack crawl
>>led me through some code low in memory (very low, like $00001000 or so)
>that
>>called _Bass.

>Since Bass was the code name for the spline font project, I assume that
>_Bass is an internal trap implementing the spline fonts.

Ok, so now the question is: Is it pronounced like the fish or the four-stringed
electric instrument?  BASE or BASS, I gotta know.

Steve Mariotti
stevem@cs.utexas.edu
From: death@ccwf.cc.utexas.edu (Gregory A. Mulhollan)
Newsgroups: comp.sys.mac.programmer
Subject: Igor XOPs in Think C 5.0.2
Summary: Problems going from TC4.0.5?
Keywords: Igor,XOP,Think, C
Date: 15 Sep 92 02:25:46 GMT
Distribution: USA
Organization: The University of Texas at Austin, Austin TX

I am going to recompile some Igor XOPs under Think C 5.0.2. They were
originally compiled using Think C 4.0.5. Do any of you Igor XOP fiends
have any knowledge of pitfalls in moving to 5.0.2? Please advise me via
e-mail. If there is enough interest, I will summarize and post.
From: Glen.Stewart@f175.n2240.z1.ieee.org (Glen Stewart)
Newsgroups: comp.sys.mac.programmer
Subject: RE: BASIC for the Mac?
Date: 3 Sep 92 16:05:10 GMT
Organization: FidoNet node 1:2240/175 - The Associati, Grand Blanc MI

ZBasic is quite nice.  About $100 or so.


--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 Glen Stewart - Internet: Glen.Stewart@f175.n2240.z1.ieee.org
Newsgroups: comp.sys.mac.programmer