[mod.mac] INFO-MAC Digest V4 #120

INFO-MAC-REQUEST@SUMEX-AIM.ARPA (Moderator David Gelphman...) (09/25/86)

INFO-MAC Digest         Wednesday, 24 Sep 1986    Volume 4 : Issue 120

Today's Topics:
                             serial drivers
                          Mac Reset Instruction
      Problems with the resource manager inside Macintalk on a Mac+
                    Request for PICT disk file format
                   Getting grow regions in Windows....
                   LaserWriter, AppleTalk, and VAX/VMS
                          utility-password.hqx
                     UTILITY-PCPCBACKUP-RESTORE.HQX
                 Apple's strategy and new announcements
                     Undocumented feature of MS Word
                           Problem with TOPS?
                                  rs232
                            Plotting Programs


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

Date: Wed, 24 Sep 86 13:08 EDT
From: PEPKE%FSU.MFENET@LLL-MFE.ARPA
Subject: serial drivers


I use the serial drivers under Lightspeed C to provide a debugging facility
connected to a terminal, and they work fine.  Here is a piece of code that
waits until a key is pressed on the terminal and then inputs a line and
prints it.

#include <MacTypes.h>
#include <DeviceMgr.h>
#include <SerialDvr.h>
#include <unix.h>
#include <stdio.h>
#include <ctype.h>

int sinunit, soutunit;

monitor_init()
/*Initializes the serial monitor*/
{
        OpenDriver("\p.AIn", &sinunit);
        OpenDriver("\p.AOut", &soutunit);
        SerReset(sinunit, baud2400+stop10+noParity+data8);
}

static myputchar(c)
char c;
/*Outputs a single character*/
{
        long i = 1;
        FSWrite(soutunit, &i, &c);
        if (c == '\n') FSWrite(soutunit, &i, &"\r");
}

myputs(s)
char *s;
/*Outputs a string on the console unit with no newline.*/
{
        while (*s) myputchar(*s++);
}

mykbhit()
/*Returns TRUE if keyboard hit*/
{
        long nchars;
        SerGetBuf(sinunit, &nchars);
        return nchars ? TRUE : FALSE;
}

char *mygets(s)
char s[];
/*Gets a string, puts it in s*/
{
        char c;
        int sptr = 0;
        do
        {
                long k;
                k = 1;
                FSRead(sinunit, &k, &c);
                c = c & 0x7f;
                if (k == 1)
                {
                        if (c >= ' ' && c < 0x7f)
                        {
                                myputchar(c);
                                s[sptr++] = c;
                        }
                        else if ((c == 8 || c == 0x7f) && sptr)
                        {
                                myputs("\010 \010");
                                --sptr;
                        }
                }
        } while (c != '\r' && c != '\n');
        myputs("\n");
        s[sptr] = 0;
        return s;
}

main()
{
        char inpbuf[80];

        monitor_init();
        myputs("So type something.\n");
        do
        {
                while (!mykbhit());
                myputs("Yeah, what? ");
                myputs(mygets(inpbuf));
                myputs("\n");
        } while (strcmp(inpbuf, "EXIT"));
}

Eric Pepke
Supercomputer Computations Research Institute
Florida State University
Tallahassee, FL 32306-4052
<pepke@fsu.mfenet>

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

Date: Mon, 22 Sep 86 09:29:59 edt
From: rs4u@andrew.cmu.edu (Richard Siegel)
Subject: Mac Reset Instruction

I once wrote a little shutdown routine, using the 68000 RESET instruction, declared
INLINE in TML Pascal. I found out that when I called that procedure, the Mac
rebooted, but with a HyperDrive, it didn't come back up (it just sat there blinking
for a floppy). Only when I replaced the RESET instruction with the "Restart"
procedure (documented in the bound Inside Macintosh) did the machine boot properly.
I don't remember exactly, but the Restart procedure jumps to some location in
ROM; it's one of the "[Not in ROM]" procedure calls.
          Anyway, I suspect that this call does things that ordinarily aren't done by
a RESET. I've found out in some cases that a press of the reset button or using
the RESET instruction IS NOT the same as a power-down, wait a minute, power-up
cycle.

                    --Rich

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

Date: Wed 24 Sep 86 10:22:50-EDT
From: WEINSTEIN@G.BBN.COM
Subject: Problems with the resource manager inside Macintalk on a Mac+

I have been unable to get MacInTalk to work on a Mac+. I have traced the
problem to a GetResource call inside the .Sound driver seeking to load
resource 'TALK' ID 1, which returns a 0 instead of the desired handle to
the resource. ResErr, however, is not set!. This strikes me as positively
weird. I am using System 3.2, Finder 5.3, on a true Mac+. Anyone have any
idea what gives?

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

Date: Wed, 24 Sep 86 01:08:59 PDT
From: <MCD@SLACVM.BITNET>
Reply-to: MCD%SLACVM.BITNET@Forsythe.Stanford.Edu
Subject: Request for PICT disk file format

I would like to get a description of the contents of a PICT disk file,
as can be saved by MACDRAW if the appropriate option is checked. I know
that most of it is identical to what would be in memory after the
appropriate quickdraw calls (and therefore understandable by reading IM)
but there is some stuff before that which is not documented in IM.
There is supposed to be a Technical note (number 29 ?) on the subject
but nobody seems to have it (has it been released by Apple yet ?)
I would assume this information would be readily available given the
importance of PICT data in the MAC, but many efforts on my part have
failed to unearth the description. Many thanks in advance.

Manuel C. Delfino                |    userid: MCD node: SLACVM network: BITNET
Department of Physics            |    (415)854-3300 x3320
University of Wisconsin - Madison|    SLAC, P.O.BOX 4349, Stanford, CA 94305

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

Date: Wed, 24 Sep 86 14:53:35 PDT
From: ucscc!jordan@ucbvax.Berkeley.EDU (90220000)
Subject: Getting grow regions in Windows....


	I think that I am missing something, but for the life of me, I can't
fiqure out how to get a window to have a grow region based on Inside Macintosh.
	Could someone clue me into the correct call?  I am using a documentProc
defined in as a resource (using RMaker and TML Pascal).  I then get the window
template and show it.  Great window, but no grow region!
	
	Jordan

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

Date: Wed, 24 Sep 86 14:35:26 PDT
From: mse%Phobos.Caltech.Edu@DEImos.Caltech.Edu (Martin Ewing)
Subject: LaserWriter, AppleTalk, and VAX/VMS

My Problem:  Integrating LaserWriter with Appletalk/Mac net and VAX/VMS

Hardware:  LW connected to either VAX/VMS serial port, or Appletalk

Applications:  LW to print PostScript files from VAX TEX or other source AND
	from any Macintosh on Appletalk

Question:  Is there a low-cost, reliable way of injecting PS files from the
	VAX into Appletalk so that the LW can be used without manual
	switching of cables, etc?

We have tried using a program called ATPRINT on a dedicated 128K Mac.  This
program has apparently worked for some people running VAX Unix.  But we have
been unable to get it up reliably in our environment.

Has anyone solved this problem, or failing that, does anyone have a bright
idea?

Many thanks for any responses.

  Martin Ewing, Caltech Radioastronomy
  mse%phobos@Deimos.Caltech.Edu	(Internet)
  mse@CITPHOBO (Bitnet/EARN)

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

Date: 24 Sep 86 08:30 EST
From: CML5A9%IRISHMVS.BITNET@WISCVM.WISC.EDU
Subject: utility-password.hqx

Follows is a useful little utility I hacked together one
morning after someone trashed my hard disk.  The idea here
is to require someone booting off of the HD to type in a
username.  It doesnt stop them from getting in w/ a floppy,
but I gave all of the people who normally use my Mac a username,
and the program keeps a log of them, so at least i know who's
using it when.  It seems to work pretty well, and you can
customize the usernames and dialog boxes and logfile names
to your hearts content w/ ResEdit.  Hope someone finds it
useful, it gives me peace of mind if nothing else.

                                   - Tom Dowdy
"I'm increasingly convinced that a vast majority of wrong thinking
 people are right."

archived as

[SUMEX-AIM.Stanford.EDU]<INFO-MAC>UTILITY-PASSWORD.HQX

DAVEG
]

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

Date: Wed, 24 Sep 86 08:23:29 pdt
From: caip!uw-beaver!fluke!moriarty@seismo.CSS.GOV
Subject: UTILITY-PCPCBACKUP-RESTORE.HQX

Quite a few people on the net seem to be using HFS Backup for backing up
their files; unfortunately, sometimes the program will not restore the
specially formatted and backed-up files off the floppies correctly.  This
program, which is PD and released by PCPC, the people who created HFS
Backup, will restore individual files which HFS Backup backed up.  I checked
with PCPC, and they said it was fine to post it.  I have combined it (via
Unpit, i.e. in PackIt II uncompressed format) with a few brief directions
that I transcribed from the letter they sent with the Restore disk.

[This has been posted to net.sources.mac and mod.mac.binaries on Usenet]

         "I've finally learned what `upward compatible' means.  It means we
          get to keep all our old mistakes."
                                 -- Dennie van Tassel

                                        Moriarty, aka Jeff Meyer
ARPA:  fluke!moriarty@uw-beaver.EDU
UUCP:  {uw-beaver, sun, allegra, sb6, lbl-csam}!fluke!moriarty
CREDO: You gotta be Cruel to be Kind...
<*> DISCLAIMER: Do what you want with me, but leave my employers alone! <*>

ARCHIVED AS

[SUMEX-AIM.Stanford.EDU]<INFO-MAC>UTILITY-PCPCBACKUP-RESTORE.HQX

daveg
]

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

Date: Wed, 24 Sep 86 02:11 N
From: <INFOEARN%HLERUL5.BITNET@WISCVM.WISC.EDU>
Subject: Apple's strategy and new announcements

<hic> Just got home from the Apple dealer day here in Holland.  I heard a
couple of interesting things I'd like to pass on.

Connectivity is a big word in present Apple marketing plans.  It was probably
mentioned several times tonight.  I did catch a few specific directions in
the speeches Apple held: Apple is going to support Decnet, the Token Ring
Network and SNA.  It is going to develop (with or without third parties)
applications that will allow completely transparent communications on these
networks and with host software on these networks.  Apple's main emphasis
during the rest of this year and the first half of next year may be desktop
publishing, but during the second half of 1987 and 1988 the most important
thing will be 'desktop communications'.

Apple really likes the word 'desktop'.  Besides desktop publishing and
desktop communications they are also promoting desktop engineering (CAD/CAM
packages among others) and desktop productivity (the rest we all know, like
text editors, spreadsheets, outliners and databases).

There was also a nice demonstration of the Apple //gs.  The demo was
introduced by showing a short film of a rotating //gs with accompanying
pop music.  Then an Apple employee said that both the film and the sound
were being created on a //gs on the stage!  In real time!  Wow, it sure was
fantastic.  Both the animation (very fast and detailed) and the sound
(absolutely incredible!) were impressive.

Strangely enough the newly announced SCSI Hard Disk 20 was not mentioned at
all.  Maybe they don't think it's important enough (not likely) to announce
here or they don't have enough of them to ship.  This last thing is a big
problem with the //gs: Apple says it will *not* ship the //gs in quantity in
Holland until the first of february next year, because it simply cannot make
enough //gs's to meet the expected demand.  Who knows what might be the
problem with the SCSI HD 20.

Oh, and guess what?  Apple reaffirmed it's commitment to "announce more
products during the next year than during all of the previous years of
Apple's existence".  Sculley was probably just a bit premature when he said
the same thing a couple of months ago (a year?).  Anyway, a lot of these
products are going to be communications products (software and hardware).

Enough said.  I've got to get some sleep after all the booze tonight.

-- Thomas

   FRUIN@HLERUL5.BITNET

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

Date: Wed, 24 Sep 86 01:08:27 PDT
From: Manuel C. Delfino         (415) 854-3300 x3320 MCD      at
From: SLACVM
Reply-to: MCD%SLACVM.BITNET@Forsythe.Stanford.Edu
Subject: Undocumented feature of MS Word

I have discovered what I think is another undocumented feature of the
FIND (and CHANGE) command in Microsoft Word. The question mark (?) acts
as a wild card (causing fairly puzzling behavior when you try to look
for a question mark and instead it stops at every character).
For example, mi?e would find mine, mile, mite, etc. Multiple ? seem
to work also, so ?i?e would find lite, sire, rise, etc., etc.
It should be noted that even though you can use this in the 'find'
part of the CHANGE command, you can't use it in the 'change' part,
as is also the case with ^p, ^t, etc.
You might now ask how does one search real question marks ? The answer,
of course (!), is to look for ^?

Manuel C. Delfino                |    userid: MCD node: SLACVM network: BITNET
Department of Physics            |    (415)854-3300 x3320
University of Wisconsin - Madison|    SLAC, P.O.BOX 4349, Stanford, CA 94305

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

Date: Wed, 24 Sep 86 11:10 EDT
From: Thomas D. Schardt  <K3TDS%SCFVM.BITNET@WISCVM.WISC.EDU>
Subject: Problem with TOPS?

I was taking to a saleman today who was demonstrating MacServe and
he started comparing it with Cetram's TOPS software.  He said he
could not recommend TOPS because there are potential holes for novice
users.  The one example he sited was the fact that TOPS allows one to
mount a floppy disk as shared which is great.  However, one goes back
and unmounts the volume and someone else goes to use it because it
still appears to be mount, one has a crash.  Have people seen this
kind of problem?

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

Date: Wed 24 Sep 86 10:49:07-PDT
From: Antony Sword <SWORD@SRI-STRIPE.ARPA>
Subject: rs232

Does anyone know what the pinouts are for thr serial port on the Mac+?
Thanks
Sword@sri-stripe

[ note from moderator:  Apple has documented the pinouts on the Macintosh+
in Apple Technical Note #65 which is archived as TN65.HQX in the info-mac
directory. DAVEG ]

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

Date: Wed, 24 Sep 86 16:15:35 edt
From: rs4u@andrew.cmu.edu (Richard Siegel)
Subject: Plotting Programs

I've written a plotting program. It isn't as fancy as Cricket Graph, but it
costs a whole lot less, and has unlimited data capacity (about 25000 data points
on a 512K machine), and is fully MacPlus/512Ke/HFS compatible. It also does
some analysis (mean, standard deviation, least-squares line fit, chi-squared).

It's called QuickPlot, it's $15. Send me mail for more information, if you're
interested.

		--Rich

rs4u@andrew.cmu.edu
rs4u@te.cc.cmu.edu
rs4u@td.cc.cmu.edu

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

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