HDTenEightyP/NetNews huggingface dataset:
From: sold@kit.uni-kl.de (Christoph Sold)
Subject: RE: Scrolling (was:what remains when the clothes fly off?)
Keywords: ScrollRect()
Organization: Universitaet Kaiserslautern
Date: Fri, 21 Aug 1992 20:28:04 GMT

In article <171f6mINN2g1@darkstar.UCSC.EDU> gil@cse.ucsc.edu (Elmer Fudd) writes:
>Subject: what remains when the clothes fly off?
>From: gil@cse.ucsc.edu (Elmer Fudd)
>Date: 21 Aug 92 01:00:06 GMT
>Keywords: ScrollRect()
>
>Howdi net,
>
>i am trying to uncover pictures, and get`something more intersting
>to be unravelled underneeth then just plain ol' nothing...
>
>i am using the routine ScrollRect() to move a boring picture to the
>side, undeeeth it, i hope to reveal a surprize.  but so far all i get
>is the default background pattern.  any experienced scrollers out there?
>i sure could use some advise now
>
>thanks
>-gil  (gil@yahi.ucsc.edu)

Gil,
this is what ScrollRect is supposed to do. It gets what is on the screen, 
moves it the way you specified, and fills the now free room the pict was 
before with the backgorund pattern. Just have a look at Inside Macintosh Vol 
I, the QuickDraw chapter (How many times a day do I write "Just have a look 
at IM.." ? I think anyone posting here is able to read? :-) )
To put it the short way:

First, draw a picture:
   +--------------+
   |              |
   |     O --     |
   |      |       |
   |    \    /    |
   |     ~~~~     |
   +--------------+
Second, ScrollRect it to the right:
   +--------------+
   |XXX           |
   |XXX     O --  |
   |XXX      |    |
   |XXX    \    / |
   |XXX     ~~~~  |
   +--------------+
Now, the area marked with Xes shows the background pattern. Thus,
third, call InvalRect for the invalid area (marked with X) and wait for the 
update event telling you to update your picture. (alternatively, redraw the 
picture immediately, using the new coordinates.)
   +--------------+
   |              |
   |        O --  |
   |         |    |
   |       \    / |
   |        ~~U~  |
   +--------------+

Warning! This is the last advice you will get without ZOTing you.
You owe the oracle some graphic keyboard.

-Christoph

Christoph P. Sold                   CATS Software GmbH
                                    Mussbacher Landstr.2
                                    W-6730 Neustadt (Weinstrasse)
ger.xse0035@applelink.apple.com     Germany

"If an apple is fun, what the heck is an appletree?"
From: gray@brain.asel.udel.edu (John Gray)
Newsgroups: comp.sys.mac.programmer
Subject: ETO #8 - Problems With MacApp 3.0.1 and Latest MPW
Date: 19 Aug 92 20:12:04 GMT
Article-I.D.: udel.1992Aug19.201204.23405
Organization: AI duPont Institute

I just recieved ETO #8.  After installing MacApp 3.0.1 and the
MPW from the Latest MPW folder into my system I proceeded to build
a library with the ModelFar option.  I could not AutoBuild MacApp. 
When Rezzing MacApp.r it failed when trying to compile a aedt resource.
After poking around for a while I discovered a that in the MPW Types.r
file that there was a comment that the aedt resource type is obsolote
and has been removed.  Has anyone else tried to Autobuild MacApp 3.0.1
with the latest MPW.  Anyone know a simple fix that is safe.  I don't
really know what the resource does so I am a bit reluctant to just
delete it out of MacApp.r.

Thanks in advance!

John Gray
gray@asel.udel.edu
From: sold@kit.uni-kl.de (Christoph Sold)
Subject: Re: TN 31 relevancy vs sys 6.0.x
Organization: Universitaet Kaiserslautern
Date: Fri, 21 Aug 1992 20:30:06 GMT

In article <de19-210892053615@mac45-pg2.umd.edu> de19@umail.umd.edu (Dana S Emery) writes:
>Subject: TN 31 relevancy vs sys 6.0.x
>From: de19@umail.umd.edu (Dana S Emery)
>Date: 21 Aug 92 09:56:02 GMT
>I tried to pull a current copy of TN 31, but ftp.apple.com  no-gotem. 

They have it. Get the technote stack, it is in there.

>
> [stuff deleted]
>
>Thanks for your time.
>--
>
>Dana S Emery <de19@umail.umd.edu>

-Christoph

Christoph P. Sold                   CATS Software GmbH
                                    Mussbacher Landstr.2
                                    W-6730 Neustadt (Weinstrasse)
ger.xse0035@applelink.apple.com     Germany

"If an apple is fun, what the heck is an appletree?"
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
From: Andreas Wuertz <wuertz@systech.tik.ethz.ch>
Subject: Re: VBL tasks on Quadra video, SlotVInstall
Organization: Swiss Federal Institute of Technology, TIK
X-Useragent: Nuntius v1.1
Date: Fri, 14 Aug 1992 15:26:02 GMT

In article <1992Aug12.195612.24140@galileo.cc.rochester.edu> Bill Haake,
haake@cvs.rochester.edu writes:
>Can anyone tell us if it is possible to install
>a VBL task on the Quadra internal video and how to do it?

Bill, if really only want to install a VBL task, that means a task that
is invoked by the main video boards VBL interrupt and no other special
things, why don't you use VBLInstall instead of SlotVInstall? This does
all the job for you: find the main video board and install into that
irq's queue (not sure if VBLInstall, VBLRemove maintain a special queue,
but who cares?). It works fine for me on a Quadra 900 and IIsi.

Hope this helps

Andy (wuertz@systech.tik.ethz.ch)

===============================================================
The only person who got his work done by Friday was Robinson Crusoe.
===============================================================
Newsgroups: comp.sys.mac.programmer
From: holiday@bnr.ca (Matthew Holiday)
Subject: Re: MPW 3.2 Linker Errors
Followup-To: comp.sys.mac.programmer
Reply-To: holiday@bnr.ca
Organization: Bell-Northern Research, Richardson, TX
Date: Thu, 20 Aug 1992 14:16:27 GMT

In article <Bt6wy6.3n3@news.larc.nasa.gov>, wjb@cscsun2.larc.nasa.gov (William J. Bene) writes:
|> I have a C program with about 15 different modules which I have successfully 
|> compiled and executed using MPW 3.2.  After adding a few functions to one of 
|> the files I get the following errors while linking: 
|> 
|>  ### While reading file "Main.c.o"
|> ### Link: Error: 16-bit reference offset out of range. (Error 114)  at $0001E 
|> in main
|> ### Link: Error: 16-bit reference offset out of range. (Error 114)  at $0002A 
|> in main
|> ### Link: Error: 16-bit reference offset out of range. (Error 114)  at $0003A 
|> in main
|> (and it continues on...)
|> 
|> 

Add "#pragma segment" directives to break up your tool/program, and also try
compiling each module with the -m option (if you do have large arrays).  I've
encountered this problem often when porting Unix tools to MPW.

-- 
Matt Holiday                                      #include <std/disclaimer>
holiday@bnr.ca
BNR Richardson, TX
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: HELP: Color mapping and copybits
Organization: Kalamazoo College
Date: Thu, 13 Aug 1992 14:09:05 GMT

gluttony@reed.edu!gluttony.reed.edu!pcalahan (Patrick John Calahan) writes:
>I have two offscreen pixmaps, one 4bits deep and one 8bits deep.
>Each has its own color table of 16 and 256 colors respectively.  I want to  
>be able to copy one to the other with copybits and have the colors
>be mapped using the color tables (im using apple standard colors for
>both tables).  The problem is, as I understand it, copybits uses the
>current gDevice's color table for the destPixmap.  What do I do?

Make sure the current GDevice is set up the way you want it.  :-)  That
will usually mean making your own;  but if you get lucky and one of the
screens is set up right, then no one will stop you from mooching off it.

TN120's listing 3 is great source code for making your own.

(BTW, it's more appropriate to say "CopyBits uses the current GDevice's
color environment" than "...color table."  For example, I don't think
CopyBits will even look at the GDevice's color table beyond checking
ctSeeds to see if it can do a fast copy.  If the fast-copy is ruled out,
CopyBits uses the _inverse_ table to decide where to map all the colors.
Or the destination might even use direct color, in which case there
isn't any "GDevice's color table."  :-)  Sorry about all that, I just
felt like picking a nit...  :-)
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 The essence of OOP:  "After some hacking, I finally got the program to
 work, but I'm still not sure why."  - David Marcovitz (marcovitz@uiuc.edu)
Newsgroups: comp.sys.mac.programmer,misc.education,soc.college
From: pk38961@dunix.drake.edu (Pete Koucis)
Subject: Computer Science ----  Undergraduate  <-- --> Graduate
Organization: Drake University, Des Moines, Iowa, USA
Date: Fri, 21 Aug 1992 02:37:17 GMT

Currently, the undergraduate computer science program I'm going through
is not the best.  There is nothing taught on object-oriented
programming, and the first I've heard of Scheme is on this newsgroup.
I'm teaching myself programming on the Macintosh -- I started to learn
the basics of C and object-oriented programming on an LPMud (which our
university closed down; they didn't think it held any academic value
whatsoever).  Everything I know about C and object-oriented programming
I'm teaching myself (in fact, the two comp-sci courses I've taken didn't
teach me much, either).

Should I be very concerned to whether this is the place to get my comp
sci education?  Or is graduate school going to be what matters?

It's very frustrating to go to a school that advertises a
"computer-intensive curriculum" and barely teaches you basics of
programming.


Newsgroups: comp.sys.mac.programmer
From: philip@ziggy.stanford.edu (Philip Machanick)
Subject: low-level keyboard interface?
Reply-To: philip@ziggy.stanford.edu (Philip Machanick)
Organization: CS Department, Stanford University, California, USA
Date: Thu, 20 Aug 1992 22:22:10 GMT

A friend of mine is giving an assembly language course and wants to illustrate  
some alternative approaches to keyboard I/O including polling the VIA (all this  
is on an SE and he is not concerned about using higher level interfaces,  
portability, etc.)

Any pointers, ideas etc. welcome. I can supply more detail but I suspect this  
question is not of general interest.
--
Philip Machanick
philip@pescadero.stanford.edu
From: mlanett@Apple.COM (Mark Lanett)
Newsgroups: comp.sys.mac.programmer
Subject: Re: annoying pascal strings
Date: 12 Aug 92 21:49:05 GMT
Organization: Apple Computer Inc., Cupertino, CA

k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:

>tom@dtint.uucp (Thomas R. Kimpton) writes:
>>
>>This is one of my favorite constructs on the mac:
>>{
>>char dstr[257];
>>	dstr[0] = sprintf(&dstr[1],"debug info");
>>	DebugStr(dstr);
>>}

>I just write:   DebugStr("\pdebug info");

>Does MPW not let you do the "\p"-string-prefix thing?

Of course it does. The point is that sprintf is a varargs call and thus can
produce error messages with usefull information in them.

void vdebugstr(char* format,...) {
	char buff[257];
	va_list arglist;
	vs_start(arglist,format);
	vsprintf(buff,format,arglist);
	va_end(arglist);
	DebugStr(c2pstr(buff));
}

vdebugstr("Hey, index %i is not in range 0..31",index);
-- 
Have a bajillion brilliant Jobsian lithium licks.
Mark Lanett, NOT speaking for anyone. Personal opinion only.
Newsgroups: comp.sys.mac.programmer
From: resnick@cogsci.uiuc.edu (Pete Resnick)
Subject: Re: MacTCP (UDP) questions
Organization: University of Illinois at Urbana
Distribution: comp
Date: Thu, 20 Aug 1992 20:56:21 GMT

tcd@vax5.cit.cornell.edu writes:

>1)  If I do my UDPRead calls asynchronously, where does the MacTCP driver
>get the time to complete them?  Is much of the processing done on the
>Ethernet card, or am I really just robbing Peter to pay Paul with 
>the async calls?

The Ethernet card will generate an interrupt when incoming data
arrives and your completion routine will be called. Just call
WaitNextEvent while you are waiting for it to complete.

>2)  What happens if the receive buffer gets full?  Am I correct to assume
>that incoming packets will be discarded, or do old ones get replaced?

Not sure. My guess would be the former as well.

>Does the condition clear itself as soon as enough of the buffer has been
>returned?

I would assume so.

>3)  Although packet order is not critical (otherwise I would use TCP), 
>it would be nice for my application to get access to the packets in
>the same order they arrive.  Can I assume that a UDPRead will return
>the oldest packet in the buffer?

Again, not sure, but my guess is that incoming packets will be put
whereever there is space in the buffer, so will be in order unless the
buffer starts to get full.

>4)  Is there any advantage (or disadvantage) to keeping at least one
>UDPRead call outstanding at all times?

Advantage: quicker response to calls, keep that buffer empty.
Disadvantage: none that I know of.

>5)  Where could I find the answers to these questions without asking
>the net?

How about the MacTCP Programmer's Guide?

>...I do need some flow control, 
>packet buffering, and some processing for partial "stream reconstitution".
>Is it likely that (Mac)TCP does all of this (and more) better than I could
>do with (Mac)UDP?  Thanks for any advice.

Hard to say without knowing exactly what you're doing, but it depends
on (a) how good a programmer you are, and (b) how much you really need
to do. Certainly using TCP will be quicker from a "time spent
programming" point of view, but TCP does have a bunch of overhead.
How's that for a good "It depends" answer?

pr
--
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet: resnick@cogsci.uiuc.edu
Newsgroups: comp.sys.mac.programmer
From: oster@well.sf.ca.us (David Phillip Oster)
Subject: Re: Better than TickCount?
Organization: Whole Earth 'Lectronic Link
Date: Sun, 16 Aug 1992 05:14:23 GMT

In article <1992Aug16.023716.13162@midway.uchicago.edu> hd12@midway.uchicago.edu writes:
>Sorry if this is a FAQ. Is there a more accurate way to control time than
>TickCount? Thanks for the help!

You can set up a time manager task to increment a global variable every
millisecond. Then use this variable like a TickCount.  Beware, 2^32
milliseconds is not a lot of time.  Make sure you handle wraparound of
the counter gracefullly
Newsgroups: comp.sys.mac.programmer
From: zben@ni.umd.edu (Charles B. Cranston)
Subject: Re: ETO #8 - Problems With MacApp 3.0.1 and Latest MPW
Followup-To: comp.sys.mac.programmer
Organization: UM Home for the Terminally Analytical
Date: Thu, 20 Aug 1992 01:24:36 GMT

In article <zben-190892171645@zben-mac-ii.umd.edu>,
zben@ni.umd.edu (Charles B. Cranston) wrote:
  
> Didn't you get a yellow piece of paper with the mailing that said
> there was a missing 'aedt' resource template and giving you the
> definition to type in???

Keith Rollin advises me that not everybody got the yellow paper
with the missing resource template.  Perhaps the problem was only
discovered after some ETO packages had already been shipped.

In expiation for being inappropriately snotty to the original poster,
here is the suggested resource template:


type 'aedt' {
   wide array {
      unsigned longint; /* Event Class */
      unsigned longint; /* Event ID    */
      unsigned longint; /* Value       */
   };
};


It's supposed to go in MacAppTypes.r which is installed in:

...MacAPP:Interfaces:RIncludes:MacAppTypes.r

zben@ni.umd.edu     -KA3ZDF
Newsgroups: comp.sys.mac.programmer
From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
Subject: Re: CHK error  -HELP
Organization: NASA/ARC Information Sciences Division
Distribution: usa
Date: Mon, 17 Aug 1992 21:55:54 GMT

> I've written a program
> that gets a window from a resource file.
>  I have not initiated the toolbox or anything.

Well, ther ya go. I think you MUST initialize appropriate mac stuff

-- 
----------------------------------
#include <std/disclaimer.h>     Josh Rabinowitz, Mac TCL programmer
joshr@kronos.arc.nasa.gov
"'I see', said the blind carpenter, as he picked up his hammer and saw".
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Weird Quickdraw Bug w/ Geneva
Organization: Kalamazoo College
Date: Tue, 18 Aug 1992 16:52:19 GMT

cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes:
>I've run into a VERY odd "feature" with a relatively simple piece of code.
>
>When 9 pt. Geneva is used, the text comes out as a
>VERY pale yellow (instead of the expected black). If any font besides
>Geneva is used, or any any size of Geneva BESIDES 9 pt, there is no
>problem.
>
>This problem occurs on a Quadra 700 and IIci, both running Sys 7.01. The
>color aliasing happens in both 4 and 8 bit video modes on both machines.
>There are other windows in the program with custom palettes, but this
>window is left alone. None of the other windows has this problem.

Sounds like you're messing with the screen's color table, and not
letting the system know that you're doing it.

Theoretically, there's no way you can do this :-) if you're using the
Palette Manager exclusively, and if you're not directly editing the data
in the system's data structures.  If you grab a GDevice's color table
and shove your own data into it without calling CTabChanged() or
changing its ctSeed, you'll experience effects exactly like those you
explain.

It happens with Geneva 9 and not Geneva 10, because the system has
an 8-bit-deep copy of Geneva 9 in ROM (along with Chicago 12, Geneva 12,
and Monaco 9).  You'll actually see the wrong-color effect on _any_
font whose image the Font Manager created before you changed the colors.
Those four fonts, since they're in ROM, will never be purged, and will
generally be among the first to start looking funny.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 He let the contents of the bottle do the thinking
 Can't shake the devil's hand and say you're only kidding            - TMBG
From: slchambe@athena.mit.edu (Stephen L Chamberlin)
Newsgroups: comp.sys.mac.programmer
Subject: help with asynchronous sounds
Date: 14 Aug 92 14:18:51 GMT
Organization: Massachusetts Institute of Technology

I'm going crazy trying to write some code that plays sounds asynchronously
(for sound effects in a game). After reading the sound manager chapter in
IM 5, I wrote some code that seems to work great under system 7, but chokes
under system 6. Could somebody tell me what I'm doing wrong, or give me a 
pointer to an example use of asynchronous sounds? I checked the soundapp at
ftp.apple.com, but the only way it plays asynchronous sounds is by creating
a new channel, playing the sound asynchronously, and then disposing of the
channel. I want to create 1 channel that I keep around for the whole game that
plays all the sound effects.

When my program starts up, I create a new sound channel, which I use for
playing all my sound effects. Each time I want to play a sound effect, I
do SndPlay(myChan, mySound, TRUE); to play it asynchronously. This works
fine for system 7, but when I try it under system 6, the 1st sound effect
I try to play works, but all others afterward don't get played. No crashes
or anything, just no more sound effects. Here's what I'm doing:

SndChannelPtr myChan;
Handle mySound, mySound2;

some_routine() 
{
   myChan = (SndChannelPtr)0L;
   if (SndNewChannel(&myChan,sampledSynth,0,0L) != noErr)
      MyHandleError();
   
   mySound = GetResource('snd ',128);
   if (mySound == 0L)
      MyHandleError();
   HLock(mySound);
   mySound2 = GetResource('snd ',129);
   if (mySound2 == 0L)
      MyHandleError();
   HLock(mySound2);

   ...

   SndPlay(myChan,mySound,TRUE);  /* this sound gets played asynchronously */
   SndPlay(myChan,mySound2,TRUE); /* this sound is never heard */

   /* any subsequent SndPlay(myChan...) calls fail to produce any sound */

   ...

}

I also tried this with "sampledSynth" replace by "0" with the same results.
Any ideas why this doesn't work? As I said, it seems to work fine under
system 7, but not system 6. I can't understand why. Is there some other
way I should be playing asynchronous sounds? The sounds don't need to overlap
each other, they just shouldn't stop program execution while they play.

Any help you could give me with this problem would be greatly appreciated. It's
driving me nuts! Thanks in advance!

Steve Chamberlin
slchambe@athena.mit.edu
Newsgroups: comp.sys.mac.programmer
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Subject: C.S.M.P. Digest V1 #169 Available
Followup-To: poster
Organization: University of Oregon Computer and Information Sciences Dept.
Date: Tue, 18 Aug 1992 11:20:57 GMT


C.S.M.P. Digest             Tue, 18 Aug 92       Volume 1 : Issue 169

Today's Topics:

	Help! Stack overwriting heap!
	Microcode (was Re: Does the 68000 have a "block move" instruction)
	List Manager help sought



The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.

The digest is a collection of article threads from the internet newsgroup
comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
regularly and want an archive of the discussions.  If you don't know what a
newsgroup is, you probably don't have access to it.  Ask your systems
administrator(s) for details.  (This means you can't post questions to the
digest.)

Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject.  The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
cs.uoregon.edu).  Article threads are not added to the digest until the last
article added to the thread is at least one month old (this is to ensure that
the thread is dead before adding it to the digest).  Article threads that
consist of only one message are generally not included in the digest.

The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
[128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
file /pub/mac/csmp-digest/README before downloading any files.  The most
recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
archive has a mail server; send a message with the text '$MACarch help' (no
quotes) to LISTSERV@ricevm1.rice.edu for more information.

The digest is also available via email.  Just send a note saying that you
want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
automatically receive each new issue as it is created.  Sorry, back issues
are not available through the mailing list.

Send administrative mail to mkelly@cs.uoregon.edu.


-- 
_____________________________________________________________________________
Michael A. Kelly                                         University of Oregon
mkelly@cs.uoregon.edu                             Computer Science Department
_____________________________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: Ray.Arachelian@f204.n2603.z1.ieee.org (Ray Arachelian)
Subject: Taniwha
Organization: FidoNet node 1:2603/204 - Not Even Odd, Forest Hills NY
Date: Sun, 16 Aug 1992 15:27:01 GMT

 I recently saw a file entry on the rascal ftp site in the mac/comm directory
 about a BBS development kit called taniwha.  However since Rascal is in the
 process of removing its file, all that was left was this info file.

 I've tried to get in touch with the author (Paul Campbel) through the uucp
 site he named (paul@taniwha.UUCP or !mtxinu!taniwha!paul) yet the unix
 machine
 I use at work cannot for whatever reason send mail to uucp.

 If anyone knows where this file might be located, I'd greatly appreciate it.
 Thank you.


--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 Ray Arachelian - Internet: Ray.Arachelian@f204.n2603.z1.ieee.org
Xref: sparky comp.sys.mac.programmer:14035 misc.education:3117 soc.college:3602