[comp.sys.mac.digest] INFO-MAC Digest V6 #4

Moderators.Jon.Pugh.and.Dwayne.Virnau...and.Lance.Nakata@SUMEX-AIM.STANFORD.EDU (01/24/88)

INFO-MAC Digest         Saturday, 23 Jan 1988       Volume 6 : Issue 4

Today's Topics:
                              New Moderator
                      Compiling to Resource in LSP
                             Re: LSP XCMDs?
                         Re: Mac II Memory Usage
                  Re: Laser printer screen dump needed
                  MultiFinder breaks Font/DA Mover 3.5
                           Re: Metronome tick
                      Re: Fortran for the Macintosh
                      Re: Fortran for the Macintosh
                            Macintosh Fortran
         BASIC: The Language of the Future?  (So says Microsoft)
                                    C
                              	toolbox bug?
                     SubLaunching under MultiFinder
        RE: Multifinder bug:  permanently locked system font file
                          Grey Scale on the Mac


----------------------------------------------------------------------

Date: Sat, 23 Jan 88 14:34:32 PST
From: Jon Pugh <INFO-MAC-REQUEST@SUMEX-AIM.Stanford.EDU>
Subject: New Moderator

Hi.

I would like to thank Dave Gelphman and Dwayne Virnau for teaching me
the secrets of the digests in order for me to successfully replace them
as the INFO-MAC moderator.  You have probably all seen my name here before
and you will continue to do so as I try to get INFO-MAC back into a timely
forum for Macintosh discussions.  I just hope I can survive the exposure
to TOPS-20 and TELNET.

Jon Pugh
PUGH@NMFECC.ARPA

------------------------------

Subject: Compiling to Resource in LSP
Date: Wed, 20 Jan 88 10:58:40 -0800
From: MAC ICS199 ACCOUNT <mac@ICS.UCI.EDU>

A while ago someone posted a problem about getting the error
'ThePort undefined' during the link process..  This is due to the global
variable 'ThePort' that is defined in the MacPasLib library.  What needs
to be done, when compiling to resource, is remove MacPasLib and replace
it with DAPasLib.  (as stated in the manual)  DAPasLib does not have
any of the QuickDraw Global variables defined.. (ThePort is only the first
Quickdraw global... Black, White, Gray LtGray, DkGray, and a host of
other identifiers are globals.. ThePort just happened to be the first one.)

Roy Lovejoy <rlovejoy@bonnie.uci.edu>
.... a schizophrenic does not have to disclaim anything...

------------------------------

Date: Mon, 18 Jan 88 08:15:00 -0500 (EST)
From: Richard Siegel <rs4u+@andrew.cmu.edu>
Subject: Re: LSP XCMDs?


The problem is not with the libraries, but with your code.

Remember that in a code resource (of which an XCMD is an example), you are not
allowed to have any global variables. This includes QuickDraw globals, such as
thePort, and the standard patterns, as well as any globals that you may
define.
If you want standard stuff like ScreenBits.bounds, or thePort^.portRect, you
can open your own grafPort, get the fields from it you need, and then close it
again.

		--Rich

===================================================================
Richard Siegel
THINK Technologies, QA Technician (on leave)
Carnegie-Mellon University, Confused Physics Major
Arpa: rs4u@andrew.cmu.edu
UUCP: {decvax,ucbvax,sun}!andrew.cmu.edu!rs4u
==================================================================

------------------------------

Date: Mon, 18 Jan 88 08:25:07 -0500 (EST)
From: Richard Siegel <rs4u+@andrew.cmu.edu>
Subject: Re: Mac II Memory Usage


>I'm having problems determining whether a MAC II is
>actually seeing all of it's memory (it has only 1mg).
>
>Does anyone know of any software utilities or memory
>management tools that would help diagnose the problem?

There's not likely to be a problem with the memory itself. If you're seeing
less than one megabyte, and you will, here's why:

        The Macintosh memory pool is broken down into three parts: the
System Heap, the Application Heap, and the space above BufPtr. When you see
a "memory available" statistic, this is in fact the amount of free memory
in the Application Heap; if you're running under MultiFinder, it's the
amount of free memory in that application's partition.

        The amount of free space in the application heap will always be
less than the installed memory in the machine, because additional space is
used by the System Heap -- about 200K to 400K, used for system globals, the
file and volume info lists, the event queue, and more.

        Furthermore, the system, and other routines run at boot time, can
install tasks above BufPtr; anything put above BufPtr cannot be touched, so
it's most useful for installing system-level things like menu clocks, and
the Apple disk cache.

        To maximize the amount of free memory, turn off the disk cache, and
see if you have any startup routines (menu clocks, fancy beep sounds, etc)
that may be using additional memory.

                --Rich

===================================================================
Richard Siegel
THINK Technologies, QA Technician (on leave)
Carnegie-Mellon University, Confused Physics Major
Arpa: rs4u@andrew.cmu.edu
UUCP: {decvax,ucbvax,sun}!andrew.cmu.edu!rs4u
==================================================================

------------------------------

Date: Mon, 18 Jan 88 08:30:13 -0500 (EST)
From: Richard Siegel <rs4u+@andrew.cmu.edu>
Subject: Re: Laser printer screen dump needed


I have my own homegrown screen dump, that will print to any connect printer,
either ImageWriter or LaserWriter.

I will upload it as soon as possible.

		--Rich

===================================================================
Richard Siegel
THINK Technologies, QA Technician (on leave)
Carnegie-Mellon University, Confused Physics Major
Arpa: rs4u@andrew.cmu.edu
UUCP: {decvax,ucbvax,sun}!andrew.cmu.edu!rs4u
==================================================================

------------------------------

Date: Mon 18 Jan 88 11:34:43-EST
From: "Walter E. Gillett" <GILLETT%OZ.AI.MIT.EDU@XX.LCS.MIT.EDU>
Subject: MultiFinder breaks Font/DA Mover 3.5

I have found the same problem reported by sdl@mitre-bedford in V6 #1
("permanently locked system font file").  Namely, when running
Multifinder the Font/DA Mover sees only the Chicago font after, say,
MacWrite has run, whereas all fonts are accessible before MacWrite
has run.  In either case, the Font/DA Mover doesn't see any of the
DAs.  Does anyone know of a patch or more recent versions of either
Multifinder or Font/DA Mover that fix this problem?

(I am using System 4.2/Multifinder 1.0/MacPlus.)

Walter

------------------------------

Date: Tue, 19 Jan 1988 14:47-EST
From: rsd@SEI.CMU.EDU
Subject: Re: Metronome tick


In article <271@rhesus.primate.wisc.edu> dubois@rhesus.primate.wisc.edu (Paul DuBois) writes:
>I'm writing myself a metronome to run on my Macintosh.  Anybody
>got a suggestion for a good waveform and/or envelope that will
>(a) make a nice "tick" sound, and (b) cut through the sound of
>instruments well.
>

WWV uses (or used to use) exactly 5 cycles of a 1KHz sinusoid to produce
the 'tick' you hear.

Rich

------------------------------

Date: Tue, 19 Jan 88 10:08:03 EST
From: "Paul H. Calamai" <phcalamai@water.waterloo.edu>
Subject: Re: Fortran for the Macintosh

Peter J Gergely <Peter@DREA-GRIFFIN.ARPA>:
>
>
> As a request for a colleague, we are interested in any comments on a
> good Fortran Compiler for the Macintosh, with reference to purchasing,
> features, cost, etc.  Also of interest are add ons to the Fortran
> Compiler, such as McFace Tools, etc.
>
> Please reply directly to me, and I will summarize any responses to this
> group at a later date.  Many thanks in advance for any assistance
> provided.
>
>  Peter
>
> Peter J. Gergely (DREA, P.O. Box 1012, Dartmouth, NS  B2Y 3Z7  Canada)
>       ARPANET:  gergely@DREA-XX.ARPA (preferred)
> or              Peter@DREA-GRIFFIN.ARPA
>       DIALNET:  Peter@DIAL|DREA-GRIFFIN
>       CSNET:    gergely%cs.dal.cdn@ubc.csnet
>       UUCP:     gergely@dalcs.UUCP
>       GENIE:    GERGELY
>
Could you please forward all replies to me before
summarizing.....I need to act quickly!

Thanks

------------------------------

Date: Mon, 18 Jan 88 21:40:52 PST
From: calius@composite.STANFORD.EDU (Emilio Calius)
Subject: Re: Fortran for the Macintosh


Peter J. Gergely (gergely@DREA-XX.ARPA) writes:
> As a request for a colleague, we are interested in any comments on a
> good Fortran Compiler for the Macintosh, with reference to purchasing,

        This weekend at MacWorld Expo I saw a demo and spoke with one of
the developers of a FORTRAN compiler tool that works in the MPW environment
The feature list and the developer's stated intentions make it look pretty
good, but of course I didn't get to try it with my own code.
        It's supposed to be released in March for $295 (this includes MPW,
which is $200 by itself).

A few of my favorite features:

        - Full ANSI standard FORTRAN-77 plus some of the DEC VAX extensions.
        - Generates native 68000 OR 68020 object code and can call SANE OR
          generate in-line 68881 code (it will work with a 68882, but won't
          use its special features for a while).
        - Unlimited sizes for data structures (no 32K array, common or
          struct limits). The code itself still has to be in 32Kbyte segments,
          but I don't think it's a good idea to write such large subroutines
          anyway.
        - They promise to have more and more specific compile error messages
          than Absoft/Microsoft MacFortran and Unix f77 and to show the
          exact location WITHIN the line where the compiler had indigestion.
        - Optimization (a compile time option). They promise to add more
          levels of optimization as the product develops.
        - Has extra variable types among which I like REAL*10, *12; EXTENDED
           (12 bytes); COMPLEX*16, *20, *24; XCOMPLEX; STRING; etc.
        - Include files
        - Can be linked to MPW Pascal, C and Assember object code files.
        - They don't have their own symbolic debugger. They're committed to
          support the MPW source-level debugger. I spoke to some people from
          the MPW development team, and it seems it's not going to be out
          before September.

For more info, talk to:

        Language Systems Corp.
        463 Carlisle Drive
        Herndon, VA 22070
        (703) 478-0181

NOTE: the developers are willing to listen to suggestions as to what users
      want, so let them know what's important.

Does anybody else know any more about this compiler?

Emilio P. Calius
Structures & Composites Lab
Aeronautics & Astronautics
Stanford University

------------------------------

Date: Fri 22 Jan 88 09:49:28-PDT
From: Craig Rasmussen <CER@STAR.STANFORD.EDU>
Subject: Macintosh Fortran

The January 11 issue of Macintosh Today has an article on a Fortran compiler
from Language Systems Corp. of Herndon, Va.  I called (703-478-0181) for more
information and found out several interesting points:
 - runs in the MPW environment, so as I understand it, the code can be linked
   with other MPW languages
 - follows the ANSI 77 standard with VAX VMS Fortran extensions
 - will generate code for various environments (68000, 68020, 68881, SANE)
 - costs $295 and will be out in April (or was it March)

They will be in Beta shortly and are willing to sell a Beta version which can
be upgraded when the final version is released.  Anyone heard of Language
Systems Corp. and know of their reputation?

------------------------------

Date: Wed 20 Jan 88 18:32:28-PST
From: A. E. Siegman <SIEGMAN@Sierra.Stanford.EDU>
Subject: BASIC: The Language of the Future?  (So says Microsoft)

The following is excerpted from a column called "Off the Grapevine" in
the Boston Computer Society's most recent monthly newsletter:

In late October, Microsoft hosted a two-day seminar at its Redmond,
Washington, corporate campus to share its vision of software with leaders
of some of the nation's largest user groups.

Microsoft today is bustling with activity.  As the company puts the
finishing touches on OS/2 and secures its pre-eminent position in the
world of operating systems, it is moving aggressively to become a leader
in many other markets.  The company is rapidly adding new features and
versions to its Word word processor to try to make it a standard in
corporate America.  It is launching a head-on attack against Lotus 1-2-3
with its new PC Excel.  It is acquiring companies to stake out market
positions in electronic mail and desktop presentations.  And it is
building a major hardware business with its Mouse and Mach 20 accelerator
card.

Oddly enough, Microsoft chose not to talk about any of these activities
with the user group community.  Instead, it focused all of the sessions
on its work in programming languages.

Microsoft believes the future belongs to programmers.  Although
programming languages were once thought to be relics of the early days
of personal computers, they are enjoying tremendous growth today.  As
users become more sophisticated, Microsoft believes, they will eventually
find themselves needing performance and specialized functions that only
a programming language can provide.

Said one Microsoft engineer, "In the future, everything should have
programmability."

BACK TO BASIC

If it seemed surprising that Microsoft focused its entire presentation
to user groups on programming languages, it was more surprising still that
the company put special emphasis on one language in particular: BASIC.

Most serious programmers consider BASIC an obsolete language.  Although
BASIC's wide distribution gives it broad recognition among personal
computer users, professionals consider it too slow and lacking in
sophistication for serious programming jobs.  More and more, they are
opting for C as their language of choice.

Why, then, did Microsoft spend so much of its time with user groups
promoting a new version of BASIC?  According to the company, BASIC is
going to be making a big comeback.

With Microsoft's Quick BASIC 4.0, the company believes it has overcome
most of BASIC's key weaknesses.  The language is now lightning-fast and
has nearly all of the modular structured programming features found in
Pascal and C.

More important, BASIC is still much easier to use than any other language.
For this reason, Microsoft sees BASIC as Rthe language of programmability
for the future.S

As the presenters developed this idea, it became clear that BASIC could
take on new roles in the future.  For the last few months, Microsoft
chairman Bill Gates has talked about the need for a "universal macro
language" for personal computers.  This language would allow users to
write procedures that work with all different applications programs and
operating systems.  (It could, for example, permit you to write a macro
in 1-2-3  that called up a program in dBase III  and then transferred
information to Pagemaker.)

Although the presenters did not say so directly, they implied that
Microsoft was working to make BASIC the basis of this universal macro
language.  BASIC, then, could become the Esperanto of the applications
software.
[Given the success of Esperanto over the years, that last sentence
is hardly the most promising vision of the future!]

------------------------------

Date: Thu, 21 Jan 88 08:37:53 EST
From: "William E. Williams"
From: <BSQUARE%YALEVM.BITNET@forsythe.stanford.edu>
Subject: C

Can someone recommend a C compiler for the Mac?  I am an experienced Mac
Pascal programmer but have never even looked closely at a C program.  Also, is
there a good C-oriented Mac programming text?  I have what appears to be an
excellent book called "Pascal to C," for general C programming, but I'm not
sure what's available specifically for the Mac.

[ Almost everyone will recommend Lighspeed C as the system of choice for
  C programming on the Mac - JP ]21-Jan-88 13:38:32-PST,1175;000000000001

------------------------------

Date: 	21-JAN-1988 16:36:24.07
From: 	THOMPSON @ REDBUD.PSY.CMU.EDU
Subject: 	toolbox bug?
Reply-to: 	THOMPSON @ PSY.CMU.EDU

    I am having some trouble with a Lightspeed C program.  I have a
    call to the ShowWindow toolbox routine, and code immediately after
    the call in the same routine is not getting executed. I set a
    breakpoint on the instruction after the Toolbox call using MacsBug,
    and there was no break.  The program continues to execute, but I'm
    not sure where it picks up after the toolbox call (it's difficult
    to track.)

    In addition, if you step through the toolbox call, the system branches
    to location 0x08064C0, but if you ask MacsBug to print the ShowWindow
    routine, it starts printing at 0x08FC2E.

    I'd appreciate any help on this problem.

    							Ross

------------------------------

Date: Wed, 20 Jan 88 16:52:43 pst
From: Larry Rosenstein <lsr@apple.apple.com>
Subject: SubLaunching under MultiFinder


In article <8801121446.AA21330@ucbvax.Berkeley.EDU> you write:
>From: RJWM
>Subject: RE: Launching or Sublaunching Another Ap (Re: Msg 2270)
>Date: 4-JAN-22:52: Programming Techniques
>
>Two related question. The sublaunch facility that HyperCard uses does not
>require System 4.1-it works perfectly well with 4.0. How does it work? How can

I don't know how it works, but it doesn't work properly with MultiFinder.
Under MultiFinder, Hypercard will be terminated when it tires to do a
sublaunch.

The only way to do a sublaunch that will work properly under MultiFinder is
the one described in the sublaunching Tech Note.

>From: DEWI
>Date: 5-JAN-05:11: Programming Techniques
>
>If the scenario is program A gets called with attached document A, program A
>sublaunches B with document B, then under MultiFinder you have the choice of
>keeping doc A open, or re-opening it after the sublaunch (just in case you
>weren't under MultiFinder and the launch didn't return). Unfortunately, you

For now, you have to test for the existence of the MultiFinder temporary
memory allocation service.  This is better than testing for WaitNextEvent,
but may change in a future version.

If MultiFinder is running (according to this test), then the sublaunch will
return to the program, and document A will still be open.  Otherwise, you do
have to remember the location of A, and reopen it.

>The only glitch with this is with some esoteric networks where the directory
>IDs are dynamically allocated. Saving a pathname, a la HyperCard, would solve

This is only if you expect to resume after rebooting.  In most cases,
saving the dirID will be OK, because it will be unique until the volume is
unmounted.  If the program can't locate the file, it should simply put up a
message.

------------------------------

Date: Thu, 21 Jan 88 19:22:41 pst
From: Larry Rosenstein <lsr@apple.apple.com>
Subject: RE: Multifinder bug:  permanently locked system font file

In article <8801180313.AA05979@ucbvax.Berkeley.EDU> you write:
>Date: Mon, 21 Dec 87 18:21:46 EST
>From: sdl@mitre-bedford.ARPA (Litvintchouk)
>Subject: Multifinder bug:  permanently locked system font file
>Example:  Start up MicroSoft Word.  Then start up the Font Mover.  You
>notice that the only font it can access is Chicago 12 (presumably
>because MicroSoft Word has locked the font file against access by the
>Font Mover).

This sounds like you were using an older version of Font/DA Mover.  The 3.6
version should work properly.  Old versions (as well as ResEdit) will
exhibit this kind of problem.

>Date: Tue 12 Jan 88 07:44:13-PDT
>From: Elliot Bennett <ELLIOT@STAR.STANFORD.EDU>
>
>It's more than likely that I've missed this, but I haven't read anything
>in a while noting the obvious multifinder bug of not updating icons
>that happen to be on the desktop (and not in a window).  Does anyone

I have never seen this.  The icons on the desktop update fine.  I keep lots
of icons on the desktop and the only problem I have is when an application's
window covers them, other than that they display normally under MultiFinder.

Larry Rosenstein

Object Specialist
Apple Computer
AppleLink: Rosenstein1
CSNET: lsr@Apple.com

------------------------------

Date: Fri, 22 Jan 1988 08:35 CST
From: Revised List Processor (1.5m)
From: <LISTSERV%UIUCVMD.BITNET@forsythe.stanford.edu>
Subject: Grey Scale on the Mac

Date:     Fri, 22 Jan 88 09:35 EDT
From:     <VAUGHAN@MCOIARC>
To:       info-mac@uiucvmd

Does anyone know of any sample code for displaying gray scale images
on the MacII?  I'am attempting to write an image processing system
for the MacII based on STILE (STructure Interconnection Language
and Environment) from Bruce Weide at OSU.

The scenario I've tried is:

a) create a pixmap containing the image data
b) open a color window
c) create a palette with 128 explicit colors, for shades of gray
d) set the palette to the window and then activate it,
e) use copybits to copy the image data to the window.

This puts the image data there, but it produces only 16 shades of gray...

Thanks,

Clif Vaughan
Image Analysis Research Center
The Medical College of Ohio
419-381-5448                      bitnet: VAUGHAN@MCOIARC

------------------------------

End of INFO-MAC Digest
**********************