HDTenEightyP/NetNews huggingface dataset:
From: milt@tenon.com (Milt Roselinsky)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Writing an external file system
Date: 27 Jul 92 21:24:31 GMT
Organization: "Tenon Intersystems"

Russell Street <russells@ccu1.aukuni.ac.nz> writes:
|Anyone got any idea how to write an external file system 
|for the Macintosh?  IM only points me to Tech Support,
|which apparently does not give much support (though I
|have not tried there yet).

In IM IV, there is an obscure reference to "eXternal File
System Development Package for Foreign File Access".  I was able to
get this through dts, and used it to implement NFS as a XFS under MachTen.
The package was a very nice headstart on what was required, with example
code for a "read only" file system.

milt
From: keith@taligent.com (Keith Rollin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: And what about this DogCow business ? ( moof! )
Date: 22 Jul 92 20:30:10 GMT
Organization: Taligent

In article <jack-220792105435@compstore.jpl.nasa.gov>, jack@jato.jpl.nasa.gov
(Jack Kobzeff) writes:
> 
> Basically, Clarus the Dogcow is the mascot of Apple's Mac Developer
> Technical Support team. He started life in a Page Setup (Options) dialog
> box, but after DTS recieved a question as to whether he (she???) ...

There is biological proof in the Page Setup (Options) dialog that Clarus is
male. I'll let you figure it out...

--
Keith Rollin
Phantom Programmer
Taligent, Inc.
From: rtbunker@phoenix.Princeton.EDU (Ross T. Bunker)
Newsgroups: comp.sys.mac.programmer
Subject: printf() in Think C *fixed*
Date: 24 Jul 92 15:10:27 GMT
Organization: Princeton University
Originator: news@ernie.Princeton.EDU

Well, I got a couple of replies about an apparent bug in printf() when
printing strings > 32K.  The consensus seemed to be that it was the usual 32
bit vs. 16 bit int problem...

Recompiling the ANSI libraries with 4 byte ints solved it.  Seems printf
calculates the length of the string and stores it in an int instead of a
long.  I hate 2-byte ints. :-)

For those of you who were wondering why in the world we were printing 32K
strings, this is a unix portand we were testing the command line part of
database retreival program.  The search code can return very long strings,
and we were testing it for a large case.  In the eventual implementation we
won't even use printf...but I wanted to be sure it wasn't something wrong
with our code. :-)

Thanks to those who replied!


-- 
------------------------------------------------------------------------------
:)ross                            | I don't have to take this abuse from you -- 
Internet - rtbunker@princeton.edu | I've got hundreds of people waiting to abuse
Bitnet   - rtbunker@pucc.bitnet   | me.  --Bill Murray, "Ghostbusters"
Newsgroups: comp.sys.mac.programmer
From: tomj@u.cc.utah.edu (Johnson)
Subject: Re: Urgent Help Needed
Summary: Send the ADDRESS of the Rect
Organization: University of Utah Computer Center
Date: Tue, 21 Jul 92 15:30:09 GMT

In article <9q@byu.edu> gaow@bones.et.byu.edu (Jinsong Gao) writes:
>Hi, I'd like to thank all who helped me for my previous questions. Now
>I have another puzzle that I can't solve.  It seems simple, but I am
>desperately stuck.  I use a few QuickDraw routines for manipulating Rects.
>The problem is that non of them work.  I always get a "pascal argument 
>wrong size" error message.  Inside Macintosh Vol.I lists these routines as
>taking a Rect.  But no matter where my Rects come from (define a Rect, or
>a windowptr->portRect), Iget this error.  Is there any change to these 
>routines?  If not, what do I have to do to use these routines (such as
>SetRect, EraseRect, FrameRect, and OvalRect).
>
You must remember that in PASCAL (the language used to describe the
interfaces in IM), any structure of over 4-bytes is automatically sent
as a pointer to enhance speed.  Thus, when IM says "ClipRect(r: Rect)",
in Pascal, what it means to a C programmer is: "void ClipRect(Rect *r)",
and would be called as: ClipRect(&myRect).

Good Luck on meeting your deadline.

Tom Johnson    (tomj@iomega.com)
Newsgroups: comp.sys.mac.programmer
From: siegel@world.std.com (Rich Siegel)
Subject: Re: C and C++ development on the Mac
Organization: GCC Technologies
Date: Tue, 21 Jul 1992 15:38:55 GMT

In article <70277@apple.Apple.COM> mlanett@Apple.COM (Mark Lanett) writes:
>siegel@world.std.com (Rich Siegel) writes:
>
>>In article <sch-200792164510@schaffner.mitre.org> sch@mitre.org (Stu Schaffner) writes:
>
>>>standardization, note that THINK C is a proprietary language.  If you don't
>
>>What? Huh? THINK C is first and foremost a conforming implementation of
>>ANSI C. What makes it 'proprietary'?
>
>C'mon Rich. The original poster said "C and C++". When you get TC++ out then
>you can complain.

Don't "C'mon Rich" me.

1) The respondent that I quoted made an (unqualified) assertion that THINK C
was a proprietary language. To apply the modifier 'proprietary' to a
conforming implementation of an accepted standard language is meaningless:
THINK C 5.0 is a fully conforming implementation of the ANSI C standard.
The object extensions to THINK C, are, likewise, not proprietary. The original
set of extensions conformed to a draft spec from -Apple- which documented
a language called "Minimal C++", or, sometimes, "C+-". This set of extensions
was analogous to the object extensions implemented by Object Pascal. For 
THINK C 5.0, more object-oriented extensions were added to make programs 
upward-compatible with C++. These additional extensions were taken verbatim
(If I recall correctly) from C++. None of the object extensions in THINK C
were devised in-house, and all are documented elsewhere, therefore, the
term 'proprietary' is incorrect.

2) I don't work for Symantec, and haven't for months. When "I" get a THINK
C++ out is irrelevant, since "I" don't do that sort of work anymore.

3) I wasn't "complaining". I was presenting a defense against an incorrect
assertion which had been presented as fact.

I repeat, don't "C'mon Rich" me. C'mon, yourself.




-- 
-----------------------------------------------------------------------
Rich Siegel                              Internet: siegel@world.std.com
Software Engineer & Toolsmith
GCC Technologies
Newsgroups: comp.sys.mac.programmer
From: taihou@shankar.iss.nus.sg (Tng Tai Hou)
Subject: XCMD and filename help!!!
Originator: taihou@shankar
Organization: Institute of Systems Science, NUS, Singapore
Date: Tue, 28 Jul 1992 11:14:55 GMT

Hi.

I am writing an XCMD that that takes in a targa file and displays
it on the HyperCard/SuperCard window. I am not using any fancy
HyperCard 2.x xwindow calls. The syntax is

ShowTarga filename, x, y

Unfortunatelly, I run into some coding problems in manipulating
files. Internally, my code must require both the correct
vRefNum and a pascal filename: 

OSErr ShowTarga (short vRefNum, StringPtr fn, short x, short y);

I really don't understand it at all. The only way I got this to
work was to follow exactly the following:

1.  Make sure that my folder or stack is 1 level in the hard disk and
    not anywhere else, including the desktop.
2.  I must write my code such that vRefNum is zer0 for the default volume.
3.  Then from HyperCard, I must specify the FULL path:
    "Volume:MyFolder:MyTargaFile"

Is there a more generic way of writing this?
Please help me with this. I need this code example very badly, not
just for the targa display, but for other formats as well.

Thanks a zillion in advance.

Tai Hou
Singapore
Newsgroups: comp.sys.mac.programmer
From: david@oahu.cs.ucla.edu (David Dantowitz)
Subject: Are there any other TCP drivers other than MacTCP?
Originator: david@oahu.cs.ucla.edu
Organization: UCLA Computer Science Department
Date: Fri, 24 Jul 92 12:10:44 GMT

Are there any other drivers (besides MacTCP) for TCP on the Mac?

Just checking... when I tell management the license fee is $5000,
they'll want to know if there are any alternatives...

David
-- 
David Dantowitz
david@cs.ucla.edu

Singing Barbershop when I'm not doing parallel simulation
Newsgroups: comp.sys.mac.programmer
From: robichau@lambda.msfc.nasa.gov (Paul Robichaux)
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Reply-To: robichau@lambda.msfc.nasa.gov
Organization: New Technology, Inc.
Date: Mon, 27 Jul 1992 14:02:33 GMT

In <1992Jul24.181247.8354@reed.edu> orpheus@reed.edu (P. Hawthorne) writes:
>  If I was required to code on, say, a Unix box, could I find a source
>level debugger that compares?

Not that I've found (or, at least, not that we have here.) One of the
things I miss about VAXes is their debugger... I miss the capability
to set numbered breakpoints, to break on logical expressions, and so
forth.

Around here, though, on Suns it's dbx or bust. We have high hopes for
CodeCenter, though it's expensive.

Cheers,
-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: raffuj@aix.rpi.edu (Jose A. Raffucci)
Subject: Help w/Device.h and ThinkC
Organization: Rensselaer Polytechnic Institute, Troy, NY
Date: Thu, 30 Jul 1992 19:33:49 GMT

	I'm having quite a bit of trouble with a bit of code just like
this in an application I'm writing.  All I want to do right now is get
the driver opened and closed correctly.  When I try to compile this (using
ThinkC 5), it tells me that OpenDriver and CloseDriver aren't defined.

The only thing I can think of is that I'm not passing it the stuff, although
I've checked it.  I don't have the User's guide, since it got stolen, so I 
can't check it out there.  If anyone out there knows what I'm forgetting to 
do, or what stupid thing I've done wrong, I'd appreciate it if you could
drop me some email...
 

#include <stdio.h>
#include <Devices.h>

main()
{
	OSErr	err;
	short	RefNum;

	err = OpenDriver("\p.RasterOps24STVPIP1.3d1", &RefNum);
	if (err != 0)
		printf("Error Detected\n");
	else 
		printf("No Error\n");

	err = CloseDriver(RefNum);

}

thanx, 

-hOz

-- 

  //  The Amigoids from hell,     raffuj@rpi.edu              
\X/   Renssepolyinstatechnitute                            
     - What do you mean it's only 3 1/2 inches long????!! -*
From: keith@taligent.com (Keith Rollin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Q: Checking for modif keys on app startup
Date: 29 Jul 92 08:23:44 GMT
Organization: Taligent

In article <70554@apple.Apple.COM>, mlanett@Apple.COM (Mark Lanett) writes:
> 
> felciano@summit.stanford.edu (Ramon M. Felciano) writes:
> 
> >I'm writing a 7.0 drag-and-drop application, and would like a "power
> >user" mode that does some automatic stuff if the user drops files on
> >the application while holding a particular key down (most likely
> >command or control). While I know how to check the modifier flags in an
> >event record, I'm not quite sure how to forcibly read the keyboard. Any
> >suggestions?
> 
> pascal void GetKeys(KeyMap theKeys)
>         = 0xA976; File {CIncludes}Events.h Inside Macintosh reference:
> I-259 Trap number: A976 Moves or purges memory.  GetKeys reads the
> current state of the keyboard (and keypad, if any) and returns it in
> the form of a keyMap:
> 
> TYPE KeyMap = PACKED ARRAY[0..127] OF BOOLEAN;
> 
> Each key on the keyboard or keypad corresponds to an element in the
> keyMap. The index into the keyMap for a particular key is the same as
> the key code for that key. (The key codes are shown in Figure 3 above.)
> The keyMap element is TRUE if the corresponding key is down and FALSE
> if it isn't. The maximum number of keys that can be down simultaneously
> is two character keys plus any combination of the four modifier keys.


Another way is to call GetOSEvent with the mask set to zero. Then look at the
modifiers field in the event record.

I don't really know if either method is better than the other. The only thing I
can think of is that some people (myself included) have a hard time trying to
figure out how to read the KeyMap variable (I program in C, which defines KeyMap
as 4 longs, and not a packed array of 128 Booleans).

--
Keith Rollin
Phantom Programmer
Taligent, Inc.
From: bkiss@unixg.ubc.ca (Bill Kiss)
Newsgroups: comp.sys.mac.programmer
Subject: Copy(Deep)Mask Problem
Date: 31 Jul 92 04:53:06 GMT
Followup-To: comp.sys.mac.programmer
Distribution: comp.sys.mac.programmer
Organization: University of British Columbia, Vancouver, B.C., Canada

Hello people,

Maybe I'm particularly stupid tonight (not a first) or there is a problem
with CopyMask/CopyDeepMask that I'm not aware off. Here's the game summary:

1.  I have two offscreen (redundant?) GWorlds of identical proportions. One
    contains an 8-bit deep PixMap and the other contains its mask.

2.  When the mask is a 1-bit deep PixMap, CopyMask works dandy.

3.  When the mask is an 8-bit deep PixMap and I Copy(Deep)Mask the whole
    PixMap (ie. using portRect), it works tickety-boo too.

4.  However, when the mask is an 8-bit deep PixMap and I copy a subset of the
    portRect, I get wild (ie. bad) results.

I have confirmed that (1) the subset rect is valid and contains the data that I
want to copy, (2) all the relevant PixMaps are locked, (3) the GWorlds fields
all make sense, and (4) Clarus is in the barn. And, no, after doing everything
but stand on my head to make this work, I don't feel like single-stepping
through the ROM (at least not tonight)...

Any ideas/suggestions would be much appreciated!

Bill Kiss, Programmer/Peon
Dept. of Ophthalmology, UBC
From: keith@taligent.com (Keith Rollin)
Newsgroups: comp.sys.mac.programmer
Subject: Re: PLstrcmp?? Do the right thing!
Date: 29 Jul 92 08:33:41 GMT
Organization: Taligent

In article <jpurlia-280792143857@129.46.5.45>, jpurlia@qualcomm.com (John
Purlia) writes:
> 
> Has anyone else noticed the effective weirdness of PLstrcmp in MPW?  I'm
> using qsort to sort a list of pascal style strings in ascending alphabetic
> order.  My comparison function basically uses a PLstrcmp to test equality
> of the list elements.  Here's the weird part:  PLstrcmp thinks that "Public
> Folder" comes before "Public".  If I take the same data, convert each
> element to C style using p2cstr, and use strcmp in my comparison function,
> "Public" comes before "Public Folder" just as you would expect.
> 
> Is there a known bug in PLstrcmp (MPW 3.2) or for that matter any of the
> other Pascal style string routines?  Is there a fix or am I going to have
> to do the convert to C conversion all over the place?  (No, the toolbox
> routine I'm using to get the data does not have a C string equivalent.)

I don't know about PLstrcmp. If I were in your position, I'd do one of two
things:

- Disassemble PLstrcmp and see WTF was going on.
- Use one of the toolbox routines that compares Pascal strings (RelString,
EqualString, IUCompString, IUMagString, IUEqualString, or IUMagIDString). Here
are some notes I have on the functions (I can never keep them straight!):

    Name            Takes   Case    Diac    Returns         Trap used
    --------------  ------- -----   -----   ------------    ----------
    RelString:      Str255  spec    spec    -1, 0, 1        _RelString
    EqualString:    Str255  spec    spec    Boolean         _CmpString

    IUCompString:   Str255  TRUE    TRUE    -1, 0, 1        _Pack6,#10
    IUMagString:    Ptr/len TRUE    TRUE    -1, 0, 1        _Pack6,#10

    IUEqualString:  Str255  FALSE   FALSE   Inv. Boolean    _Pack6,#12
    IUMagIDString:  Ptr/len FALSE   FALSE   Inv. Boolean    _Pack6,#12

The Case and Diac columns refer to whether or not the functions are sensitive to
case or diacriticals. "spec" means that you can specify whether they are or not.

--
Keith Rollin
Phantom Programmer
Taligent, Inc.
Newsgroups: comp.sys.mac.programmer
From: oster@well.sf.ca.us (David Phillip Oster)
Subject: Re: Writing asynchronous SCSI driver
Organization: Whole Earth 'Lectronic Link
Distribution: comp.sys.mac.programmer
Date: Thu, 23 Jul 1992 08:59:40 GMT

Every few months I complain about this again. Maybe someday Apple will fix
this. The floppy drivers provide async i/o, and it would be no trouble to
command a seek, then use the time manager to poll the drive a calculated
number of milliseconds later to pick up the data. The driver would be easy to
write. The application software could certainly use the seek time to good
advantage. (Quicktime, for example might like to use those cycles.) But
what apple giveth with one hand in '84 (in the orginal Mac 128k), they take
away with the other (the SCSI driver has been broken in this way since its
introduction in '85.)
Newsgroups: comp.sys.mac.programmer
From: ins712r@aurora.cc.monash.edu.au (Heng Chiang)
Subject: Re: System Extension sample source wanted!!
Organization: Monash University
X-Newsreader: Tin 1.1 PL4
Date: Wed, 29 Jul 1992 05:03:58 GMT

minh@inst-sun1.jpl.nasa.gov (Minh Lang) writes:
: I am looking for some sample source for writing System Extension.
: I would appreciate any pointer or info (ftp sites, books etc...).
: Thanks.
:  == Minh ==

Me TOO!  I have found a lot of source code for general applications
but I haven't seen any for control panels / extensions.  I would
really like to know how people actually start writing extensions (INIT)
with the horrible lack of documentation.
  I would rather prefer email, because I generally do not check this
particular group.  Thanks!

    Heng.

--
Heng Chiang                    Internet: ins712r@lindblat.cc.monash.edu.au
STRESS - The confusion created when      ins712r@aurora.cc.monash.edu.au
the mind overrides the body's urge       dgentley@yoyo.cc.monash.edu.au
to choke the living daylight out of          RULE 1 - The female is always
some deserving people. - Unknown                      *right*?  - Somebody
From: colin@Cayman.COM (Colin "Atilla" Steele)
Newsgroups: comp.sys.mac.programmer
Subject: AESend returns bogus error.  Help!
Date: 29 Jul 92 20:58:13 GMT
Distribution: comp
Organization: Cayman Systems Inc., Cambridge, MA


Hello, netters.

I'm trying out some Apple Event stuff, and have run into an
interesting problem.  Perhaps some of you mac.gods could shed some
light on it.  Here's the code:

{
  OSErr result;
  LocationNameRec theLocation;
  PortInfoRec thePortInfo;
  TargetID myTarget;
  AEAddressDesc theAddressDesc;
  AppleEvent theAppleEvent, theReply;
  
  result = PPCBrowser(0, 0, FALSE, &theLocation, &thePortInfo, 0, 0);
  
  if (result == noErr) {
    BlockMove(&thePortInfo.name, &myTarget.name, sizeof(PPCPortRec));
    result = AECreateDesc(typeTargetID,
                (Ptr) &myTarget,
                sizeof(TargetID),
                &theAddressDesc);
    result = AECreateAppleEvent(kCoreEventClass,
		  kAEQuitApplication,
                  &theAddressDesc,
                  kAutoGenerateReturnID,
                  kAnyTransactionID,
                  &theAppleEvent);
    result = AEDisposeDesc(&theAddressDesc);
    result = AESend(&theAppleEvent,
            &theReply,
            kAENoReply,
            kAENormalPriority,
            kNoTimeOut,
            0,
            0);
  }
}

The problem is that AESend returns -903.  I looked it up in IM, to no
avail.  On a hunch, I flipped through the chapter on PPC, only to find
a -903 error described as "unable to open port or bad port ref num."
I checked around some more, and found that the PortInfoRec had a 0x01
in authRequired.  So, what am I to do?  Do I have to get
authentication and open the port myself?  I thought that w/ Apple
Events, you didn't have to muck around in the PPC stuff.  Any ideas?

Email replies, and I'll post a summary.  Thanx, in advance.
--


------------------------------------------------------------------------------
 Colin Steele     | Cayman Systems, 26 Landsdowne St., Cambridge, MA 02139
 colin@cayman.com | (617) 494-1916 x209 | applelink D0523 | Fax (617) 494-9270
Newsgroups: comp.sys.mac.programmer
From: dave@gergo.tamu.edu (Dave Martin)
Subject: Re: And what about this DogCow business ? ( moof! )
Followup-To: comp.sys.mac.programmer
News-Software: VAX/VMS VNEWS 1.41    
Organization: Geochemical & Environmental Research Group, Texas A&M University
Date: Tue, 21 Jul 1992 13:09:00 GMT

In article <54626@mentor.cc.purdue.edu>, flip@sage.cc.purdue.edu (Phillip Russell) writes...
>Everyone keeps refering to Tech Note #31. How about telling those of us 
>out here what all this DogCow stuff is!!!!!!
> 
>I've come across and graphic of a DogCow and didn't know it was referring
>to some inside joke.
> 
>What's the info!!!

It's all in TN#31 <grin>. We aren't gonna tell -- you cannot be given
enlightenment, you must seek it. A hint: you will not reach your goal
individually; the words of Clarus the DogCow are hidden in a stack of
notes. Moof and ye shall find.

>Flip

Well, OK, if you insist. <Flip>. Ouch! That hurt! Guess I won't do that again.


 -                                                                     -
 - Dave Martin - Geochemical & Environmental Research Group, Texas A&M - 
 - DAVE@GERGA[GERGO,GERGI].TAMU.EDU - BROOKS@TAMVXOCN.BITNET - AOL:DBM -
 -                                                                     -
From: mackd@vccsouth13.its.rpi.edu (David Allen Mack)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MacOberon
Date: 30 Jul 92 15:47:08 GMT
Article-I.D.: rpi.5b2xsnd
Reply-To: mackd@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY.

> BTW, a warning for AutoDoubler users--MacOberon freezes (irrecoverably, even
> with MacsBug installed) immediately upon starting up, if AutoDoubler is
> installed, and on.
>
>---- 
>J. S. Greenfield 


I noticed.  You wouldn't believe what trouble it causes.

	-Mack
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Help with Think Pascal,C
Date: 23 Jul 92 14:53:53 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <Brr1Ep.ILM@csn.org>, erich@csn.org wrote:
> ....
>   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.

Eric

First, you dont say whether you are planning to use objects, but you should
know that (according to Symantec) C objects and Pascal objects *dont* mix
at all.  The dynamic binding mechanisms are different, so if you are going
to add C code to the Pascal project, the C code must not use objects from
either side.

Second, you are going to have to write interfaces for both the Pascal and
the C portions, so that each knows how to reference the other.  This is not
easy to do or to debug, *you* are totaly responsible for making sure that
this 'glue' doesnt *lie* on either side, as neither compiler has any way of
helping you.  I would think it a significant impediment for someone who is
ignorant of one of the 2 languages.

I would recommend that you learn Pascal-its not so hard, and you are going
to need that knowledge to understand the Pascal code which you are
modifying.  You might want to use some of your C thinking skills by
pseudo-coding in C, then translating that to Pascal-eventually you will
find yourself fluent in the new language, and can cease with the crutch.
--

Dana S Emery <de19@umail.umd.edu>
Newsgroups: comp.sys.mac.programmer