HDTenEightyP/NetNews huggingface dataset:
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Disassembler?
Date: 28 Sep 92 15:25:08 GMT
Followup-To: comp.sys.mac.programmer
Organization: Personal

In article <1992Sep27.112019.17220@actrix.gen.nz>,
Bruce.Hoult@bbs.actrix.gen.nz wrote:
> 
> In article <1992Sep24.170623.245523@magicbb.uucp> sharkman@magicbb.uucp (Matt Daw) writes:
> > I have a program that will give me assembly back but I was talking about
> > like C or Pascal source files? If there is such a thing...what I want to
> > do is to dissasemble some registered shareware and find out how they
> > work to help me learn....
> 

[Bruce's sarcastic comments expunged]

Compilation is generally not a reversable process.  Usually, all comments
are discarded, symbolic names are bound to arbitrarily assigned constants,
and ultimatly to machine code.  Frequently, an optimising compiler will
emit code which reflects the order of the original, and will then rearange
that code into something equivalent, but not necessarily evocative of the
original. In the Mac environment, routine names often interleave with
code threads, and are referenced by symbolic debuggers (a practice started
by motorala with its macsbug).

Some compilers leave enough information available for a symbolic debuger to
refer back to the code, but this information is often skimpy.  In many
cases, data and instructions are intermixed to such an extent that it is
difficult to distinguish them.  

And all the above asumes that the language gets compiled into native 68000
code.  Some compilers (Basic, Forth, ? Lisp) emit code which is executed by
a run-time state machine.  Digging into that stuff will drive anyone batty.

The derivation of source code from executable object code involves a
process called reverse engineering, and often involves grey arts and
obscure tools.  It is often necessary, but is always nasty.
--

Dana S Emery <de19@umail.umd.edu> | "Novo, de Novo,
                                  |     de novo, de no-o-o-o-o---, 
                                  | Novemba come an' dey gonna go home."
Newsgroups: comp.sys.mac.programmer
From: dedrad@arco.com
Subject: Submenu weirdness with custom MDEF..
Organization: TheNews 
Date: Mon, 5 Oct 1992 15:35:22 GMT

 Hi all -

Apologies if this has been covered before, but here's my problem.  I've written
a custom MDEF using Think C 5.0.  Everything works great, except when I attach
a submenu (which uses the standard MDEF 0) to my main menu which is using my
MDEF.  The submenu top pops up erratically by a few pixels each time I select
the menu item.  Any clues to what I'm missing in my custom MDEF which would
cause this behavior?

Thanks in advance

Randy DeRuiter
dedrad@arco.com
From: draper@odin.mda.uth.tmc.edu (E.J. Draper)
Newsgroups: comp.sys.mac.programmer
Subject: QuickTime Compressed PICTs
Date: 28 Sep 1992 16:19:01 GMT
Organization: U.T.M.D. Anderson Cancer Center
X-UserAgent: Nuntius v1.1.1d9
X-XXMessage-ID: <A6EC9A6F2B01019A@mdarpi1.mda.uth.tmc.edu>
X-XXDate: Mon, 28 Sep 92 11:18:07 GMT

* This is a repost *

I'm using the Picture Utilities package to extract some necessary info
from a PICT before allocating a GWorld (most notably the maximum depth
for all the pixmaps contained in the picture).  I currently do this by
calling GetPictInfo() which works great on regular PICT data. However, I
get bad data from GetPictInfo() if the Pichandle is a compressed
QuickTime File (like depth == 1).  

How do I go about recreating GetPictInfo() functionality with QuickTime
compressed images?  

Is there any other way of obtaining the maximum bit depth for a
compressed PICT.  I really hate to allocate a 32 bit buffer when all I
really need is 8.  Any help along these lines would be greatly
appreciated.

Best Wishes,
Ed

p.s. - Apple engineers: Special casing GetPictInfo() for non- QuickTime
data is a real drag.  It greatly diminishes the usefulness of the
GetPictInfo() call (as a matter of fact it makes it damn near useless).


      |E|J-  ED DRAPER
 rEpar|D|<-  Radiologic/Pathologic Institute
             The University of Texas M.D. Anderson Cancer Center
             draper@odin.mda.uth.tmc.edu
Newsgroups: comp.sys.mac.programmer
From: martinher@urvax.urich.edu (Herb Martin - martinher@urvax.urich.edu)
Subject: Re: Think C wish list
Reply-To: martinher@urvax.urich.edu
Organization: University of Richmond
Distribution: comp
Date: Fri, 2 Oct 1992 04:58:33 GMT

In my opinion, what TC needs most is for the compiler to identify
MULTIPLE errors per compile like almost every other C compiler I
have ever used.


**************************************************************
**   Herb Martin               MartinHer@urvax.urich.edu    **
**   JRC-41-1, P.O. Box 26603, Richmond, VA 23261           **
**   804-274-4325 (days)       804-320-5047 (evenings EST)  **
**************************************************************
From: kjh+@cs.cmu.edu (Kenneth Hughes)
Newsgroups: comp.sys.mac.programmer
Subject: shareware sponsor list
Date: 4 Oct 92 13:14:10 GMT
Article-I.D.: cs.BvLM3M.17x.1
Followup-To: comp.sys.mac.programmer
Organization: School of Computer Science, Carnegie Mellon

Would you be willing to honor the people who (financially) support your
shareware program by mentioning their name somehow in your program?
If given the opportunity, would you allow yourself to be publicly thanked
in this way?

The idea: Through the about box of a shareware program, provide access to
a list of people who have registered their copies with you and have allowed
their names to be mentioned.  Explicitly state that those whose names are
not found on the list may have registered as well but opted to not be so
recognized.

Obviously, the list could only be updated when the next version (hopefully
with new features and/or bug fixes) comes out.  Also, some shareware authors
may not want the public to know how much support they've received (even if
it would only be a lower bound), but of course nobody would force them to 
adopt this practice.

The goal:  Provide some deserved recognition for the honest people who
register their shareware, and promote a sort of prestige to be associated
with sponsorship of shareware.  I realize that "proud sponsor of <n>
shareware programs" isn't something that everyone would be interested in
boasting, but I think it is something to be proud of.

What do you think about this idea?  I'm considering it for a shareware
program of mine but wanted to hear what people think first.

Kenneth J. Hughes        (kjh@cs.cmu.edu)
Entelechy Corporation
Newsgroups: comp.sys.mac.programmer
From: absurd@applelink.apple.com (Tim Dierks, software saboteur)
Subject: Re: Getting a dialog in front
Date: Fri, 2 Oct 1992 18:56:03 GMT
Organization: MacDTS Marauders
Followup-To: comp.sys.mac.programmer

In article <00961772.8D5273A0@e.kth.se>, karlberg@e.kth.se
(KRILLE_KROKODIL) wrote:
> 
> When I start a program I've written in Think Pascal it's supposed to
> show a dialog before it enters the main loop. The wierd thing is that 
> although I pass behind=POINTER(-1) when I call GetNewDialog it gets 
> drawn behind all the other windows on the screen, as does the main 
> window until I enter the main loop. Why is that and how do I get round
> it?
> 
> Martin

MultiFinder, and System 7, for resons unknown to me, don't bring an
application to the foreground until its event loop starts up; you
can force it to bring you forward by making a few event calls; the
canonical sequence is to call EventAvail() three times; you'll
then be brought to the front.

Tim Dierks
MacDTS, but I squeak with glee
From: gb2a+@andrew.cmu.edu (George J. Baxter)
Newsgroups: comp.sys.mac.programmer
Subject: THINK C bug
Date: 5 Oct 92 10:53:30 GMT
Article-I.D.: andrew.ceo8weq00iUyI4PElh
Organization: Science & Technology Center, Carnegie Mellon, Pittsburgh, PA

Howdy..
    I have program, written in THINK C 5.0.3 (recent update).  My
routine USED to work.. the problem is arising when I want to copy the
first 'word' of a string into another string:

	while (*longString != ' ' && longString != (comLine + (long)(comLine[0]+1L)))
		   firstWord[i++] = *longString++;

	firstWord[i]=0;

(Basically, comLine is a pascal string, and longString is a character
pointer initially pointing to the first character after comLine[0], ie,
comLine[1].  I want firstWord as a 'C' string).

What occurs in the last line of the code fragment is that
'firstWord[i]=0' actually does this:
firstWord[0]=0;

ie, it nukes my string.  In the debugger, everything is cool.. 'i' is
the correct digit (it's a short), the array is unchanged.  When I put a
DebugStr in right before the firstWord[i]=0, it WORKS.. so I took a look
at the assembly in MacsBug and this is what is happening.

Without the debugstr, ie, when the code doesn't work, a2 gets initialized to 
-$28(a6,d3.W), which is the beginning of the string.. ie, firstWord[0]. 
d3 is 'i', which at the beginning, is 0.  The firstWord[i]=0 assignment
is CLR.b (A2)... which is WRONG!!!  Inside MacsBug, I can see my word is
ok, then the first character gets nuked by the 'CLR.b (a2)' statement.

With the debugstr, it doesn't use A2... and the CLR.b is
CLR.b -$28(a6,d3.W)
and d3, at this point, is the correct short value for the end of the
string, so the code works.

Bogus.
-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: goodman@chaos.cs.brandeis.edu (Marc Goodman)
Subject: Help with ampCmd and wave-table sound channels...
Organization: Brandeis University
Date: Thu, 1 Oct 1992 04:05:06 GMT

Hiya,
I'm trying to simulate the envelop of an instrument by alternating
freqDurationCmds and ampCmds with wave-table sound channels.  IM-VI
says that ampCmd can be sent to any type of channel, but it doesn't
appear to work...  The amplitude remains the same no matter what I
try.  I'm working on a IIcx with system 7.0.1.  Has anybody gotten
this to work?  What's going on here?
-Marc
From: mac@coos.dartmouth.edu (Milton A. Colvin)
Newsgroups: comp.sys.mac.programmer
Subject: waiting in SIOWs
Date: 2 Oct 92 19:31:55 GMT
Organization: Dartmouth College, Hanover, NH

I'm trying to use SIOW (stdio windows) from MPW so that I can debug with
sourcebug. also so that I can get several going at once.

Is there any way a SIOW application can go to background and idle for a while?
Ideally, I'd like it to wait until kicked by WakeUpProcess, but I could wait 
and poll. The main thing I need to do is release control. WaitNextEvent(0,...)
doesn't seem to cut it.
Newsgroups: comp.sys.mac.programmer
From: David Johnston <davidj@daveland.demon.co.uk>
Subject: MacTCPCommonTypes & typedef unsigned char b_8.
Organization: Daveland Developments
Date: Sat, 26 Sep 1992 17:33:24 GMT
X-Xxmessage-Id: <A6EA5C2BC80108B8@daveland.demon.co.uk>
X-Useragent: Nuntius v1.1.1d7
X-Xxdate: Sat, 26 Sep 92 23:27:55 GMT

I've been doing some 'Lets grope in the dark TCP programming' and
have run up against a somewhat bizarre problem.

 To get started I tried to compile a piece of Apple code (I think
from ftp.apple.com) called tcpserver what is a simple greeting
server (Under Think C).
 It fell over wanting MacTCPCommonTypes.h, so I found me a copy
of this somewhere and stuck it in. It then fell over with
"Illegal redeclaration of b_8"
at the line "typedef unsigned char b_8" in MacTCPCommonTypes.h.

Fair enough, *except* I've scanned every last byte of my hard
disk and can't find any file or library which refers to b_8.

How can I be redeclaring this? Why doesn't the rest of the world
have this problem? And why aren't I more succesful with women?
Are these problems linked? Inquring minds want to know.

-----------------------------------------------------------------
David Johnston:  davidj@daveland.demon.co.uk (Home IP connection)
-----------------------------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: u9000593@cc.uow.edu.au (Wai Lok Lo)
Subject: About Preferences file
Summary: To create a Preferences file
Keywords: Preferences
Organization: University Of Wollongong
Date: Thu, 1 Oct 92 05:03:16 GMT


Hi, 

	I want to ask if anyone knows how to create a Preferences file.
I need to open two files together.  One of them is a pict file.  The pict will
be displayed on the (Mac) window.  The other file is needed internally.
It is something like a preferences file where the filename is fixed.
I need to write to, read and open both files together.  I can open the pict
file but not the other one.

	So, how do I do that in a Macintosh application.  

	Thanks in advance.

	My address is:

		     u9000593@wampyr.cs.uow.edu.au
Newsgroups: comp.sys.mac.programmer
From: Stephan Bublava <stephan@iguwnext.tuwien.ac.at>
Subject: RectInRgn Problem solved
X-Xxmessage-Id: <A6F78BDBAC012E02@htumac1.tuwien.ac.at>
X-Xxdate: Tue, 6 Oct 92 18: 30:51 GMT
Organization: Fachschaft Informatik, TU Wien
X-Useragent: Nuntius v1.1.1d12
Date: Tue, 6 Oct 1992 17:30:24 GMT

Sorry for bothering you - I just solved the problem myself.

It is in no way related to the system version or the hardware.
As a matter of fact the rect was invalid (right < left), which only
happened on this one particular Mac (as a result of a stupid bug of
mine).

Stephan Bublava
stephan@iguwnext.tuwien.ac.at
Newsgroups: comp.sys.mac.programmer
From: absurd@applelink.apple.com (Tim Dierks, software saboteur)
Subject: Re: Writing dcmds in MPW
Date: Fri, 2 Oct 1992 19:22:12 GMT
Organization: MacDTS Marauders
Followup-To: comp.sys.mac.programmer

In article <1992Oct1.204331.10558@natural.com>, evans@natural.com
(Christopher Evans) wrote:
> 
> I am trying to write a dcmd in MPW or Think C and I am having a heck
> of a time!  The dcmd uses some ANSI calls and a couple of toolbox calls.
> The problem is that I can't link it in MPW.  The sample dcmd on the 
> developer cd's links a file called "{CLibraries}CInterface.o which I don't
> have.  Where is this file?  
> 
> Can I also be safe in assuming that I should not waste my time trying to 
> write a dcmd in Think C?

OK; I'd suggest you write the dmcd in MPW, because the tools are designed
to work in MPW; I don't have any idea how you'd do it in Think C.  You're
going to run into two problems, because the dcmd stuff was designed for
MPW 3.1, and there's been two significant changes:
  1) CInterfaces.o and CRuntime.o were eliminated
  2) The segmentation strategy for a lot of routines changed

You're currently running into 1); it's trying to link with CInterface.o,
and it doesn't exist.  Replace all references to "{CLibraries}"CRuntime.o
with "{Libraries}"Runtime.o and replace "{CLibraries}"CInterface.o with
"{Libraries}"Interface.o.  Note you will usually have two references
to "{Libraries}"Interface.o now; you can delete one of them.

You'll soon run into 2).  The BuildDCMD tool expects a very specific
segmentation, and because the libraries were resegmented in MPW 3.2,
it can't recognize things, so you'll need to merge the extraneous
segments into the "Main" segment.  You'll need to add arguments like
-sg Main=StdIO,StdLib to your link line.  The easiest way to determine
which segments you've got that need to be merged is to link the dcmd
without merging anything, then open it with RedEdit and look at the
CODE resources; they'll all have names, and each resource's name
is a segment name.  You need to merge all the segments except for
%A5Init into Main.  So write down all the names of all the other
segments and add this argument to your link line:
  -sg Main=segName1,segName2,and,so,on
This will merge all the named segments into Main, giving you the
canonical 2-segment file BuildDCMD wants to use.

Enjoy;
Tim Dierks
MacDTS
From: de19@umail.umd.edu (Dana S Emery)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Object Definition-->Macsbug Template. How?
Date: 1 Oct 92 02:15:15 GMT
Followup-To: comp.sys.mac.programmer
Distribution: usa
Organization: Personal

In article <1992Sep30.141733.3389@daffy.cs.wisc.edu>,
howes@cat14.cs.wisc.edu (Glenn Howes) wrote:
> 
> 
> BTW, why does Think C require that
> the multi-segment option be checked on for code resources that use the
> object extension. Does this mean it will allways generate more than one
> segment even for very small projects?

I beleive it is because the object dispatch table mechanism is directed to
its own private segment.  Why this segment cant also include other code is
unclear to me.  You could ask the people who oughta know,

<d0152@applelink.apple.com> (Think TS)
--

Dana S Emery <de19@umail.umd.edu> | "Novo, de Novo,
                                  |     de novo, de no-o-o-o-o---, 
                                  | Novemba come an' dey gonna go home."
Newsgroups: comp.sys.mac.programmer
From: johnsd2@vccsouth07.its.rpi.edu (Daniel Norman Johnson)
Subject: Re: Sound Manager Phooey!
Reply-To: johnsd2@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY.
Date: Mon, 5 Oct 1992 15:37:50 GMT

In article <1992Oct5.130914.28967@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
|> dan@chaos.cs.brandeis.edu (Dan Schwarz) writes:
|> >
[deletia- details on LC ASC]
|> 
|> >Unless the "delay" tactic mentioned earlier is successful, the only thing
|> >you can do is to complain to MacDTS until you get a reasonable response.
|> 
|> I was going to suggest using a custom double-buffering routine, but I've
|> never done it myself so I can't give advice.  I'd try that before
|> calling up MacDTS though.

Waitaminute. I thot double buffering was a trick you could do
to play direct from disk... if not, what is it?

-- 
			- Dan Johnson
And God said "Jeeze, this is dull"... and it *WAS* dull. Genesis 0:0

These opinions have had all identifiying marks removed, and are untraceable.
You'll never know whose they are.
Newsgroups: comp.sys.mac.programmer
From: mshields%peruvian.utah.edu@cs.utah.edu (Michael S Shields)
Subject: Update events and modal dialog boxes
Date: 30 Sep 92 00:22:04 MDT
Followup-To: comp.sys.mac.programmer
Summary: modal dialogs and update events for background windows
Organization: University of Utah CS Dept

	I seem to remember a reference to handling update events for background
windows when you are in a ModalDialog loop.  I have looked through the tech
notes and the CSMP digest, but I haven't found anything.  I know you need to
write a filter proc (no big deal), but I can't remember exatly what you have
to do for update events.  If anyone could point me in the direction of the
reference or tell me what to do, I would greatly appreciate it.

Mike Shields
mshields@peruvian.utah.edu


Newsgroups: comp.sys.mac.programmer
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Subject: C.S.M.P. Digest V1 #172 Available
Followup-To: poster
Organization: University of Oregon Computer and Information Sciences Dept.
Date: Fri, 2 Oct 1992 22:55:36 GMT


C.S.M.P. Digest             Fri, 02 Oct 92       Volume 1 : Issue 172

Today's Topics:

	Selecting a line
	What's a good asm reference book?
	Superdrives reading weird IBM disks
	Code to have a VBL watch over the cursor
	Restricting PBCatSearch
	init help
	How to modify SFGet(Put)File buttons.



The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.

The digest is a collection of article threads from the internet newsgroup
comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
regularly and want an archive of the discussions.  If you don't know what a
newsgroup is, you probably don't have access to it.  Ask your systems
administrator(s) for details.  (This means you can't post questions to the
digest.)

Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject.  The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
cs.uoregon.edu).  Article threads are not added to the digest until the last
article added to the thread is at least one month old (this is to ensure that
the thread is dead before adding it to the digest).  Article threads that
consist of only one message are generally not included in the digest.

The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
[128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
file /pub/mac/csmp-digest/README before downloading any files.  The most
recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
archive has a mail server; send a message with the text '$MACarch help' (no
quotes) to LISTSERV@ricevm1.rice.edu for more information.

The digest is also available via email.  Just send a note saying that you
want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
automatically receive each new issue as it is created.  Sorry, back issues
are not available through the mailing list.

Send administrative mail to mkelly@cs.uoregon.edu.


-- 
_____________________________________________________________________________
Michael A. Kelly                                         University of Oregon
mkelly@cs.uoregon.edu                             Computer Science Department
_____________________________________________________________________________
From: pollansw@cse.fau.edu (Warren Pollans)
Newsgroups: comp.sys.mac.programmer
Subject: mac CBeautifier?
Date: 7 Oct 92 02:47:11 GMT
Organization: Florida Atlantic University, Boca Raton, FL, USA

I'm trying to find some kind of "C Beautifier".  I use the
preprocess option in thinkC to expand macros, but the resulting
expanded source is not formatted.  It's too tedious to format my
hand.  I've downloaded C Tools 1.37 but the source formatter keeps
bombing on my SE - with a variety of bomb messages.

If you know of something that do the formatting or if the source
for C Tools is availabe, please let me know.

Thanks,

Warren

(pollansw@cse.fau.edu)
From: urlichs@smurf.sub.org (Matthias Urlichs)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How to position a new file icon in a window.
Date: 1 Oct 1992 13:43:46 +0100
Organization: University of Karlsruhe, FRG

In comp.sys.mac.programmer, article <48094@shamash.cdc.com>,
  ldh@svl.cdc.com (Lawrence D. Hare) writes:
> 
> I create and build a file, everything great. Then PBHSetFInfo and the job
> is complete. Only the icon is sploshed on top of another one. If I set
> FInfo->fdLocation.h and v to zero, then the icon is plonked on top of
> whatever is in the top left. As the file is a brand new one, I would like
> to find a free space in the window amd put it there.
> 
> The finder does this, any ideas how I can do the same?

Leave it to the Finder. The easiest way to do that is not to set the "Inited"
bit in PBHSetFInfo.

-- 
"This will be dynamically handled, possibly correctly, in 4.1."
		-- Dan Davison on streams configuration in SunOS 4.0
-- 
Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/
Newsgroups: comp.sys.mac.programmer
From: rtgrc@rc.rit.edu (Rob Gayvert)
Subject: Date conversion (Gregorian<=>Lunar)
Followup-To: comp.sys.mac.programmer
Organization: RIT Research
Date: Wed, 30 Sep 1992 19:16:35 GMT

Has anyone worked with the International Script utilities that deal with
date conversion? It appears that you should be able to convert dates
between
various kinds of calendars (Gregorian, Lunar, Hebrew, Arabic, etc.), but
the available international resources are not in the necessary "extended"
format.
Newsgroups: comp.sys.mac.programmer