HDTenEightyP/NetNews huggingface dataset:
From: rson@rhi.hi.is (Mimir Reynisson)
Newsgroups: comp.sys.mac.programmer
Subject: Dynamic Link Libraries ..
Date: 22 Jan 93 13:13:35 GMT

Ok. Here+s the score. I'm working on an interpreted language that
needs access to external functions. Now it is obviously smart to
support XCMD's and other code resource thingees, but they are not
as convenient to make like say an MPW .o file. So here's the
question: is it a good idea to simply take an MPW .o file and
pass it through some kind of "linker" which would simply calculate
some offsets for exported functions which could then be accessed
"on call" so to speak. I know about "Dinker" and some other library
that is supposed to do this for "classes" but what about plain
functions?

Anyway .. as far as I can think (at the moment) this looks like
a nice and easy to use solution (how hard it is to write I'm not
so sure?)

Hmm .. any comments?
Newsgroups: comp.sys.mac.programmer
From: pbrande1@cc.swarthmore.edu (Philip Brandenberger)
Subject: Keeping a resource file open forever from an INIT
Followup-To: comp.sys.mac.programmer
Summary: INITs, resource files
Reply-To: pbrande1@cc.swarthmore.edu (Philip Brandenberger)
Organization: Swarthmore College Computing Center
Date: Sun, 24 Jan 1993 01:24:14 GMT

Hello all-- I hope this is blatantly FAQ.

I am working on an INIT in which I'd like to keep my resource file open
forever much as Suitcase/MasterJuggler does for itself and its suitcases and
as Carpetbag does also.  

I gather that the way to do this is to hack at the FCBs, but the whole
process is a bit cloudy.  If anyone has sample code or a basic description
that would be great.

Thanks,
Phil
-- 
Phil Brandenberger
phil@cs.swarthmore.edu
From: soetji+@G.GP.CS.CMU.EDU (Soetjianto)
Newsgroups: comp.sys.mac.programmer
Subject: Re: ResEdit & Pop-up Menu
Date: 26 Jan 93 22:20:29 GMT
Article-I.D.: cs.C1HFE6.F7o.2
Organization: School of Computer Science, Carnegie Mellon
Originator: soetji@G.GP.CS.CMU.EDU

I guess I have found the solution myself.
To create a pop-up menu with ResEdit:
	edit the CTNL by filling in the CTNL fields
	in the order specified in (New) IM: Toolbox Essential
	page 5-26. (Read also the IMPORTANT note on page 5-27)
The dialog Manager will take care of the popup menu creation.

peace,
Soetji
Newsgroups: comp.sys.mac.programmer
From: walkerj@math.scarolina.edu (Jim Walker)
Subject: When is a menu disabled? (enableFlags isn't all)
Organization: USC  Department of Computer Science
Date: 27 Jan 93 02:43:33 GMT


An extension I'm writing needs to be able to tell when a certain menu is
disabled.  I thought I could just look at the low bit of the enableFlags
part of the menu record... However, it turns out that when a modal dialog
is in front, then menus are disabled yet the enableFlags do not reflect
that.   I can't think of any good way to tell when a modal dialog is in
front, either.

--

 -- Jim Walker  USC Dept. of Math.  walkerj@math.scarolina.edu
From: eric.larson@f620.n2605.z1.ieee.org (eric larson)
Newsgroups: comp.sys.mac.programmer
Subject: Should we start using an installer?
Date: 24 Jan 93 01:50:04 GMT
Organization: FidoNet node 1:2605/620 - Shockwave Rid, Freehold NJ


 As wiltz@after (David Wiltz) asked:

 # I also am looking to begin using an installer for the
 # distribution of a keymapping, a few fonts, and many files
 # related to our courseware.

 # Can anyone direct me toward the format for creating an installer
 # script?

 # Any help, e-mail or post is most appreciated.

Folks looking for an installer may want to consider the recent programming
efforts of Bill Goodman, to wit a program named "Smaller Installer". As Bill
is known for particularly effective programming in his most famous effort,
Compact Pro, I suspect that Smaller Installer will be an effective solution
for many.

Smaller Installer may not be all that widely distributed yet, but I am sure
that mail to Bill might turn up a source or two.

--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
 eric larson - Internet: eric.larson@f620.n2605.z1.ieee.org
From: jgh@minster.york.ac.uk
Newsgroups: comp.sys.mac.programmer
Subject: Macsbug and Claris
Date: 28 Jan 93 10:34:53 GMT
Organization: Department of Computer Science, University of York, England


Two unrelated questions:

1. Where can I find documentation for Macsbug?

2. Is it possible to use the XCMDs (or whatever they are) of, say, the
Claris package to generate LaTeX output from text and diagrams in a
similar way to that provided by xfig on Unix? If you don't know xfig:
it is a drawing package on Unix systems, running under Xwindows, and
allows you to export LateX by converting the drawing primitives into
LaTeX commands. It's a very nice way to generate pure TeX output.

I appreciate replies to jgh@minster.york.ac.uk

Thanks

Jon
Newsgroups: comp.sys.mac.programmer
From: oas@cray.com (Omar Souka)
Subject: Think Reference Easter Egg
Followup-To: comp.sys.mac.programmer
Organization: Cray Research
Date: 25 Jan 93 09:34:30 CST

If you let Think Ref 2.0 sit in the background for awhile (seems
like about 20 minutes) and then switch to it, the thinking man
sitting on the Macintosh switches the hand that his chin is
resting on. I guess he gets tired.

########################
# Omar Souka           #
# Cray Research, Inc.  #
# oas@cray.com         #
########################
Newsgroups: comp.sys.mac.programmer
From: soetji+@G.GP.CS.CMU.EDU (Soetjianto)
Subject: ResEdit and pop-up menu
Originator: soetji@G.GP.CS.CMU.EDU
Organization: School of Computer Science, Carnegie Mellon
Date: Tue, 26 Jan 1993 20:02:38 GMT

As pop-up menu is implemented as control in Sys 7,
does anyone know how to make a pop-up menu using ResEdit?

thanks,
Soetji@g.gp.cs.cmu.edu
From: 93ajm@bigbird.williams.edu (Andrew Mauer)
Newsgroups: comp.sys.mac.programmer
Subject: What does "Network" Control Panel modify?
Date: 23 Jan 93 16:43:35
Organization: /home/93/93ajm/.organization
Distribution: comp
NNTP-Posting-Host: bigbird.cc.williams.edu


At my site, we have a problem with users changing the "Network" type
from "EtherTalk" to "LocalTalk", resulting in a no available network
services, and many other confused users. I would like to write an init
to revert this to the proper setting.

The Question:
Where is the information about the Network type stored? 

I have looked for newly modified files, and checked what I know of
parameter ram. No dice. Any suggestions?

Email to me and I will summarize, or send me a copy please.


Andrew.Mauer@williams.edu

--
/Andrew Mauer/
93ajm@williams.edu
From: gk1@acpub.duke.edu (Gavin  Kistner)
Newsgroups: comp.sys.mac.programmer
Subject: New ColorHack?
Summary: Is there a patch for putting color-words into Think C 5.0.x?
Keywords: Think C
Date: 27 Jan 93 00:36:27 GMT
Followup-To: gk1@acpub.duke.edu
Organization: Duke University; Durham, N.C.

I got a cool looking little code patch to put color into Think C 4x editor,
which <I think> caused words to be color-coded by their use.
I lost it a while ago, and just bought Think C 5.0.4.
Anyone know of, or if it's possible, to have words change color?

That's was one of the things I adored about Turbo C.

- Gavin
From: Mark.R.Valence@dartmouth.edu (Mark R. Valence)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Hardware Protection Keys
Date: 25 Jan 93 16:04:09 GMT
 <1993Jan24.215738.9412@kth.se>
Organization: Dartmouth College, Hanover, NH
X-Posted-From: InterNews1.0a5@newshost.dartmouth.edu

In article <1993Jan24.215738.9412@kth.se>
d88-jwa@cyklop.nada.kth.se (Jon Wtte) writes:

> In <23JAN199318502476@violet.ccit.arizona.edu> theeric@violet.ccit.arizona.edu (Eric Hegstrom - THEERIC) writes:
> 
> >I don't know about ADB devices but the company I used to program
> >for used read/writable protection keys for the SCSI port (transparent
> >to any devices I tried to hook up).
> 
> 1) I'm all out of SCSI devices
> 2) I wouldn't trust anything that isn't a real SCSI unit
>    on any of my SCSI buses. All my important data goes there,
>    and some of that data needs to go there FAST.

I once played with a SCSI dongle that did not require a SCSI device ID.
 "How did it work" you ask?  Well, it simply watched for a special
sequence of bits on the SCSI bus, like 2A83F93AA9C0823BC09234C or
something.  When it saw this sequence, it woke up and interpreted the
following bits as commands, then sent the results back to the Mac. 
Heavan help you if you had a document that contained
2A83F93AA9C0823BC09234C in it.  Saving would prove disasterous
(although I don't think you would realize until too late ?? ).

I think the manuafacturers said something like "oh, but the chances of
that happening are very minimal."  Pah!  If there is a chance at all,
why do it?

Or maybe I just didn't understand something.

Mark.
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: MPW Lib/Make question
Date: 22 Jan 93 11:41:18 +1300
Organization: University of Waikato, Hamilton, New Zealand

In article <1993Jan20.060444.8192@gn.ecn.purdue.edu>, jess@gn.ecn.purdue.edu (Jess M Holle) writes:
>>
>>I now am having some problems understanding the use of lib and
>>make under MPW.  What I want to do is to be able to automatically
>>rebuild any of the huge libraries which we use, while only having
>>to re-compile the files which need it.  I also don't want to keep
>>old object files hanging around.
>>
>>In other words, I have one library that is almost 1 MB in size.
>>When I change 1 source file, I'd like to be able to "make" the
>>library again and have only the one file recompiled and the
>>updated information overwrite the old information in the library.

As far as I'm aware, the Lib tool hasn't got any function for *updating*
a library, you have to rebuild it from scratch. This is probably because
there is no actual object library format under MPW; library files are just
concatenations of object modules from separate .o files.

Here's the sort of rule I have in my makefiles for rebuilding an object
library (I'm using "\" to indicate "hold down the option key and press the
following key"):

	MyLib.o \f \d
		Component1.p.o \d
		Component2.a.o \d
		Component3.mod.o
	    Lib -o MyLib.o \d
		Component1.p.o \d
		Component2.a.o \d
		Component3.mod.o

As you can see, it's quite simple (apart from the nuisance of having to write
out the list of object files twice!). If you edit any of the source files,
Make will recompile just those, and rebuild the entire library.

Rebuilding a library is fast: I have one built from 90 component object
files, and it typically takes much less time than recompiling one of the
Modula-2 or assembler source files.

>>If all else fails, I'll have to leave hundreds of .o files hanging
>>around my drive, but I'd much rather be able to collect them into
>>tidy libraries and update them as needed (without a full rebuild).

You still need to keep all the .o files around, otherwise you'll have to
recompile all the sources each time you rebuild the library. At least you
can keep them in some subdirectory, separate from the library.

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
You know you've been programming the Mac a long time when...
...you know all the arguments to CopyBits by heart.
Newsgroups: comp.sys.mac.programmer
From: peter@cujo.curtin.edu.au (Peter N Lewis)
Subject: Re: Appletalk demo source code ?
Followup-To: comp.sys.mac.programmer
Organization: NCRPDA, Curtin University
Date: Fri, 22 Jan 1993 01:56:46 GMT

In article <1993Jan20.150911.9355@gallant.apple.com>,
blob@gallant.apple.com (Brian Bechtel) wrote:

> If you don't have access to the internet and ftp (file transfer
> protocol, but usually standing for a program that supports ftp) then you
> can't take advantage of the collections of source code that are
> available electronically.  You'll have to find a local bulletin board
> system (BBS) which has source.

If you have news access, then you pretty much must have Email access.  If
you have Email access, then you can access all the ftp sites via
Email<->ftp gateways, as described in the various FAQs (I think its in the
comp.sys.mac.comm FAQ).  Of course, some sites may get upset at you using
Email to ftp, talk to your network/site administrator first.

> The newsgroup comp.binaries.mac sometimes contains programs with source,
> but not usually.

The newsgroup comp.sources.mac on the other hand never contains anything.
   Peter.

_______________________________________________________________________
Peter N Lewis <peter@cujo.curtin.edu.au>             Ph: +61 9 368 2055
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@feffe.nada.kth.se (Jon Wtte)
Subject: File IDs, a load on HFS?
Summary: Are they default on HFS?
Keywords: File ID
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Thu, 28 Jan 1993 16:46:26 GMT

Inside Mac says "a new directory tree node is created
for each File ID that is created"

However, I always assumed files always had IDs under
HFS (and that might be the value returned in the dirID
field when calling PBGetCatInfo, who knows? :-)

Am I correct in assuming that, under HFS, there is no
penalty involved in creating a file ID for every file?
(I am not concerned about remote volumes)

Cheers,

						/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

 -- I don't fear death, it's dying that scares me.
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Arcade-style animation...
Organization: Kalamazoo College
Date: Thu, 28 Jan 1993 03:07:19 GMT

howlett@world.std.com (Joseph S Howlett) writes:
>>Do people think it's worth bothering with synchronizing with the VBL
>>when drawing sprites?
>
>I tried VBL synching, but found that it really didn't make any
>visual difference since I'm erasing & drawing the new sprites in
>one blit, so I abandoned it.

I imagine that when you get a lot of larger sprites (32x32+) moving
around, the beam will still tear some of them occasionally.

There really is a huge difference between fast (30 fps+) graphics that
are rock-solid and those that tear even only rarely.  If you're going
for the "gee whiz, that looks great" effect, at least try putting in
the VBL-synch code, and see if it helps.

>The VBL synching might also make your
>program possibly run at different speeds on machines with monitors
>which have different refresh rates, which is not good.

Well, not if you do it right...  :-)
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "A degree in Computer Science from Berkeley didn't much qualify me to uphold
  the banner of Chaos against the forces of Order."              - R. Zelazny
From: rick@akbar.cc.utexas.edu (Rick Watson)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Hiliting with the hilight color??? Problem
Date: 23 Jan 1993 03:17:16 GMT
Organization: University of Texas at Austin
NNTP-Posting-Host: akbar.cc.utexas.edu

>If I clear the top bit of the right part of the toolbox memory,
>then I get a perfect result the first time I call InvertRect.
>The text goes from black on white to black on hilight color. But
>on the second call when I try to revert the text to normal, it turns
>black. 

Did you remember to do the BitClr((Ptr)HiliteMode,pHiliteBit);
before each InvertRect? Quickdraw resets the bit after 
various calls. This is documented somewhere in the vicinity
of the description of pHiliteBit.

Rick Watson 
The University of Texas Computation Center, Networking Services, 512/471-3241
   internet: r.watson@utexas.edu             bitnet: watson@utadnx
   uucp:     ...!cs.utexas.edu!ut-emx!rick   span:   utspan::utadnx::watson
From: tcwan@umiami.ir.miami.edu
Newsgroups: comp.sys.mac.programmer
Subject: Re: Extension/FKey idea!!??
Date: 22 Jan 93 18:03:07 EST
Organization: Univ of Miami IR

w3In article <1993Jan22.122851.1607@galaxy.gov.bc.ca>, cconstantine@galaxy.gov.bc.ca writes:
> Here's an idea if no one has done it yet.
> 
> Under System 6 with Multifinder you can click on the icon in the top right hand
> corner to switch from application to application.  Or you can go to the Apple
> Menu and select the application you want.
> 
> Under System 7 you go to the top right corner and pull down to the application
> you want.  If you use JustClick 1.02 you can get the same functionality of just
> clicking once on the icon in the top right corner of the screen to cycle
> through applications.
> 
> In Windows (Lord Forbid) you can just hit Alt-Tab and cycle through the
> applications that are open.
> 
> My idea is to write an FKey/System Extension that has the Windows 
> Functionality to the System.
> If this has been done already, can some point me to where I can get it.

There's an extension that allows you to set the key sequence to use for
switching among applications. You can even exclude apps. (like PrintMonitor)
from the ones that are being switched to.

It's call AppSwitcher7, by Jeremy Roussak. It's been around for a while.
(At least, sometime soon after System 7 was out).
It's freeware, but I don't know offhand if it's at the ftp sites.

Hope this helps,
t.c


> 
> Thanks.
> 
> Carl B. Constantine
> CCONSTANTINE@galaxy.gov.bc.ca
Newsgroups: comp.sys.mac.programmer
From: derosa@rtsg.mot.com (John DeRosa)
Subject: Wanted: QuickTime Developer's CD V1.0
Reply-To: motcid!derosa@uunet.uu.net
Organization: Motorola Inc., Cellular Infrastructure Group
Date: Fri, 22 Jan 1993 01:22:00 GMT

I just received my first QuickTime Developer's 
CD and found that it was V1.5.  Now that is all
really great, getting the latest and greatest and
all, but, what I really want is V1.0 (i.e. the first
CD to come out).  Why?  Because I brought it home and
my kids thought it had some really cool movies 
on it.  

I'm willing to pay some $$$ for it.  Thanks a 10^6.

Say HI to Bruce....
-- 
=  Enjoy!          John DeRosa, Motorola, Inc, ESMR Development  =
=  thanks          derosa@ssd.comm.mot.com                       =
=  a 10^6          N1111@applelink.apple.com                     =
Newsgroups: comp.sys.mac.programmer
From: aleskine@cs.hut.fi (Arto Leskinen)
Subject: reading multibyte chars
Organization: Helsinki University of Technology, Finland
Distribution: comp.sys.mac.programmer
Date: Sat, 23 Jan 1993 18:47:03 GMT

I have following code for eventloop (important parts)
do {
  SystemTask ();
  mTIdle( NULL );
  if (GetNextEvent (everyEvent, &event))
  {
    switch (event.what) {
      case keyDown:
	doKeyDown(&event);
        break;
  ...
    }
  }
} while (..);
and following in the part where i read characters. But this does not work
with 2 byte chars. I only get one keydown event for 2 byte chars. 
...
switch (CharByte(&c,0)) {
case smFirstByte: 		/*First byte of multi byte char*/
  doubleByte[0] = c;
  break;
case smLastByte:		/*Last byte of multi byte char*/
  doubleByte[1] = c;
  addChars(mTRecH, doubleByte,2);	/*Changes currChar, charsTotal */
  line = (*mTRecH)->currLine;
  calcLines(mTRecH, line);
  drawLines(mTRecH, line);	/* Changes lineStarts, currLine */
  mTCalcCaretVPos(mTRecH); 	/* Puts the selRect into new place */
  break;
case smSingleByte:				/*Single byte char*/
  addChar(mTRecH, c);
  line = (*mTRecH)->currLine;
  calcLines(mTRecH, line);
  drawLines(mTRecH, line);	/* Changes lineStarts, currLine */	
  mTCalcCaretVPos(mTRecH); 	/* Puts the selRect into new place */
}
What is wrong here? addChar does like it sounds, calcLines updates linestart 
array, drawlines draws current and following lines and mtCalcCaretVPos keeps
track of carets place.
I would love to hear any ideas. Thank you.
Arto Leskinen.
aleskine@cs.hut.fi

Newsgroups: comp.sys.mac.programmer
From: kjt001@dunix.drake.edu (Devil Bunny!)
Subject: My Resource ID's keep changing numbers!!!!
Organization: Drake University, Des Moines, Iowa, USA
Date: Mon, 25 Jan 1993 05:25:31 GMT

I'm working with Think C 4.0 and ResEdit 2.1.1, and I am trying to
change the resource ID's for my menus.  I can change the numbers, and
they save - whenever I open the .rsrc file, it shows the correct IDs,
but when I try to access them with Think C, I can only access them with
IDs of 128,129, and 130.  I've assigned them as 400,401,and 402.

I've created a MBAR resource (ID 400), and listed those three menu
resources in them.  I can load the resourses and display them on the
screen with the MBAR resource.  But when I try to add more items, I
can't access them with IDs of 400,401,402 - and when they are clicked
on, they return the IDs of 128,129,and 130.

Why can't I change these resource numbers???  And what's screwing up;
ResEdit or Think C?

Thanks for any help!

-- 
|   Kevin Tieskoetter    kjt001@acad.drake.edu  kjt001@dunix.drake.edu    |
|                               Drake University
|          Des Moines, IA...Where men are men, women are scarce,          |
|                       And sheep are nervous!                            |
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Novice programmer seeks help with Sound Manager
Date: 25 Jan 93 20:57:17 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

In article <C1CEK3.7Gt@dartvax.dartmouth.edu>, bryan.y.lee@dartmouth.edu
(Bryan Lee) wrote:
> 
> Well, this is my first time posting to this group, so here goes,
> 
> 	I've read about the sound manager, and have read a few example routines
> that play sound, using the sound manager. I figured out how to make new
> channels, and use sndPlay on 'snd ' resources. No sweat. However, I still
> don't understand how to use type 2 'snd ' files. I have read Inside
> Macintosh 5 about these resource types, but still haven't had any luck
> with them.
> 	I do the following (simplified a little):
> 			SndNewChannel(&my_chan, sampledSynth, 0, NULL);
> 			SndPlay(my_chan, my_type2snd, 1);
> 			SndDoCommand(my_chan, my_command, 0);
> 
> In this case, "my_command" = noteCmd; <==Does this command do anything or
> what?
> 
> I thought it would be neat to be able to play my own melodies using the
> sounds from these type2 resources, but when I try to play a note using
> noteCmd,  only silence plays for the duration of the note. Am I totally
> off base, or is there something simple I am missing? Maybe there is a FAQ
> that has this somewhere?

Before you can use the noteCmd (now known as the "frequencyCmd") you must
use the soundCmd to install the sound header into the channel. The SndPlay
trap will only play the sound as described in the resource. To use the
soundCmd with a resource you'll have to parse the 'snd ' and find the sound
header within it.

-----------------------------------------------------------------------
Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
                             |          Sound Manager Expert
Apple Computer, Inc.         | "All opinions expressed are mine, and do
20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
Cupertino, CA 95014          |       employer, Apple Computer Inc."
Newsgroups: comp.sys.mac.programmer