HDTenEightyP/NetNews huggingface dataset:
From: dave@harlqn.co.uk (Dave Emmerson)
Subject: Re: Stallman and friends
Organization: Harlequin Limited, Cambridge, England
	<C0Esxu.2tA@newsserver.technet.sg>
Date: Wed, 6 Jan 1993 13:20:29 GMT


   In article <1993Jan5.075021.970@shawn.uucp> root@shawn.uucp (Mark Jeghers -- UNIX/X/Motif Contractor) writes:
   >peirce@outpost.SF-Bay.org (Michael Peirce) writes:
   >
   >
   >>Also, Stallman doesn't not intend to "GIVE SOFTWARE AWAY FREELY" as
   >>you say.  That's the little trap he sets.  All GNU software is very
   >>specifically not placed into the public domain.  This is not being
   >>picky, it goes straight to the core of what FSF and GNU software is
   >>all about, that is politics.
   >            ^^^^^^^^^^^^^^^^
   >
   >Please clarify.  What exactly do you believe are the real motives
   >of FSF and GNU?

>   Stallman, himself, is very clear on his objectives: he wants a tax on
>   computer hardware to subsidize software development. Hardly a selfless
>   agenda.

This kind of tax has been around for a while now - blank musicassette
tapes carry a tax on the assumption that a certain proportion of them
will be used to to make copies of recorded material which contravene
the copyright laws (i.e. not solely for the enjoyment of the original
purchaser of the recorded works).

Well, of course we can sympathise with the artist/author, who _knows_
that his income is quite seriously diminished by piracy, but hey, we've
been found guilty without a trial, and are being made to pay for it
without leave to appeal, so how do you feel about that? Does it
discourage piracy? Quite the reverse, I suspect! Unfortunately, I
don't have a better idea. (A _dongle_ for every CD? No way Hose!)

	Dave.

----- My .sig is still on leave.

	

Newsgroups: comp.sys.mac.programmer
From: howard@netcom.com (Howard Berkey)
Subject: Why does BinHex exist?
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Thu, 7 Jan 1993 21:01:59 GMT


Periodically people post asking what BinHex is, or where to get it,
etc... What I want to know is, Why is it really necessary?  It:

A.  Makes the files larger than a binary format
B.  Is annoying to have to convert
C.  Doesn't seem to do anything

I claim C because I have had many mac files stored on a UNIX file
system for long periods of time, in MacBinary II, with no ill effects.
This has proven true on various Suns, 2 RS-6000's, and 2 HP-9000's.
It may be that some machines will damage mac files if they aren't
binhexed, and thus it would be neccecary in that case.  It just
occured to me that it may be neccary for uucp or bulkmail, but I'm not
sure.  Can someone enlighten me on this subject?  I know I'm missing
something. 

-Howard

p.s. If you don't have binhex and are wondering where to get it, you
have 3 options.  You can either get a converter from apple
(ftp.apple.com) or free/shareware on all the usual archives, or you can get
a file compression utility which will debinhex stuff (Stuffit-Lite,
etc) or you can get mcvert, a unix utility which will do it on the
unix box.  mcvert, if not already on your unix machine, is available
via in a .shar format from sumex-aim.stanford.edu.  It will also
decompress files in some formats (though I've never used this).  I
like mcvert because I don't have to wait on my cpu to debinhex stuff,
-- 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Howard Berkey                                   	   howard@netcom.com
"These check boxes actually function as check boxes." - from a SW spec
... .. ...   ... .. ...   ... .. ...    ... .. ...   ... .. ...   ... .. ...
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.games
From: grass@cs.uchicago.edu (Joshua Grass)
Subject: Re: Code for drawing a sprite desired.
Keywords: Bring out the sprites!!!
Organization: Department of Computer Science, University of Chicago
Date: Sun, 10 Jan 1993 22:20:55 GMT

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?
>
> Here's what I have in mind.  A short program that loads in a PICT containing
>a sprite and its mask into an offscreen grafPort and the copyBits the sprite
>into a visible window.
>
> I suspect that anyone who would provide us neophytes with this little
>tidbit would earn the undying gratitude of many a ThinkC tinkerer.
>
> I may just be dense, but pouring over sample code and IM, it is not at all
>obvious to me how to use copyBits.
>
>Thanks,
>John
>

Actually, sprite is not the correct term, (What is that from, TI 99's?) what
the new equivalent of what you are doing is called is an icon.  This is pro-
bably what you want unless the image you want to move is larger than 64x64
in which case things can get messy.  With Icon's you can build both the image
and the mask using Res-edit, which if you don't know how to use, you should
learn ASAP if you want to program on the mac.  I can't teach you how to pro-
gram a mac, but an EXCELLENT book for beginners in the Mac programming Primer
volume I and II.  It won't teach you how to make a game, but it will teach
you how to make great applications and how to use the inside mac books.

							Joshua
Newsgroups: comp.sys.mac.programmer
From: John Brewer <jbrewer@wri.com>
Subject: Re: THINK Reference comments wanted.
X-Xxmessage-Id: <A7777B9013016707@pubs7.wri.com>
X-Xxdate: Mon, 11 Jan 93 01: 31:28 GMT
Organization: Wolfram Research, Inc.
X-Useragent: Nuntius v1.1.1d16
Date: Tue, 12 Jan 1993 01:31:14 GMT

THINK Reference comments wanted.

I've been using Think Reference for the past week or so.  Version 2.0
just came out, and it is way cool.  For instance, to answer your
question, I just switched over to Think Reference, entered "printing ma"
<return>, and was presented with a screen listing all the printing
manager calls, as well as two code examples.  I clicked on the link for
one of the code examples, and the entire code example instantly appeared
on my screen.  Had I wanted to, I could have copied it and pasted it here
(modulo Symantec's copyright).  Total elapsed time: 15 seconds.

I used to use something called "Programmers Online Companion."  It was an
INIT that let you search for toolbox calls, and would type them into your
editor for you.  As an INIT, it was always taking up RAM, whereas Think
Reference is a full fledged application that you can quit any time.  I
used Now Menus to make Command-Help either launch or switch to Think
Reference which makes it almost as convenient as Programmer's Online
Companion.

Think Reference is definitely an important part of a balanced diet for
any Mac programmer.  But you probably still need Inside Macintosh (all 9
volumes $$$$$$$) if you are serious.  Also, get some sort of framework. 
There are several skeleton applications available from sumex, and similar
sources.  Working with a skeleton app takes care of all the hard stuff,
so you can concentrate on your application domain.  Still, expect a
learning curve of 6 months to a year if you have never written
event-driven programs before.

One hint: You can probably get Think Reference by mail order for less
than the offer from Symantec.  Shop a couple places, though, as prices
vary by as much as $20.

Oops! I just went back and noticed that the code example on printing
seems to be available in "C" only.  Sorry.  Perhaps someone who uses
Pascal primarily can provide more illumination.

John Brewer

p.s.  Does anyone know how to create new Think Reference Databases? 
T'would be cool.
Newsgroups: comp.sys.mac.programmer
From: peter@cujo.curtin.edu.au (Peter N Lewis)
Subject: Re: Summary: High Level File Manager routines (H-routines)
Followup-To: comp.sys.mac.programmer
Organization: NCRPDA, Curtin University
Date: Wed, 13 Jan 1993 01:01:07 GMT

In article <peter-120193120945@rocky.curtin.edu.au>,
peter@cujo.curtin.edu.au (Peter N Lewis) wrote:

Here's me trying to save Jon some time and he goes and points out errors to
me! oh well :-)

> OSErr:=HOpenDF(vRefNum_INTEGER,dirID_LONGINT,fileName_Str255,
> permission_SignedByte,VAR_refNum_INTEGER);

HOpenDF is not available under System 6.  I have no idea what the
difference is between it and HOpen (which is (as with all the other H
routines) available under 6 & 7.  So just use HOpen.

Have fun,
   Peter.

_______________________________________________________________________
Peter N Lewis <peter@cujo.curtin.edu.au>             Ph: +61 9 368 2055
Newsgroups: comp.sys.mac.programmer
From: tj@kona.cs.ucla.edu (Tom Johnson)
Subject: GWorlds and Windows - a problem....
Organization: UCLA, Computer Science Department
Date: Fri, 8 Jan 93 23:31:36 GMT


Hello-

I'm having a little bit of trouble with an offscreen world and a window.

Perhaps the easiest way to explain is to provide a small, but complete
piece of source code that demonstrates the problem.  This code can be cut
and pasted into a Think C 5.0.4 project w/ MacTraps.  

When WORKING is defined as TRUE, the program executes successfully.  When
it is FALSE, the program crashes at the NewCWindow() call. (Note for
those that try to reproduce this error:  It crashes my IIci badly enough to
require a restart). 

All that is different in the working and non-working versions is the
location of the NewCWindow() call.  If NewCWindow() is called before
I attempt to draw into the offscreen world, everything is hunky-dory....but
if I try to call NewCWindow after the drawing has occurred, NewCWindow()
crashes.

Any ideas why?

I'd like to be able to create the window after I've done all my drawing, if
possible.

Thanks-
  Tom
------cut here-----
#include <QDOffscreen.h>

#define WORKING TRUE  // change this to false to crash your mac.
                      // Why does this happen?
main()
{
   Rect        offR, windR;
   WindowPtr   wind;
   GWorldPtr   offWorld;
   RGBColor    rgbBlack = {0,0,0};
   RGBColor    rgbWhite = {65535,65535,65535};
   OSErr       err;
   GDHandle    SaveGD;
   CGrafPtr    SavePort;

   InitGraf(&qd.thePort);
   FlushEvents(everyEvent, 0);
   InitWindows();
   InitDialogs(nil);
   InitCursor();
	
   offR.top = offR.left = 0;
   offR.bottom = offR.right = 100;

   windR = offR;
   OffsetRect(&windR, 40,40);	// move window down and over.

   GetGWorld(&SavePort, &SaveGD);

   err = NewGWorld(&offWorld, 8, &offR, nil, nil, 0);

#if WORKING	// if called here, it'll work
   wind = NewCWindow(nil, &windR, "\p", TRUE, zoomDocProc, 
                     (WindowPtr) -1, TRUE, 0);
#endif
   SetGWorld(offWorld, nil);
   PaintRect(&offR);  // Just fill it w/ black

#if !WORKING	// this will crash spectacularly
   wind = NewCWindow(nil, &windR, "\p", TRUE, zoomDocProc, 
                     (WindowPtr) -1, TRUE, 0);
#endif
	
   SetGWorld(SavePort, SaveGD);

   RGBForeColor(&rgbBlack);
   RGBBackColor(&rgbWhite);

   CopyBits((BitMap *) *offWorld->portPixMap,
            (BitMap *)&wind->portBits, 
            &((**(*offWorld).portPixMap).bounds), 
            &wind->portRect, srcCopy, nil);
	
   while (!Button())	// loop until mouse click
        ;
}
--------------END OF FILE-----------------
-- 
Tom Johnson             "They say Confucious does his crossword with a pen."
tj@cs.ucla.edu                               -Tori Amos
From: ekstrom@oce.usc.edu
Newsgroups: comp.sys.mac.programmer
Subject: Address/phone number of MacTutor and status?
Date: 5 JAN 93 09:37:06
Organization: University of Southern California
Distribution: usa
NNTP-Posting-Host: oce.usc.edu


Could someone please send me the address/phone number of MacTutor?
I tried ordering a subscription last summer but the magazine never
showed up and I have since misplaced their phone number. Does
MacTutor still exist? or did they just screw up my order?

Thanks, Harold

Harold Ekstrom                           Internet: ekstrom@geo.usc.edu
University of Southern California        CIS: 73160,230
Dept. of Geological Sciences
LA CA 90089 
Xref: sparky comp.sys.mac.programmer:20669 comp.os.ms-windows.programmer.tools:1865
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer,comp.os.ms-windows.programmer.tools,comp.windows.ms.programmer
Subject: Apple Marketing
Date: 5 Jan 93 09:46:25 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <D2150035.mrrnh5@outpost.SF-Bay.org> peirce@outpost.SF-Bay.org (Michael Peirce) writes:

>creative development at Apple both from a purely technical standpoint
>and also from the equally important marketing standpoint.

Well, actually, Apple Marketing doesn't suck as much now as it
did a few years ago, but it's not on target yet. (Though the
"how to do it our way and the other way" thing was in the right
direction. After everyone's said that for 5 years...)

>began.  I'm not surprised, in the scheme of things Stallman and his
>ilk are just annoying blips on the screen.

You mean dead pixels on Active Matrix screens? :-)
I won't trade my PB170 until there's a color PB.

Cheers,

							/ h+

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

   Cookie Jar: Vanilla Yoghurt with Crushed Oreos.
Newsgroups: comp.sys.mac.programmer
From: neeri@iis.ethz.ch (Matthias Neeracher)
Subject: Re: YACC again
Organization: Integrated Systems Laboratory, ETH, Zurich
Date: Fri, 8 Jan 1993 16:32:53 GMT

In article <1993Jan7.204625.316@physc1.byu.edu>, neilsend@physc1.byu.edu writes:
> Thanks for those who gave me the suggestions on a YACC compilier for
> the MAC.  I really can't afford the commercial compilier and when
> I found BISON I discovered it ran under MPW and not Think-C.  I
> found a file called POSIX that contains various libraries used to
> convert the GNU stuff.  I then found the GNU BISON and am planning
> to try and compile the thing.  I am sure that it will not be as
> easy as all that.  So I am wondering if there is a BISON that 
> runs with Think-C or something equivalent.  Alternative suggestions
> also accepted.

There are at least two Think C bisons:

nic.switch.ch, software/mac/src/think_c/Bison-1.18.cpt.bin
maths.tcd.ie, somewhere

If you feel you *must* port a Yacc yourself, port byacc to Think C, I think
this one has not been done yet (byacc is approximately equivalent to bison,
but produces license-free parsers).

Matthias

-----
Matthias Neeracher                                      neeri@iis.ethz.ch
  "Modern electronic-rock music, inaugurated in the early 1960s,
   is, and always has been, a joint enterprise of British military
   intelligence and Satanic cults." -- Donald Phau
Newsgroups: comp.sys.mac.programmer
Subject: YACC Summary
From: goblec@physc1.byu.edu
Date: 7 Jan 93 21:46:39 -0700
Distribution: world
Organization: Brigham Young University


Thanks to all those who gave me suggestions.

There is an application version of Bison available at maths.tcd.ie
There are also quite a few files of the GNU utilities including diff,
ci, co, flex, perl and others.  The posix library for Think-C greatly
aids compilation of these routines.  There is also source code for
all of these files.  Many thanks to Timothy Murphy who did the porting.

Just a thought.  I'm sure this type of question comes up quite a bit.
Including in the FAQ a section on YACC and porting GNU software would
probably be useful.

Thanks all
goblec@theory.byu.edu

Newsgroups: comp.sys.mac.programmer
From: Anders Wallgren <anders@verity.com>
Subject: Re: Desperate MPW Questions!
Organization: Verity
Date: Sat, 9 Jan 93 02:57:58 GMT
X-Xxmessage-Id: <A7737F366C018F97@pokey.verity.com>
X-Useragent: Nuntius v1.1.1d17
X-Xxdate: Fri, 8 Jan 93 02:57:58 GMT

In article <43205@sdcc12.ucsd.edu> Whitney Cunha,
whitney@cs.ucsd.edu writes:
>1) Why won't MPW C handle function parameters that are pointers to
functions? 
>       int  ksort ( int x, int y, int (*comp)() );
>   MPW can't handle the pointer part.  Yet this is right out of
K&R, pg 119.
>   THINK C 5.0 has no problem with this.
>

No, MPW can't handle the 'comp' part - comp is a reserved word in
the MPW compiler.

>2) How do you link the math functions!  I have included the
libraries 
>   "{CLibraries}"Math.o, and then even tried compiling with the
68881 processor.
>   For example, link here won't be able to find sqrt:
>      #include <stdio.h>
>      #include <math.h>
>      void main ( )   
>       { float x = 9.0;
>         printf ("The sqrt is %f\n", sqrt(x));
>       }
>  Is it something to do with the sqrt being extended and it's
trying to find a 
>  float sqrt?  If you get this to work, can you send me your file
and MakeFile? 

sqrt is in the CSANELib.o library (or CSANELib881.o if you're using
the coprocessor).

>3) I am the only programmer where I work and the only programmer I
know who 
>   uses MPW.  Is this the only place to get help?  Calling Apple
for help is 
>   equivalent to dropping a brick on my foot (they tell me to call
the dealer 
>   who's never heard of MPW - that's why they are salesman
dammit!).  Is there 
>   anyplace where you can pay for tech services (it'd be worth
it!)?

I haven't heard of any place that provides MPW support in exchange
for money, except for Apple - you may want to consider becoming a
Third Party Developer (or whatever they call it these days).  If
you can get into the right program, you will get Tech Support from
Apple.  On the other hand, I've seen many questions get answered on
the net (and answered a couple myself), so you might be able to get
along fine on that, as long as you're comfortable with the lack of
guaranteed service.

>4) Since I have you here, is there any way to make it so that the
>   return key works like the enter key?  And is there a full
version
>   of 'vi' available for the Mac (one where you can resize
windows)?
>   Where do you get those helpful items like Tech notes and such?

Somewhere along the line, the MPW SetKey command showed up - I'm
not sure if there's a primitive for the Enter command, but you
might want to look around there.  I don't know about any versions
of vi (or why you'd want one ;)).  For tech notes, either join up
with the developer program, get a subscription to Develop (which
gets you the developer CD, I believe), buy ETO, or try
ftp.apple.com (they tend to be a little out of date here).

anders
Newsgroups: comp.sys.mac.programmer
From: cole@alexia.lis.uiuc.edu (Sandra Stewart-Cole)
Subject: Re: Developing for 6 & 7
Organization: University of Illinois at Urbana
Date: Tue, 12 Jan 1993 10:38:19 GMT


Supposedly the gestalt glue manages to approximate the trap even on systems 
where it isn't there. (thru SysEnvirons calling) but the simplest thing to do 
is either narrow your scope and test it before you release (i.e. check all the
versions you are willing to support forthe features you want) or just use 
Gestalt and/or SysEnvirons to see if calls are available. 

The things you have to check for are basically anything in vol. 6 and much of 
vol. 5 if you want to support Pluses and older systems (like back to 6.0.0) and
just go ahead and use v. 1-4 freely.
Newsgroups: comp.sys.mac.programmer
From: siegel@world.std.com (Rich Siegel)
Subject: Re: Why is new(p) so slow in THINK Pascal?
Keywords: THINK Pascal, dynamic variables
Organization: GCC Technologies
Date: Fri, 8 Jan 1993 14:58:43 GMT

In article <4940@svin09.info.win.tue.nl> wstomv@win.tue.nl writes:
>In order to compare some sorting procedures for linked lists (implemented
>in THINK Pascal) I applied them to random lists of varying lengths.
>It turns out that the procedure new(p), which allocates storage for
>a dynamic variable pointed to by p, is extremely slow.  Does anyone
>know why?  New-ing a thousand items takes a noticeable time, new-ing
>10,000 items takes minutes (on my lowly SE/30).

New() for pointer variables simply calls NewPtr. With that many small
blocks, you're overloading the Memory Manager, which has to find space
low in the heap each time you call New. Under the circumstances, you
might want to think about an alternative storage strategy.

Starting with an initial free list of pointer blocks is OK, but you're
still hammering the Memory Manager - you might want to think about
allocating a single large chunk and using pieces of it as you need them.

R.


-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Senior Software Engineer
GCC Technologies
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: Proper way to do Self-Modifying code?
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Mon, 4 Jan 1993 12:03:53 GMT

In <wfFp_jO00WB707kGgq@andrew.cmu.edu> at15+@andrew.cmu.edu (Andrew Lewis Tepper) writes:

>Is there an accepted way to do this on the Mac?  I know that
>self-modifying code can cause problems on chips with caches, so I want
>to be as "kosher" as possible.

	if ( TrapAvailable ( _HwPriv ) ) {

		/* FIC also calls FlushDataCache */
		FlushInstructionCache ( ) ;
	}

Of course you'll want to put the result of TrapAvailable in
a global at startup. Not to mention first modifying ALL the
figures, then flushing the cache ONCE before starting to
call the code.

However, I think you could write the code quite conflict-free
and as fast using just address-register-relative addressing
and maybe a data register for rowBytes. Modifying the instructions
data takes time to do; I think using a register pair would be
FASTER - and more compatible.

Cheers,

							/ h+

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

 -- I don't fear death, it's dying that scares me.
Newsgroups: comp.sys.mac.programmer
From: walrath@faw.uni-ulm.de (Wayne K. Walrath)
Subject: Getting List of files contained in folder
Organization: FAW (Research Institute For Applied Knowledge Processing, Ulm, Germany)
Date: Mon, 11 Jan 1993 11:38:21 GMT

I have been reading through the New IM-Files trying to figure this one
out: if I have a folder specification (like when I have thrown up a
dialog for the user to choose one) how can I get a list of all the files 
and folders contained in the folder?
  Is it possible to use the new Cat Search function 
available under 7.x (_FSBCatSearch or something similiar) but limit it to 
only the folder in question?

I would appreciate a general explanation of how to do this, or better
still some code.

thanks,

-wayne
walrath@faw.uni-ulm.de
Newsgroups: comp.sys.mac.programmer