HDTenEightyP/NetNews huggingface dataset:
From: tree@kira.uvm.edu (Tom Emerson)
Subject: Re: TCL/UnloadSeg Help Needed
Organization: University of Vermont, EMBA Computer Facility
Date: Mon, 28 Sep 1992 12:32:40 GMT

In article <1992Sep25.142316.21541@ux1.cts.eiu.edu> cfpdh@ux1.cts.eiu.edu (Peter Hesterman) writes:

   My TCL project includes numerous segments which contain only code
   associated with TCL objects that are infrequently used by the program.  In
   the event of a memory shortage, I would like to mark these code segments
   as purgeable.  Is it possible to identify one of the methods belonging to
   one of the objects as the argument for UnloadSeg()?  I have tried
   something like UnloadSeg(MyObject::IMyObject) but got a access denied
   error.  UnloadSeg(IMyObject) didn't work at all.  My work-around has been
   to add a dummy file containing a dummy function to each of these segments
   and then UnloadSeg(Dummy).  Have I missed the boat here, is there a more
   elegant way of doing it, etc.?

The dummy function technique is the easiest to implement. You could also write
code to unload segments a la MacApp, i.e. mark a group to be unloaded each
time through the event loop. If you know the name (or number) of each segment
(each is called Segx, where x is between 2 and 2+the number of segments in
your project. The first segment in your project window is segment 2) you can
get a handle to them with GetResource (or GetNamedResource), add the first
word of resource (the offset to that segments JT entry), then add the
appropriate offsets (I think its A5+32+2, i.e. the value of A5 plus the offset
to the beginning of the jump table plus the two bytes for the JUMP in the JT
entry). You could write this has a chore that will unload your segments during
idleProc time.

Tom
--
   Tom Emerson                                    Technical Support
   Language Products Group                     Symantec Corporation
			Internet: tree@uvm.edu
Newsgroups: comp.sys.mac.programmer
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: Re: ThinkC on a PC?
Organization: Instructional Technology Laboratory, University of Michigan
Date: Tue, 6 Oct 1992 15:32:56 GMT

In article <1992Oct5.213845.21230@cybernet.cse.fau.edu> pollansw@cse.fau.edu (Warren Pollans) writes:
>I may have to do some C programming on a PC (A whizzed up 486 -
>whatever that means).  I'm used to ThinkC.  Is there an environment
>on the PC that has a similar feel?  This will be (should be)
>ordinary C programming - no machine dependent tricks (I hope).  Any
>recommendations for a C compiler/debugger/etc?

Borland C/C++ is pretty slick and has a project metaphor similar to THINK C.
It even gives the line count when compiling like THINK C does. I would
recommend this over Microsoft C. If you are writing for DOS, this package
ought to suit your needs pretty well, and it also has a Windows-hosted version
of the integrated environment.

If you are using standard C and not C++, don't bother with the application
frameworks version (which comes with class libraries for Windows and DOS).


-- 
"...remove protective cap. Hold atomizer with thumb at base and nozzle 
between first and second fingers. Without tilting head, insert nozzle into 
nostril. Fully depress rim with a firm, even stroke and sniff deeply."
-advice for presidential candidates from Paul Potts - potts@itl.itd.umich.edu
From: howes@cat15.cs.wisc.edu (Glenn Howes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MACSBUG Dcmd for "Shut Down"
Date: 28 Sep 92 22:22:20 GMT
Organization: University of Wisconsin, Madison -- Computer Sciences Dept.

In article <1992Sep28.201954.20830@mail.cornell.edu> Joel Sumner <js17@cornell.edu> writes:
>Has anyone written a "Shut Down" or "Power Off" DCMD for MacsBug?  I have
>a 
>powerbook 100 and the ONLY way to shut off the power is from the Finder 
>ShutDown command (there is this thing about not having a power switch or
>a power cord to unplug that causes problems... <grin>).  Occasionally,
>when I crash the thing, I  don't want to wait for it to do a full re-boot
>just to select "Shut Down".  Has anyone written a Macs Bug DCMD (or any
>other method from MacsBug) which will do the same thing?  Not even a full
>OS shutdown, just a "Power Off" would be nice....

It appears to me that pressing both the interupt and the reset buttons and
holding them simultaneously causes a shutdown. Can anybody confirm that
this will also cause the heads to park?



-- 
------------------------------------------------------------------
Glenn R. Howes              Internet: howes@bert.chem.wisc.edu
author: Kermit Tool GH      // Picard & Riker in '92 
------------------------------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: mspace@netcom.com (Brian Hall)
Subject: Re: ADSP CTB Tool
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Mon, 5 Oct 1992 18:57:44 GMT

cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes:
>That makes sense. I changed all my I/O to asynch calls and the thing works
>like a champ. 

Thanks for confiming that!  Now I'll have to do the same.

>I wish Apple would spend some summer hire's time and upgrade these tools.
>The serial tool doesn't work with ARA, ADSP is flakey, etc. Either that, or
>release the source as sample source code.

You and me both!  Now, to find a pressure point...
-- 

 \ | /   | Brian Hall                 mspace@netcom.com
 - : -   | Mark/Space Softworks       Applelink: markspace
  /|\    |                            America Online: MarkSpace
 |-+-|   |
/-\|/-\  | The tornado ate my powerbook.
Newsgroups: comp.sys.mac.programmer
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: cicn parsing anyone?
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 30 Sep 1992 23:59:35 GMT

I am looking for a routine (or routines) that will allow me to easily
access the different fields of a cicn resource read from disk. I am
most interested in accessing and changing the color table associated with
the cicn. I'm familiar with how to do this but was wondering if anyone
had any tried and tested code they might want to give away before I
venture off into writing my own from scratch.

Thanks in advance for any help you can lend.


-- 
-------------------------------------------------------------
joe zobkiw         zobkiw@world.std.com        aol: aflzobkiw

macintosh.midi.synthesis.c.oop.asm.communications.graphics...
Xref: sparky comp.sys.mac.programmer:16144 comp.sys.mac.databases:1193
From: Glen.Stewart@f175.n2240.z1.ieee.org (Glen Stewart)
Newsgroups: comp.sys.mac.programmer
Subject: RE: Vendors for Mac assemblers?  Which are decent?
Date: 6 Oct 92 01:18:11 GMT
Organization: FidoNet node 1:2240/175 - The Associati, Grand Blanc MI

How about this one?

Programming - #13, 139 files
============================

mcassembly 7.6.cpt  :   495k+:by Dave McWherter - an assembler, rsrc compiler,
                        linker, and job controller for the Macintosh. Includes
                        "local symbols", macros, source print formatting.
                        McAssembly also contains a built-in Resource Compiler
                        which can assemble resource definitions. Simple docs,
                        more upon registration. $50 ShareWare.


You can call this BBS at 313-695-6744 (HST) or 313-695-6955 (v.32bis)
Downloads available on first call.

--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 Glen Stewart - Internet: Glen.Stewart@f175.n2240.z1.ieee.org
Newsgroups: comp.sys.mac.programmer
From: karlberg@e.kth.se (KRILLE_KROKODIL)
Subject: Getting a dialog in front
Reply-To: karlberg@e.kth.se (KRILLE_KROKODIL)
Organization: KTH, Royal Institute of Technology, School of Electrical Engineering
Date: Thu, 1 Oct 1992 23:32:07 GMT

When I start a program I've written in Think Pascal it's supposed to
show a dialog before it enters the main loop. The wierd thing is that 
although I pass behind=POINTER(-1) when I call GetNewDialog it gets 
drawn behind all the other windows on the screen, as does the main 
window until I enter the main loop. Why is that and how do I get round
it?


Martin

-------------------------------------------------------------------------------
                                    If you have a living frog for breakfast,   
                                    nothing worse can happen during the day.
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Tabs in TextEdit
Date: 1 Oct 92 02:27:53 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <1992Sep29.212841.4778@amgen.com>, mikeb@sam.amgen.com (Michael
Brennan) wrote:
> 
> In article <Bv1EEu.Dw@news.cso.uiuc.edu> David M Marcovitz,
> dmmg1176@uxa.cso.uiuc.edu writes:
> >I have written a simple, editor as part of my application.
> > The problem is that I want to implement
> >TABS in a coherent way.  
> 
> There's a TCL class available at ftp.brown.edu (I forget the author's
> name) that replaces the CEditText class and supports tabs.  I haven't
> used it, but I've heard others speak highly of it.  It does NOT use
> TextEdit and is not limited to 32K or less as TextEdit is.

Unfortunatly, CPEditText also doesnt support styled TE, which this fellow
wants.  The athor of this lovely piece of code, Mr Wysocki, is unfortunatly
unable to spend the time right now to support the logical upgrade for
styled text with tabs.  Some day I may get around to it, but maybe one of
you-all will beat us to it???
--

Dana S Emery <de19@umail.umd.edu> | "Novo, de Novo,
                                  |     de novo, de no-o-o-o-o---, 
                                  | Novemba come an' dey gonna go home."
From: stever@netcom.com (Steve Riggins)
Newsgroups: comp.sys.mac.programmer
Subject: Re: What does DrawPicture() want?
Date: 27 Sep 92 16:48:28 GMT
Organization: Netcom - Online Communication Services (408 241-9760 guest)

In article <15669@borg.cs.unc.edu> lari@strauss.cs.unc.edu (Humayun Lari) writes:
>In article <1992Sep24.203552.3392@midway.uchicago.edu> ejw1@midway.uchicago.edu writes:
>[calling DrawPicture causes exception with memFullErr]
>
>I ran into a similar problem the other day, while implementing a
>CDiskPictFile class that would draw pictures directly from disk.
>
>Here's my analysis of what happened -- perhaps your situation is similar:
>1. DrawPicture asks for lots of memory (perhaps it wants to allocate a pixmap
>   as large as the picture).
>2. Since there isn't enough memory, the TCL's grow zone function is executed,
>   and tries to free memory (e.g. from the rainy day fund) in the hope that
>   that will satisfy the request.
>
>   That doesn't work. So, the grow zone function checks whether the allocation
>   is permitted to fail. Nope -- I haven't called SetAllocation(kAllocCanFail).
>   Since an unfulfilled memory request could cause crashes, it raises a
>   memFullErr exception.
>

What is your stack heap set to?  Is the TCL growing it?  I've had a
lot of problems with CopyBits (which DrawPicture may call) and solved
it
by lowering the AppleLimit and the beginning of execution, prior to my
MaxApplZone call.  By default, a non color QD machine allocates 8K of
RAM to the stack, and on a color QD Mac, you get 32K.  Copybits uses
the
stack, so often, 32K is not enough.  Try an addition 64K.

-- 
Steve Riggins                  Internet: stever@netcom.com
AppleLink:  Voyager.geek       AOL:      RigginsS
CompuServe: 75300,1635         "Can never have enough EMail addresses"
Newsgroups: comp.sys.mac.programmer,news.answers
From: eskin@btree.uucp (Michael Eskin)
Newsgroups: comp.sys.mac.programmer
Subject: Reading the backlight control???
Date: 6 Oct 92 22:54:03 GMT
Distribution: na
Organization: Brooktree Corporation

Is there a way to read the backlight control on a PowerBook 100 from
software? I am considering using the control along with the Option and
Command keys for misc system hacks...

-- 

Michael Eskin                                   Voice: (619) 535-3476
Brooktree Corporation                            UUCP: ...!ucsd!btree!eskin
9950 Barnes Canyon Rd                             CIS: 76376,541
Newsgroups: comp.sys.mac.programmer
From: moonshadow@cs.stanford.edu (Sean White)
Subject: Re: MacTCPCommonTypes & typedef unsigned char b_8.
Reply-To: moonshadow@cs.stanford.edu
Organization: Stanford University CSLI
Distribution: su
Date: Mon, 28 Sep 1992 18:47:15 GMT

In article <1992Sep28.161555.11063@waikato.ac.nz> ldo@waikato.ac.nz  
(Lawrence D'Oliveiro, Waikato University) writes:
> In article <Bv74rq.5EH@gate.demon.co.uk>, David Johnston  
<davidj@daveland.demon.co.uk> writes:
> 
> What this means is that you must be #including MacTCPCommonTypes.h
> more than once, either directly or indirectly. Now all you have to do
> is track it down...
> 
> Lawrence "This would never happen with Modula-2" D'Oliveiro
> Usenet DBcc specialist

Or use #pragma once at the top of MacTCPCommonTypes.h
--
Sean Michael White
moonshadow@cs.stanford.edu	"I'm bein' followed by a Moonshadow"
From: jeremyr@dcs.qmw.ac.uk (Jeremy Roussak)
Newsgroups: comp.sys.mac.programmer
Subject: Re: popup menus in non-system font
Date: 28 Sep 92 07:06:23 GMT
Organization: Computer Science Dept, QMW, University of London

In <Bv7MLy.EA5@news.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:

>In this discussion, people mentioned that if you do reset the Window
>Manager's port so that the text size is 0, you should return it to the
>(wrong) value that it was before, as evidently System 7.1 does. Can
>anyone out there think of reasons that this would be necessary? I
>would like to do this, but the code I am writing makes it pretty
>impossible to reset the port before each and every call to
>PopUpMenuSelect. What would I screw up by permanently changing it to
>0?

I started this thread, so I'll add my two-penn'orth.

The txSize field of the WMgrPort (and WMgrCPort, if you have
colour QD) should always (I think) be zero. Certain rogues,
notably Microsoft and Claris (who should know better :-)), set
it to the system font size in their custom MDEFs and don't
reset it.

It being good practice, you should probably restore any value
you ever change in a structure which doesn't belong to you.
However, I haven't done this in my INIT (Apollo) and I've been
unable to detect any adverse effects.

The answer to your question, though, depends on what you mean
by "permanently". Unless you can guarantee that no-one else
will change it to 12 (typically) during the execution of your
program, you can't change the value to 0 "permanently", since
(as I understand it) the WMgr(C)Port is a system-wide
structure, not one of the ones of which each app has its own
copy.

Why is it so difficult for you to change it before each call?
Can't you just write a sort of "glue"?

Jeremy
Newsgroups: comp.sys.mac.programmer
From: tree@kira.uvm.edu (Tom Emerson)
Subject: Re: ThinkC 5.0.3?
Organization: University of Vermont, EMBA Computer Facility
Date: Tue, 29 Sep 1992 14:13:09 GMT

In article <1992Sep28.210726.5923@cybernet.cse.fau.edu> pollansw@cse.fau.edu (Warren Pollans) writes:

   I've seen references to thinkC 5.0.3.  How is that different from
   5.0.2?  For that matter, how is 5.0.2 different from 5.0?

5.0.3 contains many bug fixes, particularly in relation to the Quadra. It also
contains a new debugger that is more stable on the 040 machines. Version 5.0.2
contains a set of bug fixes to major problems in the global optimizer, and
brought 5.0 to full Quadra compatibility. 5.0.2 also contained an upgrade of
the TCL.

Tom
--
   Tom Emerson                                    Technical Support
   Language Products Group                     Symantec Corporation
			Internet: tree@uvm.edu
From: S951516@UMSLVMA.UMSL.EDU (Radu)
Newsgroups: comp.sys.mac.programmer
Subject: Interfacing external devices.
Date: 30 Sep 92 15:04:56 GMT

From what I understand the serial port works on a set baud rate (which is set
by the driver when you initialize it).  This means that a external clock is
not alowed.  You can get around this by writing you own driver and initing the
SCC chip yourself to accept a external clock.  It takes a bit of looking into
technical manulas, but its worth it.  I have the Zilog manula for the SCC and
i haven't quite goeen the hang of how to set it but, but i'm learning.  A good
source of information is SDI(I think) it's a "make it yourlsef" sound digitizer
that comes with hardware diagram and source code.  Kinda usefu.

If you find anyting useful, please relate it to me, I'm definetly interested.

Radu
Newsgroups: comp.sys.mac.programmer
From: davids@engin.umich.edu (David Snearline)
Subject: Re: Vendors for Mac assemblers?  Which are decent?
Date: Sat, 03 Oct 92 06:51:16 EDT
Organization: University of Michigan Engineering, Ann Arbor

In article <1992Oct3.060439.11291@tamsun.tamu.edu> dlb5404@tamsun.tamu.edu (Daryl Biberdorf) writes:
>In the near future (right now!), I'll be doing a lot more 68k development
>work in assembly, not all of it for my Mac.  As a result of this, I'd
>like to get a 68k assembler for my PowerBook 100.
>
>So far I haven't been able to find many assemblers, and the ones I've
>found I've heard nothing about.
>
>Can anyone tell me what vendors offer assemblers for the Mac as well
>as approximate prices and whether the product is any good?  I'd
>really like to be able to single-step through the code and set breakpoints,
>if these are not common features.
>
>Thanks in advance for any advice.

For serious work with 68k assembler on the Mac, I would recommend Apple's
MPW assembler.  As is the usual recommendation for MPW, disk space and
memory are a must, although it is possible to strip MPW down to 2 megs
or so if you are only using the assembler.  In conjunction with MacsBug,
this should be everything you need.

For occasional assembler coding, the THINK C inline assembler is decent
if you don't need macro capabilities.  I like using the inline assembler
for routines within a larger THINK C or Pascal project.

-- 
David Snearline			CAEN Networking and Operations
davids@engin.umich.edu		University of Michigan Engineering
From: veloso@husc9.harvard.edu (Manuel Veloso)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help: Sample code wanted
Date: 26 Sep 92 16:13:25 GMT
Article-I.D.: husc3.1992Sep26.121326.15862
Distribution: world
Organization: Harvard University
X-UserAgent: Nuntius v1.1.1d11
X-XXMessage-ID: <A6EA050CF5011817@humcr3.harvard.edu>
X-XXDate: Sat, 26 Sep 92 17:16:12 GMT

In article <1992Sep25.114657.15843@husc3.harvard.edu> Manuel Veloso,
veloso@husc9.harvard.edu writes:
>Basically, this code is apple's installation code for their jGNEFilter...

Whoops! Sorry, but I forgot: the bsr myInstall has to be the myInstall in
the
new, allocated ptr so that, when you call shutdwninstall, the sdprocptr
points
to the proc in the ptr, not to some random hunk of memory where the init
resource
used to be.

Also, I haven't really tried this, but it seems that you could call a
detachresource
on yourself, so you wouldn't be purged out.

'luck,
Manuel
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.hardware
From: isr@rodan.acs.syr.edu (Michael S. Schechter - ISR group account)
Subject: Re: Do you know how to have both a network and a local printer?
Organization: Syracuse University
Date: Fri, 2 Oct 92 14:55:50 EDT

Ooops hit f not F, 

Tom, yes Liason will do that.. I use itto connect a remote site with
two Macs to atalk net. One of them has an ether card, and is
running Liason. it connects to the other via appletalk, and both of
them appear in their own little zone.
From: evans@natural.com (Christopher Evans)
Newsgroups: comp.sys.mac.programmer
Subject: Writing dcmds in MPW
Date: 1 Oct 92 20:43:31 GMT
Organization: Natural Intelligence, Inc.
X-Xxdate: Thu, 1 Oct 92 16: 44:43 GMT
X-Useragent: Nuntius v1.1.1d7

I am trying to write a dcmd in MPW or Think C and I am having a heck
of a time!  The dcmd uses some ANSI calls and a couple of toolbox calls.
The problem is that I can't link it in MPW.  The sample dcmd on the 
developer cd's links a file called "{CLibraries}CInterface.o which I don't
have.  Where is this file?  

Can I also be safe in assuming that I should not waste my time trying to 
write a dcmd in Think C?

<=================================Q=================================>
 Chris Evans                      |   Internet: evans@natural.com
 Senior Macintosh Programmer	  |   Phone: 617-876-4876
 Natural Intelligence, Inc.       |   FAX:   617-492-7425
 2067 Massachusetts Avenue        |   AppleLink: NATURAL
 Cambridge MA  02140              |   or evans@natural.com@internet#
From: ww10+@andrew.cmu.edu (William Conrad Wojciechowski)
Newsgroups: comp.sys.mac.programmer
Subject: WDEF's and QuickDraw globals
Date: 30 Sep 92 17:03:43 GMT
Organization: H&SS Dean's Office, Carnegie Mellon, Pittsburgh, PA

I was wondering if anybody has a reliable solution for accessing
QuickDraw globals in a WDEF.  Right now, I am creating patterns and
other needed globals on the fly.  This is a safe method but, I would
like to know if there is a safe way to directly access the QuickDraw
globals. 

Thanks in advance.

- Will
From: rmf@chopin.cs.columbia.edu (Robert M. Fuhrer)
Newsgroups: comp.sys.mac.programmer
Subject: Re: What does DrawPicture() want?
Date: 28 Sep 92 22:32:53 GMT
	<1r#pbzf.stever@netcom.com>
Organization: Computer Science Dept., Columbia Univ.

I am also being bitten by a Picture-related bug. I am attempting to associate a
PicHandle with a window so that future updates are handled automatically (as
per IM Vol 1, Window Mgr chapter). It seems to work for a stand-alone test
program, but in a more significant one, crashes at the call to SetWindowPic(),
even though the window displays the picture ok just before that. Any clues?

The simplified code looks like:

void Graph(WindowPtr macWin)
{
	PicHandle	pH;
	static Rect	bounds = { 50, -630, 450, -10 };
 
	KillPicture(GetWindowPic(macWin));

	SelectWindow(macWin);
	SetPort(macWin);

	pH = OpenPicture(&bounds);

	ShowPen();
	EraseRect(&bounds);

	/* ... calls to MoveTo(), Line(), etc. */

	ClosePicture();
	SetWindowPic(macWin, pH);
}
--

-- Bob
Newsgroups: comp.sys.mac.programmer
From: crod@cc.curtin.edu.au (Scott Kevill)
Subject: Re: putting the mouse in a cage?
Organization: Curtin University of Technology
Date: Fri, 2 Oct 1992 01:49:56 GMT

There used to be a lovely global variable called PinMouse (can't
remember the location offhand) that contained a rectangle that did
all this work for you. The other advantage was that it worked with
everything and wasn't just while a loop was executing.

This global variable worked fine until System 7 came along - it
has no effect and System 7 seems to continously reset this variable.
However this should work fine on any system before 7 although it
may not be of much use.

Hope this helps !

Scott

+-----------------------+--------------------------------------+
I Scott Kevill          I   "Be like me, be original"          I
I crod@cc.curtin.edu.au I                              -- Me   I
+-----------------------+--------------------------------------+
From: adolce@bbn.com (Anne Dolce)
Newsgroups: comp.sys.mac.programmer
Subject: PICT File Problem
Date: 5 Oct 1992 17:22:39 GMT
Organization: Bolt, Beranek & Newman, Inc.
Distribution: na
NNTP-Posting-Host: spcsun24.bbn.com

Hi,
 
   I am trying to save a Macintosh PixelPaint file as a PICT
   file and convert it to a different format using the Unix
   picttoppm utility.  However, I keep getting the error
   message:

     "picttoppm: pixel value greater than colour table size"

   The colour table size is 255.  Any ideas what might be causing 
   this error message or what I should be setting in PixelPaint 
   before I save the file?
    
   Thanks.  Please respond directly to me.

Anne
----
*        *                   *********************************
*        *                   *  Anne Dolce (adolce@bbn.com)  *
*        *                   *  BBN Software Products        *
******   ******   ******     *  150 Cambridge Park Dr 20/9C  *
*    *   *    *   *    *     *  Cambridge, MA  02140  USA    *
*    *   *    *   *    *     *  Phone:  617-873-2122         *
******   ******   *    *     *********************************