HDTenEightyP/NetNews huggingface dataset:
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think Pascal - Whats... - data abstraction?
Date: 18 Nov 92 17:20:04 +1300
Organization: University of Waikato, Hamilton, New Zealand

In article <1351@my.sm.luth.se>, matti@my.sm.luth.se (Matti Larborn) writes:
>
> Another question: Why don't Think Pascal support abstract datatypes?
>
> The only thing they would have to add is an export declaration:
>
> 	x=object
> 		export a,b; { or name it public if you like }
> 		a: integer;
> 		b: real;
> 		c: char; { hidden }
>
> 		{?operations }
> 	end;

Why bother? There are too many potential complications with this scheme:

* What if you want the user to be able to read, but not write those fields?
* What if you want the user to be able to write those fields in a certain
  restricted fashion to preserve certain relationships to the values in
  other fields?
* What if you later decide not to store that field, but compute it from
  some other fields? Changing this would break existing clients.

A simpler and more general approach is to define accessor procedures and
functions. These can enforce any constraints you like. And they don't need
a new language feature!

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: Christopher Stuart <cs10@cornell.edu>
Subject: Re: TIFF file format?
X-Xxdate: Wed, 18 Nov 92 15: 05:27 GMT
Nntp-Posting-User: cs10@cornell.edu
Organization: Cornell Information Technologies
X-Useragent: Nuntius v1.1.1d7
Date: Wed, 18 Nov 1992 19:41:14 GMT

In article <1992Nov13.195942.14358@nsisrv.gsfc.nasa.gov> David Landis,
landis@ltpsun.gsfc.nasa.gov writes:
>I am looking for information on the format for TIFF image files.-----

A description of the TIFF format can be found by anonymous ftp
from sgi.com in the /graphics/tiff directory.  The latest version is
6.0 and there's a postscript file called TIFF6.PS.

-------------------------------------------------------------
Chris Stuart <cs10@cornell.edu>    Cornell Digital Library Project
503 Olin Library,     Cornell University         Ithaca, NY  14853
(607) 255-9099
"I absolutely loathe the goddamn banjo." -- Frank Sinatra
Newsgroups: comp.sys.mac.programmer
From: J074870@LMSC5.IS.LMSC.LOCKHEED.COM
Subject: Re: Heap Fixer
Organization: Lockheed Missiles & Space Company, Inc.
Date: Tue, 17 Nov 92 21:32:58 GMT

Actually a better program is called "HeapTool"   It is writting by
Kerry Clendinning and can be found on most shareware places.  However,
if you are running sys 7.  You don't need to change your heap.  It
automattically does it for you.

Matt Shember

Newsgroups: comp.sys.mac.programmer
From: yzg9890@uxa.cso.uiuc.edu (yzg9890)
Subject: Problems with Mac Printing Manager
Organization: University of Illinois at Urbana
Date: Tue, 24 Nov 1992 04:11:24 GMT

I got into the trouble when I tried to print out color shaded image from a
LaserWriter. I expected to get a gray scale image, but I got a black image
instead. Can anybody help me out?

Following is what I did:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void printImage()
{
TPPrPort    pPort;
THPrint     itPrint; 

     tPrint = (THPrint)NewHandle(sizeof(TPrint));
     PrOpen();
     PrintDefault(tPrint);

     pPort = PrOpenDoc(tPrint, nil, nil);
     PrOpenPage(pPort, nil);
     
     /* draw shaded image */
     drawImage();

     PrClosePage(pPort);
     PrCloseDoc(pPort);

     PrClose();
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Another problem: if the print method is spool, the Inside Mac II says that
		 one needs to "swap your program out of your memery" before
		 calls PrPicFile(). Can someone show me an example about
		 what this "swap" should look like?

Please send your help to mail address, your help is highly appreciated.


joe
Newsgroups: comp.sys.mac.programmer
From: stevep@wrq.com (Steve Poole)
Subject: CR/CRLF, entab/detab MPW tools?
Organization: Walker Richer & Quinn
Date: Mon, 23 Nov 1992 18:54:09 GMT

Anyone know if MPW tools to perform these conversions exist?  I'm aware of
entab, but it's nastily asymmetric.  If no one has any then I guess I'll
write 'em and release 'em, but I hate to spend the time right now.  Thanks.
  - Steve

--------------------------------------------------------------------------
- Walker Richer & Quinn, Incorporated  -  Macintosh Software Development -
- Internet: stevep@wrq.com  -  AOL: Spoole  -  INTEL 80x86: Just say NOP -
- "Nurse! Do let's pretend that I'm a hungry hyaena, and you're a bone!" -
--------------------------------------------------------------------------


Newsgroups: comp.sys.mac.programmer
From: aep@world.std.com (Andrew E Page)
Subject: Re: A simple question about menus
Organization: The World Public Access UNIX, Brookline, MA
Date: Mon, 16 Nov 1992 15:08:04 GMT



     Check out IM V-236.  You find much of the data to know more
about the mechanics there.  I've been through that part once or
twice to build heirarchical menus.  Also be sure you're setting
the options properly in resed.  It's not called "heirarchical menu"
there, it calls  them 'sub-menus'.  Just be particuarly careful
about your choice of resource numbers.

Good Luck.

-- 
Andrew E. Page   (Warrior Poet) |   Decision and Effort The Archer and Arrow
Mac Consultant                  |     The difference between what we are
Macintosh and DSP Technology    |           and what we want to be.
Newsgroups: comp.sys.mac.programmer
From: asunta@convex.csc.FI (Miika Asunta)
Subject: Large multidimensional arrays in C (THINK/MPW)???
Organization: Finnish Academic and Research Network Project - FUNET
Date: Mon, 23 Nov 92 16:16:08 GMT


Let's make a 1D array example:

typedef struct {
	int a,b,c;
	long d
} s, *sptr, **shandle;

It works fine like this:

test()
{
int howmany=10;
shandle SS=(shandle) NewHandle(howmany*sizeof(s));

(*SS)[0].a=1
(*SS)[9].a=1
}

But... how can I make it work in 2 or more dimensions?

ie.

(*SS)[0][2].a=1;

doesn't work, "Illegal operation on struct"

Unfortunately I don't have K&R so I don't know if that kind of
referensing is even possible.

Has anyone succeeded with this?

Miika

--
Miika Asunta
asunta@convex.csc.fi			Double Bass Player
tel. +358-0-494 093			Macintosh Programmer
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Testing memory validity
Organization: Kalamazoo College
Date: Fri, 20 Nov 1992 13:36:13 GMT

k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
>Can anyone spell out an algorithm to me for predicting whether the
>access of a certain memory location will yield a bus error?

I've gotten three responses to date:  two "try installing your own bus
error handler"s and one "let me know what responses you've gotten."

Unfortunately, even if I trusted myself to do something as grungy as
modifying 680x0 exception vectors ("what, you mean I won't be able to
use a source-level debugger"), I won't get the desired effect.  This
code has to "reserve" a range of memory before it gets access to it.
I was hoping to trap potential, not actual, errors by detecting invalid
ranges of memory.

For example, I know that 0x50FF8001 is always an invalid location.  I
expect that some locations will always be valid, some always invalid,
and that some will depend on which Mac, which addressing mode, which
slots have cards in them, and lots of other stuff that I'm no expert on.
I'm looking for a list of such considerations.

Any help will be appreciated (and will make this (soon to be
freely-distributable) code that much better).
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 I suppose ya don't think I was run over by a streetcar!
Newsgroups: comp.sys.mac.programmer
From: jpugh@apple.com (Jon Pugh)
Subject: Re: Simulating odoc event from THINK Pascal?
Date: Sat, 21 Nov 1992 06:41:41 GMT
Organization: Apple Computer, Inc.
Followup-To: comp.sys.mac.programmer

In article <goodill_eric-201192084213@ericg.cpd.tandem.com>,
goodill_eric@tandem.com (Eric Goodill) wrote:
> 
> Has anybody come up with a relatively easy way to simulate odoc events from
> within THINK Pascal so that I can use the source level debugger while
> debugging my Apple event handlers?  As it stands, I've just been using
> Macsbug which works just fine but is a bit tedious.

Add a **** FREF to THINK Pascal's BNDL if it doesn't already have one.  I
forget if I added one myself or if it came with one.  Rebuild your desktop
if you do add it.

Now you can drag and drop things onto THINK Pascal.

Run your program.  Drag something onto THINK Pascal.  Your program will get
the 'odoc' event.  Debug as usual.

Simple enough for you?

Jon
From: moj@risken.vd.volvo.se (Mats-Olof Sander)
Newsgroups: comp.sys.mac.programmer
Subject: Copy File - C Code Pieces ?
Date: 23 Nov 92 10:11:21 GMT

I'm new at Mac C programming and would like to see examples on how to
copy files between volumes (data, resource and finderinfo).

Any hints are welcome
Mats-Olof
From: jimc@tau-ceti.isc-br.com (Jim Cathey)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Developing programs for low-end Macs
Date: 17 Nov 92 00:07:05 GMT
Organization: ISC - Bunker Ramo, Spokane, WA

In article <1992Nov13.181736.25732@udel.edu> sethi@pokey.cis.udel.edu (Adarshpal S Sethi) writes:
>I am developing a program using Think C that is
>required to run under both System 6 and System 7
>as well as on low-end Macs including the 128K and
>512K Macs. The only machines available to me are
>the Mac SE and the MAC II. My question is: What

I had heard that Think C 5.0 is unable to do this.  I'm doing exactly
this (and I've tested down to Sys 3.2 --- I even allow for MFS.  If I
ever find something older I'll try it on it, too).  I'm using Think C
4.0, and probably cannot upgrade if I want my program to work in all
my customer environments. 

-- 
+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC-Bunker Ramo
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!isc-br!jimc (jimc@isc-br.isc-br.com)
! II      CCCCCC !  (509) 927-5757
+----------------+
			One Design to rule them all; one Design to find them.
			One Design to bring them all and in the darkness bind
			them.  In the land of Mediocrity where the PC's lie.
Newsgroups: comp.sys.mac.programmer
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: Re: MenuKey bug
Organization: The World Public Access UNIX, Brookline, MA
Date: Mon, 16 Nov 1992 14:20:50 GMT

What good is calling MenuKey when you have no menus inserted yet?
I'm confused.

-- 
-------------------------------------------------------------
joe zobkiw         zobkiw@world.std.com        aol: aflzobkiw

macintosh.midi.synthesis.c.oop.asm.communications.graphics...
Xref: sparky comp.sys.mac.programmer:18825 comp.sys.mac.apps:17557 comp.sys.mac.wanted:10920 comp.sys.mac.misc:19575
From: aftab@natinst.com (Aftab Saleem)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.apps,comp.sys.mac.wanted,comp.sys.mac.misc
Subject: C Code Flow Analyzer
Followup-To: poster
Date: 23 Nov 1992 14:21:42 -0600
Organization: National Instruments, Austin, TX
Distribution: usa
NNTP-Posting-Host: eagle.natinst.com

Does anyone know of a shareware utility that parses a C source file and produces
a listing of all the functions in it and a cross reference of how the functions
are calling each other.

Please reply directly to me.
From: potts@oit.itd.umich.edu (Paul Potts)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Simulating odoc event from THINK Pascal?
Date: 23 Nov 1992 15:24:06 GMT
Organization: Instructional Technology Laboratory, University of Michigan
NNTP-Posting-Host: helen.oit.itd.umich.edu

In article <By3AIq.Ht6@world.std.com> siegel@world.std.com (Rich Siegel) writes:
>In article <goodill_eric-201192084213@ericg.cpd.tandem.com> goodill_eric@tandem.com (Eric Goodill) writes:
>>
>>Has anybody come up with a relatively easy way to simulate odoc events from
>>within THINK Pascal so that I can use the source level debugger while
>>debugging my Apple event handlers?  As it stands, I've just been using
>>Macsbug which works just fine but is a bit tedious.
>
>THINK Pascal will pass Apple Events on to the running program. The catch
>is that since THINK Pascal suspends the running program when you switch
>out, the Apple Event needs to come from another machine on the network,
>a background daemon-like program that sends them once in a while, or
>from the running program itself.

A related note - when I was working on some AppleEvent code last year, I
would use a Hypercard stack with the AE XCMDs to send events to my program,
and leave my program running under the debugger (THINK C, not Pascal) with
a breakpoint in my AE handlers. Both were running on the same machine - I
would swap from the project running in the debugger to Hypercard, send the
event, and then when it was received the debugger would stop at the breakpoint.
This was a tremendous timesaver. I'm not sure if it is possible to do something
like this in THINK Pascal, though.

(Actually I did this on a 4-meg SE/30 with virtual memory set to 16 megs;
performance wasn't really that bad, since the main swapping occurred only when
I switched applications. At the time System 7 was pretty new, and I was
amazed that this scheme actually worked!)

-- 
Politics is crime pursued by other means.              
potts@oit.itd.umich.edu      CI$ 71561,3362 (rarely)
Newsgroups: comp.sys.mac.programmer
From: tim@maths.tcd.ie (Timothy Murphy)
Subject: How can I change the menu in Think C?
Summary: Why doesn't AddResMenu() work?
Keywords: Think_C menu
Organization: Dept. of Maths, Trinity College, Dublin, Ireland.
Date: Tue, 17 Nov 1992 15:48:00 GMT


Anyone know why Think C (v5 under System 7)
doesn't like this?
It compiles but bombs out.

main()
{
	MenuHandle AppleMenu;
	AppleMenu = GetMenu(1);
	AddResMenu(AppleMenu, 'DRVR');
}

-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Newsgroups: comp.sys.mac.programmer
From: alexp@sci.kun.nl (Alex Priem)
Subject: Making a PICT file on a PC; --->Mac
Organization: University of Nijmegen, The Netherlands
Date: Sat, 21 Nov 1992 16:27:32 GMT


I've written a program (on a PC) that produces some nice graphs, and would like
to import these graphs (as PICT-file) in my favourite wordprocessor (on 
the Mac). I've looked at the code from the 'pbmplus' package, and it
doesn't look that nice. Plus that it only produces the 'data-fork'  
(as they say) of the picture, so you need Binhex or something like that to
produce a 'readable' picture. 
What I'm looking for is some code (in C) that produces a PICT-file (or MacPaint-
file, since my graphs are just B&W) *on a PC*, which could be easily be read
in *on a Mac*. Any help would be appreciated!

  
Greetings, ALeX

Newsgroups: comp.sys.mac.programmer
From: pvl1779@usl.edu (Leach Phuong V)
Subject: how to update my windows
Organization: University of Southwestern Louisiana
Date: Wed, 18 Nov 1992 00:08:28 GMT


I have a window that I am plotting a bunch of points in.  When I pull up
my dialog box to change some parameters it covers up some of the graph
so that when I dismiss the dialog, I have a white box on part of my 
graph.  I know that in the window record there is an update region that
is maintained by the system.  I just can't figure out how to draw my 
stuff in that region.  I can't store the points in a data structure
because it would be too large.  Is there a way I can save the contents 
of the window into a pict or some other data structure and then just 
call "draw window contents" in one fell swoop?

thanx,
Robb
:wq
oops!
From: tsa@cellar.org (The Silent Assassin)
Newsgroups: comp.sys.mac.programmer
Subject: 3D graphics...
Date: 17 Nov 92 00:32:42 GMT
Organization: The Cellar BBS and public access system

Anyone have any source for doing 3D graphics?  I want to be able to draw a
line, defined by the endpoints (x1,y1,z1) and (x2,y2,z2) and draw them on
the 2D coordinate plane of the screen.  I managed to whip something up using
lots of sines and cosines and junk like that, but altho it looks decent, it
definately isn't right.  (still looks cool tho)

Also how about source for phong or ray-tracing?  


Disclaimer: none. /earth is 98% full, please delete anyone you can.
tsa@cellar.org | weeks quote:"  Whenever 'A' attempts by law to impose his
moral standards on 'B', 'A' is most likely a scoundrel"-H.L. Mencken
"Mispelled?  Impossible!  I have an error-correcting modem."
Newsgroups: comp.sys.mac.programmer
From: sorenchr@daimi.aau.dk (Soren P. Christensen)
Subject: Replacing the Finder
Keywords: Memory allocation
Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
Date: Thu, 19 Nov 92 21:47:58 GMT

I would like to substitute the Finder by a server which is accessed from the
network using PPC calls. I this way I would have a dedicated server which
would automatically start whenever the Mac is booted, or restart whenever
it quits.

This works fine - allmost....

I have 20Mb of Ram and if I configure my application to use e.g. 5Mb it works
fine, but if I set it to 6Mb or more it cannot restart. Running the "ordinary"
Finder my system consumes app. 3.8Mb.

Could it be the case that the memory allocated by one session is not released
before the next is started?
If yes, how do I introduce a delay between the quit of the application and the
automatic restart done by the system?

Any suggestions?

       Soren

---------------------------------------------------------------------
| Soren Christensen, Computer Science Department, Aarhus University |
| Ny Munkegade 116, DK-8000 Aarhus C, DENMARK                       |
| email: schristensen@daimi.aau.dk | telefax: +45 86 13 57 25       |
| phone: +45 86 12 71 88 ext. 5095 |                                |
---------------------------------------------------------------------
From: wjb@cscsun2.larc.nasa.gov (William J. Bene)
Newsgroups: comp.sys.mac.programmer
Subject: Downloading Postscript
Date: 23 Nov 1992 19:52:22 GMT
Organization: NASA Langley Research Center, Hampton, VA  USA
Reply-To: wjb@cscsun2.larc.nasa.gov (William J. Bene)
NNTP-Posting-Host: cscpk.larc.nasa.gov

Does anyone know where I can get source code to download Postscript programs 
directly to a laserwriter from an app?  In technote 91 they describe a 
technique using PicComments.  Using this I have discovered that the origin of 
my drawing is in the upper left (Quickdraw) instead of the lower left (plain 
Postscript).  Also, my Postscript is larger when it is sent to the printer, 
possibly because this method is prepending the laserprep header to my file.

For now, I have just added a transformation to orient the picture correctly, 
but I would like to avoid this extra step altogether.  Any ideas? Suggestions?

Thanks,

Will

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


Newsgroups: comp.sys.mac.programmer
From: warren@laplace.biology.yale.edu (Warren DeLano)
Subject: Re: Fixing Apples serial drivers. How???
Reply-To: warren@laplace.biology.yale.edu
Organization: Yale University, Department of Computer Science, New Haven, CT
Date: Tue, 17 Nov 1992 16:19:10 GMT

In article <alen.720823089@crash.cts.com> alen@crash.cts.com (Alen Shapiro)  
writes:
> In <Bx4vA0.Gw2@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster)  
writes:
> 
> >I don;t know what the original poster was doing wrong, but Apple's serial
> >drivers certainly do correctly implement handshaking. Anytime anyone prints
> >on a serial imagewriter, the handshaking does its stuff. Works fine.
> 
> My experience has been that with System 7.01, serial io will lose
> incomming characters while appletalk is active (I've only tested
> this with baud rates 9600 or greater...don't know the lower bound).
> 
> I have not tried any tests with my recently installed 7.1. This does NOT
> seem to be a buffer overflow problem, rather a "lost interrupt"/character
> overrun problem.
> 
> Anyone have any experience with 7.1 and serial io with appletalk talking?
> 
I've noticed the same problem with appletalk and hardware handshaking under  
System 7 and 7.1.  Although appletalk is not the exclusive cause of the  
problem, downloads tend to have many more retries if I am connected to a busy  
network.  This problem only occurs for me only on downloading and not  
uploading.

> From: oster@well.sf.ca.us (David Phillip Oster)
> 
> I don;t know what the original poster was doing wrong, but Apple's serial
> drivers certainly do correctly implement handshaking. Anytime anyone prints
> on a serial imagewriter, the handshaking does its stuff. Works fine.
> This would correlate with the post which said that --
> 

Printing to an imagewriter involves sending large amounts of data but not  
receiving.  Consequently, only transmit hardware handshaking is used during  
printing.  The problems I have seem to involve only receive hardware  
handshaking.

Anyone else encountered these symptoms?
 
========================================================
Warren Lyford DeLano  -  warren@laplace.biology.yale.edu 
Box 5061, New Haven, CT 06520 AOL:Warren CIS: 72746,1363
========================================================
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.hardware
From: coriale@casper.serum.kodak.com (Matthew Coriale (x37975))
Subject: ADB Specifications/Libraries (Q)
Summary: Need Source for Specs and/or Libraries
Keywords: ADB
Organization: Clinical Products Division, Eastman Kodak Company
Date: Wed, 18 Nov 1992 19:48:29 GMT


I am attempting to design a device for the ADB, however, I do not
know where to start to look for the electrical and software specs
for the bus.  Is there a place to get these easily?  Also is there
anyone out there who has written any drivers for devices on the 
ADB?

Thanx in Advance-
  Matt Coriale
coriale@serum.kodak.com
My Views. NOT Kodak's. Plain and Simple.

P.S. DO NOT "REPLY" TO THIS MESSAGE, YOU MUST TYPE THE ABOVE ADDRESS
MANUALLY OR I WON'T RECEIVE THE MESSAGE.  Our corporate mail-server
strips off my return address, so your mail program will try to
mail to "nobody@kodak.com".  I'm obviously one of many "nobodys" at
kodak.com :)

Newsgroups: comp.sys.mac.programmer