HDTenEightyP/NetNews huggingface dataset:
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: vSynchWait and PowerBook I/O
Date: 13 Oct 92 19:50:02 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

In article <jpurlia-121092170808@129.46.5.45>, jpurlia@qualcomm.com (John
Purlia) wrote:
> 
> I've writted an app that communicates to an external device via the modem
> port.  My app runs fine on a Quadra 700 and a IIci, but hangs forever and
> ever and ever when run on a PowerBook 170.  A protocol analyzer reveals
> that nothing is ever sent from the serial port when I call FSWrite.  When I
> trace through the code using MacsBug I find that the code is at the
> following:
> 
> _vSynchWait
>     +0000    4080BB8C    MOVE.W $0010(A0),D0
>     +0004    4080BB90    *BGT.S	_vSynchWait
> 
> The value being tested is always 0001, which leads me to believe that I'm
> waiting for the asynchronous I/O to complete.  My question...  Why does
> this only happen on a PowerBook and what are some of the possibilities for
> things I'm doing incorrectly?

One suggestion.  Don't use FSWrite or FSRead on the serial ports.
FS stands for File System.  They are not designed for any driver calls. 
They might work, but they're not the best approach.

-----------------------------------------------------------------------
Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
                             |          Sound Manager Expert
Apple Computer, Inc.         | RAll opinions expressed are mine, and do
20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
Cupertino, CA 95014          |       employer, Apple Computer Inc.S
Newsgroups: comp.sys.mac.programmer
Subject: Productivity of a C programmer ?
Date: Sat, 10 Oct 1992 21:37:00 -0500

  cj> From: cjh1@ellis.uchicago.edu (chi ju huang) Newsgroups:
  cj> comp.sys.mac.programmer Organization: University of Chicago Computing
  cj> Organizations Reply-To: cjh1@midway.uchicago.edu
  cj> 
  cj> Hello, world.
  cj> 
  cj> Could any one show me the light on "Average productivity of a C
  cj> programmer in today's industry in terms of number of lines of source
  cj> code produced per day."

Don't get hung up on the language -- several studies (quoted in _The Mythical
Man Month_ and elsewhere) show that lines of source code productivity is the
same across languages.  What differs is the productivity of the language.  Ergo,
take C over Assember or C++ over C.

Despite the doubts of many, lines of source code seem is the factor most often
used to compute a project's duration and effort.  I suggest you look into Barry
Boehm's _Software Engineering Economics_ -- found in your school library or
where fine sleeping medications are sold.

Boehm study 70+ cases at TRW to derive his formula.  They have been revised
slighty to account for code reuse and object techniques.  Still Boehm says that
COCOMO (COnstructive COst MOdel) is right within a factor of two only 50%
percent of the time.  But it will give you an estimate, based on lines of code
and about 15 weighting factors, of duration and effort for prelimiary design
through detailed design, code & unit test, and integration test.  Then you have
to add for requirements analysis on the front and (as required) systems test on
the back.  Then there are the post deployment ( read "maintenance") costs.

Another thing -- COCOMO accounts for everyone, not just programmers.  This is as
it should be -- real projects have managers, data collectors, documentation,
admin staff, etc. and all the usual distractions like sick leave, vacation, turn
over, and the general crap that fills one's day at the office and can change a
simple "Hello, world!" into _War and Peace_.

Newsgroups: comp.sys.mac.programmer
From: martinher@urvax.urich.edu (Herb Martin - martinher@urvax.urich.edu)
Subject: Re: Resource Help!!!!!
Reply-To: martinher@urvax.urich.edu
Organization: University of Richmond
Date: Sun, 11 Oct 1992 07:09:08 GMT

I have seen the following behavior and it confuses me:

I have a Drag'n-drop application that marks file types and creators
and it works just fine.  I keep it on my desktop.

A friend wanted it so I sent it to him via MS Mail.  He saved it to
the desktop but it no longer responded to drag overs.  It never 
changed colors.  So I checked the size and bndl resources along with
every other resource that I thought might affect this - no help.
Rebuilt the desktop.  Rebooted.  Changed the 'inited' flag. 
Rebuilt the desktop.  Rebooted.

I though it might have something to do with mail, so I took it over
on a floppy after first deleting the one there.  No help.  I thought
it might be because we saved it to the desktop.  Tried a folder.
Nope.  Cleared inited, rebuilt desktop, rebooted.  Nothing.

When the floppy is inserted that version works.  Once it is copied
to his machine - no response.  System 7.01 with tune up.

I had also seen this with my first 'dragon' application but I thought 
that it was something to do with a program error.

Any ideas?
**************************************************************
**   Herb Martin               MartinHer@urvax.urich.edu    **
**   JRC-41-1, P.O. Box 26603, Richmond, VA 23261           **
**   804-274-4325 (days)       804-320-5047 (evenings EST)  **
**************************************************************
**************************************************************
**   Herb Martin               MartinHer@urvax.urich.edu    **
**   JRC-41-1, P.O. Box 26603, Richmond, VA 23261           **
**   804-274-4325 (days)       804-320-5047 (evenings EST)  **
**************************************************************
Newsgroups: comp.sys.mac.programmer
From: blob@gallant.apple.com (Brian Bechtel)
Subject: Re: Anyone use SoftPolish?
Date: Fri, 16 Oct 1992 21:35:07 GMT
Organization: Apple Computer Inc.

haynes@mace.cc.purdue.edu (Carl W. Haynes III) writes:

>I've been thinking about purchasing SoftPolish, but have never
>seen any comments about it.

>1) Is the dictionary customizable (can I add entries?)

Yes.

>2) Can you spell check only part of a resource?, I have a number
>   of resources that are part text and part bitmap.

>3) Is it generally easy to use, do you get lots of useless
>   comments about your resources?

You set the level of comments you want to receive.

>4) Can you specify which resource types to check (i.e. check
>   some but not others?

Yes.

In general, this is a WONDERFUL product.  It polishes up your grammar
and spelling.  It checks for resource validity.  It checks for missing
parts of a set of resources (e.g. DLOG without a DITL, DITL without a
DLOG.)  It does a lot more.

For more information, send a message to langsys@appplelink.apple.com or
call them at (703) 478-0181.

--Brian Bechtel     blob@apple.com     "My opinion, not Apple's"
From: cconstantine@galaxy.gov.bc.ca
Newsgroups: comp.sys.mac.programmer
Subject: SYLK file format??
Date: 14 Oct 92 11:59:52 -0700
Organization: BC Systems Corporation

Hello once again programming gurus.

does anyone know where I can get info on the SYLK file format?? Is it Public or
is it copyrighted??

Thanks.
-- 
Carl B. Constantine
CCONSTANTINE@galaxy.gov.bc.ca
	"Opinions are mine only!!"
Newsgroups: comp.sys.mac.programmer
From: ednstras@kraken.itc.gu.edu.au (Michael Strasser)
Subject: Adapting old MacPascal program to MPW
Organization: ITC, Griffith University, Brisbane, Australia
Date:  8 Oct 92 04:12:59 GMT

I have been asked to adapt a MacPascal program to MPW so it can be used
again.

Some preliminary work has shown that the program's dependence on MacPascal's
text and drawing windows and a few other things will be a major problem.  I
have tried to use the MPW SIOW option but the program doesn't even create a
window: it just stops at the first writeln statement.

This program does some QD stuff itself, so it looks as if I'll have to write
a proper Mac program to replace the old one.

Does anyone have experience with such adaptations or have any suggestions?

Thanks in advance,

-- 
Mike Strasser                       Internet: M.Strasser@edn.gu.edu.au.
Faculty of Education                Fidonet:  3:640/308.2@fidonet
Griffith University
Brisbane, Australia
From: sarachanbd@crd.ge.com (B. D. Sarachan)
Newsgroups: comp.sys.mac.programmer
Subject: Think C 6.0 (was Re: Think C++??)
Date: 14 Oct 92 12:55:44 GMT
Reply-To: sarachanbd@crd.ge.com (B. D. Sarachan)
Distribution: usa
Organization: GE Research & Development Center

In article <D88-JWA.92Oct10234259@dront.nada.kth.se>, d88-jwa@dront.nada.kth.se (Jon Wtte) writes:
|> 
|> Well, it has been publicly demonstrated that Think C 6.0 will
|> support ToolServer for MPW... 


What else is known about Think C 6.0?  Does anyone know when it will be 
released?

-- 
==
  sarachanbd@crd.ge.com

  Brion Sarachan
  G.E. Corp. R. & D.
  P.O. Box 8, Rm. KW-C273
  Schenectady, NY 12301

  Tel. (518) 387-6553
  Fax  (518) 387-7080

Please note that the "Standard Disclaimer" applies here.
Newsgroups: comp.sys.mac.programmer
From: yates@latech.edu (Donald W. Yates)
Subject: Need idiot-level assm help
Organization: Louisiana Tech University
Date: Thu, 15 Oct 1992 14:27:32 GMT
Expires: 10/25/92 


Could somebody please email me the simplest assembly language program
that would output text to the screen.  Much like the "Hello World"
program found in most programming texts.  Sorry to ask but we've
misplaced (lost??) our references and I am in a great hurry.

thanks in advance

yates@latech.edu



Newsgroups: comp.sys.mac.programmer
From: tree@newton.uvm.edu (Tom Emerson)
Subject: Re: THINK C bug AGAIN
Organization: University of Vermont, EMBA Computer Facility
	<Bw4DGs.Gyz@news.cso.uiuc.edu> <1bhu6sINN6cm@falcon.natinst.com>
Date: Thu, 15 Oct 1992 13:59:25 GMT

There is a known bug in the code-motion code of the THINK C 5.0.3 global
optimizer. This is being addressed now.

Tom
--
   Tom Emerson                                    Technical Support
   Language Products Group                     Symantec Corporation
                         Internet: tree@uvm.edu
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: Telling the Finder to update a file's type & creator
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Mon, 12 Oct 1992 16:47:25 GMT

> mkelly@mystix.cs.uoregon.edu (Michael A. Kelly) writes:

   like to tell the Finder to immediately update the file's icon and/or Kind

Set the modification date of the folder the file resides in to
the result of GetDateTime.

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Suedoise (not french speaking) --

  "From now on I will re-label the EQ on the deck as Fizz and Wobble
   instead of HF and LF."
From: brianj@bedrock.cs.umd.edu (Brian Johnson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: ZREF errors - Think C 5.0.3
Date: 13 Oct 92 21:22:03 GMT
Distribution: comp
Organization: Computer Science, Univ. of MD, College Park, MD 20742
In-reply-to: rhorn@csws2.ic.sunysb.edu's message of 12 Oct 92 17:39:53 GMT

There doesn't seem to be much interest in this, but I'll followup for
what it's worth.

This doesn't appear to be a think C problem.

I think I'm trashing memory, and hence my project from my own code:-(
It's an intermittent problem and since it results in recompiling
184,000 lines of code it's could be a bitch to figure out (I've put it
off for a day or so).

If anyone has tricks of the trade for locating this problem I'm all
ears.  I've given the program a fairly decent work out with heap
scrambling on, it ran great.  Tried SS 0 (looking for writes to 0 in
memory) in macsbug and it seemed like there were a few!  Most
before I even got to my code?

This particular project has modified NewClassDemo to hold tabular
information.
--
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...
From: carlacio@vxcern.cern.ch (Carlo De Vecchi)
Newsgroups: comp.sys.mac.programmer
Subject: QUADRA BUS errors
Date: 16 Oct 92 17:19:40 GMT
Organization: CERN
X-Useragent: Nuntius v1.1b3

I write:
Subject: QUADRA BUS errors
From: Carlo De Vecchi, carlacio@vxcern.cern.ch
In article <1992Oct14.145751.4175@dxcern.cern.ch> Carlo De Vecchi,
carlacio@vxcern.cern.ch writes:
>Hi
>
>I am working on software that read an external RAM by a card placed into
>a 
>slot of my Macintosh. For me is very important to catch BUS errors.
Until 
>now I worked with a mac fx without problems. Now I am porting the
>software 
>into a quadra. I modified a little bit the code to catch the bus error
on 
>68040 and now it works fine when I read from the memory. When I write 
>(under the conditions of a bus error) the processor seems not to
generate 
>the exception at all! After a little investigation I saw that the 
>processor doesn't generate the exception when I try to write also into
>the 
>following ranges of memory address:
>
>  7F00 0000 -- 9000 0000
>  A000 0000 -- EF00 0000
>  F100 0000 -- FFFF FFFF
>
>It is a problem with the PMMU ?
>(I work with sys 7 but without virtual memory; I have 20Mb of RAM...) 
>
>In what am I wrong ?
>
>Thanks.
>						Carlo De Vecchi
>					CARLACIO@VXCERN.CERN.CH

Looking in "Macintosh Quadra 700" developer note I see that this computer
as a chip named YANCC (Yet Another NuBus Controller Chip) working as an
interface between the system bus and the NuBus. It "Unlike the NuBus
controllers in previous Macintosh computers, the YANCC IC generates an
interrupt when there is an error involving the write buffer. Software
controls this interrupt by means of a control and status register in the
YANCC." The YANCC control is at $5002A000-$50028000.
I searched but I haven't found documentation about how to control this
chip.
Somebody knows?

Thanks again.
Newsgroups: comp.sys.mac.programmer
From: Ted Lowery <tbl@rock.concert.net>
Subject: searching the digests?
Organization: MacSolutions
X-Useragent: Nuntius v1.1
Date: Thu, 15 Oct 1992 22:11:39 GMT

In article <PERM.92Oct15004257@groucho.csd.uu.se> Per Mildner,
perm@csd.uu.se writes:
>I use BBEdit to search the c.s.m.p digests. It works like a charm and
>is available at better archives everywhere. With this you could find
>TouchDir in less than a minute.

HUH?  Forgive this probably stupid question, but is their such a thing
and if so how/where and all that?  I read news in two places, one is
a university unix account using rn, which I hate, the other is on our
mac network at work using nuntius, newswatcher, thenews, etc
which I hate.  I was blessed for a very short time with newsgrazer
on the Next, and loved the interface.  is their a newsgraser like clone
for reading news on the mac?

but, back to the original question.  I save articles to disk that I think
might be useful to me in the future, but I have no good way of searching
them.  I have thought of trying to build some kind of database of *ALL*
the c.s.m.p threads that I or any of my fellow programmers could search
at any time, but my boss already thinks I spend too much time on the
net as it is.  He doesn;t realize that If i do find something useful, it
can save me anywhere from 5 minutes to 5 years of programming time.

So what's the best way to find old articles without storing 5 trillion
gigabytes of think vs. mpw debates, and without having to read and
archive each and every article myself?

Thanks all...

Ted
tbl@rock.concert.net
From: yjc@po.cwru.edu (Jerome Chan)
Newsgroups: comp.sys.mac.programmer
Subject: Apple Events! How to locate a service?
Followup-To: comp.sys.mac.programmer
Date: 7 Oct 1992 19:33:16 GMT
Organization: The Tofu Society of Singapore
Distribution: world
NNTP-Posting-Host: b61539.student.cwru.edu

  Apple Events is a cool way to communicate between various applications.
However, I noticed a drawback. It doesn't have a services directory.
Everytime there is a need to locate a particular application
service/server, I've got to fiddle around with the PPC thingies. If the
application/server providing the service is not running, there is no way my
application can find out where the server/application is located, launch it
and continue (with the user's consent of course!).

  A services directory (sd) would be a nice thing to have. An application
would  register with the sd, indicating if it provides local and/or global
services. The sd would then inform all other sd's on the AppleTalk net of
this new addition if global services are provided. When an application
requires to connect to a particulat service, it would query the sd to find
the correct address. The sd could also keep a record of previously active
services and their locations and launch them (via AEs to the
approperiate(spelling?) finder) if requested

  Is there something else available/comming soon that would provide this
functionality? Are the software people at Apple going to provide something
like this in the next system release? Anyone know? Am I wasting my time?

  Maybe it's because it's four o'clock in the afternoon.



---
 The Evil Tofu
From: Michael.Breen@UC.EDU
Newsgroups: comp.sys.mac.programmer
Subject: Anyone using Prograph?
Date: 16 Oct 92 19:50:15 GMT
Article-I.D.: ucbeh.1992Oct16.145016.1849
Distribution: world
Organization: University of Cincinnati

As a network manager I usually don't program other than a little hacking with
res edit now and again. But I thought I'd take a chance and try a little
programming and so I took up TGS' offer for Prograph 2.1

Have to say I like the concept and the ease of use, (I don't intend to re-write
a dbase clone or anything like that - just some simple text translator/filter
type programs), but I was wondering if this is the right newsgroup for the
program. Does any Prograph object code or information ever appear here? I
realize its not at the same level as MPW or C but everyone has to start
somewhere and besides... they don't have Mac COBOL.

Any pointers for information exchange would be appreciated.

MTB
Dir. Admin. Computing
Univ. College
Univ. of Cincinnati  
Newsgroups: comp.sys.mac.programmer
From: system@asuvax.eas.asu.edu (Marc Lesure)
Subject: DisposeHandle vs. ReleaseResource
Organization: Arizona State University
Date: Thu, 15 Oct 1992 20:20:20 GMT

I have a routine that deletes, adds, and updates a resource in a
preference file.  The function performs what it is suppose to do, however
it doesn't seem to release the memory (if I call the routine enough times,
it dies with a dsMemFullErr).  I understand that you need to use
ReleaseResource(), if the allocated handle came from GetResource().  But
what if the handle is created via a NewHandle() call?

Here is the snippet:

writePrefs(void)
{
	Handle		aH;	
	int		resFile,tmpResFile;
	
	tmpResFile = CurResFile();
	resFile = openPrefs();
	UseResFile(resFile);

/* delete old resource */
	aH = Get1Resource(TYPE, baseID);
	if (aH != NIL)
	{
		RmveResource(aH);
		UpdateResFile(resFile);
		ReleaseResource(aH);
		aH = NIL;
	}

/* add new resource */
	if (aH == NIL)
	{
		aH = NewHandle(...);
		if (aH == NIL)
			return;
		AddResource(aH, TYPE, baseID, NAME);
	}
	
/* update resource */
	if (ResError() == noErr)
	{
		HLock(aH);
		... fill handle ...
		HUnlock(aH);
			
		ChangedResource(aH);
		WriteResource(aH);
	}

	ReleaseResource(aH); /* or DisposeHandle or Both? */

	UseResFile(tmpResFile);
	CloseResFile(resFile);
}

-----------------------------------------------------------------------
Marc Lesure / Arizona State University / Tempe, AZ
"Between the world of men and make-believe, I can be found..."
"False faces and meaningless chases, I travel alone..."
"And where do you go when you come to the end of your dream?"

UUCP:       ...!ncar!noao!asuvax!lesure  
Internet:   lesure@asuvax.eas.asu.edu
From: liran@bimacs.BITNET (Eshel Liran)
Newsgroups: comp.sys.mac.programmer
Subject: Diffs in -sym MacApp code
Date: 15 Oct 92 10:26:58 GMT
Organization: Math & CS, BarIlan U, Ramat-Gan, Israel

Are there any differences between applications created by 'mabuild kkk -sym'
and 'mabuild kkk', except for the SYM file ?

Liran Eshel
liran@bimacs.cs.biu.ac.il

Newsgroups: comp.sys.mac.programmer
From: resnick@cogsci.uiuc.edu (Pete Resnick)
Subject: Re: Memory Manager-safe Deferred Tasks - A Proposal
Organization: University of Illinois at Urbana
Date: Wed, 14 Oct 1992 04:44:55 GMT

Jeff E Mandel <mandel@tmc.tulane.edu> writes:

>Basically, I like the concept of the Deferred Task manager, but the only
>thing it really gets me is the ability to do something in a small number
>of milliseconds after an interrupt without making the cursor jump around
>and other interrupt-driven code halt in its tracks. What I really want is
>the ability to take the data I've gotten from the interrupting device and
>stuff it into a pointer or handle at the soonest opportunity. Thus, what
>I want is the ability to place a task in the DT queue, but flag it as
>"don't call me until you can give me access to the specified heap".

I like this idea very much, and this would actually be pretty easy to
implement: You could write a device driver that would simply call the
routine you specified. You could call the device driver asynchronously,
which can be done at interrupt time; the call will remain in the queue
until interrupt time is over and the system gets to call the driver.
Then the driver would call your task, which would be free to move
memory. This should happen at least somewhat quicker than having to
wait for your event loop to come around for the next time.

I do see one problem with the scheme:

>Something like:

>FUNCTION DTHzInstall (dtTaskPtr: QElemPtr, dtHeapZone: THz) : OSErr;

Note that the dtTaskPtr, or the parameter block in the case of my
device driver idea, would have to be preallocated. You would still run
into the same problem you have in your internal queue, that you may
run out of space; in this case, you might run out of the queue
elements you have allocated. But other than this, it would be no
problem.

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
From: J.Cook@ENS.Prime.COM (Jim Cook)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Anyone understand WMrgPort?
Date: 16 Oct 92 17:49:53 GMT
Reply-To: <J.Cook@ENS.Prime.COM>
Organization: Prime Computer, Inc.

In article <1992Oct14.043157.8310@midway.uchicago.edu>
bmor@kimbark.uchicago.edu (Brad Morris) writes:
>I am trying to write something which requires an indepth knowledge of
>the window manager graf port.  I cannot seem to fine a lot of information
>about the window manager graf port.  Does its portbits contain all monitors?
>What touches it, and when?

Hi Brad-

I'm not sure there is a lot I can do for you, but I would definately like to
hear what you learn.

What I know/found out/don't understand:

1. The window manager port contains all screens.  I don't remember how valid
   the pixmap addr is.  I think you should chase down the pixmap addr for the
   GDevice of the screen you are drawing on.  Note that the baseaddr is 32
   bits and that rowbytes has a hi order flag bit or two.

2. When CopyBitsing from the screen to an offscreen GWorld, if you are copying
   from <<outside>> the bounds of a window, you MUST use the window manager
   port, not any old window port that appears on the screen.  Heck if I know
   why this is true.  It seems counterintuitive that
   using the wrong <<source>> would cause things to go bad.  I would expect
   the wrong destination addr, or dest. size to cause a crash, but nope, the
   wrong source here causes a crash.  No one seems to know why.

Good luck,
Jim