HDTenEightyP/NetNews huggingface dataset:
From: russotto@eng.umd.edu (Matthew T. Russotto)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How to write a software that simulate a disk drive (volume)
Keywords: question, disk drive, volume, big problems, wizards wanted
Date: 18 Dec 92 00:42:12 GMT
Organization: Project GLUE, University of Maryland, College Park

In article <1992Dec16.193357.19283@kth.se> d88-jwa@dront.nada.kth.se (Jon Waette) writes:
>In <1gnbguINNmr7@urmel.informatik.rwth-aachen.de> arminl@tabaqui.informatik.rwth-aachen.de (Armin Luetkenhaus) writes:
>
>>I'm going to write a piece of software that simulates a disk drive
>>on the Macintosh.
>
>Don+t do it. The External File System "Manager" is not documented
>and an exceedingly ugly beast to fight.

Will Apple still send out the document on it?

>>Any kind of help is welcome!!!
>
>You could TRY writing an AppleShare server, and set self-send to
>true on the machine mounting. Hmm. Maybe.

Trying to simulate a DISK DRIVE is a different beast than simulating a
file system.  (I missed the original post so I'm not clear on what is
wanted here)
To simulate a disk drive, you have to write something
which accepts the low level calls for the sony driver, and call _AddDrive to
add it to the queue.   (there's a tech note on this...)

-- 
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
Some news readers expect "Disclaimer:" here.
Just say NO to police searches and seizures.  Make them use force.
(not responsible for bodily harm resulting from following above advice)
From: tj@kona.cs.ucla.edu (Tom Johnson)
Subject: Re: Detecting reboot or startup
Organization: UCLA, Computer Science Department
Date: Fri, 18 Dec 92 18:12:53 GMT

cmcclary@ucs.indiana.edu (Charles McClary) asked:
>>
>>>What is the best/preferred method for an application to detect if the
>>>system has been rebooted or restarted since it (the application) last ran.

And d88-jwa@dront.nada.kth.se (Jon Wtte) answered:
>>
>>Install a gestalt selector with your own signature as selector code.
>>

In considering old systems that don't have Gestalt, kent@lloyd.Camex.COM
(Kent Borg) suggested:
>
>Put a little something else in the System heap, note its location in a
>file, and check whether it is still there when you next launch.
>(Rather than using a file to record the address you might walk the
>heap to find it.  I doubt Apple will change the heap structure in
>*old* systems.)
>
>Off the top of my head, I can't remember how an app can allocate a
>handle in the System heap and also prevent Multifinder from cleaning
>up and deleting it for you when you exit, but loading a resource into
>the System heap and then detaching it should work.  Shouldn't it?
>

This reminded me of how I used to handle communication between a cdev and
an INIT before Gestalt was available.  I simply installed a small driver
and used it to pass variables back and forth.

For this purpose (detecting whether the machine has been rebooted, the
driver wouldn't really have to do anything - it could be a very simple
shell.  As with Jon's Gestalt method, you would simply check for an error
 - in this case one returned by OpenDriver().

Tom
-- 
Tom Johnson             "They say Confucious does his crossword with a pen."
tj@cs.ucla.edu                               -Tori Amos
Newsgroups: comp.sys.mac.programmer
From: ksand@apple.com (Kent Sandvik )
Subject: Re: Info about Pearl Common Lisp for the Mac Desired...
Date: Wed, 16 Dec 1992 02:32:34 GMT
Organization: (Evil Eye Creature from Mars, Inc.)
Followup-To: comp.sys.mac.programmer,comp.lang.lisp

In article <BzB8vD.K7s@Novell.COM>, Mel Walker <mwalker@novell.com> wrote:
> Sure. It looked like a nice implementation. I thought it would be a very
> good beginners Lisp package, or a good intro to OOP concepts (sorry,
> "paradigm"). The object library seemed adequate for most mac development.
> All in all, it's a dang shame that somebody didn't support it enough for
> it to run under system 7. Maybe Apple's got the source code lying around
> someplace that they could post???? Maybe?

As parts of Pearl is inside MCL I would doubt that anyone inside Apple
would dare to post the sources. BTW, the current MCL implementation comes
with a lot of source code for the MCL implementation itself (Common
Lisp code), but a couple of strategic parts, like the compiler, is not
shipping :-).

I would actually go for the Gambit/Thomas environment for shades
of things to come (Dylan environments), or MCL (full CL implementation).

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.
Newsgroups: comp.sys.mac.programmer
From: Eric C. Kofoid <kofoid@bioscience.utah.edu>
Subject: comments on ObjectMaster?
X-Xxmessage-Id: <A752169AA901C39C@ls-27.biology.utah.edu>
X-Xxdate: Mon, 14 Dec 92 17:46:50 GMT
Organization: Dept. Biology, University of Utah
X-Useragent: Nuntius v1.1.1d14
Date: Mon, 14 Dec 92 17:38:01 GMT

I just read the minireview on ObjectMaster from Acius (MacWorld, Jan.93, 
p.194). It sounds lovely, but I find the claim that it works within the 
THINK Pascal environment surprising. I program in both THINK C and Pascal 
and find them fast and elegant *except* for their crippled, brain-dead 
editors. 

I've discussed with Pete Keleher for years the difficulties of
subsituting 
the Pascal editor with something sensible, like Alpha, and have been 
convinced that it is impossible. There is a very kludgy and inelegant way 
of doing it in THINK C, but it certainly removes much of the pleasantness 
from the environment. 

How does Acius do it? Has anybody played with ObjectMaster? If so, what
all 
does it do and what is it like to use? 

ooo Dr. Cancer ooo

  "Being certain of the conclusion assists in finding the proof" 
                                      Galileo, 17th century
Newsgroups: comp.sys.mac.programmer
From: scott@park.uvcc.edu (Scott Taylor)
Subject: Re: How do I STOP my TextEdit field from updating?
Organization: Utah Valley Community College, Orem, Utah
Date: Wed, 16 Dec 1992 21:22:11 GMT

> How can I STOP the TextEdit field from redrawing itself immediately
> when I delete a line?  I TEDeactivate it, and turn off TEAutoView.  I
> will eventually get around to updating the window on the screen, at
> which time I want the text to be redrawn -- but not now!

I got away with setting the TE's viewRect.bottom to viewRect.top
and then restoring it later, but then I was already doing lots of
cruel things to the TE...

--Scott

Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Uniquely identifying a Mac? How?
Organization: Kalamazoo College
Date: Fri, 18 Dec 1992 21:33:02 GMT

anadig@otago.ac.nz writes:
>absurd@apple.apple.com (Tim Dierks, software saboteur) writes:
>
>> continued in the Mac.  The biggest single problem was serviceing
>> these machines; if the PROM blew, you had to special-order a
>
>I would have thought the Lisa problem would happen when for whatever reason it
>was necessary to swap the motherboard, at which point the soldered-in PROM
>would be impracticable to remove...

My two bits on copy protection:  I have a Lisa sitting in my closet,
complete with the manuals and original disks for LisaWrite, LisaDraw,
LisaPaint, LisaDoodle, and LisaYodel.  I also have a defunct 4.8-meg
ProFile hard drive, which presumably has all that software on it, but
which stubbornly refuses to work.

The disks won't reinstall;  I think the installation process marked the
disks as "already installed," and it refuses to do it again.  At least,
that's what a Lisa reference book says (yes, I actually found one at a
bookstore!).

So, I bought $10,000 (1983 dollars) worth of hardware, probably several
thousand in software, and a cool hard drive for under $15, and I got
rooked.  It's worth whatever a scrap metal dealer will pay for it (and,
despite that solid lead case, I don't think I'll get $15).

Even if I got the hard drive working, I'd have to call up the software
company and ask them to send me replacement disks in exchange for the
ones I have...anyone think I'll get them?
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "As you should know by now, we're strong believers in the Apple II
  and always will be.  But we can't ignore reality forever."
    - Tom Weishaar
From: wjb@cscsun2.larc.nasa.gov (William J. Bene)
Newsgroups: comp.sys.mac.programmer
Subject: Sound Manager Code Samples
Date: 18 Dec 1992 13:08:23 GMT
Organization: NASA Langley Research Center, Hampton, VA  USA
Reply-To: wjb@cscsun2.larc.nasa.gov (William J. Bene)
NNTP-Posting-Host: cscpk.larc.nasa.gov

Does anyone know where I can get code samples/code fragments for the Sound 
Manager?  The Inside Mac manuals haven't been too helpful.

Thanks,


Will
=============================================
William J. Bene
Computer Sciences Corporation
wjb@cscsun2.larc.nasa.gov


Newsgroups: comp.sys.mac.programmer
From: kent@lloyd.Camex.COM (Kent Borg)
Subject: Re: Detecting reboot or startup
Organization: Camex Inc., Boston MA
Date: Thu, 17 Dec 1992 18:19:10 EST

In article <1992Dec16.132825.13170@kth.se> d88-jwa@dront.nada.kth.se (Jon Wtte) writes:
>In <cmcclary-151292113831@mcclary-mac.ucs.indiana.edu> cmcclary@ucs.indiana.edu (Charles McClary) writes:
>
>>What is the best/preferred method for an application to detect if the
>>system has been rebooted or restarted since it (the application) last ran.
>
>Install a gestalt selector with your own signature as selector code.
>
>If it's there, the application run previously during this "session."
>The selector code should reside in the system heap, and could simply
>return a 0 as result; you would test for presence, not return code.

I expected Jon to post that answer.  He is right, do it that way.
However, if you want to run on old systems which don't have Gestalt,
there is another (related) approach.

Put a little something else in the System heap, note its location in a
file, and check whether it is still there when you next launch.
(Rather than using a file to record the address you might walk the
heap to find it.  I doubt Apple will change the heap structure in
*old* systems.)

Off the top of my head, I can't remember how an app can allocate a
handle in the System heap and also prevent Multifinder from cleaning
up and deleting it for you when you exit, but loading a resource into
the System heap and then detaching it should work.  Shouldn't it?


--
Kent Borg            kent@camex.com or kentborg@aol.com (when it is *working*)
                                            H:(617) 776-6899  W:(617) 426-3577
As always, things look better when some costs are left out.
						      -Economist 3-28-92 p. 94
Newsgroups: comp.sys.mac.programmer
From: Kevin W. Ramer <ramer@nrc-iris.nrc.uab.edu>
Subject: Source Examples using Private Scrap
Organization: Neurobiology Research Center
X-Useragent: Nuntius v1.1
Date: Wed, 16 Dec 1992 16:01:31 GMT


	I'd like to find source examples for using a private scrap in my
application to 
copy/paste some of the application's data.  So far I haven't found
any examples in the usual repositories.  

Any tips are appreciated,

Thanks
From: perm@csd.uu.se (Per Mildner)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Curves in QuickDraw GX
Date: 18 Dec 92 14:28:18
Organization: Computing Science Dept.,Uppsala University, Sweden
NNTP-Posting-Host: groucho.csd.uu.se
In-reply-to: bayes@hplvec.LVLD.HP.COM's message of Thu, 17 Dec 1992 00:00:08 GMT


I seem to remember a question about this at the last WWDC. I think the
specific question was about outlining cubic curves requiring quadratic
curves, this was from someone who had implemented similar
functionality in a product. The answer was something like: "Yes,
normally, but we have some very bright math people", ie, they use some
sort of approximation magic.

--
Per Mildner			perm@CSD.UU.SE
Computing Science Dept.		tel: +46 18181049
Uppsala University, Sweden	fax: +46 18521270
From: ansorge@kaleida.com (Sean Ansorge)
Newsgroups: comp.sys.mac.programmer
Subject: problem with animation program
Date: 18 Dec 92 23:51:02 GMT
Followup-To: comp.sys.mac.programmer
Organization: Kaleida Labs, Inc.

I'm writing a real-time animation package and am having a problem I can't
track down. The program consists of your typical event loop plus another
animation loop, in which sprites are drawn to the screen from an offscreen
buffer and sounds are played. All objects are allocated before the drawing
loop is entered, and all objects are pointer-based (Think C "direct").
There is an instance variable that acts as a flag to tell an object if it's
active or not, and when I need a new object of a particular type I walk the
inactive object list and activate one of the needed objects by setting the
flag.

All well and good, but after this loop has been running for a while, there
starts to be a quite noticeable pause whenever a deactivated object is
activated. This only happens after the loop has been going for a while. If
I exit the loop and return to the main event loop, wait a second, and
re-enter the animation loop, the problem vanishes and object activation
becomes instantateous. Another thing that happens when the animation loop
is paused is a flicker which appears to be some of the drawing calls
"catching up", but I'm not sure what it is.

I am using GWorlds for the offscreen buffers, and I am locking the pixmaps,
and am using CopyBits and CopyMask to do the drawing.

Examination of my heap shows that something is indeed moving about, but
it's nothing I have control over; all my objects are pointer-based and all
other data I allocate space for is locked down. I wondered if perhaps
something in the way Think's method-dispatching engine works could be
causing heap compaction or other memory movement.

All of this happens regardless of wether the sound calls are made (I'm
using SndPlay, but when sound is off I don't call it).

I'd appreciate any suggestions.

.........................................................................
Sean Ansorge                                               (415) 966-0865
Kaleida Labs, Inc.                                    ansorge@kaleida.com
.........................................................................
Newsgroups: comp.sys.mac.programmer
From: friedman@netcom.com (Greg Friedman)
Subject: Re: Dialogs and Scrolling
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Wed, 16 Dec 1992 20:40:39 GMT

In article <1992Dec16.171910.8575@aio.jsc.nasa.gov> mark@cheers.jsc.nasa.gov (Mark Manning) writes:
>
>   Question: I want to place a PICT picture onto the screen and
>             then scroll it left and right.  On top of this PICT
>             are editable fields.  Is this possible and if so
>             could you post a snippet on how to do this?  I keep
>             crashing my system when I try to do this. :(

If I understand correctly, you have a dialog on the screen and are
attempting to scroll the contents of the dialog.  I have done
something similar in the past, though my dlog did not contain a PICT.
I don't think a pict item should make a difference. This code assumes
that you are scrolling in response to a hit on the upButton in a scroll
bar.  If you aren't scrolling in response to a scroll bar hit, or
your dlog doesn't contain controls, than omit the control related code:

  SetCtlValue(vScrollHndl,(**vScrollHndl).contrlValue - 1);
  ShiftControls(whichWindow,((-1) * kVScrollVal));
				
  clipRect.right = clipRect.right - 15;
  clipRect.bottom = clipRect.bottom - (15);
  clipRect.top = clipRect.top + headerHeight;
  ClipRect(&clipRect);
  ScrollRect(&clipRect,0,kVScrollVal,((WindowPeek)whichWindow)->visRgn);
  SetOrigin  (((GrafPtr)whichWindow)->portRect.left,
      ((GrafPtr)whichWindow)->portRect.top - kVScrollVal);
  clipRect = ((GrafPtr)whichWindow) ->portRect;
  clipRect.right = clipRect.right - 15;
  clipRect.top = clipRect.top + headerHeight;
  clipRect.bottom = clipRect.top + kVScrollVal;
  ClipRect(&clipRect);
  DrawDialog((DialogPtr)whichWindow);
  ValidRect(&((GrafPtr)whichWindow) ->portRect);

I didn't scroll the entire contents of the dlog.  I omitted a header,
whose height was defined in headerHeight.  Be sure to set the origin
of the dlog. Otherwise dlog items will be drawn in the wrong places
when the dialog is drawn.  Also, be sure to validate the dlog rect
after your call to draw dlog.  In case you have controls in the window,
you'll have to shift them yourself.  Here's the function ShiftControls
that I call from the above code.

void
ShiftControls(	WindowPtr	whichWindow,
  short	shiftVal)
{
 ControlHandle	whichControl;
	
	/*set whichControl to the window's first control*/
	whichControl = ((WindowPeek)whichWindow)->controlList;
	
	/* now loop through all of the controls and shift them by shiftVal*/
	do{
  (**whichControl).contrlRect.top = (**whichControl).contrlRect.top + shiftVal;
  (**whichControl).contrlRect.bottom = (**whichControl).contrlRect.bottom + 
     shiftVal;
  whichControl = (**whichControl).nextControl;
 } while (whichControl);
}

Hope this helps.
From: irac@yang.earlham.edu
Newsgroups: comp.sys.mac.programmer
Subject: Example code request.
Date: 17 Dec 92 02:45:20 GMT
Organization: Earlham College, Richmond, Indiana

Hi all, Ira here.
Could any person point me in a direction for some example application code that
I could ftp?  I would like to download some example code to help me out with a
project on for my girl for Christmass.  The program is the Pizza selector and
some of you prolly know about it as I have posted before.  I am primarily
concerned with menu management and setup.  I would like to get some code in
Pascal.  Hopefully Think 4.0 and system 7.0 compatible. 

Thanks alot. :)

-ira
End of line.
Newsgroups: comp.sys.mac.programmer
From: brunner@crchh447.bnr.ca (James Brunner)
Subject: GIF program authors READ THIS
Reply-To: brunner@crchh447.bnr.ca (James Brunner)
Organization: Bell-Northern Research, Richardson, Tx
Date: Sat, 19 Dec 1992 01:23:26 GMT

A widespread bug has been discovered the UNIX compress 4.1.  This bug is
known to have spread to the GIF implementations in UNIX XV and the PBMplus
utilities.  I suspect that this bug exists in GIFFER and QuickGIF.

This bug does NOT result in the loss of data.  However, GIF files may be
encoded at up to 20% larger than expected size.  This bug was first
discovered when compressing files with QuickGIF generated files that were
quite a bit larger than the original GIF.

Please refer to Tom Lane's article in alt.pixutils on correcting this
problem in your source code (if you may have cloned this bug).
-- 
---------------------------------------------------------------------------
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.
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Waette)
Subject: Re: How to write a software that simulate a disk drive (volume)
Keywords: question, disk drive, volume, big problems, wizards wanted
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Wed, 16 Dec 1992 19:33:57 GMT

In <1gnbguINNmr7@urmel.informatik.rwth-aachen.de> arminl@tabaqui.informatik.rwth-aachen.de (Armin Luetkenhaus) writes:

>I'm going to write a piece of software that simulates a disk drive
>on the Macintosh.

Dont do it. The External File System "Manager" is not documented
and an exceedingly ugly beast to fight.

>Any kind of help is welcome!!!

You could TRY writing an AppleShare server, and set self-send to
true on the machine mounting. Hmm. Maybe.

Cheers,

						/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

   There's no sex act that can't be made better with Yell-O.
From: absurd@apple.apple.com (Tim Dierks, software saboteur)
Newsgroups: comp.sys.mac.programmer
Subject: Re: PixMaps
Date: 14 Dec 92 04:59:35 GMT
Followup-To: comp.sys.mac.programmer
Organization: MacDTS Marauders

In article <rudolph.724291437@unixg.ubc.ca>, rudolph@unixg.ubc.ca
(Christopher E Rudolph) wrote:
> 
> Hello,
> 
> I would like to declare pixel data for a PixMap data structure from
> within my program and not have to call the data from, say a cicn in a
> resource.
> 
> Example:  
> 
> Say I had a ball that I would like to decribe in terms of actual pixels on
> the screen.  How would I go about declaring an array of values for this
> ball, which I would then like to assign to the baseAddr field of the
> PixMap data structure.
> 
> My biggest problem is I don't know how to go about defining the pixel image.
> If anyone could help me out with this I would really appreciate it.

Thanks for reposting your question: your first version was kind of
incomprehensible.  [Note to all: if you're thinking of posting a question
to c.s.m.p., the #1 thing you can do to improve your chances of getting
an answer is write a clear, comprehensible question.  People are less
likely to answer if they're unsure of what you're asking.]

Now back to our program....

Read the "Graphics Overview" chapter of Inside Mac VI and the Tech Note
previously numbered #120 "Principia Off-Screen Graphics Environments",
by QuickDraw God (TM), Forrest Tanaka.  (No, I don't know what it's
called in the Brave New Tech Note World.)

[This is where I tried to insert a description of how everthing works,
but was unable to get it sounding right, so I deleted it.  Read the
documentation and the tech note; all will become clear.]

Tim Dierks
MacDTS pinball addict
From: irac@yang.earlham.edu
Newsgroups: comp.sys.mac.programmer
Subject: Macs closed, what me worry?
Date: 17 Dec 92 15:51:50 GMT
Organization: Earlham College, Richmond, Indiana

Hi all, Ira here.

So now I have been reading this group a little and I would like to know a
thing.  Why are Macs considered closed systems?  Is it because it is a little
harder to get into the case?  Is it because the system platform is a little
taller and it is harder to code your own system?  Is it because Mac clones are
not really existant?  If these are the reasons are they good ones?  Ok so those
are my questions, could some person wax eloquent for me on this topic?  Thanks.

-ira
End of line.
From: beh@acs.bu.edu (Bruce Howells)
Newsgroups: comp.sys.mac.programmer
Subject: Revisionist -- review requested
Date: 16 Dec 92 22:36:56 GMT
Organization: Boston University, Boston, MA, USA
Originator: beh@acs.bu.edu

I've seen "Revisionist" go by a few times now, and it looks like a 
really neat idea.

However, before entrusting work to something like that (it sounds like
a mangle and the file is pretty well unretrievable), I'd like to know
what experience others have had with it.

If you have used Revisionist, please mail me below; I will post a 
summary in a week or so.


Thank you-
Bruce Howells,  beh@bu.edu

Xref: sparky comp.sys.mac.programmer:19739 comp.sys.mac.wanted:11690 comp.sys.mac.misc:20553
Subject: Re: help with postscript
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.wanted,comp.sys.mac.misc
Date: Wed,  9 Dec 92 22:14:33 +0200
From: KURZAEV@JONATHAN.srcc.msu.su (Paul Kurzaev)
Reply-To: kurzaev@jonathan.srcc.msu.su (Paul Kurzaev)

 he last solution is to use Apple's LaserWritter font utility to download the
 file to the printer.

Paul


--
Paul Kurzaev
Russia, Moscow University Computer Center
AppleLink: MOSCOW.UNIV
eMail:     KURZAEV@JONATHAN.srcc.msu.su
Newsgroups: comp.sys.mac.programmer