HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.sys.mac.programmer
Subject: Yacc on Mac
From: goblec@physc1.byu.edu
Date: 6 Jan 93 17:20:04 -0700
Distribution: world
Organization: Brigham Young University

I am writing a simple language parser for a hypertalk like language.
I am thinking of doing the parser on a MIPS using C and YACC and
then bringing the C code over to the Mac.  Unfortunately I am
not sure how easy this will be.  A better solution would be a
Yacc compilier or equivalent for the Mac that works with Think C.
Does anyone know of something like this?  Thanks.

Clark Goble
goblec@theory.byu.edu

Newsgroups: comp.sys.mac.programmer
From: frantzen@nosc.mil (Louise E. Frantzen)
Subject: How to find fRefNum?
Keywords: fRefNum file reference number AIFF
Organization: Naval Ocean Systems Center, San Diego, CA
Date: Mon, 4 Jan 1993 17:54:35 GMT


Hello everyone, 

Could someone please tell me exactly what an fRefNum is and how one
obtains this mysterious number? I am looking at Inside Mac VI page 22-100
at the SetupAIFFHeader call whose first argument is an fRefNum.  I have 
looked through all the Inside Macs I can get my hands on and can't find
any useful piece of information.  I've also looked at THINK Reference an
a few other places to no avail.  

According to the description at the bottom of the page, "The fRefNum 
parameter contains a file reference number for a file that is open for
writing." But I can't find anywhere that says how you know what the file
reference number is.  Please forgive me if this is blazingly obvious.

Thanks in advance, 
Louise
-- 
Louise E. Frantzen NRaD, San Diego CA 	"And if you try to cut me down
frantzen@nosc.mil		 	 I know that you'll succeed "
(619) 553-7863					- A. Lennox
From: sainaney@unixg.ubc.ca (Narayan R. Sainaney)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Default buttons in dialogs
Date: 7 Jan 1993 20:25:41 GMT
Organization: University of British Columbia, Vancouver, B.C., Canada
Distribution: world
NNTP-Posting-Host: unixg.ubc.ca

In article <880840m.29.726366713@axe.acadiau.ca> 880840m@axe.acadiau.ca (MICHAEL ALEXANDER MCKAY) writes:
>
>Whenever I make a dialog box with ResEdit, my "OK" buttons, which are always
>the number 1 button, fail to show up in my app with the heavy outline around 
>them. What am I doing wrong?
>
>

	You have to use QuickDraw calls to draw that round rect around   
your default button. Set PenSize to (3,3) and use FrameRoundRect(?? or some
routine like that =). Use GetDItem to get the items rect.

hope this helps...
sainaney@unixg.ubc.ca
From: rudolph@unixg.ubc.ca (Christopher E Rudolph)
Newsgroups: comp.sys.mac.programmer
Subject: MacMINIX Update.
Date: 12 Jan 93 21:12:40 GMT
Organization: The University of British Columbia
NNTP-Posting-Host: unixg.ubc.ca
Summary: I have Prentice-Halls phone # for Toronto, Canada.
Keywords: Mac MINIx unix etc...


Someone mailed me asking for the # and I mistakenly deleted his address.
For anyone in Canada who is interested in MacMINIX -> Prentic Hall (a book
publisher) sells the product (unofficial- I haven't had time to actually
call and ask them about the price and distribution)

Their Telephone # is 1-416-293-3621.

Chris Rudolph (ComputerScience, UBC) <rudolph@unixg.ubc.ca>
=---------------------------------------------------------=
From: bowman@reed.edu (BoBolicious)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Default buttons in dialogs
Date: 7 Jan 93 02:26:57 GMT
Article-I.D.: reed.1993Jan7.022657.24159
Organization: Reed College, Portland, OR

In article <880840m.29.726366713@axe.acadiau.ca> 880840m@axe.acadiau.ca (MICHAEL ALEXANDER MCKAY) writes:
>Whenever I make a dialog box with ResEdit, my "OK" buttons, which are always
>the number 1 button, fail to show up in my app with the heavy outline around 
>them. What am I doing wrong?

Sounds like you're not drawing the heavy outline. ;-)
Seriously, there's nothing I've seen anywhere that would indicate this
happens automatically...whatever gave you that idea?

Anyhow...

There are several ways to do it.  One is to make a userItem whose sole purpose
in life is to draw the outline whenever the dialog is updated.  Or you can
do the simple-but-not-quite-as-kosher thing, right before you call ModalDialog:

GetDItem(theDialog,1,&DType,&DItem,&itsFrame);
InsetRect(&itsFrame,-4,-4);
PenSize(3,3);
FrameRoundRect(&itsFrame,16,16);
PenSize(1,1);

...or something like that.  I think the 16's are "standard".

cheers,
bobo              In seeking the unattainable,
bowman@reed.edu            simplicity only gets in the way.
"On Monday, numbers floated everywhere, and the world was full of 
approximations."  -- Spencer Heinz, _The Oregonian_, 1/5/93
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Default buttons in dialogs
Date: 8 Jan 93 13:54:24 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <1ii3k5INNk3h@skeena.ucs.ubc.ca>, sainaney@unixg.ubc.ca (Narayan
R. Sainaney) wrote:
> 
> In article <880840m.29.726366713@axe.acadiau.ca> 880840m@axe.acadiau.ca (MICHAEL ALEXANDER MCKAY) writes:
> >
> >Whenever I make a dialog box with ResEdit, my "OK" buttons, which are always
> >the number 1 button, fail to show up in my app with the heavy outline around 
> >them. What am I doing wrong?
> >
> >
> 
> 	You have to use QuickDraw calls to draw that round rect around   
> your default button. Set PenSize to (3,3) and use FrameRoundRect(?? or some
> routine like that =). Use GetDItem to get the items rect.
> 

Sample code to do what Sainaney suggests, above, is in the sample
application Chassis 4.3.1 posted at sumex-aim.stanford.edu, and
mac.archive.umich.edu.  You also can ftp directly from us at ftp.gte.com
(directory /pub/chuck).  Chassis may also answer other questions which you
will have later as you develop your app.

Chuck Hoffman
chuck@gte.com
GTE Laboratories, Waltham, Massachusetts, USA
(617) 466-2131
=====================================
I'm not sure why we're here, but I am sure that while we're here we're
supposed to help each other.
=====================================
From: shebs@apple.com (Stan Shebs)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sozobon (or other free C's): would this strategy work?
Date: 6 Jan 93 18:09:08 GMT
Followup-To: comp.sys.mac.programmer
Distribution: comp
Organization: Apple Computer Inc.

In article <C0E7xv.A57@news.cso.uiuc.edu>, e-sink@uiuc.edu (Eric W. Sink)
wrote:
> Someone else (sorry, forgot the name) countered the post with "Why not
> port Gcc?"  Good points there too.  But how easy is GCC to port, really?...
> 
> Hard.  Stan Shebs and Co. have been working on porting gcc 2.x for quite
> a while now.

Actually, the 2.1 port works right now!  It has got some problems and
limitations, which have to be cleaned up before we're willing to unleash
it on an unsuspecting public.  I always live in fear that some enraged
developer, after spending three days hunting down a bug that turned out
to be the compiler's fault, will come looking for me...

Personally, I would like to see a small free C compiler for the Mac.
It might be worthwhile to investigate a "GCC Lite" that omits a bunch
of optimizations, perhaps streamlines some of the obscure machine
description stuff, and outputs straight into an in-core assembler.
You could cut its static size in half, probably speed it up by a
factor of four or more perhaps.  Past that, you'd have to think about
stripping the nice error messages and suchlike, seems like even
amateurs would be willing to pay a bit extra in memory to get
better error messages.

Stan Shebs
ATG System Software
shebs@apple.com
Newsgroups: comp.sys.mac.programmer
Subject: Think P & Printtraps.p
From: misc042@cantua.canterbury.ac.nz (Mr M J Miller)
Date: Fri, 8 Jan 1993 00:27:36 GMT
Organization: University of Canterbury, Christchurch, New Zealand.
X-Newsreader: TIN [version 1.1 PL8]


Hi,
This pice of printing code works fine in a compiled application,
but why does Think Pascal 4.01 intermittenly barf with error message
something like "Launch and Chain not allowed" ?
 
Is it me or is it Think Pascal?
The error is near the first close.
 
procedure document.mprint;
      var
         hPrtRec: THPrint; { Printer info record  handle }
         pPrPort: TPPrPort; { Printer graphport etc }
         iErr: osErr; { error codes }
   begin
      PrOpen;
      iErr := PrError;
 
      if (iErr <> noErr) then
 
      else { PrOpen OK! }
      begin
         hPrtRec := THPrint(NewHandle(sizeOf(TPrint)));
         if (hPrtRec = nil) then
 
         else { newHandle OK ! }
         begin
            PrintDefault(hPrtRec);
            iErr := PrError;
 
            if (iErr <> noErr) then
 
            else { PrintDefault OK! }
            begin
               if (PrStlDialog(hPrtRec)) & (PrJobDialog(hPrtRec)) then
               begin { dialogues OK! }
                  pPrPort := PrOpenDoc(hPrtRec, nil, nil);
                  iErr := PrError;
 
                  if (iErr <> noErr) then
 
                  else { PrOpenDoc OK! }
                  begin
                     PrOpenPage(pPrPort, nil);
                     iErr := PrError;
 
                     if (iErr <> noErr) then
                        eNotify('at PrOpenPage', 'Aborting Print', iErr)
 
                     else { PrOpenPage OK! }
                        drawPrinter;
                  end;  { PrOpenDoc OK! }
 
                  PrClosePage(pPrPort);
                  iErr := PrError;
 
                  if (iErr <> noErr) then
               end; { dialogues OK! }
 
               PrCloseDoc(pPrPort);
               iErr := PrError;
 
               if (iErr <> noErr) then
            end; { PrintDefault OK! }
 
            DisposHandle(handle(hPrtRec));
         end; { newHandle OK! }
      end; { PrOpen OK! }
 
      PrClose;
      iErr := PrError;
 
      if (iErr <> noErr) then
         eNotify('during print loop or at driver close', '', iErr)
   end;
 
Any help would be appreciated.
 
misc042@cantua.canterbury.ac.nz OR
m.miller@csc.canterbury.ac.nz
(I am no way employed by,
   or a spokesperson of,
      the University of Canterbury)
Newsgroups: comp.sys.mac.programmer
From: freek@phil.ruu.nl (Freek Wiedijk)
Subject: Re: Why the Piracy? Here's why...
Organization: Department of Philosophy, University of Utrecht, The Netherlands
Date: Sat, 9 Jan 1993 21:40:44 GMT

I would prefer a world in which there were no intellectual
property laws.  I don't think it is unethical to copy
something.  At least, not when the copying doesn't disturb
the use of the original item.

My reasons for this are the following:
1. It's the status quo.  Everyone _already_ copies everything
   (from CD's on DAT, to software on disks, to books on
   paper).
2. I would like there to be a giant reservoir of knowledge
   that's free for everyone to add to or take from (e.g., the
   complete library of congress, digitalized, on the
   Internet; can you say Xanadu? I knew you could!)  And I
   mean that _everything_ should be in it (all science, all
   literature, all music, all art, etc.).  The _main_
   obstacle for this kind of enterprise is intellectual
   property law.
3. If there was no restriction on copying, there would be a
   much more `darwinistic' evolution in intellectual
   products.  Inferior programs would stand a much smaller
   chance of ever being used.  (Example: if Apple software
   was not protected by copyright law, there would be cheap
   Macintosh clones, and _no-one_ would use MS-DOS or
   Windows.)
4. The highest grade information that I know is `science'.
   Try to imagine a world in which you had to _pay_ for each
   scientific article that you need to look at for your
   research or if you wanted to build on the results from
   such an article.  In what state would science be in such a
   world.  In other words: I prefer the way information is
   handled in science to the way it's handled in the software
   industry.

Of course, this whole article is just wishful thinking :-)

Freek
--
Third theory of Phenomenal Dynamics:  The difference between
a symbol and an object is quantitative, not qualitative.
Newsgroups: comp.sys.mac.programmer
From: jess@gn.ecn.purdue.edu (Jess M Holle)
Subject: Best method of avoiding code/data segment issues
Organization: Purdue University Engineering Computer Network
Date: Sat, 9 Jan 93 04:43:28 GMT

I am in the process of getting a large chunk of C++ code from a
UNIX workstation (SGI) to compile on the Mac.  Although I have
not gotten everything to compile, I am getting relatively close.
My problem is that I want to avoid messing with code/data 
segmentation issues as much as possible.

What is the best way to do this? -model far? -br? -bigseg?  How
much do any of these affect code-size/performance (not too 
important)?  Any bugs/incompatibilities to watch for?

If it matters any, the final link will be based on a half dozen
libraries.  Some of these have been placed in named segments, but
most haven't and I'd rather not bother if I don't have to.

Thanks a lot (this newsgroup is a BIG help, thanks to all of you).


Jess Holle
Newsgroups: comp.sys.mac.programmer
From: sethi@pokey.cis.udel.edu (Adarshpal S Sethi)
Subject: TextEdit field in Modeless Dialog
Organization: University of Delaware, Newark
Date: Mon, 4 Jan 1993 15:00:47 GMT

I am trying to write a Modeless Dialog in which I
need to read in two items from the user using
TextEdit fields. I cannot quite figure out how to
get this working. Is there any example of source code
or any other description of how to achieve this?
I am using Think C but even Pascal code will be fine.

Thanks for all responses,

Adarsh Sethi
sethi@udel.edu
From: rudolph@unixg.ubc.ca (Christopher E Rudolph)
Newsgroups: comp.sys.mac.programmer
Subject: StripAddress Question.
Date: 7 Jan 93 05:01:27 GMT
Organization: The University of British Columbia
NNTP-Posting-Host: unixg.ubc.ca
Summary: A quick question on writing directly to the screen and StripAddress()
Keywords: stripaddress think c help question


Hello all,

I hope this isn't an FAQ, but here goes.  

I have been looming over the thrill of writing directly to the screen, and
I find it very interesting.
One question though:

	Could anyone give me a bit of theory as to why the high byte of the
	starting address of say a color icon has to be stripped before 
	accessing video memory.

	I did this when I was already in 32bit mode and all I got was garbage
	on the screen.  If I omit it I get what I expect.

	I am new to this low level stuff and would really appreciate a bit of
	an explanation.

I hope that was clear enough.

Chris Rudolph <rudolph@unixg.ubc.ca>
------------------------------------
Newsgroups: comp.sys.mac.programmer,comp.os.ms-windows.programmer.tools,comp.windows.ms.programmer
From: holiday@bnr.ca (Matthew Holiday)
Subject: Re: Stallman and friends
Date: Thu, 7 Jan 1993 15:10:10 GMT
Reply-To: holiday@bnr.ca
Organization: Bell-Northern Research, Richardson, TX

In article <jahnke-060193152341@jahnke.biosci.arizona.edu>, jahnke@biosci.arizona.edu 
(Jerome Jahnke) writes:
|> 
|> Well to be honest "free" T.V. is on it's way out. Cable TV and subscription
|> TV are making a strong running. The three networks (NBC, CBS, and ABC) are
|> in real trouble. Cable TV has the advantage of both getting money from the
|> customers, but also getting money from advertisers. While many cable
|> companies are adding stuff to "basic" cable they are also raising prices
|> (we get a hike for each addition to basic.
|> 

Long live PBS!  It may not be free --- I pay for it, do you? --- but it's worth
every penny.  Everything else is trash, anyway.

-- 
Matt Holiday                                      #include <std/disclaimer>
holiday@bnr.ca
BNR Richardson, TX
Newsgroups: comp.sys.mac.programmer
From: jmunkki@vipunen.hut.fi (Juri Munkki)
Subject: Re: Alternate Screen buffer in newer macs?
Keywords: Alternate screen buffer, animation
Reply-To: jmunkki@vipunen.hut.fi (Juri Munkki)
Organization: Helsinki University of Technology
Date: Wed, 6 Jan 1993 14:37:54 GMT

In article <1993Jan6.023536.4928@netcom.com> ray@netcom.com (Ray Fischer) writes:
>markkj@muse.cs.mu.OZ.AU (Mark Johnston) writes ...
>>    G'day.  I was wondering if anyone could tell me if the newer macs (ie
>>anything above a Plus... :) still have the alternate screen buffer?
>
>Yes, I can.  No, they don't.

It's not quite as simple as this.

>In fact, many of the newer Macs don't (or didn't) have _any_ screen
>buffer, relying instead on plug-in video cards.

A NuBUS video card will usually contain a frame buffer and video RAM.
It's not really different from built-in video, since built-in video
hardware looks like a NuBUS card to the system software.

>I suppose you might
>be able to hack something that would futz with the buffer start
>address on some video cards / systems, but it would be truly nasty
>stuff that would break the moment Apple looked at it funny.

The Apple 32-bit video card design guidelines and sample driver
code give instructions on how to give access to multiple video
pages. The 8 bit video card has this capability in 1/2/4 bit
deep modes, but lacks the memory in 8 bit mode. The problem is
that you can't ever rely on having more than one page. There are
a lot of machines where you can't have more than one frame buffer.

Oids uses multiple video pages quite successfully and flickers
horribly when only one page is available.

>If you
>want to be at all portable, use either CopyBits, or if that isn't fast
>enough try copying directly to the video RAM (but make sure you know
>how to do it _properly_, it ain't easy).

Copybits is quite fast, if did all the work on an offscreen buffer, but
it's usually faster to draw the animation directly onto the screen.

To draw into video memory directly, you have to read the 32-bit video
card document I mentioned (I found it on ftp.apple.com) and know almost
everything about graphics devices (IM V and VI).

IMO, it's not hard. You just have to figure it out once. The keys to
doing it correctly on color machines are:

	ShieldCursor
	SwapMMUMode


-- 
  Juri Munkki					       Windsurf: fast sailing
 jmunkki@hut.fi					      Macintosh: fast software
Newsgroups: comp.sys.mac.programmer
From: howard@netcom.com (Howard Berkey)
Subject: Best and worst Mac values of all time
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Tue, 5 Jan 1993 18:33:18 GMT

In article <1993Jan5.111253.3736@alijku05.edvz.uni-linz.ac.at> Norbert Mueller <K360171@alijku11.edvz.uni-linz.ac.at> writes:
>Re: Best Mac value of all time
>
>I vote for a IIci - not so much because of its price (I got it at 50% dev
>discount) but because it is the most long lived and most upward
>compatible 
>(32 bit QD, 32 bit clean ROMS) expandable Mac II class machine.
>
>I also would like to start another opinion poll for the
>
>WORST MAC VALUE OF ALL TIME (including peripherals)
>
>my number one for this list is definitely the 8.24GC card 
>



Any apple Hard Drive before 1991

	and

The Mac "Portable" when it came out


-Howard


-- 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Howard "Pasty-faced" Berkey                       	   howard@netcom.com
		    I just don't want to know, anymore.
... .. ...   ... .. ...   ... .. ...    ... .. ...   ... .. ...   ... .. ...
Newsgroups: comp.sys.mac.programmer
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: Re: Think Ref 2.0
Organization: Symantec Corp.
	<PHILS.93Jan8083854@chaos.cs.brandeis.edu>
	<1993Jan8.213017.15996@cs.ucla.edu>
	<PHILS.93Jan9170436@chaos.cs.brandeis.edu>
Date: Sun, 10 Jan 1993 03:40:10 GMT

In article <PHILS.93Jan9170436@chaos.cs.brandeis.edu> phils@chaos.cs.brandeis.edu (Phil Shapiro) writes:

   Neal Goldman
   Symantec Corp.
   135 South Road
   Bedford, MA 02144
               ^^^^^

Should be 01730. Sorry!
--
   Phil Shapiro                                   Software Engineer
   Language Products Group                     Symantec Corporation
		   Internet: phils@cs.brandeis.edu
From: neeri@iis.ethz.ch (Matthias Neeracher)
Subject: Re: Why does BinHex exist? (my mistake)
Organization: Integrated Systems Laboratory, ETH, Zurich
	<1993Jan8.180438.9696@netcom.com>
Date: Tue, 12 Jan 1993 10:37:17 GMT

In article <1993Jan8.180438.9696@netcom.com>, howard@netcom.com (Howard Berkey) writes:

> I should have made it clear that I know what binhex actually does.  
> My mistake was in assuming that everyone would be able to 
> have access to uuencode, which does substantially what binhex does
> (i.e. convert a binary file to 7-bit (6 for binhex but the same
> principle)) so it can be mailed/cross EBCDIC gateways/etc.).

BinHex preserves file types and both forks of a file, while uuencode
doesn't. Otherwise, they are pretty similiar (And no, I don't think
uuencode uses 7 bits, it creates files that are bigger than BinHex files).
So even if everybody had access to uuencode, I don't see a particularly good
reason to use it.

My preferred solution would be to store files in MacBinary on servers, but
make the ftp daemon translate files to BinHex if requested (Peter Lewis' ftpd
does this, if I remember correctly).

Matthias

-----
Matthias Neeracher                                   neeri@iis.ethz.ch
 "You must have picked up that copy of Scarlett instead of Inside Mac
  when you tried to find the right call..." -- Keith Rollin
Xref: sparky comp.sys.mac.programmer:21289 comp.sys.mac.games:14177
From: potts@oit.itd.umich.edu (Paul Potts)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.games
Subject: Re: Code for drawing a sprite desired.
Date: 12 Jan 1993 16:11:22 GMT
Organization: Instructional Technology Laboratory, University of Michigan
NNTP-Posting-Host: helen.oit.itd.umich.edu

In article <73404@cup.portal.com> jwhitnell@cup.portal.com (Jerry D Whitnell) writes:
>In article <1ha3ikINN7tm@uwm.edu> bowden@csd4.csd.uwm.edu (John William Bowden)
> writes:
>>Hiya,
>>
>> THere is alot of interest in writing games for the mac (myself included.)
>>If there's a kindly sagelike programmer out there with a little time on
>>his/her hands, could someone share a technique for copying a sprite from an
>>offscreen grafPort?

Just a digression on sprites - it seems a strange term to use. Some machines
such as the Commodore 64 had hardware-supported sprites: that is, the
graphics subsystem had registers that you could set to point to a little
sprite pixel map in memory, and set up the direction and velocity, and the
hardware would animate the little buggers at interrupt time. They were fun
to play with. I don't remember too many of the details, but it was an
interesting exercise to set up sprites using memory-mapped video and lots
of POKE commands from Commodore BASIC. I've never seen the term sprite used
to refer to code for Macs - is this common?

-- 
Politics is crime pursued by other means.              
potts@oit.itd.umich.edu      CI$ 71561,3362 (rarely)
Newsgroups: comp.sys.mac.programmer
From: UC525655@mizzou1.missouri.edu (Mark Eaton)
Subject: Re: need help drawing icl8s
Organization: University of Missouri
Date: Tue, 12 Jan 93 22:45:12 CST

OK, so it was a stupid question. After I posted it, I decided to peruse
the csmp digest to see if it had come up before (the flamers in the
audience will want to inform me that I should have done that *first*,
so I'll do admit it first). Sure enough, it had been hashed out, not
once, but twice before.
 
For those wondering, all the relevant info is in Tech Notes 306: Drawing
Icons the System 7 Way. It helped a lot.
 
Consequently, I downloaded the whole csmp digest for future reference;
hopefully I won't be posting too many more stupid questions now. ;)
 
On a related note: How in hell can anyone ever write mac apps without
access to the Tech Notes? Sheesh, theres so much stuff only found in
the TNs that I couldn't imagine not having them...
 
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Eaton                    |
UC525655@MIZZOU1.MISSOURI.EDU |             Eat at Joe's.
                              |