HDTenEightyP/NetNews huggingface dataset:
From: zben@ni.umd.edu (Charles B. Cranston)
Newsgroups: comp.sys.mac.programmer
Subject: Re: byte alignment problem
Date: 21 Aug 92 19:44:23 GMT
Followup-To: comp.sys.mac.programmer
Organization: UM Home for the Terminally Analytical

In article <1992Aug17.233739.19308@athena.cs.uga.edu>,
kinsey@athena.cs.uga.edu (Kevin Kinsey) wrote: 
> a quick question: 
> 	if given a struct { char a; long b;} x;, what is the best method
> 	to create a buffer that contains 'a' followed by 'b' WITHOUT the
> 	implicit padding within the struct.
 
In article <John_Shepardson.esh-210892102752@moose.slac.stanford.edu>,
John_Shepardson.esh@qmail.slac.stanford.edu (John Shepardson) wrote:
> Think C will not add the pad byte within a struct. I can't say about other
> compilers.

MPW C will not add pad bytes either.  Guess why the comment in
this data structure, from one of my programs that failed on 68000
hardware:

typedef struct {
    DialogRecord dlog;
    short	wtype;
    Rect	wrect;
    Point	ipos;
    WindowPtr	next;

    Handle	rhand;
    int		timer;
    int		tcpst;
    int		rhost;
    short	rport;
    short	reason;
    short	dindex;
    char	option;
    char	workf;
    char	openf;
    char	filler;		/* SE/68000 netbuf must be word aligned! */

    char	buffer[BUFMAX];
    char	netbuf[NBSIZE];
    struct hostInfo hinfo;
} qwtype, *qwptr;

Hint: netbuf is being passed to MacTCP as an 8096 byte connection
buffer, and MacTCP is erecting a custom heap zone in this buffer,
and the heap zone creation code in ROM does a long store into one
of the zone header fields to initialize it.

Actually, the only thing suprising is that it all worked fine on
680x0 x<0 processors even though it was odd-aligned!!!

zben@ni.umd.edu     -KA3ZDF
Xref: sparky comp.sys.mac.programmer:14360 comp.sys.mac.misc:15260 comp.sys.mac.system:11214 comp.sys.mac.apps:13619
From: barker@wd0gol.WD0GOL.MN.ORG (Bob Barker)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.misc,comp.sys.mac.system,comp.sys.mac.apps
Subject: Launching Excel from MPW or Think C under System 7
Keywords: MPW, Think C, Excel, System 7
Date: 22 Aug 92 03:02:44 GMT
Followup-To: poster
Organization: Robert Barker & Associates, Eden Prairie, MN.

I am trying to launch the application Excel 4.0 and open an Exel document
from a 'C' program (either MPW or Think C) using System 7 on the Macintosh.

I am able to launch Excel via sending the apple event 'oapp', however have
been unsuccessful opening a document sending the 'odoc' apple event to 
Excel.

I attempted to use the LaunchApplication system call and also apple event
system calls with no success.

Can anyone offer any help/suggestions/code that would help me figure 
out how to do this?

Thanks!

-Bob Barker

------------------------------------------------------------------------------
Bob Barker                                ...!uunet!umn-cs!tcnet!wd0gol!barker
Robert Barker & Associates                                barker@wd0gol.MN.ORG
(612) 949-0140
From: neath@brazil.psych.purdue.edu (Ian Neath)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Map
Date: 19 Aug 92 13:20:06 GMT
Organization: Purdue University

Speaking of the map, does anyone know of any sources for latitude and
longitude info other than old fashioned printed atlases?  A database
with this info would be very useful:  Only 1 city in which I have 
lived is built into the map.

--
    Ian Neath, PhD     | There are four kinds of people in this world:
neath@psych.purdue.edu | cretins, fools, morons and lunatics - U. Eco
Newsgroups: comp.sys.mac.programmer
From: flaps@dgp.toronto.edu (Alan J Rosenthal)
Subject: bride of the son of the revenge of the %_SUPERCLASSTABLE (MPW)
Organization: Dynamic Graphics Project, University of Toronto
Date: 14 Aug 92 20:53:30 GMT


I feel really stupid posting this here, but I'm trying to add some new files
to a big macapp program and keep getting all sorts of weird link errors.  The
manuals don't tell me anything about the errors, and it takes all my brain
cells to decode them.  I've done ok so far but...

I'm really stuck with this error from Link:
  Method table optimization, definition not found: (Error 58) %_SUPERCLASSTABLE

What is %_SUPERCLASSTABLE?  Who wants it, and who creates it or how can I stop
whoever wants it from wanting it?

					thanks,

					Alan "Unmangled symbol: %_BP" Rosenthal

p.s. MPW 3.2b12, MacApp 2.0.1
p.p.s. if this is an easy question, please e-mail rather than posting, to
       prevent the imminent death of the net.
Newsgroups: comp.sys.mac.programmer
From: matsb@tdb.uu.se (Mats Bredell)
Subject: Telnet tool
Organization: Dept. of Scientific Computing, Uppsala Univ.
Date: Sat, 15 Aug 1992 19:20:01 GMT

I've been thinking about writing a telnet tool for the communications
toolbox. I've read the manual (IMCTB), and it doesn't seem to be too
difficult.

Does anyone know of any CTB telnet tool that's share- or freeware? If
there is one, I don't want to invent the weel again.

/Mats
-- 
Mats Bredell                                   Mats.Bredell@udac.uu.se
Uppsala University Computing Center (UDAC)
Department of medical systems                  Ph:  +46 18 187817
Sweden                                         Fax: +46 18 187825
Newsgroups: comp.sys.mac.programmer
From: hd12@ellis.uchicago.edu (hui  dong)
Subject: How to change sound volume? Help please!!!
Reply-To: hd12@midway.uchicago.edu
Organization: University of Chicago Computing Organizations
Date: Tue, 18 Aug 1992 10:02:51 GMT

I need to know how to change sound volume, I tried to change the global
SysParam.volClik, but nothing happens, and after I WriteParam(), the mouse
double click time is not right after I reboot. Well, something must be very
wrong here. Any help will be very appreciated!




Newsgroups: comp.sys.mac.programmer
From: system@asuvax.eas.asu.edu (Marc Lesure)
Subject: SFPPutFile question
Organization: Arizona State University
Date: Tue, 18 Aug 1992 22:56:50 GMT

I have a problem using the SFPPutFile routine.  I want to give the user the
option of appending to an existing file so I've added an 'append'
button in addition to the 'save' and 'cancel'.  The problem I have is 
what my dlgHook routine should return as its status value.  If it 
returns the 'putSave' status, then SFPPutFile put up the 'Already exists'
dialog and if it returns 'putCancel', then the SFReply vRefNum field is not
filled in correctly.  Is there a way to disable the 'Already exists' dialog or a
better return value?

-----------------------------------------------------------------------
Marc Lesure / Arizona State University / Tempe, AZ
"Between the world of men and make-believe, I can be found..."
"False faces and meaningless chases, I travel alone..."
"And where do you go when you come to the end of your dream?"

UUCP:       ...!ncar!noao!asuvax!lesure  
Internet:   lesure@asuvax.eas.asu.edu
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help!  System error #28
Date: 12 Aug 92 18:08:58 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <chuck-120892123052@choffman.gte.com>, chuck@gte.com (Chuck
Hoffman) wrote:
> 
> I'm getting System Error #28 message from MacsBug when checking a program I
> wrote in THINK C.  It happens during an FSRead.  THINK C Debugger and
> MacsBug can't recover so I have to reboot,
[...]

Arrrrgggghhhh!!!!  I changed the program SIZE parameter and the error
changed to #25 (out of memory).  Something is definitely running amok.  Can
anyone guess what it might be?

Mac-II, 8 Meg, 7.0.1, THINK C 5.0.1, MacsBug 6.2b1.

-Chuck Hoffman

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: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: AIFF and 'extended' type
Date: 19 Aug 92 10:00:49 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Aug17.204116.11424@nosc.mil>, frantzen@nosc.mil
(Louise E. Frantzen) asks how to interpret the "extended" data type
for an AIFF sample rate.

The SANE real number types are explained in the Apple Numerics Manual, 2nd ed.
There are three real types: single (32 bits), double (64 bits) and extended
(80 bits for software SANE, 96 bits for the hardware FPU). The one used
in AIFF is the 80-bit software SANE type, and consists of a 1-bit sign,
a 15-bit exponent and a 64-bit mantissa (page 18).

It's interesting that Apple's guidelines state that the extended type is
only meant for intermediate temporary values, to minimize rounding errors
in multi-step calculations: you should *not* use it as a type for permanent
storage of data. And yet they go and break their own guidelines with AIFF...

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+12:00
To crash is human; to reboot, divine.
Newsgroups: comp.sys.mac.programmer
From: Quinn <quinn@cs.uwa.edu.au>
Subject: Re: MacsBug symbols from assembler code?
Organization: The University of Western Australia
X-Useragent: Nuntius v1.1
Date: Fri, 21 Aug 1992 03:09:41 GMT

In article <1992Aug20.155733.6869@daimi.aau.dk> Peter Andersen,
datpete@daimi.aau.dk writes:
>Am I missing something?

Hmm.  I had great fun getting MacsBug symbols working consistently
in my latest Asm project.  Try using the following macro (with
apologies to those people whose systems don't expand tabs
properly)...

----------------------------------------------
	macro
	MacsBug	&Name,&rts:int
	lclc	&oldstr
	gbla	&debug

	if &debug then
	
	if &rts then 
	rts				; force rts in specific cases
	endif
	
	dc.b	&len(&name)+$80		; length of string + $80 marks symbol
&oldstr	setc	&setting('string')
	string	AsIs
	dc.b	'&upcase(&Name)'	; define the string AsIs
	string	&oldstr
	align				; pad to word boundary
	dc.w	0			; no literals
	
	endif
	
	endm
----------------------------------------------

... which you invoke as.
        MacsBug         Fred
        MacsBug         Jim,1
at the end of routine Fred that ends in an RTS (or JMP (A0) or
RTD) or routine Jim that doesn't end in one of the above.

However theres still the problem of whether MacsBug will actually
see the symbol.  Sometimes it does, sometimes it doesn't.  I'm not
actually sure what it depends on but I think it has something to do
with what code has been executed recently.  One thing that I found
that helps is doing an 'hx' into the heap that the symbol is in.
But if all else fails you can at least search for the symbol string
(-:

Quinn "The Eskimo!"      <quinn@cs.uwa.edu.au>     "Support HAVOC!"
Department of Computer Science, The University of Western Australia
  -- MacsBug:  Don't leave home without it.
  -- This macro is for Pascal; converting it to C is left as an
     exercise to the reader.  (-:
Newsgroups: comp.sys.mac.programmer
From: wjb@cscsun2.larc.nasa.gov (William J. Bene)
Subject: MPW 3.2 Linker Errors
Reply-To: wjb@cscsun2.larc.nasa.gov (William J. Bene)
Organization: NASA Langley Research Center, Hampton, VA USA
Date: Tue, 18 Aug 1992 17:37:17 GMT

I have a C program with about 15 different modules which I have successfully 
compiled and executed using MPW 3.2.  After adding a few functions to one of 
the files I get the following errors while linking: 

 ### While reading file "Main.c.o"
### Link: Error: 16-bit reference offset out of range. (Error 114)  at $0001E 
in main
### Link: Error: 16-bit reference offset out of range. (Error 114)  at $0002A 
in main
### Link: Error: 16-bit reference offset out of range. (Error 114)  at $0003A 
in main
(and it continues on...)


I didn't add any global variables in the last few functions, so its not the 
32K global data limit.  I think it might be too many entries in the jump 
table but I'm not sure.  Any ideas would be helpful.

Thanks, 

Will

================================
William J. Bene
Computer Sciences Corporation
wjb@cscsun2.larc.nasa.gov


Newsgroups: comp.sys.mac.programmer
From: mch@sqwest.wimsey.bc.ca (Mark C. Henderson)
Subject: need dirent for mac (MPW/C/C++)
Organization: SoftQuad Inc., Surrey, British Columbia, CANADA
Date: Wed, 12 Aug 1992 20:55:40 GMT

I was wondering if anyone knows of a public domain or free directory access
routines which emulate Unix/POSIX functions, opendir, readdir, closedir, 
rewinddir (dirent.h or sys/dir.h) for the Mac (MPW/C/C++).

Thanks in advance,

Mark



-- 
Mark Henderson, SoftQuad Inc, 108-10070 King George Hwy, Surrey, B.C. V3T 2W4
Internet:   mch@west.sq.com, mch@sqwest.wimsey.bc.ca
UUCP: {van-bc,sq}!sqwest!mch Telephone: +1 604 585 8394  Fax: +1 604 585 1926
From: aep@world.std.com (Andrew E Page)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Directory Scanning Code (non-sys7) Interface req
Date: 19 Aug 92 18:24:53 GMT
Article-I.D.: world.Bt8ttI.Jn3
Organization: The World Public Access UNIX, Brookline, MA


  Here are some of the prototypes so far.  And I'd like some feedback
on whether or not this suits your needs.  I'm trying to make it do
sort of an emulation of _SFGetFile in its use of a typelist and
a filter function.  If I do everything correctly you should be able
to use any filter that you've concocted before for _SFGetFile with
this scanning function.  

Ptr StartScan(int vRef, int numTypes, SFTypeList, typeList, FileFilterProcPtr filter) ;
/*
*    StartScan starts the directory scan.  It will return 0L if the call failed
*       or a pointer to be used in subsequent calls.  
*
*
*     vRef      Volume/Directory where scan is to start.
*
*     numTypes  Number of types to limit scan too.
*               -1 indicates to scan all types.  
*
*     typeList  Array of OSTypes with numTypes elements.  
*               Pass 0L if numTypes is -1
*
*     filter    Filter proc of the variety used by SFGetFile.  
*               Pass 0L for no filtering.                 
*
*               pascal Boolean MyFilter(fileParamPtr *f) ;
*                  MyFilter returns TRUE if file is to be excluded.
*                    or FALSE if it isn't.   
*/


OSErr GetNextScanFile(Ptr scanPtr, char *fName, short *vRef) ;
/*
*     Each call to GetNextScanFile will retreive the next file in the
*      directory tree.  GetNextScanFile will return a fnfErr when the
*      scan is completed.  
*
*
*  scanPtr     Ptr returned from StartScan
*
*  fName       string space for returned file name  (recommened length 64)
*
*  vRef        Pointer to short where Volume/Directory reference for 
*              that file is to be placed.  
*/

OSErr StopScan(Ptr scanPtr) ;

/*
*    Terminates the scan started by Start scan.  
*
*
*     scanPtr    Ptr returned by StartScan.  
*
*
*/

DoD# 0581   1990 Suzuki VX800   MSF Intro Class Aug 1990
-- 
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.
From: neal@farallon.com (Neal Trautman)
Newsgroups: comp.sys.mac.programmer
Subject: E.T.O. #8 and Incremental Linker
Date: 13 Aug 92 12:22:39 GMT
Organization: Farallon Computing, Inc.

Has anyone found the "New Memory Based Incremental Linker"
on E.T.O. #8??

This is the one Apple talked about and promised at the
WorldWide Developers Conference??

--
Neal Trautman
Timbuktu Lead Software Engineer
Farallon Computing, Inc.
neal@farallon.com

Newsgroups: comp.sys.mac.programmer
From: ralph@mozart.anu.edu.au (Ralph Sutherland)
Subject: Re: DESPERATE: switching pixmaps w/ SetPortPix
Organization: Mt. Stromlo and Siding Spring Observatories
Date: Thu, 13 Aug 92 06:49:45 GMT

 In Article 21019 in comp.sys.mac.programmer:
 envy@reed.edu!envy.Reed.Edu!pcalahan (Patrick John Calahan) Wrote:

>I still need a few lines of code which will do the following.
>
>SetPortPix(myOffscreenPixMap);
>

I tried email but it bounced and there didn't ssem to be any further posts
So...


Is this pseudocode more useful? (excuse the tabs, and as always no guarantees):

variables:

	aPort:Grafptr;              {general purpose port vriable}
    Coffport:CGrafPtr;          {temp colour port}
    oldpix:PixMapHandle;        {save the old pixmap}
    offpix:PixMapHandle;        {offscreen pixmap, initialised elsewhere}
    pwidth,pheight:integer;     {offscreen size}
    r:rect;                     {offscreen size}
    anRGB:RGBColor;             {anRGB color!}

.
.
.

      GetPort(aPort);

      Coffport := nil; {paranoia}

      Coffport := cGrafPtr(NewPtr(sizeof(cGrafport)));
                                      {allocate temp port to hold pixmap}

      if (Coffport <> nil)) and (Memerror = Noerr) then {Always check....}
       begin

           OpenCPort(Coffport);             {init port}
           oldpix := Coffport^.portPixMap;  {save pixmap}

           setport(Grafptr(CoffPort));     {set port is a good idea}
           SetPortpix(offpix);             {use the offpix}
           portsize(pwidth, pheight);      {Size IS important}
           rectrgn(CoffPort^.VisRgn, r);   {needed if the pixmap is
                                            larger than the screen}
           cliprect(r);                    { just so we have a clip}
           with anRGB do
             begin
                  red := $C000;
                  green := $C000;
                  blue := $4000;
             end;
           RGBForeColor(anRGB);           {sort of yellow...}
           Fillrect(brect, black);        {solid colour}

           SetPortpix(oldpix);            {put back the pix,
                                          I don't know if you really
                                          have to restore the visrgn}

           setPort(aPort);                { move to another port
                                            *before* you dispose!}

           CloseCPort(CoffPort);          {dispose}
           disposPtr(Pointer(CoffPort));  {clean Up}

         end;
.
.
.

Hope this helps

cheers
Ralph Sutherland


-- 
---- Ralph S. Sutherland      Mount Stromlo & Siding Spring Observatories.
---- ralph@madras.anu.edu.au  The Australian National University.
---- rss100@cscgpo.anu.edu.au --------------------------------------------
From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
Newsgroups: comp.sys.mac.programmer
Subject: Weird QD Bug w/ Geneva: Reprise
Date: 19 Aug 1992 20:46:58 GMT
Followup-To: comp.sys.mac.programmer
Organization: Academic Computing

I'd like to thank everyone for their input. My program, which has several
gworlds with custom CLUTs and several windows with custom palettes (the
palettes and cluts all contain the same colors), works now. Unfortunately,
I'm not sure why.

The general consensus was that it was o.k. to share palettes between
windows. The subject of cluts never came up, but here's what I found. It
seems EVERY window and gworld has to have its own copy of the appropriate
palette or clut, regardless of what Inside Mac says. Any sharing results in
odd perversions of the global color environment or outright crashes. I
can't explain it, and don't pretend to understand it, but it's the only
thing that works.

--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton                      |    
Ass't Director, Academic Computing |       "This space for rent."
UT Health Science Center Houston   |  
cshotton@oac.hsc.uth.tmc.edu       |         
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Newsgroups: comp.sys.mac.programmer
Subject: Re: more about Multifinder?
From: michael@otago.ac.nz
Date: 21 Aug 92 10:06:06 +1300
Distribution: comp.sys.mac.programmer
Organization: University of Otago, Dunedin, New Zealand

In article <HEYES.92Aug19141207@dadev.cebaf.gov>, heyes@dadev.cebaf.gov (Graham Heyes) writes:
> 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. 

I would like to know this too: I have (of course) been using the Process
Manager calls under System 7, but I was disappointed to find that they aren't
there under 6.0.5.

I did learn an interesting thing about the Process Manager too; it takes some
time to kick in and it gets taken away early at system shutdown time. If you
are using it from a system extension, you need to do a TrapAvailable check on
_OSDispatch *every time* you are thinking of using these calls, because its
possible that they have been quietly removed by something...


Michael(tm) Hamel, Computing Services Centre, University of Otago, New Zealand

LUPPITT (n.)                       
The piece of leather which hangs off the bottom of your shoe before you can
be bothered to get it mended.
From: fang@phy.duke.edu (Fang Zhong)
Newsgroups: comp.sys.mac.programmer
Subject: How much did you pay for MPW-C-3.2 alone?
Keywords: Where did you get it from?
Date: 19 Aug 92 20:46:59 GMT
Distribution: usa


	We received our MPW shell 3.2 when we updated our
Fortran compiler from Language System.  We would like to
add a C 3.2 compiler if it is under $100.  Someone in our
department bought a Think C 5.0 for $55 when he was in
Ohio for a conference.  This price is substantially cheaper
than any retail price.  So we are looking for a good deal
on MPW C 3.2.
	Thanks in advance.

-- 
	Fang Zhong				1-919-660-2524
	Duke University Dept. of Physics	fang@phy.duke.edu
	Durham, N.C.      27706			
Newsgroups: comp.sys.mac.programmer
From: sgrenander@NASAMAIL.JPL.NASA.GOV (Sven Grenander)
Subject: FAQ list for ThC4 -> ThC5 conv. ?
Organization: Jet Propulsion Laboratory
Date: Wed, 12 Aug 1992 18:03:21 GMT

Is there a FAQ list covering the conversion of applications written
in ThC 4.x.x using the TCL to ThC 5.x.x using the TCL 1.1 ?

I'm about to start my switchover, but don't look forward to
rediscovering the incompatibilities which others have already sweated
over (long pane coords., file word boundaries and the like).

Realizing that there is no simple cookbook describing the how-to's,
a FAQ list seems like a worthwile alternative. Is there such a list out
there on any of the ftp sites ?

Thanks.

-Sven
Newsgroups: comp.sys.mac.programmer