HDTenEightyP/NetNews huggingface dataset:
From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
Newsgroups: comp.sys.mac.programmer,comp.protocols.appletalk
Subject: Re: MacTCP - UDPRead aligned?
Date: 6 Apr 92 14:59:21 GMT
Organization: University of Illinois at Urbana-Champaign

resnick@cogsci.uiuc.edu (Pete Resnick) writes:
>Am I guaranteed that the data pointed to by the rcvBuff that I get
>from a UDPRead call is aligned so that I can do a MOVE.L from it?

Why not just use BlockMove?  Unless you're going to be doing scads
and scads of little tiny moves, BlockMove will do a fine job, without
compatibility problems.  And you could even get the trap address and
avoid trap overhead, if you want to.
-- 
Steve Dorner, U of Illinois Computing Services Office
Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
From: dfrick@uhunix.uhcc.Hawaii.Edu (Doug Frick)
Newsgroups: comp.sys.mac,comp.sys.mac.programmer
Subject: archive site for Frontier stuff?
Date: 13 Apr 92 17:54:24 GMT
Distribution: usa
Organization: University of Hawaii at Manoa

I'm posting the following in hopes that someone out in Netland is
interested in supporting an archive site for Frontier-related
stuff. It is a pretty cool application, and allows all us Mac
techies to script our environments. 
---------------------------------------------------------------------------
From: EL.GRANDE@AppleLink.Apple.COM (UserLand SW, David Winer,PRT)

Doug:
 
We're not on the Internet at all. If you know anyone who might want to act as a
pipeline for demo scripts, toolkits and install files, we'd love to open the
channel.
 
Is there some place you could re-post this message? We're looking for someone
with both an Internet and an AppleLink or CompuServe account.
 
This question comes up all the time and we'd really like to get in the loop.
Getting educated on Internet culture isn't an option for us right now, we're
overloaded with supporting AppleLink and CompuServe. That may change, but not
in the next few months...
 
DW
--
Doug Frick
dfrick@uhunix.uhcc.Hawaii.edu
Newsgroups: comp.sys.mac.programmer
From: ckyu@leland.Stanford.EDU (Chen-Kuang Yu)
Subject: debugging tools for lisp
Organization: DSG, Stanford University, CA 94305, USA
Date: Sat, 11 Apr 92 17:49:26 GMT

I've been using lisp on the NeXT machines and recently have to do some
programming on the mcl.  However I find the STEP and TRACE debugging
macro rather crude on the mcl.  I wonder if it's mentioned in the
manual that there are some other more powerful debugging tools
available.  (I'm using the program running on the server of our schoo.
The consultant said the manual was lost, so there's no way for me to
check it out.)
 
BTW, are there any ftp sites where they keep a bunch of useful lisp
codes such as a modified TRACE or STEP?
 
Thank in advance.
 
/Chen Yu (yu@cs.stanford.edu)
From: danny@utkux1.utk.edu (Danny McCampbell)
Newsgroups: comp.sys.mac.programmer
Subject: Printing Help...again?
Date: 7 Apr 92 19:21:52 GMT
Organization: University of Tennessee

I have written a small program that involves some text (more than a pages
worth) that I want to send to the printer.   Well, my program uses modal
dialogs and of course in one of the dialogs there is a print button.

My question is where should I store the text to print to the printer
and how do I load the text in memory and send it to the printer correctly
formatted?

Right now I have the text store in seperate PICT resources (because there
is too much to fit on one screen).  I have added more and back buttons 
that when simply clicked on back up a screen or go forward a screen.

I cannot print the PICT's to the printer because that will not look right.
I want to store the text as a document like format, but in the resource
file.  I do not want to use a seperate file if I do not have to.

I hope this is clear.  Oh, I did want to mention that I want be using the
print dialogs.  When the user clicks the print button, I want to just
send the text to the printer and thats it.  Thanks in advance.

Danny McCampbell
Newsgroups: comp.sys.mac.programmer
From: mike@zorch.SF-Bay.ORG (Mike Smithwick)
Subject: Bizarro 7.0 behaviour with MenuSelect
Organization: SF-Bay Public-Access Unix
Date: Fri, 10 Apr 1992 05:01:44 GMT

[]
I've finally got around to installing 7.0 and have run across all
sorts of problems, possibly stemming from the same thing.

It would appear that MenuSelect()is going nuts on me, and is trashing
alot of memory. So much so, that even when I exit my app and return to
Think-C, it can still crash at any time or for some reason, give me
"code overflow" errors next time I try to compile. I end up having to 
restart the machine.

Does this sound familiar to anyone??

Everything worked fine up to now on 6.0, but goes to hell on 7.0.

mike

-- 
"There is no problem too big that can't be solved with high explosives"-Rush

Mike Smithwick - ames!zorch!mike
From: azuelos@nuri.inria.fr (Daniel  AZUELOS)
Newsgroups: comp.sys.mac.programmer
Subject: Need a fixed Apple Dictionary
Date: 7 Apr 92 13:00:18 GMT
Organization: INRIA * Rocquencourt BP 105 * F-78153 LE CHESNAY CEDEX* France

I'm experiencing a lot of problems when using the Apple Dictionary:

%%DocumentProcSets: "(AppleDict md)" 71 0
%% ) Copyright Apple Computer, Inc. 1989-90 All Rights Reserved.

between 2 other dictionaries.

The problem seems to be located in the function /nc.

Could someone tell me where to find a fixed version.
I'm not a PostScript developper, but I'd like to understand
any solution.

More precisely I know that the problem resides within the
definition of the function:
/nc {
    currentpoint initclip newpath gc {
        dup type dup /arraytype eq exch /packedarraytype eq or {
            exec
        } if
    }
    forall
    gsave            % <- this modification seems to be sufficient
                     %    to make a usable md
    clip newpath
    grestore         % corresponding end of the modification
} def

I would like to be sure that this modification is correct.

A %%commented%% version of this dictionary would be really helpful
to understand it. Does this exist ?

Thanks to reply by E-mail.
--

                                Daniel  :-)
                                azuelos@polytechnique.fr
From: bill@hao.ucar.edu (Bill Roberts)
Newsgroups: comp.sys.mac.programmer
Subject: THINK C 5.01 .. squirrely or what?
Date: 13 Apr 92 23:57:09 GMT
Reply-To: bill@hao.ucar.edu (Bill Roberts)
Distribution: usa
Organization: High Altitude Observatory/NCAR, Boulder CO

Howdy,
  I'm trying to do some real basic C stuff on my MacIIsi using THINK C,
version 5.01.  Stuff that normally works on my Sun Sprac1+ seems to cause
THINK C to go bananas.  Even while using the Debugger I can freeze the damn
machine.  I get bad addresses, etc. reported from the Debugger just before
my Mac goes belly up.
  Have other folks noticed similar squirrely behavior using THINK C?  I must
admit that this is the first time I've attempted to do real work using THINK C.
So far my impressions are mixed.  Is there YAUP (Yet Another Update/Patch)
for THINK C 5.01 that I have perhaps missed?
  Thanks for the bandwidth and time for me to vent my frustrations! ;-)

Ciao,
--Bill
Newsgroups: comp.sys.mac.programmer
From: hao@slipknot.mit.edu (Cindy Hao)
Subject: Need demo modeless dialogs using TCL's Dialog classes
Keywords: modeless dialog, TCL
Organization: Massachvsetts Institvte of Technology
Date: Thu, 9 Apr 1992 14:48:49 GMT

Can any one kindly provide me with some codes which demonstrate the use
the TCL dialog classes to handle modeless dialogs?  The example which
came with Think C 5.0, NewDialogDemo, does not really show how the
dialog items are handled.  One can type in the text fields, but nothing
gets stored, and there is no interaction between the demonstration
dialogs with the rest of the program.  

Any help is greatly appreciated.

-Cindy Hao
-- 
hao@slipknot.mit.edu 	        (617)253-7458
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How do I find out if Multi-finder is running??
Date: 9 Apr 92 16:41:56 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <22452@goofy.Apple.COM>, jpugh@apple.com (Jon Pugh) writes:
>> [going on about MultiFinder & Launch...]
>
> Here's a totally skanky thing to do that no one should recommend, but might
> solve your problems.  Taken in concert with the system version number, which
> you are undoubtedly looking at, this should provide you with the knowledge
> you want.  Simply look for the MultiFinder file in the System folder (the
> name is actually stored in the System itself as a STR or STR# if you want
> to be international.  If it is missing on systems that need it, it's not
> running.  If it is there, open it.  If you get an error MultiFinder is
> running, otherwise it is not running.
>
> How's that for a skanky hack?  Talk about assuming things...

Certainly is skanky. I don't recall the name of the MultiFinder file
being stored anywhere in the System though; I thought only the Finder had to
know what its name was, so it could set it as the startup application.

But why bother thinking up all these elaborate techniques? Just check
for the presence of the OSDispatch/JugglerDispatch trap ($A88F). It's the
technique Apple themselves use. You can't get any simpler, or more reliable,
than that.

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
Newsgroups: comp.sys.mac.programmer
From: Steve Creps <creps@silver.ucs.indiana.edu>
Subject: Re: Trouble initializing structures in THINK C 5.0.2
Organization: Indiana University
Date: Mon, 6 Apr 1992 10:01:10 -0500

In article <frain.701924552@depot.cis.ksu.edu> frain@cis.ksu.edu (Jerry Frain) writes:
>Can anyone tell me why the following is correct
>
>	struct foo {
>		int a;
>		int b;
>	};
>	struct foo bar[2] = {{1, 2}, {3, 4}};
>
>And yet this is not:
>
>	struct foo {
>		char *a;
>		char *b;
>	};
>	struct foo bar[2] = {{"1", "2"}, {"3", "4"}};

   I've not used Think C.  However, this is not specifically a Mac programming
problem, but rather a general C programming problem.

   In Example 1 all the memory locations get allocated because there are no
pointers used (unless you want to get technical).  Both fields in struct foo
are int, so when you declare a variable as struct foo, the memory locations
to hold both a and b are allocated.

   In Example 2, however, you are declaring the fields of foo as _pointers_,
so all that gets allocated are places to hold addresses of places to hold
characters.  Note that "char *a" doesn't tell how big the string is.
Declaring it "char a[2]" would work, because that would actually allocate
two characters for the given string (including the zero terminator).

   Note the following similar examples:

Example 3:

int foo = 1;

Example 4:

char *foo = "1";

   Both of these, however, should work.  Example 4 works not because space is
being allocated for the string, but because it is getting the address of the
space _which has already been allocated_ to store the constant string "1".

   To summarize, the problem mentioned was caused by not making sure that
space was being allocated for strings being used.  That problem is one of
the most difficult concepts to master when learning C.

-	-	-	-	-	-	-	-	-	-
Steve Creps, Indiana University
creps@silver.ucs.indiana.edu (129.79.1.6)
{inuxc,rutgers,uunet!uiucdcs,pur-ee}!iuvax!silver!creps
From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Silly question about determining DirIDs
Date: 9 Apr 92 20:47:49 GMT
Article-I.D.: hemul.D88-JWA.92Apr9214749
Distribution: comp
Organization: Royal Institute of Technology, Stockholm, Sweden
Originator: d88-jwa@hemul.nada.kth.se

.xerox.com> gerson@parc.xerox.com (Dan Gerson) writes:

   This seems like it should be obvious, so I'm afraid that I'm asking a
   stupid question, but how do you find out the DirID of a directory?

	   HParamBlockRec info;
	   CStr255 name = dirspec.name;

You can't copy strings this way in C...

Three weeks ago I posted these, and here we go again:

 
long
GetDirID ( FSSpec * fss )
{
	CInfoPBRec pb ;
 
	BlockClear ( & pb , sizeof ( pb ) ) ;
	pb . dirInfo . ioVRefNum = fss -> vRefNum ;
	pb . dirInfo . ioDrDirID = fss -> parID ;
	pb . dirInfo . ioNamePtr = fss -> name ;
	FailOSErr ( PBGetCatInfo ( & pb , 0 ) ) ;
 
	ASSERT ( pb . hFileInfo . ioFlAttrib & 0x10 ) ;
	return pb . dirInfo . ioDrDirID ;
}

 
OSErr
GetDirName ( short vol , long dir , unsigned char * name )
{
	CInfoPBRec pb ;
 
	BlockClear ( & pb , sizeof ( pb ) ) ;
	pb . hFileInfo . ioFDirIndex = -1 ;
	pb . hFileInfo . ioDirID = dir ;
	pb . hFileInfo . ioVRefNum = vol ;
	pb . hFileInfo . ioNamePtr = name ;
 
	return PBGetCatInfo ( & pb , 0 ) ;
}
-- 
h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Regular reading of a serial device-how?
Date: 13 Apr 92 08:09:17 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden
Originator: d88-jwa@hemul.nada.kth.se

> mhkohne@jupiter.cs.umbc.edu (Michael Kohne) writes:

   1) a way to call the serial drivers from a VBL task.

Can't help you there

   2) a way to get some code called regularly (every 10 ticks or so), but NOT
   at interrupt level. I can't think of any way either of these can be done,
   so I ask you: any ideas? 

Hey, how about a simple application that passes a value < 10 to
WaitNextEvent ? Could even make it faceless background...

Or you could write a driver (DRVR) and have an INIT install it;
DRVRs get regular time from SystemTask.

Or you could patch one of the "regularies" like _OSEvent or
_SystemTask - but that degrades system performance a lot.

Hope this helps !

-- 
"You should meet yourself someday. I'm sure you would hate it."
- Me: h+@nada.kth.se; Jon W{tte (The Diplomat - NOT!)
From: Joe.Francis@dartmouth.edu (Joe Francis)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MacTCP - UDPRead aligned?
Date: 12 Apr 92 23:01:29 GMT
 <1992Apr6.145921.26924@ux1.cso.uiuc.edu>  <2452@wcc.oz.au>
Organization: Dartmouth College, Hanover, NH

In article <2452@wcc.oz.au>
tom@wcc.oz.au (Tom Evans) writes:

> ...is faster than BlockMove for n < 50 - even as a subroutine!
> Therefore checking for word-alignment and doing long-copies in a
> subroutine is going to be faster for n < 200 or so. Using proper
> unrolled assembly code is always going to be faster (because that's
> what BlockMove() is probably doing).

Don't forget that some macs can execute ROM faster than RAM.
From: huntley@garbo.cs.indiana.edu (Haydn Huntley)
Newsgroups: comp.sys.mac.programmer
Subject: Is ALIGN broken in MPW assembler?
Date: 15 Apr 92 14:25:56 GMT
Article-I.D.: news.1992Apr15.092634.13148
Distribution: usa
Organization: Indiana University, Bloomington


I'm porting a program from Unix to the Mac, and part of it is written
in assembler.  In the assembler, there are statements like "ALIGN 8",
to align the function entry points on 8 byte boundaries.  The MPW
assembler has an align directive, and the files assemble just fine.
However, when the code is run, those entry points are only aligned on
2 byte boundaries!

Does anyone know why this is broken or have any ideas on how to fix
it?

BTW, I'm using MPW 3.0 on a Mac IIcx, and in another week version 3.2
should get here.

Thanks in Advance,

--Haydn
-- 
;;  *****************************************************
;;  *  Haydn Huntley    huntley@copper.ucs.indiana.edu  *
;;  *****************************************************
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Subject: Re: How do I find out if Multi-finder is running??
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Mon, 6 Apr 1992 21:16:58 GMT

.se> f85-tno@nada.kth.se (Tommy Nordgren) writes:

   There is one very reliable way. Check for the presence of the OSDispatch
   trap, used to allocate temporary memory from multifinder.

That is still not a reliable way. It tells you wether you can use
MF temp mem. It does NOT tell you wether _Launch will return.

However, the whole question is esoteric, since these days there's
no need to concern oneself about that; _LaunchApplication doesn't
need a wdRefNum, and DOES return. And if you need launching
capabilities, there's no reason not to use system software that's
been out for a ywar and the upgrade to which is free.

-- 
h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
From: CXT105@psuvm.psu.edu (Christopher Tate)
Newsgroups: comp.sys.mac.programmer
Subject: Re: TextWidth and LaserWriters
Date: 14 Apr 92 18:19:27 GMT
Organization: Penn State University
X-Vignette: Unix -- the operating system for the vowel-impaired.

You need to read, carefully and patiently, the Tech Notes that discuss
printing in general, and LaserWriters in particular.  I don't recall just
which Tech Notes they are, but the numbers 92 and 86 stick in my mind.
Get the index (or the Tech Notes Stack), and go from there.

Basically, when you print text to the LaserWriter all manner of strange
and wonderous things may happen, such as Font Substitution, which will
play merry hell with the actual position of text and other graphics on
the page.  Get the tech notes and study them, and experiment a lot.

And be glad you don't have to pay $0.25 per page when experimenting,
the way I did....  :-(

-------
Christopher Tate        |  "Computer Science has more real-world
                        |   applications than rotisserie baseball."
cxt105@psuvm.psu.edu    |
Bitnet:  CXT105@PSUVM   |       -- Ben Liblit, next-door neighbor
Newsgroups: comp.sys.mac.programmer
From: zimerman@phoenix.Princeton.EDU (Jacob Ben-david Zimmerman)
Subject: Help with 6502/680x0 question?
Originator: news@ernie.Princeton.EDU
Organization: Princeton University
Distribution: usa
Date: Fri, 10 Apr 1992 15:56:10 GMT

Hi.  As I mentioned earlier, I am attempting to write a 6502 emulator
for the Mac, hopefully to be expanded into an APple II emulator if I
have that much time and discipline.  I have a couple questions, and I
wonder if any net folk could help me out.  
  On the 6502, whose instruciton set I am trying to emulate, I have
basically figured ou;or had explained to me everything I need so far-
but as I am unable to find a good 6502 book close to hand, could someone
explain to me if they feel so inclined how the carry and overflow bits
of the status register work?  i.e. when doing, say, an ADC (add mem with
accumulator)  what exactly happens involving them?  I *think* that when
the processor does the addition, it is adding two unsigned bytes and if
the result is greater than 128 it sets the overflow, and if it is
greater than 255 it sets the carry. WHen doing addition, if the carry is
set, it adds 255 to the pot before spitting out a value.  This is all I
have been able to figure, and I think I have it wrong.  So, if some
tolerant and helpful soul would be willing to enlighten me, I'd be most
grateful.  Thank you very much! :)

p.s. please respond by email, as I am at work and can't afford the time
to follow most groups.  Thanks.

-JBZimmerman!
zimerman@phoenix.princeton.edu or (r)eply.

-- 
___________           |-Is that Scotch over there?  Hold everything.
     ||               |                -Sean Connery, The Russia House
||   ||acob Zimmerman!+> <zimerman@phoenix.Princeton.EDU> INTERNET 
  ===                 |  <zimerman@PUCC>                  BITNET
From: chrism@col.hp.com (Chris Magnuson)
Date: Sun, 12 Apr 1992 20:57:52 GMT
Subject: MPW QUESTIONS
Organization: HP Colorado Springs Division
Newsgroups: comp.sys.mac.programmer

Two questions:

  1. Does anyone have experience with the Incremental Build System utility from
     Jasik?  I want to know how much it costs, where to get it, and whether it
     makes links any faster (how much?).

  2. Is it true that Think Pascal is much faster than MPW Pascal?

Thanks,
Chris Magnuson
chrism@col.hp.com
From: reidc@dcs.glasgow.ac.uk (Chris Reid)
Newsgroups: comp.sys.mac.programmer
Subject: Help with MacTCP wanted
Date: 14 Apr 92 15:48:06 GMT
Organization: Glasgow University Computing Science Dept.


Hi there,

	I'm trying to extend one of my applications to make use of MacTCP.
I've got a communications facility that uses AppleTalk (some LocalTalk nets
connected via Ethernet), but would like to make real use of the internet.
Anybody got any sample code (either C or Pascal) that illustrates the use
of MacTCP?
I'd appreciate it if you could mail it to me directly!

Thanks,
	Chris

reidc@dcs.glasgow.ac.uk
From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Memory Manager Problems & System 7.0.1?
Date: 7 Apr 92 15:23:46 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden
Originator: d88-jwa@hemul.nada.kth.se

@fraser.sfu.ca (Neil K. Guy) writes:

    Does anyone know if Apple has fixed the memory manager bug that affects
   machines from the IIci on up? I have an INIT that supposedly fixes the
   problem, but I was wondering if it's necessary with 7.0.1 or with the
   new System 7 tuneups... thanks in advance!

That INIT was a dirty hack i nthe first place...

No, it's not necessary with any sustem >= 7.0

-- 
h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
From: ira@Apple.COM (Ira Ruben)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Is ALIGN broken in MPW assembler?
Date: 16 Apr 92 20:19:22 GMT
Distribution: usa
Organization: Apple Computer Inc., Cupertino, CA

huntley@garbo.cs.indiana.edu (Haydn Huntley) writes:


>I'm porting a program from Unix to the Mac, and part of it is written
>in assembler.  In the assembler, there are statements like "ALIGN 8",
>to align the function entry points on 8 byte boundaries.  The MPW
>assembler has an align directive, and the files assemble just fine.
>However, when the code is run, those entry points are only aligned on
>2 byte boundaries!

>Does anyone know why this is broken or have any ideas on how to fix
>it?

The following is the output from MPW Asm for a little test program I
wrote:

00000                                 proc
00000   01                            dc.b    1
00001   0000 0008                     align   8
00008   0002                          dc.w    2
0000A                                 end

According to the addresses on the left the align did indeed align to
the desired boundary.  Check your asm listing.

Ira Ruben
Apple Computer, Inc.

Newsgroups: comp.sys.mac.programmer
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: Re: Too many files open?
Keywords: Mac,error,file manager is a joy
Organization: The World Public Access UNIX, Brookline, MA
Date: Fri, 17 Apr 1992 14:33:26 GMT

This may have been answered but opening a data fork is ONE file and
opening a resource fork is ONE file. therefore...opening both forks
of a single "file" really counts as TWO files :)













-- 
-- joe zobkiw                           zobkiw@world.std.com
-- mac.synthesis.MIDI.development.THINK C.asm.communications
-- digital audio.cdrom.mountain bikes.black cars.perrier.H20