HDTenEightyP/NetNews huggingface dataset:
From: russotto@eng.umd.edu (Matthew T. Russotto)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Newline mode
Date: 18 Aug 92 22:00:53 GMT
Organization: College of Engineering, University of Maryland, College Park

In article <ISBELL.92Aug18131432@pop-tarts.ai.mit.edu> isbell@ai.mit.edu (Charles L Isbell) writes:
>
>Here's an easy one.  Think C.  Mac file manager interface (ie FSRead()
>as opposed to fgets(), etc).  I want to read in a line (defined as a
>string of characters terminated by a newline) at a time.  Inside Mac
>say there's a newline mode that will do this for you automatically,
>but doesn't explain how to do it.  Currently I read in a character at
>a time until I hit a newline, but I'm sure that's just toooooo slow.
>
>So, how do I do this nwline thing (ie implement a fast fgets())?

Believe it or not, newline mode is documented!  OK, not documented
anywhere near its first mention, but it is documented :-)
 
From the electronic Inside Mac:
Note:  Advanced programmers:Bit 7 of ioPosMode is the newline flag; it's
       set if read operations should terminate at a newline character. The
       ASCII code of the newline character is specified in the high-order
       byte of ioPosMode. If the newline flag is set, the data will be read
       one byte at a time until the newline character is encountered,
       ioReqCount bytes have been read, or the end-of-file is reached. If
       the newline flag is clear, the data will be read one byte at a time
       until ioReqCount bytes have been read or the end-of-file is reached.

-- 
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
Some news readers expect "Disclaimer:" here.
Just say NO to police searches and seizures.  Make them use force.
(not responsible for bodily harm resulting from following above advice)
Newsgroups: comp.sys.mac.programmer
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: Re: FlushEvents necessary? (was: Re: Toolbox init)
Organization: Instructional Technology Laboratory, University of Michigan
Date: Thu, 20 Aug 1992 14:49:12 GMT

In article <de19-200892050741@mac39-pg2.umd.edu> de19@umail.umd.edu (Dana S Emery) writes:
>If ones application interpretes key events in a way that make blind type
>ahead a dangerous option, then by all means flush away.  

I've done something similar: selected an entire document in Word, changed
the font, printed it, then hit cmd-save while unfortunately accidentally
striking the spacebar (like you, I was typing madly in a hurry to get
something done). My entire document was replaced by a space, and not
undoable. Ugh. Fortunately I had a printed copy :)



-- 
"It'sVerySad / toSeeTheAncientAndDistinguishedGameThatUsedToBe / aModelOf
DecorumAndTranquilityBecomeLikeAnyOtherSportABattlegroundForRivalIdeologies
toSlugItOutWithGlee." (from _Chess_). -potts@itl.itd.umich.edu-
From: gb2a+@andrew.cmu.edu (George J. Baxter)
Newsgroups: comp.sys.mac.programmer
Subject: sending AEs to hypercard
Date: 18 Aug 92 21:51:46 GMT
Organization: Science & Technology Center, Carnegie Mellon, Pittsburgh, PA

// cross-posted from netnews.comp.mac.hypercard

Gurus:
    I want to send a string to Hypercard.  I'm using hypercard as a
front end and I want to send back an error message if I get one.  I
don't want Hypercard to wait around in any XCMD while I'm looking for my
error string since there might not be one, or it might be a long time
coming.  So I want to use Hypercard's built in AE handlers.  I know that
2.1 supports appleEvents, but how specifically do I address the AE
handler in hypercard?  The little New Features Guide gives me some
hints. For example, I could send the appleEvent under class 'misc',  and
ID 'dosc' with my string being "put <my error string here>"
or something.  The question I have is where do I put this error string? 
The 'dosc' ID is described as "interpret the return-delimited list
accompanying this Apple event as a script and execute it."  
    Hypercard provides the command "request AppleEvent data", which I
guess is where the strings in question reside, but again, in my code,
how do I hand it to Hypercard?  
    Thanks!
        -George Baxter
-----------------------
gb2a@andrew.cmu.edu		    baxter@a.cfr.cmu.edu
 
"Only a Hawaiian can say Humuhumunukunukuapuaa five times fast, correctly."
 
"I think we're in for a bad spell of wether."
Newsgroups: comp.sys.mac.programmer
From: sold@kit.uni-kl.de (Christoph Sold)
Subject: Re: Localized System software
Organization: Universitaet Kaiserslautern
Date: Mon, 17 Aug 1992 20:00:53 GMT

In article <k.vikor-170892141953@mac10.sms.uib.no> k.vikor@alf.uib.no (Knut S. Vikor) writes:
>From: k.vikor@alf.uib.no (Knut S. Vikor)
>Subject: Re: Localized System software
>Date: Mon, 17 Aug 92 12:21:46 GMT
>In article <1992Aug12.164152.8934@Csli.Stanford.EDU>,
>francis@csli.stanford.edu (Dave Francis) wrote:
>> 
>> This question may have two answers given the release of system 7.1 (Cube-E).
>> 
>> How does one tell if the System running is Japanese or Persian or
>> whatever? Does this change with the introduction of system 7.1?
>> 
>> Thanks,
>> Dave Francis
>
>If the System contains an non-European script, you will see the script icon
>in the menu bar (crescent for Arabic, sun for Japanese, diamond for US,
>various flags for the European countries, etc.) There is no reason this
>will change in System 7.1 that I can think of.
>
>Knut S. Vikor.
>Centre for Middle Eastern and Islamic Studies
>University of Bergen, Norway

In fact, this is exactly the way it works. The only change is the icon now 
has a menu below it, listing all the script systems available on the 
machine. This way you can easily change the currently active system script.

-Christoph

Christoph P. Sold                   CATS Software GmbH
                                    Mussbacher Landstr.2
                                    W-6730 Neustadt (Weinstrasse)
ger.xse0035@applelink.apple.com     Germany

"If an apple is fun, what the heck is an appletree?"
From: mar@ocf.berkeley.edu (Michael A. Ramirez)
Newsgroups: comp.sys.mac.programmer
Subject: Mounting network volumes
Date: 18 Aug 1992 20:06:19 GMT
Organization: U.C. Berkeley Open Computing Facility
Distribution: world
NNTP-Posting-Host: earthquake.berkeley.edu

	I would like to know how I can mount network volumes within my program.
I am curious on which trap calls will allow me to do this. Thanks in advance.

Michael



-- 
-----------------------------------------------------------------------------
___    _   ___ ___ _  ____  ____  ____   mar@ocf.berkeley.edu
|__|  |_|  |  |  | |  |___| |___    /    When laws are outlawed then only
|  \ |   | |  |  | |  |  \  |___  /___   outlaws will obey the law- Mondo 2000
Newsgroups: comp.sys.mac.programmer
From: jtbell@hubcap.clemson.edu (Jon Bell)
Subject: Re: Map
Organization: Presbyterian College, Clinton SC
Date: Wed, 19 Aug 1992 14:25:54 GMT

In article <57238@mentor.cc.purdue.edu> neath@brazil.psych.purdue.edu (Ian Neath) writes:
>Speaking of the map, does anyone know of any sources for latitude and
>longitude info other than old fashioned printed atlases?  A database
>with this info would be very useful:  Only 1 city in which I have 
>lived is built into the map.

For U.S. locations, the best method I can think of is to locate a USGS
topographical map for the area you're interested in, and read off the
latitude and longitude from the edges of the map, interpolating if
necessary.  A school the size of Purdue should have a decent collection
of USGS maps somewhere.

>    Ian Neath, PhD     | There are four kinds of people in this world:
>neath@psych.purdue.edu | cretins, fools, morons and lunatics - U. Eco

Jon Bell / Dept. of Physics & Computer Science / Presbyterian College
Clinton SC USA / email: jtbell@presby.edu
From: mcote@sw.stratus.com (Mike Cote)
Newsgroups: comp.sys.mac.programmer
Subject: TCL, Borders, and Printing
Date: 14 Aug 92 12:49:58 GMT
Organization: Stratus Computer, Inc.

I had a heck of a time trying to get around what I think is a TCL bug (IMHO) in 
the CBorder class.  The problem I had was with printing a bunch of CEditText
panes with borders in a CPanorama.

What happened was that everything printed fine until I got down to the bottom of
what was actually displayed on the screen for that window and then none of the
CBorders would be printed for the rest of the CEditText panes.  The text printed
fine, though.

I tracked it down to a small section of Pane_Draw in CPane.  When it takes the 
intersection of the drawing area and the border rect it determines that the 
border is not visible and skips drawing it.  However, it looks like the area
and border rect are specified in two different coordinate sets and that is 
why it failed.  Being close to 2AM I hacked in a check to always draw the border
when printing but I'd like to fix it properly ASAP.

Has anyone else run into this problem?  and is my analysis of the situation 
correct?  

Thanks.

mpac
Newsgroups: comp.sys.mac.programmer
Subject: Re: Calculating folder sizes [Q]
From: stanger@otago.ac.nz (Nigel Stanger)
Date: 23 Aug 92 15:11:40 +1300
Organization: University of Otago, Dunedin, New Zealand

"John Lacey" <johnl@spinner.cs.indiana.edu> writes:
> How does one go about calculating the size of a folder?
> 
> I would be interested in distinguishing between logical and physical
> sizes. (I would also be interested in which of those the Finder
> reports.)

You're in luck -- I did this just last weekend :) I wasn't sure
how to go about it either -- poking around in IM4 I found a some
fields in one of the parameter blocks (can't remember which
offhand but I think it was a variant of the CInfoPBRec) called
ioFlPyLen, ioFlRPyLen, ioFlLgLen, ioFlRLgLen (these names are
probably slightly wrong, but they're very similar). These are,
respectively, the physical lengths of the data & resource forks,
and the logical lengths of same.

I wrote a quick routine which indexed through all files in a
folder using PBGetCatInfo and added up ioFlPyLen and ioFlRPyLen
for each file. The answer I got was the same as what Get Info in
the Finder reported, so I assume the Finder uses a similar
method (and uses the physical file length).

If you know your way around the low-level File Manager calls you
should be able to figure it out fairly easily. If you want some
code, I can go and dig it up.

----------------------------------------------------------------------
Nigel Stanger,                  Internet: stanger@otago.ac.nz
University of Otago,            Phone: +64 3 479-8179
Dunedin, NEW ZEALAND.           Fax:   +64 3 479-8311
If two toucans can can-can, can one toucan can-can too?
From: howard@locus.com (Howard Moskovitz)
Newsgroups: comp.sys.mac.programmer
Subject: Think C 5.0 & SndPlay Routine
Date: 13 Aug 92 00:31:53 GMT
Reply-To: howard@locus.com (Howard Moskovitz)
Distribution: usa
Organization: Locus Computing

I am trying to play 'snd ' resources using the SndPlay call
but Think C 5.0 keeps giving me a link error. I have
included MacTraps and MacTraps2 as well as Traps.h (which
has a definition for SndPlay) with no success.

Anyone have any ideas what I might be doing wron?

Thanks in advance,
Howard


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ||    ||\    /||             Howard Moskovitz              +
+ ||    ||\\  //||  \---\      Locus Computing Corporation   +
+ ||<<>>|| \\// ||  /---/      Inglewood, CA 903010   U.S.A  +
+ ||    ||  \/  ||                                           +
+ ||    ||      ||             howard@locus.com              +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
From: neal@farallon.com (Neal Trautman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Finder labels
Date: 17 Aug 92 20:29:59 GMT
Organization: Farallon Computing, Inc.

In article <1992Aug17.190538.11398@qualcomm.com>, sdorner@qualcom.qualcomm.com (Steve Dorner) writes:
> 
> I would like to snarf the text and colors of the Finder's label menu.  Does
> anyone know where they hide?  Or must I "reduce the Labels control panel
> to human-perceivable form" and violate my license agreement? :-)
> 
> (Yes, I know I'm a very evil person for wanting to do this. Nonetheless,
> I do.)
> -- 
> Steve Dorner, Qualcomm, Inc.
> Yes, I'm still working on Eudora and it's still free.
> 

The System 7 call looks like this:

	FUNCTION GetLabel(labelNumber: INTEGER; VAR labelColor: RGBColor;
							VAR labelString: Str255): OSErr;
		INLINE $303C, $050B, $ABC9;
	
Neal Trautman
Timbuktu Lead Software Engineer
Farallon Computing, Inc.
neal@farallon.com
From: stack@techbook.com (Bill Stackhouse)
Newsgroups: comp.sys.mac.programmer
Subject: ZIP formatted files
Date: 18 Aug 92 19:43:19 GMT
Article-I.D.: techbook.1992Aug18.194319.3262
Organization: StoneTablet Publishing

Just ftp'd a binary file that is a ZIP file. Using UnZip 1.0, I tried
to turn it back into a text file and it said that it was not a ZIP file.
Stripped the mail header off and tried again. Still not a ZIP file. Has
anyone else been able to do anything with a ZIP file?

Bill



The following is the start and end of the file.

xbtoa Begin
:eLln$31&+"opB,";Bp2:sFRr ...
...
3/ho=G/i5183&D'O%13(8
xbtoa End N 2458 99a E 23 S 478a5 R 289fd0e9

-- 
stack@techbook.COM  Public Access User --- Not affiliated with TECHbooks
Public Access UNIX and Internet at (503) 644-8135 (1200/2400, N81)
From: jr51+@andrew.cmu.edu (Julie A Reyer)
Newsgroups: comp.sys.mac.programmer
Subject: File Manager Question
Date: 22 Aug 92 17:34:15 GMT
Organization: Masters student, Mechanical Engineering, Carnegie Mellon, Pittsburgh, PA

When you use SFGetfile and SFPutfile and the user changes the current
volume, how to you tell the computer to changes this info globally?  For
example, if I'm running two programs at once and I save a file
somewhere, how do I set the volume or whatever so that when I go to open
a file in the other application it will open up to whereever I put the
last thing.   I would like to this since many of the commercial
applications I use do this.  So, how do I make my application conform?

Thanks in advance,

Julie
Newsgroups: comp.sys.mac.programmer
Subject: Prograph/Serius DBMS Developers?
From: robert_hess@macweek.ziff.com (Robert Hess)
Date: 18 Aug 92 16:03:01 EDT
Organization: MacWEEK

Any developers out there using Prograph or Serius for database applications? If so, please contact me!

Robert Hess
robert_hess@macweek.ziff.com
Newsgroups: comp.sys.mac.programmer
Subject: Re: Map (was: Australian Mac systems)
From: stanger@otago.ac.nz (Nigel Stanger)
Date: 20 Aug 92 13:18:56 +1300
Organization: University of Otago, Dunedin, New Zealand

Thad.Humphries@p950.f70.n109.z1.fidonet.org (Thad Humphries) writes:
>   PH> From: orpheus@reed.edu (P. Hawthorne) Newsgroups:
>   PH> comp.sys.mac.programmer Organization: Reed College, Portland, OR
>   PH> 
>   PH> hammett@sbsu1.aukuni.ac.nz (Tim Hammett) writes: : Most users don't
>   PH> bother to set their location in the Map control panel.
>   PH> 
>   PH> klaus@diku.dk (Klaus Ole Kristiansen) writes: : I certainly haven't.
>   PH> Is there any advantage in doing so?
>   PH> 
>   PH> This is the chicken and the egg problem. Nobody uses the map control
>   PH> panel because nobody uses the map control panel. Lame.
> 
> When I first saw Map (System 5 or 6 ?) I thought, "Gee, that's cute."  I never
> read the docs on it [...]

Probably wouldn't have done you much good :) I don't know about
earlier version of the System software, but I just looked up "Map
control panel" in the System 7 Reference manual, and it says
"icon (fig.) 35". I looked up p. 35 and sure enough, there was a
figure with all the standard control panel icons! That's the
_only_ mention of the Map control panel that I could find. I also
tried looking up "time zone", "setting" and "localisation".
Nothing.

So is there _any_ documentation on this anywhere?

----------------------------------------------------------------------
Nigel Stanger,                  Internet: stanger@otago.ac.nz
University of Otago,            Phone: +64 3 479-8179
Dunedin, NEW ZEALAND.           Fax:   +64 3 479-8311
"No problemo." -- Arnold, "Terminator 2"
Organization: University Of Toronto Computing Services.
Date: Thursday, 13 Aug 1992 16:32:39 EDT
From: <MASONS1@vm.utcs.utoronto.ca>
Newsgroups: comp.sys.mac.programmer
Subject: Quick Quickbasic Question (Q)

Greetings ,
 I have been asked to maintain a QuickBasic program ,as such I need to
determine the volume name from which the application was launched. Is there a
system() function or some other method to achieve this? All thoughts invited!
Cheers!

Roger Smith
Toronto, Ont.
Newsgroups: comp.sys.mac.programmer
From: reed@snake.tc.cornell.edu (Michael G. Reed)
Subject: A tricky PICT problem...
Followup-To: comp.sys.mac.programmer
Keywords: PICT
Reply-To: reed@Theory.TC.Cornell.EDU
Organization: Cornell National Supercomputing Facility
Date: Wed, 12 Aug 1992 16:59:53 GMT

Netters:
	I have an interestin problem here.  In an application I'm writing, I
have a PICT file that I just spooled to a disk (Assuming it got there, and 
the file is correctly formatted, which it is), I now need to read that file
back into a pixmap a portion at a time (eg, in 100 line chunks).  Yes, I know
this sounds inefficient, but if I have a final image that's 2048x2048x32deep,
I cannot get enough memory to read it all at once.  I setup the CGrafPort
with a pixmap that is the maximum size I can read in (getting memory from the
TempMem pool).  I then proceed to read the pict file in (entirely), save the
pixmap, and repeat until I have processed all 2048 lines (again, I try to do
it in as large chunks as possible).  Now, the routine appears to be
functioning correctly (eg, it passes through the PICT file the correct number
of times, and it is saving the pixmap correctly), the only problem is that I
get a blank output file.   Arg!  I think I might have my various ports 
misaligned, thus creating a situation where the mac cannot draw anything, but
I cannot find the misalignment.  I setup the ports as follows:

	SetPort (graf);
	InitCPort (graf);
	/* various other setup routines for picture/port */
	pixmap.bounds = master_rect;
	ClipRect (&temp_rect);
	RectRgn (graf->visRgn, &temp_rect);
	DrawPicture (pict_handle, &master_rect);

Where master_rect is (top=0,left=0,bottom=2048,right=2048)
      temp_rect os (top=VAR,left=0,bottom=VAR+LINES,right=2048)
Where VAR is the current "top most line" to render
      LINES is the hight of the pixmap (lines to render).

Something must be wrong here...Any help would be greatly appreciated.

-----------------------------------------------------------------------------
Michael G. Reed                                  (reed@Theory.TC.Cornell.edu)
Cornell National Supercomputing Facility                       (607)/254-8806
-----------------------------------------------------------------------------
        Why be normal, it's boring; and boring people should be shot.

Note:  These are not the views of my employer (and probably not mine either).
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
From: lstein@genome.wi.edu (Lincoln Stein)
Subject: Re: VBL tasks on Quadra video, SlotVInstall
Organization: Whitehead Institute for Biomedical Research
Date: Sat, 15 Aug 1992 12:32:55 GMT

> >Can anyone tell us if it is possible to install
> >a VBL task on the Quadra internal video and how to do it?
> 
>Bill, if really only want to install a VBL task, that means a task that
>is invoked by the main video boards VBL interrupt and no other special
>things, why don't you use VBLInstall instead of SlotVInstall? This does
>all the job for you: find the main video board and install into that
>irq's queue (not sure if VBLInstall, VBLRemove maintain a special queue,
>but who cares?). It works fine for me on a Quadra 900 and IIsi.

My understanding of the VBL situation on the Mac II->Quadra series is
that VBLInstall is supported for backward compatability purposes only.
It maintains a species VBL queue that gets called at exactly the same
frequently that the Mac Plus series did (60 Hz) and is not tied in
with the video refresh in any way.  VBLInstall/VBLRemove work great
for a generic task that needs to get called on a regular basis, but
for specialized tasks, such as snazzy animation, that need to be
synched with the monitor refresh, they won't work.  

Unfortunately I don't have the answer to the original question; I
played around with it once and ran into exactly the same problem
described in the original post.

========================================================================
Lincoln Stein		
lstein@genome.wi.edu		Whitehead Institute, Cambridge, MA
lstein@hstbme.mit.edu		Brigham & Women's Hospital, Boston MA
========================================================================
From: Mary.Hicks@p0.f222.n125.z1.FIDONET.ORG (Mary Hicks)
Newsgroups: comp.sys.mac.programmer
Subject: PROGRAMMING IN BASIC
Date: 13 Aug 92 07:56:31 GMT
Organization: FidoNet node 1:125/222.0 - Macademe/Emma, San Francisco CA

im using a basic compiler on my mac to create applications. Can someone 
send me some basic code? It would be really helpful. Whatever you have , 
please send it to me....thanks

 



--  
Mary Hicks - via FidoNet node 1:125/555
    UUCP: ...!uunet!hoptoad!kumr!fidogate!222.0!Mary.Hicks
INTERNET: Mary.Hicks@p0.f222.n125.z1.FIDONET.ORG
From: buckeye@spf.trw.com (John Wallace)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help!  System error #28
Date: 12 Aug 92 20:55:11 GMT
Organization: TRW Data Systems Center, Redondo Beach, CA

In article <chuck-120892123052@choffman.gte.com> chuck@gte.com (Chuck Hoffman) writes:
>I'm getting System Error #28 message from MacsBug when checking a program I
>wrote in THINK C.  It happens during an FSRead.  THINK C Debugger and
>MacsBug can't recover so I have to reboot, which probably isn't the best
>way for me to present the application to my end users.
>
>SystemErrors DA says "stack has moved into application heap."  Is this
>simply a memory management problem, or is it really something else
>masquerading as a memory problem with a bogus return?  Any ideas about
>cause and / or cure?
>
>P.S. The file is open, and an immediately preceeding SetFPos seems to work
>fine, giving a noErr return.
>
>
>-Chuck Hoffman

Your application apparently needs more stack space to perform its
normal operations (or perhaps has an initite recursion problem).  
Insufficient stack space happens frequenly on Plus/SE/Classic Macs since 
they have only 8K of stack space; MacIIs typically have 24K of stack space. 
See the DefltStack low-memory LongInt global at $322 or call StackSpace() 
to check how much stack space your app has.  If you need more stack 
space for your app, you should call SetApplLimit when your app starts up 
so that your app has a big enough stack.

Cheers!
John
-----
John Wallace        buckeye@spf.trw.com
Newsgroups: comp.sys.mac.programmer