HDTenEightyP/NetNews huggingface dataset:
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Newsgroups: comp.sys.mac.programmer
Subject: C.S.M.P. Digest V1 #216 Available
Date: 22 Nov 92 12:22:35 GMT
Article-I.D.: cs.1992Nov22.122235.20434
Followup-To: poster
Organization: University of Oregon Computer and Information Sciences Dept.


C.S.M.P. Digest             Sun, 22 Nov 92       Volume 1 : Issue 216

Today's Topics:

	Suppl. Gestalt Selector List (Oct 21)
	Undoc. gestalt selector list
	Code-Resources
	'sysz' resource
	Problem w/ Sys7 Popup Menus
	Registering Gestalt Selectors
	RTF format?
	Changing open resource files



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

The digest is a collection of article threads from the internet newsgroup
comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
regularly and want an archive of the discussions.  If you don't know what a
newsgroup is, you probably don't have access to it.  Ask your systems
administrator(s) for details.  You can post articles to any newsgroup by
mailing your article to newsgroup@ucbvax.berkeley.edu.  So, to post an
article to comp.sys.mac.programmer, you mail it to
comp-sys-mac-programmer@ucbvax.berkeley.edu.  Note the '-' instead of '.'
in the newsgroup name.

Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject.  The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
cs.uoregon.edu).  Article threads are not added to the digest 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 digest).  Article threads that
consist of only one message are generally not included in the digest.

The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
[128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
file /pub/mac/csmp-digest/README before downloading any files.  The most
recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
archive has a mail server; send a message with the text '$MACarch help' (no
quotes) to LISTSERV@ricevm1.rice.edu for more information.

The digest is 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 issue as it is created.  Sorry, back issues
are not available through the mailing list.

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


-- 
_____________________________________________________________________________
Michael A. Kelly                                               Senior Partner
mkelly@cs.uoregon.edu                                      High Risk Ventures
_____________________________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: tom@dtint.uucp (Thomas R. Kimpton)
Subject: Re: Emacs-like editor for MPW 3.2
Organization: Digital Technology, International
Date: Wed, 18 Nov 92 00:58:23 GMT

In article <RMF.92Nov16201014@chopin.cs.columbia.edu> rmf@chopin.cs.columbia.edu (Robert M. Fuhrer) writes:
>You can bind keystrokes to commands in MPW 3.2. I've used it to give some
>Emacs-like aliases to MPW's editor (the arrow keys are in a very retarded
>configuration on the "Standard" ADB keyboard :-)). Of course, MNE (MPW's not
>Emacs), so you'll only be able to get very superficially similar behaviour.
>--
>
>-- Bob

In the latest Pre-release version of MPW Shell, SetKey (maybe
earlier versions also) allows you to bind commands (and
editor primitives) to not only key combinations, but key sequences,
here's an example from the notes:
	SetKey control-x-y 'Execute `Request "Enter a Command"`'

Typing control-X followed by a Y will now prompt the user for
a command, and then execute that command.

Editing primitives are things like:
"DeleteCharLeft DeleteStartOfFile MoveCharLeft SelectPageDown"

With this kind of functionality I don't suppose it will be long
until someone comes up with at least a minimal Emacs definitions
file.  But then I don't know much about Emacs...

Tom

-- 
---
Tom Kimpton                            tom@dtint.dtint.com
Digital Technology Int.                (801)226-2984	
500 W. 1200 South, Orem UT, 84057      FAX (801) 226-8438
From: cklarson@tomatillo.engr.ucdavis.edu (Christopher Klaus Larson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: best way to pause in app ?
Date: 23 Nov 92 19:05:59 GMT
Organization: College of Engineering - University of California - Davis

In article <brownlow.722219238@stmartin> brownlow@informix.com (Keith Brownlow) writes:
>Is there a toolbox command to make the application wait x number of seconds
>before continuing processing ?  I've tried looping for 1000's of seconds but
>without doing anything in the loop, it's more or less instantly coming back.
>
>Anyone got a simple solution that I've missed in my manuals ?
>-- 

Look into using the Delay() function. You need to specify the time to
delay in Ticks (approx. 1/60 sec) but this should be just what the
doctor ordered.

--Chris
cklarson@taco.engr.ucdavis.edu
Newsgroups: comp.sys.mac.programmer
From: mebhl@wombat.newcastle.edu.au (TUNRA Bulk Solids)
Subject: Ploting library
Organization: University of Newcastle, AUSTRALIA
Date: Fri, 20 Nov 1992 05:11:18 GMT

Has anyone used SUPERPLOT plotting library(as advertised in Mactutor)?
Would really like to talk to someone about this product or a similar
one.
Thanks,

Simon.
Newsgroups: comp.sys.mac.programmer
From: vosse@ruls41.LeidenUniv.nl (Theo Vosse)
Subject: CopyBits() difference on different machines?
Reply-To: vosse@ruls41.LeidenUniv.nl (Theo Vosse)
Organization: Rijksuniversiteit Leiden
Date: Mon, 23 Nov 92 15:35:38 GMT

Hi,

I have got the vague idea, that this is a FAQ, but I can't find
any hint, so here it comes:

I am writing a very simple music notation program, that uses off
screen drawing. It works fine on my LCII at home and on my (old
but trustworthy) Mac II at the office, but it won't run on a
PowerBook nor on a Classic. After some debugging I found that there
must be an even number of "rowBytes" in a BitMap when using any operation
on the PowerBook or the Classic.
Now the program runs, i.e. doesn't crash, on all machines, but on the
PowerBook and the Classic the window is filled with garbage, consisting
of repeated cells of about 8x8 pixels (as far as I can count), that change
at every CopyBits(). So, there must be something wrong with random pointers,
but the odd thing is, it looks perfectly normal on the Mac II!
Can anyone explain this, and tell me what I'm doing wrong?

	Theo Vosse
	----------
	Unit for Experimental Psychology
	University of Leiden
	The Netherlands
From: kevinc@scvme3.UUCP (Kevin Cutts)
Newsgroups: comp.sys.mac.programmer
Subject: Remembering file locations
Date: 18 Nov 92 19:37:50 GMT
Organization: Motorola Microcomputer, Schaumburg, IL

even after the program has been quit and restarted. I've used the 
System 7 Alias manager with great success. Now I have a user using 
sys6 who wants the same sort of capability...without the upgrade. 
What are the techniques used to handle this task. I don't want to 
reprogram the alias manager but would like to offer a very small
subset of its capabilities. Currently my program can locate a file 
on the same volume as my application but has trouble locating the 
file across volumes. Inside Mac expounds on all the methods that 
don't work but none that do!!!

tanx in advance,
kevinc
Newsgroups: comp.sys.mac.programmer
From: brunner@crchh447.bnr.ca (James Brunner)
Subject: Whip me, beat me, what to do with DISCIPLINE?
Reply-To: brunner@crchh447.bnr.ca (James Brunner)
Organization: Bell-Northern Research, Richardson, Tx
Date: Thu, 19 Nov 1992 01:13:29 GMT

Ahh, the title caught your eye!

I'm trying to get discipline to work.  I have figured out that macsbugs (which
I've used quite a bit) must be in the system folder.  I've put discipline in
the extensions folder.  And put the discipline startup file in the system
folder.

I've tried using the "lenient" settings file and the finder keeps trapping it!
(As soon as I turn it on with macsbugs DSCA ON).  (I'm glad I didn't try strict.)

How do you use this?  Is there a way that I can make it only trap on my
program?  Are there any real instructions?  If so, are they on line somewhere
where I can ftp them?

Help.  I got a strange bug and I'm hoping that this will help me to find it.
-- 
---------------------------------------------------------------------------
Jim Brunner - (brunner@bnr.ca)
All opinions are my own and have nothing whatsoever to do with BNR, NT,
NTI, Bell Canada, or any of the BCE corporations or affiliates.
From: wolfson@ll.mit.edu (Harry Wolfson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: SwapMMUMode() breaks INIT
Keywords: INIT, memory, OSUtils
Date: 23 Nov 92 03:23:34 GMT
Organization: MIT Lincoln Laboratory

Thanks for the info, Chris. I was afraid that it might be something
like that. Your suggestion for twiddling PRAM & warm-restart sounds
reasonable. I try and follow that path. Thanks!

 ...Harry...
wolfson@ll.mit.edu
Newsgroups: comp.sys.mac.programmer
From: ross@bnr.ca (Ross Brown)
Subject: Re: Determining modifier key status without an event record
Organization: Bell-Northern Research Ltd.
Date: Thu, 19 Nov 1992 16:03:24 GMT

In article <Bxy4IM.25J@news.udel.edu> kurisuto@chopin.udel.edu (Sean J. Crist)
writes:
>The orthodox method of determining the status of the modifier keys is
>by looking at an event record.  The modifier bits are even set correctly
>for null events, so within the event loop, it is always possible to
>determine the status of the modifier keys.
>
>However, I need to find the status of the modifier keys in contexts
>where no reliable event record is available.  Specifically:
>
>1.  I want to know what the status of the modifier keys at the earliest
>    possible moment when the application starts up.  I have an optional
>    short-cut which is invoked if the user holds down the command key
>    when starting the application.
>
>2.  I want to know what modifier keys are down when the user has selected
>    something from a menu.  The original mousedown event in the menu
>    bar is not a reliable source, because the user might have pressed
>    the mod keys after clicking the mouse and while viewing the menus.
>    (I have another shortcut which I want to invoke if the user holds
>    down certain modifier keys while making certain menu selections).
>
>Is there some way to find out the status of the mod keys in these contexts?
>If the answer is something really risky and unsupported, I'd be more
>inclined just to scrap these shortcuts, but I'd like to make them
>available if it's possible.

The _GetKeys trap works for me in such cases.  It's well documented.  I have
noticed that it (or the keyboard, maybe) wimps out when more than about 4 keys
are pressed at once - it doesn't sense them all.  But for modifier keys, it
should work fine.  Code snippet follows.

#define leftOptionKeyCode   0x3A    /* I don't think */
#define rightOptionKeyCode  0x3D    /* that these are */
#define commandKeyCode      0x37    /* defined anywhere. */

Boolean IsKeyDown( KeyMap keyMap, short keyCode )
{
    if( ( (char *) keyMap )[ keyCode >> 3 ] & ( 1 << ( keyCode & 0x7 ) ) )
        return true;
    else
        return false;
}

Boolean IsOptionKeyDown( void )
{
    KeyMap  keyMap;
    GetKeys( keyMap );
    return IsKeyDown( keyMap, leftOptionKeyCode ) || IsKeyDown( keyMap,
rightOptionKeyCode );
}

Boolean IsCommandKeyDown( void )
{
    KeyMap  keyMap;
    GetKeys( keyMap );
    return IsKeyDown( keyMap, commandKeyCode );
}

==============================================================================
Ross Brown, Dept. 7C22  < Bell-Northern Research     >  Just the facts, ma'am.
Advisor, Telemgmt Svcs  < P. O. Box 3511, Station C  >  We don't care whose
ross@bnr.ca             < Ottawa, ON, Canada K1Y 4H7 >  opinions yours aren't.
==============================================================================
From: siegel@world.std.com (Rich Siegel)
Subject: Re: Simulating odoc event from THINK Pascal?
Organization: GCC Technologies
Date: Sat, 21 Nov 1992 23:28:01 GMT

In article <goodill_eric-201192084213@ericg.cpd.tandem.com> goodill_eric@tandem.com (Eric Goodill) writes:
>
>Has anybody come up with a relatively easy way to simulate odoc events from
>within THINK Pascal so that I can use the source level debugger while
>debugging my Apple event handlers?  As it stands, I've just been using
>Macsbug which works just fine but is a bit tedious.

THINK Pascal will pass Apple Events on to the running program. The catch
is that since THINK Pascal suspends the running program when you switch
out, the Apple Event needs to come from another machine on the network,
a background daemon-like program that sends them once in a while, or
from the running program itself.

R.



-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Software Engineer & Toolsmith
GCC Technologies
Newsgroups: comp.sys.mac.programmer
From: joswig@informatik.uni-hamburg.de (Rainer Joswig)
Subject: Re: Emacs-like editor for MPW 3.2
Followup-To: comp.sys.mac.programmer
Organization: University of Hamburg, FRG
Date: Fri, 20 Nov 92 11:02:32 GMT

In article <BxtunG.IEy@umassd.edu>, mason@cis.umassd.edu (Mason L. Bliss)
wrote:
> 
> In <kf12clK00iUx06PFt_@andrew.cmu.edu> "Aaron J. Whitney" <NIKITA+@CMU.EDU> writes:
> 
> >I have become very accustomed to emacs and am looking for some way to
> >integrate an emacs-type editor with MPW 3.2  Is there any such product
> >on the market?  Has anyone come up with a comparable solution?  Mostly,
> >I am just looking for some way to bind keys and for a couple of
> >functions that emacs offers (ie. goto-line).  Currently I am using
> >QuickKeys to do some of this but it is certainly not a sufficient
> >solution.  Thanks.
> 
> You might want to check out Alpha, an emacs-inspired (I think) shareware
> text editor... It seems to have a lot of cool features.
> 
> I think it's available at a few ftp sites (If memory serves, I found it on

;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-) ;-)

Maybe you should use Macintosh Common Lisp 2.0 from
Apple. It has an emacs style editor written and programmable
in Common Lisp.



Rainer Joswig
Email: joswig@informatik.uni-hamburg.de
Newsgroups: comp.sys.mac.programmer
From: squeegee@world.std.com (Stephen C. Gilardi)
Subject: 64-bit multiply and divide on 68000
Summary: Need fast 64-bit math on 68000, like specialized 68020 instructions
Keywords: 68000 Assembler Math discrete
Organization: SQ Software via The World Public Access UNIX, Brookline, MA
Date: Sat, 21 Nov 1992 23:51:42 GMT

I need to calculate a linear interpolation rapidly.  The equation is

  y = x * numer / denom,

where y, numer, and denom are 32-bit unsigned longs and x is a 16-bit
unsigned short.

On the 68020, I can use the built-in "long" multiply and divide instructions.
However on the 68000 it's more involved.

I found 68000 code in a book to do the 64-bit unsigned multiply.  I'd
like to have the divide in assembly language as well.

Does anyone have such a routine, or a reference to where I can find one?

Thanks,
--Steve

Stephen C. Gilardi
SQ Software
squeegee@world.std.com

Newsgroups: comp.sys.mac.programmer
From: thomas@garnet.berkeley.edu (Mark)
Newsgroups: comp.sys.mac.programmer
Subject: Color TCL extensions???
Date: 22 Nov 1992 07:54:52 GMT
Organization: University of California, Berkeley
NNTP-Posting-Host: garnet.berkeley.edu

Has anyone written additional classes for TCL to allow for 32bit quickdraw
color?  

If there aren't packages of this sort for sale, has anyone tried making
enough modifications to TCL to allow for some level of color functionality?
If so, would you share your experiences with me?

-Mark Thomas
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.applications,comp.sys.mac.misc
From: siegel@world.std.com (Rich Siegel)
Subject: BBEdit 2.2 Ships!
Organization: GCC Technologies
Date: Thu, 19 Nov 1992 02:06:57 GMT


Contact:
	Rich Siegel
	1 Larkspur Way #4
	Natick, MA 01760
	Internet: siegel@world.std.com
	
November 18, 1992

NEW VERSION OF BBEDIT SHIPS
--- ------- -- ------ -----

BBEdit 2.2 is now available from an archive site, information
service, or BBS near you! BBEdit 2.2 includes the following new
functionality:

	- Support for the MPW ToolServer scripting back-end
	- Support for the MPW "411" Toolbox programming reference
	- Import and Export of popular word-processor formats via
	  the Claris XTND system
	- Built-in "Compare" for determining differences between files
	- Improved text-manipulation capabilities
	- Support for programmer-defined external code resources
	- Improved User Interface
	- Improved support for MPW Projector
	- Automatic translation of DOS and Unix-format text files
	- Various bug fixes and performance improvements
	
BBEdit will be available shortly from most popular Internet archive sites,
as well as CompuServe, America On-Line, and various BBSs. It
can also be obtained by writing directly to the author at the address
given above.

Full documentation is now included with the distribution package in
machine-readable form. Printed copies can be ordered.

To obtain BBEdit 2.2, download it from your favorite site, or send
an 800K floppy and self-addressed stamped disk mailer to the address
given above. Alternatively, simply send five dollars, and the disk
and mailer will be provided for you.
-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Software Engineer & Toolsmith
GCC Technologies
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Determining modifier key status without an event record
Date: 20 Nov 92 11:28:03 +1300
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Nov19.160324.14279@bmers95.bnr.ca>, ross@bnr.ca (Ross Brown) writes:
>
> The _GetKeys trap works for me in such cases.  It's well documented.  I have
> noticed that it (or the keyboard, maybe) wimps out when more than about 4 keys
> are pressed at once - it doesn't sense them all.  But for modifier keys, it
> should work fine.

Various bits of Mac hardware documentation say that the keyboard logic cannot
detect more than 2 non-modifier keys down at once. This seems to be true of
all the different Mac keyboards.

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
History's like a mole; it burrows away unnoticed.     -- Andrei Sakharov
From: jxs18@po.CWRU.Edu (Jerry Sy)
Newsgroups: comp.sys.mac.programmer
Subject: paramblock and fsspec
Date: 23 Nov 1992 14:38:48 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Reply-To: jxs18@po.CWRU.Edu (Jerry Sy)
NNTP-Posting-Host: hela.ins.cwru.edu


I am writing a c program and I am using snippets of code from various
sources.  One code uses paramblocks for filespec and another uses
fsspec.

when I assign  paramblock.ioparam.vrefnum = fsspec.vrefnum
               paramblock.ioparam.nameptr = fsspec.name
               paramblock.fileparam.dirID = fsspec.parID

and do a tool box function (such as delete file) that uses the paramblock
(hparamblock actually) parameter, I get a no such volume error.

Is my translation of fsspec into paramblock correct ?

jerry

Newsgroups: comp.sys.mac.programmer
From: jmunkki@vipunen.hut.fi (Juri Munkki)
Subject: Superfast Polyfill Animator!
Reply-To: jmunkki@vipunen.hut.fi (Juri Munkki)
Organization: Helsinki University of Technology
Date: Mon, 23 Nov 1992 01:16:46 GMT

Something clicked in my mind today when I was riding the subway. All
the parts of a superfast polygon animator routine that I've been thinking
of for years fell into place...

I just finished writing all the tough parts of the routine, so I know it
works. I'm not quite sure how fast it will be, but I would bet that it
will compete very well with programs like Spectre and Hellcats.

I'm not going to tell you how I'm doing it (at least not yet), but I'm
going to tell you what the routine can do:

	- Up to 32767 polygons, priority sorted.
	- Any screen resolution.
	- Any screen bit depth (1, 2, 4, 8, 16, 24).
	- Runs on 68000 (only B&W, of course).
	- Totally smooth screen update without double buffering.
	- Video card access to only those parts that need to be changed.
	- Easily supports region clipping, if you need it.
	- Can support stereo 3D, if your hardware has 2 video buffers.

It doesn't do 3D polygons, so you need to sort the polygons before you
give them to this routine. It probably could do 3D visibility stuff with
some overhead, but I think this will in most cases be faster to implement
outside the rendering routine.

I'm not sure what I'm going to do with this thing... I shouldn't have
been playing with graphics anyway, especially not this week.

I need some sleep...

-- 
  Juri Munkki					       Windsurf: fast sailing
 jmunkki@hut.fi					      Macintosh: fast software
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help! making an assembly routine faster
Date: 19 Nov 92 17:43:28 GMT
Organization: SRI International, Menlo Park, California

In article <1992Nov18.010815.6649@cs.uoregon.edu> mkelly@mystix.cs.uoregon.edu (Michael A. Kelly) writes:
>
>And once again, if anyone can improve on these routines, please tell me how!


If your going to be calling this function a lot (like in a tight loop
in a game to plot sprites) You can move the Swapmmumode code out of the
function and call before you make the call and restore it afterward.
That takes the two trap calls out of your fast code.

like:

swapmmumode(mode);

while plottingsprites
 QuickCopy(sprites[i++]);


swapmmumode(backtowhatiswas);

If you can find a way to precompute the addresses (like a table of row 
starting addresses) that might help. They mention stuff like this in one
of the develop articles.

Matt



-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________