HDTenEightyP/NetNews huggingface dataset:
From: damurphy@wc.novell.com (Duane A Murphy)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How to increase stack size ???
Date: 4 Sep 92 16:00:59 GMT
Organization: Novell, Inc. - Walnut Creek

In article <PHILS.92Sep4090350@chaos.cs.brandeis.edu> phils@chaos.cs.brandeis.edu (Phil Shapiro) writes:
>>>>>> On Wed, 2 Sep 92 20:23:29 GMT, buckeye@spf.trw.com (John Wallace) said:
>
> > if (StackSpace() < STACK_MIN)
> >     SetApplLimit(StackPtr() - (STACK_MIN - StackSpace()))
>
> > This will make sure that you don't waste too much memory on "Large"
> > machines.  (StackSpace is a standard Toolbox trap.)
>
>This is the best solution, but... On 68000 machines, the trap
>StackSpace() returns garbage unless you've already called
>MaxApplZone() (in which case the call to SetApplLimit will fail). I'm
>not sure, but this may have been fixed in System 7.
>
>In any event, I would recommend using the low memory global DefltStack
>instead. In THINK C, you can just write:
>
>    SetApplLimit(GetApplLimit() - (STACK_NEEDED - DefltStack));
...

Thank you for jogging my memory.  This is the problem that I ran into.
Once MaxApplZone is called adjusting the stack space larger will
cross into the heap space simulating a stack heap collision.  That is
why it was necassary to adjust the stack size at the start as opposed
to dynamically at run time. (I think this sounds rights).

How can one adjust the stack size dynamically (as recommended by DTS)
when it simulates moving the stack into the heap?

No it is not fixed on System 7.  In fact StackSpace() works differently on
different models with the _SAME_ system!  This was very confusing.

...Duane
From: akm@st-andrews.ac.uk (Alasdair MacDonald)
Newsgroups: comp.sys.mac.programmer
Subject: Printing and DrawPicture HELP!!
Date: 26 Aug 92 19:18:20 GMT
Organization: St. Andrews University, Scotland.


I need some help DESPERATELY!!

I am trying to print a page with nothing on it except
a QuickDraw Picture. I make all the relevant calls (source
taken from Mac Revealed - old I know) and this works if I 
use simple QuickDraw commands but if I substitute these for
the even simpler ( so I thought ) DrawPicture command I 
either crash the Laserwriter ( getting a PostScript error)
or I get a blank piece of paper.

Can someone please put me straight.

Cheers,
Alasdair K Macdonald

@akm@st-and.uk.ac (internet)
From: ksand@apple.com (Kent Sandvik (Hacker))
Newsgroups: comp.sys.mac.programmer
Subject: Re: more about Multifinder?
Date: 20 Aug 92 19:22:23 GMT
Followup-To: comp.sys.mac.programmer
Distribution: comp.sys.mac.programmer
Organization: Apple

In article <HEYES.92Aug19141207@dadev.cebaf.gov>, heyes@dadev.cebaf.gov
(Graham Heyes) wrote:
> 
> I need some information about Multifinder and don't
> know where or if it is availible. Basically how does
> Multifinder keep track of applications currently
> installed, which is in the forground etc. There must
> be a data-structure or some other mechanism availible
> somewhere sence I have seen INIT's which install a 
> menu from which an aplication can be selected, like
> the system 7 application switching menu.

System 6.0.x -- DTS will not disclose about these internal
mechanisms. System 7.0.x -- Process Manager, IM VI and the
new Inside Macintosh Processes book.

Kent Sandvik/DTS
From: marshall@sdd.hp.com (Marshall Clow)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Does anyone recognize _Jackson?
Followup-To: comp.sys.mac.programmer,comp.sys.mac.system
Date: 4 Sep 1992 16:22:21 GMT
Organization: Hewlett Packard San Diego Printer Division
Distribution: world
NNTP-Posting-Host: hpsdr160.sdd.hp.com

In article <1992Sep4.133844.20178@dartvax.dartmouth.edu>,
Roger.W.Brown@dartmouth.edu (Roger W. Brown) wrote:
> 
> I frequently see this symbol in MacsBug when my Quadra crashes:
> _Jackson. I haven't looked through the Tech Notes yet. I wondered if
> anyone knows what it is. It does something with color icons. I just
> want to know that it isn't a virus, and maybe that it is from an
> extension that may be causing trouble.
> 
> --------------------------------------------------------------------
> Roger Brown                                roger.brown@dartmouth.edu
> Software Development
> Kiewit Computation Center, Dartmouth College, Hanover, NH

It isn't a virus. Look closely, and you will notice that the address that
you are looking at is in ROM.

On my Quadra 900:
$4083143A: JACKSONPOLLOCK          _Debugger
$4083143C: RNEWHANDLE              _NewHandle, SYS, CLEAR
$4083143E: RNEWHANDLE + $0002      BNE.S $40831432
and so on.....

It's where QuickDraw jumps to if it gets an error that it can't recover
from (mostly when it runs out of memory). Never, never, do region
operations
where you could possibly not have enough memory!

Marshall Clow
San Diego Printer Division      Hewlett Packard
Internet: marshall@sdd.hp.com   AppleLink: HP.Marshall    AOL: MClow

P.S.	"Jackson Pollock" was the code name for 32-bit QuickDraw.
From: keith@taligent.com (Keith Rollin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How does MPW store font and tab info?
Date: 26 Aug 92 19:58:55 GMT
Distribution: comp
Organization: Taligent

In article <THOR.92Aug26030603@haydn.vivaldi.psu.edu>, thor@vivaldi.psu.edu
(Thomas Moertel) writes:
> 
> I need to know how MPW stores the font/tab information for TEXT files
> it creates.  I'm pretty sure this info is a 'MPSR' resource.  I would
> love to get a Rez definition or C/C++ struct declaration for the
> beast.  Thanks in advance for your help!

#define resourceType    'MPSR'
#define editResID        1005

struct TABRSRC
{
    short width;                            // width of space in points
    short count;                            // tab width in spaces
};

struct FONTRSRC
{
    short       size;                       // font size
    character   name[32];                   // font name
};

struct WINDRSRC
{
    Rect openrect;                          // rectangle of window zoomed out
    Rect closerect;                         // rectangle of window zoomed in
};

struct SELRSRC
{
    unsigned int date;                      // time of last edit
    int start;                              // offset to start of selection
    int end;                                // offset to end of selection
    int pos;                                // offset to first char in window
};

struct EditRsrc
{
    struct FONTRSRC     fontrsrc;
    struct TABRSRC      tabrsrc;
    struct WINDRSRC     windrsrc;
    struct SELRSRC      selrsrc;
    character           autoindent,         // true if auto indent is on
                        invisibles;         // true if show invisibles is on
};


#define resourceType    'MPSR'
#define editMarkID       1007

struct MarkElement {
    int             start;                  // start position of mark
    int             end;                    // end position
    unsigned char   charCount;              // number of chars in mark name
    char            name[1];                // first char of mark name
};                                          // (name is null terminated)


struct MarkRsrc {
    short count;                            // number of marks in the resource
    MarkElement mark[0];                    // zero or more mark elements
};

--
Keith Rollin
Phantom Programmer
Taligent, Inc.
Newsgroups: comp.sys.mac.programmer
From: lsr@taligent.com (Larry Rosenstein)
Subject: Re: dereferencing Handles( was Re: incrementation differences/THINK C 4.0 vs. 5.0)
Followup-To: comp.sys.mac.programmer
Organization: Taligent, Inc.
Date: Wed, 26 Aug 1992 18:24:47 GMT

In article <1992Aug25.174228.17601@natinst.com>, stepan@natinst.com (Stepan
Riha) wrote:
> 
> However a thing to be carefull about is code of the form:
> 
> 	Handle	h;
> 
> 	*h = foo();
> 
> where foo() causes memory to be relocated.  If the LHS is evaluated first, it
> might be incorrect once foo is called.  The correct way to write this would be

And you not only have to consider whether the code in foo() can relocate
memory, but whether the call to foo() itself might relocate memory.  This
can happen if foo() is in a different segment from the caller, and that
segment has to be brought into memory or moved.  (That implies that some
calls to foo() might not move memory, but others could.)

Larry Rosenstein
Taligent, Inc.

lsr@taligent.com
From: bwilliam@oyster.smcm.edu (Bill Williams)
Newsgroups: comp.sys.mac.programmer
Subject: Newbie question about displaying application icons
Date: 28 Aug 92 13:39:09 GMT
Organization: St. Mary's College of Maryland
X-UserAgent: Nuntius v1.1.1d9
X-XXMessage-ID: <A6C3A4DC4C0201D2@williams.smcm.edu>
X-XXDate: Fri, 28 Aug 92 14:39:40 GMT

This used to work....

For some reason, an application that I've been writing and rewriting for
years has suddenly decided to stop displaying its own icon on the
desktop.  Rebuilding the desktop doesn't seem to help.  I'm pretty sure I
haven't changed much of anything between the time it was displaying just
fine and now; ResEdit shows the icons all just fine, and the BNDL stuff
all seems to be in order.  I'm using THINK Pascal 4.something, system
7.0.1 w/tuneup, and a IIci.  Any suggestions?

					-Bill Williams
				-St. Mary's College of Maryland
Newsgroups: comp.sys.mac.programmer
From: aep@world.std.com (Andrew E Page)
Subject: MPW C 3.2.3 Bug  (ETO #8)
Summary: MPW C Bug when using precompiled headers and the -i option
Keywords: MPW C 3.2.3 ETO 8 BUG PRECOMPILED HEADERS
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 26 Aug 1992 14:45:27 GMT

	I am experiencing the following problem with MPW C 3.2.3
	
When using precompiled headers in the following fasion:

#ifdef USE_PRECOMPILE
#pragma load ":Headers:dirscanh.hpc"
#endif

#ifndef __ERRORS__
#include <Errors.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
#ifndef __MEMORY__
#include <Memory.h>
#endif
#ifndef __DIRSCAN__
#include <dirscanh.h>
#endif

#ifdef PRECOMPILE
#undef PRECOMPILE
#pragma dump ":Headers:dirscanh.hpc"
#endif


The C compiler crashes.  I get a partial system bomb box with
an active 'continue' button that puts me back into the MPW Shell.

the dependency for the C command in my make script is as follows:

		
C_OPT = -i Andrew:include:

#
# Headers
#
:Headers:dirscanh.hpc D Path.make dirscanh.h
	C dirscanh.c -d PRECOMPILE {C_OPT}
#
# Objects
#
Path.c.o D Path.make Path.c dirscanh.h
	C Path.c {C_OPT}
dirscanh.c.o D Path.make dirscanh.h dirscanh.c
	C dirscanh.c -d USE_PRECOMPILE {C_OPT}

This problem, however disapaears when I remove the 
-i Andrew:include:

.
-- 
Andrew E. Page CTO(Warrior Poet)|   Decision and Effort The Archer and Arrow
DSP Ironworks                   |     The difference between what we are
Macintosh and DSP Technology    |           and what we want to be.
Newsgroups: comp.sys.mac.programmer
From: gurgle@netcom.com (Pete Gontier)
Subject: Re: DeleteMenu doesn't work
Date: Sun, 23 Aug 92 19:50:54 GMT
Organization: cellular

Daryl_Spitzer@mindlink.bc.ca (Daryl Spitzer) writes:

>I can seems to remove the menu from the bar.

>        hMenu = GetMenu( 901 );
>        InsertMenu( hMenu, 0 );
>        DrawMenuBar();
>        DeleteMenu( 901 );
>        DrawMenuBar();

>Everything works fine, except the menu is still there when the menu bar is

Probably the menu ID *within* your menu resource does not match the resource
ID. The resource ID is how you refer to your menu when calling GetMenu,
and the menu ID (*within* the menu resource) is how you refer to the
menu thereafter. I know it's stupid, but them's the breaks. Open up ResEdit
and take a look.
-- 
 Pete Gontier // EC Technology // gurgle@netcom.com
From: liran@bimacs.BITNET (Eshel Liran)
Newsgroups: comp.sys.mac.programmer
Subject: AFP and shared volumes
Keywords: AFP AppleShare DES
Date: 3 Sep 92 11:56:28 GMT
Organization: Math & CS, BarIlan U, Ramat-Gan, Israel

I have a few questions on the subject of AFP and shared volumes:

1.   Is there any way I can find out file manager information concerning
  a file which resides on another mac using an AFP session. I would like to
  get enough information which will enable me to call a FSMakeSpec call.
     I tried calling GetFileDirParms but the parDirID I got wasn't the same
  as the parDirID of that file on the other mac. I guess it's only relevant
  for the CNodes tree catalog.
     If I mount this volume then I guess the references number I'll get will
  be relevant for the local mac only, and not for the remote one from which I
  mounted the volumes.

2.   Where does AppleShare keep it's list of shared volumes. (not the mounted
  volumes, but the volumes on the local mac which where enabled for sharing).
     Is this list accessable for applications ?

3.   Is there a sample code somewhere which implements DES ?

Liran Eshel,
Bar-Ilan University, ISREAL
From: triantos@acsu.buffalo.edu (Nick B Triantos)
Newsgroups: comp.sys.mac.programmer
Subject: How do I mount a SCSI device?
Date: 31 Aug 92 15:22:42 GMT
Distribution: comp
Organization: The University at Buffalo
Originator: triantos@autarch.acsu.buffalo.edu

Hi,

Forgive me if this is in the FAQ, but I couldn't find it.  I'd like to write a
program for myself that, when launched, will simply mount all SCSI devices it
finds in the chain.  I've looked in IM for a magic SCSIMount function, or
something reasonably close, and I can't find anything which I can understand.
Please post any suggestions you might have, or pointers to code which may help
me.

Thanks much,
-Nick

--
Nick Triantos    internet: triantos@acsu.buffalo.edu
                 AOL:      Triantos
"Scientists tell us that the fastest animal on earth, with a top speed of
120 ft/sec, is a cow that has been dropped out of a helicopter." - Dave Barry
From: sw@network-analysis-ltd.co.uk (Sak Wathanasin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Popup menus (help!!)
Date: 4 Sep 92 14:17:40 GMT
Reply-To: sw@network-analysis-ltd.co.uk
Organization: Network Analysis Ltd
X-Mailer: uAccess - Macintosh Release: 1.6v1


In article <sdorner-010992093127@dorner.slip.uiuc.edu> (comp.sys.mac.programmer), sdorner@qualcomm.com (Steven Dorner) writes:

> haynes@mace.cc.purdue.edu (Carl W. Haynes III) wrote:
> > 
> >resnick@cogsci.uiuc.edu (Pete Resnick) writes:
> > >
> > >Suggestion 1: use the pop-up menu CDEF included with the System 6
> > >Communications Toolbox for pre-System 7 machines.
> > >
> > 
> > What's the licensing deal with this? Do we need to license the CDEF from
> > Apple if we use it in our programs for pre-system 7 work?
> 
> I would assume you would have to pay the fee for redistributing the Comm
> Toolbox.  This is $50 per year.  Ask sw.license@applelink.apple.com to
> be sure.

There is a copy of the popup CDEF in the MacApp 3.0 distribution. There is
a brief reference to it in the release notes, and UPopup.h contains the
following instruction:

// For Sys 6.0 support: include the Popup CDEF in the resource fork of your application
// with the following lines in your app.r file:
//		include "Popup.rsrc";

I assume, therefore, that the MacApp object code distribution licence covers
the use of the CDEF.


Sak Wathanasin
Network Analysis Limited
178 Wainbody Ave South, Coventry CV3 6BX, UK

uucp:      ...!uknet!nan!sw  Phone: (+44) 203 419996
AppleLink: NAN.LTD           Internet: sw@network-analysis-ltd.co.uk
Newsgroups: comp.sys.mac.programmer
From: wilson@blofly.enet.dec.com (My name is...)
Subject: Programmer Digest?
Organization: Digital Equipment Corporation
Date: Fri, 28 Aug 1992 01:06:37 GMT


I would like to be able to receive the comp.sys.mac.programmer Digest if such a
thing exists.

How do I subscribe to receive this Digest?

thanks,

Andrew
From: ksand@apple.com (Kent Sandvik)
Newsgroups: comp.sys.mac.programmer
Subject: Re: ML for the Mac????
Date: 30 Aug 92 03:27:23 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple

In article <gebbuRW00iUyQ5gEwc@andrew.cmu.edu>, gb2a+@andrew.cmu.edu
(George J. Baxter) wrote:
> 
> Does anybody know of a standard ML compiler for the Mac????

I know of an SLM version, check the Mac version on att.research.com
(unless it's yet again gone from the ftp archives). Seems to work
fine, but gee it's hard to get used to formal/functional language
definitions.
Like attending college math classes once again.

Cheers,
Kent Sandvik/DTS
---
Warning, Bimbo eruptions most likely to happen in California this weekend.
From: sdorner@qualcom.qualcomm.com (Steve Dorner)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Why won't this compile under Think C 5.0?
Date: 27 Aug 92 17:37:56 GMT
Organization: Qualcomm, Inc., San Diego, CA

rrwood@uuisis.isis.org (Roy Wood) writes:
>extern void MyFunction(char);

This prototype indicates that only a single byte will be pushed on the
stack for the char (in theory; I don't think that can really be done,
can it?).

>void MyFunction(theChar)
>char theChar;
>{

This is an old-style declaration, which implies promotion from char to
int.  It is the same as writing:

void MyFunction(theChar)
int theChar;
{

Thus, you have incompatible declarations.

Old-style declarations are assumed to use promotion for compatibility
reasons.  Otherwise, compiling your code with an ANSI-aware compiler
would suddenly change the code's behavior, which some people feel is
A Bad Thing.  (Thank god I can write "short i=-1;" now, though.)

None of this is specific to THINK C; it's SOP for a C compiler.
-- 
Steve Dorner, Qualcomm, Inc.
Yes, I'm still working on Eudora and it's still free.
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Inconsistantcy in Think C
Date: 30 Aug 92 21:19:50 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden
Originator: d88-jwa@dront.nada.kth.se

> asmah@acad2.alaska.edu writes:

   I have a sprintf() statement which doesn't work the first time through, but
   works during a second time.  As far as I can tell, all the variables are
   identical during both passes.  This is what it looks like.

   CharsHandle  input;
   TEHandle TEFields[20];

   input = TEGetText(TEFields[0]);
   sprintf((**ARH.c_employee).last_name,"%.*s",(**TEFields[0]).teLength,(**input));
   return 1;

Are you sure it says **input? Since that would be a char, not a char
pointer, as you would want when passing %s.

Anyway, you are probably calling sprintf from another segment which
makes a segment load which moves memory which makes your de-referenced
handle move. Lock it first:

	char state ;

	input = ....
	state = HGetState ( input ) ;
	HLock ( state ) ;
	sprintf ( ... ) ;
	HSetState ( input , state ) ;


More about this in the chapter about the memory manager in IM II.

-- 
Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069
White, Literate, Employed, Higher-Educated, Male, Straight and Not Poor.
I must be a bad guy.
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Subject: Re: Comparing strings 'n stuff...
Followup-To: comp.sys.mac.programmer
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<chuck-280892124136@choffman.gte.com>
Date: Fri, 28 Aug 1992 19:05:34 GMT

> chuck@gte.com (Chuck Hoffman) writes:

   > 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

   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.

And of course lose any credibility outside of the U.S.

Use IUEqualString, IUCompString and IUMagIDString

-- 
Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069
White, Literate, Employed, Higher-educated, Male and Not Poor.
Can I be a good guy nevertheless?
From: rc05@gte.com (Ramesh Chandak)
Newsgroups: comp.sys.mac.programmer
Subject: AppMaker question ?
Date: 29 Aug 92 21:00:56 GMT
Organization: GTE Laboratories Incorporated, Waltham MA

since I'm new to AppMaker, i don't know what's going wrong with my program.
I'm trying to use AppMaker to generate the code for a very simple interface.
Only two menu items : FILE and EDIT.  I go thru the process of creating
THINK C code.  And then according to the manual, I define the project
name and resource name.  So when I try to run the program, it says "main"
undefined.  It seems AppMaker does not create a main program.   Is that
correct ?  Do I have to write the main program ? ANd then call all the
routines one at a time to generate the run-time executable ?

What's going on here ?  I mean I would like to know.  What's the deal with
AppMaker ?  

Please email your responses to Ramesh at rc05@gte.com.   Thank You.

- Ramesh
From: cnc@Apple.COM (Chris Christensen)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Simple Think C problem (Help!!!)
Date: 25 Aug 92 16:15:01 GMT
Organization: Apple Computer Inc., Cupertino, CA

As of Think 5.0, you need to use qd.thePort in place of thePort.
If you look in the Quickdraw.h file you will find about 4 other variables
that are also now part of the qd struct.
Newsgroups: comp.sys.mac.programmer
From: de19@umail.umd.edu (Dan Emery)
Subject: Can TCL project size be reduced using precompiled headers?
Followup-To: comp.sys.mac.programmer
Organization: UM Home for the Terminally Analytical
Date: Wed, 2 Sep 1992 21:39:37 GMT

Is it possible to reduce the size of a TCP project file by using
the "precompiled header" feature?  If so, could some kind soul
email or post a description of the strategy one would use.

Dana Emery <de19@umail.umd.edu>
Newsgroups: comp.sys.mac.programmer
From: krk@itl.itd.umich.edu (Kenneth Knight)
Subject: Subscribing the CPLUS.DEV$ - how?
Organization: Instructional Technology Laboratory, University of Michigan
Date: Fri, 28 Aug 1992 19:05:23 GMT

Applelink supports mailing lists for MacApp 2.0 and 3.0 (MacApp2Tech$ and
MacApp3Tech$ folders) which they echo to the Internet at large. Does Applelink
do the same thing with the CPLUS.DEV$ group? If so, what is the address that
should be used to send subscription requests?

 Thanks,

   ** Ken **
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Still trying to get this stupid sound stuff to work...
Date: 27 Aug 92 14:19:00 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <1992Aug26.192610.14018@utkux1.utk.edu>, you wrote:
> 
> What is happening now is the sound sound starts playing,
> the dialog comes up, but you cannot do anything until the sound 
> finishes.  Check it out:
> 

> [... left out some code...]
> 
>  begin
>   mySndChan := nil;
>   mySndHandle := GetResource('snd ', soundID);
>   if mySndHandle <> nil then
>    begin
>     err := SndPlay(mySndChan, mySndHandle, kAsync);
>     if err <> noErr then
>      ExitToShell;
>    end;
>  end;


I'm no Sound Mangager ace, but there's a paragraph in IM-V about SndPlay
which says that if you specify a channel in "mySndChan" you can play the
sound asynchronously, but if you specify nil, then you cannot (you have to
wait for the sound to finish).  Maybe that's the problem.  Looks like you
can get a non-nil channel pointer by using SndNewChannel.  Caution: this is
from the book, not from experience.


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