HDTenEightyP/NetNews huggingface dataset:
From: bowman@reed.edu (BoBolicious)
Subject: Re: List Manager help wanted
Organization: Reed College, Portland, OR
Date: Thu, 7 Jan 1993 07:23:35 GMT

In article <HARDIN.93Jan6231614@dino.mcc.com> hardin@dino.mcc.com (John Hardin) writes:
>Mark Sproul (Sproul@sproul.sproul.com) writes:

>>  On your other question, as far as I know, Think C does not support,
>>  	 mystring="\p Something ";

>ThinkC DOES, in fact, support Pascal string literals.  P. 206 of the
>ThinkC 5 manual states "To write a Pascal string constant, start the
>string with "\P" or "\p"."

I missed the beginning of this thread, where mystring was apparently defined,
but perhaps the key is that:

mystring = "\p somthing";

works if mystring is declared as an unsigned char *.
It *doesn't* work if mystring is a Str255 or any other array construct where
the actual storage is allocated on the stack.

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
Newsgroups: comp.sys.mac.programmer,comp.os.ms-windows.programmer.tools,comp.os.ms-windows.programmer.misc
From: tenney@netcom.com (Glenn S. Tenney)
Subject: Re: Stallman and friends
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Tue, 12 Jan 1993 07:48:07 GMT

In article <lkmpp8INN4f4@news.bbn.com> mjensen@BBN.COM (Martin Jensen) writes:
> ...
>This seems to be a win-win situation for all concerned.  Cygnus and Intel
>get  paid  for parts of the development work.  We get 2 compilers (native
>and cross) that we can *legally*  use  on  over  1,000  workstations  for
>$3,000.
> ...

(The following is based on the FSF agreements I've read a short while
ago.  Of course, things could have changed...)

Yes, you can legally use these compilers on all of your machines, and
it is a very nice compiler.  BUT --> if you ever sell your programs,
and they use the libraries (oh, let's say you do a printf somewhere),
then you must make ALL of your source code available for free.

This is a restriction that most companies can not live with.

Now, if the FSF changed their position on this, then I'd say
they're open to re-thinking certain boycotts...  Why don't they also
boycott Hayes, or IBM?  IBM does some serious work protecting their
intellectual property and they are very big on object-code-only too.



-- 
Glenn Tenney
voice: (415) 574-3420      fax: (415) 574-0546
tenney@netcom.com          Ham radio: AA6ER
Newsgroups: comp.sys.mac.programmer
From: ta-dh26@cunixa.cc.columbia.edu (Damon Horowitz)
Subject: HELP transmitting MIDI from PowerBook
Keywords: MIDI,PowerBook
Reply-To: ta-dh26@cunixa.cc.columbia.edu (Damon Horowitz)
Organization: Columbia University
Distribution: comp.sys.mac.programmer
Date: Mon, 11 Jan 1993 17:18:38 GMT


Hello all - a friend told me that you folks might be able to help me out 
with my problem.  Please excuse if this isn't the right place to ask...

I have written an application which uses a serial driver to send MIDI
data to the modem port.   Everything works on my SE.  On my PB160, the
application works but there is no MIDI output.  Hmm.

What do I need to do to send MIDI from my PB?  is it necessary to 
configure the SCC chip differently? 

Any help at all would be greatly appreciated - specifics or a general
reference that can clear this up.  Also, if anyone knows of a simple
MIDI transmit driver that I could take a look at as an example, please
let me know.

If this article is not of general interest, please send responses to me
directly.	Thanks!


- Damon Horowitz, aspiring programmer (amongst other things) 212-662-5992
- ta-dh26@cunixa.cc.columbia.edu


From: jensk@hpbbn.bbn.hp.com (Jens Kilian)
Date: Thu, 7 Jan 1993 22:05:53 GMT
Subject: Re: Porting GCC to the Mac (was: Re: Sozobon (or other free C's): would this strategy work?)
Organization: HP
Newsgroups: comp.sys.mac.programmer,comp.sys.atari.st.tech
Distribution: comp

Bob Fischer (bobf@flint.geology.yale.edu) wrote:

> * GCC is backed by the Free Software Foundation.  This is not a
> program which will lose support when one or two people taking care of
> it decide to do something else.  (I know.  I wrote The Vault, and now

Don't forget that the FSF boycotts Apple products. They won't support GCC
ports to the Macintosh.

	Jens.
--
Internet: jensk@hpbeo82.bbn.hp.com    HPDESK : JENS_KILIAN%XU@HP1200
MausNet:  Jens Kilian @ BB                     KILIAN_JENS/HP1200_XU@hpbbi4
-------------------------------------------------------------------------------
As the air to a bird, or the sea to a fish, so is contempt to the contemptible.
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> <wondertr.726513991@sfu.ca>
	<PHILS.93Jan8135651@chaos.cs.brandeis.edu>
	<1993Jan9.225929.3633@sics.se>
Date: Sun, 10 Jan 1993 03:51:24 GMT

In article <1993Jan9.225929.3633@sics.se> ollef@sics.se (Olle Furberg) writes:

     Any particular reason for not supporting arbitary selections,
   like copyright or something? I would like to make non-contiguous
   selections of the example code (some declarations at the top, and
   the most critical part in the middle).

The main reason was that supporting arbitrary selections would've
required a basic TextEdit engine. For speed, THINK Ref uses a simple
imaging model supported by DrawString or DrawText. Using TE (or some
TE replacement) would add memory overhead, slower screen drawing,
slower page changes, etc.

It was decided that copying all source code text was an adequate
solution, given our constraints of memory and speed.

	-phil
--
   Phil Shapiro                                   Software Engineer
   Language Products Group                     Symantec Corporation
		   Internet: phils@cs.brandeis.edu
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: Menus from 2 resource files?
Keywords: menus resources furry bunnies
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Wed, 6 Jan 1993 14:47:20 GMT

In <1993Jan6.010519.10559@midway.uchicago.edu> ajr3@quads.uchicago.edu (Alain Roy) writes:

>user can add or delete from the menu. of course, i wish to have the changes
>last between sessions, so after i got it working, i saved the menu in 
>the preferences file. now the menu refuses to show up when i add it

The menu structure in memory is NOT the same as that in a resource.
Instead, you should always have an empty menu, and save a representation
of its contents, and create it using InsertItem() for each item.

Cheers,

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

   Cookie Jar: Vanilla Yoghurt with Crushed Oreos.
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.oop.misc
From: gort@netcom.com (george harrington)
Subject: Re: David Betz and Bob Language
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Fri, 8 Jan 1993 09:08:54 GMT

In article <1i886lINNg1v@tamsun.tamu.edu> bpb9204@tamsun.tamu.edu (Brent Burton) writes:
>edw@distant.uucp writes:
>|
>|It's written in K&R C, and does wierd things with function arguments. For
>|instance, it'll define a function like this:
>|
>|do_expr()
>|{ [...] }
>|
>|and then call it with arguments! You don't do things like this in ANSI C,
>
>Welcome to the weird, wild, wooly world of RealWorld Programming!
>I'm not trying to belittle you in any way, but I've just seen *so many*
>programs with code like this -- and they still work.  Amazing.
>
>As you delve deeper into the worlds of other hacker's code, you'll see
>more and more weird things (like passing 12 arguments to a function just
>because the programmer didn't use variable argument lists - ala GNU Bison -
>and then only using 3 in common usage.  You'd think these guys never heard
>of a parameter block or data structures before, but I digress.)
>
>|3. Knows what the hell is happening with the stuff I described above.
>
>Well, the stuff, for the most part, will work, but I can't put too much
>confidence into code that uses anticonventions like your above example.
>
Actually, this is the way functions are defined in unix shells; probably
the reasoning is to allow for a variable number of parameters. You 
would write 
   for i
   do
      some code here
   done

and i would loop across all the parameters.


-- 
george harrington gort@netcom.COM
Netcom - Online Communication Services San Jose, CA
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: Re: Think Ref 2.0
Organization: Symantec Corp.
Date: Fri, 8 Jan 1993 13:38:54 GMT

In article <1993Jan7.193426.26713@cronkite.ocis.temple.edu> cahan@bigboy (Denny Cahan) writes:

   I just received an upgrade offer for think reference from Symantec.
   Has anyone actually purchased the upgrade? (at a hefty $39 for
   volume 6).  Does it contain all the calls for Quicktime? I am kinda
   stuck trying to decompress some images and this would be really
   hepful. Just wondering.

THINK Reference 2.0 doesn't include documentation for QuickTime or for
the Component Manager. It contains all the information in Inside Mac
I-VI, updated with respect to the latest tech notes and NIM releases.

Short sales pitch follows...

The new release also supports drop-in databases, context-free
hyperlinks, and AppleEvents. Drop in databases will make it possible
for Symantec to come out with database upgrades or additions (such as
QuickTime), and allows users to remove databases they don't need.

Context-free hyperlinks allow you to type any hyperlink from any page.
For example, you can be looking at the ControlRecord structure, type
in ADBOp, and hit return to take you to the ADBOp trap description.

TR 2.0 supports two AppleEvents which allow third-party programs to
look up templates for toolbox calls (a la Apple's 411) and to bring up
TR with a particular entry frontmost.

It even has an entry for the DogCow...

	-phil
--
   Phil Shapiro                                   Software Engineer
   Language Products Group                     Symantec Corporation
		   Internet: phils@cs.brandeis.edu
Newsgroups: comp.sys.mac.programmer
From: bizarre@leland.Stanford.EDU (Bruce Templeton)
Subject: Which Inside Macintosh books are most essential?
Organization: DSG, Stanford University, CA 94305, USA
Date: Thu, 7 Jan 93 01:28:39 GMT

I've got enough money now to buy 2 or 3 of the new Inside Macintosh books.
Which ones are the most essential?  I figured that _Toolbox Essentials_ is
necessary, but which others should I buy?

Also, does someone know which books are out and the release dates of the ones
which are not?

Thanks,
-bruce templeton

-- 
|*Bruce Templeton			     		  ______________    *|
|*bizarre@leland				 DFOTB  /______________/|  *|
|*Disclaimer:  The statements above reflect the 	|  o   o   o  | |  *|
|*opinions of virtually everyone I have ever met.	|_____________|/   *|
Newsgroups: comp.sys.mac.programmer
From: Norbert Mueller <K360171@alijku11.edvz.uni-linz.ac.at>
Subject: Re: Think Ref 2.0
X-Xxmessage-Id: <A7737FE2FE016205@nmueller.chemie.uni-linz.ac.at>
X-Xxdate: Fri, 8 Jan 93 18:00:50 GMT
Organization: Johannes Kepler Univ., Inst. of Chemistry
X-Useragent: Nuntius v1.1.1d12
Date: Fri, 8 Jan 1993 18:00:02 GMT

Re: Think Ref 2.0


Where and how can I order my upgrade?

No European distributor - rip offs please!

Norbert Mjller
Institute of Chemistry
Johannes Kepler University
A-4040 Linz
Austria 
e-mail K360171@ALIJKU11.bitnet
       K360171@EDVZ.uni-linz.ac.at
       Norbert@soft.uni-linz.ac.at
Newsgroups: comp.sys.mac.programmer
From: jimlynch@netcom.com (Jim Lynch)
Subject: Re: Detecting mouseDown in a region?
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Thu, 7 Jan 1993 03:54:41 GMT

I posted a class which has an arbitrary region which it checks for things like
mouse clicks within it. Try it; it might work for you.
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: Thanks (Re message questions)
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Sat, 9 Jan 1993 22:32:30 GMT

In <93009.090120REE700A@MAINE.MAINE.EDU> <REE700A@MAINE.MAINE.EDU> writes:

>   It looks like the Mac will allow me to allocate my memory 5-10KB
>at a time and combine the new and old block to a contiguous combined
>block.  This eliminates the principal source of Win 3.x crashes -

Hmm. Not really, only something that might look at it. What you
do instead is extend one of the blocks and copy the contents of
the other block into the extended area.

Why not allocate all the memory at the same time? That's MUCH
faster!

>excessive numbers of handles (sys heap full), since I'll never have
>more than two handles to my data block!

The Mac creates new master blocks for handles when it needs to,
and you can also call MoreMasters at startup to create a new
master pointer block. Repeat as needed. Oh, and Mac handles are
not usually system resources, unless you allocate the memory
out of the system heap (purely optional thing to do!)

>In particular, scroll tab "drag & drops", page moves and line moves
>are all automatically generated system messages.
>   But then again, I can write the filter routine once and use it in all
>of my future app's, now can't I?

Yes. Better yet, use a decent class library, such as the Think
Class Library.

>  Again, thanks.  I should be getting the compiler this week...

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

   NCC-1701
From: chris_russo@gateway.qm.apple.com (Christopher Russo)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Offscreen PixMaps: dumb question
Date: 13 Jan 93 00:06:22 GMT
Organization: Apple

In article <1993Jan12.113345.501@otago.ac.nz> John Marshall, 
jomar@otago.ac.nz writes:
>However, I've read IM IV (I can be System 7 only if I want) and been
>horrified by the incomprehensible talk of Offscreen Graphics Worlds and
>Offscreen CPorts and so on.

I totally agree.  I'd been working with offscreen CPorts for a while and 
felt that they're GWorld help was fairly nebulous.  I pulled out the 
folllowing routine from something I had handy.  I don't think there are 
any glaring bugs in it although it does lack generallity.  It will 
allocate an offscreen 8bit color port of the height and width (in pixels) 
that you hand in.

/* Takes shorts of width and height then returns a CGrafPtr 
*/
CGrafPtr MyNewPort(short theWidth, short theHeight)
{
    CGrafPtr aCGrafPtr;
    Ptr aPtr;
    Rect aRect;
    
    
    aPtr = NewPtr(sizeof(CGrafPort));
    aCGrafPtr = (CGrafPtr) aPtr;
    
    OpenCPort(aCGrafPtr);
    SetRect(&aRect,0,0,theWidth,theHeight);
    (**(*aCGrafPtr).portPixMap).bounds = aRect;
    (**(*aCGrafPtr).portPixMap).rowBytes = 0x8000 + theWidth;
    (*aCGrafPtr).portRect = aRect;
    
    aPtr = NewPtr((long)theWidth * (long)theHeight);
    (**(*aCGrafPtr).portPixMap).baseAddr = aPtr;
    
    OpenRgn();
    FrameRect(&aRect);
    CloseRgn((*aCGrafPtr).visRgn);
    EraseRect(&(*aCGrafPtr).portRect);
    return aCGrafPtr;
}

YUCK. It's been SOOO long since I've even looked at this routine. I wrote 
it when I was first learning the Mac & C.  I'd change some of the style 
for you, but I'm afraid to introduce an error in haste.  Oh well, take it 
for what it's worth.  Anyway, you can draw to and from the port returned 
just like you draw to and from any other.

I'll leave multiple bit depths up to you as a programming exercise. :-)
to be read: "I'm lazy."
-----Christopher Russo
----- I admire a clever .sig message.  Wish I had one. <sigh>
----- day 408.974.6070
From: casgrain@ERE.UMontreal.CA (Casgrain Philippe)
Subject: OK buttons in Dialogs (goof!)
Organization: Universite de Montreal
Date: Thu, 7 Jan 1993 18:36:37 GMT

In a precedent post I wrote:
	ModalDialog(dlg, @MyFilterProc);

What a goof! The correct syntax, as everyone indubitably noticed, is:

	ModalDialog(@MyFilterProc,itemHit);
ModalDialog supposes you have brought a Dialog to the front yourself...

Philippe Casgrain
Newsgroups: comp.sys.mac.programmer
From: nilesinc@well.sf.ca.us (Avi Rappoport)
Subject: Should we start using an installer?
Organization: Whole Earth 'Lectronic Link
Date: Tue, 5 Jan 1993 19:07:40 GMT



We have been getting tech support calls about installation, now that we have
multiple disks and options for various word processors (this is for the
EndNote Plus program).  Some people in our company have suggested using an
installer for those of our customers who feel insecure.  What are the
experiences of other developers?  I saw a long rant about the awfulness of
the installer for Millie's Math House in c.s.m.a (sorry, Eric), and this
makes me apprehensive.

What installers are people using?  Is the new Apple installer better than
the old one?  Should we start using an installer?
Newsgroups: comp.sys.mac.programmer
Subject: TextEdit Wierdness
From: misc042@cantua.canterbury.ac.nz (Mr M J Miller)
Date: Mon, 11 Jan 1993 23:24:44 GMT
Organization: user via University of Canterbury, Christchurch, New Zealand.
X-Newsreader: TIN [version 1.1 PL8]

Hi,
I am writing an application with think pascal 4, using my own object
scheme (NOT TCL) and am having trouble with text edit.
My app has multipl windows each containing a TEdit record and a 
verticle scroll bar. When I create a new document/window/TEdit record
that works fine, does all the right things-Fine.
When I create window #2 that works fine also-Great.
When I toggle back to #1 mouse selection goes _REALLY_ wierd for #1
-I cant even place the carat!
However if I toggle back to #2, then #2 is still fine but #1 never
comes right.
This happens every time I create a new document, the document created last
is always ok but all others wont do mouse! (but will do TEKey?!).
Any ideas as to where it is going wonky?

Any help appreciated
	Martin Miller,
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)
From: eaeu209@orion.oac.uci.edu (Rodney G. Ramos)
Subject: Re: **BOOKS TO LEARN C: SUGGESTIONS NEEDED**
Newsgroups: comp.sys.mac.programmer
Organization: University of California, Irvine
Distribution: usa
Date: 9 Jan 93 09:29:57 GMT
Followup-To: comp.sys.mac.programmer

In article <eaeu209-090193013049@714-725-3177.nts.uci.edu>,
eaeu209@orion.oac.uci.edu (Rodney G. Ramos) wrote:
> 
> I had posted about this earlier, but the response wasn't that great.
> 
> I've recently been interested in learning C. Can anyone suggest a good book
> to get me started?
> 
> I already know Pascal, so it's important that I find a book that does not
> assume the reader has no knowledge or experience with programming.
> 
> Any suggestions would be much appreciated. I would also like to compile
> a list of the responses for future reference for others.
> 
> Please e-mail if possible.
> Rodney

Oops, my fault. Definitely screwed up here. Forgot to give my
proper e-mail address. Here it is:

eaeu209@orion.oac.uci.edu
From: wstomv@wsinfo01.win.tue.nl (Tom Verhoeff)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Why is new(p) so slow in THINK Pascal?
Summary: Further tests reveal quadratic behavior of new and NewPtr
Keywords: THINK Pascal, dynamic variables, Memory Manager
Date: 8 Jan 93 22:49:18 GMT
Reply-To: wstomv@win.tue.nl
Organization: Eindhoven Univ. of Technology, The Netherlands

Further tests of the slow THINK Pascal memory allocation procedure New
reveal that there is some quadratic behavior involved.

	# news		time (in seconds)
	------		-----------------
	 1000		  3 (probably 2.61 by extrapolation)
	 2000		 11
	 3162		 26
	 5000		 66
	10000		261

Note that 3162/1000 approximates the square root of 10.  The conclusion
seems to be that  k  times more new calls require  k-squared  more time
to execute.

The calls to new in my test program are done successively in a tight for loop;
the new pointers are to records which are linked in a chain.
Afterwards, this chain is disposed of in a flash (less than one second,
almost independent of its length).  Here is a program:

	program NewTest;
	type List = ^Element;
	     Element = record key: Longint; next: List end;
	var head, p: List; k, n: Longint;
	begin
	MaxApplZone;
	head := nil;
	write('How many times? '); readln(n);
	write('Newing ', N:1, ' times;');
	for k := 1 to N do begin
	  new(p);
	  with p^ do begin
	    key := k;
	    next := head;
	    end; { with p^ }
	  head := p;
	  end; { for k }
	writeln(' done.'); write('Disposing ')
	k:=0;
	while head <> nil do begin
	  p := head;
	  head := head^.next;
	  dispose(p);
	  k := succ(k);
	  end; { while }
	writeln(k:1,' times; done.');
	end.

Furthermore, the numbers are exactly the same when new is replaced by an
appropriately type-casted call of the Memory Manager's NewPtr function.

Anyone got a clue yet what is going on here?

	Tom
-- 
INTERNET: wstomv@win.tue.nl  /    Eindhoven University of Technology
VOICE: +31 40 47 41 25      /    Dept of Mathematics & Computing Science
FAX: +31 40 43 66 85       /    PO Box 513, NL-5600 MB Eindhoven, Netherlands
Newsgroups: comp.sys.mac.programmer
From: norm@netcom.com (Norman Hardy)
Subject: Re: (Q) Need bit manipulation algorithm
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Sat, 9 Jan 1993 21:25:59 GMT

In article <20751@ucdavis.ucdavis.edu> lim@toadflax.cs.ucdavis.edu (Lloyd Lim) writes:
>
>There is a neat trick for counting the number of bits in a word that
>a Microsoft geek showed me one time.  If there are k bits with 1's,
>it runs in O(k) time.
>
>I don't remember the algorithm, but it involved subtracting 1 and could
>be written in one line of C.  (Yeah, I know...  You could write anything,
>even Microsoft Word, in one very long line of C code.  Come to think of it,
>that's probably what they did.)  The subtraction was used to create
>instant masks: e.g. 0x0100 - 1 = 0x00FF.  It went from the highest 1 bit
>to the lowest, magically avoiding all of the 0's.
>
>That's all I remember.  Anyone remember this algorithm?
>
>+++
>Lloyd Lim                    Internet: lim@cs.ucdavis.edu
>Lim Unlimited                America Online: LimUnltd
>330 W. Iris Ave.             AppleLink: LimUnltd
>Stockton, CA  95210-3738     CompuServe: 72647,660
There are several versions much like the following:

#include <stdio.h>
int main(){int K; for(K=-4; K<15; ++K) 
  {int j=0, k=K; while(k) {k = k-1 & k; ++j;}
    printf("There are %d ones in %d.\n", j, K);}}
Newsgroups: comp.sys.mac.programmer
From: jeffh@apple.com (Jeff Holcomb)
Subject: Re: Porting GCC to the Mac (was: Re: Sozobon (or other free C's): would this strategy work?)
Date: Tue, 5 Jan 1993 22:34:21 GMT
Organization: Apple Computer, Inc.
Followup-To: comp.sys.mac.programmer

In article <PWH0BCS@math.fu-berlin.de>, mh1@irz213.inf.tu-dresden.de
(Michael Hohmuth) wrote:
> 
> I believe that this has been done already. The port is available via ftp,
> but please don't ask me where (I don't have a Mac).
>

Version 1.37 of MPWGCC is available from ftp.apple.com in '/pub/gnu.mpw'. 
Since it was designed as a replacement for the MPW C compiler, it requires
the MPW Shell (v3.1 or later), the include files and libraries from MPW C
v3.1, and the MPW Assembler.

A port of GCC 2.x to MPW v3.2 is currently being worked on.

--
Jeff Holcomb
Apple ATG System Software     (408) 974-0841
Internet: jeffh@apple.com   AppleLink: JEFFH
Newsgroups: comp.sys.mac.programmer