HDTenEightyP/NetNews huggingface dataset:
From: davidt@aoa.aoa.utc.com (David Trefrey)
Subject: SpaceWar!
Organization: Adaptive Optics Associates
Date: Thu, 8 Oct 1992 19:54:45 GMT




>I just upload a new game I wrote called SpaceWar! 1.0 to sumex.stanford.edu
>archive. Using direct-draw-to-screen technique, it achieves 30 fps smooth 
>animation. A deatailed description is posted to comp.sys.mac.games. Try it
>and have fun.


	Pretty cool game, binary's awful big though ( > 400KB ).  Would
	like to get a look at the source for it.  Good animation and 
	really good sound effects.


					thanks,

						davidt@aoa.utc.com...
	

-- 

	David Trefry
	davidt@aoa.utc.com
Newsgroups: comp.sys.mac.programmer
From: absurd@applelink.apple.com (Tim Dierks, software saboteur)
Subject: Re: UnloadSeg and pointers to functions
Date: Thu, 15 Oct 1992 22:24:22 GMT
Distribution: na
Organization: MacDTS Marauders
Followup-To: comp.sys.mac.programmer

In article <1992Oct15.181940.2146@news.columbia.edu>,
sll2@cunixa.cc.columbia.edu (Steven L Levitt) wrote:
> 
> 	If I have a structure on the heap which contains a point
> function and I call UnloadSeg() on the segment which contains that 
> function, will the pointer still be valid afterward?  I would like to call
> UnloadSeg() each time through the main event loop, but I don't know if the Jump
> Table scheme the mac employes will preserve the validity of my f
> pointers.
> 
> ----------------
> Steven L. Levitt  sll2@cunixa.cc.columbia.edu
> An Undergrad

The answer: usually.  There are two different ways to construct a function
address, whether you're calling it or taking its address for later use.
You can either use the address in the jump table, which is constant and
doesn't move, or you can take the actual pointer to the code, which,
because it's in a code segment, could plausibly be unloaded and move
(unless it's in the same segment as your main entry point).  So if
you're going to build a pointer to a function, you have three options:

1) Make sure the function is in the main segment.
2) If it's not in the main segment, make sure the segment it's in
   never gets unloaded while the function pointer is supposed to
   be valid.
3) Make sure you get a jump table pointer.

3) is best, except for functions which might be called at interrupt
time, such as VBL tasks; for these, 1) is best, because you won't be
able to load the segment when the function gets called.  Usually,
this isn't a problem; by default, both Think and MPW give you jump
table function pointers.  You're guaranteed of getting a jump table
pointer if you take the routine's address from another segment, because
that's all the code in that area knows; for example, if I take the
address of function foo() which is in the segment FooSeg from function
bar() in BarSeg, I'll be guaranteed a jump table address.  Even if
the function and the code getting the address are in the same segment,
you will almost always get a jump table address.  There are two
exceptions:

1) If using the -b or -b3 options in MPW C, or if you're not using
   the -b option in MPW Pascal, you will get a PC-relative
   function address if the source and destination are in the
   same segment.
2) If you're using -model far, you'll always get a PC-relative
   address due to a bug in the way it patches up your segment.

Thus, if you want to be sure your address will always be OK and it's
not in the main segment, either take the address from another
segment or don't use the -b or -b3 option for MPW C and do use
the -b option in MPW Pascal.

I'm sure there are similar things for Think, but I don't know what
they are.

Tim Dierks
MacDTS, but I post too much
Newsgroups: comp.sys.mac.programmer
From: keith@taligent.com (Keith Rollin)
Subject: Re: Think C and sizeof() ???
Followup-To: comp.sys.mac.programmer
Organization: Taligent
Date: Tue, 13 Oct 1992 16:48:56 GMT

In article <dang.718983733@cserver>, dang@cserver.plexus.com (Dan Gardner)
wrote:
> 
> I just installed Think C on my IIci and patched
> it to 5.0.3. Everything seems fine. I wrote this simple
> program to list the data sizes and got some unexpected
> results.  (project included the ANSI lib)
> 
> #include <stdio.h>
> 
> main()
> {
> 	printf("The size of char is %d\n", sizeof(char));
> }
> 
> This resulted in  "The size of char is 0".
> 
> Huh? Hello MacFly! Check me if I'm wrong but this should work
> on any compiler under the sun.
> 
> Interesting that this next program worked:
> 
> #include <stdio.h>
> 
> main()
> {
> 	int i;
> 
> 	i = sizeof(char);
> 	printf("The size of char is %d\n", i);
> }
> 
> This resulted in  "The size of char is 1".
> 
> Will someone straighten me out on this...

In your first example, you are asking printf to print an int, but you are
passing it a size_t. Under THINK C, ints are the same size as shorts, and
size_t's are defined to be unsigned longs. So you're passing a long where
you should be passing a short. This causes printf to see only the upper
word of the result of sizeof(char), which is zero.

-----
Keith Rollin
Phantom Programmer
Taligent, Inc.
From: peirce@outpost.SF-Bay.org (Michael Peirce)
Newsgroups: comp.sys.mac.programmer
Subject: QuickTime Controllers
Date: 9 Oct 92 05:24:39 GMT
Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
Organization: Peirce Software
X-Mailer: uAccess - Macintosh Release: 1.6v1

I'm having some trouble getting a movie controller to draw properly.

I'm reading in a movie and creating a controller using NewMovieController.
The movie draws OK.  The controller *seems* to be there.  I can click
on it (I call MCClick) and control the movie with it (dragging the handle
back and forth moves me around in the movie).

The trouble is there is nothing drawing in the rectangle where the
controller is.  It actually draws as white (it will erase anything
under it as white).

When I deactivate the movie (using MCSetVisible) the badge animation
happens and the badge is drawn on top of the movie.  But when I reactivate
the movie, there is still no movie controller.

Anyone ever run into this type of situation?  


When I call MCDraw it returns OK and does draw the movie correctly,
just not the controller.

If you have any tips that might help me out, please post them or send
me email.

THANKS

--  Michael Peirce      --   peirce@outpost.SF-Bay.org
--  Peirce Software     --   Suite 301, 719 Hibiscus Place
--                      --   San Jose, California USA 95117
--  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
--            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
Xref: sparky comp.sys.mac.programmer:16762 comp.sys.mac.comm:9922
From: time@ice.com (Tim Endres)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.comm
Subject: CTB Tool Menu Wierdness...
Date: Sat, 10 Oct 92 14:37:26 EST
Organization: ICE Engineering, Inc.
Reply-To: time@ice.com (Tim Endres)
X-Mailer: uAccess - Macintosh Release: 1.6v1


In an effort to put a menu into the TGE TCP CTB Tool, I have found some
wierd behaviour.

If I call GetMenu() and then InsertMenu(), and finally DrawMenuBar(),
I get the menu title, but NONE of the menu items. The title hilites
when I click on it, but no items. If I dump the MenuInfo struct in macsbug
I can see that it has the correct menuID, and it has the title and item
strings at the end, but the menuWidth and menuHeight are zero and
the menuProc is NULL!

On the other hand, if I use NewMenu() to create the menu with the
exact same menuID, then add each item with AppendMenu(), then call
InsertMenu() and DrawMenuBar(), the menu appears exactly as I expect
it to and all items are operative.

Anyone have any ideas?


tim endres - time@ice.com  -or- tbomb!time
ICE Engineering, Inc - 8840 Main St, Whitmore Lake, MI 48189
Phone (313) 449 8288 - FAX (313) 449-9208
USENET - a slow moving self parody... ph
From: lward@husc8.harvard.edu (Lester Ward)
Newsgroups: comp.sys.mac.programmer
Subject: RTF format?
Date: 14 Oct 92 17:51:13 GMT
Article-I.D.: husc8.lward.719085073

Is the Rich Text Format (RTF) file format public?  And if it is, where
might I find documentation on it?

Thanks,
Wordman
lward@husc.harvard.edu
Newsgroups: comp.sys.mac.programmer
From: cluther@morticia.cnns.unt.edu (Clay Luther)
Subject: Figuring out MPW StdIo.h FILE.
Organization: University of North Texas
Date: Wed, 14 Oct 1992 20:52:02 GMT

Hello:

I am attempting to optimize a piece of Unix code on the Mac.  This code makes
a call to fwrite() through a function pointer.  I can change that pointer to 
point at my own io routine, but it must accept the same parameters as fwrite().

What I'd like to know is how does the StdIo.h FILE structure relate to more
standard Mac file refNums and PBs.  I'd like to be able to make a PBWrite()
call directly after doing some preprocessing.


Thanks.

-- 
Clay Luther
cluther@morticia.cnns.unt.edu
From: brianj@bedrock.cs.umd.edu (Brian Johnson)
Newsgroups: comp.sys.mac.programmer
Subject: ZREF errors - Think C 5.0.3
Date: 12 Oct 92 05:07:57 GMT
Distribution: comp
Organization: Computer Science, Univ. of MD, College Park, MD 20742

I keep getting "ZREF Error - Remove Objects" messages.  I have a IIcx,
5mb ram, Think C 5.0.3, various inits (I'm trying to run bare bones
for awhile:-(

Does anyone else have this problem?  

It's so bad that it even trashes the source code with spurious
characters when it crashes (not every ZREF eror is a crash).  Trashed
characters show up near where I last edited the file, and are usually
not "normal" characters (e.g. A with a little o over it).

I've had only a few problems on the IIfx in my office.  For what it's
worth I drag source files back and forth between home and the office -
always recompiling of course.

I've had multiple ZREF errors almost back to back after removing all
object code and recompiling in one programming session.

I reinstalled Think C 5.0 and again updated it to 5.0.3 today, it just
crashed again:-(((((

Subject: Re: ZREF errors - Think C 5.0.3

My early init optimism was unfounded:-( I'm having continuing
problems.  I believe I had Think Reference running during both of my
code trashings this evening.

I'm running only a few time-tested inits now and no longer view this
as yet another init problem.  I ONLY have problems with Think C.

Does no one else have this problem?  Will the Think compiler crash if
it hits weird characters?  This problem seems to be accompanied by
trashed characters in the vicinity of my last editing changes.

-- Brian

For those who may be interested:
-------------------------------

System profile for: 
Monday, October 12, 1992

System Version: 7.0.1

%%% CPU info %%%

Macintosh: Macintosh IIcx
Processor: 68030.
Floating point processor: 68882.
Monitor info: 640 x 480, Main screen, Active, Color, Bits per pixel:
8.

%%% Memory info %%%

Physical RAM size: 5120K.
Virtual Memory: Inactive.
Addressing mode: 24bit only.

%%% Extension loading order %%%

Extention                                  Version
==================================================
 Extensions Manager                            1.6
DepthCharge                                    1.7
Memory                                       7.0.1
Super Boomerang                              3.0.1
WindowShade                                    1.1
--
Brian Johnson                                       Computer Science Department
brianj@cs.umd.edu                                        University of Maryland
(301) 405-2725                                           College Park, Md 20742

  ...there are no strangers in this world, only friends who have never met...
Newsgroups: comp.sys.mac.programmer
From: Alexander M. Rosenberg <alexr@apple.com>
Subject: Re: popup menu CDEF bug?
X-Useragent: Nuntius v1.1.1d12
Date: Mon, 12 Oct 1992 18:20:06 GMT
X-Xxdate: Mon, 12 Oct 92 19:19:59 GMT
X-Xxmessage-Id: <A6FF0FDFC0020C7C@mtdew.apple.com>
Organization: Hackers Anonymous

In article <jwwalker.718782908@pecan.cs.scarolina.edu> Jim Walker,
jwwalker@cs.scarolina.edu writes:
>There seems to be a bug in the System 7 pop-up menu CDEF, as follows: If
>the selected item is number 32 or higher, and the monitor is in color, then
>the downward-pointing triangle (the one you see when the menu is not pulled
>down) is drawn in gray.
>
>Is this a known bug, and if so is there any workaround?

Thank you for taking the time to isolate the cause of the problem. This problem
has been entered into our bug tracking system.
---------------------------------------------------------------------------
-  Alexander M. Rosenberg  - INTERNET: alexr@apple.com      - Yoyodyne    -
-  330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr        - Propulsion  -
-  Palo Alto, CA 94301     -                                - Systems     -
-  (415) 329-8463          - Nobody is my employer so       - :-)         -
-  (408) 974-3110          - nobody cares what I say.       -             -
Newsgroups: comp.sys.mac.programmer
From: reuven@athena.mit.edu (Reuven M. Lerner)
Subject: Simple question about menus in Think C 5.0.3
Organization: Massachusetts Institute of Technology
Date: Thu, 15 Oct 1992 03:33:51 GMT

I'm writing my first Mac program (aka my undergraduate thesis), and
can't for the life of me figure out how to get menus to work in Think
C 5.0.3. I think that I've done everything right, and according to the
documentation I've seen, things should work, but ... they don't.

Basically, I want to add a new menu ("Network") that will contain
three options. I've defined constants for both the new menu and each
of its options in my global header file, so that I can use the constants cmdGo,
cmdSearch, and cmdPreferences without any syntax or compilation
errors. I have also added the appropriate 'MENU' resources to my
project's resource file, as per the Think C directions.

After doing all of that, I added the following lines to the
UpdateMenus method of one of my objects (a subclass of CDocument):

	gBartender->EnableCmd(cmdGo);
	gBartender->EnableCmd(cmdNetworks);
	gBartender->EnableCmd(cmdPreferences);

	gBartender->EnableCmd(cmdClose);
	gBartender->DisableCmd(cmdNew);
	gBartender->DisableCmd(cmdOpen);

Leaving out any of these lines enables or disables the option as you
would expect. Including the last three lines also performs the
expected function. Including the first three lines, though, creates a
menu option that returns cmdNull instead of my constant.

I'm sure that I am forgetting a simple step somewhere along the line,
but it's not completely obvious where. Can any experienced Mac hackers
help me out here? Thanks for any advice you can give me...

Reuven
From: krk@itl.itd.umich.edu (Kenneth Knight)
Newsgroups: comp.sys.mac.programmer
Subject: Re: searching the digests?
Date: 17 Oct 1992 04:28:24 GMT
Organization: Instructional Technology Laboratory, University of Michigan
Distribution: world
NNTP-Posting-Host: helen.oit.itd.umich.edu

In article <PERM.92Oct16183604@groucho.csd.uu.se> perm@csd.uu.se (Per Mildner) writes:
>1. look for digest announcements in this newsgroup, they look like:
>   C.S.M.P. Digest V1 #185 Available
>   Read there how you can get them all with ftp.
>2. Get BBEdit by anonymous ftp to sumex-aim.stanford.edu, use it to
>search the digests that you by now have transfered to your hard disk.
>For ftp from your mac I recommend XferIt also at sumex-aim (assuming
>you have MacTCP)
>3. To read news on your mac (assuming you have MacTCP) you can use one
>of several packages, I use Nuntius see newsgroup comp.sys.mac.comm for
>other readers.
>4. ftp to rtfm.mit.edu and read the Frequently Asked Questions for
>the newsgroups that seem relevant to you.
>Consider using WAIS too.
>Hope this helps,
>
>--
>Per Mildner			perm@CSD.UU.SE
>Computing Science Dept.		tel: +46 18181049
>Uppsala University, Sweden	fax: +46 18521270

Once thing I do is archive the messages of most interest to me and save them
on my Mac. I use Mark Zimmerman's Free Text Browser package (available
at the sumex-aim.stanford.edu ftp site and probably mac.archive.umich.edu)
to browse the megs of messages.  This software, designed as a series of
HyperCard stacks with plenty of XCMDs, creates indecies of files you specify
and let you search through those indecies in great detail. It is quite
simple for me to search for messages that involve QuickTime and its
interactions with the Sound Manager or to find all messages that talk about
bugs or quirks in MacApp or TCL. The indexing process does take a fair
amount of time since the package must re-index the entire database when you
add more to it, but if you add in chunks that isn't so bad. 

  ** Ken **
krk@oit.itd.umich.edu

Newsgroups: comp.sys.mac.programmer
Subject: Researching the digests?
Summary: 
Followup-To: 
Distribution: world
Organization: Office of Instructional Technology Laboratory, University of Michigan
Keywords: 

Newsgroups: comp.sys.mac.programmer
From: mspace@netcom.com (Brian Hall)
Subject: Anyone have good/bad experience with ATProtect/GAVA?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Thu, 8 Oct 1992 06:43:14 GMT

Does anyone have any experience (good *or* bad!) with ATProtect from GAVA?
It is a library that you license that lets you have your app scan the
network to see if other copies are running that have the same serial number.


-- 

 \ | /   | Brian Hall                 mspace@netcom.com
 - : -   | Mark/Space Softworks       Applelink: markspace
  /|\    |                            America Online: MarkSpace
 |-+-|   |
/-\|/-\  | Inside Mac makes War and Peace look like toilet reading.
Newsgroups: comp.sys.mac.programmer
From: gurgle@netcom.com (Pete Gontier)
Subject: porting to MPW C, part 2
Keywords: port MPW C THINK float point string conversion num2str
Organization: cellular
Date: Fri, 9 Oct 1992 13:47:26 GMT

Folx:

Yesterday I decided to run some of my THINK C applications through
MPW to see what warnings would turn up. (I, like everybody else
here I'm sure, wish THINK C did warnings.) While I was at it, I
decided to make my programs actually run when compiled under MPW C.
I ran into two problems. Here is the second:

num2str does not seem to present in the MPW libraries. It appears
to be a THINK C exclusive. Luckily for me, I had buried my call to
num2str inside a wrapper, so that all the rest of my code doesn't
care whether num2str exists or not. On the other hand, under MPW,
this wrapper still doesn't work. What exactly does one need to call
under MPW to convert a long double to a pascal string? (Yes, I know
about sprintf and the other standard library conversions, but they
can't easily be internationalized when the time comes.)

Please respond via email and I will summarize later.
-- 
 Pete Gontier // EC Technology // gurgle@netcom.com
From: johnc@waikato.ac.nz
Newsgroups: comp.sys.mac.programmer
Subject: TCL and memory alloc troubles HELP!
Date: 16 Oct 92 14:47:39 +1300
Organization: University of Waikato, Hamilton, New Zealand

I'm finding it quite a mission to allocate memory from a subclass of my 
document.

I allocate handles initially to size 0 (about 5 of them) with a view to 
resizing them (with SetHandleSize() or ResizeHandleCanFail()) when I find
out how big I need to make them.

I've had up to 4MB allocated to this project, most of it empty, and it won't
let me resize a handle to 64K!  I need to resize as I add more data in, I
shouldn't have to purge the handle and start again each time!

- is this the TCL limiting memory allocation in smaller objects?
- is this me trashing some memory somewhere earlier on?  :-)

Thanx in advance!

--------------------------------------------------------------------------
John Curtis            _?_         curtisj@ruakura.cri.nz
		  `==={0.0}	 "In all this excitement, I forgot if
		  /    \^/		I fired 5 shots or 6..."
==========================================================================

Newsgroups: comp.sys.mac.programmer
From: boyd@apple.com (scott boyd)
Subject: Re: How *should* gestalt manager be used under sys 7?
Date: Tue, 13 Oct 1992 18:32:07 GMT
Organization: Apple Computer Inc.
Followup-To: comp.sys.mac.programmer

In article <D88-JWA.92Oct11223644@byse.nada.kth.se>,
d88-jwa@byse.nada.kth.se (Jon Wtte) wrote:
> As you see, each thing you want to check is only one or two lines;
> the extra work os not much, and worth it. There "might" be plans
> for System 6.X to have AppleEvents or FSSpec calls

There aren't.  Even if there were, code you wrote to support System 6
as you know it would still work fine on that hypothetical System 6.X.

> Or PowerOpen 4.0 might return $400 in the version selector.

No, it won't.

> Or there might be a version > $7fff (not bl**dy likely :-)

We intend to keep the system version as a monotonically-increasing
sequence.

scott
boyd@apple.com
macintosh system software
From: d88-jwa@byse.nada.kth.se (Jon Wtte)
Subject: Re: Event Manager Too Slow or izzit just me?
Followup-To: comp.sys.mac.programmer
Originator: d88-jwa@byse.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<D88-JWA.92Oct13105012@byse.nada.kth.se>
	<REEKES-131092125541@90.10.20.67> <de19-151092071037@mac19-pg2.umd.edu>
Date: Fri, 16 Oct 1992 11:59:13 GMT

> de19@umail.umd.edu (Dana S Emery) writes:

   > > 	Ask the user "Would you like jerky motion and living processes,
        ~~~~~~~~~~~~

   *is*, rather than what she *thinks* it is, and will allow an orderly USER
   CONTROLLED shutdown of possibly interdependant processes.

Maybe one could add a list of processes to the question,
but as long as the question has a "don't kill" button,
it's a user-in-control situatino.

After all, if the user is unaware of that 400k dissertation
in that hidden Word window, does he/she need it? :-)

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Suedoise (not french speaking) --
  _/~|   Yellow
 / * \_  Shark                      (This signature has won the "Worst ASCII
 ~~~~\/  Software                    Logo of the Year" award)
Newsgroups: comp.sys.mac.programmer
From: wfp@jupiter.claremont.edu (Frank Price)
Subject: Option key madness
Reply-To: wprice@pomona.claremont.edu
Organization: Harvey Mudd College, Claremont, CA 91711
Date: Mon, 12 Oct 1992 04:07:50 GMT

I am trying to read option keys from the Mac keyboard, and of course have  
noticed that various keys will not even send an event when initially typed  
such as Option-E and Option-U, and Option-'.  How do I override this system so  
that Option can be used normally for those special characters?

Thanks.

-- Frank
__________________________________________________________________________
Frank Price               | wprice@pomona.claremont.edu
                          | "Nothing crashes like a Macintosh."
NeXTMail appreciated      |      - Guy Kawasaki
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@byse.nada.kth.se (Jon Wtte)
Subject: Re: Amateur Programming? [Re: Is IM going to be repackaged?]
Originator: d88-jwa@byse.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Wed, 14 Oct 1992 17:32:14 GMT

> joseph@joebloe.maple-shade.nj.us (Joseph Nathan Hall) writes:

   a total loser when applied to large, tedious projects.  Probably something
   like Ada(R) is a better choice for the sorts of things that people
   are now starting to use C++ for.  Even if it requires suppressing
   the Ada(R) gag reflex.

Well, what does ADA have that C++ hasn't? A process concept.
What does C++ have that Ada doesn't? A lot. Ada is NOT an
object-oriented language, even if some really try hard to
make it look like one.

Now, cross them, and get Concurrent C++ (CCC) which I had the
pleasure to fool around with in college; that's probably a
way for the future if AT&T only can realise its potential.

   more precise.  I can be productive 90 hours per week, but not if my
   only task is cranking out code.

Heh, how many comments, lines of debugging and copy&pasted
functions do you want? :-)

Oh, and this is a Mac group. Anyone seen CCC for the mac?

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Suedoise (not french speaking) --
 Engineering: "How will this work?" Science: "Why will this work?" Management:
 "When will this work?"  Liberal Arts: "Do you want fries with that?"
                     -- Jesse N. Schell
Newsgroups: comp.sys.mac.programmer