HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.sys.mac.programmer
Subject: Re: Routines With Glue
From: michael@otago.ac.nz
Date: 5 Oct 92 09:23:20 NZDT
Organization: University of Otago, Dunedin, New Zealand

>>wuertz@tik.ethz.ch (Andreas Wuertz) writes:
> 
>>This brings up another point: what is the complete list of functions
>>with glue:  I know for a fact that HOpenResFile() and the high-level
>>hierarchical functions like HOpen() have glue.  Does anyone have a
>>full list?

This would be good and brings up another point: some of the quantity of glue
you get on occasion can be a bit of a shock, especially if you are trying to
write a minimum-size application like the UpdateMaker stand-alones. I already
go through some contortions to avoid all the MPW initialisation stuff - I still
don't know what the heck that does, but I don't seem to need it. But then the
glue you get when you call _Gestalt is just amazing, and if you have just gone
to the trouble of checking that you can do so safely it is rather annoying to
find that the glue checks again and fakes things if the trap isn't
present....this is all very well but it would be nicer if it was documented
somewhere.


Michael(tm) Hamel, Computing Services Centre, University of Otago, New Zealand

DITHERINGTON (n.)                  
Sudden access of panic experienced by one who realises that he is being
drawn inexorably into a clabby (q.v.) conversation, i.e. one he has no
hope of enjoying, benefitting from or understanding.
From: franke@llnl.gov (Norman Franke, III)
Newsgroups: comp.sys.mac.programmer
Subject: Goofy TrueType question
Date: 2 Oct 92 21:02:47 GMT
Organization: Lawrence Livermore National Laboratory
X-UserAgent: Nuntius v1.1.1d9
X-XXMessage-ID: <A6F206D0B50110D0@tripoli.llnl.gov>
X-XXDate: Fri, 2 Oct 92 22:01:52 GMT

Hello,
	I was reading in IM VI about the routines for TrueType fonts.
I noticed two routines for calculating features of scaled TT font.
For example, OutlineMetrics. This sounds like a cool idea (scaling
fonts, that is) and I want to make use of it. I see no routines
for setting the scaling factors. How do I do this? I thought that
OutlineMetrics might, but it just returns -32615, which I have no
idea what that is. Am I missing some concept here?

| | | |   +----------------------------------------+
| | | |   | Lawrence Livermore National Laboratory |
| | | |__ |        Computer Scientist - EPD        |
| | |___/ |     T-5475, R-1321, (510) 422-7440     |
\ \____/  | Norman Franke, III - frankee@.llnl.gov |
 \____/   +----------------------------------------+
From: rson@rhi.hi.is (Mimir Reynisson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: ProcPtr, how to call Proc pointed to?
Keywords: Pascal, procptr
Date: 29 Sep 92 10:05:05 GMT


SOmething like

static pascal Boolean DoProc(long param1, long param2, .. etc .. ProcPtr proc)
 = {0x205F, 0x4E90};

This will pop the ProcPtr parameter of the stack and then JSR to it
From: schulte@KLIN.FAR.RUU.NL ("Bas Schulte, Spider")
Newsgroups: comp.sys.mac.programmer
Subject: TCP/IP Sockets for MPW C?
Date: 3 Oct 92 02:39:08 GMT

Hi netters,

I'm looking for a Sockets interface for MPW C, I 
once saw something about it, but can't seem to 
find it anymore. Anybody?

Please reply direct, I don't have acces to 
comp.sys.mac.programmer directly,

best regards, Bas Schulte


----
This is getting better and better!
from: schulte@klin.far.ruu.nl
From: mikeh@kralizec.zeta.org.au (Michael Hore)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Shareware compilers
Date: 30 Sep 92 21:16:38 GMT
Organization: Kralizec Dialup Unix Sydney: +61-2-837-1183 V.32


Newsgroups: comp.sys.mac.programmer
Subject: Re: Shareware compilers


Jerry Wilcox writes:

> ...
> There are a couple of others, both derivatives of NEON. One
>which I use quite a bit is Yerk, the other is Mops. Both have evolved into
>a cross between Forth and Smalltalk - they are object-oriented, and at
>least Yerk is very functional.
>

Yerk and Mops are both available for anon. ftp from oddjob.uchicago.edu.
They are both very functional, IMHO -- but then I'm the implementor of
Mops, so I'm definitely biassed :-)

-- Mike.

--------------------------------------------------------
Mike Hore        Internet:    mikeh@kralizec.zeta.org.au
From: ldh@svl.cdc.com (Lawrence D. Hare)
Newsgroups: comp.sys.mac.programmer
Subject: How to position a new file icon in a window.
Date: 30 Sep 92 00:52:12 GMT
Organization: Control Data Systems
X-UserAgent: Nuntius v1.1.1d9
X-XXMessage-ID: <A6EE4833FC010456@ethelred.svl.cdc.com>
X-XXDate: Tue, 29 Sep 92 17:51:47 GMT

Does anyone have any ideas how best to position a new file icon in a
window so that it is not sitting on top of another one?

I create and build a file, everything great. Then PBHSetFInfo and the job
is complete. Only the icon is sploshed on top of another one. If I set
FInfo->fdLocation.h and v to zero, then the icon is plonked on top of
whatever is in the top left. As the file is a brand new one, I would like
to find a free space in the window amd put it there.

The finder does this, any ideas how I can do the same?
--
Lawrence D. Hare       Control Data - Silicon Valley Operations
Consultant             Voice: (408) 496 4339 - C/N [234] 4339
ldh@svl.cdc.com        Mail: SVLa60  FAX: (408) 496-4106
From: minow@Apple.COM (Martin Minow)
Newsgroups: comp.sys.mac.programmer
Subject: Re: SCSI Disk Format & Initialization
Keywords: SCSI format disk initialize bootstrap
Date: 28 Sep 92 17:43:30 GMT
Organization: Apple Computer Inc., Cupertino, CA

In article <1992Sep27.171611.9373@foxtail.com> kravitz@foxtail.com
(Jody Kravitz)  notes that a scsi disk will not automount.

The Macintosh SCSI implementation predates ANSI-SCSI by about four years.
Unfortunately, this means that there are a few incompatibilities between
the Mac and "standard" SCSI. Jody is probably being bitten by a requirement
(in "standard" SCSI) for devices to warn the host computer that they have
just been powered up or reset. The sequence is

1. System powers up.
2. Host computer resets the SCSI bus.
3. Host computer sends "test unit ready" to see if there's a device.
4. Device, having just been reset, sends "check condition" (warning) status.
5. Host computer sends "get extended sense" (give my the error status).
6. Device sends unit-attention "I've just been reset or powered up"
7. Host computer sends "test unit ready" again. This time it succeeds.

The Mac assumes that any "check condition" indicates an error and skips
the mount. You can work around this by using SCSI Probe (or similar
Control Panels) or an INIT to clear the unit attention condition and retry
the mount. Alternately, the disk manufacturer may choose to add Apple-specific
firmware that supresses power-up unit attention.

Hope this clarifies things slightly.

Martin Minow
minow@apple.com
ps: the sequence above is more than slightly simplified. Read the Ansi
SCSI-II spec for the gory details.
Newsgroups: comp.sys.mac.programmer
From: guiyu@spectra (Kui Yu Chang)
Subject: MaxappleZoom   FOR   the  LC (built in display-cardds)
Organization: University of Hawaii, Dept. of Electrical Engineering
Date: Fri, 2 Oct 1992 21:06:20 GMT

MaxappleZoom is superb!

If anyone of you out there has the EXPERTISE & PATIENCE to program a similar
SCREEN EXTENDER for the modular macs (e.g. LC, LCII, si), pray do so. I bet
you can get great returns since the LC is APPLE's best-selling mac.

Also, for people who never paid for shareware, they might be more than willing
to pay for a SCREEN EXTENDER, because it is much more cheaper than getting a
high-res display card plus monitor combined.  For example, I never bother to
pay for shareware(anyway I don't use them), but I will definitely pay for such
a luxury.

================================================================================
  _  __                    _ 		ADDRESS: CHANG Kui Yu
  _||__       _|_       | |_|			 2440 Date Street #1002
 |_ |__      __|__     \|/|_|			 Honolulu, HI 96826	
   |+---                | _|_			 U.S.A.	
   ||\/       _|_       / \ /
  \|L \      __|__     / \---		E-mail : guiyu@spectra.eng.hawaii.edu
================================================================================

Newsgroups: comp.sys.mac.programmer
From: winter@ra.rl.af.mil (Jim Wintermyre)
Subject: Re: GetMenu & 32-bit Conflict Mystery
Organization: Rome Lab
Date: Wed, 30 Sep 92 20:53:49 GMT

In article <19920923.155254.376@almaden.ibm.com>, mgraf@sydvm1.VNET.IBM.COM (Michael Graf) writes:
>  All my programs use menus, defined by ResEdit, as MENU (and MBAR) resources,
> and are loaded in a standard (as per many books) way. However, the following
> will cause the compiler (THINK Pascal v4.01) to crash (with an Application
> Zone error) UNDER 32-BIT MEMEORY ONLY !! In non-32-bit, it functions normally;
> an application built and run (ex-THINK Pascal) functions fine under 32-bit.
> The error appears on the line, marked <===:
> 
>          :
>        CONST
>           APPLE_MENU_ID = 128;   /* have tried other resource IDs as well */
>          :
>        VAR
>           aMenu : MenuHandle;
>          :
>         /* Get MenuBar from resource file */
>          :
>         aMenu := GetMenu(APPLE_MENUI_ID);        <=== /* Error at this line*/
>         AddResMenu(aMenu,'DRVR');
>          :
> 
> The call to get the APPLE MENU fails under 32-bit and causes HUGE compiler
> problems afterwards. It works fine under non-32-bit; removing that line
> (and corresponding Apple Menu build up calls) means I get a perfectly,
> functioning program (no Desk Accessories, of course).
> 
>   Environment: System 7.01 (tuned v1.1.1), //ci, 20Mb memory
>                Extensions not causing problem
> 
>  Can anyone shed any light as to WHY this might occur under 32-bit;
>   OR WHAT is wrong with the above means of loading the Apple menu (defined
>   in ResEdit by selecting the Apple Menu radio button);
>   OR WHAT in ResEdit (perhaps) is causing THINK Pascal so much grief ?

Weird, I just ran into this very same problem today, and it was driving me 
absolutely nuts!  I thought maybe it was the fact that I was running on a 
Quadra, or the menu IDs were wrong or something.  In my case, it turns out
that changing the GetMenu call to GetMHandle fixes it!  Are you reading in
the menu bar with GetNewMBar?  If so, I think that problem has to do with
the fact that GetNewMBar automatically reads the menus into memory.  This is
the same thing that GetMenu does, so maybe GetNewMBar screws it up.  Anyway,
if you try to do GetMenu BEFORE GetNewMBar, the GetMenu works, but the 
GetNewMBar crashes.  Anyway, GetMHandle works fine, and at least according
to the THINK reference, this is the way you're supposed to get menus handles
when you've used GetNewMBar.

But then, if Rich Siegel says it's a bug in THINK Pascal, maybe I'm just
full of it!  (But hey, it works)

Jim Wintermyre
winter@ra.rl.af.mil
From: costin@cogsci.ucsd.EDU (Dan Costin)
Newsgroups: comp.sys.mac.programmer
Subject: Using THINK C Libraries with MPW ???
Date: 30 Sep 92 18:37:04 GMT
Distribution: usa
Organization: Department of Cognitive Science, UCSD

Is there a way to do that?  MPW complains that the library isn't
of type OBJ. Hmm.  (No, I don't have MPW, but someone wants to use
a Think library I have).  THanks for any hints.

-dan
From: grobbins@Apple.COM (Grobbins)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Using ReadXPRam and WriteXPRam traps
Date: 2 Oct 92 02:13:18 GMT
Organization: Apple Computer Inc., Cupertino, CA

In article <72990@apple.Apple.COM> minow@Apple.COM (Martin Minow) writes:
>jst@dcs.ed.ac.uk (Julian Turnbull) asks about the ReadXParam and WriteXParam
>traps as he needs to access the location (latitude, longitude, and timezone
>offset).
>The proper way to access this information is by using the ReadLocation and
>WriteLocation functions described in the ScriptManager chapter of Inside Mac VI

There is a sample program for getting the map information in the
snippets collection, available via anonymous ftp from ftp.apple.com
as

  /dts/mac/sc/snippets/toolbox.iac/other/readlocation.hqx

Setting of this and other information stored in Parameter
RAM is unsupported, underdocumented, and discouraged.

Grobbins        grobbins@apple.com

Usual disclaimers apply.

Newsgroups: comp.sys.mac.programmer
From: dlb5404@tamsun.tamu.edu (Daryl Biberdorf)
Subject: Vendors for Mac assemblers?  Which are decent?
Organization: Texas A&M University, College Station
Date: Sat, 3 Oct 1992 06:04:39 GMT

In the near future (right now!), I'll be doing a lot more 68k development
work in assembly, not all of it for my Mac.  As a result of this, I'd
like to get a 68k assembler for my PowerBook 100.

So far I haven't been able to find many assemblers, and the ones I've
found I've heard nothing about.

Can anyone tell me what vendors offer assemblers for the Mac as well
as approximate prices and whether the product is any good?  I'd
really like to be able to single-step through the code and set breakpoints,
if these are not common features.

Thanks in advance for any advice.

Daryl


-- 
Daryl Biberdorf  N5GJM    d-biberdorf@tamu.edu or  dlb5404@tamsun.tamu.edu
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Newsgroups: comp.sys.mac.programmer
Subject: C.S.M.P. Digest V1 #174 Available
Date: 4 Oct 92 12:04:47 GMT
Article-I.D.: cs.1992Oct4.120447.1443
Followup-To: poster
Organization: University of Oregon Computer and Information Sciences Dept.


C.S.M.P. Digest             Sun, 04 Oct 92       Volume 1 : Issue 174

Today's Topics:

	Looking for some sample appletalk ATP code...
	MacinTalk MPW C Interfaces
	screenBits, off-screen drawing and memory allocation
	ZREF error
	Getting my hands on the real CLUT
	FSpExchangeFiles Problem
	Accepting AppleEvents?



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
_____________________________________________________________________________
From: lari@strauss.cs.unc.edu (Humayun Lari)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How to detect movable modal WDEF?
Date: 29 Sep 92 00:25:58 GMT
Organization: The University of North Carolina at Chapel Hill

> haynes@mace.cc.purdue.edu (Carl W. Haynes III) writes:
[regarding using a regular noGrowDocProc if the movable-modal dialog isn't
around]
>I also go ahead and draw a black rectangle a couple pixels in
>to make it look even more like the movable modal. Only the experts
>can tell the difference :=>

Uh-oh. As all of the "eleven developers" (to quote Tog) who've read the human
interface note on movable-modal dialogs will attest, trying to make a regular
window look like a movable modal is a Bad Thing (tm). People are already
confused enough. :-)

'Course, we also have those wonderful DOS-escapees who implement movable-modal
dialogs that can't be moved... <sigh>

Humayun Lari
(lari@cs.unc.edu)
Newsgroups: comp.sys.mac.programmer
From: putnam@ux2.cso.uiuc.edu (Daniel E. Putnam - Invoice)
Subject: Re: Random() needs some Thorazine (Help!)
Organization: University of Illinois at Urbana
Date: Sat, 26 Sep 1992 14:30:58 GMT

M. Nutter <manutter@grove.iup.edu> writes:

>No need to get so complicated:  just make sure you set randSeed AFTER
>you open your first window or console.

Not so!  The following program does not correctly generate new random numbers:

	#include <console.h>
	
	extern long randSeed;
	main()
	{
		printf("Hello World\n");
		GetDateTime(&randSeed);
		printf("%d\n", Random());
	}

Calling InitGraf(&thePort) after the first printf() seems to work despite
the warning in "Inside MAC".  The first call to printf() already causes
the console library to initialize itself, including a call to InitGraf().

The following asm hack also works if you put it in after setting randSeed.

	asm
	{
		MOVEA.L (A5), A0
		MOVE.L randSeed, -0x7E(A0)
	};

The "MOVEA.L (A5), A0" instruction is exactly what Random() does before
accessing A0 - 7E to get the value of randSeed.  The two instructions
above just put the value of randSeed where Random() expects to find it.

None of this seems particularly satisfactory.  If making the second call
to InitGraf() doesn't create havoc, I guess its OK.
From: winer@husc9.harvard.edu (Adam Winer)
Newsgroups: comp.sys.mac.programmer
Subject: Dialog/Text Edit Help
Date: 4 Oct 92 02:51:36 GMT
Article-I.D.: husc9.winer.718167096

How can you tell if a range is selected in an edit text field of a dialog?
I know the dialog manager well, but have ignored TextEdit 'til now. That's
probably my trouble.

Thanks in advance,
Adam Winer
-- 
Adam Winer		| The number you have reached is imaginary.
WINER@HARVARD.EDU	| Please rotate your phone 90 degrees and
                        | try again.
From: ses@cmns-sun.think.com (Simon Edward Spero)
Newsgroups: comp.sys.mac.programmer
Subject: Tech-note 31
Date: 3 Oct 92 19:25:16
Organization: What's your clearance, citizen?
NNTP-Posting-Host: cmns-sun.think.com

Help!
 I'm desparately trying to find a copy of Tech-Note 31. I asked UK DTS,
and all they said was "Moof!" 

Can anybody help?

Simon
--
-----
Guest account at TMC 	|	Just Another  WAIS Hacker | DOD# 0612
Newsgroups: comp.sys.mac.programmer
From: keith@taligent.com (Keith Rollin)
Subject: Re: Routines With Glue
Followup-To: comp.sys.mac.programmer
Organization: Taligent
Date: Mon, 5 Oct 1992 19:35:57 GMT

In article <1992Oct5.092320.34@otago.ac.nz>, michael@otago.ac.nz wrote:
> 
> But then the
> glue you get when you call _Gestalt is just amazing, and if you have just gone
> to the trouble of checking that you can do so safely it is rather annoying to
> find that the glue checks again and fakes things if the trap isn't
> present....this is all very well but it would be nicer if it was documented
> somewhere.

If you check for the existance of _Gestalt yourself and are prepared to
deal with its not being implemented, then you don't need the glue. Set the
SystemSevenOrLater flag when compiling, and you'll call the trap directly.

Here's the interface from GestaltEqu.h.

#if SystemSevenOrLater
#pragma parameter __D0 Gestalt(__D0,__A1)
pascal OSErr Gestalt(OSType selector,long *response)
 = {0xA1AD,0x2288}; 
#else
pascal OSErr Gestalt(OSType selector,long *response);
#endif

Pascal doesn't seem to work this way (the headers indicate that it always
calls the glue), so if you use Pascal you might be out of luck.

There are a number of traps like this -- just search for
"SystemSevenOrLater" in your headers. For example, FindFolder can either
call a library routine or the trap.

-----
Keith Rollin
Phantom Programmer
Taligent, Inc.
From: tbl@rock.concert.net (Ted Lowery)
Subject: Q: How to tell the depth of screen?
Organization: MacSolutions
Date: Wed, 30 Sep 1992 18:12:19 GMT

Hi all-

Question:  What is the best way to tell the depth of the default screen when
your application starts up?  The way I am currently doing is to check
SysEnvirons.hasColorQD, and if so, I create a color port with the following:

if (myEnv.hasColorQD) {
		myCGrafPtr = NewPtrClear(sizeof(CGrafPort));
		OpenCPort(myCGrafPtr);
		theDepth = (**(*myCGrafPtr).portPixMap).pixelSize;
		CloseCPort(myCGrafPtr);
		}
else theDepth = 1;

seems to me, there is probably a lot of overhead involved here, and there
should to be a simpler way.  I need to do it before I open a window, so that
I know which type of window, and what size to open.

Also, what is the screen size of the 12" bw and color monitors like the 
LC use?

Thanks...

+----------------------------+----------------------------+
|  Ted Lowery                |              MacSolutions  |
|  tbl@rock.concert.net      |              PO Box 30051  |
|  CIS: 76350,2613           |        Raleigh, NC  27622  |
+----------------------------+----------------------------+
|  A bore is someone who persists in holding his own      |
|  views aster we have enlightened him with ours.         |
+---------------------------------------------------------+

Newsgroups: comp.sys.mac.programmer
From: jmk3@crux3.cit.cornell.edu (Jay Krell)
Subject: >moving the mouse
Organization: Cornell Information Technologies
Date:  4 Oct 92 03:39:29 GMT

>> Jay Kreibich, moving the mouse
 
The IIGS Event Manager has a call FakeMouse that drivers use to move the mouse.
Perhaps the Mac has the same.
 
 
jay.krell@cornell.edu.

Newsgroups: comp.sys.mac.programmer
From: kjt001@dunix.drake.edu (Kevin Tieskoetter)
Subject: Can anyone help me with some really simple tasks?????
Organization: Drake University, Des Moines, Iowa, USA
Date: Mon, 28 Sep 1992 02:01:58 GMT

Ok, I'm relatively new to programming on the macintosh (well, very new)
and I need help on doing some simple tasks on the screen.

I am using Think C 4.0.5 and system 6.0.7

I want to be able to display icons on the screen, select them,
double-click on them to open another window, and drag them to other
places on the same window and to other windows, and i want them to
automatically center to invisible "squares" on those windows.
Essentially the same as the finder.  I want to write a game with a
Wizardry (I) type interface.

Can anyone tell me how to do all this?  Source code would be great, but
so would a basic explaination.  I am using OOPs.

I'm afraid I do need a rather low-level explaination - don't assume I
know too much.  This task is really getting frustrating.


So, if you can help me, I will be immensely grateful...i may even
worship you for a few hours...  :)


-kevin

kjt001@acad.drake.edu
kjt001@dunix.drake.edu

Newsgroups: comp.sys.mac.programmer
From: sdorner@qualcomm.com (Steven Dorner)
Subject: Re: JPartialResources.{c,h}
Followup-To: comp.sys.mac.programmer
Organization: Qualcomm, Inc
Date: Sun, 27 Sep 1992 16:14:12 GMT

k044477@hobbes.kzoo.edu (Jamie R. McCarthy) wrote:
> ...and then how many users would upgrade to 6.1?  We'd still end up
> having to write the dual-system code for the next n years, until a
> sufficiently small number of 6.0 users remained.

System 7 will be two years old this coming spring.  1M SIMM's are $25. 
Enough is enough; I'm making one more system 6 compatible release, and then
I'm simply going to forget that System 6 ever existed.
Newsgroups: comp.sys.mac.programmer