HDTenEightyP/NetNews huggingface dataset:
From: Mike Alexander <Mike.Alexander@umich.edu>
Subject: Re: Reading Serial GPi line
Date: Sat, 29 Aug 92 15:23:30 EDT
Organization: University of Michigan, ITD-Research Systems
X-Useragent: Nuntius v1.1.1d9
X-Xxmessage-Id: <A6C5467B76042103@via.dsf4.merit.edu>
X-Xxdate: Sat, 29 Aug 92 20:21:31 GMT

In article <BtC4q0.tC@iat.holonet.net> Allen J. Curtis,
ajcurtis@iat.holonet.net writes:
>	I am interfacing a piece of hardware to the MAC via the serial
>port.  The hardware communicates back to the computer via the GPi
line.
>
>According the the documentation in the Hardware Technical reference
manual
>this line is connected to Data Carrier Detect (DCD) and can be polled
with
>software.  However, I can not find the method of polling this field
in any
>of the documentation or the header files which define the serial
status
>information.  

See Tech Note 286.  It goes into this subject in fair detail. 
Although I haven't actually had to do this, it doesn't look too hard,
especially if all you want to do is read the value of GPi.

Mike Alexander              Internet:       Mike.Alexander@umich.edu
University of Michigan      America Online: MAlexander
ITD - Research Systems      AppleLink:      UMICH
Newsgroups: comp.sys.mac.programmer
From: zaphod@bluemoon.rn.com (Peter Bierman)
Subject: Re: Hermes external in C
Organization: Blue Moon BBS ((614) 868-998[024])
Date: Tue, 01 Sep 92 00:07:35 EDT

Mary.Hicks@p0.f222.n125.z1.FIDONET.ORG (Mary Hicks) writes:

> I would like to make an external for hermes, just as an example, but I 
> dont understand how. I read the Hermes Interface file, but I still need 
> help. I currently know how to program in C, but I cant make an external.

Well, first, get the HermHeaders in Pascal. The HEI file has some 
examples, namely the phone external, that pretty much does what you asked.

The basic idea is that your external keeps a block in the heap with 
variables. When you get called, you check a variable to see where you were 
in your external, then you do a BIG case statement to get there. When you 
finish one "stage" you update the stage variable to the next part of the 
external to be called, and then go back to Hermes. Hermes should then do 
some stuff, and call you again, and the cycle goes on.

It's pretty simple actually, just takes a little getting used to. Partly 
because for a Mac programer, it's wierd to work in modes.


---
The opinions I express are rarely my own, because my own are far too
outragous to post here.

IntNet:zaphod@bluemoon.rn.com    FutureNet: #33@#10
The Metropolis (614)-846-1911
---
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Shareware Legality - Summary
Date: 4 Sep 92 16:02:37 GMT
Followup-To: comp.sys.mac.programmer
Distribution: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <MHALL.92Sep2151855@occs.cs.oberlin.edu>,
mhall@occs.cs.oberlin.edu (Matthew Hall) wrote:
> 
> Finally- Register your program with the library of congress.  The
> person posting this suggestion, however, did not say explicitly how to
> do this.  Perhaps someone could post instructions.
> 

Just for background:  your copyright "declaration" is what you put on your
startup screen, etc., that says "Copyright 1992, Charles A. Hoffman.  All
rights reserved."  Your copyright "registration" is what you request from
the Library of Congress.  You are registering your copyright of your
program, you are not registering the program itself.

To register your copyright, call the Library of Congress at (202)707-9100
and request Form TX and instructions.  This is for copyrighting your source
code, which is treated as text.  Form PA is for works of art, in case you
want to copyright background pictures, etc.  I never have.

When you get the form, use the instructions to fill it out, and send it
back in with two copies of your source, and $20.  It's twenty, even though
some of the forms still say $10.  Some people say only one is required, but
that is for "hardship" which is more trouble than to just get a second copy
of the source.  Also some say only the first and last 50 pages, but that's
an old rule applying to OBJECT code, and I don't think it ever applied to
source.

In one to three months, you will receive back your registration form, with
the registration number stamped on it.

Questions about copyrights should be referred to an attorney, of course. 
The Library of Congress also maintains another number which has prerecorded
answers to common questions about copyrights.  It is (202)707-3000.

P.S.  Once you get a Form TX, you can copy it freely (holds down their
cost, they say).  It's not copyrighted!

Chuck Hoffman
chuck@gte.com
GTE Laboratories, Waltham, Massachusetts, USA
(617) 466-2131
=====================================
I'm not sure why we're here, but I am sure that while we're here we're
supposed to help each other.
=====================================
From: landwebe@math.rutgers.edu (Peter Landweber)
Newsgroups: comp.sys.mac.programmer
Subject: Latest ShowINIT
Date: 4 Sep 92 06:28:14 GMT
Organization: Rutgers Univ., New Brunswick, N.J.

What is the latest version of ShowINIT, and where can I get it?
I've heard that it does ICN#/icl4/icl8 families and that it does
multiple rows of icons.  Thanks for your help.

-- Greg Landweber (landwebe@math.rutgers.edu)
From: poon@parc.xerox.com (Alex Poon)
Newsgroups: comp.sys.mac.programmer
Subject: associating a TDialogBehavior with a window in ViewEdit.
Date: 26 Aug 92 22:17:30 GMT
Organization: Xerox PARC

According to my MacApp 3.0 manual,

"To make a dialog window modal, you need to associate a TDialogBehavior
object with it, which you can do with ViewEdit."

Does anybody know how to do this?

Thanks,
 Alex Poon
Newsgroups: comp.sys.mac.programmer
From: jbush@magnus.acs.ohio-state.edu (J Eric Bush)
Subject: Re: multifinder switching
Organization: The Ohio State University
Date: Fri, 4 Sep 1992 07:28:37 GMT


{ Code deleted from original post }

To get your program ro recognize other windows, you might need to add
this to your HandleMouse routine:

 case inSysWindow:
      SystemClick(&gTheEvent, whichWindow);
      break;

 case inContent:
      if whichWindow <> FrontWindow then
         SelectWindow(whichWindow);

Note: the inContent code is in Pascal format, you may need to change it
      some to work in C.

The multifinder gets its activity time from your application if it is the
front application.  I would suggest looking at the setting of your sleep
variable.  It should be around 60.
-- 
------------------------------------------------------------------------------
J. Eric Bush
Internet: jbush@magnus.acs.ohio-state.edu
Newsgroups: comp.sys.mac.programmer
From: Michael Brennan <mikeb@sam.amgen.com>
Subject: Re: Internet mail from the Macintosh
Organization: Amgen
X-Useragent: Nuntius v1.1
Date: Wed, 2 Sep 1992 21:54:46 GMT

In article <71607@apple.Apple.COM> Mark Lanett, mlanett@Apple.COM writes:
>I'm trying to figure out a way, using MacTCP hopefully, to send mail
from a
>Macintosh application. Note that I do not wish to read mail, just send
it.

Issue 6 of Develop talks about programming with MacTCP.  The source
included with the article (which includes source for NewsWatcher)
provides several high-level easy-to-use libraries, including one for
SMTP.  You may wish to check it out.
From: Julian Fletcher
Newsgroups: comp.sys.mac.programmer
Subject: How stable is TCL ?
Date: 27 Aug 92 15:45:09 GMT
Reply-To: jflet@dir.mcc.ac.uk
Organization: Manchester University


How stable is TCL ?

I've seen occasional comments on the net mentioning occasional
'features' found in the TCL.

Can somebody with experience in developing projects with TCL in
pascal / c summarise on the quality / stability of the objects.
I'm about to start using TCL and would like some forewarning of 
potential problems.

I've got TCL release 1.1, but I've heard later versions are in existance,
where are upgrades available from ?

regards,

Julian
Newsgroups: comp.sys.mac.programmer
From: peter@cujo.curtin.edu.au (Peter N Lewis)
Subject: TN 306 GetIconSuite glue fatal error
Followup-To: comp.sys.mac.programmer
Organization: NCRPDA, Curtin University
Date: Wed, 2 Sep 1992 04:30:46 GMT

Hi All,

I just came across this in TN 306:

In the body:

Function GetIconSuite(	Var theSuite: Handle; theID:Integer;
		theSelector:Longint):OSErr;

In the interface:

FUNCTION GetIconSuite(VAR theIconSuite: Handle;theResID: INTEGER;
	selector: Integer): OSErr;	INLINE	$303C, $0501, $ABC9;

pascal OSErr GetIconSuite(Handle *theIconSuite,short theResID,short
selector)= {0x303C, 0x0501, 0xABC9};	

Now, look carefully at the selector ... oooops!

Its suppose to be a LongInt/long, not an integer/short!  The same most
probabbly applies to ForEachIconDo's selector but I haven't checked it. 
Its clear it has to be a long, since the svAllMiniData constant that can be
passed is $00FF0000, certainly not a short value...

You have been warned,
   Peter.

_______________________________________________________________________
Peter N Lewis, NCRPDA, Curtin University       peter@cujo.curtin.edu.au
GPO Box U1987, Perth WA 6001, AUSTRALIA             FAX: +61 9 367 8141
From: tlspurli@athena.mit.edu (Terry Spurling)
Newsgroups: comp.sys.mac.programmer
Subject: Q: Special Menu in ResEdit?
Date: 2 Sep 92 15:37:34 GMT
Distribution: usa
Organization: Massachusetts Institute of Technology

Is it possible to use ResEdit to Edit the Macintosh Special Menu so that
The Empty Trash Item has a Command key.

I looked in the Finder and System files and couldn't find the MENU resource 
for it.


-terry spurling
From: rc05@gte.com (Ramesh Chandak)
Newsgroups: comp.sys.mac.programmer
Subject: AppMaker / Think C / PICT objects
Date: 29 Aug 92 06:11:51 GMT
Organization: GTE Laboratories Incorporated, Waltham MA

Got another question : I'm using AppMaker to generate the interface.
Later, I have to incorporate PICT files into the application.  What's the
best way to do this ? Is there any public domain THINK C code that will
let me do it easily ?  any pointers / references / suggestions will be
highly appreciated.  Thank you.

- Ramesh
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Comparing strings 'n stuff...
Date: 28 Aug 92 16:42:01 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <1992Aug28.134804.9876@sun1x.actc.res.utc.com>,
rer@utrcv1.res.utc.com (Rick E Romkey) wrote:
> 
> 
> I am trying to compare a Str255 with a String which exists
> in my resource file.  I have loaded it in, but I am at a loss
> as to what to do to compare these two strings to see if they
> are equivalent.
> 

If you are using THINK C, there are two routines for converting between
strings of Pascal format (with length byte at the beginning) and C format
(with null character at the end).  They are "PtoCstr" and "CtoPstr".  If
you get both strings into C format, then you can use the C library routine
"strncmp" to compare them, even if they are of dissimilar length.

Chuck Hoffman
chuck@gte.com
GTE Laboratories, Waltham, Massachusetts, USA
(617) 466-2131
=====================================
I'm not sure why we're here, but I am sure that while we're here we're
supposed to help each other.
=====================================
From: bowman@reed.edu (Eric Bowman (bobo))
Newsgroups: comp.sys.mac.programmer
Subject: Re: MacApp 3.0 upgrade
Date: 26 Aug 92 04:32:31 GMT
Article-I.D.: reed.1992Aug26.043231.15774
Organization: Reed College, Portland, OR

In article <BtKo56.Kz8@well.sf.ca.us> fgiraffe@well.sf.ca.us (Frank Giraffe) writes:
>
>>In the requirement it's mentioned  that I need 16 meg of RAM
>>I hope this is an error...
>Nope, no error. Since MacApp 3 is written in C++, and C++ needs more memory
>than Pascal, 16M is a good configuration. If you dont do -SYM builds, you
>can get by on less.

Well, I'm getting by with 8 megs of ram and 7 more megs virtual.  It's a bit
slow, though, for those -sym builds.

bobo
bowman@reed.edu
From: Bathsheba.Grossman@bbs.oit.unc.edu (Bathsheba Grossman)
Newsgroups: comp.sys.mac.programmer
Subject: Basic prog help
Date: 24 Aug 92 03:35:09 GMT
Organization: Extended Bulletin Board Service

I'm writing my first commercial app, but my boss doesn't know that.  It's way
bigger than anything I've done before, and it's developed some
nonrepeatable memory-flying-around kinds of bugs.  (Eg, big hash-table of
structs, and at random times a few bits of one struct get blasted.)  Not to
mention the occasional bomb for no apparent reason.

Also, I'm having a great deal of trouble handling low-memory conditions.
I check all NewHandle and SetHandleSize's, (and GetResources
and NewRgns, &ct, too) and always keep an emergency slushpile big
enough to display my error dialog (60K), but sometimes it still bombs or
freezes, not very repeatably.

Could some sage of programming give me a few strategy tips for dealing
with these sorts of things?  I don't have the right kind of degree, so my
grasp of the conventional wisdom in these matters is weak.

Also, is there something I can read so as to better understand the use of
MacsBug?  I have a nodding acquaintance with assembler, but either it's not
enough or I'm missing the point.  For instance, can I get it to break
when a certain memory location changes value?

Email me at 	sheba@mohlsun.physics.upenn.edu
or post here - I read this group religiously.

Thanks,
Sheba
--
   The opinions expressed are not necessarily those of the University of
     North Carolina at Chapel Hill, the Campus Office for Information
        Technology, or the Experimental Bulletin Board Service.
           internet:  bbs.oit.unc.edu or 152.2.22.80
From: jgreene@Bonnie.ICS.UCI.EDU (Kevin Greene)
Subject: Get Value in PixMap?
Newsgroups: comp.sys.mac.programmer
Date: 26 Aug 92 03:56:52 GMT

What is the best way to get the value of a pixel in a pixmap?  I do not
have IM6, but as far as I know there is no ROM call to do it (only
for B&W).  I suppose I'd prefer a ROM call for future upgrades or whatever,
but any other way would be acceptable.
Email if possible.
Thanks.
Kevin
From: kjiy@vax5.cit.cornell.edu
Newsgroups: comp.sys.mac.programmer
Subject: External file system access?
Date: 27 Aug 92 00:23:47 EDT
Distribution: comp
Organization: Cornell University

Does anyone know where I could find documentation on
how to mount disks from a non-Macintosh file system on
the Finder desktop?  Also, where could I find information
discussing the way AppleShare volumes are mounted?

Thanks,

Dave
Newsgroups: comp.sys.mac.programmer
From: jbush@magnus.acs.ohio-state.edu (J Eric Bush)
Subject: Re: Help with binhex
Organization: The Ohio State University
Distribution: na
Date: Sat, 29 Aug 1992 23:49:07 GMT

In article <1992Aug28.195516.1996@hou.amoco.com> zawr02@hou.amoco.com writes:
>Hello Mac gurus.  This may be the idiot question of the day.  I am a novice at
>MacIntosh, having aquired a brand-new second-hand SE/30.  (I am experienced
>with systems like Sun workstations and IBM mainframes.)  I have pulled several
>files from ftp sites that have the extension .hqx.  I assume that means they h
ave
>been compressed with binhex.  My question is what software is required to
>debinhex the files?  Does the software come with System7?  Is it something I 
>need to buy from Apple?  Do I need to get the software via ftp?  If it is the 
last
>case, will it come compressed with binhex? ;-)
>
>Thanks in advance for the enlightment.
>---
>
I will email a uuencoded version of BinHex 4.0 to you.  You can use it to
get Stuffit-Lite or Compact Pro which are available at sumex-aim.stanford.edu
ftp site which are the two major compaction programs used.

Hope this helps,
Eric
-- 
------------------------------------------------------------------------------
J. Eric Bush
Internet: jbush@magnus.acs.ohio-state.edu
Newsgroups: comp.sys.mac.programmer
From: omh@cs.brown.edu (Owen M. Hartnett)
Subject: Re: Is "Programmers Online Companion" going to be updated?
Organization: Brown University Department of Computer Science
Date: Mon, 24 Aug 1992 03:04:58 GMT

In article <mxmora-210892142616@css-mac1.sri.com> mxmora@unix.sri.com (Matthew Xavier Mora) writes:
>Subject says it all. Is the POLC ever going to be updated in my life time?
>(how longs is my life time? who knows?)
>
>Did Addison-Wesley abandon it?

Why wait????

Hey, kids, let's do it ourselves!!!  (Boy I feel like Micky Rooney! Is
Judy Garland far behind?)

Obligatory seriousness: IMHO, the missing things in POLC are, in order of
most significant problems:

1) NO IM VI
2) No Misc changes from the technotes and other sources (and bugs in POLC
	original)
3) No C

Why we should think about this:

1) POLC is user definable
2) POLC works really good and gives me what I really need

So, my suggestion is - we determine a suitable diff method so that
updates to TextBase camn be duplicated by others, then a bunch of
us volunteer to grab a chapter or two or three of Volume VI (not that
hard really to do only a couple of chapters) and we fix it ourselves.

This fixes 1) above and any part of 2) that people think about, but it
will get done and we'll establish a mechanism, that, if this project
works as good as we think, we'll tackle 2) and 3).

I'll stick my neck out and try to be the official coordinator for this
project (the results of which we'll post for the general public), so,
who wants to tackle a chapter or two??

-Owen


Owen Hartnett				omh@cs.brown.edu
"FAITH, n. Belief without evidence in what is told by one who speaks
		without knowledge, of things without parallel."
			-Ambrose Bierce - The Devil's Dictionary
Newsgroups: comp.sys.mac.programmer
From: Michael Hecht <Michael_Hecht@mac.sas.com>
Subject: Re: incrementation differences/THINK C 4.0 vs. 5.0
X-Useragent: Nuntius v1.1.1d9
Date: Tue, 25 Aug 1992 20:05:08 GMT
X-Xxdate: Tue, 25 Aug 92 21:05:40 GMT
X-Xxmessage-Id: <A6C00AD44801050A@studly.mac.sas.com>
Organization: SAS Institute Inc.

In article <1992Aug25.174228.17601@natinst.com> Stepan Riha,
stepan@natinst.com writes:
>>|>nxtWrd(char **theDataPtr, char *lab, int  tabs)
[...]
>
>>[It seems that]
>>once theDataPtr is dereferenced and copied into temp, this leaves him
>>open to the great disappearing memory trick...

You're all assuming that theDataPtr is a Handle. It may just be a pointer
that was passed by reference (as its name implies), in which case the
point is moot.

--Michael

PS: I hear that in C++ you can better express "pass by reference," which
would help with this sort of confusion.
Something like "Ptr &theDataPtr"?

=======================================================================
Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
From: ksand@apple.com (Kent Sandvik)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How to increase stack size ???
Date: 2 Sep 92 00:31:07 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple

In article <1992Sep1.145611.1@uwovax.uwo.ca>, tschneid@uwovax.uwo.ca wrote:
> 
> 
> I am working on a port of Gunplot 3.2 to the Mac. So far I have most
> of the basics working (only a few bugs left) ... however, I keep
> running out of stack space. I did some reading and found out that the
> Mac only provides 8k of stack space and that it can be changed by doing
> something like (in VERY rough C pseudo-code)

MacII ROMs: 24k
Old Macs (Plus, SEs): 8k
Color QuickDraw systems: 24k
MacApp applications (24k by default).

> 
>         THz newapplimit;
> 
>         newapplimit = 300*1024;    /* give app 300k */
>         SetApplLimit(ApplLimit()+newapplimit);
>         MaxApplLimit();
> 
> Unfortunately, this does not work ...

In what way, collision of stack and heap (more memory required then)?
Other problems?

Kent Sandvik/DTS
Newsgroups: comp.sys.mac.programmer
From: baer@qiclab.scn.rain.com (Ken Baer)
Subject: How do I keep small tools windows in front of Big work windows?
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
Date: Sun, 30 Aug 1992 00:05:11 GMT

Here's the situation: my application has a large work area, with a fixed
tools window above it, and several other tools windows that are draggable
and sizable that are non-modal and pop up over the main window.  The user
frequently will click on the tools windows and the main work area (similar
to a paint program).  My problem is that when you click on the larger window
it pops to the front and covers up the other windows.  Since the Windows
Manager talks directly to the Toolbox Manager, how can I intercept the 
ActivateWindow() my mouseclick generates?  What I want to do is exactly
what Studio8 or PhotoShop do when their tools windows are always in the
front.  BTW, I always open the tools windows after the main window.  Also,
I would prefer not to have to redraw the tools windows everytime I click
in the main window.  

Any hints and code examples will be greatly appreciated.
	-Ken Baer.
	baer@qiclab.scn.rain.com
-- 
    //    -Ken Baer.  Programmer/Animator, Hash Enterprises
  \X/     Usenet: baer@qiclab.UUCP  /  Office: (206)573-9427
          "Hey, I think a glacier just passed us!" - Andy from Joyride
Organization: Queen's University at Kingston
Date: Tuesday, 25 Aug 1992 19:48:08 EDT
From: <CHARLESW@QUCDN.QueensU.CA>
Newsgroups: comp.sys.mac.programmer
Subject: Re: Modal Dialog Filter help/AFP login
Distribution: usa

Re: password hiding

There was also an article in MacTutor a while ago ("July/91 MacTutor, p74" my
trusty reference says...).

.../dave   Dave Charlesworth
Xref: sparky comp.sys.mac.programmer:14687 comp.sys.mac.system:11381
From: jeremyr@dcs.qmw.ac.uk (Jeremy Roussak)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
Subject: Re: Color Icons
Keywords: coloricon
Date: 28 Aug 92 19:56:51 GMT
Organization: Computer Science Dept, QMW, University of London

In <1992Aug26.233800.21347@sagpd1> bberqu@sagpd1 writes:

>I'm trying to use ModalDialog with a filterProc function which will
>handle popupmenus,  when I call ModalDialog and just let it sit there
>no mouse movement or anything, after a while, I get, I believe a system
>error #26 according to MacsBug, all my filter proc function does is
>return (TRUE), I've also tried FALSE.

1. You are programming in C
2. You have forgotten to declare your filterproc as "pascal"
3. The error is really 28

Just a wild guess...

Jeremy
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.comm
From: satish@ldgo.columbia.edu (Satish Paranjpe)
Subject: Serial Port Question
Organization: Lamont-Doherty Geological Observatory
Date: Tue, 25 Aug 1992 19:44:23 GMT

HI netters,
  
This might seem like a silly question, but I Am new to the Mac world
and having some problems...

Here is the scenario...

   __________               __________
  |          |             |          |
  |          |             |          |
  |          |             |          |
  |    A     |<--------->  |    B     |<---------> serial port
  |          |             |          |            "TEST DATA"
  |          |             |          |
  |__________|             |_________ |


B is a process (application) launched by A .. 
I have no problems exchanging messages between A and B using
PPCtoolbox. What I want to do is after B gets a command (say) from A
it will go and get read the data from the port, store it in a buffer
and pass it to A. I am having problems making B read the data from the
port. It only works if B is left  running continiously reading the
port!! My question is Does B have to be running continiously or can i
get around that somehow ?

I hope I have made it clear..

I am using Mac IIsi (system 7.0.x), Think C

Please respond by e-mail, any pointers to some code or sample code is
greatly appreciated..
Thanks a lot.
Satish



Xref: sparky comp.sys.mac.programmer:14751 comp.sys.mac.hardware:16167 alt.cd-rom:2841