HDTenEightyP/NetNews huggingface dataset:
From: Quinn <quinn@cs.uwa.edu.au>
Subject: Re: BINHEX SOURCE CODE
X-Xxdate: Tue, 24 Nov 92 01: 33:38 GMT
Organization: The University of Western Australia
X-Useragent: Nuntius v1.1.1d12
Date: Tue, 24 Nov 1992 01:41:57 GMT

In article <By6CwJ.DsA@news.iastate.edu> Nikolaus E Schuessler,
niko@iastate.edu writes:
>Look in the info-mac archives in the source directory. info-mac/src/c.
                                                        ^^^^^^^^^^^^^^
I should let Pete (Lewis -- author of DeHQX) fight his own battles but...

{$setc rabid_pascal_program=true}

DeHQX, like every other program written by Pete, is written in PASCAL.
How dare you insult good code by saying it was written in C!

{$setc rabid_pascal_program=false}

I feel much better now, really I do.

btw Just so this posting is not entirely content-free I'll let you
    in on a secret...  The latest versions of all Peter Lewis'
    programs (DeHQX, Talk, Finger, FTPd, etc) along with the released
    source code can be FTPed from redback.cs.uwa.edu.au (130.95.80.1)
    in the directory "/Others/PeterLewis".

Quinn "The Eskimo!"      <quinn@cs.uwa.edu.au>     "Support HAVOC!"
Department of Computer Science, The University of Western Australia
  -- Chief, acting, temporary (and therefore unpaid) archivist.
Newsgroups: comp.sys.mac.programmer
From: absurd@apple.apple.com (Tim Dierks, software saboteur)
Subject: Re: Is this a BaseAddress problem with the Quadra .?.?.?.
Date: Fri, 20 Nov 1992 00:38:14 GMT
Organization: MacDTS Marauders
Followup-To: comp.sys.mac.programmer

In article <1992Nov18.232653.13027@news.vanderbilt.edu>,
BLOOMDA@ctrvax.vanderbilt.edu (_creative_output_) wrote:
> 8-bit mode.  That's when I learned about incorporating the slot
> number of the video card into the base address:
>      ( ( baseAddr >> 24 ) | something ) << 20 | baseAddr, or somesuch
> 
> - Dave	=(^;|=				Dave Bloom, JSPS
> 					bn: bloomda@vuctrvax
> 					in: bloomda@ctrvax.vanderbilt.edu
> "Mekka Lekka Hai, Lekka Heinie Ho"

Here's the right way to get the slot number of a monitor, given its
GDevice:  (as a bonus, this also gets the name of the card in
question; to just get the slot, chop off all the lines after the
*slot = ... line.

OSErr
GetSlotAndName(GDHandle gDev,short *slot,char *name)
{   OSErr       err;
    short       refNum;
    SpBlock     spb;
    
    refNum = (**gDev).gdRefNum;    // video driver refNum for this GDevice
    *slot = (**(AuxDCEHandle)GetDCtlEntry(refNum)).dCtlSlot;
                                   // slot in which this video card sits
    
    spb.spSlot = *slot;         // In the slot we're interested in
    spb.spID = 0;
    spb.spExtDev = 0;
    spb.spCategory = 1;         // Get the board sResource
    spb.spCType = 0;
    spb.spDrvrSW = 0;
    spb.spDrvrHW = 0;
    spb.spTBMask = 0;
    
    err = SNextTypeSRsrc(&spb);
    if (err)
        return err;
    
    
    spb.spID = 2;               // Getting the description string
                                // spSPointer was set up by
SNextTypesResource
    err = SGetCString(&spb);
    if (err)
        return err;
    
    strcpy(name,(char *)spb.spResult);  // Get the returned string
    DisposPtr((Ptr)spb.spResult);    // Undocumented; we have to dispose of
it
    
    c2pstr(name);
    
    return noErr;
}

You should also be very careful to use SwapMMUMode() to switch into
32-bit mode any time you write to the framebuffer, regardless of what
bitdepth it is at.

Tim Dierks
MacDTS, but what?
Newsgroups: comp.sys.mac.programmer
From: brianc@acuson.com (Brian Cox)
Subject: Re: PolyRgn?
Organization: Acuson; Mountain View, California
Date: Wed, 18 Nov 1992 20:40:01 GMT

d91ms@efd.lth.se (Magnus Strand) writes:

>According to IM I (page 191) you can convert a polygon into a region,
>but I can't find any documentation on how to do it. Does anyone know
>if this is possible?

>Thanks in advance.


>Magnus Strand
>E-mail: d91ms@efd.lth.se



I think something along the lines of the following would work:

	polyRgn = NewRgn();

	OpenRgn();
	    FramePoly(&myPolygon);
	CloseRgn(polyRgn);

I wanted to do something similar in converting a rounded rectangle into
a region.  This was the path I took...


					--Brian Cox--


-- 

					   --Brian Cox--
------------------

Newsgroups: comp.sys.mac.programmer
From: leonardr@netcom.com (Leonard Rosenthol)
Subject: Re: How to store file references/names ?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Sun, 15 Nov 1992 17:29:19 GMT

In article <1e5fvgINN835@uni-paderborn.de> jerry@uni-paderborn.de writes:
>What is the best (easiest?) way to store file informations in a preferences
>file?   My application reads an initialization file on startup and I want
>to give the user the possibility to choose what file should be read.
>I've heard that I should NOT try to store entire file names.   Can I simply 
>bring up a file dialog and the store the file reference number?   Or does 
>this number change as files and directories change on the hard disk?
>
	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.

-- 
-----------------------------------------------------------------------------
Leonard Rosenthol			Internet: 	leonardr@netcom.com
Director of Advanced Technology		AppleLink:	MACgician
Aladdin Systems, Inc.			GEnie:		MACgician

Newsgroups: comp.sys.mac.programmer
From: mtc@mundil.cs.mu.OZ.AU (Michael Trevor CUTTER)
Subject: Problem with System 7 Popup CDEF - New One!
Keywords: popup CDEF 7
Organization: Computer Science, University of Melbourne, Australia
Date: Tue, 24 Nov 1992 02:41:36 GMT

Dear Netters,

I am trying to implement a popup menu in a dialog, using the proper System 7
cdef. It seems to work fine. However, there is one small problem. When I select
an item that is not the first one, the popup continues to display the first item
in the list. However the item selected is returned correctly, and has its 
tick mark against it and everything...but no difference to the appearance of
the popup when you let go of the menu.

Here is the code I use (the dialog filter proc is straight out of inside Mac)

{Create the pop up menu}
  GetDItem(dlog, kSSPopup, itemType, itemHandle, dispRect);
  popctrl := NewControl(dlog, dispRect, title, true, popupTitleRightJust, 
	     kMenuID, 0, popupMenuCDEFProc, 0);
  ...

  repeat
    begin
      ModalDialog(@MarkFilter, itemhit);
      case itemhit of
	kSSPopup: 
	  begin
	    itemselect := TrackControl(popctrl, absRect.topleft, POINTER(-1));
	    itemselect := GetCtlValue(popctrl);
	    GetItem(myPopUpData^^.mHandle, itemselect, CurrentStudentName);
	    ...

So, what am I doing wrong? Did I forget a constant for always_display_selected_
item? Apple's own HIG's say to draw it this way. I would have thought it would
be done by the CDEF, not by the user.

Any ideas gratefully appreciated.

Feel free to post or mail, but I would prefer mail... :-)

Many regards,
	Mike.

-- 
Michael Cutter                        email: mtc@mundil.cs.mu.oz.au
Ictinus Network Development Team             mtc@arbld.unimelb.edu.au
BCAT Development Team                 snail: c/- 3 Barton Street
Department of Architecture & Building        Hawthorn, VIC, 3122 
University of Melbourne, Australia           AUSTRALIA
Sort of 3rd Year Computer Scientist   phail: 61-3-853 9717
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Blat
Organization: Kalamazoo College
Date: Sat, 21 Nov 1992 17:12:42 GMT

creiman@netcom.com writes:
>rla20@duts.ccc.amdahl.com (Roger Allen) writes:
>>What are Xap and Blat?  I haven't heard of these before.
>
>Blat uses protected memory mode of the MMU to protect the low level
>vectors.  Basiclly, a fool-proof EBBE. This power has a price: you
>can't use VM with it.

Nor is it compatible with the "IIsi, IIci, LC or any computers using
that ROM...040 class machines...or TMon Pro" (from the Release Notes
file).  Alas!

Bo3b writes:  "If the incompatibility problems make it useless for you, I
would be interested to know that as well.  Given the difficulty of writing
code of this form, we have judged it to not be worth the time to make it
work in every situation."

I, for one, would love to use this tool on my IIci.  Imagine an EBBE
that traps not only _reads_ from 0, but _writes_ to them--on the very
instruction where the offense occurs!  And not only location 0, but the
next 255 bytes as well.  This would be quite nice.

Alas.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "I don't think we should have to have them wandering the streets
  frightening women and people."                            - Pat Buchanan
Newsgroups: comp.sys.mac.programmer
From: mspace@netcom.com (Brian Hall)
Subject: Is the a NumToString that uses IU?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Wed, 18 Nov 1992 21:37:14 GMT

Is there a routine similar to NumToString that can properly format a
long?  ie, If I pass in the number 1024, I would like to get back
"1,024" - assuming that I am using the US script.

There are Str2Format and Format2Str in IM6, but they seem like overkill.

-- 
 
 \ | /   | Brian Hall                 mspace@netcom.com
 - : -   | Mark/Space Softworks       Applelink: markspace
  /|\    |                            America Online: MarkSpace
 |-+-|   |
/-\|/-\  | PUI: Programming Under the Influence.
Newsgroups: comp.sys.mac.programmer
From: fixer@faxcsl.dcrt.nih.gov (Chris Spiral Catfish Tate)
Subject: Re: 3D graphics...
Reply-To: fixer@faxcsl.dcrt.nih.gov
Organization: Computer Systems Laboratory, DCRT, NIH
Date: Wed, 18 Nov 1992 19:23:01 GMT

Another excellent ray-tracing program for the Mac (and several other platforms)
is the Persistence of Vision Raytracer (POV-Ray).  It is a joint collaboration
between a number of programmers, very much in the tradition of the MS-DOS
program FRACTINT.

The home FTP site for POV-Ray is alfred.ccs.carleton.ca, in the /pub/povray
directory tree.

A catalog of its features is pretty impressive: CSG, a slew of procedural
textures (which may be layered), image-mapping, height-mapping, image-based
texture mapping, bicubic patches, arbitrary quadric and quartic surfaces,
etc.  See the documentation for a full explanation.

------------------------------------------------------------------------------
Christopher Tate             | The Leadfoot Collection, Continued:
Management System Designers  |     * Heavy Fuel (Dire Straits)
                             |     * Last Scene in September (Preston Reed)
fixer@faxcsl.dcrt.nih.gov    | Because driving fast is a cathartic experience.
From: mak+@cs.cmu.edu (Matthew Alan Kane)
Newsgroups: comp.sys.mac.programmer
Subject: sndPlay while animating
Keywords: Mac, sndPlay, animation
Date: 15 Nov 92 19:08:01 GMT
Article-I.D.: cs.BxruHF.F11.1
Organization: School of Computer Science, Carnegie Mellon

Situation:
I have animation running during vbl
and am playing snd resources with sndPlay.

Problem:
How do I keep my animation going while the sound is playing?

Thanks,

Matthew Kane
mak@cs.cmu.edu
Newsgroups: comp.sys.mac.programmer
From: kurisuto@chopin.udel.edu (Sean J. Crist)
Subject: THINK Pascal- program crashes only when stand-alone
Organization: University of Delaware
Date: Mon, 16 Nov 1992 19:24:12 GMT

Without going into the specifics, here's my general problem.  I have a
program which functions fine when running within the THINK Pascal
development environment, but which crashes when compiled as a stand-alone
application.

What could be causing this?  How can I even attack the problem when I
don't have THINK Pascal's programming tools to see why this stand-alone
program is crashing?  I can't imagine that this is a bug in THINK Pascal,
but it seems that the simulated run environment ought to be realistic
enough that any problems which a stand-along application is going to
have will be apparent in the simulated environment as well.

--Kurisuto

Newsgroups: comp.sys.mac.programmer
From: zkessin@chaos.cs.brandeis.edu (Zach, the Lego Maniac)
Subject: Re: Need a text manipulation tool / programming language.
Organization: Brandeis University
Date: Sun, 22 Nov 1992 05:30:14 GMT

felciano@summit.stanford.edu (Ramon M. Felciano) writes:


>Hi --

>I'm looking for a tool or programming language designed for the
>manipulation of text files. I've got a number of similarly formatted
>files that I want parsed into my program. Before I can do that,
>however, I need to "massage" these files into the same format. I tried
>writting a tool to do this, but the result starting looking more and
>more like a language syntax parser (aagh!)

>Are there any tools (Mac, Unix, or other) that do something like this?
>I guess I'm sort of looking for a glorified grep with language
>constructs (e.g. if-thens).

Well on unix there are sed, awk and perl. (in increasing complexity
and power) All have been ported to the mac.

--Zach  Zkessin@cs.brandeis.edu 

There are worlds out there where the sky is burning.  The sea's
asleep, and the rivers dream. People made of smoke and cities made of sound.
Somewhere there's danger. Somewhere there's injustice.
Somewhere else the tea's getting cold. Come on Ace, we've got work to do."
                                    -The Doctor "Survival"
Newsgroups: comp.sys.mac.programmer
From: dchopp@vicente.math.ucla.edu (David Chopp)
Subject: faulty ANSI in Think C 5.0?
Organization: UCLA Mathematics Department
Date: Mon, 16 Nov 92 21:16:48 GMT

I'm curious if others have run into similar problems as I regarding using
some ANSI subroutines in Think C 5.0.2 with TCL.  In particular, I have
trouble using strcpy, strcmp, sprintf, to name a few.  I have found them
to be sporadic in working properly and I'm wondering if I'm doing something
wrong.  For example, in one object, I'll have two methods each using strcpy
in them (all in the same file).  In one context, it works perfectly, in the
other it fails to copy.  The arguments being passed are all correct (I've
checked them several times).  I've had similar experiences with other ANSI
library routines.  Has anyone else experienced these problems?  Should I 
abandon ANSI all together and write my own subroutines to replace them?
I'm going to call Symantec next, maybe they have an answer for me.

Dave Chopp
dchopp@math.ucla.edu
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Newsgroups: comp.sys.mac.programmer
Subject: THINK C 5.0.4 Update
Date: 17 Nov 92 04:36:56 GMT
Distribution: comp
Organization: Symantec Corp.

The updater for THINK C 5.0.4 has been posted to info-mac and
comp.binaries.mac; it should appear on info-mac within a day or so.

This update fixes the bug in the Code Motion optimization that was
introduced in version 5.0.3. No other major changes were made.

There are two versions of the update package, one which contains just
the THINK C updater, and one which contains the THINK C updater and
the TCL 1.1.2. The TCL was not changed in this release.

If you have any questions about this update, please contact Languages
Tech Support at:

D0152@Applelink.apple.com

These patches have also been uploaded to AOL, CIS and AppleLink.

	-phil
--
   Phil Shapiro                                   Software Engineer
   Language Products Group                     Symantec Corporation
		   Internet: phils@cs.brandeis.edu
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Developing programs for low-end Macs
Date: 17 Nov 92 11:49:19 GMT
Followup-To: comp.sys.mac.programmer
Organization: personal

In article <1992Nov13.181736.25732@udel.edu>, sethi@pokey.cis.udel.edu
(Adarshpal S Sethi) wrote:
> 
> I am developing a program using Think C that is
> required to run under both System 6 and System 7
> as well as on low-end Macs including the 128K and
> 512K Macs. The only machines available to me are
> the Mac SE and the MAC II. My question is: What
> care/precautions should I take during the development
> to ensure that the program will meet these
> requirements? Thanks in advance for all responses,

Those are mighty stringent requirements, especially for someone who lacks
an historically complete view of Macintosh documentation.

Debugging may not be feasible using current versions of think C on that
platform, MacsBug 6.2.2 may not perform there either, you should consult
with symantec about that.

To test on the 64k roms, you will need an early version of the OS (perhaps
v5, probably v4).

Many features we take for granted today have no support in the 64k roms, or
are buggy.

SCSI is an example, you will typically be 400k floppy based, and there may
have to be a system on that floppy as well.

O, that means no real folders, all files must have unique names.

You had better go out NOW in search of vol 1-3 of IM.  The new books will
empatically not serve your purpose at all.  You will also need a set of
tech notes from that era, and since apple has not archived them that way
this will present a significant challange.  I know I cant help you, I hope
someone who can will volunteer.

It might help us to know just why this is a requirement?
--

Dana S Emery <de19@umail.umd.edu>
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: EBBE and the like (was Re: Whip me, beat me...)
Date: 20 Nov 92 11:42:30 +1300
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Nov19.180531.4442@netcom.com>, creiman@netcom.com writes
(among other things):
>
> 5) Another good technique is to extend the Xap handles concept one
>    step further. Xap handles only stuffs a block with junk after you
>    free it up. This doesn't catch uninitialized data structures. You
>    can modify your program's memory allocator to stuff new blocks with
>    bus error values when first allocated. This usualy catches lots of
>    bugs for me. I think Jasik's will do this for you.

I also think that a patch that fills a memory block with bus error values on
allocation is preferable to one that does the same thing when the block is
freed.

At least it allows you to free the memory block containing the routine currently
executing, and then return to the caller, without crashing.

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
Xref: sparky comp.sys.mac.programmer:18761 comp.sys.mac.wanted:10864
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.wanted
Distribution: world
From: Philip_Sarin@uu0570.foggybottom.com
Organization: Foggy Bottom / Washington, D.C.
Date: Fri, 20 Nov 1992 20:38:15 EST
Subject: AP Comp. Sci. AB

Okay, so I'm not a real programmer, but right now, I'm taking AP Computer
Science at school.  The teacher is new and doesn't have any experience
with hte exam itself although he has excellent overall knowledge.

Anyway, I'm a bit concerned, so I was wondering if anyone knew of a good
text for this exam and also a good review guide.

PLEASE reply with personal E-Mail to Philip_Sarin@foggybottom.com

Thank you very much.
Foggy Bottom - your FirstClass Mac connection in Washington, DC
From: werner@soe.berkeley.edu (John Werner)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Opening resource file prevents segments from being loaded
Date: 24 Nov 92 04:45:42 GMT
Followup-To: comp.sys.mac.programmer
Organization: UC Berkeley School of Education
NNTP-Posting-Host: 128.32.157.31

In article <By7BnK.wv@news.udel.edu>, Sean J. Crist wrote:
> At a point where segment B hasn't yet been loaded into
> memory (i.e., I haven't called any procedures in it yet), segment A opens
> a resource file.  Then, when a procedure in segment B is called, the
> segment loader balks and doesn't load segment B, which of course brings
> the program to a speedy crash.

This may be a silly question, but does the resource file you're opening
contain any CODE resources?  Do any of them have the same resource ID as
segment B?

--
John Werner                         werner@soe.berkeley.edu
UC Berkeley School of Education     510-642-9651
Newsgroups: comp.sys.mac.programmer
From: umdenbo0@ccu.umanitoba.ca (David A. Denboer)
Subject: Call for Source Code Samples
Organization: University of Manitoba, Winnipeg, Canada
Date: Thu, 19 Nov 1992 04:44:56 GMT

From : Manitoba Macintosh Developers Association
Subject : Source Code available for FTP

We are in the process of setting up an FTP site for Macintosh source code.
What I currently have set up is a few folders for :
	Libraries
	Classes (OOP)
	Source (C/Pascal/Others)
	Digest (A digest of the comings and goings of the mac-develop 
		discussion list.)
	Apps (Sample applications from fledgling developers)

What I would like to see is an extensive library of source code for the Mac,
with more emphasis on code snippets, less on huge applications.

If you have some source code to donate, please mail it to :
	umdenbo0@ccu.umanitoba.ca    		OR
directly transfer it to our incoming directory at :
	ccu.umanitoba.ca
	/pub/Mac-Develop/Incoming

If you have any questions, or would like to subscribe to our mailing list, 
send a message to :
	mac-develop-request@ccu.umanitoba.ca
The body of the message should say :
	subscribe username@host  or unsubscribe username@host

The address for the discussion list is : 
	mac-develop@ccu.umanitoba.ca (for people signed up already)

Thank you for your co-operation.

-- 
David  A.  den Boer			* MUSI Computer Products	*
umdenbo0@CCU.UManitoba.CA		* 9 Abington Road, Wpg., MB	*
Manitoba Macintosh Developers Group	* (204) 257-1568		*
mac-develop@CCU.UManitoba.CA		* R2J 3S7 Canada		*
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.apps
From: fixer@faxcsl.dcrt.nih.gov (Chris Spiral Catfish Tate)
Subject: Re: Please help with GrayRgn
Reply-To: fixer@faxcsl.dcrt.nih.gov
Organization: Computer Systems Laboratory, DCRT, NIH
Date: Thu, 19 Nov 1992 14:13:52 GMT

In article <2B0B7428.27432@ics.uci.edu>, nyang@bonnie.ics.uci.edu (Nick Yang) writes:
>Hi!  I am sure this is a very easy question.  Can someone tell he how to
>find out the width and height of a region?  Specificly, I am trying to
>find out the width and height of the GrayRgn global variable.  Thank you
>very much for your help in advance.


Yep, it's pretty simple.  When you look in the Quickdraw chapter of Inside
Macintosh, you'll see that a region's data structure is defined as holding
its bounding rectangle, followed by the actual region data (whose format
is somewhat complicated).

(**GrayRgn).rgnBBox will give you the dimensions of the GrayRgn, as well
as its positioning in global coordinates.

------------------------------------------------------------------------------
Christopher Tate             | The Leadfoot Collection, Continued:
Management System Designers  |     * Heavy Fuel (Dire Straits)
                             |     * Last Scene in September (Preston Reed)
fixer@faxcsl.dcrt.nih.gov    | Because driving fast is a cathartic experience.
From: udasbell@mcs.drexel.edu (David M. Asbell)
Newsgroups: comp.sys.mac.programmer
Subject: MOD
Date: 20 Nov 92 22:25:53 GMT
Organization: Drexel University


 Does anyone know of (or have) any code or info on reading/writing
MODS on a MAC? I would like any info possibel including specs.
I dont really need any sample mods, and I am farmiliar with
MOD players such as SoundTracker.... What I am interested is
writing an app that will allow you to create mods on a MAC.

Any help would be appreciated.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ David M. Asbell       udasbell@mcs.drexel.edu  ~
~  (215)243-1234        David48 on AOL           ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Newsgroups: comp.sys.mac.programmer