HDTenEightyP/NetNews huggingface dataset:
From: mxmora@unix.sri.com (Matthew Xavier Mora)
Newsgroups: comp.sys.mac.programmer
Subject: TimeDBRA
Date: 16 Oct 92 18:28:39 GMT
Followup-To: comp.sys.mac.programmer
Organization: SRI International

I would like to know how to determine what MHZ a mac CPU is using.
I see a global called TimeDBRA which IM says "TimeDBRA=$D00; number of
DBRAs executed per millisecond [word] V-352"

Is this a reliable figure? Can the speed of the processor be determined
with this value? I would like to know because I am working on a info
program like MacEnvy. 

Also I know I can assume that a certain cpu is at xmhz according to the
product sheet (MacPlus is at 8mhz) but what if its using an accelerator?

My MacSE say timedbra=6
My Mac II says timedbra=10

My MacSE has a 16mhz 68000 upgrade.

So the main question is how can I figure out the speed of the system
in Mhz? 

--
----------------------------------------------------------------------
Matthew Xavier Mora                                mxmora@unix.sri.com
SRI International                                       (415) 859-5011
----------------------------------------------------------------------
From: ksand@apple.com (Kent Sandvik)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Any further info on ComponentWorkshop?
Date: 7 Oct 92 02:47:34 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple

In article <1992Oct6.140453.18678@ips.cs.tu-bs.de>, koch@eis.cs.tu-bs.de
(Andreas Koch) wrote:
> 
> Does anyone have any further information on ComponentWorkshop
> (price, availability) that hasn't been mentioned in Frameworks
> yet?

Full information will be released soon, and when I mean soon, it's
soon!

Cheers,
Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How to get the bitmap for an Arabic font
Date: 10 Oct 92 09:47:44 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <41340@imag.imag.fr>, oueichek@imag.fr (Ibaa Oueichek) wrote:
> 
> 
>  Dear netters.
>  I hope you can help me in my problem. I'm trying to acces the internal bitmap
> of an Arabic font. I've already seen the internal structure of an Arabic font,
> the upper 128 character are used to present the characters as if they were
> written alone (Arabic characters change their form in fuction of the characters
> before and after). The lower 128 are used to represent different bitmaps for
> the characters when they are connected to other characters. I can design fonts
> using Fontastic or any other font desigining program, and then edit the FOND
> resource to change it's resource ID in order to tell the script manager it's an
> Arabic font. But i need to copy the bitmap of a character in it's different
> positions, and i can't access those who are in the upper 128 set because 
> QuickDraw is "intelligent" enough to know that it's an internal representation
> and will draw insted the corresponding Latin Asci character so i can't make 
> DrawChar and get the bitmap easily.


Presumably you could access the FOND/FONT (NFNT) resources directly,
preferably as HandToHand copies of the resources, so that suitcase and such
wont break.

The new IM volume on Text is due this xmas (I think), but the relevant
chapter on font technology is also available on CD.  You should examine it
for gory details, as there is a lot which is not covered by the current IM
series.

You should also refer to the recently published "Guide to software
localization", which discusses arabic text handling and shows both the
keyboard and diplay font layouts.

--

Dana S Emery <de19@umail.umd.edu> | "Novo, de Novo,
                                  |     de novo, de no-o-o-o-o---, 
                                  | Novemba come an' dey gonna go home."
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Deferred Tasks - What can I do?
Date: 8 Oct 92 19:32:34 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

In article <1992Oct7.103950.26354@cs.utwente.nl>, heksterb@cs.utwente.nl
(Ben Hekster) wrote:
> 
> In article <Bvq666.MHH@news.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:
> >Can I move memory (e.g. call NewPtr) in a deferred task, i.e. one I
> >installed with DTInstall?
> 
> I would say, no.  The only difference between a VBL and a Deferred Task
> is that a VBL task executes while the processor interrupts are being
> serviced, and a Deferred Task is executed after processor interrupts
> are reenabled.  This is so that you don't get a System Error when
> another interrupt arrives while you are still executing a (lengthy)
> task.  For all other practical purposes, you are still executing at
> interrupt time-- i.e., the heap may be in an inconsistent state, etc.

Both a VBL and a Deferred Task are considered interrupt code.  Neither
can make calls to the toolbox, allocate memory, etc.

VBL tasks are executed with all interrupts enabled.  This allows anything
to interrupt a VBL task.  The VBL manager will one run one VBL task at
any given time, so a VBL cannot interrupt a VBL.

Deferred Tasks are documented in the recent Tech Note, and it explains
the details of when and how they are executed.

Both a VBL and a Deferred Task are ran with processor interrupts enabled.

-----------------------------------------------------------------------
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
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Forcing TextEdit to set scrpAscent and scrpHeight
Date: 15 Oct 92 11:02:29 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <D88-JWA.92Oct13105334@byse.nada.kth.se>,
d88-jwa@byse.nada.kth.se (Jon Wtte) wrote:
> 
> Sorry, but style scrap records are WHOLLY INSUITABLE for temporary
> storage, since it refers to fints by number. Font numbers change
> between machines, and even ON machines sometimes. Store font info
> by name. When you do this, you'll see that the other things you
> do will fall out naturally.


isn't that a bit draconian?  I agree that no code should depend on fond ID
info, but I would use the style scrap record plus a font name table with
the fond id as key, and the font baseline/ascent/descent info as well.

Defering the fondID resolution to the reader seems a nicely conservative
approach.

Readout would involve a resolution of the (possibly) different id's, and
haveing them available helps to clarify not just ID collision resolutions,
but also diferent font/same name/different ID confusions.  (Too bad so many
utilitys "protect" the user from such "confusing" information.)  I would
compare the fontname saved to the fontname available for the saved ID, and
ask the user for a substitute when things dont check out.  Noisy? yes, but
I (as a user) like things that way.

's too bad that TE doesn't handle -1 in those fields, I was hopeing for
that to be true for a presently backburnured project.  :-(

--

Dana S Emery <de19@umail.umd.edu> | "Novo, de Novo,
                                  |     de novo, de no-o-o-o-o---, 
                                  | Novemba come an' dey gonna go home."
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.apps,comp.sys.mac.wanted
From: Anders Wallgren <anders@verity.com>
Subject: Re: MPW C / MPW C Bundle
Organization: Verity, Mountain View, CA, USA
Date: Thu, 8 Oct 92 16:21:03 GMT
X-Xxmessage-Id: <A6F9AF55CA02C897@pokey.verity.com>
X-Useragent: Nuntius v1.1.1d12
X-Xxdate: Thu, 8 Oct 92 17:26:45 GMT

In article <92282.135612SPIT@EVALUN11.BITNET> Werenfried Spit,
SPIT@EVALUN11.BITNET writes:
>In the APDA price list I found `MPW C v3.2.3' for $150 and `MPW C
Bundle v3.2.3
>for $450. Could anyone explain me the difference. What is in the
`bundle' that
>is not in the other thing? What do I need?

The bundle includes the MPW Shell, the other package only includes
the C stuff.  You need the shell.
From: LAFARCIOLA@ICHCMNS.CMNS.MNEGRI.IT (max)
Newsgroups: comp.sys.mac.programmer
Subject: About QuickBasic/Think C....
Date: 7 Oct 92 12:37:00 GMT

Hello!
I started to program with Macintosh since a few time and now I've written an 
application (with THINK C 5.0) which creates a menu and a window which has a 
grid of rows x columns cells to input numbers.I'd like to use it writing a MBPC 
in order to use it as a library for my Quick Basic program.
But...after I make my application as a PCR (pure-code-resource) library:
/**** MAIN PROGRAM *******/
/*** compiled as a MBPC
     name: MyGrid   id:60   ***/
		
#include "BasicLSC.h"
#include <SetUpA4.h>
main()
{
	Handle h;
	
	SAVEREGS();   // save A4 and A5 registers
	RememberA0(); // to access  resource 
	SetUpA4();    // globals
	// Locking code resource
	asm {
		_RecoverHandle  // a0 already points 
		move.l a0, h    // to resource
	}
	HLock( h );
		// initialization
	ToolBoxInit();
	MenuBarInit();	
	r=10;c=5;
	SetUpDragRect();
	SetUpSizeRect();

	CreateWindow( r, c ); // window with a grid of rows x columns cells	
	MainLoop();      // management of events for window created
	HUnlock( h );
	RESTREGS();   // restore A4 and A5 registers
	UnloadA4Seg( 0L );	// to unload multi-segment resource
}
when I run (under MultiFinder) my QuickBasic program:

REM MacAllfit 1.0
...
...
LIBRARY "MyGrid"
CALL MyGrid
LIBRARY CLOSE
...
processing of numbers inputted into grid
...
...
END

a) sometimes refresh drawing is not performed thus some piece of window is not 	
   drawn
b)it bombs or turns up to the FINDER with an unexpected error, after quitting 
and returning to my QBasic program. 
Anyone may help me?
Thanks in advance,
	Massimo La Farciola
	
	-Excuse for my poor english-

E-Mail: lafarciola@ichcmns.cmns.mnegri.it
Organization: "Mario Negri Sud" Institute
From: bmor@kimbark.uchicago.edu (Brad Morris)
Newsgroups: comp.sys.mac.programmer
Subject: Anyone understand WMrgPort?
Date: 14 Oct 92 04:31:57 GMT
Reply-To: bmor@midway.uchicago.edu
Organization: University of Chicago Computing Organizations

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?

Help!

Thanks!

Brad Morris
b-morris@uchicago.edu
From: udasbell@mcs.drexel.edu (David M. Asbell)
Newsgroups: comp.sys.mac.programmer
Subject: MPW AppleTalk
Date: 8 Oct 92 17:02:20 GMT
Organization: Drexel University

Does anyone have or know of a library for C Library for MPW
that has the routines that go with AppleTalk.h ???

I need any MPW .o file that does what the AppleTalk libraries
in Think C do.... I guess there would be 2...

AppleTalk.o
nAppleTalk.o

Thanks
uasbell@mcs.drexel.edu

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ David M. Asbell       udasbell@mcs.drexel.edu  ~
~  (215)243-1234        David48 on AOL           ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Newsgroups: comp.sys.mac.programmer
From: haynes@mace.cc.purdue.edu (Carl W. Haynes III)
Subject: Anyone use SoftPolish?
Organization: Purdue University
Date: Fri, 16 Oct 1992 17:46:20 GMT



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

Has anyone used it? I'd be interested in any comments, especially:

1) Is the dictionary customizable (can I add entries?)
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?
4) Can you specify which resource types to check (i.e. check
   some but not others?

As you can see, I'm mainly interested in the spell checking part of
it. So any comments about that aspect are especially appreciated.

carl


--
Carl W. Haynes III             ||  "She'll see through me like Grandma's
Buddy can you spare a job?     ||   underpants." 
haynes@mace.cc.purdue.edu      ||                  -- Bart Simpson
hcs@applelink.apple.com        ||
From: mxmora@unix.sri.com (Matthew Xavier Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Telling the Finder to update a file's type & creator
Date: 12 Oct 92 17:17:20 GMT
Followup-To: comp.sys.mac.programmer
Organization: SRI International

In article <1992Oct12.065332.4638@cs.uoregon.edu>,
mkelly@mystix.cs.uoregon.edu (Michael A. Kelly) wrote:
> 
> 
> Hi everyone,
> 
> I'm writing yet another program to change a file's type and creator.  I would
> like to tell the Finder to immediately update the file's icon and/or Kind
> when I change the type and/or creator.  I know it's possible, because
> Now Utilities' StartUp Manager does it when it turns extensions on and off,
> but I can't find anything in the literature that tells how to do it.  Perhaps
> I just haven't dug deep enough, but I'm hoping someone can just tell me
> how to do it, or where I can find that information.

You need to "tickle" the parent directory's modification date to get the
finder to update the contents to the folder. A post a while ago showed some
code on how to do this. Check your archive.



--
----------------------------------------------------------------------
Matthew Xavier Mora                                mxmora@unix.sri.com
SRI International                                       (415) 859-5011
----------------------------------------------------------------------
From: dbritton@anita.ics.uci.edu (David R. Britton Jr.)
Subject: Sample THINK C code using the List Manager
Newsgroups: comp.sys.mac.programmer
Organization: UC Irvine Department of ICS
Date: 13 Oct 92 20:52:20 GMT
Distribution: ca

I recall a short time ago someone requesting some sample code for the
List Manager.  I'd like to see some myself.  Anyone have a snippet
of THINK C I can look at?

--
David R. Britton Jr.
dbritton@ics.uci.edu
ICS Graduate Student, UC Irvine

Newsgroups: comp.sys.mac.programmer
From: bpb9204@tamsun.tamu.edu (Brent)
Subject: Re: scanf equivalent calls that does not use global variables?
Organization: Texas A&M Univ., Inc.
Distribution: usa
Date: Tue, 13 Oct 1992 17:18:37 GMT

cheng@ee.rochester.edu (Bruce Cheng) writes:
|I ran into a problem when I tried to parse a binary/ascii mixed data file
|for a piece of code that's  to be put into a code resource.  Since I cannot
|include any global references in code resource, I cannot use sscanf() (cause`
|sscanf() uses some global system state data for buffering???) 


I was needing some sscanf() utility for a program I was writing and I
didn't feel like including the entire ANSI stuff into my project (I know
not all would be linked into the app, but a minimal print would have
doubled the size of the program I was working on).

So... I wrote my own implementation of sscanf().  My version works, in
every way but one, just like the original ANSI sscanf().  The bonus in
using this new implementation is that my sscanf() does not rely on anything
else (no __vssssssffssscan() calls) so the code only adds about 3K to your
program, instead of about 10-20K for Think C's ANSI stuff.  Also, no
globals are used, so it'd be safe for SACs.

My sscanf() routine works several times faster than Think C's original
version, with the exception of floating point and hex numbers.  Hex numbers
are only slightly faster and the floating point method I used is, ahem, 
slower.  On the other hand, speed improvements of 3-4 times are realized
for integer (short, normal, or long) types and string types.

The only difference in the data that my sscanf() function can translate
and the ANSI sscanf() is that my sscanf() does not implement generic
character sets.  Does anybody even use these?   I never have.

-

So here is my current status:  sscanf() is about as done as it's going
to get, but I was waiting to release it into the public domain until I
implemented a sprintf() counterpart.  Is there demand for a sscanf() 
function, without the sprintf()?  If there is demand, meaning, if you want a
copy, email me and I'll send out a version to you.

The code was written to be freely distributable, usable by anyone for
commercial uses or not. 

-Brent

-- 
------------------------------------------------------------------------------
Brent P. Burton, N5VMG                          Department of Computer Science
bpb9204@tamsun.tamu.edu                                   Texas A&M University
      What are typical family values?      Good buys at WalMart.
From: peirce@outpost.SF-Bay.org (Michael Peirce)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Best way to get A5 into VBLTaskProc?
Date: 15 Oct 92 17:20:11 GMT
Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
Organization: Peirce Software
X-Mailer: uAccess - Macintosh Release: 1.6v1


In article <absurd-141092140055@seuss.apple.com> (comp.sys.mac.programmer), absurd@applelink.apple.com (Tim Dierks, software saboteur) writes:
> 
> Wow!  You _are_ paranoid!  Allow me to say that there is no way Apple
> can make the VBLTask structure larger in this way; if we were to do
> so, we would break every single application that uses a VBLTask; they
> all allocate a standard amount of room, whether it is in a heap block,
> global data space, or on the stack; if Apple we suddenly to start writing
> to space after the end of this agreed-upon size, data would be trashed
> in virtually every application that uses a VBLTask variable.  Since
> we're unlikely to invalidate our entire application base just to avoid
> having to use something like an ExtendedVBLTask structure, I would say
> your extra 32 bytes of storage are entirely unneeded.

What I do to advoid the whole subject is to store my value right before
the parameter block.  This way, I can always access it using the same
negative offset no matter which type of parameter block is used (be
it for a time manager task, an ioCompletion, etc).

--  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
Newsgroups: comp.sys.mac.programmer
From: ksand@apple.com (Kent Sandvik)
Subject: Re: C++/MacApp compiler speed
Date: Wed, 14 Oct 1992 04:54:21 GMT
Organization: Apple
Followup-To: comp.sys.mac.programmer

In article <Bw2qEI.Jy3@undergrad.math.waterloo.edu>,
grstate@undergrad.math.waterloo.edu (Gavriel State) wrote:
> Is there any way to make this thing go any faster without adding hardware
> (ie: memory)?  Is there any way that C++ will run in anything less than 
> 8 Megs of RAM?  Will a debug link work with less than 8 megs of RAM?

Well, I use C++ on my big IIsi/5Mb system back home, but this is without
MacApp. I did a lot of testing, studies and talked with programmers,
and the outcome of MPW performance testing information is all in the
"MPW performance" Tech Note. However, speaking from experience I'm
skeptical
you will get reasonable compile/link times unless you have a 20Mb
Quadra system -- this with MacApp development work.

Anyway, check the TN, it has the most obvious pointers to speed
improvements. MacApp 3.0 requires at least 8Mb for linking, but 
practical memory size is 16MB or more.

Kent/DTS
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.
From: jess@gn.ecn.purdue.edu (Jess M Holle)
Newsgroups: comp.sys.mac.programmer
Subject: Think C++??
Date: 9 Oct 92 19:56:15 GMT
Organization: Purdue University Engineering Computer Network

Any idea as to how long before Think C goes C++?  Will it ever?

For research done around here C++ is a necessity.  Think C is a
wonderful environment, but its usefulness is nill to those who 
need C++.

MPW C++ is not a "wonderful enough" of an environment to be of much 
use around here either.  In this case, one could just use the UNIX 
tools instead and have the compile complete within the same day 
that it is started (some sarcasm intended).

Jess Holle
Newsgroups: comp.sys.mac.programmer
From: absurd@applelink.apple.com (Tim Dierks, software saboteur)
Subject: Re: AppParmHandle - usable?
Date: Tue, 13 Oct 1992 17:41:19 GMT
Distribution: usa
Organization: MacDTS Marauders
Followup-To: comp.sys.mac.programmer

In article <1992Oct13.133655.22949@den.mmc.com>,
sorchard@crowded-house.den.mmc.com (Steve Orchard) wrote:
> 
> In article <48488@shamash.cdc.com>, paul@svl.cdc.com (Paul Kohlmiller) writes:
> > 
> >
> > One person told me to use AppParmHandle. The code did things like
> > SetHandleSize(AppParmHandle, ...)
> > but this causes my Mac to crash. There doesn't seem to be any handle
> > there to resize.
> >
> 
> Did you unlock the handle before you tried to resize it.  I resize
> AppParmHandle and it works for me.  I am using Think C and not MPW.
> 
> Steve Orchard
> sorchard@crowded-house.den.mmc.com

I suspect the problem here is in globals handling.  There are two
different ways low memory globals are handled in C on the Mac: the
MPW way and the traditional Think way.  Think has traditionally
supplied typed, #defined variables, such as:

#define WindowList (*(WindowPtr*)0x9D6)

(although they now use a special syntax, rather than a #define.)
This lets you use low-memory globals just like regular variables.
For example,

     WindowPtr  fooWindow = WindowList;

would set fooWindow up to point to the first window in the window
list.

For various reasons, MPW has traditionally not provided types,
just addresses:

enum
{   WindowList = 0x9D6
};

(Think now supplies this as an option: use <SysEqu.h> for the MPW
format, <LoMem.h> for the Think format).

This makes you explicitly cast and dereference your low memory
globals:

     WindowPtr  fooWindow = *(WindowPtr*)WindowList;

I suspect your problem with SetHandleSize is that you're using
MPW style global definitions.  Try:

SetHandleSize(*(Handle*)AppParmHandle, ...)

Tim Dierks
MacDTS
From: Daryl_Spitzer@mindlink.bc.ca (Daryl Spitzer)
Newsgroups: comp.sys.mac.programmer
Subject: Re: PowerBook Traps?
Date: 12 Oct 92 15:18:53 GMT
Organization: MIND LINK! - British Columbia, Canada

Terry Monks (tel@luxor.YP.egypt) writes:

> YOu can read the Power Manager chapter of IM, and turn off
> the sleep mode by using the DisableIdle and EnableIdle
> traps. Be sure to check Gestalt for the presence of the
> Power Manager first. I did this for a MIDI application I
> wrote.

I should have mentioned that I have read the Power Manager chapter, but
couldn't find any information on switching between the internal modem and
external (just info on turning off and on power to the ports) nor on turning
on and off rest mode or powersaver mode.

Are there traps for these?

Perhaps I should did around in the Portable control panel and Battery DA with
MacsBug to see what I can find...

[I had to reply here Terry because my mailer did not recognize your address.]

--
-------------------------------------------------------------------
 Daryl_Spitzer@mindlink.bc.ca     "Life isn't just, life just is."
         a2251@mindlink.bc.ca              -- Me  (I think.)
-------------------------------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: Ed Rotberg <gonzo@ntb.apple.com>
Subject: Re: How do I do a nice "fade-to-black"?
X-Useragent: Nuntius v1.1
Date: Fri, 9 Oct 1992 15:58:19 GMT
Organization: Apple Computer

Re: How do I do a nice "fade-to-black"?

I stand corrected.  I have had SCSI Manager on the brain lately.  You do
indeed need to make Device Manager calls.  Sorry for the bum lead.

 - Ed -


Ed Rotberg                 "Just remember...
Professor of Gonzo          a waist is a terrible
Apple Computer, Inc.        thing to mind"
Newsgroups: comp.sys.mac.programmer