HDTenEightyP/NetNews huggingface dataset:
From: rdd@cactus.org (Robert Dorsett)
Subject: Access to Map cdev data
Organization: Capital Area Central Texas UNIX Society, Austin, Tx
Date: Mon, 27 Jul 1992 05:34:00 GMT

I haven't been able to find a good answer to this in IM: is there a way
to access the lat/long data *and* the relative UTC time as entered in the
Map cdev?  I have a friend who's writing a satellite-tracker; it makes
some sense for him to initialize his information from the map cdev.

Please reply via email; I'll summarize.



---
Robert Dorsett
rdd@cactus.org
...cs.utexas.edu!cactus.org!rdd
From: heyes@dadev.cebaf.gov (Graham Heyes)
Newsgroups: comp.sys.mac.programmer
Subject: a.out to Think C compatible objects ??
Date: 23 Jul 92 14:30:44 GMT
Distribution: comp.sys.mac.programmer
Organization: Continuous Electron Beam Accelerator Facility

At work I often use gnu cross compilers to generate 68000
code (gccx68). At home I use Think C 5.0 to play about on 
my Mac Plus.
	     Just out of interest I compiled the same code
fragments using gccx68 and Think C then disassembled them.
The Think C code is nowhere near as highly optimized as the
gnu generated code. This is no big supprise since I already
know that gnu is very highly optimizing. Think C is nice to
work with and the code generated is quite good for everyday
use. It would be nice though to compile time critical code 
using gccx68 and generate a library to link into Think C.

	Is there any way I can convert the a.out format
output of the gnu compiler into something that I can link
to Think C?

		Graham Heyes
From: Joe.Francis@dartmouth.edu (Joe Francis)
Newsgroups: comp.sys.mac.programmer
Subject: GDevices:  screenActive flag?
Date: 23 Jul 92 16:27:03 GMT
Organization: Dartmouth College, Hanover, NH


What meaning does the screenActive flag have in GDevice record?  If I
wish to build a table of information about the available screens, and
use this info to decide where to display a graphic, should I be testing
this flag?
Newsgroups: comp.sys.mac.programmer
From: poon@parc.xerox.com (Alex Poon)
Subject: watch cursor in MacApp
Keywords: MacApp
Organization: Xerox PARC
Date: 24 Jul 92 18:19:16 GMT

I am programming in MacApp, and I find it annoying that whenever my code goes
into a long-lasting loop (even only 3 seconds), the cursor turns into a
watch cursor.  Anybody know how to keep that from happening?

Thanks,

poon@parc.xerox.com
From: erh0362@tesla.njit.edu (Elliotte Rusty Harold)
Newsgroups: comp.sys.mac.programmer
Subject: Custom SFPutFile dialog box
Date: 25 Jul 92 19:04:37 GMT
Organization: New Jersey Institute of Technology


	Can anybody point me toward some sample C sode and resources for 
working with a custom SFPutfile dialog box?  I do have the sample Pascal source 
from Apple available on ftp.apple.com but between  Pascal itself and the poor 
formatting of the file I'm finding it hard going.

	I just need to be able to offer four different file formats in a "Save 
As..." dialog box.  I'd like to do it with a pop-up menu but radio buttons 
would work fine too.  This needs to run under System 6 or later (and it 
wouldn't hurt if it could run under earlier systems as well.)  I feel confident 
I can create and handle everything except the list box that shows the folders 
and files already present.  The custom Save As dialogs I've peeked at in other 
applications with ResEdit show this as a useritem.  Can anyone  provide some 
more details on this item and how I'd handle it?

Elliotte Rusty Harold		Department of Applied Mathematics
elharo@m.njit.edu		New Jersey Institute of Technology
erh0362@tesla.njit.edu		Newark, NJ 07103
Newsgroups: comp.sys.mac.programmer
From: stepan@natinst.com (Stepan Riha)
Subject: Re: Where Can I Get Usenet Guide
Organization: National Instruments, Austin, TX
Distribution: usa
Date: Sat, 25 Jul 1992 00:46:51 GMT

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?
>
>Thanks in advance,
>Howard
>
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.

-- 
   Stepan Riha -- stepan@natinst.com

Newsgroups: comp.sys.mac.programmer
From: jxs18@po.CWRU.Edu (Jerry Sy)
Subject: Re: PROGRAMMING PROB: How do you find the system folder?
Reply-To: jxs18@po.CWRU.Edu (Jerry Sy)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Thu, 23 Jul 92 17:00:16 GMT


In a previous article, gonzalm@prism.cs.orst.edu (Mario Gonzales) says:

>
>Hi all,
>
>I have looked in vain to find the function that will return the loaction of
>the system folder.  I can find the boot disk but the system folder is
>not allways called the "system folder" on the startup disk.
>
>Also what is the easiest way to traverse the entire directory structure
>of a disk?
>
>If possible could you provide code samples?
>
>Any help is most appreciated!
>
>
To locate a particular folder (that is, to find its volume reference
number and directory ID), use the FindFolder routine:

pascal OSErr FindFolder(short vRefNum, OSType folderType,
		Boolean createFolder, short *foundVRefNum,
		long *foundDirID);
where you supply vRefNum= kOnSystemDisk , to look in boot volume
		folderType = kSystemFolderType, you want the Sys Folder right ?
	createFolder= FALSE, you don't want to create a new folder if not found

and you get in return your foundVRefNum and foundDirID

the above code is from Programming for System 7 by Gary Little.
Get this book, highly recommended.
Newsgroups: comp.sys.mac.programmer
Subject: Re: Arrow keys & modifiers (was: Think C is (notso) Great)
From: hammett@sbsu1.aukuni.ac.nz (Tim Hammett)
Date: Thu, 23 Jul 1992 21:32:20 GMT
   5@mac41-pg2.umd.edu><1992Jul22.141021.20135@hobbes.kzoo.edu><hammett.7118432
 16@sbsu1.aukuni.ac.nz> <D88-JWA.92Jul23022040@dront.nada.kth.se>
Organization: University of Auckland, New Zealand.

d88-jwa@dront.nada.kth.se (Jon W{tte) writes:
>NO ! NO ! NO !

>Almost ALL programs now have option as go-as-far-as-possible and
>command as go-next-neighbour. This includes popular word processors
>as well :-)

Jon, normally I respect everything you say, but this time I have to
disagree with you. Could you give me a few examples of packages that
do this?

>>   Inside Mac says:
>>   ------

>Volume, Page ?

SpInside Mac version 2.0.1 April 1991 (off the Feb 92 developer CD). In the
section:

User interface guidelines
   Arrow Keys
      Modifier keys with arrow keys

My apologies for not clearly stating my references.


--
Tim Hammett, Botany Dept, Auckland University, New Zealand.
t.hammett@aukuni.ac.nz   Phone: +64-9-373-7599 x8365    FAX: +64-9-373-7416
Newsgroups: comp.sys.mac.programmer
From: smoke@well.sf.ca.us (Nicholas Jackiw)
Subject: Re: Using PostHighLevelEvents to send low level (KeyPressed) events
Organization: Whole Earth 'Lectronic Link
Distribution: na
Date: Fri, 24 Jul 1992 16:04:10 GMT

In article <76508@ut-emx.uucp> mmigdol@ccwf.cc.utexas.edu (michael a migdol) writes:
>According to IM VI, p. 5-18, "Your application can both send and receive high-
>level events, but it generally only receives low-level events and should not
>send them."
>
>So, this implies that I *can* send KeyPressed events to other applications. 
>(Even though I "shouldn't", I want to. I really do! :) )

That's right; you can and "shouldn't."  Remember, however, that it's *your*
Macintosh and you can do what you damn well like with it.

>
>Anyways, Apple certainly doesn't seem to encourage this, and I'm about to try
>this out myself, but am I supposed to use PostHighLevelEvents with theEvent.what
>set to Keypressed (or whatever) to do this? Am I going to hit any problems 
>later on? Does the application I'm sending to have to "AcceptHighLevelEvents"
>to receive low level events sent this way?

No, PostHighLevelEvents won't work for this; all high-level events are of
the same low-level event type.  Nor do you need AcceptHighLevelEvents; this
will simply add unnecessary launch-time overhead.

I believe that any low-level event gets sent to the event handler of the
foremost application.  This means you'll need to have your receiver in
front.  (See the Process Manager in System 7 for how to do this automatically,
otherwise just bring it to the front with the multifinder menu after 
launching the sender.)  Then, call PostEvent from your sender with
the appropriate keydowns.  

[Actually, I think you should use PPostEvent, which will return to you
a pointer to the event that will be shipped the frontapp. You want this
pointer if you intend to do any preprocessing of the event record, such
as clearing its modifier keys or setting the "where" field to a mouse
location of your choice.]



-- 
                              --- * ---
Nick Jackiw                  Smoke@well.sf.ca.us   | Jackiw@cs.swarthmore.edu
Key Curriculum Press, Inc.   Applelink:KEY.EDUSOFT | (510) 548-2304
                              --- * ---
From: tcd@vax5.cit.cornell.edu
Newsgroups: comp.sys.mac.programmer
Subject: Using/restoring A5 okay?
Date: 21 Jul 92 14:43:52 EDT
Distribution: comp
Organization: Cornell University

     From what I gather, code that executes during interupts cannot assume
that A5 is valid.  From this, I assume that it's okay for a subroutine
that doesn't call anything else, to use A5 as a scratch register, as
long as it restores A5 on exit.  Is this correct?  The subroutine in
question just moves some bits around and it would be nice to have another
address register to work with.  Is there any problem with using A5?
Thanks,
Tim Dorcey
tcd@cornellc.cit.cornell.edu 
Newsgroups: comp.sys.mac.programmer
From: zaphod@bluemoon.rn.com (Peter Bierman)
Subject: Re: Tech Notes
Organization: Blue Moon BBS ((614) 868-998[024])
Date: Sat, 25 Jul 92 23:29:54 EDT

triantos@acsu.buffalo.edu (Nick B Triantos) writes:

> Hi.
> 
> I am wondering where I can get the TN stack.  Is it only available on the
> developer CDs?  I just downloaded all umpteen hundred tech notes from
> ftp.apple.com, but I'd like one big file I can do searches on...
> 

You can get it off the develop CD, or (the only other place I'm SURE of) 
my BBS. The Metropolis, 614-846-1911.


---
The opinions I express are rarely my own, becuase my own are far too 
outragous to post here.

IntNet:zaphod@bluemoon.rn.com    FutureNet: #33@#10
The Metropolis (614)-846-1911
---
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon W{tte)
Subject: Re: MacINTERCOMM Invisible Xfers! (PR)
Originator: d88-jwa@dront.nada.kth.se
Organization: Royal Institute of Technology, Stockholm, Sweden
	<sold.30.711663181@kit.uni-kl.de> <l6on5qINNf46@calvin.usc.edu>
Date: Tue, 21 Jul 1992 22:15:23 GMT

> davidp@calvin.usc.edu (David Peterson) writes:

   You don`t need to buffer the file transfer, just the options negotiation.
   After you've decided what the file is named and where it is going, make all
   subsequent read call asyncronous and have thier completion procs turn around
   and do an asyncronous PBWrite and have its completion proc turn around and
   to another asycronous read.

Wouldn't it be even faster if you did something like
queueing BOTH the next read and the next write from
the completion proc, and the the one that finishes
the latest of them queue the next read/write etc ?
This of course requires two buffers, but should be
quite doable and (theoretically, i.e. from one
floppy to another) be twice as fast !

-- 
         Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden

### You have the Easy Access virus. This virus may cause strange sounds
### and weird keyboard behaviour when you press the shift key repeatedly.
Newsgroups: comp.sys.mac.programmer
From: mhall@epx.cis.umn.edu ()
Subject: Color and multifinder questions
Organization: University of Minnesota
Date: Fri, 31 Jul 1992 16:57:03 GMT


Hello-
I am writing a mathematics application that I want to be multifinder compatible
and color quickdraw compatible.  A few questions to that end.

One-  The app contains a full color plot, where every point in the window is
assigned a color (a bifurcation plot, actually)  The overhead for calling
Moveto(h,v);
PMForeColor(i);
Lineto(h,v);
is pretty much unacceptable.  Is it legal to draw directly into an offscreen
CGrafPort by just shoving index values into the Pixmap?  If it is, what's the
safest way to do it?  I have done it before, in a program for My Machine Only,
and I had to create a table to match the Palette manager's index to the logical
index for the pixmap.  Is that a Very Bad Thing?  I have read about the 
tolerant+explicit usage, but that seems to be for 32 bit QD only, and I don't
want to require that.  The basic idea is to create a 256 color image that I
can blit to any depth (4 bit to 32 bit) screen.

Also- when do I handle changes in the color environment.  I have been handling
them as soon as I recieve an update event, by just redrawing everything.  
However, while in the control panel switching colors, The machine occasionally
crashes (in the systemclick routine)  I am running from inside TP4.0.  I can't
seem to find anything wrong with my redrawing, but then again, I haven't found
any source that tells me how to handle these changes.

And #3, if you are still with me,  What's the best way to handle Multifinder
during lengthy calculations?  I read previously that WNEvent/GNEvent take up
a lot of time.  If I use EventAvail, will background tasks get time?  If
I am in the background, Will I get time if all I am using is EventAvail? (oh,
If EventAvail returns true, I call WN/GNEvent).  And how often should I call
it from either back or front. Once a tick, or much more?

Thank you,
matt hall
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Arrow keys & modifiers
Date: 24 Jul 92 18:41:00 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <D88-JWA.92Jul23022040@dront.nada.kth.se>, d88-jwa@dront.nada.kth.se (Jon W{tte) writes:
>> hammett@sbsu1.aukuni.ac.nz (Tim Hammett) writes:
>
>    >I'd like ThC to join with the rest of the Mac world, in which
>    >cmd-arrowkey means "go this way for one word/paragraph/page" and
>    >option-arrowkey means "go this way to the end of the line/document."
>    >ThC has this backwards.  (And BBEdit has it backwards vertically but not
>    >horizontally.  Turns my brain to scrambled cheese.)
>
>    I don't use Think C (I use MPW), but it sounds from your description
>    like Think C has it right.

[Just realized that my previous posting is mostly a repeat of what Tim
has said :-}]

> NO ! NO ! NO !
>
> Almost ALL programs now have option as go-as-far-as-possible and
> command as go-next-neighbour. This includes popular word processors
> as well :-)

What do you mean "almost all"? I know M#$#%s@ft Word does this, but what
else? MacWrite II certainly is close to the IM4 description in its use
of option and command.
From: lust@reed.edu!lust.reed.edu!pcalahan (Patrick John Calahan)
Newsgroups: comp.sys.mac.programmer
Subject: simple code needed: using SetPortPix()
Date: 23 Jul 92 20:00:59 GMT
Article-I.D.: lust.m0mB9LJ-00000fC
Organization: Reed College, Portland, OR

Can somebody show me a little piece of code which calls SetPortPix() so  
that drawing can be done offscreen, and then 
calls SetPortPix() again to restore the original pixmap
so normal screen drawing can resume?

I know this is simple, I must be missing an * or an & somewhere in my  
code.  Thanks
From: lai@Apple.COM (Ed Lai)
Newsgroups: comp.sys.mac.programmer
Subject: Re: AppleEvent gets munged by AEProcessAppleEvent
Date: 30 Jul 92 15:42:14 GMT
Distribution: comp
Organization: Apple Computer Inc., Cupertino, CA

In article <1992Jul29.221720.28079@cs.yale.edu> bitting-douglas@CS.YALE.EDU (Pondscum Czar) writes:
>
>OSErr HandleAEOpenApplication(AppleEvent *ae, AppleEvent *reply, long refCon)
>{
>  if (!ae) DoError("NULL Apple Event!");
>  return MyGotRequiredParameters(ae);
>}
>

HandleAEOpenApplication should use Pascal calling convention.


>The problem is that DoError is always called from
>HandleAEOpenApplication... somewhere the system is losing the apple
>event and I don't understand why.
>
>Can anyone help me out here?  This is so simple, it's ridiculous... but
>why it isn't working is boggling to my mind... yes, the handler was
>installed correctly, or it wouldn't even get that far, no?
>
>--Doug
>--
> ...Doug Bitting... || "But the wisdom that comes from heaven is first
>                    ||  of all pure; then peace loving, considerate,
>bitting@cs.yale.edu ||  submissive, full of mercy, and good fruit,
>doug@yalevm.bitnet  ||  impartial and sincere."  -- James 3:17
>-- 
>--
>The new Congressmen say they're going to turn the government around.  I
>hope I don't get run over again.

/* Disclaimer: All statments and opinions expressed are my own */
/* Edmund K. Lai                                               */
/* Apple Computer, MS37-UP                                     */
/* 20525 Mariani Ave,                                          */
/* Cupertino, CA 95014                                         */
/* (408)974-6272                                               */
zW@h9cOi
From: raffuj@aix.rpi.edu (Jose A. Raffucci)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help w/Device.h and ThinkC
Date: 31 Jul 92 14:15:15 GMT
Organization: Rensselaer Polytechnic Institute, Troy, NY

thanks for the replies... the problem was that I didn't link the mactraps
library.  

Yeah, that sorta sounds stupid, but I'm not a mac person, and they 
really didn't supply me with all of the manuals I needed...  oh well.

-hOz
 
-- 

  //  The Amigoids from hell,     raffuj@rpi.edu              
\X/   Renssepolyinstatechnitute                            
     - What do you mean it's only 3 1/2 inches long????!! -*
From: robichau@lambda.msfc.nasa.gov (Paul Robichaux)
Newsgroups: comp.sys.mac.programmer
Subject: Hunting the elusive bus error
Date: 29 Jul 92 13:39:07 GMT
Reply-To: robichau@lambda.msfc.nasa.gov
Organization: New Technology, Inc.

When I perform a certain sequence of operations in my application
twice, it falls down and goes :BOOM:, creating a rather large mess in
the process.

One occasional symptom is that, after the operation is complete, calls to
GetNewDialog persistently return NIL. IM I-413 says that, if
GetNewDialog can't load the DLOG or DITL resources, the function
result will be undefined.

However, sometimes the call to GetNewDialog works fine. So far I've
gotten bus errors in _StripAddress, Think Pascal's runtime.lib, and my
dialog routine.

Is there a general heuristic for hunting down bus errors? I want to
become a Mighty Hunter of Annoying Exceptions, so your advice would be
appreciated.

Reply via e-mail, and I'll summarize in a week or so.

TIA,
-Paul
-- 
Paul Robichaux, KD4JZG          | I shouldn't bitch / I shouldn't cry
robichau@lambda.msfc.nasa.gov   | I'd start a revolution but I don't have time.
Newsgroups: comp.sys.mac.programmer
From: harrison@beta.lanl.gov (David A. Harrison)
Subject: Animation
Organization: Los Alamos National Laboratory
Distribution: all 
Date: Tue, 21 Jul 1992 15:45:12 GMT

What are the more common ways of making a program that uses animation run the
same speed on all Macs.  I am having trouble because the Time Manager and 
Vertical Rectrace Manager do not allow the their tasks to call graphics
routines since Quickdraw routines access the Memory Manager.  There are
ways involving polling global flags set by a Time Manager task or Vertical 
Retrace Manager task, but these approaches waste CPU time that should be
available to background tasks.  Does anyone have any ideas?

Dave Harrison
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: HOW IS QUICKBASIC FOR THE MAC?
Date: 22 Jul 92 18:46:13 GMT
Distribution: usa
Organization: SRI International, Menlo Park, California

In article <91457@bu.edu> ccmlh@buitc.bu.edu (Mark Hayes) writes:
>In article <14g2jmINNkds@agate.berkeley.edu> cormacks@garnet.berkeley.edu writes:


>For what this is worth, I just received an updated version of
>QuickBasic from Microsoft as a result of having requested that I
>be put on an upgrade-requestors list over a year ago. The new
>version is supposedly System 7 compatible, though it doesn't
>let you do anything particularly "System 7 lustful".

I just received my copy today. It cost $10.00 to upgrade.
I hear that it fixes a few bugs but causes one new one.
I have released some pure code resources that lets quickbasic 
do some cool stuff. Look for it at the archive sites.



Matt





-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
From: wombat@claris.com (Scott Lindsey)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Removing the menubar?
Date: 23 Jul 92 05:09:45 GMT
Organization: Claris Corporation, Vancouver WA
Wombat: yes
Number: 37044

In article <kePQOia00WBM04mmoS@andrew.cmu.edu>, sr0o+@andrew.cmu.edu (Steven Ritter) writes:
> 
> int remove_menubar (RgnHandle gray_rgn) {
> int old_height;
> RgnHandle newgray_region;
> Rect newgray_rect;
>  
>    old_height = GetMBarHeight();
>    SetMBarHeight(0);  /*shrink menubar to 0*/
> 
>    newgray_region = NewRgn();
>    CopyRgn(GetGrayRgn(),gray_rgn);
>    SetRect(&newgray_rect,screenBits.bounds.left,screenBits.bounds.top,
>            screenBits.bounds.right,screenBits.bounds.bottom);
>    RectRgn(newgray_region,&newgray_rect);
>    CopyRgn(newgray_region,GetGrayRgn());
 
Ack! no!  Now you've just eliminated any other monitors besides your main
monitor from the desktop!

Try something like:

    SetRect(&newgray_rect, screenBits.bounds.left, screenBits.bounds.top,
            screenBits.bounds.right, old_height);
    RectRgn(newgray_region, &newgray_rect);
    UnionRgn(GrayRgn, newgray_region, GrayRgn);

or so.
--
Scott Lindsey <wombat@claris.com>
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: Wed, 22 Jul 1992 07:34:51 GMT

In article <NEERI.92Jul21135202@iis.ethz.ch>, neeri@iis.ethz.ch (Matthias
Neeracher) wrote:
> 
...
> 
> - 'STR ' resources are stored as handles to *Pascal* strings, which means
>   you should use "DrawString(*theString);"

Woops ! Your perfectly right Matthias, I missed that one. 


> - While it is unnecessary to *detach* the resource, it is *essential* to lock
>   it with "HLock((Handle) theString);" before drawing.

Hehem, thats also very true. 

DrawString is one of the Routines that may move or purge memory. It is
indeed essential to lock the handle and make shure it's unpurgeable. This
should be the case if you didn't set the purgeable option in the info box
of the 'STR ' resource. 

>
...
> 
> Matthias
> 
> -----
> Matthias Neeracher                                   neeri@iis.ethz.ch
>    "No, what he didn't like about heroes was that they were usually
>     suicidally gloomy when sober and homicidally insane when drunk."
>                           -- Terry Pratchett, _The Colour of Magic_

Thanks Matthias. Sorry everyone for these misleading informations. 


Bien cordialement,

                           Christophe MEESSEN

PS: I'm writing this from under my desk. 
    Try it, it's not that easy.
Newsgroups: comp.sys.mac.programmer