HDTenEightyP/NetNews huggingface dataset:
From: dickie@schaefer.math.wisc.edu (Garth Dickie)
Newsgroups: comp.sys.mac.programmer
Subject: noticing whether a file is auto-compressed
Date: 15 Apr 92 15:33:31 GMT
Organization: Univ. of Wisconsin Dept. of Mathematics

A utility I have written processes IFF files which may not
have meaningful type/creator information.  They are brought
to the mac from an amiga by any number of means, and the
user may not have a chance to set the file type.

It is important that I be able to filter the StandardGetFile
file list.  At the moment, I blindly open each file which
has a non-empty data fork, and check the format.  This is
usually not unacceptably slow, because all of the relevant
format information is in the first sector of the files.

I want to avoid opening files in this way which have been
auto-compressed.  It seems that this would take a long time,
and not be worth the results.  Thus my question -- is there
any way, perhaps a gestalt selector installed by AutoDoubler
and similar utilities, perhaps a flag in the finder info,
for me to tell that a given file, directory, or disk has
been compressed?

Please respond via email.  I will summarize *and quote your
text, with name, unless asked not to* if I get any information.
Please avoid *posting* unless you have real information.

 -- garth

    dickie@math.wisc.edu
-- 

garth dickie -- dickie@math.wisc.edu -- math agnostic (and student)
From: Keith_Rollin@taligent.com (Keith Rollin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: PATCHING THE FINDER (?)
Date: 13 Apr 92 17:59:43 GMT
Organization: Taligent

In article <1992Apr12.075753.14311@ncsu.edu>, salaing@eos.ncsu.edu (Scott Laing)
writes:
> 
> Hello, I'm trying to modify an INIT I wrote sometime ago so it will patch 
> the Finder on start-up, rather than modify the shutdown queue.  All it has
> to do is change the routine when "Shutdown" is chosen so that a dialog (of 
> my own) is shown before ShutDwnPower is called.
> 
> Something that does this is Grouch.  It places a menu item to display an 
> about box in the Special menu.
> 
> Does anyone have any example code to do this?  Know where I can find some?

I don't have any sample code for you, but I do know that the Grouch patches
MenuSelect to do its stuff. To see how they did it, you can do the same thing I
did: I disassembled the Grouch INIT.

--
Keith Rollin
Phantom Programmer
Taligent, Inc.
From: meharp01@vlsi.louisville.edu (Michael Harpe)
Newsgroups: comp.sys.mac.programmer
Subject: Communications Toolbox? (Rookie)
Date: 10 Apr 92 17:02:19 GMT
Distribution: usa
Organization: University of Louisville

I have just FTP'ed the Communications Toolbox from ftp.apple.com.  Since i'm
new to Mac programming (as I demonstrated this week :-)), I really don't 
know where to start.....

I use THINK C 5.0.2.  I have found the libraries for CTB both with my THINK C
distribution and with the CTB stuff.  Do I just include that library in?	What about header files?  It appears that I just #include them as well.

I am going to purchase "Inside the Communications Toolbox" this weekend.  I
assume it will have descriptions of the routines.  That much I have gathered
from the net and poking around in my distribution.  I saw someone mention
that this was included with System 7, is this the case?  I'm running System
7.0.1 + TuneUp II.

On a related note.  I found the "Apple Modem Tool" on the wuarchive server.
What does this do for me?  The system tells me it "adds Communications 
features to my Macintosh" and invites me to put it in my System folder.
Why?

Please respond direct to me.  Thanks for the help in advance!

Mike Harpe
University of Louisville
Newsgroups: comp.sys.mac.programmer
From: jcav@quads.uchicago.edu (JohnC)
Subject: Re: (Q): How to count # of snd resources in one file?
Keywords: resources, snd
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things
Date: Wed, 15 Apr 1992 15:43:54 GMT

In article <1992Apr14.232050.28071@wpi.WPI.EDU> mithral@wpi.WPI.EDU (Bret Alvin Barker) writes:
>
>	I have a question as to how to count the number of resources of a
>single type in one resource file.  Inside Mac. gives the routine CountResources
>which counts the # of resources of a given type in ALL open rsrc files.
>	I need a similar routine that will count them for only one file, 
>namely the application's resource file.

First make sure that the file in question is the current resource file (with
_UseResFile if necessary), then call _Count1Resources to determine the
number of resources of the specified type.  _Count1Resources only looks in
the current resource file.  This and other so-called "one-deep" Resource
Manager functions are documented in IM-4.

-- 
John Cavallino                  |  EMail: jcav@midway.uchicago.edu
University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
B0 f++ c+ g+ k s++ e+ h- pv     |         Chicago, IL  60637
Newsgroups: comp.sys.mac.programmer
From: ednstras@kraken.itc.gu.edu.au (Michael Strasser)
Subject: MacApp TTEView selection problem
Keywords: MacApp 2.0.1, TTEView
Organization: ITC, Griffith University, Brisbane, Australia
Date: 13 Apr 92 00:43:53 GMT

I'm having a problem with setting the selection in a small TTEView
descendent in MacApp 2.0.1.

The aim of the excercise is to edit a number which appears as a cell in a
TTextGridView descendent.  The user selects a cell with the mouse and can
then edit its contents.  I keep the TTEView descendent with the grid view,
and resize and relocate it to the cell to be edited each time.

This code fragment shows some of what I do:

	{ Set the text to begin editing }
	SetText(valText);
	RecalcText;

	{ Select the whole text }
	IF Focus THEN  {Do I need to focus???}
		TESetSelect(0, fMaxChars, fHTE);

where fMaxChars has been initialised to 30: quite large enough for most
numbers.

The problem is that the selected text is not highlighted but behaves as if
it is.  In other words, the text (representation of a number) shows as black
on white (normal) with no cursor visible but any text I enter replaces the
existing text as if it were highlighted and a blinking cursor shows.  If I
try to change the initial selection with the mouse, the highlighting is
"confused" and shows the opposite of what it should.

If a change (a new number which replaces the old one) is undone, the original
text re-appears, selected and highlighted as it should be.

A complication which may be relevant is that the row containing the cell to 
be edited is highlighted as part of the cell-choosing process.  I erase the 
cell area (so it is white) before relocating the TTEView descendent in it.
I have found that erasing the cell (or not) makes no difference to the
outcome.  Might there be some interaction between the MacApp grid view
selection/highlight and the TextEdit one?

Have I missed something?  This code is a development from some written by
someone else some years ago to do the same thing (using MacApp 1.0, I
think).  His code works.

Also, can someone please answer the question contained in the code fragment
above.

Please reply by E-mail; I am going away at Easter for a month and will miss
any posted replies.

Thanks in advance,

-- 
Mike Strasser                       Internet: M.Strasser@edn.gu.edu.au.
Education Division                  Fidonet:  3:640/308.2@fidonet.org
Griffith University
Brisbane, Australia
Newsgroups: comp.sys.mac.programmer
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Subject: C.S.M.P. Digest v1 #42 Available
Organization: University of Oregon Computer and Information Sciences Dept.
Date: Tue, 7 Apr 1992 11:07:03 GMT


C.S.M.P. Digest             Tue, 07 Apr 92       Volume 1 : Issue 42

Today's Topics:

	Offscreen drawing
	Scrolling Windows in ThinkPascal
	Resorcerer vs. ResEdit
	How to Make Scrolling Lists in Dialogs
	Trouble with BitSET in THINK Pascal 4.0
	X-10 Homewire interface questions
	Shutdown Finder Event...
	Subclassing CPanorama - How to get scrollbars?


The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.

These digests are available (by using FTP, account anonymous, your email
address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
Questions list.

These digests are also available via email.  Just send a note saying that you
want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
automatically receive each new digest as it is created.

The articles in these digests are taken directly from comp.sys.mac.programmer.
They are not edited; all articles included in this digest are in their original
posted form.  The only articles that are -not- included in these digests are
those which didn't receive any replies (except those that give information
rather than ask a question).  All replies to each article are concatenated
onto the original article in the order in which they were received.  Article
threads are not added to the digests until the last article added to the
thread is at least one month old (this is to ensure that the thread is dead
before adding it to the digests).

Send administrative mail to mkelly@cs.uoregon.edu.

-- 
_____________________________________________________________________________
Michael A. Kelly                                         University of Oregon
mkelly@cs.uoregon.edu                             Computer Science Department
_____________________________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: Howard Moskovitz <howard@locus.com>
Subject: Need Disassembler
Organization: Locus Computing Corp.
X-Useragent: Nuntius v1.0
Date: Tue, 14 Apr 1992 21:33:43 GMT

Greetings,
	I'm sure that this is a FAQ, but, I would like to know what 
	disassemblers are available for the Mac. I specifically am looking for 
	one that can disassemble code resources. I would prefer one that is PD 
	or Shareware, but would also consider a reasonably priced commercial 
	package. If you know of PD or Shareware version please let me know where 
	I can download it from (or even better, maybe you can binhex it & mail 
	it to me). If is commercial, could you give me a price estimate.
	
	Please E-mail responses to me since I don't read this group regularly. 
	I'll post a summary of responses.
	
	Thanks in advance,
	Howard
+---------------------------------------+
| Howard Moskovitz | howard@locus.com   |
| Locus Computing  +--------------------+
| Inglewood, CA                         |
+---------------------------------------+
Newsgroups: comp.sys.mac.programmer
From: csk@po.CWRU.Edu (Carl S. Kashuk)
Subject: Desperately need info from Develop Magazine #9
Organization: Case Western Reserve University, Cleveland, Ohio, (USA)
Date: Fri, 10 Apr 92 13:32:01 GMT


Help! I posted awhile back about turning sound play-through on
a Classic II on and off. I was told that the info I needed 
was in Develop magazine. I contacted them, and was told I could 
have a trial copy of that issue; of course I never got it...
and it's getting to be too late to wait for them. Can anyone
help me, by emailing the code involved in turning sound 
play-through on and off, or even giving a high-level idea of
what they do? I'm desperate!
-Carl Kashuk (csk@po.cwru.edu)
-- 
"Incompetent? I don't know enough to be incompetent!"
				-Woody Allen, "Shadows and Fog"
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@byse.nada.kth.se (Jon W{tte)
Subject: Re: LISP and DrawString questions
Originator: d88-jwa@byse.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Tue, 7 Apr 1992 19:22:22 GMT


.edu> myers@wittenberg.edu writes:

   First:  I'm looking for a public domain version of LISP.  Does anybody
   know of one (if so, where can I get hold of it)?

There's a nice LISP called "SIOD" short for Scheme In One Defun. Check
for it with archie.

   Second: I want to draw white text on a black background and everything I
   display using DrawString just appears as black (which is no good since
   that is the same color as the background!).  I've tried changing the
   PenPat, but that doesn't work.

Text drawing uses CopyBits; you'd have to use a TextMode ( srcXor ) or
							   ^^^^^^
TextMode ( srcBic )
           ^^^^^^

I made an error... using patXxx where srcXxx is appropriate is a
good way of making things invisible on SEs and earlier machines.


-- 
h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
Newsgroups: comp.sys.mac.programmer
From: dstine@cisco.com (David S.A. Stine)
Subject: Re: MacTCP - UDPRead aligned?
Organization: cisco Systems, Menlo Park, California, USA
Date: Sun, 12 Apr 1992 06:14:45 GMT

In article <2452@wcc.oz.au> tom@wcc.oz.au (Tom Evans) writes:
>In article <1992Apr6.145921.26924@ux1.cso.uiuc.edu>, dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
>> resnick@cogsci.uiuc.edu (Pete Resnick) writes:
>> Why not just use BlockMove?
>
>Even something as trivially simple as:
>
>	char *p, *q;
>	while (n--) 
>		*(q++) = *(p++);
>
>is faster than BlockMove for n < 50 - even as a subroutine!

Yes. A friend did a study of this and came up with a break-even point of about
32 to 34 bytes for a byte-copy loop, about 50 bytes for an unrolled byte-copy
loop. And by grabbing the address of BlockMove (to avoid trap dispatch
overhead) things got faster still.

>Therefore checking for word-alignment and doing long-copies in a
>subroutine is going to be faster for n < 200 or so. Using proper
>unrolled assembly code is always going to be faster (because that's
>what BlockMove() is probably doing).

BlockMove does something very close to this. Break out MacNosy to see for
yourself.

dsa
From: pdt@unix.brighton.ac.uk (taylor)
Newsgroups: comp.sys.mac.programmer
Subject: Problems with ResEdit2.1
Date: 13 Apr 92 08:40:38 GMT
Organization: Brighton Polytechnic, UK

I have ResEdit 2.1 which seems to work fine except when I try to change the
name or ID of a resource. Attempting to do this results in the machine
locking up. I am using system 7.0 - does anyone else have this problem or
have I got a duff version? Help!

Paul Taylor
Brighton Polytechnic
England
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Why does my gTopHandler get trashed?  (TCL)
Organization: Kalamazoo College
Date: Wed, 15 Apr 1992 21:14:49 GMT

A puzzler, if you will.

Every once in a while, when I quit my application, it dies in the
Success() call in some CATCH macro, usually CApplication:Run().  The
global that keeps track of the latest exception handler, gTopHandler,
contains garbage.

I would think this would happen if I did something horrible like leave
off a CATCH macro and somehow make it compile.  But I double-checked all
the code that I think is relevant, and didn't find anything.  It doesn't
seem to be a randomly stray pointer, though I think I have one or two of
those still, because gTopHandler seems to be the only variable affected.

It's not reproducing itself at present, so I'm loathe to go stepping
through code.  But I'll have to...if one of you kind netters can't give
me a hint first...
-- 
 Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
 Youth culture killed my dog...
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: What is an 'scod' resource?
Date: 9 Apr 92 20:01:15 GMT
Organization: Apple Computer, Inc.

In article <92087.232510CHARLESW@QUCDN.QueensU.CA>, CHARLESW@QUCDN.QueensU.CA writes:
> 
> 
>   Can someone point me to information on what an 'scod' resource is?
> (I'm getting locked up there in a "very large" loop waiting for something.)
> 
>   Thanks,
> 
> ..../dave   Dave Charlesworth

It's one of the Process Manager's code segements.  The Process Manager is
actually an application.  It has all of the normal things a standard app
would have including the code segments, a jump table, QuickDraw globals,
A5 globals, etc.  All of the code segments have been given a special type,
'scod'.  You'll even notice patches to GetResource that will replace 'CODE'
with 'scod' to allow the LoadSeg trap to work with the Process Manager's code.

Jim
Newsgroups: comp.sys.mac.programmer
From: bitting-douglas@CS.YALE.EDU (Douglas Bitting)
Subject: Print Driver Q...
Organization: You gotta be kidding me!
Distribution: comp
Date: Mon, 13 Apr 1992 15:56:11 GMT


Hi.  I was wondering if there is a way to do the following:

- spool a file from System 6 to a print-server.
- convert spooled file from System 6 driver format to System 7 driver
  format
- print converted file to printer that has been initialized w/ Sys7
  drivers

Basically, I am wondering how to go about converting from Sys6 format to
Sys7 format.  Is this possible?

Thanks,
--Doug

--
 ...Doug Bitting... || "But the wisdom that comes from heaven is first
                    ||  of all pure; then peace loving, considerate,
bitting@cs.yale.edu ||  submissive, full of mercy, and good fruit,
doug@yalevm.bitnet  ||  impartial and sincere."  -- James 3:17
-- 
--
You don't have to think too hard when you talk to teachers.
   -- J. D. Salinger
From: rgg@manutius.UUCP (Rick Gordon)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Network copy protection problems
Date: 14 Apr 92 00:09:41 GMT
Reply-To: rgg@manutius (Rick Gordon)
Organization: Aldus Corporation, Seattle WA


regarding "pinging" every node periodically: this has a couple of faults.
first it generates a lot of extra traffic, AT is bad enough with broadcasts
why make it worse?
second it's non-deterministic: network loads can vary significantly depending
upon hops through routers. what you might this is a failed name is not.
of course, even if you detect the name doesn't answer, you cannot remove the
name from that nodes name table so now you have to keep a list of those nodes
that contain bogus names. 

what i would suggest if NBP Register detects a match is doing an NBP Query
and testing the node id against the local host. (You should be doing this
anyway in case the user has SetSelfSend turned on.) If you detect this 
situation at startup, you know it's because the name didn't properly get
removed the last time, in which case you should probably advise the user
to reboot. (Because NBP still has that block of memory - or thinks it does -
containing the name that was originally registered. And who knows what's 
happened between the time your application crashed and the time it was
relaunched!)

rick_gordon@aldus.com
Newsgroups: comp.sys.mac.programmer
From: jpurlia@qualcomm.com (John Purlia)
Subject: Stylized buttons?
Organization: Qualcomm Incorporated
Date: Thu, 16 Apr 1992 21:09:25 GMT

I seem to remember reading an article a ways back about displaying stylized
text within dialog buttons?  Does anyone recall how this is done?  I would
like to display one button in my dialog which possesses a style different
from all other buttons.

Thanks!

..........................................................................
John Purlia          : My brain; not my company's brain.  My brain says...
jpurlia@qualcomm.com :      "Just about any movie could be made better
AOL:  <Jpurlia>      :       if one of the characters were a vampire."
..........................................................................
From: day@william.vancouver.wsu.edu (Steve Day)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Too many files open?
Keywords: Mac,error,file manager is a joy
Date: 15 Apr 92 04:16:12 GMT
Article-I.D.: clark.1992Apr15.041612.7835
Organization: Washington State University, Vancouver Campus

In article <1992Apr14.185231.19216@ux1.cso.uiuc.edu> bts39313@uxa.cso.uiuc.edu (Benjamin T Sander) writes:
>Anybody know what could cause an error -42, too many files open?
>Specifically, what expendable resource does my mac exhaust when
>it opens a file?  Where can I get more?
>
>(The error occurs after several calls to _OpenResFile on various
>resource files which are all located on an Appleshare volume. I don't
>know if this is relevant or not.)
>
On startup the system allocates a (limited, fixed) number of FCBs (File
Control Blocks).  The number to be allocated is stored in the boot blocks
of the startup drive and once they are set up the system can't create more
as they are needed :-(  These blocks are also shared among all programs 
including the system and finder and an application also counts as a file.
I'm not sure if opening a resource fork and a data fork on the same file is
considered one or two files (Anyone have an answer to that?).

-- 

Steve Day
N7VHY
From: vg07+@andrew.cmu.edu (Vivek Gupta)
Newsgroups: comp.sys.mac.programmer
Subject: Saving Images in a Window
Date: 14 Apr 92 14:43:15 GMT
Organization: Senior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA

Hi,

I'm new to programming on the mac and have finally gotten it do to
drawings to a window on the screen.  What I wanted to find out was what
the best way was to take that image and either put it into a pict file
or directly to the clipboard, either way is fine.  If somebody has some
code or any info on how to do this, I'd appreciate it.

Thanx,
Vivek
From: jcav@quads.uchicago.edu (JohnC)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Writing apps that use plug-ins?
Date: 9 Apr 92 20:11:31 GMT
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things

In article <BMG2AE.273@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
><< If I recall correctly, THINK C (or Pascal or both) will, as an
>optimization, not include methods in an object that are not called when it
>does a smart link, therfore your methods won't exist if you don't use them
>from inside the application. >>
>
>I think you're wrong. I've alwasy understoodthat THINK C's Smart Link is 
>on a FILE BY FILE and NOT a ROUTINE BY ROUTINE "smartness."

I know for certain that THINK Pascal 3.0 or newer does smart linking on a
routine-by-routine basis, and I would suspect recent versions of THINK C
would work in a similar fashion.


-- 
John Cavallino                  |  EMail: jcav@midway.uchicago.edu
University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
B0 f++ c+ g+ k s++ e+ h- pv     |         Chicago, IL  60637
From: ksand@apple.com (Kent Sandvik)
Newsgroups: comp.sys.mac.programmer
Subject: Re: discipline
Date: 10 Apr 92 01:37:09 GMT
Organization: MacDTS Mongols

In article <5242@pdxgate.UUCP>, howard@rigel.cs.pdx.edu (howard l. berkey)
writes:
 
> Hi!
> 	What exactly does discipline do for macsbug and where can I get info
> on it?

It's an Apple provided tool which checks parameters sent in and out from
traps, kicking and screaming if they are the wrong ones. It's available
on the ETO CDs and I think it's a product from APDA, but I'm not 100% sure.

Cheers,
Kent Sandvik
Dynamic Language, eh, Dynamic Language Maniac


> I can't think of anything more politically correct than assasination...:)

What about castration?
Organization: Carnegie Mellon, Pittsburgh, PA