HDTenEightyP/NetNews huggingface dataset:
From: thomas@camino.mic.cl (Thomas Fruin)
Newsgroups: comp.sys.mac.programmer
Subject: DECnet packets via ARA getting truncated!?
Organization: El Camino
Reply-To: Thomas Fruin <thomas@camino.mic.cl>
Distribution: world
X-Mailer: uAccess - Macintosh Release: 1.5v4
Date: Mon, 28 Dec 1992 15:25:29 CST

During my current programming proyect, I've run into a peculiar (and
unpleasant) bug, and I need some help from some real communications gurus.

In my application, I'm using the Communications Toolbox and the Pathworks
DECnet tool to communicate with a VAX. Works fine, no problem whatsoever.
[ Digressing, I would like to say the CTB has worked flawlessly, I don't
agree with some of the harsh comments that have been made here - unless my
bug turns out to be a CTB bug of course :) ]

That is, all works fine when my program runs on a machine (Quadra 950)
connected via Ethernet. This means DECnet is configured to use the
Ethernet hardware directly.

However, most of my programming I do at home, and I dial into the
client's network with AppleTalk Remote Access, and get to the host
through a Fastpath on the clients net. This means that DECnet on my
home machine (Quadra 700) is configured to use AppleTalk.

My application receives DECnet packets which are always approximately
1024 bytes in size. My protocol specifies that if there is no more
data in a packet, it should be padded with spaces until the end.

Now here's the weird problem: ONLY when I connect remotely, DECnet
packets get filled with spaces near the end, overwriting part of the
information in the packet. The size of the packet is perfect, except
that the information in it gets overwritten. This problem does not
occur if I connect locally using Ethernet.

Giving a rough estimate, I think spaces get written starting at about
2/3 of the packet. That should be after about 600 to 700 bytes.

Soooo... what is happening? Could it be that when DECnet is used via
AppleTalk (LocalTalk or ARA) there is a limit on the size of a DECnet
packet? A limit that does not exist when you are using Ethernet hardware?
It's strange, because I'm not getting any error codes.

Who tell me what is going on?

-- Thomas Fruin

   GroupWare Ltda
   Temuco Office
   CHILE

   thomas@camino.mic.cl
From: nasman@lclark.edu (Keith Nasman)
Newsgroups: comp.sys.mac.programmer
Subject: Q:Files and Linked Lists
Date: 30 Dec 92 03:55:22 GMT
Article-I.D.: lclark.1992Dec30.035522.4273
Distribution: usa
Organization: Lewis & Clark College, Portland OR


A newbie here :-)

I am writing a program that needs to store a linked list to disk. I need
to know which format is the best for storing a linked list on the disk.
Would I just write the fields to the file tab delimited and then read
them into the list when I start up the program again? Is there any way 
to store the actual linked list to the disk?

I know these are broad questions with no one line answers (typical of a
beginner huh? :)  Any guidance would be great.

thanks!
-Keith
"I'm in over my head....but aren't we all :-P"
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Assembly??
Date: 22 Dec 92 19:34:37 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <1992Dec18.193622.81056@uu0570.foggybottom.com>,
Patrick_J._Toole@uu0570.foggybottom.com wrote:
> 
> I am just now getting into assembly, but it seems "locked" I can't find any
> good references, or know any.Would someone point me in the right direction?
> 
> -Pat
> Foggy Bottom - your FirstClass Mac connection in Washington, DC

"High-Level Programmer's Guide to the 68000" by Francis G. McCabe, Prentice
Hall, 1992, ISBN 0-13-388034-6.

It's for people who already are programmers.

You also probably should have:

"Programmer's Reference Manual" by Motorola, part number M68000PM/AD.

I don't know their ordering info, but they do have a fax number for the
68000 family documents.  It is (512) 891-8593.  Fax them a request for
ordering info.

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.
=====================================
Newsgroups: comp.sys.mac.programmer
From: siegel@world.std.com (Rich Siegel)
Subject: Re: Licensing and the rights of programming environments...
Organization: GCC Technologies
Distribution: na
Date: Sat, 2 Jan 1993 21:54:27 GMT

In article <1993Jan2.181136.18003@cc.umontreal.ca> parej@JSP.UMontreal.CA (Pare Jerome) writes:
>Hi to all of you and a happy new year!
>
>I have a question regarding the rights you have when programming in an
>environment (Think C and Pascal, MPW, and the others...):
>Can you commercially program "right out the box" and sell your programs
>commercially or do you need to get extra licensing to distribute your
>products (from Think, Apple, and other makers...)?

With THINK C and THINK Pascal, the software license gives you permission
to use the libraries in your programs without additional licensing. This
includes programs that use the THINK Class Library. MPW also allows you
to use their runtime libraries, but there is additional licensing 
required to use MacApp.

R.


-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Senior Software Engineer
GCC Technologies
Newsgroups: comp.sys.mac.programmer
From: greg@zaphod.uchicago.edu (Greg Kuperberg)
Subject: How do I learn the "Window Color"?
Organization: Dept. of Mathematics, U. of Chicago
Date: Thu, 24 Dec 1992 04:07:54 GMT

I would like to design my own window frame and now that I am a
System 7 user I see that there is a system color for all standard
windows.  How do I learn it?  I can apparently change it with
the Color Manager.  What bits does it twiddle to do its thing?

No doubt the answer is buried somewhere in Inside Macintosh.
Maybe it would even be obvious if I looked in the new version.
As it stands though I can't seem to find the answer so I'll
take the lazy approach of posting to the net.

Please send a copy of your reply by mail.  Thanks.
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Newsgroups: comp.sys.mac.programmer
Subject: C.S.M.P. Digest V1 #225 Available
Date: 21 Dec 92 14:28:54 GMT
Article-I.D.: cs.1992Dec21.142854.13810
Followup-To: poster
Organization: University of Oregon Computer and Information Sciences Dept.


C.S.M.P. Digest             Mon, 21 Dec 92       Volume 1 : Issue 225

Today's Topics:

	Help! making an assembly routine faster



The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.

The digest is a collection of article threads from the internet newsgroup
comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
regularly and want an archive of the discussions.  If you don't know what a
newsgroup is, you probably don't have access to it.  Ask your systems
administrator(s) for details.  You can post articles to any newsgroup by
mailing your article to newsgroup@ucbvax.berkeley.edu.  So, to post an
article to comp.sys.mac.programmer, you mail it to
comp-sys-mac-programmer@ucbvax.berkeley.edu.  Note the '-' instead of '.'
in the newsgroup name.

Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject.  The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
cs.uoregon.edu).  Article threads are not added to the digest until the last
article added to the thread is at least one month old (this is to ensure that
the thread is dead before adding it to the digest).  Article threads that
consist of only one message are generally not included in the digest.

The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
[128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
file /pub/mac/csmp-digest/README before downloading any files.  The most
recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
archive has a mail server; send a message with the text '$MACarch help' (no
quotes) to LISTSERV@ricevm1.rice.edu for more information.

The digest is also available via email.  Just send a note saying that you
want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
automatically receive each new issue as it is created.  Sorry, back issues
are not available through the mailing list.

Send administrative mail to mkelly@cs.uoregon.edu.


-- 
_____________________________________________________________________________
Michael A. Kelly                                               Senior Partner
mkelly@cs.uoregon.edu                                      High Risk Ventures
_____________________________________________________________________________
From: absurd@apple.apple.com (Tim Dierks, software saboteur)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Problem with patch to HFSDispatch
Date: 23 Dec 92 03:10:35 GMT
Followup-To: comp.sys.mac.programmer
Organization: MacDTS Marauders

In article <1992Dec22.182710.26751@panix.com>, rmah@panix.com (Robert Mah)
wrote:
> 
> In an extension that works fine on most systems, but some people seem to 
> be getting freezes when they shut down/restart their machine.  I'm not 
> sure, but I think it might be related to my patching HFSDispatch.
> 
> I'm using register a1 to hold the adress of the real trap -- is there
> something wrong with this?  Anyone care to comment?
> 
> Some code...
> 
> /* 
>  *  We need to trap whenever the user moves a directory (selector 5).
>  */
> pascal void FSDispatchPatch()
> {
>     asm{
>         movem.l  a4, -(sp)                 ; save registers
>         lea      main, a4                  ; setup globals
>         cmp.w    #5, d0                    ; if not CatMove
>         bne.s    @1 
>         move.w   #1, gNeedsUpdate          ; set the gNeedsUpdate flag
> @1      move.l   realHFSDispatchTrap, a1   ; grab the addr of the real thing
>         movem.l  (sp)+, a4                 ; restore registers
>         jmp      (a1)                      ; jump to real HFSDispatch
>     }
> }

Your problem is that you're destroying A1; it's used as a parameter by
some HFSDispatch selectors.

While you could do this by trashing a different register, which isn't
used, you could always use the slightly more complex but somewhat more
clever method.

          clr.l    -(sp)                     ; save room for forwarding
address   
>         movem.l  a4, -(sp)                 ; save registers
>         lea      main, a4                  ; setup globals
>         cmp.w    #5, d0                    ; if not CatMove
>         bne.s    @1 
>         move.w   #1, gNeedsUpdate          ; set the gNeedsUpdate flag
  @1      move.l   realHFSDispatchTrap,4(a7) ; store forwarding address on
stack
>         movem.l  (sp)+, a4                 ; restore registers
          rts                                ; jump to real HFSDispatch

Note that this preserves all the registers by using the trick of using
an RTS to pop the jump address off of the stack, allowing you to restore
all your registers first.

(Well, I always thought it was neat, anyway.)

Have a great holiday, one and all- I'm off to home till Jan 6; I'll
be gone (netwise) till then.

Tim Dierks
MacDTS pinball addict
From: absurd@apple.apple.com (Tim Dierks, software saboteur)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Puzzled: Serial PowerBook I/O
Date: 4 Jan 93 00:06:59 GMT
Followup-To: comp.sys.mac.programmer
Organization: MacDTS Marauders

In article <zzT=-a#@engin.umich.edu>, Gavin Eadie <Gavin@UMich.EDU> wrote:
> Friends ... I'm puzzled.  The following complete ThinkC program runs to
> completion on several Macs I've tried (II, IIci, Q-700 and Q-900) but
> fails to complete on PowerBooks (170 and 145).  It's got to be something
> simple (or maybe not) -- can you help?

Here's an interesting theory I've heard. (Note: conjecture follows)
When you open up the serial ports, by default hardware handshaking is
on.  In many serial communication setups, the hardware handshake in line
(HSKi) is not connected to anything, often because the cable being used
doesn't have a wire for it.  On desktop Macs, this pin tends to float
to the "OK-to-send" state when unconnected; on portable Macs, this pin
tens to float to the "Don't-send-now" state.  Thus, simple programs
which do not turn hardware handshaking off can work on desktop Macs
and fail on PowerBooks.  Solutions:
    1) Properly configure hardware handshaking as described in Inside
       Mac IV.  (Note; you should use the serHShk control call, not
       the method described in Inside Mac II, and make the call to
       the output driver.)
    2) Make sure your cable supports hardware handshaking and that
       the computer on the other end of the wire has it properly
       configured.
Although I know a number of people have fixed this kind of problem
by doing 1) or 2), this is all only a guess.  Your mileage may
vary.  The canonical sample for how to manipulate the serial ports
is SerDemo by Craig Prouse; it's available on the developer CD; I
can't find it on ftp.apple.com right now, so I'll mail it out if
you want to ask for it.

Tim Dierks
MacDTS, but I speak for myself
Newsgroups: comp.sys.mac.programmer
From: rjr@titan.ucc.umass.edu (Richard J. Resnick)
Subject: Re: Beginner's Hierarchical Menu Problem
Organization: University of Massachusetts, Amherst
Date: Mon, 21 Dec 1992 12:10:05 GMT

Hello again, I am the original poster of this problem. Here is the
code again, to refresh anyone's memory who cares to be refreshed:

 
 (*Loads up the Desk Accesories in the Apple Menu*)
   aMenu := GetMHandle(APPLE_MENU_ID);
   AddResMenu(aMenu, 'DRVR');
 
 (*Tries to load up the Fonts in the FONT_MENU*)
   aMenu := GetMHandle(FONT_MENU_ID);
   InsertMenu(aMenu, -1);
   AddResMenu(aMenu, 'FONT');
 
 The error that I get when I run this under Think Pascal is "Think
 Pascal unexpectedly quit", and when I build the application and run
 it, I get a missing coprocessor error.

 I'v tried to change the number of the FONT resource to > 128, and
that didn't help. I tried to trace the problem, and it dies right at
AddResMenu(aMenu, 'FONT').

 Could this problem stem off of the fact that my mac can't find the
FONTs? I don't have a suitcase, it is all stored in the System. Any
ideas you all might have would be greatly appreciated.

 Oh yeah, in case this is your first time reading about this, I am
using a Classic 4/40, no additional features of any sort whatsoever.

Thanks in advance.

Richard Resnick
From: brunner@crchh447.bnr.ca (James Brunner)
Newsgroups: comp.sys.mac.programmer
Subject: HELP-DIALOG anyone?
Date: 22 Dec 92 22:17:14 GMT
Reply-To: brunner@crchh447.bnr.ca (James Brunner)
Organization: Bell-Northern Research, Richardson, Tx

Greetings, is source available for an off-the-shelf help dialog?  I need to
add a help dialog into my app and was wondering if there's one out there.
No reason to re-invent the wheel.

It would be nice if it allowed scrollable text and great if it had one of 
those nifty pop-up menu's at the top to allow the user to jump to different
sections.  Oh, by the way, I don't plan on selling my app, so it would be
nice if the code was free.

Please respond by e-mail (brunner@bnr.ca).  Thanks.
-- 
---------------------------------------------------------------------------
Jim Brunner - (brunner@bnr.ca)
All opinions are my own and have nothing whatsoever to do with BNR, NT,
NTI, Bell Canada, or any of the BCE corporations or affiliates.
From: kfb2@ns1.cc.lehigh.edu (Keenan Brock)
Newsgroups: comp.sys.mac.programmer
Subject: Assembler for the Mac
Date: 23 Dec 92 04:05:26 GMT
Organization: Lehigh University

Don't ask me why but I have reciently been programming in assembly.  The
only version of an assembler I have is think-c and McASM (a pd written about
5+ years ago)

Does anyone know of a assembler for the mac that is pd?  or is think-c my best
bet?

i don't feel like dishing out $150+ for mpw when I already have think-c.

Keenan Brock
kfb2@lehigh.edu
-- 
Newsgroups: comp.sys.mac.programmer
From: ivanski@world.std.com (Ivan M CaveroBelaunde)
Subject: Re: One routine works, the other doesnt, WHY??
Organization: The World Public Access UNIX, Brookline, MA
Date: Thu, 31 Dec 1992 15:33:57 GMT

cconstantine@galaxy.gov.bc.ca writes:

>Could someone please explain to me why the following routine gets compile time
>errors under MPW C 3.2.4:

>curDev = GetMainDevice();
>pixDepth = GetPixelDepth( curDev );                             
>if ( pixDepth <> 8 )                                            
>    DeathAlert( errNot8Bit );

Because the C operator for "not equal" is not "<>" (that's Pascal). It's
"!=".

If it read (pixDepth != 8) it would work.

-Ivan
---
Ivan Cavero Belaunde
DiVA Corporation
From: vollrath@vax.oxford.ac.uk (Alun ap Rhisiart)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Quick TCL Question
Date: 25 Dec 92 18:25:22 GMT
Organization: Oxford University VAX 6620

In article <1992Dec24.234022.305@kth.se>, d88-jwa@dront.nada.kth.se (Jon Wtte) writes:
> In <1992Dec23.165216.10982@vax.oxford.ac.uk> vollrath@vax.oxford.ac.uk writes:
> 
>>> Override DoAppleEvent and make the same check the default method does, but
>>> don't do anything.  Pass all other cases.
> 
>>The problem with Jon's method, I think, is that most of the time you do want
>>to respond to oApp events, for example if someone dragged a document onto
>>your app's icon while you were switched out. You have to override Create
> 
> You won't get oapp events when someone drags documents on your icon,
> ONLY when the program is started, by itself, without arguments.
> 
> Cheers,
> 
> 							/ h+
> 
> -- 
>  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
> 
Yeah, I can't tell my app from by doc, owell. Merry Christmas!
Newsgroups: comp.sys.mac.programmer
From: bwilliam@iat.holonet.net (Bill Williams)
Subject: Re: Macs closed, what me worry?
Organization: HoloNet National Internet Access BBS: 510-704-1058/modem
Date: Wed, 23 Dec 1992 06:33:38 GMT

Speaking about hypocrites such as FSF (at times), don't forget to add in
the Electronic Frontier Foundation. The EFF supports SOFTWARE PATENTS!!!!
Thats right! I heard from one of their members in a meeting that the EFF
wholeheartedly supports software patents and as an example supports
widespread liscensing of the RSA encryption patents on mathematical
formulas related to public key encryption. They support the RSA patent! Ugh!

Apple has done more to foster creative progress and innovation than most
other organizations. The proof is the fact that so many creative people
use computers everyday to amplify their talents. At least about 10 million
functioning computers in use right now. More than any other brand of computer.


Bill Williams (PS whats all this non-programming crap doing in this area
anyway?)

Newsgroups: comp.sys.mac.programmer
From: positron@engin.umich.edu (Jonathan Scott Haas)
Subject: visRgn and New IM
Date: Wed, 23 Dec 92 06:38:15 EST
Organization: University of Michigan Engineering, Ann Arbor

Two questions from a beginner:

Firstly, suppose I have a window onto a very large picture, that the user
can scroll around in the usual way. Is it OK to redraw that very large
picture at every updateEvt, trusting the visRgn to do the clipping... or
will drawing (and discarding most of) such a large picture slow down
my application intolerably?

Secondly, is every volume of the New Inside Macintosh available yet? I
looked high and low for "Inside Macintosh: Imaging" yesterday and
couldn't find it anywhere. Also, is the New Inside Mac intended to be
a complete replacement for the old Inside Mac? (e.g. if I buy enough
volumes of New IM, is it OK for me not to own any of the old IM?)

-- 
__/\__  Jonathan S. Haas         | Jake liked his women the way he liked
\    /  University of Michigan   | his kiwi fruit: sweet yet tart, firm-
/_  _\  positron@engin.umich.edu | fleshed yet yielding to the touch, and
  \/                             | covered with short brown fuzzy hair.
Newsgroups: comp.sys.mac.programmer
From: ksand@apple.com (Kent Sandvik )
Subject: Re: Sample Source Needed
Date: Wed, 30 Dec 1992 22:02:06 GMT
Organization: (Evil Eye Creature from Mars, Inc.)
Followup-To: comp.sys.mac.programmer

In article <1992Dec29.132533.387688@magicbb.uucp>, sharkman@magicbb.uucp
(Matt Daw) wrote:
> >I'll let others point you to free source code at ftp sites, etc. I just
> >wanted to mention that the new Inside Macintosh volume on Files contains
> >plenty of source code on the File Manager, all of it in Pascal.
> 
> Thanks a lot, I just bought the files volume of IM, it really is great! Do you
> or anyone else know when More Toolbox and Imaging are coming out?

I saw the final pre-version of the IM Toolbox book yesterday, so I assume
it's a matter of N weeks, where 1 < N < 8 or so.

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
"Don't just do something!  Stand there!"  -- Mystery Science Theater 3000
From: lederman@taney.uscghq.uscg.mil
Newsgroups: comp.sys.mac.programmer
Subject: Anyone get the GCC Compiler from Apple's server?
Date: 21 Dec 92 20:27:13 EST
Organization: United States Coast Guard

  
    Has anyone successfully obtained the GCC compiler from Apple's
 FTP system?

    I have tried twice to obtain the GCC compiler from the 
 /pub/gnu.mpw directory on ftp.apple.com (the "minimum" version,
 binaries and scripts only, name something like
 gcc_1.37.min.sit.hqx.Z).  It appears to FTP properly to a host
 system (I remembered to set BINARY transfer), then I move it to
 another VAX using Kermit with no errors.  But when I run LZDCMP
 to de-compress it, it says it can't decompress the entire file,
 and when examined the .HQX file indeed appears to have the end
 missing.

    Is there anyone at Apple I can send a message to tell them
 about this?  And also to suggest that they post it as a regular
 Binhex file, since it was compressed before being binhexed and
 re-compressing it doesn't save very much or make much sense.  I
 realize they're making it available as a favor to the net, but fi
 they are going to do it they may as well do it right, right?


    Alternatively, does anyone know of another anonymous FTP site
 where I could obtain this version of the compiler for MacOS?

    Thanks.
From: jpugh@apple.com (Jon Pugh)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Drag & Drop on an alias? What's missing?
Date: 31 Dec 92 03:20:04 GMT
Followup-To: comp.sys.mac.programmer
Distribution: comp
Organization: Apple Computer, Inc.

In article <1992Dec22.173530.10159@netcom.com>, wdh@netcom.com (Bill
Hofmann) wrote:
> 
> fixer@faxcsl.dcrt.nih.gov (Chris Feelin' Groovy Tate) writes:
> >Creating a new alias for the app seems to clear up the problem.  Rebuilding the
> >desktop may have some effect, too, though don't quote me on that.  :-)
> The effect I've noticed is that rebuilding the desktop destroys the drag-
> and-drop ability.  Since I move my HD between machines, I can't really put]
> things on the desktop in useful places, so I have a "Desk" folder, and when
> I have to rebuild, I have to find all the alias owners and rebuild each
> app alias.

I have aliases galore on my desktop and I rebuild my desktop regularly.  I
have found the simple trick is to keep aliases on the same volume as the
original if you want drag and drop to work.  This works for me just fine,
even after rebuilding.

Jon