HDTenEightyP/NetNews huggingface dataset:
From: mgeorgy@vmsclst1.sc.csupomona.edu
Newsgroups: comp.sys.mac.programmer
Subject: Re: Screen Capture prob.  Please HELP!!!!!!
Date: 30 Sep 92 16:12:04 GMT
Organization: Computer Science Computational Systems
Nntp-Posting-User: mgeorgy

In article <1992Sep30.112025.17592@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
> mgeorgy@vmsclst1.sc.csupomona.edu writes:
>>Hello I am just starting to program the Mac...
>>Because my program does not deal with [cmd-shift-3] it
>>simple keeps it in the EVEN QUEUE until the program quits and the finder takes
>>care of them.  ...what do I need to add to my
>>program so that I can capture the screen image...?
> 
> The cmd-shift-# key combinations are processed by GetNextEvent or
> WaitNextEvent.  Your app never even sees the events.  Put a
> WaitNextEvent loop in instead of a "while(!Button());" loop, and you
> should handle all FKEYs properly.
> -- 
>  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
>  "To flame someone on an open forum is, to me, the height of insensitivity."
>    - P.J. Plauger

This sounds like a very good solution but the problem is that I am using an old
version of the Meridian Ada Compiler which does not support system 7.  Is there
another way of doing this with pre-system 7 routines???

Any Help Appreciated,
Matt Georgy
California State Polytechnic State University, Pomona  -- Computer Science
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+When It Absolutely, Positively, Has To Be Taken Out Overnight!!!+
+                                                                +
+                                           -- Team Stealth      +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Newsgroups: comp.sys.mac.programmer
From: steve.herman%express@freedom.msfc.nasa.gov (Steve Herman)
Subject: How do I get ASP Session Ref Num?
Followup-To: comp.sys.mac.programmer
Organization: BCSS
Date: Tue, 6 Oct 1992 18:20:19 GMT

   Is it possible to get an ASP session reference number for a mounted
volume given a volume name or volume reference number?  Or even a
Zone/Server/Volume?

   I would like to send a change password message to a server.  I can mount
a server volume programmatically using the new System 7 PBVolumeMount call,
but I don't know what the session reference number is.  Therefore, when I
get ready to send a password change I have to unmount the volume, reconnect
using AFPLogin (which returns a session reference number), call
AFPChangePassword, call AFPLogout, and then remount with PBVolumeMount.

   The only thing which prevents me from just directly calling
AFPChangePassword it the fact that I don't have a session reference number.

   I should be able to change the password without ever disconnecting. 
Chooser can do it.  Novell's Netware API for the Mac has calls for getting
the session ref nums for it's servers and has a changepassword call which
works while volumes are mounted.  I may not always be dealing with a Novell
server however and need a generic way of getting the session reference
number from any file server.

   Is it possible? 
  
----------------------------------------------------
- Steve Herman - BCSS
- Boeing Computer Support Services
- Huntsville, AL
----------------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: wysocki@netcom.com (Chris Wysocki)
Subject: Re: Quickdraw region implementation
Date: Tue, 29 Sep 92 01:56:37 GMT
Organization: Connectix Corporation, San Mateo, CA

In article <2AC784E4.20055@ics.uci.edu> dbassett@ics.uci.edu (Douglas
Scott Bassett) writes:

>Does anyone know exactly how Quickdraw regions are implemented on the MAC?

A QuickDraw region consists of a series of "inversion points", i.e.
points at which one goes from outside the region to inside or vice
versa.  These points are stored in ascending scanline order following
the rgnSize and rgnBBox fields in the region handle.  Each scanline in
the region data starts with the vertical coordinate, followed by the
horizontal coordinates of the inversion points on that scanline.
(Since regions are closed, there are always an even number of
horizontal coordinates per scanline.)  The last horizontal coordinate
on a scanline is followed by $7FFF, which marks the end of the
scanline data.  This is repeated for each scanline in the region; a
vertical coordinate of $7FFF marks the end of the region data.
Rectangular regions are the one exception to this format; such regions
contain no inversion point data (i.e. "GetHandleSize(theRegion) ==
sizeof(Region)") and are fully described by their bounding rectangle
(the rgnBBox field).



-- 
Chris Wysocki
wysocki@netcom.com
afachrisw@aol.com
From: william.zwicky@cray.com (Bill Zwicky)
Subject: AppleSingle Conversion
Followup-To: comp.sys.mac.system
Organization: Cray Research
Date: 28 Sep 92 17:12:53 CDT

Does anyone know of a Mac file utility that will convert between
AppleSingle format and the native Mac format.  I've looked 
on a few anonymous ftp sites but can't seem to find anything.

Thanks,

Bill Zwicky

"He is no fool who gives up what he cannot keep
 to gain what he cannot lose"   --- Jim Elliot
From: jst@dcs.ed.ac.uk (Julian Turnbull)
Newsgroups: comp.sys.mac.programmer
Subject: Using ReadXPRam and WriteXPRam traps
Date: 30 Sep 92 08:56:51 GMT
Reply-To: jst@dcs.ed.ac.uk (Julian Turnbull)
Organization: Department of Computer Science, Edinburgh University

[ Sorry if you're seeing this twice - I posted a couple of weeks ago, with
  a restricted distribution, but got no response, so I'm casting the net a
  bit wider this time.  JST ]

I'm trying to find some documentation for the _ReadXPRam and _WriteXPRam
traps, which read and write the extended PRAM found in later Macs.
Specifically, I want to be able to get at the latitude, longitude, and
timezone information set by the Map cdev.

"Inside Mac" is remarkably coy about these calls - I got to Volume VI before
I even found an admission that they exist.  However, some people manage to
use them, so the information must exist _somewhere_.  Can anyone enlighten
me?

Thanks in advance,
Julian.


--
| Julian Turnbull,                               | Phone: +44 31 650 5124
| Department of Computer Science                 | JANET: jst@uk.ac.ed.dcs
| University of Edinburgh, Edinburgh EH9 3JZ,    | Everywhere else:
| Scotland, U.K.                                 |        jst@dcs.ed.ac.uk
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: What does DrawPicture() want?
Followup-To: comp.sys.mac.programmer
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<lsr-250992163555@lsr.taligent.com>
Date: Sat, 26 Sep 1992 12:10:22 GMT

> lsr@taligent.com (Larry Rosenstein) writes:

   > Did you lock the picthandle before you called drawpicture? DrawPicture
   > is a routine that WILL move memory.

   I didn't think this was necessary.  QuickDraw should lock the handle if it
   needs to.

Keyword is "should." At least in some versions, it doesn't.
This has bitten me and everyone I know sometime...

-- 
Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069

"From now on, I think I'll re-label the EQ on the
 desk as Fizz and Wobble, rather than HF and LF."
Newsgroups: comp.sys.mac.programmer
From: olson@groucho.wi.edu (Eric K. Olson)
Subject: Another Sound Manager Question (recording on PB)
Organization: Whitehead Institute for Biomedical Research
Date: Tue, 6 Oct 1992 18:04:58 GMT

I've been trying to get SPBRecordToFile() to do its thing for me,
on a PowerBook 170, running 7.0.1 + TuneUp 1.1.1, without too much
luck.  Here's what I'm doing (schematically):

	- Opening a data file (fsRdWrPerm).
	- Opening the default sound device with siWritePermission.
	- Getting the sample rate, sample size, number of channels,
		and compression type from SPBGetDeviceInfo().
	- Calling SetupAIFFHeader with the information received from
		SPBGetDeviceInfo(), the file refnum, and a buffer
		length (which is fixed at 64K).
	- Calling SPBRecordToFile() with the file refnum, a SPB, and
		the async flag set to FALSE.  The SPB has only
		the inRefNum and the count fields set to non-zero
		values (and the count field is set to 64K).
	- Closing the data file.
	- Closing the sound device.

I've looked at the info returned from SPBGetDeviceInfo():  it is all
very normal, 8 bits/sample, 'NONE' compression, one channel.

When I play back with SndStartFilePlay() I hear that the file
has the sound in it, but with a LOT of very gravelly noise on top of it.

Other things I've tried that work:

	- Playing sound files recorded with SndRecordToFile() with
		the _same_ playback routine as above
	- Recording and playing in memory using SPBSetupSndHeader()

I tried opening a sound channel before recording (not that it should
matter), but that didn't change anything.  I think that the playback
routine is OK, since it works with files recorded via
SndRecordToFile() (the routine that displays the recording dialog).  I
looked at the AIFF file and it seems to be in the correct format.  I
suspect that the actual samples being recorded are corrupted somehow
before being written to the disk.  Why does SndRecordToFile() work
when my routine fails?  Is the PowerBook actually unable to record
directly to disk (and is SndRecordToFile() not going directly to
disk, but faking it by going to memory first)?

I also noticed that the 'qual' and 'chac' selectors don't work in
SPBGetDeviceInfo().  Strange....

Any Ideas?

Thanks!

-Eric


-- 
Eric K. Olson
Whitehead Institute for Biomedical Research
9 Cambridge Center, Cambridge, MA     02142
olson@genome.wi.edu	     (617) 258-5572
Newsgroups: comp.sys.mac.programmer
From: stratton@cwis.unomaha.edu (Dan Stratton)
Subject: WANTED: Pascal Compiler
Organization: University of Nebraska at Omaha
Date: Tue, 29 Sep 1992 03:21:21 GMT

Hello All!

I am looking for a low-cost Pascal compiler / editor to use with my Macintosh.
Can anyone make a recommendation? Cost is very important and I only need it 
to finish this semester.

Thanks,
Dan Stratton
-- 
               --------------------------------------------
                               Dan Stratton
                    INTERNET: stratton@cwis.unomaha.edu
                          FIDONET: 1:285/14.300
From: peterc@cubetech.com (Peter Creath)
Newsgroups: comp.sys.mac.programmer
Subject: TCL archives
Date: Mon, 5 Oct 92 22:42:14 CDT
Organization: Cube Technologies
Reply-To: peterc@cubetech.com

Where's the FTP site where all the shareware/freeware TCL classes
are archived?

And has anybody made a popup/edit menu like MSWord's?  (EditText with
an arrow to the right)


----------------------------------------------------------------------------
Peter Creath                 "When I was a boy I was told that anybody could
peterc@cubetech.com           become president; I'm beginning to believe it."
                                                           -- Clarence Darrow
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: laser_prep question
Date: 27 Sep 92 11:59:46 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <92Sep22.182506.25143@acs.ucalgary.ca>,
edstrom@Elmer.hsc.ucalgary.ca (John Edstrom) wrote:
> 
> 
> I want to print a document prepared on a Mac on a plain postscript
> printer. The postscript file generated by MSWord will not print on a
> regular printer. It seems to be lacking a number of postscript
> functions or procedures.

Thats true, as MsWord depends on the Mac Os to map its QD calls into a PS
stream.  I get the impression that this printer might be offline?  If so,
you need to tell the LW driver to include the prelude along with the file
when it prints to disk.  Normally the prelude resides in the printer
between jobs, and is only sent with a job when no prelude exists, or when
the version in the printer differs from the one used  to setup the job. 
That can only happen on a shared printer, or on the private printer of a
user who switches between different system versions.

Some context would help, what version system, LW Driver, MsWord, what
printer, how did you get a PS file out of Word (presumably via sytem
suppoorted print-to-disk?)

> I looked in laser_prep but that has lots of non-printing characters
> and is rejected by my postscript laser printer.

non printing characters ???  The significant data in laser prep is
plaintext, some portions are encoded in hex, which while cryptic, is still
plain text.

level 1 PS is required to be plaintext (7 bit at that).  But the file you
saw may have been intended for the eyes of the laserWriter driver, and may
have some portions in binary.  There is a way to capture the text of 'md'
(the name the LW prelude uses internally) which is sent to the laserprinter
in its normal context (print to disk with prelude), and if you examine
that, you will see plaintext postscript.

> Does somebody have a prefix postscript file that will allow me to
> print the mac-generated postscript files?

Yes, you do.  Just use print to disk properly.  See your system 6/7
manuals, or look at a 3rd party book.


--

Dana S Emery <de19@umail.umd.edu> | "Novo, de Novo,
                                  |     de novo, de no-o-o-o-o---, 
                                  | Novemba come an' dey gonna go home."
Newsgroups: comp.sys.mac.programmer
Distribution: world
From: sharkman@magicbb.uucp (Matt Daw)
Organization: MAGIC - Macintosh Awareness Group In Canada
Date: Thu, 24 Sep 1992 17:06:23 EST
Subject: Re: Disassembler?

I have a program that will give me assembly back but I was talking about
like C or Pascal source files? If there is such a thing...what I want to
do is to dissasemble some registered shareware and find out how they
work to help me learn....
Newsgroups: comp.sys.mac.programmer
Subject: Re: Moving the mouse pointer-- how?
From: zocca@amc.uva.nl (Vincent Zocca)
Date: Sun, 4 Oct 1992 10:34:08 GMT
Followup-To: comp.sys.mac.programmer
Organization: Uni. of Amsterdam, Fac. of Med.

In article <BvGLsF.F1n@news.cso.uiuc.edu>, jkreibic@sumter.cso.uiuc.edu
(Jay Arnold Kreibich) wrote:
>   I am writing a driver program that needs to move the mouse cursor  
> location around the screen, but I'm not quite sure how to do that.  Any  
> tips on where to lookup functions that will assign a new mouse pointer  
> location?

As far as I know it just can't be done. I think you've got to hide the
cursor and make apear something that looks like a cursor but isn't.


 ------------------------------------------
|         Vincent Zocca                    |
|                                          |
|         University of Amsterdam          |
|         Faculty of medicine              |
|         Meibergdreef 9                   |
|         1105 AZ Amsterdam                |
|         Phone: (***31) (0)20 5664403     |
 ------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: mspace@netcom.com (Brian Hall)
Subject: Virus apps that handle Apple Events/Calling API
Date: Tue, 29 Sep 92 04:46:34 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 

What virus scanning applications (commerical or otherwise) support being
called from another application, either via Apple Events or other API?

-- 

 \ | /   | Brian Hall                 mspace@netcom.com
 - : -   | Mark/Space Softworks       Applelink: markspace
  /|\    |                            America Online: MarkSpace
 |-+-|   |
/-\|/-\  | PUI. Programming Under the Influence.
Newsgroups: comp.sys.mac.programmer
From: Stephan Bublava <stephan@iguwnext.tuwien.ac.at>
Subject: RectInRgn Problem
X-Xxmessage-Id: <A6F71F2103012E02@htumac1.tuwien.ac.at>
X-Xxdate: Tue, 6 Oct 92 10: 46:57 GMT
Organization: Fachschaft Informatik, TU Wien
X-Useragent: Nuntius v1.1.1d11
Date: Tue, 6 Oct 1992 09:46:41 GMT

I have a strange problem with RectInRgn:

My drawing routine tests if its rect intersects the vis region of
the window using RectInRgn and only draws if RectInRgn returns true.

If the machine is running System 7 everything works fine (tested 
on a SE/30, IIci, IIsi, Classic). 

However using System 6 (.0.7) RectInRgn always returns false (tested
only on a MacPlus).

Any ideas??

Stephan Bublava
stephan@iguwnext.tuwien.ac.at
From: siegel@world.std.com (Rich Siegel)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C bug ? (updated)
Date: 6 Oct 92 13:21:55 GMT
Article-I.D.: world.BvpBsK.LA3
Organization: GCC Technologies

In article <Meessen-061092111325@130.104.58.10> Meessen@slig.ucl.ac.be (Christophe Meessen) writes:

>But now, when I write the following program the compilation stops and tell
>me that there is an error :
>
>main() {
>   short i = 3;
>
>   printf( "a number : %d ! \n", i );
>
>   printf( "Hello world !" );  <== Wrong number of parameters here !!!!
>}
>
>It was unexpected and made a bad impression on my friend.
>
>The problem seems related to printf signature (or prototype).
>
>If I change the "wrong" line to 
>
>   printf( "Hello world !", i );
>
>Every thing works fine !!
>
>Very strange, isn't it ?
>
>Is this standard C or Think C bug ?
>Any comment on that ?

Since the first usage of printf() had only one argument, the compiler
inferred a prototype for printf() as having only one argument. This
is legitimate behavior, and not a bug. There are a number of things
you can do:

1) Turn on "Require Prototypes" in the Language settings. You'll then
be required to include <stdio.h>, which has the correct explicit prototype
for printf().

2) Leave the setting as is, and include <stdio.h>, which will include the
explicit prototype for printf().

R.


-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Software Engineer & Toolsmith
GCC Technologies
Newsgroups: comp.sys.mac.programmer
From: chrism@col.hp.com (Chris Magnuson)
Subject: HELP: Where is gawk or awk (MPW)?
Date: Tue, 29 Sep 1992 21:33:40 GMT
Organization: HP Colorado Springs Division

  If you know where an awk or gawk (GNU) port of the awk tool
is I would like to hear from you.  I want to use this tool under
MPW.

Thanks
chrism@col.hp.com
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: app wants to set folder location for finder
Date: 28 Sep 92 14:37:17 GMT
Followup-To: comp.sys.mac.programmer, sale@els.xyplex.com
Organization: Personal

I'm posting this on behalf of Ed Sales, who only has mail access.

Please respond to his mail address, as well as to csmp.



--

Subject: How can an app set file/folder icon locations in Finder
 windows?

From: sale@els.xyplex.com (Ed Sale)

I'm writing a small program and would like it to be able to tell the
Finder where to position newly created files and folders inside of its
folder display windows.  It's putting the file icons where I want it
to, but I'm having trouble with folder icons.

I have tried using PBGetCatInfo() on a folder, modifying the
dirInfo.ioDrUsrWds.frLocation field, then doing a PBSetCatInfo().
This usually works on folders that have not been recently created -
although sometimes the finder window has to be closed and re-opened
for the icons to appear in their new locations. 

When I try the following:

FSpDirCreate();
PBGetCatInfo();
/* change dirInfo.ioDrUsrWds.frLocation */
PBSetCatInfo();
PBGetCatInfo();

the dirInfo.ioDrUsrWds.frLocation field shows the requested icon
position, but the Finder winds up putting the folder wherever it wants
to.

Is there an approved way to get the Finder to do what I want?
Where can I find a list of Apple Events supported by the Finder?

Any help that you could share with me would be greatly appreciated.

  -- Ed Sale   elsale@eg.xyplex.com

BTW: I'm using Think-C 5.0.3 on a IIsi using System Software 7.0
     without the tune-up.
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: >moving the mouse
Organization: Kalamazoo College
Date: Sun, 4 Oct 1992 23:52:31 GMT

creiman@netcom.com (Charles Reiman) writes:
>
>From memory, you must change
>both MTemp and RawMouse to the coordinate you want. That should do the
>trick. Note that this is dangerous, since a VBL could hit while you are
>changing the variables, and the jCrsrTask will proceed to move the
>pointer on its own to a strange new location.

Hmmmmm, interesting.  Have you tried setting the byte at CrsrBusy
(0x08CD) while you change the globals?  That might keep the system off
your back...?
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 I tried to sleep my way to the top
 But my alarm clock always woke me right up
Newsgroups: comp.sys.mac.programmer
From: Joel Sumner <js17@cornell.edu>
Subject: MACSBUG Dcmd for "Shut Down"
X-Xxdate: Mon, 28 Sep 92 16: 23:17 GMT
Nntp-Posting-User: js17@cornell.edu
Organization: Trapped at Cornell University
X-Useragent: Nuntius v1.1.1d7
Date: Mon, 28 Sep 1992 20:19:54 GMT

Has anyone written a "Shut Down" or "Power Off" DCMD for MacsBug?  I have
a 
powerbook 100 and the ONLY way to shut off the power is from the Finder 
ShutDown command (there is this thing about not having a power switch or
a power cord to unplug that causes problems... <grin>).  Occasionally,
when I crash the thing, I  don't want to wait for it to do a full re-boot
just to select "Shut Down".  Has anyone written a Macs Bug DCMD (or any
other method from MacsBug) which will do the same thing?  Not even a full
OS shutdown, just a "Power Off" would be nice....

-Joel
Joel Sumner
js17@cornell.edu
q4kx@cornella (Bitnet)
-----------------------------------------------------------
.sig under construction (like the rest of Cornell)
From: dent@DIALix.oz.au (Andrew Dent)
Subject: Re: Looking for LDEF
Organization: DIALix Services, Perth, Western Australia
Date: Wed, 30 Sep 92 08:21:02 GMT

DataPak also have a C library (inc source) called Bag of Tricks. It has
some simpler ListBox routines if you just want single column lists, with
hooks for extending to more complex lists.

Their list includes fixed width tabs, multiple selections and comes with
additional routines to make setting up dialogs VERY easy. They include a 
complex example with multiple lists/dialog and font-size outlining.

I've just finished an external for FoxBase+/Mac which used the Bag of Tricks
lists and I found them VERY easy to use and easily adapted to an A4 world.

Andy Dent (A.D. Software - Mac & VAX programming)
94 Bermuda Dve, BALLAJURA  Western Australia  6066
Phone/Fax: 09 249 2719 (local)  +619 249 2719 (International)
       Internet: dent@DIALix.oz.au    Compuserve: 100033,3241
From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
Newsgroups: comp.sys.mac.programmer
Subject: Re: ADSP CTB Tool
Date: 5 Oct 1992 15:41:05 GMT
Followup-To: comp.sys.mac.programmer
Organization: Academic Computing

In article <1992Oct4.184556.4855@netcom.com>, mspace@netcom.com (Brian
Hall) wrote:
> 
> cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes:
> >1) Is version 1.0 the latest version?
> 
> Yes.
> 
> >2) Is it possible to use this tool to connect 2 processes on the same Mac?
> >(Don't ask why, or suggest AppleEvents. It's for debugging purposes, and I
> >can't seem to make it work.)
> 
> Yes, but I seem to remember a problem and a work-around for it. Memory
> is cloudy, but I think you will have problems if you use synchronous i/o
> to an ADSP session on the same machine.  The solution being to write
> you i/o to use asynch calls.
> 

That makes sense. I changed all my I/O to asynch calls and the thing works
like a champ. 

I wish Apple would spend some summer hire's time and upgrade these tools.
The serial tool doesn't work with ARA, ADSP is flakey, etc. Either that, or
release the source as sample source code.

--_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Chuck Shotton                      |    
Ass't Director, Academic Computing |       "This space for rent."
UT Health Science Center Houston   |  
cshotton@oac.hsc.uth.tmc.edu       |         
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-