HDTenEightyP/NetNews huggingface dataset:
From: eric@homebase.vistachrome.com (Eric Brunson)
Subject: Re: Help! System error #28
Organization: Vista-Chrome Incorporated
Date: Fri, 14 Aug 1992 17:48:28 GMT

chuck@gte.com (Chuck Hoffman) writes:

>This kind of problem would have been much easier to debug at the assembly
>level with MacsBug, rather than at the source level with THINK C Debugger. 
>I'm a very experienced programmer using IBM System/370 Assembly Language
>(mainframe).  I simply must learn 680x0 assembly language.  Any
>recommendations for textbook, course, or assembler software?

My recommedation would be the M68000 users manual from Motorola.  It's free,
and it is guaranteed to have everything you need to know about the chip.
Of course, I only recommend this to someone who already knows assembly
on another machine a doesn't need to have his hand held through the basics.

I also heartily recommend thoroughly perusing the Inside Mac chapters on 
memory management, and I cannot speak highly enough of TMON Pro, by
ICOM Simulations, it costs about $250 and is worth every single penny.
It is to MacsBug what the Mac is to a PC.

Hope this helps...

-- 
Eric "Ra" Brunson      |
eric@vistachrome.com   |     These opinions are mine alone, but
brunson@math.fsu.edu   |   they could be yours for a low monthly fee.  
Newsgroups: comp.sys.mac.programmer
From: Sarek@world.std.com (Garrett Fitzgerald)
Subject: Stupid Newbie Question #17
Organization: The World Public Access UNIX, Brookline, MA
Date: Thu, 13 Aug 1992 00:55:49 GMT

I'm trying to figure out how to do a large input screen with
fixed-length input fields. My mental image is something like the
FileMaker Pro interface. Can someone point me in the right direction?
Thanks muchly. :-)
--------------------
"OS/2--half an operating system?"

Sarek of Vulcan
a.k.a. Garrett Fitzgerald `:-)
Official Diver of the RFA and 'Chelle's TwinSib

Sarek@world.std.com

Newsgroups: comp.sys.mac.programmer
From: Michael F. Kamprath <kamprath@caen.engin.umich.edu>
Subject: calloc() makes my program hang
Date: Thu, 13 Aug 92 21:16:13 EDT
Organization: University of Michigan, Aerospace Engineering
X-Useragent: Nuntius v1.1.1d5
X-Xxdate: Thu, 13 Aug 92 21:16:16 GMT

I am using multiple calls to calloc in a subroutine that is called
multiple times.  The subroutine works fine the first few times, but
after a while, my program hangs at a call to calloc.  The general
form to my program is:

foo(...)
{
	x = (double *)calloc(N +1, sizeof(double));
	y = (double *)calloc(N + 1, sizeof(double));
	    .
		.
		.
	free(y);
	free(x);
}

main()
{
		.
		.
	foo(...);
		.
		.
	foo(...);
		.
		.
		.
}

You get the idea.  Anyways, the thrird or fourth call to foo() (not the
real subroutine) would hang at one of the calloc() calls (thank apple
for that <control><option><command>-<escape> quitter).  

What would this be an indication of?

Thanks for any help.

Michael F. Kamprath
kamprath@caen.engin.umich.edu
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Subject: Re: Weird Quickdraw Bug w/ Geneva
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<1992Aug18.165219.3514@hobbes.kzoo.edu>
	<cshotton-180892123434@oac2.hsc.uth.tmc.edu>
	<1992Aug18.202015.13117@hobbes.kzoo.edu>
Date: Tue, 18 Aug 1992 22:35:33 GMT

.kzoo.edu> k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:

   Hmmm.  This may be bad;  I've never seen a prohibition against having
   the same palette accessed by more than one window, but I've never seen
   anything allowing it either.  Try copying the palette before you
   re-assign it:

Under system 7, it's OK for windows to share pallettes.
Under system 6, it's not.

It's all in Inside Mac VI.


-- 
- I have decided that it is not boxes but my lack of skill that's the problem.
- Traitor! This kind of attitude will get you nowhere around here. If you must
  know, it's not your boxes that are the problem, it's your lack of a
  sufficient number of boxes. Go out and buy something.
Newsgroups: comp.sys.mac.programmer
From: chh9@quads.uchicago.edu (Conrad Halton Halling)
Subject: Checksumming MemErr global variable (Tech Note 7) problem
Reply-To: chh9@midway.uchicago.edu
Organization: University of Chicago Computing Organizations
Date: Tue, 18 Aug 1992 18:17:14 GMT

Tech Note 7 says:

"If you are having strange, memory-related problems, one thing that
you can do to help find them is to checksum on MemErr (the low memory
global word at $220).  In MacsBug, type "SS 220 221"....  When MemErr
changes, the debugger will appear, and you can check your code to make
sure that you are checking MemErr.  If not, you might have found a problem
that could cause your program to crash!"

I tried this, but apparently StripAddress() is using MemErr because it
is stuffing strange numbers into this global variable, so this technique
doesn't seem to work any more.  Does anyone know why StripAddress()
is using MemErr??

Furthermore, although I can get the "SS" command to work on an SE, a IIcx,
and a IIci under System 7, it locks up a IIsi.  The cursor changes to
the watch, the hands move a few times, the cursor disappears, and then
nothing.  Has anyone had problems with this?

-- 
Conrad Halling
c-halling@uchicago.edu
From: jjacobso@digi.lonestar.org (Jon Jacobson)
Newsgroups: comp.sys.mac.programmer
Subject: ThinkC project resource problems
Date: 21 Aug 92 14:52:55 GMT
Organization: DSC Communications, Plano Tx.

Fellow netters,

I've been working on the ColorTutor project in Dave Mark's book 'Primer Volume 2' and
have been having problems with the program recognizing its resource file.  I'm running
a tuned-up System 7 with ThinkC 5.02 on an LC II.  The problem I'm seeing is that when
the program is run the GetMenu() calls to load the menu handles for the popup menus 
return a zero handle.  I created the resources using ResEdit 2.1.1 and have even recreated
the resource file several times just to be sure it wasn't a typo or something.  Yes, the
menu ID stuff is correct, ResEdit 2.1.1 is smart enough to do that for me :^).

As an experiment I modified the call to IsColor() to !IsColor() so that the Alert would
always be displayed upon executing the program.  What I found was that if I didn't include
the MENU resources in the project resource file the alert would display correctly.  If the
MENU resources were included in the project resource file the alert was not displayed.

To make matters worse after I'd been working on this for a while whenever I tried to execute
the program I'd get the old "finder" Unimplemented Trap bomb.  To be safe I reloaded ThinkC
from my originals.  Has anyone seen this kind of strangeness before or have a clue as to
why I'm seeing such strange resource problems?

I have been through the source code several times and I'm confident that everything is
typed properly.  The program "behaves" as long as you don't try the popup menus (of course
it doesn't like 0x00000000 for menu handles). 

Thanks in advance for your help!

Jon Jacobson   INTERNET: jjacobso@digi.lonestar.org

-- 
Jon Jacobson               | 
jjacobso@digi.lonestar.org | Tis better to program and never be published
DSC Communications         |   than to have never programmed at all.
Plano, Texas               |                      -me (apologies to W.S.)
From: rson@rhi.hi.is (Reynir Hugason)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Local Zone Name
Date: 17 Aug 92 07:51:13 GMT

Here is a generic example of getting the local zone name. It should
work under any system.

Boolean GetZIPAddr(AddrBlock *ZIPAddr)
{
	short theNode;

	if (GetNodeAddress(&theNode, &ZIPAddr->aNet) != noErr)
		return false;
	if ((ZIPAddr->aNode = GetBridgeAddress()) == 0)
		return false;
	ZIPAddr->aSocket = 6;
	return true;
}

void GetTheZone1(char *theZone)
{
	BDSElement		theBDS;
	ATPParamBlock	theATPPB;
	Str255			theBuffer;
	AddrBlock		theZIPAddr;

	theZone[0] = 0;
	if (!GetZIPAddr(&theZIPAddr))
		return;
	theBDS.buffSize = sizeof(Str255);
	theBDS.buffPtr = &theBuffer;
	theATPPB.ATPnumOfBuffs = 1;
	theATPPB.ATPatpFlags = 0;
	theATPPB.ATPreqLength = 0;
	theATPPB.ATPreqPointer = NULL;
	theATPPB.ATPbdsPointer = (Ptr)&theBDS;
	theATPPB.ATPaddrBlock = theZIPAddr;
	theATPPB.ATPtimeOutVal = 2;
	theATPPB.ATPretryCount = 2;
	theATPPB.ATPuserData = 0x07000000;
	if (PSendRequest(&theATPPB, false) == noErr) {
		BlockMove(theBuffer, theZone, theBuffer[0] + 1);
	}
}

void GetTheZone2(char *theZone)
{
	XCallParam		theXPBPB;
	short			xppDriverRefNum;
	Str255			theBuffer;

	theZone[0] = 0;
	if (OpenDriver("\p.XPP", &xppDriverRefNum) != noErr)
		return;
	theXPBPB.zipInfoField[0] = 0;
	theXPBPB.zipInfoField[1] = 0;
	theXPBPB.zipLastFlag = 0;

	theXPBPB.ioRefNum = xppDriverRefNum;
	theXPBPB.csCode = xCall;
	theXPBPB.xppSubCode = zipGetMyZone;
	theXPBPB.xppTimeout = 10;
	theXPBPB.xppRetry = 2;
	theXPBPB.zipBuffPtr = (Ptr)theBuffer;
	if (PBControl((ParmBlkPtr)&theXPBPB, false) == noErr) {
		BlockMove(theBuffer, theZone, theBuffer[0] + 1);
	}
}

void GetTheZone(char *theZone)
{
	SysEnvRec theMac;

	theZone[0] = 0;
	if (SysEnvirons(1, &theMac) != noErr)
		return;
	if (theMac.atDrvrVersNum >= 53) {
		GetTheZone2(theZone);
	} else {
		GetTheZone1(theZone);
	}
}
Newsgroups: comp.sys.mac.programmer
Subject: FlushEvents necessary? (was: Re: Toolbox init)
From: hammett@sbsu1.aukuni.ac.nz (Tim Hammett)
Date: Sun, 16 Aug 1992 22:36:16 GMT
 <1992Aug13.031241.9631@gallant.apple.com> <1992Aug13.181036.10085@waikato.ac.nz>
Organization: University of Auckland, New Zealand.

ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
>> 	InitWindows();
>> 	FlushEvents(0xffff,0);

>Personally I prefer to do a FlushEvents *after* all my program setup.

Is it necessary to do FlushEvents() at all these days? I notice that most
of the DTS sample Apps don't. I would be interested in hearing the pros
and cons of using FlushEvents at program startup.

--
Tim Hammett, Botany Dept, Auckland University, New Zealand.
t.hammett@aukuni.ac.nz   Phone: +64-9-373-7599 x8365    FAX: +64-9-373-7416
From: lai@Apple.COM (Ed Lai)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Apple Events reply problem
Date: 12 Aug 92 20:04:44 GMT
Organization: Apple Computer Inc., Cupertino, CA

The reply is null because the client is not looking for a reply. If it
is null, don't bother to reply.

/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai                                               */
/* Apple Computer, MS37-UP                                     */
/* 20525 Mariani Ave,                                          */
/* Cupertino, CA 95014                                         */
/* (408)974-6272                                               */
zW@h9cOi
Newsgroups: comp.sys.mac.programmer
From: maynard@esther.msc.cornell.edu (Maynard J. Handley)
Subject: Re: tcl/alpha/latex questions
Organization: Cornell-Materials-Science-Center
Date: Fri, 21 Aug 1992 06:51:29 GMT

LaTeX is formatting "language" based on the TeX formatting language. You
can ftp all the stuff you need to use LaTeX from midway.uchicago.edu in
/pub/OzTeX. LaTeX is nothing like tcl. It is only concerned with describing
the layout of your pages. But it will handles stuff like page breaks with
far greater ease than tcl.

The advantages of LaTeX are
1) SUPERB quality output. Quite simply the best available in the world
today.
2) Very easy handling of things like screen plays, through use of style
files. I don't use a screenplay style file but they exist. If you ask over
the net someone will tell you where to get one. 

Disadvantages are
1) Lots of disk space chewed up- around 10MB or so, though once you
undertand how TeX works, you can remove a bit of this as unnecessary to
you.
2) You will have to buy a book on LaTeX to learn how to use it. This will
cost you about $20. I would recommend the book by Lesley Lamport (who
created LaTeX.)
Don't buy a book on TeX- most suck. Especially do not buy Knuth's book on
TeX. You will learn nothing from it.
3) You will have to be prepared to invest some time in learning TeX and
LaTeX- say a day or two, with constant referring to the manual for the
first week.
4) It is possible to include pictures, but kinda a pain.

Personally I think it's worth the time, cost and disk space- you may not.
One last thing- If you do take the time to learn LaTeX, once you are
familiar with it and how to modify it, mail me asking about the New Font
Selection Scheme. This is a collection of bits of stuff that make
font-handling in LaTeX much easier, but installing them takes some
knowledge of how TeX works, and if you don't understand TeX you will land
up with a mess where nothing works anymore. One day the NFSS will be part
of standard LaTeX as you get over FTP, but that day is not yet here.

Good luck,
Maynard
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Subject: Re: annoying pascal strings
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<zben-100892215906@zben-mac-ii.umd.edu>
	<1992Aug13.174942.18261@kronos.arc.nasa.gov>
Date: Thu, 13 Aug 1992 23:06:23 GMT

> joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91) writes:

To pick nits (and avoid irritating casts)

   char * CToPStr(char *aCStr);
Should return unsigned char *

   char * PToCStr(char *aPStr);
Should take unsigned char *


-- 
- I have decided that it is not boxes but my lack of skill that's the problem.
- Traitor! This kind of attitude will get you nowhere around here. If you must
  know, it's not your boxes that are the problem, it's your lack of a
  sufficient number of boxes. Go out and buy something.
Newsgroups: comp.sys.mac.programmer
From: c90davby@odalix.ida.liu.se (David C Byers)
Subject: Faking key presses
Summary: Need help on how to fake key presses thorougly enough to fool everybody
Keywords: keyboard, system, ADB, keyboard
Organization: CIS Dept, Univ of Linkoping, Sweden
Date: Fri, 21 Aug 1992 14:20:15 GMT

I am considering building a simple ADB device which is supposed to
emulate parts of the keyboard. Which parts are to be controlled in
software, so I need a way to fool the entire system that a key has
been pressed.

The best way to do this seems to be talking to the ADB driver for the
regular keyboard, but there are still problems.
1.	What if there is not keyboard installed? What happens?
2.	How do I stay compatible with nonstandard keyboards and future
	releases from Apple.

If somebody has code that does something similar to what I want to do,
I would really appreciate seeing it. If somebody has helpful ideas or
just pointers to literature, I would appreciate that too.

If I finish my project, the results will be made freely available to
the net.
--
David Byers                             Ryds Alle' 9:204
byers@lysator.liu.se                    S-58251 Linkoping
c90davby@und.ida.liu.se                 SWEDEN
From: lam@ai-ariel.JPL.NASA.GOV (RLam)
Subject: Create self initialize application
Reply-To: lam@ai-pluto.JPL.NASA.GOV
Organization: NASA/Jet Propulsion Laboratory
Date: Mon, 17 Aug 1992 23:24:29 GMT


Hi,
    I want to build an application which will execute at a specific time.
Can someone kindly provides me some hints on how to do it? Is there
any sample codes available from any ftp site? Thanks in advance.

Ray Lam
lam@ai-pluto.jpl.nasa.gov 
Newsgroups: comp.sys.mac.programmer
From: news@massey.ac.nz (USENET News System)
Subject: Needed - Sample code on how to add a menu to the menu bar
     permanently
Organization: Massey University
X-Useragent: Nuntius v1.1
Date: Sun, 16 Aug 92 19:59:45 GMT

Hi,

Could anyone out there give me some sample code for adding a menu to the
menubar permanently?

I would like my menu to be accessable from any application.  MacroMaker
and DiskDoubler are two programs that use this technique.

Any help would be greatly appreciated.  Please email any suggestions, I
will post a summary if there is any response.

Thanks,

Rob.

********************************************************************
Robert Grapes, Systems Programmer, Computing Services, Massey University
Voice: +64 6 350 5158                       Email: R.Grapes@massey.ac.nz
********************************************************************
Newsgroups: comp.sys.mac.programmer
From: merv@ellis.uchicago.edu (garrett marvin derner)
Subject: Offscreen colors
Reply-To: merv@midway.uchicago.edu
Organization: University of Chicago Computing Organizations
Date: Wed, 12 Aug 1992 18:03:06 GMT

Is it possible to draw offscreen in *exact* 8-bit colors?
I have written a test prog to PaintRect onto the screen and
into a GWorld, using the same palette color each time.
When I CopyBits from the GWorld to the actual screen, the color 
ends up an approximation, noticably different.
I first tried using SetPalette on the GWorld pointer.
I also tried copying the palette to a color table with Palette2CTab,
and specifying that CTable in the NewGWorld call.
























C


B
B
B
C
C
C
C
C
C
A
A
A
A
A
A
B
B
B
B
B
B
A
A
A
A
A
A
B
B
B
B
B
B
B
B
A
A
A


C
ends up an approximation, notica
Newsgroups: comp.sys.mac.programmer
Subject: Re: ETo #8
From: Bruce.Hoult@bbs.actrix.gen.nz
Date: Wed, 12 Aug 1992 13:54:41 GMT
Organization: Actrix Information Exchange

In article <1992Aug11.230655.28810@cs.tulane.edu> Jeff E Mandel <mandel@tmc.tulane.edu> writes:
> 
> Well, naturally, the Kiwis have it first. After all, they're across the
> international date line.

Yeah, but our messages get held up in customs for 24 hours in Honolulu to
compensate...   (Probably going round and round on the Wiki Wiki bus)
-- 
Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
"Cray's producing a 500 MIPS personal computer with 256MB RAM and 8 GB
hard disk that fits in your pocket!"   "Great!  Is it PC compatible?"
From: Michael_Hecht@mac.sas.com (Michael Hecht)
Newsgroups: comp.sys.mac.programmer
Subject: THINK Reference funny
Date: 21 Aug 92 14:49:40 GMT
Organization: SAS Institute Inc.
X-Useragent: Nuntius v1.1.1d8
X-Xxdate: Fri, 21 Aug 92 15:51:45 GMT
X-Xxmessage-Id: <A6BA7B412301050A@studly.mac.sas.com>

For those of you with THINK Reference, look up FindWindow and check out
the description of "inDrag" in the "Returns" section.

--Michael

=======================================================================
Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
From: trimper@edsi.plexus.COM (Greg Trimper)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Musings On Trying To Support System 6...
Date: 15 Aug 92 02:23:17 GMT
Article-I.D.: edsi.1992Aug15.022317.16373
Organization: Enterprise Data Systems Incorporated, Appleton WI

orpheus@reed.edu (P. Hawthorne) writes:

>	At what point do you say: 
>	"Hey, that's obsolete and I'm not going to support it."

Seven Years, or the bulk of your audience's base platform.  I.E., in the
corporate and educational world that I live in, I can pretty much say that
a Plus/6.0.7 is the lowest thing I need to support.  The Plus is about
to hit the Seven Year technology turnover, so perhaps next year I 
will be able to say "SE with System 7"

I still do use a 1Mb Plus, 6.0.4, as my worst case test machine.


Greg Trimper   trimper@edsi.plexus.com  
Newsgroups: comp.sys.mac.programmer
From: neeri@iis.ethz.ch (Matthias Neeracher)
Subject: Re: StripAddress (was Re: Checksumming MemErr...)
Organization: Integrated Systems Laboratory, ETH, Zurich
	<Bt74v9.KGF@taligent.com> <1992Aug19.101953.10190@waikato.ac.nz>
Date: Wed, 19 Aug 1992 09:48:45 GMT

In article <1992Aug19.101953.10190@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
>In article <Bt74v9.KGF@taligent.com>, keith@taligent.com (Keith Rollin) writes:
>> I've got a Quadra 900 with 7.0.1, Tune-Up
>> 1.1.1, and a bunch of skanky INITs. If anyone is going to have a goofy version
>> of StripAddress, I would. However, StripAddress is still run from ROM on my
>> machine, and it looks like this:
>>
>>      +0000  4080D764   BTST       #$00,$1EFC
>>      +0006  4080D76A   BNE.S      _StripAddress+000C         ; 4080D770
>>      +0008  4080D76C   AND.L      MaskBC,D0
>>      +000C  4080D770   RTS
>
>Interesting. I had a look on my IIfx, and my StripAddress entry point
>is at 4080D76C--that is, my StripAddress routine consists of only the
>last two of the above instructions. The preceding BTST and BNE are still
>there, in the same place, but they're not part of StripAddress. Not
>according to MacsBug, anyway.
>
>My machine is running in 24-bit mode.

This looks like an optimization. In 24-bit mode, *every* address should be
masked to 24 bit, so the trap dispatcher is set up to point to the stripping
part. _SwapMMUMode is then probably responsible for pointing the trap back to
4080D764. Remember, MacsBug gets its information of what instruction belongs to
what trap from the trap dispatch table. 

Another reason not to do a GetTrapAddr of a trap and JSR to the address, I
guess. 

Matthias

-----
Matthias Neeracher                                      neeri@iis.ethz.ch
  "And I won this ribbon in a Degradation Contest at the Teheran
   meeting of Junkies Anonymous" -- William Burroughs, _The Naked Lunch_
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: TN 31 relevancy vs sys 6.0.x
Date: 21 Aug 92 09:56:02 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

I tried to pull a current copy of TN 31, but ftp.apple.com  no-gotem. 
Whether this is legitimate (ie, it has been pulled) I dunno, and I dont
trust the May TN 0 for such specifics, as that too could be eroneous, so
please consider the following:

My 1988 version states that as of system 4.1, (paraphrased)

> TEStylInsert will misbehave if the TE record is not active.

Can anyone confirm that this is still true under, say, 6.0.7?

My environment is Think Pascal v.4.0.1, using TCL 1.1.2.

Thanks for your time.
--

Dana S Emery <de19@umail.umd.edu>
From: hp48sx@wupost.wustl.edu (HP48SX Archive Maintainer)
Newsgroups: comp.sys.mac.programmer
Subject: Progress bar, default color etc.
Date: 16 Aug 1992 19:12:25 -0500
Organization: Washington University in Saint Louis, MO USA
NNTP-Posting-Host: wuarchive.wustl.edu

I have designed a progress bar dialog, and currently I draw the bar black
on white with a frame around. Is there a CDEF in the system I can use
for a progress bar that uses either the default color as picked by the
user or the nice blue one Apple uses in the finder ?

How do I find the user selected color ? I can always find the blue one
by making a screen dump in 32-bit mode, reading it into Photoshop, and
get the values for the color. Also, what color is used to paint over the
progress bar ? The gray color between the blue and black as you can get
it from GetGray() ?
-- 
Povl H. Pedersen             hp48sx@wuarchive.wustl.edu
HP48sx archive maintainer

All Opinions (C) Copyright the Intergalactic Thought Association
Newsgroups: comp.sys.mac.programmer