HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.sys.mac.programmer
Subject: Re: Serial Drivers -- Please Help
From: edan@netcom.com (Edan Shalev)
Date: Thu, 21 Jan 1993 09:08:12 GMT
Organization: Netcom Online Communications Services (408-241-9760 login: guest)

well I just wrote a program using the serial driver (yes i know its out
dated, but the CTB was making my life hell) I have basically the same
setup as you do, so it should work fine.. this is copied and pasted right
out of my code..

OSErr serialinit()
{
	OSErr 	err;
	SerShk flags;
 
	if ((err = RAMSDOpen(sPortA))) return err;
	if ( (err = SerReset( ainRefNum,baud2400 + data8 + stop10 +noParity)))
	{	RAMSDClose(sPortA);
		return err;
	}
	
/* give the serial manager a SERBUFSIZ buffer */
	if (! (sermgrbuf = (char *)NewPtr (SERBUFSIZ))) {
		err = SerSetBuf(ainRefNum, sermgrbuf, SERBUFSIZ);
	}
	if ( (err = SerReset( aoutRefNum,baud2400 + data8 + stop10 +noParity)))
	{	RAMSDClose(sPortA);
		return err;
	}
	
/* set handshaking */
	flags.fXOn = TRUE;
	flags.fInX = TRUE;
	flags.xOn = XONCHAR;
	flags.xOff = XOFFCHAR;
	if (( err = SerHShake(ainRefNum,&flags))){
		RAMSDClose(sPortA);
		return err;
	}
	
	if (!( inbuf = (char *) NewPtr(SERBUFSIZ))) return MemError();
	return 0; 
}

im surprised it still supported, but it works.. im using THINK w/sys 7 also..

anyway hope it helps!

since im already posting somthing.. I might as well ask a question..
Im using TE functions to process incoming data, and i find it is very slow!
(i kinda didnt want to have to write all the copy/selection/paste/scroll
routines, so i tried text edit) but it is too slow, is there any trick
to TE? it looks like im at 300 baud (when running at 2400) 

thanks

	edan
From: jtarr@husc8.harvard.edu (Jeff Tarr)
Newsgroups: comp.sys.mac.programmer
Subject: Lotus 1-2-3
Keywords: LOTUS
Date: 21 Jan 93 16:03:59 GMT

Under Lotus 1-2-3 v1.0 I am having a problem with a file that relies on
another file for all of it's data.  The trick is that the file it relies on
relies on many other files for it's data.  Imagine this diagram:


                  |----------File A
                  |----------File B
                  |----------File C
File X ----> File Y ---------File D


The problem is that if "File Y" is not up to date (ie: it's links have not
been refreshed" then the information in "File X" is wrong.  Unfortunately
with just "File X" open an Update-Links won't update "File Y" so "File X"
is not getting the right information.

Is there an easy way for me to resolve this problem (ie: make sure that File Y
is up to date) or should I just recode File X to get all of it's data from
the files that File Y uses?

Thanks in advance.
-- 

Jeff Tarr
Harvard University
jtarr@husc.harvard.edu
Newsgroups: comp.sys.mac.programmer
From: yikes@netcom.com (Michael Brill)
Subject: Memory management from Unix to Macintosh
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Sat, 23 Jan 1993 04:23:04 GMT


I'm developing an app on the NeXT that I'd like to take the bulk
of to either Windows and/or Macintosh.  I think I know how to 
port everything but the UI and memory management.  Note that the
pieces of the app I want to port are just plain old ANSI C.

As far as the UI goes, I'm not going to worry about now.  What I
am worried about is memory management.  I'm looking
for an established scheme to make the port seamless between Unix
and Windows/Mac.


Thanks, ...Michael Brill (yikes@netcom.com)

-- 
----
From: rudolph@unixg.ubc.ca (Christopher E Rudolph)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Symantec's Address & Telephone #
Date: 24 Jan 93 21:30:50 GMT
Organization: The University of British Columbia
NNTP-Posting-Host: unixg.ubc.ca
Keywords: Symantec

In <1993Jan24.032116.27595@netcom.com> nagle@netcom.com (John Nagle) writes:

>rudolph@unixg.ubc.ca (Christopher E Rudolph) writes:
>>For those of you who don't have any Think Products:
>>Symantec Corporation
>>10201 Torre Avenue
>>Cupertino, CA  95014-2132
>>Tele: 408/253-9600

>        Allow plenty of time for waiting on hold.

>					John Nagle


Actually when I called I got right through and the receptionist couldn't
be more helpful
For those of you who are Canadians:

Symantec Upgrades : 1-800-465-2266
Symantec Support :  1-416-366-0423

Chris Rudolph (ComputerScience, UBC) <rudolph@unixg.ubc.ca>
=---------------------------------------------------------=

Newsgroups: comp.sys.mac.programmer
From: urban@yoda.fsl.noaa.gov (Art Urban)
Subject: Re: More on TCL Nightmare.....................................
Organization: Forecast Systems Lab, NOAA, Boulder CO, USA
Date: Mon, 25 Jan 1993 19:40:42 GMT

In article <1993Jan23.234716.1435@kth.se> d88-jwa@cyklop.nada.kth.se (Jon Wtte) writes:
%In <93023.121559REE700A@MAINE.MAINE.EDU> REE700A@MAINE.MAINE.EDU writes:
%
%>  Now, this amounts to 60,000 LongRects (hence 240,000 LongInt assigns,
%>and 120,000 LongInt adds, so the math of generation is non-negigible.
%
%>  Any useful suggestions on how to speed this process up?
%
%Yes, it's very simple; your Draw() method gets a Rect passed
%to it; that Rect contains the area that actually needs to
%be drawn. I don't know what data structures you have, but
%some simple binary search over sorted coordinates, or some
%other clever way of knowing what rectangles to draw without
%checking each and every one would probably help tremendously.
% -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

Along the same lines, I found that using SectRect() with the rect that gets
passed to Draw, and the rect of the obejct I want to draw, will result in
a non-empty rectangle if the object needs to be drawn. This way I could
skip all draw calls to objects outside of the intersection as they were
empty rects. This sped things up *considerably*.


-- 
Art Urban 					        urban@yoda.fsl.noaa.gov
===============================================================================
 "Look, he's being attacked by creamy nugget centers."		 	 -Joel
===============================================================================
Newsgroups: comp.sys.mac.programmer
From: aa443@Freenet.carleton.ca (Robert Szarek)
Subject: Looking for Apple PDA Develoer Info
Reply-To: aa443@Freenet.carleton.ca (Robert Szarek)
Organization: The National Capital Freenet
Date: Wed, 27 Jan 1993 04:19:48 GMT


I'm looking for developer info on Apple's PDAs. The info should cover
Newton and Sweet Products. So far APDA doesn't have any reference to
the products in any way. Is there also any place where I can get info
on the Dylan programming language ? I thought I saw something in 
a december issue of "Computer Language".

Other related info that would be of interest would be anything on
General Magic and it's PDA-OS called "Telescript".

Thanks in advance.
-- 
Robert A. Szarek
NCF/National Capitol Freenet
Ottawa, Canada
aa443@freenet.carleton.ca
From: sainaney@unixg.ubc.ca (Narayan R. Sainaney)
Newsgroups: comp.sys.mac.programmer
Subject: CPU load
Date: 25 Jan 1993 22:23:07 GMT
Organization: University of British Columbia, Vancouver, B.C., Canada
Distribution: world
NNTP-Posting-Host: unixg.ubc.ca

	Hi, I am working on an application that shows the current CPU
stats including foreground application, how long you've been in it,
memory used, memory used by foreground application etc. I would like
to have a graphical representation of the current CPU load due to the
foreground application. Currently, I just check to see how many null
events I get in 1 second (60 max right?) and then use the proportion  
to draw a bar. This however is more of a multifinder friendly rating.
Does anyone have any better suggestions how to go about doing something
like that? Any help would be greatly appreciated...

sainaney@unixg.ubc.ca

Newsgroups: comp.sys.mac.programmer
From: resnick@cogsci.uiuc.edu (Pete Resnick)
Subject: Re: SetDItem and control panels...
Organization: University of Illinois at Urbana
Date: Tue, 26 Jan 1993 07:16:11 GMT

davidp@stealth.usc.edu (David Peterson) writes:

[He can't use SetDItem to a routine in a control panel...]

>Does cdev code not stay locked while the control panel is open?

You have hit the nail right on the head. The control panel is locked
only during the call and unlocked after you return. Call your routine
in response to the update.

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: vosse@ruls41.LeidenUniv.nl (Theo Vosse)
Subject: Re: Arcade-style animation...
Reply-To: vosse@ruls41.LeidenUniv.nl (Theo Vosse)
Organization: Leiden University, Netherlands
Date: Mon, 25 Jan 93 09:42:56 GMT

In article <1993Jan23.014127.5750@cs.ucla.edu>, tj@kona.cs.ucla.edu (Tom
Johnson) writes:
|> Here is what I first envisioned in pseudo-code:
|> 	
|> 	foreach sprite 
|> 		CalculateNewLocation()
|> 	foreach sprite
|> 		EraseSprite()	// by copying the sprites old location from
|> 				// a bkgnd screen to an offscreen world
|> 	foreach sprite
|> 		DrawSprite()	// by copying the sprite onto the offscreen
|> 				// world
|> 	UpdateScreen()		// by copying the offscreen world onto the
|> 				// screen.	
|> ...
|> But!  If I'm drawing directly to the screen, how do I handle the
|> "EraseSprite()" function?  Since I want to support a complex color

Life is simple... Forget the UpdateScreen function, and implement the
EraseSprite as a copy of the old contents (that were stored under the
sprite) back to its original position. So, DrawSprite must copy the
contents of the sprite's position before drawing the actual sprite.

	Theo Vosse
	----------
	Unit for Experimental Psychology
	University of Leiden
	The Netherlands
Newsgroups: comp.sys.mac.programmer
Subject: Several specific questions...
From: seth@physc1.byu.edu
Date: 23 Jan 93 01:10:24 -0700
Distribution: world
Organization: Brigham Young University

Hi. I am fairly inexperienced yet, and I have run into something I don't know
how to improve. Here goes:
I am writing one of those types of programs where lots of complex calculations
need to be going on all continuously, and yet still allow an event loop to be
going on so that I can react to user input in menus. My program is calculating
the orbit of a planet the whole time. user input can change the planet's
location and scale of the screen at any time, thus also changing where the 
planet is displayed on the screen. The way I have done it so far is to just
include a statement where I enter my calculation procedure, calculate the
position in maybe 30 time increments, leave the procedure, enter a procedure
where I update the screen to reflect the planet's movement, then go continue
on with WaitNextEvent. I set the SLEEP value to zero for the time being, 
because to do otherwise slowed the planet down a lot. Now the question is, is
there a better way to have something going on during the event loop that does
not result in much of a slowdown? I would LIKE to allow other things a LITTLE
time in the background, but I recognise that to be any decent speed, my
program needs to hog most all of the cpu time.
Another question I have concerns drawing the planet. I have heard stuff about
using small cursor icons and the CopyBits function to sort of animate this
movement. Currently I just move the pen to where I start out, and then when 
I update the position I simply DrawTo the currently x and y coordinates of
the planet. This is fine for getting the program to work, but I really want to
do the animation. Can anyone point me to some simple example code that does
this sort of animation? I have never seen any, and despite what I have read
about it, I am still somewhat confused at just how it is done, and I would
like to look at some code. 
My final question: I am currently using floating-point numbers to represent the
x and y coordinates, and I have the 68882 option on in THINK Pascal. I have
been told that I can speed up my calculations a lot if I change it all to
fixed-point math. I would like to learn how this works, but I haven't been
able to find any reference stuff on it. I don't have the Apple Numerics Man.

By the way, this is only a learning experience for me, and yes, it is in fact
inspired by the program "Gravitation" by Jeff Rommereide. I wanted to do a
project that would allow me to get my feet wet in mac programming, so I 
decided to write my own solar-system simulator.


Thanks a million for any hints you can give me!
Seth Leigh
BYU Physics Dept.
From: jnewman@sisters.cs.uoregon.edu (Jonathan Grady Newman)
Newsgroups: comp.sys.mac.programmer
Subject: Lack of color solved, but why?
Summary: Var declaration caused lack of colors in Menu
Keywords: color, memory
Date: 22 Jan 93 03:41:14 GMT
Organization: University of Oregon Computer and Information Sciences Dept.

In an application I have been writing in Think C, I had a problem with all
of the text in windows, menus and dialog boxes being missing. The cause
of the problem seems to be the following declaration in my main:

RGBColor screen[screenheight+1][screenwidth+1];

Where screenheight and screenwidth are previously #define'd.

The fix was to make the following declaration instead:

RGBColor *screen;

And make a call to NewPtr...

My question is why does this happen?  Is it a problem with TC?
I am using objects in my app.



-- 
========================================================
Jonathan Newman                "Lick cheese" - jnewman
University Of Oregon
Computer and Information Science
Newsgroups: comp.sys.mac.programmer
From: bowman@reed.edu (Hobo Bobo)
Subject: How to tell if Projector'd file modifiable?
Organization: Reed College, Portland, OR
Date: Thu, 28 Jan 1993 00:28:37 GMT

Does anyone know an easy way to tell if a file has been ModifyReadOnly'd?
I like to run CMarker through a script on my source, and want to skip files
which haven't been checked out or MRO'd.  Is there a built in way to do this?
Or should I just write a tool to check the relevant resource?

thanks,
bobo              In seeking the unattainable,
bowman@reed.edu            simplicity only gets in the way.
Best personal ad ever:
"Functionally dysfunctional bi-polar former pop-star geek with Valium habit
seeks anorexic queen of darkness for co-dependency.  Hobbies include: passing
out, slurred speech, blurred vision and reliving past glory."
_Willamette Week_, 1/7-13/93
From: Ray.Arachelian@f204.n2603.z1.ieee.org (Ray Arachelian)
Newsgroups: comp.sys.mac.programmer
Subject: 68000 Exception Handling
Date: 22 Jan 93 14:31:04 GMT
Organization: FidoNet node 1:2603/204 - Not Even Odd, Forest Hills NY

I've a question about the 68000/68030 CPU's.

When an illegal instruction occurst (F line, or A line traps) can hardware 
interrupts interrupt the toobox call?

I'm thinking about writing a pre-emptive multi-tasking extension for the 
Mac, but the problem is that I don't want to interfere with a toolbox 
call.

If the IRQ lines generated by the VBL's, and other I/O's can infact 
interrupt a toolbox call, I can patch my own routines to to the toolbox 
trap mechanism.

IE: When a toolbox command is executed by the CPU, I'd patch the vector 
for the A line emulator to first enter my routine which will set the 
toolbox flag, then call the old routine, and then clear the flag.

Basically what I want to be able to do is to have patch the IRQ Level 1 
68000 vector to run my routines before and after entering the Mac OS 
Interrupt Service Routines.  To do pre-emtive tasking I need to know that 
its safe to tell the Mac OS to do a context switch.  I don't want to do a 
context switch in the middle of a toolbox call or antoher interrupt.  I 
know that interrupts can be re-entrant, or an interrupt of a higher 
priority can interrupt the task servicing an interrup.

How can I do this?

 * Freddie 1.3b4 * Metal Militia: Joining together to take on the world with
our heavy metal
--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 Ray Arachelian - Internet: Ray.Arachelian@f204.n2603.z1.ieee.org
From: george@sabre.cit.cornell.edu (George Boyce)
Newsgroups: comp.sys.mac.programmer
Subject: adev and alap programming
Date: 26 Jan 93 14:14:53
Organization: Cornell Information Technologies
Distribution: comp
NNTP-Posting-Host: sabre.cit.cornell.edu

I'm working on an appletalk project and am looking for documentation
or code samples if anyone has any they are willing to share. The
documentation I have is apple's "EtherTalk and Alternate AppleTalk
Connections Reference, working draft 3 - April 6, 1988" and "Appletalk
Connections Programmer's Guide" (on order from APDA).

Does anyone have anything else they can share with me?

George
--
George Boyce, george@nr-tech.cit.cornell.edu
Network Resources, Advanced Technologies and Planning
Cornell Information Technologies, Cornell University, Ithaca NY
Newsgroups: comp.sys.mac.programmer
From: smargari@nmsu.edu (Susan Margarit)
Subject: Re: Think Reference 2.0 Review
Organization: NMSU Computer Science
	<C1A9wp.7vn@world.std.com>
Date: Sun, 24 Jan 1993 20:56:51 GMT

>Actually, AutoDoubler compressed the files from about 7.1 megs down
>to about 4 megs. It seems (when you open the data files with
>Resorcerer) that they are straight data, no compression built in.
>
>Even using AutoDoubler, the boot time of THINK Ref 2.0 was not
>much slower than it is by default...just a few seconds...on my
>PowerBook 160.

You should lock the databases (in the get info dialog of finder)
*after* it is compressed. It launches much faster that way and even
launches promptly on my PB100.

Jim Margarit (smargari@nmsu.edu)
Newsgroups: comp.sys.mac.programmer
From: jimi@romulus.ehs.uiuc.edu (Devin Nickol)
Subject: Re: Becomming a Mac programmer
X-Newsreader: Tin 1.1 PL5
Organization: University of Illinois at Urbana
Date: Mon, 25 Jan 1993 18:23:48 GMT

 (F0O@psuvm.psu.edu) wrote:
:    Hi!
: 
:    I'm starting a new job in about a week, where they use Macs.  I'm a
: Windows programmer, and am glad to get experience on the Macs, but may
: have to do some programming on the Mac.
:    I was wondering what the difference was between programming under the
: Windows environment and under the Mac, and what would be good books/journals
: for me to read to catch up?
:    I DO NOT want to start a war over Windows vs Mac.  Just simply need
: some sources so I can catch up on the Mac world.
: 
: 
:                                                           [Tim]


i recommend the Macintosh C Programming Primer by Dave Mark and Cartwright
Reed. it seems to be available in most bookstores and should give you
a good start at learning toolbox functions. some of the code has errors
though...but overall it's still worth the $26.95.

devin nickol
jimi@romulus.ehs.uiuc.edu

Newsgroups: comp.sys.mac.programmer
From: csuley@cs.cornell.edu (Christopher Suley)
Subject: Mac Plus Driver Unit Table
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Date: Thu, 28 Jan 1993 21:06:18 GMT

How many entries are there in the driver unit table on a Plus?
Is it 48 as indicated in Inside Mac IV, or has it expanded to
64 as indicated in Inside Mac V?

-- 
*plonk*
This post comes pre-*plonk*ed for your convenience.
Newsgroups: comp.sys.mac.programmer
From: jim@math.concord.wvnet.edu (Jim Johnston)
Subject: Printing Manager, help!!!!!
Organization: Mathematics Department, Concord College
Date: Wed, 20 Jan 1993 12:54:22 GMT

I'm working on an application that currently works for printing text to a 
Laserwriter.  I'd like to be able to use most of the same code to print to 
the Imagewriter, too.  I am sending only text and would like to send it 
directly to the Imagewriter as text.  In principle, I know how to do it.  My 
problem at the moment is figuring out how to look at the printing record and 
tell if I have an Imagewriter or a Laserwriter.  HELP!!!!

Also, I am using Pascal if this helps.

Thanks in advance,

Jim Johnston
Concord College
From: mark@pokey.jsc.nasa.gov (Mark Manning)
Subject: Image files - How do you use them?
Organization: NASA
Date: Thu, 28 Jan 1993 22:43:22 GMT

I'm sure this has been asked before but - How do you use an image
file?  I decided to boot up SADE under MPW and forgot we had upgraded
SADE to 1.3.  Unfortunately, I do not have Multifinder 6.1b9.  So I
downloaded System 6.0.8 from Apple and found everything to be in
an image file format.  Any help would be appreciated.  Thanks in advance.
:)

Xref: sparky comp.sys.mac.programmer:22001 comp.sys.mac.misc:22187 comp.sys.mac.system:16554
From: David_Anthony_Guevara@cup.portal.com
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.misc,comp.sys.mac.system
Subject: APDA Mac Tech Notes subscriptions...
Date: Fri, 22 Jan 93 19:38:43 PST
Organization: The Portal System (TM)
Distribution: usa


Have any of you who subscribe to Mac Tech Notes through APDA rec'd any since
July?  I haven't rec'd anything since July and am somewhat concerned.
Did APDA lose some addresses/subscribers in their move to their new location?
Is the delay due to the changes in the new release of Inside Mac?  I know
APDA changed the subscription renewal format slightly last year.  I was under 
the impression that I had my subscription covered for one year, but maybe 
they're only sending out x number of updates per subscription?  
Sorry if all of this has been covered before.  Please e-mail me your 
responses.  Thanks!

-- David Guevara,
   Internet:  David_Anthony_Guevara@cup.portal.com
From: bpb9204@tamsun.tamu.edu (Brent Burton)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Why the Piracy? Here's why...
Date: 25 Jan 1993 23:48:54 -0600
Organization: Texas A&M Univ., Inc.
Distribution: world
NNTP-Posting-Host: tamsun.tamu.edu

mwalker@novell.com (Mel Walker) writes:
|
|Just like the only sensible policy for 30-minutes-or-less pizza delivery is
|for the drivers to speed, so the business can cover more territory without
|paying higher costs of hiring more drivers, etc. That's a money-saving
|policy, until the cops catch you, and your insurance rates go through the
|roof, and your business goes under.

Just some pizza-industry info...

Actually, speeding doesn't help the company directly.  Speeding is the
result of greed on the driver's side of the business.  The more runs
you make, the more tips you get.  The company only gets money from the
pizza sales - faster delivery doesn't make the orders come in quicker
and the $3 off isn't *that* common.  Speeding only helps the driver.

A few years ago I delivered for about 2 years in the Houston area.  Never
since have I had a $13/hr job listening to music...

-Brent "I never sped" Burton

ObMacProgramming:  TCL (Think's TCL) is cool when you figure it out.
-- 
+-------------------------+
| Brent Burton    N5VMG   |    
| bpb9204@tamsun.tamu.edu |  
+-------------------------+
From: amanda@intercon.com (Amanda Walker)
Newsgroups: comp.sys.mac.programmer
Subject: Re: disabling breaks and steps in MacsBug
Date: Thu, 21 Jan 1993 00:54:37 -0500
Organization: InterCon Systems Corporation
Distribution: world
Reply-To: amanda@intercon.com (Amanda Walker)
NNTP-Posting-Host: chaos.intercon.com
X-Newsreader: InterCon TCP/Connect II 1.1b34

theeric@violet.ccit.arizona.edu (Eric Hegstrom) writes:
> There is an easy way to keep people from setting break points 
> and stepping through your code with MacsBug. 

This is a cute approach, but it won't be more than a momentary annoyance to 
someone who really knows the Mac (& Macsbug) well.  It's quite easy to break 
into the debugger after your application has been loaded but before it starts 
executing.  At this point a user can step around your code that replaces the 
interrupt vectors, and proceed on as usual.

If the Mac can execute your code, someone with enough patience can step 
through it with Macsbug.  Period.  The best you can do is make the process as 
misleading as possible.


Amanda Walker
InterCon Systems Corporation