HDTenEightyP/NetNews huggingface dataset:
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: Protected Memory (was: Re: THINK C linker makes me sad)
Organization: Instructional Technology Laboratory, University of Michigan
Distribution: usa
Date: Wed, 9 Sep 1992 17:50:06 GMT

In article <srsnphf.stever@netcom.com> stever@netcom.com (Steve Riggins) writes:
>Will all this A4 stuff Think uses break when the protected memory kernal comes
>out and the PowerPC ships?  8-)
>

This looks like the start of a longer discussion, so I modified the subject.

Interesting question...

It seems to me that there are many internals that will have to change, but
the goal I guess would be to maintain source-code compatibility wherever
possible. Since an XCMD loads in Hypercard's heap and is called on
Hypercard's time (process), I would think that the use of A4 wouldn't be
a problem, as long as it gets set up right. The mechanism to set it up right
might change; I never did completely understand how the A4 prologue/epilogue
code worked. 

More difficult would be: Toolbox calls that return a pointer to a data
structure in system memory. I'm not fully conversant with how the PMMU can
be programmed for memory protection, but it seems to me that a lot of things
will have to be stored and returned differently. If everything is done 
with Toolbox calls, rather than stuffing into system data structures, this
might not be too painful.

Is it time for Apple to release "The Joys of Protected Memory," as they once
released "The Joys of being 32-bit clean" before System 7 came out?   

>
>-- 
>Steve Riggins                  Internet: stever@netcom.com
>AppleLink:  Voyager.geek       AOL:      RigginsS
>CompuServe: 75300,1635         "Can never have enough EMail addresses"


-- 
"...remove protective cap. Hold atomizer with thumb at base and nozzle 
between first and second fingers. Without tilting head, insert nozzle into 
nostril. Fully depress rim with a firm, even stroke and sniff deeply."
-advice for presidential candidates from Paul Potts - potts@itl.itd.umich.edu
From: wingo@apple.com (Tony Wingo)
Newsgroups: comp.sys.mac.programmer
Subject: Re: 2up, double-sided printing
Date: 11 Sep 92 01:26:17 GMT
Followup-To: comp.sys.mac.programmer,comp.sys.mac.apps
Distribution: na
Organization: Apple Computer

In article <2AAF09DD.1893@news.service.uci.edu>, eauu011@orion.oac.uci.edu
(Gizmo) wrote:
> 
> I'm also interested in knowing how to print on both sides.  Could someone tell
> me if there is there some kind of init that will allow a DeskWriter C to print
> odd number pages and then allow the users to reload the papers to print the
> even number pages on the back?
> 
> Please post on the net, I'm sure there are other users who would also like to
> conserve paper to save a tree.
> 
> Any Help would be greatly appreciated.

There is a commercial product called DynoPage that does things like you
suggest, as well as two up printing and a number of other things.  I know
from experience that it works well with both DeskWriters and LaserWriters.

-tony

>>usual disclaimer<<
Newsgroups: comp.sys.mac.programmer
From: mspace@netcom.com (Brian Hall)
Subject: Re: CTB undocumented routines and Think Libs
Date: Wed, 09 Sep 92 03:33:24 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Distribution: comp

leonardr@netcom.com (Leonard Rosenthol) writes:
>In article <ULFIS.92Sep8223513@cyklop.nada.kth.se> ulfis@cyklop.nada.kth.se (Anders Ulfheden) writes:
>>The file <CommResources.h> contains the glue for some *undocumented* CTB
>>routines:
>>
>>...
>>pascal Handle CRMGetToolResource (short procID, ResType theType, short theID);
>>pascal void   CRMReleaseToolResource (short procID, Handle theHandle);
>>...
>>pascal OSErr  CRMFindCommunications(short *vRefNum, long *dirID);
>>...
>>
>>When I use CRMGetToolResource() in my code (CommToolbox library added) I get
>>a "undefined CRMGetToolResource" link error.
>>
>	These routines are part of CTB 1.1, which is available as a separate
>library for Think, but should be part of the MPW 3.2 .o files.  If you don't
>have the docs/library for the CTB 1.1, they are available on ftp.apple.com.
>Leonard Rosenthol			Internet: 	leonardr@netcom.com

The 1.1 files come in MPW .o format.  You need to run it past oConv (and
create a vocabulary file if you want lower case in the names).  I think I
also had to make a small change to one of the header files in that package
as well (or I got newer ones from the ETO CD - I forget).

-- 

 \ | /   | Brian Hall                 mspace@netcom.com
 - : -   | Mark/Space Softworks       Applelink: markspace
  /|\    |                            America Online: MarkSpace
 |-+-|   |
/-\|/-\  | The tornado ate my powerbook.
Newsgroups: comp.sys.mac.programmer
From: jbush@magnus.acs.ohio-state.edu (J Eric Bush)
Subject: Re: Predefined Constants for gestaltMachineType...
Organization: The Ohio State University
Date: Tue, 8 Sep 1992 19:39:58 GMT

In article <1992Sep8.174820.25879@utkux1.utk.edu> danny@utkux1.utk.edu (Danny W
. McCampbell) writes:
>In IM Vol VI the predefined constants for the gestaltMachineType
>go up to the Mac LC.  Does anyone know the constants for the
>PowerBooks?  I am sure there is an easy way to find them out
>since Apple comes out with new Macs every now and then.  Thanks
>in advance.
>
I bet you could find a tech note on this subject.  They keep those up to date 
when there is a change that would cause one of the tech notes to change.  I
remember seeing the tech note, but can't remember the number off=hand.

Eric
-- 
------------------------------------------------------------------------------
J. Eric Bush
Internet: jbush@magnus.acs.ohio-state.edu
From: dank@calvin.usc.edu (Dan King)
Newsgroups: comp.sys.mac.programmer
Subject: Touch screens?
Date: 9 Sep 1992 14:21:32 -0700
Organization: University of Southern California, Los Angeles, CA
Distribution: world
Reply-To: dank@usc.edu
NNTP-Posting-Host: calvin.usc.edu


Howdy, y'all.

My department is building a public-access information system that's going to
be housed in a kiosk.  It will need to use a touch screen instead of a mouse.

I know I've seen ads for Mac touch screens in the past, but I can't find one
now that I need one.  Has anyone else seen one around?  Or, better yet, has
anyone used one?

Does anyone have any info about prices, availability, reliability, or anything
else that might be helpful?

Thanks!
dank
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: Easiest way to find my PSN (Process Serial Number)
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<x-znmmf.gurgle@netcom.com>
	<1992Sep15.144629.21586@midway.uchicago.edu>
Date: Tue, 15 Sep 1992 19:42:13 GMT

> ejw1@kimbark.uchicago.edu (Eric Weidl) writes:

   >>	Is there any easy way to determine my own Process Serial Number?  

   >GetCurrentProcess. There are also constants which you can stuff
   >into a PSN, but I can never remember their names, so I just call
   >the trap. :-)

   Of course!  If I call GetCurrentProcess right after I am launched, A5 will
   be mine and I'll get my own PSN.  I had been thinking about
   GetCurrentProcess, but figured that I'd call it when I needed it, ie.
   when I was in the background.  At that time, it would return a PSN, but
   not mine.  If I call it before entering my event loop, I'll be in the
   foreground and it should work.

A5 is _always_ yours when you're getting time through WaitNextEvent,
so unless you call GetCurrentProcess from interrupt time (or maybe
a trap patch) you should be OK.

Note that GetCurrentProcess != GetFrontProcess!

Also, if you send AppleEvents to yourself, you should pass the
constant { 0 , kCurrentProcess } for PSN when you create the
destination descriptor. This will give you two benifits:

1) The Apple Event Manager will short-cut the event sending and
   pass it to the event handlers IMMEDIATELY (not wait for you
   to call WaitNextEvent)
2) Your AppleEvent will be seen by the AppleScript recording
   mechanism.


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

Help eradicate FIDO-Net <-> Usenet gateways in our time!
From: jpurlia@qualcomm.com (John Purlia)
Newsgroups: comp.sys.mac.programmer
Subject: Asynch Serial IO
Date: 11 Sep 92 15:46:30 GMT
Followup-To: comp.sys.mac.programmer
Organization: Qualcomm, Inc.

Has anyone had any luck passing data out the serial ports asynchronously? 
I'm passing buffers of data with asynch calls to PBWrite, which seems to
work fine (though, how would I know; I'm not connected to anything yet!),
but my program freezes when I quit and call KillIO.  A press of the
programmer's switch shows the toolbox wandering around inside of
FluhEvents.  In a nutshell, here's what I'm doing (lots of stuff excluded,
of course):

/* Open the drivers and set the baud rate */
void serialInit (void)
{
    OpenDriver ("\p.AOut", &AoutRef);;
    OpenDriver ("\p.AIn", &AinRef);
    SerReset (AoutRef, baud1200 + stop10 + noParity + data8);
    SerSetBuf (AinRef, &BigBuf, BIGBUFSIZ);
}

/* The spot where I transfer a buffer out the serial port */
void serialTx (void)
{
    memset ((char *) &gTransmitPB, 0, sizeof (HParamBlockRec));
    gTransmitPB.ioParam.ioRefNum    = AoutRef;
    gTransmitPB.ioParam.ioBuffer    = txbuf;
    gTransmitPB.ioParam.ioReqCount = i;
    if (errcode = PBWrite (&gTransmitPB, true))
        transmitError (errcode);
}

/* Called everytime through my main event loop.  I poll for completion
   of the asynchronous PBWrite call */
void idleLoop (void)
{
    /* If we're still trying to transmit... bail! */
    if (gTransmitPB.ioParam.ioResult == 1)
        return;
    else
        if (gTransmitPB.ioParam.ioResult) {
            transmitError (gTransmitPB.ioParam.ioResult);
            gTransmitPB.ioParam.ioResult = 0;
        }
}

/* This is called when I quit the program */
void closeSerial (void) {
    KillIO (AoutRef);
    KillIO (AinRef);
    CloseDriver (AinRef);
    CloseDriver (AoutRef);
}


The app freezes as soon as it hits the first KillIO call.  When I make the
call to PBWrite synchronous, or otherwise use a call to FSWrite, everything
works fine, but of course I have to wait unacceptable periods of time for
the IO to complete.  Now, I know that the file manager does not *really*
work asynchronously (at least not to the hard disk), but the serial ports
certainly should!

Any ideas?

...........................................................................
John Purlia          : My brain; not my company's brain.  My brain says...
jpurlia@qualcomm.com : "The Toolbox giveth, and the Tech Notes taketh away"
...........................................................................
From: Glenn Stauffer <stauffer@cc.swarthmore.edu>
Subject: Re: Shareware compilers
X-Xxmessage-Id: <A6D0B69DDF014333@mac1.beardsley.swarthmore.edu>
X-Xxdate: Mon, 7 Sep 92 12:34:53 GMT
Organization: Swarthmore College Computing Center
X-Useragent: Nuntius v1.1.1d9
Date: Mon, 7 Sep 1992 11:35:23 GMT

In article <1992Sep6.083131.25903@terminator.cc.umich.edu> Michael
Dautermann, dauter@terminator.cc.umich.edu writes:
> LA/HARVESTC   1,524    6/27/92     BinHex4.0,Compact1.33
> /mac/development/languages/harvestc1.2.cpt.hqx
>
>    Freely-distributable C compiler and editor.  It's  standalone, but
>    it's also compatible with MPW-C.  You can create projects,
>    compile, build/link.  Even  supports a couple of Pragmas.  Minimal
>    editor does the job. 
>

If I'm correct, the Harvest C product is not entirely complete - the docs 
mention that some support libraries need to be obtained from Apple.  I 
believe that they are freely available via FTP from apple.com.

STAUFFER
From: ksand@apple.com (Kent Sandvik)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Where can I get the Mac Hack Contest CD ?
Date: 7 Sep 92 20:31:13 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple

In article <1992Sep7.093907.3653@sys.uea.ac.uk>, greg@sys.uea.ac.uk (Greg
Newton-Ingham) wrote:
> The subject says it all.

ExpoTech, Inc.
1264 Bedford Rd.
Grosse Pointe Park, MI 48230-1116
313-882-1824, fax: 313-8826-942
ALink: Expotech
Net: Expotech@aol.com
AOL: Expotech

Kent

"I would rather have a thousands idiots attacking my position, than
have one idiot helping to defend it."	[Paraphrased from Voltaire]
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.
Newsgroups: comp.sys.mac.programmer
From: twl@cs.brown.edu (Ted "Theodore" W. Leung)
Subject: AppMaker vs Marksman: Apple Events
Organization: Dept. of Computer Science, Brown University
Distribution: comp
Date: Tue, 8 Sep 1992 17:54:00 GMT

I'm considering purchasing one of AppMaker or Marksman.  I'm
particularly interested in the degree of  Apple Event support provided
by these programs, and whether an educational discount program exists.
Any other details or opinions are welcome.  

Ted
--
--------------------------------------------------------------------
Internet/CSnet: twl@cs.brown.edu 	| Ted "Theodore" Leung
BITNET: twl@BROWNCS.BITNET		| Box 1910, Brown University
UUCP: uunet!brunix!twl			| Providence, RI 02912
Newsgroups: comp.sys.mac.programmer
From: leonardr@netcom.com (Leonard Rosenthol)
Subject: Re: Adding menus to existing applications (a la Thunder)
Date: Sat, 12 Sep 92 21:58:35 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 

In article <BuH8LA.Crq@mentor.cc.purdue.edu> haynes@mace.cc.purdue.edu (Carl W. Haynes III) writes:
>In article <1992Sep12.154540.15753@prism.poly.edu> korfhage@weston.poly.edu writes:
>>  [ asks how to add menus to existing applications ]
>>
>
>I wrote an INIT awhile ago which added a menu to SimAnt (SimAnt Cheater)
>
>What I ended up doing was tail-patching _SetMenuBar and _MenuSelect.
>
>On SetMenuBar, I would check to see if I was dealing with SimAnt and then
>Create a new menu and insert it. The patch for _MenuSelect would simply
>check to see if my menu was selected and respond accordingly.
>I was only worried about making it work with this one application, I don't
>know how generalizable this would be to others.
>
	that's the basic idea, though I would suggest patching _DrawMenuBar
instead of _SetMenuBar, since many apps don't call _SetMenuBar.  Also, if
you are planning any cmdKey equivalents, then you'll need to patch
_menuKey as well.

>If you're only dealing with system 7, I'd suggest looking into how to
>add icon menus, like the help and application menu, to all applications.
>(I think they call them Finder Menus). 
>
	they are called System Menus, since they are owned by the System...
Which brings up a request...PLEASE DO NOT WRITE SYSTEM MENUS!!!  They require
using a slew of undocumented information as well as NOT being guarenteed to
work in the future (at least not the same way).  

-- 
-----------------------------------------------------------------------------
Leonard Rosenthol			Internet: 	leonardr@netcom.com
Director of Advanced Technology		AppleLink:	MACgician
Aladdin Systems, Inc.			GEnie:		MACgician

Newsgroups: comp.sys.mac.programmer
From: bell@teal.csn.org (Bell Scott)
Subject: Re: Need TE for more than 32k
Keywords: TextEdit, 32k restriction, ThinkC 4
Organization: Colorado SuperNet, Inc.
Date: Wed, 9 Sep 1992 05:14:19 GMT

In article <Bu96zn.EAK@immd4.informatik.uni-erlangen.de> tnreinha@cip.informatik.uni-erlangen.de (Tilman Reinhardt) writes:
>Has anybody written a class for the ThinkC application framework
>which does about the same as the CEditText class but is capable of 
>handling more than 32k of chars? Or does anybody know if something 
>like this is on some ftp site somewhere? 
>
>Tilman Reinhardt
>[tnreinha@cip.informatik.uni-erlangen.de]

	I believe there is one included with Think 'C', if not, I'll email
you mine.

Scott R. Bell
From: mxmora@unix.sri.com (Matthew Xavier Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Many Questions about _Launch, but few answers...
Date: 14 Sep 92 22:34:17 GMT
Followup-To: comp.sys.mac.programmer
Organization: SRI International

In article <Sep.14.16.35.56.1992.3303@aramis.rutgers.edu>,
mezrich@aramis.rutgers.edu (Reuben Mezrich) wrote:


>      I think that the _Launch command must be one of the greatest
> mysteries (sp?) of the pre-system 7 toolbox.  Does anybody have any
> idea how to properly use this trap ?  I've have a fair amount of
> success in using it, but have run into the difficulty that, under
> System 6, multifinder does not seem to use it at all.  I've used the
> _Launch command successfully under system 6 running the finder, and
> under system 7, but have had no success under system 6 running multifinder.
> It does launch the application, but it does not behave as it should
> (it clears the screen and closes other background applications).

Its not a great mystery, your just not supposed to use it. 
You probably have the wrong flags set.
  
I have used the version supplied in the technote # 126
"Sublaunching:Playing the shell Game" and it worked for me. Show us your
code and maybe we can see what you are doing wrong. Don't forget the you
need to set both high bits
(Launchflags := $C000000) to sublaunch.

Matt
Newsgroups: comp.sys.mac.programmer
From: resnick@cogsci.uiuc.edu (Pete Resnick)
Subject: Re: EditText items larger than 255 bytes?
Organization: University of Illinois at Urbana
Date: Thu, 10 Sep 1992 21:07:25 GMT

bpb9204@tamsun.tamu.edu (Brent) writes:

>amanda@intercon.com (Amanda Walker) writes:
>|
>|Close.  TextEdit is limited to 32K, which puts a hard limit on the size of an 
>|editable text item.  The key to getting more than 255 characters, however, is 
>|simply to avoid using GetIText & SetIText, but to use GetDItem and SetDItem 
>|directly, copying things into and out of thew handle yourself.

You can't do this!

>If you have a modal dialog box with 4 text areas, that's automatically
>128k of RAM sucked up for 4x255 = 1020 bytes for actualy data (retrieved or
>set via the SetIText/GetIText calls.  If you used the MacOS calls to
>the letter, that's a 1020/128k percent utilization... pretty awful.

No, no, no. RTFM folks. IM I-408:

        Note: Actually, a single edit record is shared by all editText
        items; ...

So, first of all, you can't look in the TextEdit record to see what's
in it because you won't know where in that record the field you want
is stored. Second of all, the hText field of the TextEdit record is a
handle to the text which changes size as you add and delete text. It
is not a static 32K of data.

pr
-- 
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet: resnick@cogsci.uiuc.edu
From: tgl+@cs.cmu.edu (Tom Lane)
Newsgroups: comp.sys.mac.programmer
Subject: Re: JPEG <-> JFIF with QT.
Date: 13 Sep 92 04:48:56 GMT
Article-I.D.: cs.BuI2pL.92z.2
Organization: School of Computer Science, Carnegie Mellon

(Sorry for the slow response ... don't read this group often.)

mackid@engin.umich.edu (Mike Neil) says:
> the data portion that is returned from a
> CompressImage call is in the JFIF format (Someone give the QT guys another
> cookie).  So basically you can read a JFIF file into memory pass it into
> the DecompressImage call (You will need to make a Info block by hand).
> and you will get a decompressed image out.  Very Cool.

I don't recall offhand whether QT makes a true JFIF file (complete with JFIF
marker) or just a "raw JPEG" file.  Either way, though, the information is
compatible with non-Mac JFIF/JPEG programs.  The JFIF marker is considered
optional by most non-Mac decoders; it really just certifies that the file
adheres to the JFIF conventions about colorspace.

> Couldn't find any mention of this in the QT docs so my guess is
> it is an unsupported feature.

I think it's reasonably safe to rely on it --- Apple's chief JPEG engineer
has spent a good deal of time making sure QT is compatible with JFIF-based
decoders :-)

And ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
> Here's one useful piece of information about the JPEG data stream, for those
> (like me) who have never seen a copy of the JPEG spec: if you want to
> determine the size of the image, look for a hex FF byte followed by a hex C0
> byte. Skip the next three bytes, and you will find a 2-byte integer
> containing the number of lines, followed by a 2-byte integer containing the
> number of columns.

Bzzt.  Sorry, but that method is guaranteed to break sooner or later.  If
you want reliable info, you have to parse the JPEG marker sequence, at least
well enough to skip over the arbitrary data that may be inside marker bodies
preceding the SOF marker.

If you don't want to buy a copy of the JPEG standard, at least go read the
free JPEG code available from ftp.uu.net: graphics/jpeg/ ... in particular,
jrdjfif.c will show you how to do this right.  It only takes a few more
lines of code.

				regards, tom lane
Newsgroups: comp.sys.mac.programmer
From: Martin.Friedrich@arbi.informatik.uni-oldenburg.de (Martin Friedrich)
Subject: Problem with Restart/Shutdown and QuitApplicationAE
Organization: University of Oldenburg, Germany
Date: Wed, 9 Sep 1992 13:11:53 GMT

Hi !

I'm writing a program that needs to inform the user at restart or shutdown
to terminate the program manually and prevent the restart or shutdown. When
receiving the QuitApplication Event, the handling routine returns
userCanceledErr, after bringing up a notification to the user.

The first time this works. But when trying to restart repeatedly, nothing
happends. It seems that the Finder doesn't send the AE to my application.
Only when launching another application, the behaviour for the next QA Event
is OK. When trying to restart again, same problem.

Another question: Is there any way to tell wether the Finder send the
QA Event in a restart or shutdown situation?

Thanks in advance
-- 
LLaP
       Martin Friedrich

-----------------------------------------------------------------------------
					     |"I never will understand
REAL      Martin Friedrich   (CS-Student)    | humans ..."
NICK      jupp                               | -- Spock, Patterns of Force
UUCP      friedrich@uniol                    --------------------------------
DOMAIN    Martin.Friedrich@arbi.informatik.uni-oldenburg.de
HOME      Straekweg 1 , 2986 Leezdorf

     Superior abilities breed superior ambitions
-----------------------------------------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: danny@utkux1.utk.edu (Danny W. McCampbell)
Subject: Drawing Icons in Modal Dialogs?
Organization: University of Tennessee
Date: Tue, 8 Sep 1992 17:09:30 GMT

Hi.  I have a modal dialog that I want to draw an ICON resource
in.  The problem I have is I am getting the resource from an
ICN# resource.  How can I draw this ICN# resource as an ICON
resource into a Modal Dialog?  Any ideas would be greatly appreciated.
Thanks in advance.

Danny
danny@utkux1.utk.edu
Newsgroups: comp.sys.mac.programmer
From: vito@well.sf.ca.us (Andris Paul Vitols)
Subject: Idea for New Program
Organization: Whole Earth 'Lectronic Link
Date: Tue, 15 Sep 1992 04:33:45 GMT


Dear Mac Programming Wizards:

I think it is a little bit of a pain to go up to the
little "Computer Icon" in the far right of the menu bar
to switch to different applications.

I'd like to see a shareware program that creates a floating
pallete of icons that represent the currently running
applications.  I would like this pallete to have these 2
preferences options: 1.) User can pick what size icons
are in the pallete (Small Icon or Large Icon.) 2.) User can
have the floating pallete always be the front-most window.

The user can then have this floating pallete easily accessible
and simply double click on the icon for the program they want
to switch to.

Can anyone do this?