HDTenEightyP/NetNews huggingface dataset:
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How to store file references/names ?
Date: 16 Nov 92 23:24:16 GMT
Organization: SRI International, Menlo Park, California

In article <1992Nov15.172919.10970@netcom.com> leonardr@netcom.com (Leonard Rosenthol) writes:

>	If you are a System 7 only product, then the best way would be to
>create an alias to the file (via NewAlias) and then store the aliasHandle
>in your prefs file.  If not, or if you will be working on both 6 & 7, then
>you need to create a new data structure which will store a volume NAME (
>volume reference numbers (vRefNums) are not valid across boots), a directory
>ID (dirID) and a file name.  With that information you can get back to those
>files.

DirID aren't that great either as I found out after I had to restore
a disk from a backup. :-( The dirID's all changed of course. I guess you need
a full pathname AND the volname,dirid,filname triplet to really be safe.
And anyone that looked into a alias can tell you that it does contain
the full path name. Damn you Apple! :-) (Do what I say not as I do. For years 
Apple has been bellowing: "don't use full pathnames" What did they end up 
using for aliases?)


Matt
-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: rmf@chopin.cs.columbia.edu (Robert M. Fuhrer)
Subject: Re: Emacs-like editor for MPW 3.2
Organization: Computer Science Dept., Columbia Univ.
Date: Tue, 17 Nov 1992 01:10:14 GMT

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
Newsgroups: comp.sys.mac.programmer
From: wolfson@ll.mit.edu (Harry Wolfson)
Subject: SwapMMUMode() breaks INIT
Summary: why can't INIT change to 32bit on bootup
Keywords: INIT, memory, OSUtils
Organization: MIT Lincoln Laboratory
Date: Sat, 21 Nov 92 14:59:38 GMT

I am trying to write a pair of short INIT's that will
set the memory addressing mode to 24 or 32 bits on
startup. 

(The 24 bit INIT is for my Sys6 folder
& the 32 bit INIT is for my Sys7 folder. That way
I would save myself an extra few steps while switching
systems and always retain 32 bit mode in sys7.) 

My code is very short and straight forward and *very*
ineffective. I fix the pc as instructed in Tech note
#228. Then call SwapMMUMode( &mode), with mode = 1 
or 0 (32 or 24 bit respectively). And that's all.

I am testing the INIT on a IIci, Sys7.0.1, tuna 1.1.1
and *all* extensions, etc. (other than Macsbug) turned
off by Extensions Mngr. The compilied code looks likes 
its doing what its supposed to, but running the 24bit
INIT (with 32bit mode set manually on the previous boot)
looks like its going to change the mode - but never really
does. Running the 32bit INIT (with 24bit mode previously set)
actually *does* change the mode, and succesfully exits the 
INIT but causes a crash somewhere downstream during the
startup sequence (crashes while trying to read from A6,
which is something like 0x60341234).

Is it impossible to set the mode during startup? Why?
Or is my code doing something silly? Thanks for any help.

Harry Wolfson
wolfson@ll.mit.edu

=== code follows ===

// MMU32.c

#include <OSUtils.h>

pascal void FixPC( void);		// proto for MacsBug

// from Tech note #228
pascal void FixPC( void)
= {	0x41FA, 0x000A,		/* LEA	*+$000C,A0	*/
	0x2008,			/* MOVE.L A0,D0		*/
	0xA055,			/* _StripAddress	*/
	0x2040,			/* MOVEA.L D0,A0	*/
	0x4ED0};		/* JMP	(A0) ;jmps to next instr*/

main() {	
	char	mode = 1;
		
	FixPC();
	SwapMMUMode ( &mode );
}
From: cardinal@informix.com (Edward Cardinal)
Newsgroups: comp.sys.mac.programmer
Subject: CURSES lib for Mac (Think C)?
Date: 17 Nov 92 01:44:18 GMT
Organization: Informix Software, Inc.

Does anyone know if there is a library of routines to handle "curses" calls
in UNIX programs? I have a few simple utilities, etc., that I would like to
run on my Mac, without all the hassle of doing the port (at least, not just
yet). I know I can use cconsole to handle stdio stuff in Think C, but as
far as I can tell, the console is pretty poor at pseudo full screening. I
know there are DOS libs out there, but is there anything for a Mac?
-- 
[ Ed Cardinal                   An English major from Berkeley  ]
[                               Who sold out to programming     ]
[ cardinal@informix.com         Because it pays more.           ]
[          DISCLAIMER: My Opinions. MINE! MINE! MINE!           ]
Newsgroups: comp.sys.mac.programmer
From: hshubs@cis.umassd.edu (Howard S Shubs)
Subject: Re: Think Reference - feedback wanted
Organization: University of Massachusetts Dartmouth
Date: Fri, 20 Nov 1992 17:53:58 GMT

In <zkessin.722227064@chaos.cs.brandeis.edu> zkessin@chaos.cs.brandeis.edu (Zach, the Lego Maniac) writes:

>rgoldstone@OAVAX.CSUCHICO.EDU (Robin, Girl Wonder) writes:

>>My sister is a product manager at Symantec and she is looking for feedback
>feedback ok: :-)


[electronic diagram deleted]

Nononono....  The lord intended feedback to be equal to BackProp:



   +--------<-----------<----+
   |                         |
   |     +-------------+     |
   |     |             |     |
i1-+--w1-+             |     ^
         |             |     |
i2----w2-+   sgn(x)    +-----+-------- O
         |             |
i3----w3-+             |
         |             |
         +-------------+

Newsgroups: comp.sys.mac.programmer
From: bcaesar@comanche.ess.harris.com (Bob Caesar)
Subject: unsit -> AppleDouble
Date: Thu, 19 Nov 1992 22:58:47 GMT
Reply-To: bcaesar@comanche.ess.harris.com
Organization: Harris Corporation, Government Aerospace Systems Division
Keywords: Sun, mcvert, stuffit

I've modified a copy of unsit (unstuffit for Sun) so that is creates an
AppleDouble format files (i.e. "%file" has header/finder/rsrc, "file" has
data fork).  I use it along with mcvert to translate .hqx files on the
Sun.  Let me know if you'd like a copy.

Bob
---
Robert J. Caesar Jr.
<bcaesar@comanche.ess.harris.com>        VLSI Technology, Inc.
PHONE: (407) 727-6398   [727-NEXT]       2200 Park Central North, Suite 600
PHONE: (305) 971-0404                    Pompano Beach, Florida  33064
From: stepan@natinst.com (Stepan Riha)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Hilite a Rect
Date: 17 Nov 1992 08:30:44 -0600
Organization: National Instruments, Austin, TX
NNTP-Posting-Host: falcon.natinst.com
Keywords: color, hilite, novice

In article <1e9v71INNgqn@agate.berkeley.edu> bfoley@obelisk.berkeley.edu (Brian Foley) writes:
>How do you hilite a rect using the current hilite color?
>I am using InvertRect() now, but it would be "better" to do it
>in color.  Inside Mac is rather vague on the subject I tried using 
>
>BitClr ((Ptr) HiliteMode, pHiliteBit);  /* IM V-61 */
>
>but that gave me a bus error.

I never use the BitClr function (for byte to long sized variables) because
you get the extra trap dispatch overhead.  The way I code my highlights is:

	*(char*)HiliteMode &= ~(0x01<<hiliteBit);

Note that <Quickdraw.h> defines pHiliteBit = 7 and hiliteBit = 0, that's
because BitClr(ptr, bitNr) counts the high order bit of *ptr as bit 0.
IM I p.470-471.

However, I don't know why your code using BitClr should cause a buss error.

	- Stepan
-- 
   Stepan Riha -- stepan@natinst.com
From: coconut@crash.cts.com (Brian Dear)
Newsgroups: comp.sys.mac.programmer
Subject: GIF source for Think C
Keywords: gif think c cource
Date: 15 Nov 92 22:19:45 GMT
Article-I.D.: crash.1992Nov15.141946.16845
Reply-To: brian@coconut.com
Organization: Coconut Computing, Inc., La Jolla, California


I am looking for Think C source code that supports 
decoding and displaying GIF images for a Macintosh. 
Commercial, shareware, freeware, whatever.  I'm willing
to pay for a commercial library.  There are plenty of
then in the PC toolkit market -- there's just got to
be something out there in the Macintosh world!  Sure
hope so at least.

Any suggestions/help will be greatly appreciated!

Brian Dear --- Coconut Computing, Inc. --- brian@coconut.com
Newsgroups: comp.sys.mac.programmer
From: danw@uh.msc.edu (Dan Waylonis)
Subject: A:  Re: Q: ThinkC5.0.3 and Apple Sys7.1 Incompatibility? (Nope!)
Organization: Minnesota Supercomputer Ctr.
Distribution: no
Date: Fri, 20 Nov 1992 00:28:26 GMT

In article <pchang.721942290@Xenon.Stanford.EDU> pchang@Xenon.Stanford.EDU (The Weasel) writes:
>Hi There,
>
>I have not had any problems with 7.1 and Think C. I think I am
>running 5.0.3, but since I'm at school I don't know for sure.

	Well, as it turns out, the culprit was the "Word Wrap Patch"
	that I had installed.

	Removing it gave me a happy Mac!  :-)

	Thanks for the reply.

Dan
-- 
|Dan Waylonis | Home |||||||||||||||||||||| Minn. Supercomputer Ctr, Inc.|
|Graphics and | 5707 Highway 7, #425 |||||| 1200 Washington Ave South ||||
|Visualization| St Louis Pk MN 55416-5204 | Minneapolis MN 55415 |||||||||
||||||||||||||| (612) 922-1145 |||||||||||| (612) 626-0340 |||||||||||||||
Newsgroups: comp.sys.mac.programmer
From: mm@lehre9.informatik.Uni-Bremen.DE (Markus Kommant und Michael Schmidt)
Subject: Which SCC in Macs
Keywords: Z85C30?, SCC, Zilog
Reply-To: g16m@alf.zfn.uni-bremen.de
Organization: Universitaet Bremen
Date: Thu, 19 Nov 1992 16:56:47 GMT

Hi, 

so, two tries to get some Information on Interrupt and SCC programming on the Mac, but
no response. :-(

Maybe at least somebody knows if the SCC from Zilog is the Z85C30 and how and where
the registers are mapped into the memory. Probably that stuff is described in 
"The Macintosh Family Hardware Manual" or the Mac SE Deveoper Notes, but I couldn't
get my hands on that stuff yet. If anybody knows a site where to ftp anything like that ...
I'd be very thankful.

G'Day Mick
Newsgroups: comp.sys.mac.programmer
From: Jim Cook <J.Cook@ENS.Prime.COM>
Subject: Re: Invalidating the Entire Screen?
Reply-To: <J.Cook@ENS.Prime.COM>
Organization: Prime Computer, Inc.
Date: Fri, 20 Nov 1992 21:44:47 GMT

In article <9211191547.aa28279@Paris.ics.uci.edu> kanderso@mabillon.ICS.UCI.EDU
(Kenneth Anderson) writes:
>In comp.sys.mac.programmer you write:
>
>>Is there an easy one call should do it all?
>
>Here is code that I saved, because it is the only code to date that
>Ben Haller has posted to the net.  I believe it does what
>you need...
>
>>void InvalScreen()
>>{
>>        DrawMenuBar();
>>        PaintOne(0L,GrayRgn);
>>        PaintBehind(WindowList,GrayRgn);
>>}
>
>After posting this code, Ben stated:
>
>>I believe this is the only code I have ever posted that is copied
>>directly from Solarian II, so all you people who have been slavering
>>over the (imagined) prospect of getting Sol source out of my tight
>>little fists, rejoice!

This worked, though it took me a couple hours to debug (call me slow).
The problem is that most people will probably execute this code and leave,
therefore avoiding any problems.  

The problems one should be aware of are:

1. DrawMenuBar should not be called with anything in the menu bar hilited.
   IM Vol 1 warns about this.

2. Both PaintOne and PaintBehind muck with the current value of qd.thePort.
   Therefore, do a GetGWorld at the beginning of this call and a SetGWorld
   after each of the calls (well, you probably could just do one set at the
   end, but I was frustrated and ultimately played it safe).

Thanks to all!
The net comes thru again!

Jim
From: opstad@Apple.COM (David Opstad)
Newsgroups: comp.sys.mac.programmer
Subject: Re: The Forgetful Finder
Date: 22 Nov 92 22:40:15 GMT
Organization: Apple Computer Inc, Cupertino, CA

In article <jpugh-201192220322@kip2-36.apple.com> jpugh@apple.com (Jon Pugh) writes:
>In article <D2150035.ilna6e@outpost.SF-Bay.org>, peirce@outpost.SF-Bay.org
>(Michael Peirce) wrote:
>> 
>> Why would they be adding QuickDraw GX to the Finder?  To the system,
>> yes; to the Finder, I doubt there is any reason to do this.
>
>I believe it's some of the printing stuff, but I don't really know.  I was
>just throwing everything into the bucket.  ;)
>
>Jon

Actually, aside from desktop printing, there are other parts of GX that
interact with the user at the Finder level. "Get Info", for instance, when
applied to a new GX font, will give a lot more information than the old
"Get Info" would--things like which layout features are present, and so on.

Dave Opstad
GX Engineer and Line Layout Weenie
Newsgroups: comp.sys.mac.programmer
From: ivanski@world.std.com (Ivan M CaveroBelaunde)
Subject: Re: Remembering file locations
Organization: The World Public Access UNIX, Brookline, MA
Date: Fri, 20 Nov 1992 06:15:50 GMT

absurd@apple.apple.com (Tim Dierks, software saboteur) writes:

>In article <1278@scvme3.UUCP>, kevinc@scvme3.UUCP (Kevin Cutts) wrote:
>> 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!!!

>Remember:
>  1) The file's name
>  2) The directory ID of the file's parent directory
>  3) The name of the volume the file is on

This will work. Alternately, you *can* have the Alias Manager (albeit a
somewhat crippled version of it, because of lack of file IDs) under System 6.
It's hidden in the QuickTime INIT.

The nice thing about it is that it keeps your code all the same (no special
casing). It might even set the corresponding Gestalt stuff (although I'm
not positive about this).

The drawback is, of course, that QT only runs on 020+ Macs, and that it's
a little overkill to install QT just to get the Alias Manager. But that's
a decision you need to make yourself as a system designer. The Sys 6 Alias
Manager is basically what Tim described above + an interface to allow
the user to refind the files, but that's about it.  Then again, that's code
that you don't have to write yourself...

It might even be possible for brave souls out there to rip out the
appropriate resources from the QuickTime INIT and make them into a smaller
INIT that would even work on 020 machines. It's probably not
distributable, but this sounded like an in-house app, so it probably
is legal. You probably need to dig in a QT build with named resources (I
think the one in the 1.0 alpha CD and/or beta CD have them) in order to
figure out which code resource does what...

Or you could just use filespecs + a volume name like Tim said.

-Ivan
-----
Ivan Cavero Belaunde
DiVA Corporation
From: eriks@lin.foa.se (Erik Svensson FOA2)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Who makes Ada compilers?
Date: 16 Nov 92 15:19:44 GMT
Organization: FOA, Linkoping, Sweden

t33853s@saha.hut.fi (Esa Eero Eklund) writes:

>  I know who makes them, Telesoft and Meridian make compilers for MPW and
>Alsys for A/UX. Do you know others?

TeleSOft no longer makes Ada compilers for the mac. Why, I don't know.
Meridians numbers are (according to the manual)

tel: (714) 727-0700
fax: (714) 727-3583

e-mail tech support: support@meridian.com

--
Erik Svensson			Research Officer
Guided Weapons Division		National Defense Research Establishment (FOA)
Stockholm			Sweden

net.address: 	eriks@fenix.lin.foa.se

"Another casualty of applied meta-physics!" -- Hobbes
Newsgroups: comp.sys.mac.programmer
From: nagle@netcom.com (John Nagle)
Subject: Re: Whip me, beat me, what to do with DISCIPLINE?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Mon, 23 Nov 1992 20:56:48 GMT

creiman@netcom.com writes:
>You've already screwed up by assuming Disipline is worth using. In all my
>days, the only thing Disipline has taught me is that the Finder is using
>SetRect wrong. 

      Yes, the Finder people really should fix that.  Or is there some
secret thing you can get the Window Manager to do with vacuous rectangles?

						John Nagle
Newsgroups: comp.sys.mac.programmer
From: friedman@netcom.com (Greg Friedman)
Subject: Determining dir type
Keywords: help directory floppy hd ashare
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Sun, 22 Nov 1992 21:04:51 GMT

Given a dirID and a vReNum, I need to determine the type of
volume I am looking at.  Specifically, I need to determine
if a directory is on, or is the rootDir, of the following:

Hard disk
floppy
other removeables
AppleShare server
mounted appleshare folder
shared appleshare folder

Any help is appreciated.  I can make an educated guess at whether
the volume is a floppy or hd based on vol size, but what about
the appleshare directories?  Any suggestions on the type of
logic I should use to determine floppy vs. hd?

E-mail answers preferred.

Thanks in advance!

Greg Friedman
-- 


--------------------------------------------------------------------------------
Greg Friedman                              "He who has a why to live for
                                            can bear almost any how."
voice: (408) 475-2606                               - Nietzsche
internet: friedman@netcom.com
--------------------------------------------------------------------------------
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.apps,comp.lang.fortran,comp.os.ms-windows.programmer,comp.os.ms-windows.apps
From: (Tim Keitt)
Subject: re: How to call FORTRAN subroutines from Excel (Summary)
Date: Fri, 20 Nov 92 17:56:53 GMT
Organization: University of New Mexico, Albuquerque NM
Reply-To: tkeitt@algodones.unm.edu
Keywords: excel fortran mac windows

In article <BxyyC2.41D@news.udel.edu> garrett@me.udel.edu (Joel J. Garrett; Office 127 CMSL; Phone 831-2332) writes:
>First of all, I'd like to thank the following for their replies and
>information:
>
>Scott D. Stecker <stecker@ecn.purdue.edu>
>Michael Alan Roberts <roberts@ucunix.san.uc.EDU>
>David M. Palmer <palmer@alumni.cco.caltech.edu>
>Brion Sarachan <sarachan@wsqtbf.crd.ge.com>
>Andy Ralston <aralston@janus.ece.wisc.edu>
>David C. Doherty <doherty@msc.edu>
>Joel Spolsky <joelsp@microsoft.com>
>
>>How difficult would it be to interface a set of existing FORTRAN
>>subroutines to an Excel Spreadsheet?  Is it possible to somehow include
>
> stuff deleted...
>
>Thanks again to those who took the time to respond!
>
>Joel Garrett
>(garrett@me.udel.edu)

I just thought I'd mention that I recently hear that MS is 
building a callable interface to Excel. When that's available, 
you'll be able to call *excel* from within your program (I 
suppose this may be at the DLL level, but I'm not sure). This 
is a great idea, someone could for instance create a full blown 
stats package that used calls to excel for its interface and 
display output. It would be like an excel add-in, only much 
faster and with smoother integration. All of excels built in 
functions would I presume be available as function calls. This 
could save a lot of coding effort.

--
Timothy Keitt
tkeitt@algodones.unm.edu
From: peirce@outpost.SF-Bay.org (Michael Peirce)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Developers: Do you test with Apple AUX??
Date: 17 Nov 92 16:52:09 GMT
Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
Organization: Peirce Software
X-Mailer: uAccess - Macintosh Release: 1.6v1


In article <1992Nov16.211805.13199@col.hp.com> (comp.sys.mac.programmer), chrism@col.hp.com (Chris Magnuson) writes:
> 
>   If you develop programs for the Mac, there is one other operating system
> you should test with...Apple A/UX 3.0.
> 
>   A/UX 3.0 is a UNIX operating system that allows Mac users to run UNIX as
> another application while still doing the "normal" Mac things.  Some well
> known programs (like White Knight) do not work under A/UX, and this causes
> problems for users.  I know as an A/UX user that I am very dissatisfied with
> some of the so-called "hot" programs that don't work under A/UX.
> 
>   So if you're putting out a program for the Mac, make sure you get it tested
> on A/UX.  I can help.

The A/UX people usually have a test lab set up during the Apple developer
conferences.  This is a good and cheap way to do some basic A/UX testing.
I did this and didn't find any trouble with my stuff (amazingly AppSizer
which patches an undocumented trap even worked!).

--  Michael Peirce      --   peirce@outpost.SF-Bay.org
--  Peirce Software     --   Suite 301, 719 Hibiscus Place
--                      --   San Jose, California USA 95117
--  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
--            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
From: lai@Apple.COM (Ed Lai)
Newsgroups: comp.sys.mac.programmer
Subject: Re: AESend, at my wit's end
Date: 23 Nov 92 04:33:02 GMT
Organization: Apple Computer Inc., Cupertino, CA

This is from the Creating and Sending Apple Events chapter in the beta
New Inside Mac.

noPortErr    - 903   Client hasn't set 'SIZE' reosurce to indicate
awareness of high-level-event

destPortErr  -906    Server hasn't set 'SIZE' resource to indicate
awareness of high-level-event.


/* 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: aep@world.std.com (Andrew E Page)
Subject: Re: PolyRgn?
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 18 Nov 1992 13:26:06 GMT


   One way to do it would be to do:

   OpenRgn
   FramePoly
   CloseRgn



-- 
Andrew E. Page   (Warrior Poet) |   Decision and Effort The Archer and Arrow
Mac Consultant                  |     The difference between what we are
Macintosh and DSP Technology    |           and what we want to be.
Newsgroups: comp.sys.mac.programmer
From: keith@taligent.com (Keith Rollin)
Subject: Re: How to store file references/names ?
Followup-To: comp.sys.mac.programmer
Organization: Taligent
Date: Tue, 17 Nov 1992 22:13:06 GMT

In article <40561@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) wrote:
> 
> And anyone that looked into a alias can tell you that it does contain
> the full path name. Damn you Apple! :-) (Do what I say not as I do. For years 
> Apple has been bellowing: "don't use full pathnames" What did they end up 
> using for aliases?)

Well, there's a smiley in there, so I guess I don't really need to point
out that Apple also writes directly to the screen, reads and sets hardware
registers, examines and changes private fields of data structures, calls
undocumented traps, parses up the region structure, etc...

Actually, the full pathname in the alias structure is only used as a backup
in case the dirID fails. Using both a path of dirIDs and names is a very
powerful technique, and I'm sure Apple wouldn't mind if you decided to
implement one for your application. However, that's a lot of work, and
using a dirID is very simple and works 99.9+% of the time (how often do you
restore a hard disk from tape?)

-----
Keith Rollin
Phantom Programmer
Taligent, Inc.
Newsgroups: comp.sys.mac.programmer