HDTenEightyP/NetNews huggingface dataset:
From: TOGE@SLACVM.SLAC.STANFORD.EDU (Nobukazu Toge)
Newsgroups: comp.sys.mac.programmer
Subject: Menu Mgr Qustion
Date: 12 Oct 92 10:07:37 GMT
Organization: Stanford Linear Accelerator Center

During MenuSelect/PopupMenuSelect call I want to find out which menu
is being displayed and where they are located on the screen.

I understand that MBarHook proc entry, if it's not NIL, is called whenever
a menu is about to be written, with MenuRect as the argument.  So,
that's a good building block for my use.

I also know that low-mem global savedHandle stores the Rect of bits that
are covered under the latest menu.  I know that a use of low-mem globs
is discouraged and I am at a risk, but let's say that's ok with me for now.

My problem is as follows.  When the mouse, while being held down, is on
a menu-bar but not near any menu, then no pull-down menu is displayed.
However, I can't tell this particular state by just looking at MBarHook
state or from SavedHandle.  Here, I'm talking about during-the-MenuSelect
time, i.e. trap patching and all that is what I am dealing with.

So, my question is - At an arbitrary moment during a MenuSelect / PopupMenu
Select call, is there a way to tell if any menu is being displayed at all?

The TheMenu low-mem global won't help me, because that entry is valid only
upon completion of MenuSelect (have checked Q/A stack 4.1.1).

Does all this mean that I need to hack into MBDF (Menu bar def proc)?
I've read IM Menu Mgr and Q/A at least 5 times by now, but I may be
still missing something; your informed comments are appreciated.

- Nobu Toge (ex-SLAC, now-KEK)

#include <StandardDisclaimers.h>
Newsgroups: comp.sys.mac.programmer
From: totic@dante.cs.uiuc.edu (Alex Totic)
Subject: Re: C++/MacApp compiler speed
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
Date: Thu, 15 Oct 1992 16:11:23 GMT

ksand@apple.com (Kent Sandvik) writes:
>...
>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...

What is the number of this technical note? In my list no TN's are named like
that, or anything similar?

Aleks
From: jmale@uranie.inria.fr (Jean-Michel Male)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C bug ? (updated)
Date: 12 Oct 92 14:53:25 GMT
Reply-To: jmale@cosinus.inria.fr
Organization: INRIA Sophia Antipolis

In article <1992Oct6.173348.15649@netcom.com>, howard@netcom.com (Howard Berkey) writes:
H.Berkey|>       In article <Meessen-061092111325@130.104.58.10> Meessen@slig.ucl.ac.be (Christophe Meessen) writes:
C.Meessen|>      > main() {
C.Meessen|>      >   short i = 3;

C.Meessen|>      >   printf( "a number : %d ! \n", i );

C.Meessen|>      >   printf( "Hello world !" );  <== Wrong number of parameters here !!!!
C.Meessen|>      > }

H.Berkey|>       Sounds like you forgot to #include <stdio.h>.  When the compiler read the
H.Berkey|>       first printf, it inferred the prototype as having 2 args.

		 That doesn't seem to be the good reason. I've tried
		 both (with and without `#include <stdio.h>' and both
		 worked on a Sun with native C compiler.
		 Very strange.

-- 

  
	Jean-Michel MALE'		\\\\\
					 - - 
	INRIA, Projet SINUS,		  <  )
	Centre de Sophia-Antipolis	  \/
	06565 Valbonne (FRANCE)

	Email: jmale@mirsa.inria.fr



(Mort aux vaches !)
Newsgroups: comp.sys.mac.programmer
From: ksand@apple.com (Kent Sandvik)
Subject: Re: MPW Question
Date: Wed, 14 Oct 1992 04:41:02 GMT
Organization: Apple
Followup-To: comp.sys.mac.programmer

In article <keith-111092211139@kip-55.taligent.com>, keith@taligent.com
(Keith Rollin) wrote:
> AddMenu Special "Unmangle Name/U" 'set temp "`catenate
> "{Active}.<opt-6>"`";  Alert -s "`UnmangleTool "{temp}"`"'
> 
> That's all one command line; any line breaks are provided by your friendly
> neighborhood newsreader.
> 
> (Kent: don't you mean "...highlight the mangled string..."?)

Yeah, sorry, night hacking is not good for the brain. Actually,
I should have posted Mango as binhex, but it didn't originate from
my fingertips, so I wasn't sure it was OK to send it out (Don Park,
hello!).

More mangling news: Steve Jasik added C++ name unmangling support to
the October release, so C++ function names look pretty nice nowadays.
And the MPW C++ release has the unmangle library so anyone that needs C++
name
unmangling in their future super-duper debugger/whatever could make
use of the library functions.

Kent/DTS
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.
Newsgroups: comp.sys.mac.programmer
From: jeffh@apple.com (Jeff Holcomb)
Subject: Re: GCC 1.37.1r7(min)-what's it good for?
Date: Wed, 14 Oct 1992 03:01:32 GMT
Organization: Apple Computer, Inc.
Followup-To: comp.sys.mac.programmer

In article <1992Oct13.174319.10539@bsu-ucs.uucp>, 00bwanderson@bsu-ucs.uucp
wrote:
> 
> I just downloaded GCC 1.37.1r7(min) from sumex, and I wants to know, is there a
> more recent version, and where can I get it if so?
> 

That is the latest version that is currently available.

> Also, what do I need to use GCC?  Is this ANSI C++?  If not, why not.  Will
> it work with Think C 5.0.3?  Have I asked enough silly FAQs yet?  Will I ever
> shut up?  Who knows!?

You need both the MPW Shell and Assembler in order to compile.  To write
mac specific code, you also need the v3.1 C interfaces and libraries.  It
was designed as a drop in replacement for MPW C, not as a stand-alone
compiler (also the easiest to implement).

It is only ANSI C and not C++.  (Just a minor point, there is no ANSI C++
yet, only a proposed ANSI standard of C++).  It will do C++ code if you
have MPW C++ v3.1.  It won't work with Think C.

A version of GCC 2.x for MPW 3.2 is being worked on...but the person that
is working on it is also working on other things that have higher priority.
 I wouldn't expect to see a release before the end of the year.  GCC 2.x
does support both C and C++, btw.

Any more questions can be directed to "mpwgcc@apple.com".

--
Jeff Holcomb
Apple ATG System Software     (408) 974-0841
Internet: jeffh@apple.com   AppleLink: JEFFH
Newsgroups: comp.sys.mac.programmer
From: Andreas Wuertz <wuertz@tik.ethz.ch>
Subject: Re: Background tasks on Mac?
Organization: Federal Institute of Technology
X-Useragent: Nuntius v1.1
Date: Wed, 7 Oct 1992 09:53:07 GMT

In article <1asdi3INNmik@phakt.usc.edu> Ckuznia, ckuznia@phakt.usc.edu
writes:
>Is it possible to run background tasks on a mac?  While a program is
>running, how can I get back to Finder without killing it, or how can I
>launch a program without leaving Finder?
>
>I am running System 7.0.1 on a Quadra.  

??? This is kind of confusing... You can have multiple apps up and
running under system7! Just start an app and click (and hold) on the
small icon on the right edge of the menu bar. a menu will open showing
(at least) 'Finder' and the name of the app you started. Choose 'Finder'
and you're back in the finder, ready to start another app (if you have
enough RAM left). the other app is now a background app. Is that what you
looked for? Also if you have part of a background app visible on screen,
you can activate that app (make it the foreground app) by simply clicking
on that part.

Andy (wuertz@tik.ethz.ch)

========================================================================
The only person who got all his work done by Friday was Robinson Crusoe.
========================================================================
From: roessli@sc2a.unige.ch (David C. Roessli)
Newsgroups: comp.sys.mac.programmer
Subject: MacApp 3.0 and THINK Pascal
Date: 9 Oct 92 09:52:43 GMT
Organization: Dpt. Anthropology, U of Geneva, Switzerland
X-Xxdate: Fri, 9 Oct 92 09:47:59 GMT
X-Useragent: Nuntius v1.1.1d12

Hello happy netters,

Is the latest version of MacApp compatible with THINK Pascal 4.01 ?
I hear that it's written in C++, how does that work out with THINK P ?

I'd like to upgrade from 2.01, but stick with THINK P.
Must I switch to C, or else adopt MPW as programming environment ?

Is MPW as 'slow' as people say ? (Compared to THINK compilers)

Thanks in advance, cheers
--
David C. Roessli  -  Dpt Anthropology & Ecology  -  U of Geneva  -  SWITZERLAND
Email roessli@sc2a.unige.ch  |  Phone +41(22)343-6930  |  Fax +41(22)300-0351
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Disassembly with source in MPW?
Date: 8 Oct 92 02:12:40 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

In article <ksand-061092194618@wintermute.apple.com>, ksand@apple.com (Kent
Sandvik) wrote:
> 
> In article <92275.183018TOGE@SLACVM.SLAC.STANFORD.EDU>, Nobukazu Toge
> <TOGE@SLACVM.SLAC.STANFORD.EDU> wrote:
> > Sak Wathonasin (sw@network-analysis-ltd.co.uk) mentioned UltraSlimFast
> > and Manuel Veloso (veloso@husc9.harvard.edu) actually has posted the
> > file yesterday (today?).  I tried it just a moment ago. It certainly
> > works! (system 7.0.1 with MPW 3.3a14).  Thanks!
>  
> > I think I've seen UltraSlimFast long time ago on one of those CDs, but
> > I never cared to figure out what it was :( :)
> 
> I assume you ment the System 7 CD. I'm interested to hear that
> the tool still works with the new MPW versions. I never got it to
> work with MPW 3.2.

I've been using UltraSlimFast 2.0a3 for a long time now, and it continues
to work fine.  The tool depends on the format of the object file created
by the compilier, so new MPW versions shouldn't affect it.  The name of
the tool had to be changed for obvious legal reasons.  I don't know how
it's distributed.

One thing worth noting, you cannot compile with the -opt full flag when
using UltraSlimFast.  UltraSlimFast depends on -sym full, which disables
the compilier's optimizations.  This is the side affect of trying to
create object code that can be examined at the source level.

-----------------------------------------------------------------------
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
Lines: 11
Date: Tue, 13 Oct 92 07:57:16 MDT
From: freeze@ee.byu.edu (Jim Freeze)
Newsgroups: comp.sys.mac.programmer
Distribution: world
Organization: Brigham Young University, Provo UT USA
Subject: Graph3D



I saw the question asked recently, but I did not
see a reply.

Does anyone know where to get info on Apples
unsupported Graf3D functions?

I would very much appreciate it.

Thanks.
From: time@ice.com (Tim Endres)
Newsgroups: comp.sys.mac.programmer
Subject: Re: porting to MPW C, part 1
Date: 10 Oct 92 18:33:40 GMT
Reply-To: time@ice.com (Tim Endres)
Organization: ICE Engineering, Inc.
X-Mailer: uAccess - Macintosh Release: 1.6v1


In article <1992Oct9.134618.23131@netcom.com> (gurgle@netcom.com), you write:
> It appears that rather than doing newline conversion ('\n' to '\r')
> in the standard libraries (like any sane compiler would), MPW C
> does the conversion in the source code (!) so that when I use a
> string constant like "\pFoo!\r", the character codes I get in the
> string are 5, 70, 111, 111, 33, 10. The 10 is the important code;

I believe MPW does this right here. You ONLY want \n to be interpretted
as it is compiled. Otherwise, what would happen if you had data that
came from a source that was not a C string constant? The \015 would
be converted to \012 when you did not wish for it.


tim endres - time@ice.com  -or- tbomb!time
ICE Engineering, Inc - 8840 Main St, Whitmore Lake, MI 48189
Phone (313) 449 8288 - FAX (313) 449-9208
USENET - a slow moving self parody... ph
From: d88-jwa@byse.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Apple Events! How to locate a service?
Date: 8 Oct 92 19:45:56 GMT
	<1992Oct8.155641.28615@bmers95.bnr.ca>
Organization: Royal Institute of Technology, Stockholm, Sweden
Originator: d88-jwa@byse.nada.kth.se

> ross@bnr.ca (Ross Brown) writes:

> Well, there's no sure-fire programmatic way of doing it in System 7,
> but if your local program knows that the remote application/server has
> a certain PPC port name, or a certain NBP entity type alias assigned

Well, everything would be nicer if you could actually USE the
documented-but-not-implemented type/creator port format. Now
you can use the not-documented-but-I-hope-stable format <creator>ep01
(ep == Event Port ?)

> somewhere on its disk, then everything you describe can be done by a
> program on your machine without alerting the user, with the requisite
> combination of IPCListPorts, StartSecureSession, and remote Finder

Nope; you still have to use program linking to establish an
AppleEvent channel (username & password) - We work around that
using AutoGuest INIT, but that's REALLY skanky (we should, at
least, use the library version)

Does the finder listen to remote events? I thought not. Therefore
you have to write a small system extension (background application)
that listens for specific AppleEvents and relays them to the local
finder. Talk about security hole :-)

According to Really Heavy Names (i.e. the guys who did it) this
is not easily solvable, since the AE manager lies on top of the
HLE manager, which lies on top of PPC. If AE lied directly on
top of PPC, one could conceive of specific attributes for name
and password; however, the HLE manager known nothing about what
you send through it.

And still we don't have a good service dictionary in the system.
Anyone care to try and position the HLE and the AE in the OSI
stack? PPC should be at the same level as TCP, i.e. level 3 ?
(starting at 0)

Cheers,

						/ h+

-- 
Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069

"From now on, I think I'll re-label the EQ on the
 desk as Fizz and Wobble, rather than HF and LF."
From: oueichek@imag.fr (Ibaa Oueichek)
Newsgroups: comp.sys.mac.programmer
Subject: How to get the bitmap for an Arabic font
Date: 8 Oct 92 13:34:28 GMT
Organization: IMAG Institute, University of Grenoble, France
X-Newsreader: Tin 1.1 PL5


 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.
 For example : DrawChar(0x63) will draw a Latin c instead of the character
whcih i have in the 0x63 case of the selected font.

 Does anyone know how can i do to access this bitmap ?. I've looked through the
FONT and FOND resource formatrs and couldn't find the solution.
 Thanks for your help.
From: krl@alpha.sunquest.com (ken r. lauver)
Newsgroups: comp.sys.mac.programmer
Subject: Question about a program in Mac C Prog Primer Volume 1
Date: 15 Oct 92 21:57:00 GMT
Organization: Sunquest Information Systems, Tucson AZ
News-Software: VAX/VMS VNEWS 1.4-b1

Has anyone entered the programs from Dave Mark and Cartwright Reed's
book Macintosh C Programming Primer Volume 1, Second Edition?  In
particular the Reminder.c project/program is getting a compile error
in the CopyDialogToReminder function (page 325 in my book).  It is 
trying to set up a notification manager variable if the LaunchCheckBox 
item has been checked.  I know the short section of code may lead to 
more questions about other variables and stuff.  If anyone has found 
this to be a problem too, how were you able to correct the problem.

The section of code reads:

GetDItem( dialog, iLaunchCheckBox, &itemType, &itemHandle, &itemRect );

if (reminder->launch = GetCtlValue( (ControlHandle)itemHandle) )
   reminder->notify.nmResp = &LaunchResponse;
/*   this statement has the  ^  compiler saying that an invalid
     pointer operation is    !  being attempted.        */

else
   reminder->notify.nmResp = &NormalResponse;
/*   same thing for this     ^  statement too
                             !                          */


further in the code:
pascal void LaunchResponse( NMRecPtr notifyPtr )
{
   LaunchParamsBlockRec     launchParams;
   OSErr                    err;

   and so on

The &LaunchResponse operation is trying to set up the reminder
notify nmResp field with the address of the LaunchResponse
function right?  Does it need an address command around the
LaunchResponse call?

I would hate to go on to the next chapter without getting this
one to work.  Any help would be appreciated.

Thanks,
Ken Lauver
Sunquest Information Systems

KRL@ALPHA.SUNQUEST.COM
Newsgroups: comp.sys.mac.programmer
From: wysocki@netcom.com (Chris Wysocki)
Subject: Re: Bug in Mac ROMs
Organization: Connectix Corporation, San Mateo, CA
Date: Wed, 14 Oct 1992 03:39:17 GMT

In article <1992Oct14.091914.59@otago.ac.nz> michael@otago.ac.nz writes:

>I have just found this little gem being executed in the ROM of my IIsi (System
>7.0.1, TuneUp 1.1)
>
>408177A6:  MOVE.L A0,-(A7)
>           _LoadResource
>           _HLock
>
>Unless I'm hallucinating again, this is a bug. It relies on A0 being preserved
>across the _LoadResource call, something it has no right to do. It only works
>because it so happens that the present _LoadResource does preserve A0. Or it
>did until I patched it...

Looks like you missed the note on the top of IM I-120: "LoadResource
preserves *all* registers."  The three instructions you quoted are
quite common throughout the ROMs and other system code.




-- 
------------------------------------------------------------------------------
Chris Wysocki                                     Internet: wysocki@netcom.com
Software Engineer                                   America Online: AFA ChrisW
Connectix Corporation                                   CompuServe: 72010,1140

Newsgroups: comp.sys.mac.programmer
From: Mauro DelRio <delrio@dipisa.di.unipi.it>
Subject: Re : Background Tasks on Mac?
X-Xxmessage-Id: <A6F87F5E2D020B1C@mac3.di.unipi.it>
X-Xxdate: Wed, 7 Oct 92 10: 49:50 GMT
Organization: Dipartimento di Informatica, Universita' di Pisa
X-Useragent: Nuntius v1.1.1d9
Date: Wed, 7 Oct 1992 10:48:17 GMT

Depends if you are writing a program or running one existent.
If U write it, remenmber to set the variable value in 
WaitNextEvent to a little value (like < 60).
From: thepope@bigboy (Michael Kohne)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C bug ?
Date: 8 Oct 92 00:15:04 GMT
Organization: House of the Techno-Discordians

Meessen@slig.ucl.ac.be (Christophe Meessen) writes:
: 
: Teaching C to a friend I fall on the following problem:
: 
: If I compile the following program, everything is right:
: 
: main() {
:    printf( "Hello world !" );
: }
: 
: 
: The following program worked also fine :
: 
: main() {
:    short i = 3;
: 
:    printf( "a number : %d ! ", i );
: 
: }
: 
: Ok, nothing new here !
: 
: But now, when I write the following program the compilation stops and tell
: me that there is a syntax error :
: 
: main() {
:    short i = 3;
: 
:    printf( "a number : %d ! \n", i );
: 
:    print( "Hello world !" );  <== Syntax error in that line !!!!
     ^^^^^ this should be printf. was it so in your original? 
: }
: 
: It was unexpected and made a bad impression on my friend.
: 
: The problem seems related to printf signature (or prototype).
: 
: If I change the "wrong" line to 
: 
:    print( "Hello world !", i );
     ^^^^^ again, was this printf? I can't imagine how this could happen... 
: Every thing works fine !!
: 
: Very strange, isn't it ?
: 
: Is this standard C or Think C bug ?
: Any comment on that ?
: 
: Think C used is 5.0.x (I dont remember last number)
: 
: Bien cordialement,
: 
:                            Christophe MEESSEN

Hmm. I can't get this to happen in think C 5.0.2. The only thing I can get to
happen is either a linker error (for function print), or a 'wrong number of
arguments to printf' (if I don't include stdio.h, and set the compiler to
infer prototoypes). 

Perhaps some more information would help - what version of think C, what
hardware, what compiler settings, etc. 

"Pope" Q.E.D
Michael Kohne
House of the Techno-Discordians, Ammunition Amusements Division
<bang!>
From: udmorrow@mcs.drexel.edu (Daniel Morrow)
Newsgroups: comp.sys.mac.programmer
Subject: handling scrollbars in dialogs
Date: 12 Oct 92 20:43:41 GMT
Distribution: usa
Organization: Drexel University

A friend of mine has scroll bars in his dialog box and doens't know
how to handle the mouse downs in his filter.

I've never had a need for scroll bars so I was no help.

could someone refer me to some sample code somewhere?
(or at least a simple solution)
Thanks.

-Dan.
Newsgroups: comp.sys.mac.programmer
From: ksand@apple.com (Kent Sandvik)
Subject: Re: mac CBeautifier?
Date: Thu, 8 Oct 1992 02:23:46 GMT
Organization: Apple
Followup-To: comp.sys.mac.programmer

In article <1992Oct7.024711.18556@cybernet.cse.fau.edu>,
pollansw@cse.fau.edu (Warren Pollans) wrote:
> 
> I'm trying to find some kind of "C Beautifier".  I use the
> preprocess option in thinkC to expand macros, but the resulting
> expanded source is not formatted.  It's too tedious to format my
> hand.  I've downloaded C Tools 1.37 but the source formatter keeps
> bombing on my SE - with a variety of bomb messages.

The latest developer CD has a tool called cdent that works really fine,
I use it daily. Forget the days of silly C code bracket wars, cdent
reformats your code to your liking.

Kent/DTS

-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Newsgroups: comp.sys.mac.programmer
Subject: Re: UnloadSeg and pointers to functions
Date: 16 Oct 92 02:45:00 GMT
Followup-To: comp.sys.mac.programmer
Distribution: na
Organization: Symantec Corp.

In article <absurd-151092151115@seuss.apple.com> absurd@applelink.apple.com (Tim Dierks, software saboteur) writes:

   [ Tim explains MPW C & Pascal's rules for creating jump table entries
    and associated options. ]

   I'm sure there are similar things for Think, but I don't know what
   they are.

THINK C will always produce a jump table entry for functions whose
address is taken, even if the reference is intra-segment and/or the
function is declared static. I believe THINK Pascal follows the same
rule.

The only exception to the above rule is for single-segment code
resources, who don't have a jump table anyway.

	-phil
--
   Phil Shapiro                                   Software Engineer
   Language Products Group                     Symantec Corporation
		   Internet: phils@cs.brandeis.edu