HDTenEightyP/NetNews huggingface dataset:
From: joel@iastate.edu (Joel A Rybolt)
Subject: Mac programming problem
Keywords: HELP
Organization: Iowa State University, Ames IA
Date: Tue, 28 Jul 1992 12:29:10 GMT

Help ...

I am currently working on a project involving Think C 5.0 on the Macintosh.
Unfortunatly I have never programmed on a Mac before and this was going to be
quick and simple for a friend.  In this project I am trying to read in a text
file and print it out in one of three various label formats.  I have the print
routines down and when inputting data from the console I can get what I want
on my screen.

The problem is I learned how to program in C on a UNIX machine and have no idea
how to simply open the file I want to read from.  This file will be in the same
folder as the program and always called the same thing.  i would like to open
the file and read blocks of data from it, not all at once !

My other problem involves printing.  I wold like to bypass messing with the print manager and instead get a "direct connectin".  I want to send it some ESC 
codes (15cpi, 8lines per inch, ect..).  Then just dump my charecter to it
instead of the screen.

I am creating three separate application to provide the reports and am not
interested in following the Human interface guidlines all my friend would like
to do is Double-click an application and it open the file print the report
and terminate when finished !!

I realize this is not good Mac programming but it was mentto be quick and simple and I don't have time to learn prper mac programming.


Any help is appreciated.  Sorry for any readabilty problems as my terminal has
a hard time working with this system.

Please E-Mail to:
joel@iastate.edu
or FAX 515-232-4736

Thanks...
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: QuickTime format documentation?
Date: 23 Jul 92 17:13:10 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Jul20.130847.3139@otago.ac.nz>, stanger@otago.ac.nz (Nigel Stanger) writes:
> alanlb@bethesda.cs.vt.edu (Alan L. Batongbacal) writes:
>> Hi there!  Could somebody please point me to the proper documentation
>> for the QuickTime format?  I'd like to try my hand at writing a
>> QuickTime viewer.  Thanks!
>
> You want the QuickTime Developer's Kit, which is available from
> the APDA (can't remember the price offhand). It consists of a CD
> and a rather humungous ring-bound manual about the same size as IM6.

It's US$195, which isn't exactly cheap. The only excuse I can think of for
that price is royalties on some of the video content. It would be really nice
if you could pay a lower price and just get the manual, but that option
doesn't seem to be available.

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
Newsgroups: comp.sys.mac.programmer
From: jedwards@gmuvax2.gmu.edu (James Edwards)
Subject: Worth the trouble???
Organization: George Mason University, Fairfax, Va.
Date: Thu, 30 Jul 1992 21:44:42 GMT

Anyone have any thoughts on the program RESOURCER?  I do have a warm
place in my heart for ResEdit, but would like something more powerful.
I had read some good things about Resourcer, but so far, in several
attempts, have not been able to get hold of anyone at the company to ask
any questions about the product.  I do get a rather lengthy message on
an answering machine, asking if I would like a demo sent out.  I've left
two messages requesting one, and after several weeks, still haven't seen
it.  As good as the product is, if this is the quality of tech support,
I'm not sure I want to dump a couple of hundred dollars on it.

Jimi


Newsgroups: comp.sys.mac.programmer
From: poon@parc.xerox.com (Alex Poon)
Subject: Creating a floating palette in MacApp
Organization: Xerox PARC
Date: 22 Jul 92 21:32:54 GMT

I want to create a floating palette in MacApp, much like Hypercard's tools
window.  I'd also like it to be resizable and scrollable.  I've created
a palette view in MacApp as a subview of TGridView, but the window that
it's installed in becomes hidden when another window is activated
on top of it.  I want the palette window to always be showing, and I don't
want any sense of it being activated or deactivated.

Any suggestions?

poon@parc.xerox.com
From: cconstantine@galaxy.gov.bc.ca
Newsgroups: comp.sys.mac.programmer
Subject: SPLAsh & TCL book status...
Date: 24 Jul 92 09:01:34 -0700
Organization: BC Systems Corporation

Hello netters.  Long time no talk (type, chat, whatever).

I have a couple of quick questions.  First, does anyone out there know what
happened/is happening to SPLAsh.  I've been waiting for the issue with System 7
code only and THINK C 5/THINK Pascal 4 examples and have not heard from them in
some time.  My subscription isn't even up (to my knowledge, and I haven't been
notified to renew it at present!!!)

Secondly.  Awhile back, someone mentioned a new book comming out that shows how
to write/use the TCL.  It concentrates on spreadsheets.  I will _kill_ for this
book.  I beleive it was being written by Rich someone, but can't remember the
name.  Can anyone give insight as to its' status, publisher, ISBN# etc.  I was
going to write a more definitive book on how to program using THINK C 5 and the
TCL, using a graphics program as my example, but someone beat me to it!!!

Thanks.

Carl B. Constantine
CCONSTANTINE@galaxy.gov.bc.ca

Newsgroups: comp.sys.mac.programmer
From: thor@vivaldi.psu.edu (Thomas Moertel)
Subject: To ETO or not to ETO?
Organization: Pennylvania State University
Distribution: comp
Date: 29 Jul 92 23:55:35

I have MPW 3.2 with Asm, C, C++, and SADE.  I want to add MacApp 3 to
my tool chest.  Should I buy MacApp alone or get ETO (which includes
MacAPP)?  ETO no doubt costs more, even with the non-introductory
reduced price.  I called APDA and was given the following prices for
MacApp 3 with the latest C/C++ compiler:
 
MacApp               $350
C/C++ upgrade         150
                     ====
Total $500

So, I'm looking at $500 for the non-ETO route.  I don't have the
latest Tools Catalog, so I don't know how much ETO would cost me.  I
do, however, have the Aug 1991 catalog, and according to it I'd pay
about $600 for ETO.  I'd be willing to pay the $100 for ETO all its
extra goodies.
 
Could somebody please tell me how much ETO costs now and if the price
difference is worth it?  Thanks!
 
--Tom
--

Tom Moertel                 Pennsylvania State University
thor@vivaldi.psu.edu        "Them bats is smart. They use radar!"  ;-)
Newsgroups: comp.sys.mac.programmer
From: erich@csn.org
Subject: Help with Think Pascal,C
Originator: erich@teal.csn.org
Organization: Colorado SuperNet, Inc.
Date: Tue, 21 Jul 1992 17:18:24 GMT

I need to write some extensions to an existing program that is written in
Think Pascal.  I need to know which will be easier:

1) writing the new functions in Think C and linking them with the
existing Pascal modules.

OR

2) making the additions with Think Pascal.

Constraints:
  I am a skilled C programmer, but I have never written anything in
Pascal.  SO essentially I need to know which is easier:

Mixing Think C and Think Pascal modules
OR
Learning Pascal after knowing C very well.

Thanks for your help!

Eric Hilfer
erich@csn.org
-- 

Eric Hilfer
erich@csn.org
Newsgroups: comp.sys.mac.programmer
From: Frits van den Heuvel
Subject: WANTED: unixlike korn shell
Organization: R.I.V.M.
Date: Tue, 28 Jul 1992 12:59:35 GMT

Hi,

Does a unixlike korn shell exists for the macintoshes ?

Frits van den Heuvel.


National Institute of Public Health and Environmental Protection,
Attn: F.H. van den Heuvel, SB2/PB 83,
P.O. Box 1, 3720 BA, Bilthoven,
The Netherlands,

Telephone: (31) 30 - 74 34 84, Mailreply: sb2fhh@rivm.nl
 
Newsgroups: comp.sys.mac.programmer
From: jfieber@sophia.smith.edu (John Fieber)
Subject: Re: AIFF format request
Keywords: Sound format AIFF
Organization: Smith College
Date: Thu, 30 Jul 1992 20:46:08 GMT

In article <1992Jul30.155107.3902@cci632.cci.com> sdk@cci632.cci.com (Stephen Knight) writes:
>In article <hp48sx.712426820@wuarchive.wustl.edu> hp48sx@wupost.wustl.edu (HP48SX Archive Maintainer) writes:
>>Is there anybody that can tell me where I can find the AIFF format specs
>>I have some Amiga IFF files that uses some commands not listed in IM VI,
>>but they are probably part of the general AIFF format specs.
>>
>
>You can get the (almost) complete standard using the information below.
>
>Standard:  "EA IFF 85" (Electronic Arts Interchange File Format
>Document Title: "EA IFF 85" Standard for Interchange Format Files.

This is old (ancient?).  Look in the _Amiga ROM Kernel Reference
Manual: Devices_ (3rd edition) for the latest specifications.

-john
-- 
===jfieber@sophia.smith.edu==================================================
Newsgroups: comp.sys.mac.programmer
From: francis@csli.stanford.edu (Dave Francis)
Subject: New C/C++ tools for MPW?
Organization: CSLI, Stanford University
Date: Tue, 28 Jul 1992 00:47:21 GMT

I recently heard something about a new C compiler or C++ Cfront tool
for the Mac under the name Lucid. Are there any substatiations to this
rumor? Will it be faster (maybe up to Think C speed, ha ha) ?

Thanks,
Dave Francis
Newsgroups: comp.sys.mac.programmer
From: Meessen@slig.ucl.ac.be  (Christophe Meessen)
Subject: Re: Q: DrawString only draws 8 characters of my string
Followup-To: comp.sys.mac.programmer
Organization: Universite Catholique de Louvain (Belgium)
Date: Tue, 21 Jul 1992 08:04:11 GMT

In article <NEERI.92Jul20230142@iis.ethz.ch>, neeri@iis.ethz.ch (Matthias
Neeracher) wrote:
> 
> In article <Brp1GF.4Dt@news.cso.uiuc.edu> rpoldrac@s.psych.uiuc.edu (Russ Poldrack) writes:
> >I'm trying to print some strings using DrawString() and it refuses to
> >print more than 8 characters of the string.  The variables are intact
> >and the entire string is there is the watch window, but it doesn't
> >come out on the screen.  The variables being printed are declared as
> >char[20], so pointer checking is off to make it run.
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Aargh! Did you ever work in the nuclear power industry? The compiler is your
> *friend*. It was trying to *tell* you something.
> 
> >Does the
> >variable HAVE to be an Str255?  Thanks.
> 
> It doesn't have to be a Str255. It does, however, have to be a *Pascal* string.
> Pascal Strings start with a count byte, as opposed to C strings, which are
> terminated with a 0 byte.
> 
> You have 2 alternatives:
> 
> - use drawstring instead of DrawString or
> - Declare your variables as Str31 or Str255 and write your string literals with
> a "\p" at the beginning, as in "\pHello World"
> 
> Personally, I prefer #2, but for small programs, #1 might be easier.
> 
...
> Matthias

I would suggest to avoid literal strings in a Macintosh program. Better use
resource strings for constant strings. It's not that hard to implement.

To draw a C string I would then suggest to use 
void DrawText( Ptr textBuf, short firstByte, short byteCount )

suppose your variable is 

char theString[20];

use 

DrawText( (Ptr)theString, 0, strlen( theString ) );


To load and draw constant string from a 'STR ' resource. To access such a
string you only need the resource ID.

// declare the string handle
Handle theString;

// load the string from 'STR ' resource with ID kStringID
theString = (Handle)GetResource( 'STR ', kStringID );

// remove handle from resource map
DetachResource( theString );

// draw the resource
DrawText( *theString, 0, GetHandleSize( theString ) );

// free's space used by the string
DisposHandle( theString);



You may also load the string from a 'STR#' resource. Each resource may
contain more than one resource. To access such a string you need the
resource ID and the index number (1 - ... ) of the string.  

// declare the string buffer
Str255 theString;

// load the string from 'STR#' resource with ID kStringID and index
kStringIdx
GetIndString( &theString, kStringID, kStringIdx );

// draw the resource
DrawString( theString );

equivalent to

DrawText( theString + 1, 0, theString[0] );


Bien cordialement,

                           Christophe MEESSEN
Newsgroups: comp.sys.mac.programmer
From: zkessin@chaos.cs.brandeis.edu (Zach, the Lego Maniac)
Subject: Re: yacc for Mac
Organization: Brandeis University
Date: Wed, 22 Jul 1992 23:23:43 GMT

joel@dseg.ti.com (Joel Quejada) writes:

>Is there a yacc-type program for the Mac?
On ftp.apple.com there is the gnu YACC ported to the mac.
/pub/nerdtools/thinkc/ is the directory, there is also flex for the
mac. Sources are included, there is no real mac interface for them,
but you could write one, (I might get too it at some point.

--Zach
****************************CLINTON/GORE'92**********************
   Zachary Kessin               
 ZKessin@chaos.cs.brandeis.edu  / Time and tide melts the snowman
 (617)736-7218                 /   --The Doctor 'Time and the Rani'
From: Mike.Gleason@macnet.omahug.org (Mike Gleason)
Newsgroups: comp.sys.mac.programmer
Subject: Re:  COMMAND LINE INTERFACE for Mac
Date: 20 Jul 92 08:56:02 CST
Reply-To: mike.gleason@macnet.omahug.org
Organization: Macnet Omaha
Followup-To: comp.sys.mac.programmer


  > I was thinking it would be nice to have Command Line Interface for Mac.
  > Sort of like an option. You could use mouse or could type command. Sure,
the
  > macros do the job but I still think that an option to enter commands by
  > typing em would be nice. Perhaps I feel the need more than some people
  > because I work a lot on Unix (Sun) computers too.
  > 
  > Regards, --nasir umnoor@ccu.umanitoba.ca
  > 
  > p.s. BTW, is there any utility available that would allow you to do that
  > (from Finder, for instance)?

I'm working on a unix-style CLI right now.  So far, it handles unix-ish path
names, wildcards, pipes and redirection, but it still needs a lot of work. 
I
need to finish porting some standard unix apps, and add a scrollback buffer,
among other things.

--mg
  
Newsgroups: comp.sys.mac.programmer
From: jbrowne@void.ncsa.uiuc.edu (Jim Browne)
Subject: Re: A few more suggestions for THINK C
Organization: University of Illinois at Urbana
Distribution: comp
Date: Wed, 22 Jul 1992 18:50:43 GMT

jverdega@cae.wisc.edu (Jeffrey Verdegan) writes:

>>What would be useful is if THINK C would log code swaps for you 
>>while you're developing the code.  Then, if you notice that there
>>is a lot of unrest on the heap, you can consider reassigning 
>>project entries from one segment to another.  It may already do
>>this.  
>>

I just usually generate a link map.  I can almost always find what I need in
there.


-- 
Jim Browne                                          | jbrowne@ncsa.uiuc.edu  |
NCSA/STG System Administrator                       | stgadmin@ncsa.uiuc.edu |
System Administration: Where the fun never ends...  | (217) 244-7798         |
--"It's really weird... kind of like how Telnet is programmed." - Q. Koziol --
From: Harry_Noel@wtgdir.UUCP (Harry Noel)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MacINTERCOMM Invisible Xfers! (PR)
Date: Tue, 21 Jul 92 17:06:54 GMT
Organization: MCCS
Reply-To: grace!wtgdir!Harry_Noel@moscom.com
X-Mailer: uAccess - Macintosh Release: 1.5v4


In article <1992Jul20.192151.5278@terminator.cc.umich.edu> (comp.sys.mac.programmer), leonardr@ccs.itd.umich.edu writes:
> NOTE: This information is based on a conversation with the lead engineer of
> MacIntercomm, Frank Price.  Some of you may know Frank from his Hermes BBS.
> 
> -- 
> -----------------------------------------------------------------------
> Leonard Rosenthol		  Internet: leonardr@ccs.itd.umich.edu
> Director of Advanced Technology   AppleLink: MACgician
> Aladdin Systems, inc.		  GEnie:     MACgician
> 


Well... As one who has seen first hand how he releases versions of
his software still containing the same bugs as the beta versions.
I would not bet the farm on this one.  He knew about 5 'major' bugs
in his package and released it anyway.  Two of which were security
related.

I won't waste time going into why he did it, but I you know a hermes
system who has been running hermes for a while, ask them about free
hermes upgrades....

--------------------------------------------------
Harry Noel  -   grace!wtgdir!Harry_Noel@moscom.com
             or grace\!wtdir\!Harry_Noel@moscom.com
--------------------------------------------------
"Murpy's Law is Recursive.
 Washing your car to make it rain doesn't work."
From: lust@reed.edu!lust.reed.edu!pcalahan (Patrick John Calahan)
Newsgroups: comp.sys.mac.programmer
Subject: help with SetPortPix needed
Date: 27 Jul 92 19:57:30 GMT
Article-I.D.: lust.m0mCbC8-00000eC
Organization: Reed College, Portland, OR

I am having trouble using SetPortPix.  I want to temporarily
set the portpixmap to an offscreen pixmap, do some drawing there, and
then switch back to do normal screen drawing again.  I've
done this with bitmaps and SetPortBits, but am having troubles with
pixmaps.  I think my trouble might be just in grabbing the original
portpix before switching it.  It's a handle (unlike portbits), and I'm
a little confused as to how to deal with it.
I just want to have a global pixmaphandle which i can always pass to  
SetPortPix to resume screen drawing.  

confused and appreciative of any help,
pat
Newsgroups: comp.sys.mac.programmer
From: robert@metropolis.com (Robert Munyer)
Subject: Re: Where Can I Get Usenet Guide
Organization: Metropolis Software, Inc.
Distribution: usa
Date: Sun, 26 Jul 1992 19:47:10 GMT


In article <1992Jul25.004651.6632@natinst.com> stepan@natinst.com (Stepan Riha)
writes:

> In article <1992Jul24.163930.575859@locus.com> howard@locus.com (Howard
> Moskovitz) writes:

> > I have seen mention of the Usenet Mac Programmer's Guide in
> > this newsgroup. Could someone tell me where I can get a copy?
> > Is it hardcopy or online somewhere? If hardcopy, how much is it?

> The UMPG is available by annonymous ftp from sumex-aim.stanford.edu
>
> info-mac/tech/usenet-mac-prog-guide-part1.hqx
> info-mac/tech/usenet-mac-prog-guide-part2.hqx
>
> It's in MS Word format and anybody asking a question on c.s.m.p should look
> there first since it has the answer to ca. 90% of the questions here.

It is also available in hard copy.  $17.00 (less than 6 cents per page) to:

USENET Macintosh Programmer's Guide
Printed Version
39075 Carmel Ct.
Fremont, CA 94538

Or you can get it on disk, in MS word format.  $5.00 to:

USENET Macintosh Programmer's Guide
Disk Version
39075 Carmel Ct.
Fremont, CA 94538

If you want to print it yourself, you can get it in PostScript form by
anonymous ftp from ccu.umanitoba.ca

______________________________________________________________________
Robert Munyer            |   "I may be synthetic, but I'm not stupid."
robert@metropolis.com    |      -- Bishop, _Aliens_
From: orpheus@reed.edu (P. Hawthorne)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Date: 24 Jul 92 18:12:47 GMT
Article-I.D.: reed.1992Jul24.181247.8354
Organization: Reed College, Portland, OR


  Paul Robichaux, robichau@lambda.msfc.nasa.gov, writes:
. Good != perfect. The overall quality of TP is high enough that none of my
. wishes are major (i.e. I didn't have to ask for an excellent debugger, or
. a function-level-smart linker.)

 (Couldn't help but notice the C syntax of your inequality... ;^)

  Incidentally, is there a debugger that ranks up there with Lightsbug?
The only things I could hope for in the next version would probably be an
Observe window that could cope with the implicit self parameter, and
perhaps a calling graph browser. Well, maybe it would be nice to paste in
the Groucho window, but these are all somewhat minor considerations which
are really beside the point.

  If I was required to code on, say, a Unix box, could I find a source
level debugger that compares?


  Theus (orpheus@reed.edu)
-- 
Newsgroups: comp.sys.mac.programmer
From: hd12@ellis.uchicago.edu (hui  dong)
Subject: Sound problem with sys7, need help
Reply-To: hd12@midway.uchicago.edu
Organization: University of Chicago Computing Organizations
Date: Fri, 24 Jul 1992 04:25:43 GMT

I have written an application under sys6 a year ago, which uses some
'snd ' type sounds. I have some commands which will produce a fast sequence of 
these sounds with different pitch. It works very smoothly under sys6 
(THINK C 4.0.5). But when I try to run it under sys7, the sequence of sound
can't be produced completely, seems like it's "choked" after playing a few
sound at the beginning of the sequence. Some other 'snd ' even won't play at
all. Does anybody know what's going on? An esay fix? Any help will be very
appreciated.
From: rson@rhi.hi.is (Reynir Hugason)
Newsgroups: comp.sys.mac.programmer
Subject: Re: yacc for Mac
Date: 24 Jul 92 08:31:33 GMT


As far as I have heard MacYacc is little more than a bad port of PCYacc
even the manuals have not been properly translated.

I ported Berkeley Yacc to the MPW environment in one or two hours and
it has served it purposes quite well. I tried to use the bison but
I dont remembered what I found wrong with it, but I couldnt use it for
some reason that I cant remember.

Better yet Berkeley Yacc doesnt come with all this lawyer shit like 
ALL gnu packages.

//Thats all folks - sue me if you can find me ;-)
From: triantos@acsu.buffalo.edu (Nick B Triantos)
Newsgroups: comp.sys.mac.programmer
Subject: Question about MacsBug and the Program Counter, please.
Date: 31 Jul 92 16:33:48 GMT
Distribution: comp
Organization: The University at Buffalo
Originator: triantos@lictor.acsu.buffalo.edu

Hi.

If I break out of a program into MacsBug, I know that I can list disassembled
memory and such.  However, if I wish to see where a routine with an RTS would
return to, how can I look at the program counter stack?

If someone has a reference to an IM area which I can't find, or a good book or
TechNote, please let me know.

Thanks,
-Nick
--
Nick Triantos        "It is not I who am crazy ... It is I who am MAD!!!"
                     -Ren Hoek, from Ren & Stimpy's "Space Madness"

  ... Don't knock 6 years of college until you've tried it.
From: dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Q: SndRecord in Think C
Date: 28 Jul 92 22:29:25 GMT
Organization: University of Illinois at Urbana

dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) writes:
>I am trying to use the function SndRecord (documented in IM 6 on p.
>22-92) in Think C 5.0.  When I try to compile my project, I am getting
>the message that the prototype is not defined for this function.  I
>included <Sound.h>, but it doesn't have the SndRecord header.  Where
>is this header defined?  Thanks.

I figured this out.  I need to include <SoundInput.h>.

-- 
David M. Marcovitz                     |  internet: marcovitz@uiuc.edu
Computer-based Education Research Lab  |            dmmg1176@uxa.cso.uiuc.edu
University of Illinois                 |  novanet:  marco / cca / nova
Newsgroups: comp.sys.mac.programmer
From: jinho@iti.gov.sg (Tan Jin Ho (Sch.11/2))
Subject: CTB - how to use it...
Keywords: CTB, Mac
Organization: Information Technology Institute, National Computer Board, S'pore
Date: Thu, 23 Jul 1992 06:50:01 GMT

After reading the first few chapters of "Inside Mac Comm. Toolbox"
and several tries, I have finally get Apple's CTB kicking (well, almost).
The problem is that nothing shows up on my terminal when I type or
receive characters. I can see the cursor moving 
but to see what I typed or received, I have to click on the terminal
window. 
I call TMActivate, TMUpdate, TMResume according to what the
book says. Do I need to do anything extra ? Did anybody have
similar problems before ?

Jin-Ho