HDTenEightyP/NetNews huggingface dataset:
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: Re: Reading binary input
Organization: The World Public Access UNIX, Brookline, MA
Date: Fri, 10 Apr 1992 14:19:32 GMT

<< This is a posting on behalf of a student without News access.  He wants source
code (any language) which takes a stream of binary input from a synchronous A/D
converter plugged into a serial port of a IIci, and read it into a file. 
Someone has already suggested using the Sound Manager library, any comments on
this, or other suggestions? >>

You might want to check out the MacRecorder Hackers Toolkit which may
still be available from Macromind/Paracomp. I know it's on America Online
and probably CI$. It shows how to read and write audio data to the serial
port and may be what you need.


-- 
<--------------------------------------------------->
 joe zobkiw                     zobkiw@world.std.com
 mac.synthesis.MIDI.development.C.asm.communications
>---------------------------------------------------<
From: stauffer@cc.swarthmore.edu (R. Glenn Stauffer)
Newsgroups: comp.sys.mac.programmer
Subject: Apple Installer Scripts
Date: 14 Apr 92 18:17:26 GMT
Organization: Swarthmore College Computing Center
X-Useragent: Nuntius v1.1a2

I am trying to patch the installer script that came with WordPerfect to
facilitate
installation of the software from a network drive.

Can someone give me a clue as to how I can go about editing the included
script or creating my
own?

R. Glenn Stauffer
Micro-Computer Specialist, Swarthmore College Computing Center
Internet: stauffer@cc.swarthmore.edu
Newsgroups: comp.sys.mac.programmer
From: worm@cs.scarolina.edu (Dave Wormuth)
Subject: MacTutor volumes for sale
Summary: Best of MacTutor Volumes and CD-ROM for sale
Keywords: mactutor
Organization: USC  Department of Computer Science
Distribution: usa
Date: 13 Apr 92 03:17:18 GMT

For Sale:

CD-ROM The Best of MacTutor vol 1-5 (Source Code)  $45
Paper copies of The Best of MacTutor volumes 1-5 $20 each

Shipping included (ground).

Best offers considered.

David W. Wormuth
Department of Surgery
SUNY HSC Syracuse
750 East Adams Street
Syracuse, NY 13210-2306
Phone 	(315) 638-7669
Fax 	(315) 464-6238
Beeper	(315) 441-2731
Internet: wormuthd@vax.cs.hscsyr.edu

Newsgroups: comp.sys.mac.programmer
From: dougm@cns.caltech.edu (Doug McNought)
Subject: PBCatSearch and related issues
Organization: California Institute of Technology
Date: Mon, 13 Apr 1992 14:42:51 GMT


  This is the first time I've really gotten down-and-dirty with the File 
Manager, and it's raised a couple of questions:

1) I have an FSSpec that contains:
    -vRefNum
    -dirID
    -the name of a directory whose parent is the dirID above
I need the directory ID of the child (i.e. the target of the FSSpec).

The best way I have found so far to do this involves opening a WD, calling
GetWDInfo to get the dirID, and closing the WD again. This works fine but
strikes me as ugly, since we're admonished constantly that working directories
are simply a hack for programs that don't know about HFS. I can't see any
way to get this ID with PBGetCatInfo, no matter what I pass for ioFDirIndex--
it still needs a vRefNum (or WDRefnum) for the parent directory, and if I'm 
going to create a WD anyway it's easiest to use PBGetWDInfo. So, the question
here is: Can this be done without working directories? 

Question 2:
  I want to use PBCatSearch to find files with a given type and creator *in
a given directory*. Using the code snippet on ftp.apple.com, I wrote code that
sets two bits in the search flags (Finder info and parent ID), puts the 
type, creator, and parent ID in the appropriate fields in the first search
record, and puts 0xffffffff in the same places in the second (mask) search
record. The result is, that PBCatSearch finds *all* the files with type and
creator matching what I want, in any directory on the HD. If I remove the mask
in the parID field of the second search block, it finds no files at all. I'm
looking for a middle ground here... So, more questions:
 --Is PBCatSearch overkill here, given that I'm only searching one directory,
   and nonrecursively at that? (Only going one level deep)
 --How do I get PBCatSearch to do what I want?
If anyone needs more information to answer these, feel free to email me and 
I'll send you my code. Posted or emailed answers are welcome.
thanx,
doug


--
<><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
<> Doug McNaught                          dougm@descartes.caltech.edu <>
<>  Help!!! I'm addicted to *Spaceward Ho!* Is there a support group? <>
<><><><><><><><><><><><><><><>Go Orioles<><><><><><><><><><><><><><><><>
From: jahnke@biosci.arizona.edu (Jerome Jahnke)
Newsgroups: comp.sys.mac.programmer
Subject: Re: PLookupName weirdness
Date: 7 Apr 92 19:08:05 GMT
Organization: Biology Learning Center

In article <643@pacvax.UUCP>, tjc@pacvax.UUCP (Tom Colley) writes:
> If you had said the ioResult field was 1, I would say it sounds as if you 
> are making an asynchronous call (async calls stuff a 1 into ioResult
> until they complete).  But you said the function returns a 1.  It sounds
> like you are assigning the result of a comparison instead of comparing the
> assignment.
> 

Much to my chagrin you are closer than you know. It was not quite what you
stated, but instead I this is what my code looked like:

     My Problem
         |
         v 
TheErr = !PLookupName( &TheMPP, false );
if(TheErr != noErr)
     cout << "The Result of PLookup was: " << TheErr << "\n";

All I can say in my defense is it was late, I had too much caffine, space 
aliens stole both my socks and my brain, ummmm the dog distracted me and the
cat typed it in. I don't know, but thanks all for you help. It is amazing
what a good nights sleep will do for you.

> Tom Colley
> Pacer Software Inc.
> <tjc@pacersoft.com>

Jer,
----
Jerome Jahnke
Biology Learning Center
University of Arizona
'jahnke@biosci.arizona.edu' or +1 (602) 621-3820
From: bhanafee@deimos.ads.com (Brian Hanafee)
Newsgroups: comp.sys.mac.programmer
Subject: Can't tell if I've been here before
Date: 6 Apr 92 19:01:15 GMT
Article-I.D.: deimos.BHANAFEE.92Apr6110115
Distribution: comp
Organization: Advanced Decision Systems, Mountain View, CA 94043, +1 (415)
	960-7300


   Help!  I'm trying to debug an XTND translator, and I'm having
trouble with initializing my global area.  The basic problem is that,
if the file I'm translating has a resource fork (which I do need to
translate), then MacWrite II calls my translator with the
ImportGetResources directive first, *before* it sends the
ImportInitAll directive.  In that case, I need to allocate my globals
during the ImportGetResources call.  If there is no resource fork in
the file to be translated, then I don't get an ImportGetResources
directive at all.  When I get my ImportInitAll directive, I need some
way to figure out if I've already allocated my global area during a
previous ImportGetResources.

   What I was doing is calling GetHandleSize on my global handle,
since IM says it will return 0 if there is an error during the call
(e.g.  if I haven't allocated the globals yet).  This works most of
the time, but what IM doesn't say is that GetHandleSize seems to cause
a bus error in some cases depending on the value of the non-handle.
What I think I need is some safe way to test if a value is a handle or
not, or at least check if GetHandleSize will choke on it or not.

   I can use the translatorState field of the ImportParamBlk to save a
flag when I get the globals, but that field doesn't seem to be
initialized either, so it'll still only reduce the probability of an
error; I can't think of a way to eliminate the problem.

   How can I tell for sure if I've already allocated my global handle?

--
Brian Hanafee                         Advanced Decision Systems
bhanafee@ads.com                      1500 Plymouth Street
(415) 960-7300                        Mountain View, CA 94043-1230
From: time@ice.com (Tim Endres)
Newsgroups: comp.sys.mac.programmer
Subject: Password specification for AppleEvents?
Date: 13 Apr 92 16:07:33 GMT
Article-I.D.: tbomb.1CE00001.0u6vl2
Reply-To: time@ice.com (Tim Endres)
Organization: ICE Engineering, Inc.
X-Mailer: uAccess - Macintosh Release: 1.5v5


When I send an Apple Event, the first execution puts up the password
prompt dialog box. This is fucked for background execution. How do
I send an Apple Event and specify the password to avoid this dialog?


tim endres - time@ice.com  -or-  uupsi!tbomb!time
ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208
8840 Main Street, Whitmore Lake, MI  48189
USENET - a slow moving self parody... ph
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Mapping one color to another - help!
Organization: Kalamazoo College
Date: Tue, 14 Apr 1992 13:06:08 GMT

krk@itl.itd.umich.edu (Kenneth Knight) writes:
>
>...all the pixels in an image (32 bit deep GWorld) of the specified
>color will have their color changed to the current foreground color. I thought
>that using the SetEntries() toolbox call to modify the 32-bit deep GWorld's
>CLUT would make sense, but I can not figure out where the current color, the
>one that will be changed, is in the CLUT.

A 32-bit-deep graphics image stores the color values directly, and
doesn't need a color lookup table.  I'll bet there isn't a CLUT there,
or if there is, changing it probably won't do you any good.
Try checking out (**GetGWorldDevice(yourGWorld)).gdType.  CLUT devices
return 0;  yours should be 2.  Read the chapter on Graphics Devices for
more info (IM6's is better than IM5's, it talks about GWorlds).

You'll probably want to just scan through the data a longword at a time,
reading in a pixel and changing it if it matches the proper color.
-- 
 Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
 Ceci n'est pas une .signature.
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Apple Installer and Compression
Date: 15 Apr 92 17:16:30 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <258@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes:

> I don't think any of the other standard
> compression utilities, StuffIt, Compact Pro, etc.
> offer decompression in Apple's Installer.

I think they do. I recall installing something that used Apple's Installer
and StuffIt compression, but I can't remember which application it was.

It wasn't Canvas... :-}

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
Xref: sparky comp.sys.mac.programmer:7853 comp.sys.mac.misc:8734
From: John_Jenkins@taligent.com (John H. Jenkins)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.misc
Subject: Re: Localization (was: ResEdit Easter Eggs)
Date: 6 Apr 92 15:30:17 GMT
Organization: Taligent, Inc.

In article <32999@imag.imag.fr>, gourdol@imag.fr (Arno Gourdol) writes:
> 
> [How you can make a chinese system by starting with a US system
> and adding 'localization' resources in the system]
> >If the experts in Taiwan and at Apple who produced this want to work on
> >other country localizations, really global Macs will result!
> 
> It is rumored (or, if it wasn't now it is) that System 7.1 due in
> September will contain this 'feature' for every languages.
> That is, instead of localizing say, a french version of the system,
> you will use a 'standard' System 7 with added 'french' resources.
> This way, you should be able to use multi-lingual systems,
> for example french, english, japanese and arabic. Isn't life fun :-)
> 
> Arno.


Actually, System 7.0 already has this capacity.  By just dropping a bunch
of stuff into my system folder, I added the ability to handle Hebrew in
addition to English, for example -- at least in programs that use the
Script Manager correctly :-(

System 7.1 will make it possible to do this for the two-byte systems
(both Chineses, Japanese, and Korean) in addition to the one-byte ones.

John H. Jenkins
John_Jenkins@taligent.com
From: gerson@parc.xerox.com (Dan Gerson)
Newsgroups: comp.sys.mac.programmer
Subject: long QuickTime recording with sound
Date: 13 Apr 92 23:01:11 GMT
Article-I.D.: dupin.GERSON.92Apr13160111
Distribution: comp
Organization: Xerox PARC, Palo Alto, CA

I'm writing a QuickTime application which digitizes and stores movies in a
large-scale database.  Sometimes, short clips are digitized into a movie, but
sometimes long portions of an input tape need to be digitized.

If I don't record sound, I seem to have no problem and can successfully make
movies 20 minutes long or more.  However, as soon as I start digitizing sound
(say, at 11KHz), after about 7-10 minutes of recording QuickTime simply stops
recording, and fails to write out the movie resource for the 7-10 minutes it
did record.  (SGIdle doesn't appear to be returning an error - it just stops
recording and enters preview mode.)

I'm guessing that the Sequence Grabber sound channel component is hitting the
64K limitation on a sound resource.  The Movie Controller portion of the
QuickTime reference manual talks about the difference between using a single
sound segment v.s. interleaving the sound and video (p 2-28), which seems
to address exactly this kind of problem.  But the only other reference I've
seen to interleaved sound and video is in FlattenMovie and FlattenMovieData,
which don't seem to be applicable for creating movies using the Sequence
Grabber Component.  In fact, the only control which seems relevant is
SGSoundRecordChunkSize, but that seems to default to 2 second chunks,
which would not present a problem.  (Of course, I haven't tested setting
this yet, and am about to do so, but I don't expect it to help.)

Anyone else have any ideas about whether the problem is indeed a resource
size limit, and if so, how to get the sequence grabber component to do
interleaved sound and video?

(I'm running QuickTime 1.0 from the QuickTime Developer's CD using a
MacRecorder with the MacRecorder sound driver INIT and presumably the
standard Apple sound manager sound channel component.  And this is on
a MacIIfx running 7.0.1 with TuneUp 1.1 and in 32bit mode (although I
believe the problem persists in non-32bit mode).)
--

Dan Gerson					gerson@parc.xerox.com
Xerox Palo Alto Research Center			415-494-4745
3333 Coyote Hill Road
Palo Alto, CA 94304
USA
Newsgroups: comp.sys.mac.programmer
From: jbush@magnus.acs.ohio-state.edu (John E Bush)
Subject: Re: ThinkPascal
Keywords: Pascal graphics
Organization: The Ohio State University
Date: Thu, 16 Apr 1992 12:04:33 GMT

In article <1355@spam.ua.oz> pscott@spam.ua.oz (Paul Scott) writes:
>I am using ThinkPascal 4.0 with System 6.0.5. I have three problems associated
>with graphics programs.

[Stuff Removed]

>(2) When working with cartesian axes, is there any easy way of reversing the
>y-axis and corresponding coordinates, so that coordinates on the screen
>correspond to 'real life'?! - ie y-axis up instead of down?
>
[Stuff Removed]

All you have to do is take Y max and subtract your value from it.  So, if
Y Max is 200, and you want something plotted 5 pixels from the bottom like
a normal math problem, gave a const value for y_max or something similar and
in your pltting equation say y_max-value.  In the above example, it would
result in the value being plotted at 195.

Eric
Newsgroups: comp.sys.mac.programmer
From: Gavin Eadie <gavin.eadie@umich.edu>
Subject: Re: Writing apps that use plug-ins?
Organization: University of Michigan
X-Useragent: Nuntius v1.1a2
Date: Thu, 9 Apr 92 13:25:16 GMT

>writing a BBS program, and I have routines to do i/o over the connection
(with
>the CTB, of course...); how can I have the plug-in call routines within
my
>program's code?

	The usual trick for this is to pass a parameter to your plug-in that is
the
	address of a list of routine addresses (sometimes called a transfer
vector).
	Then the plug in can call back to your main program via the addresses
that
	you provide therein ...

Gavin Eadie, U of Michigan Information Systems
From: roy@adeptsln.cts.com
Newsgroups: comp.sys.mac.programmer
Subject: Re: Writing apps that use plug-ins?
Date: 10 Apr 92 19:28:58 GMT
Article-I.D.: adeptsln.1992Apr10.192858.2439
Reply-To: roy@adeptsln.cts.com
Organization: Adept Solutions

In article <1992Apr7.232048.9295@sbcs.sunysb.edu> rhorn@csws11.ic.sunysb.edu  
(Robert Horn) writes:
> In article <01050133.0do71a@caligula.cts.com> edw@caligula.cts.com (Ed  
Watkeys) writes:
> (Pascal can't do this as it doesn't allow you to call a function through a
> pointer.) (you might want to glance at your favorite(sp?) C book's section on
> pointers to functions)

If HyperCard can, then you certainly can, and here's how. First you define a  
calling structure for your code resource. I usually use one parameter, a  
app-specific param block, so the code-resource routine looks something like:

Function CodeMain(blockPtr:myParamBlockPtr):OSErr;

Then in my app, I have a stub that looks like:

function CallCodeRSRC(blockPtr:myParamBlockPtr; codeResource:Handle):OSErr;
INLINE $205F, $2050, $4E90;

The inline's basically pop the handle off the stack, dereference it, then jump  
to it. Be sure to lock down the codeResource after getting it.

If have a routine in your app, that you wanted to call in the resource, first  
make a procPtr field in your parameter block. (myParamBlockRec, in our case);
	
	myParamBlockRec.myRoutine := @myRoutine;
	..
	codeResource := GetResource('myCO',128);	{ What you compiled }
	HLock(codeResource);
	err := CallCodeRSRC(&myParamBlockRec,codeResource);
	..

Assuming there is a 

	Function myRoutine(var r:Rect):Boolean;

in your app, you would call back this routine, in your code resource, by
having a stub that has the same parameters, (including return value), with an  
additional procPtr at the end.

	Function appMyRoutine(var r:Rect; callback:ProcPtr):Boolean;
	INLINE $205F,$4E90;

Therefore, in your code resource, to call the app routine, you have this:

	Function CodeMain(blockPtr:myParamBlockPtr):OSErr;
	var
		b:Boolean;
		r:Rect;
	begin
		..
		b := appMyRoutine(r,myParamBlockPtr^.myRoutine);
		..
	end;

The INLINE stuff is an assembly glue to do what 'c' can do syntactically.
the code would have simply been:

	b = (*myParamBlockPtr->myRoutine)(&r);

and for calling a handle:

	err = (**codeResource)(&myParamBlockRec);

(With all the appropriate prototyping & type checking left as an exercise for  
the reader). :-)

Hope this helps.
-- 
Roy Lovejoy      | internet:  roy@adeptsln.cts.com
Head RGB Guy     | AppleLink: adept
Adept Solutions  | CIS:       72447,1447
.................| dual certified developer: NeXT & Apple ;)
Newsgroups: comp.sys.mac.programmer
From: mike@zorch.SF-Bay.ORG (Mike Smithwick)
Subject: Re: Printing to a laser writer, problems
Organization: SF-Bay Public-Access Unix
Date: Wed, 8 Apr 1992 06:51:01 GMT

In article <1992Apr7.031234.21307@zorch.SF-Bay.ORG> mike@zorch.SF-Bay.ORG (Mike Smithwick) writes:
>[]
>
>I am working on a screen-dump routine for my SW, and have it working 
>fine on an antique imagewriter, but it fails on a Laser printer.
>
>PrError returns "-192" after the PrOpenDoc() call which means "resource not 
>found"?!?!?! What resource do I need for working with a laser printer.
>I thought the interface was supposed to be transparent to the programmer.
>

One additional note. Yes, the laser printer is hooked up and WORKS with
other software, but fails with mine.

mike



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

Mike Smithwick - ames!zorch!mike
From: kevin@crash.cts.com (Kevin Hill)
Newsgroups: comp.sys.mac.programmer
Subject: WANTED:  PROGRAMMING JOB IN SAN DIEGO
Date: 16 Apr 92 00:08:16 GMT
Article-I.D.: crash.1992Apr16.000816.17098
Reply-To: kevin@crash.cts.com (Kevin Hill)
Organization: Crash TimeSharing, El Cajon, CA


  I am looking for a job in the San Diego area.  Commuting is not a problem.

  Currently I program using Object Oriented Think C and I am looking for a part time job to program applications for a business.  If you have need of my services please write me a message via e-mail and I will give you more information.

  All Queries and replies are welcome!

  -Kevin Hill
   San Diego, CA.
Newsgroups: comp.sys.mac.programmer
From: kraizman@mcs.anl.gov (Michael Kraizman)
Subject: VGA Color graphics for the Mac
Organization: Math & Computer Science Divison, ANL
Distribution: comp.sys.mac.programmer
Date: Wed, 8 Apr 1992 22:11:19 GMT

Hello,

  I am doing a survey for my feasibility study of adding VGA graphics
to the MAC(tm) SE/30 via it's expansion slot. (I am also thinking
about writing the drivers and building the converter card myself.)  I
would like to ask all of you to take a few minutes and answer the
questions at the end of this message. You can e-mail your responses to

                  S5LX@VAX5.CIT.CORNELL.EDU.

Thank you.

				Michael Kraizman
  
---------------This is it------The Survey--------------------

1) Do you have a MAC(tm) SE/30 or are thinking of buying one ?

2) If you had a choice between upgrading to a MAC(tm)II series or
   getting a VGA monitor and card for your present MAC(tm) which
   one would you choose?

   (If you are thinking of buying a MAC(tm) and are trying to decide
    between a II or an SE/30 with a VGA monitor and card which one would
    you choose?)

3) What do you think would be a fair price range for a VGA Monitor/Card
   for the SE/30?

   a. <$300  ( be serious!)
   b. $300-$400
   c. $400-$500
   d. >$500  ( you have to be joking! )
------------------------THE END---------------------------------------
Newsgroups: comp.sys.mac.programmer