HDTenEightyP/NetNews huggingface dataset:
From: ray@netcom.com (Ray Fischer)
Subject: Re: THINK C 5.04 bug, or is it me?
Organization: Netcom. San Jose, California
Date: Sun, 10 Jan 1993 19:44:12 GMT

Arne.Venstad@DELAB.SINTEF.no (Arne Venstad) writes ...
>Dear net friends,

Dude!

>After going from THINK C 4.05 to THINK C 5.04 my XFCN started to execute
>erroneously. Parts of my code:
[...]
> *target--=*target;    /* make a block move on overlapping areas. */

Right off this is a problem, or at least really bad C code.  The
problem is that the order of execution for the various bits is NOT
DEFINED.  It is perfectly legal for a C compiler to turn this into an
equivalent 
	*target = *target;
	target--;
And, not too surprisingly, this is exactly what is happening.  Since
is it more efficient (in the general case) the better code generator
of Think C 5.0 does what is faster.  Rather than loading the address
from memory twice (as did Think C 4.0), the new code generator only
loads it from memory once.

You needs to rework the code so that it doesn't depend on the order
of execution, presumably by using two pointers.

-- 
Ray Fischer                   "Convictions are more dangerous enemies of truth
ray@netcom.com                 than lies."  -- Friedrich Nietszsche
Newsgroups: comp.sys.mac.programmer,comp.os.ms-windows.programmer.tools,comp.windows.ms.programmer
From: jimlynch@netcom.com (Jim Lynch)
Subject: Re: Stallman and friends
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Thu, 7 Jan 1993 04:38:37 GMT

In article <1993Jan6.142544.28293@kth.se> d88-jwa@dront.nada.kth.se (Jon Wtte) writes:
>In <1993Jan6.003222.10898@unlv.edu> grover@brownie.cs.unlv.edu (Kevin Grover) writes:
>
>>Have you read any of the FSF literature?  It was my understanding
>>(from the reading and a talk Stalman gave) that the idea of the FSF
>>was not necessaraly that all software should be free, but rather that
>
>You are confusing the EFF (Electronic Freedom Frontier) with
>the FSF (Free Software Foundation)
>
>-- 
> -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
>
>   Cookie Jar: Vanilla Yoghurt with Crushed Oreos.

It is you who are confused. Go back to your FTP site, do not pass GO nor
collect $200 and read, as it is apparent that you have not.
Newsgroups: comp.sys.mac.programmer
From: tracyn@dgp.toronto.edu (Tracy Narine)
Subject: hypercard & heirarchical menus
Organization: CSRI, University of Toronto
Distribution: na
Date: 6 Jan 93 17:21:58 GMT

I need heirarchical menus in a hypercard stack.  Is there an XCMD
available for supporting this?

- tracy


Newsgroups: comp.sys.mac.programmer
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: HOpenResFile and HOpenRF supported by glue in System 6?
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Mon, 11 Jan 1993 09:53:39 GMT

In <C0nBF7.I2C@news.udel.edu> kurisuto@chopin.udel.edu (Sean J. Crist) writes:

>In article <1993Jan10.060648.3821@netcom.com> jimlynch@netcom.com (Jim Lynch) writes:
>>In article <C0Ltw3.FrH@news.udel.edu> kurisuto@chopin.udel.edu (Sean J. Crist) writes:

>>>low-level call.)  I want to support both System 6 and 7, which means I can't
>>>use the FS... calls, but I also don't want to use the old calls which don't

>Sorry, I didn't word that very clearly.  System 7 supports the FS calls;
>System 6 does not, so if you want to support both 6 and 7 you can't use

You're confusing the FS calls (FSOpen, FSRead, ...) with the FSp
calls (FSpOpenDF, ...)

The FS calls are the "old" glue calls for PBXXX, and did run out
of fashion in System 3.2 when the HOpen ... calls entered the scene,
but they are still supported.

>structure, and it's fine for your application to use it internally to keep
>track of files under System 6 or 7.  Yesterday I went through and changed

But under System 7, you should always create an FSSpec using
FSMakeFSSpec - so you have to create a glue routine (called
MyMakeFSSpec) that, under System 7, calls the trap, and under
System 6 uses assignment and pascal-string-copy.

>only exist for backward compatibility.  If you do receive an old-style
>file specification (as from SFGetFile and SFPutFile), you should
>immediately call GetWDInfo to convert it to the new scheme.

Definately!

>I wish someone would have made this clear sooner!

I've tried the last two years :-)

>P.S. A few people told me that FindFolder is supported by glue under
>System 6 by both Think and MPW.  This must mean Think C but not Think
>Pascal 4.0, because I got an unimplemented trap error when I called it

Yes, I think Pascal has problems with alternate definitions; if
you #define SystemSevenOrLater before including Folders.h in Think
or MPW, you get an unimplemented trap on System 6. However, that
symbol is by default NOT defined, so you get an external declaration
that pulls FindFolder from glue.

Switch languages :-)

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
 Engineering: "How will this work?" Science: "Why will this work?" Management:
 "When will this work?"  Liberal Arts: "Do you want fries with that?"
                     -- Jesse N. Schell
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: C on a Mac: How to get started?
Date: 7 Jan 93 18:16:56 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <1ihfb7INNfv3@bHARs12c.bnr.co.uk>, agm@bnr.co.uk (Andrew G.
Minter) wrote:
> 
> I have a friend who has just bought a PowerBook and wants to start writing
> little applications in C.
> 
> I'd be very pleased if anyone could give some pointers to what software tools
> and documentation he will need to get started (preferably not too expensive).
> Right now I guess he will probably want Think C and "Inside Macintosh", but
> I'm assume he'll need some kind of resource editor, plus some other stuff.
> 

ResEdit is shipped as part of the THINK C package, and also is available at
a whole bunch archive sites.  If you want the manual, you can order from
APDA.

If you can, wait a few months for Inside Macintosh, because the series of
volumes is being rewritten and reorganized.

Macintosh C Programming Primer, Volume 1, Second Edition, by Dave Mark and
Cartwright Reed is good.  Dave Mark also wrote Volume II, which is still
available in its first edition.

A major challenge in writing "Macintosh" program is in creating the
underlying structure for an event driven program in the first place.  I
submitted such a structure, called Chassis 4.3.1, to the archives at
mac.archive.umich.edu and at sumex-aim.stanford.edu.  I also posted it at
America Online, (keyword mdv).  You can also ftp it from us directly at
ftp.gte.com (directory /pub/chuck).  It has no System 7 specific code, and
runs on 6.0.4 or above.  (I also teach an eight-session course in this, if
you want to pay my expenses for holiday, ahem, WORK, in the UK!)

Chuck Hoffman
chuck@gte.com
GTE Laboratories, Waltham, Massachusetts, USA
(617) 466-2131
=====================================
I'm not sure why we're here, but I am sure that while we're here we're
supposed to help each other.
=====================================
Newsgroups: comp.sys.mac.programmer
From: ppc1@cec2.wustl.edu (Peter Pui Tak Chiu)
Subject: Inside Mac volume 6
Organization: Washington University, St. Louis MO
Date: Mon, 4 Jan 1993 18:38:44 GMT

hi...

i tried to find inside mac volume 6 in our campus bookstore but they don't
have it... does it exist?

thanks
peter
From: vito@well.sf.ca.us (Andris Paul Vitols)
Subject: Idea for a Shareware "Sound Feedback Display."
Organization: Whole Earth 'Lectronic Link
Date: Tue, 5 Jan 1993 03:46:02 GMT


Dear Mac Programming Wizard:

Here is a idea for a shareware program.  I for one, would pay a decent
shareware fee for the following:

A program or After Dark module that utilizes the built in microphone
on most macs to display cool patterns on the screen based on the sound
coming into the mic.  I'd like, if not an after dark module, at least
a black background.

This would be pretty cool if you were playing music near your Mac!
If this already exists, please point me in the right direction...
From: rmah@panix.com (Robert Mah)
Subject: Re: Stallman and friends (Wrong Group!!!!!)
Organization: PANIX Public Access Unix, NYC
Date: Thu, 7 Jan 1993 22:55:39 GMT

In <1993Jan7.144658.13345@wega.rz.uni-ulm.de> walrath@faw.uni-ulm.de (Wayne K. Walrath) writes:

>I'm getting tired of sorting through the messages not directly related
>to programming the macintosh. Could you folks keeping the "Stallman 
>and Friends" thread alive, kindly move it to another group, or else continue
>it through private mail.  

You could just add the thread to your kill file.  

I for one am glad that this discussion is here.  I don't frequent groups 
like comp.gnu.licensing.flames or where ever threads like this are found.

Cheers,
Rob

-- 
[--------------------------------------------------]
[  Robert S. Mah   |  "Every day an adventure,     ]
[  rmah@panix.com  |   every moment a challenge."  ]
[--------------------------------------------------]
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: QuickDraw: Why Can't it Mirror Right?
Organization: Kalamazoo College
Date: Wed, 6 Jan 1993 17:23:30 GMT

rmah@panix.com (Robert Mah) writes:
>urban@yoda.fsl.noaa.gov (Art Urban) writes:
>
>>If I draw a line from 0,0 down and to the left, why won't QuickDraw mirror
>>the line when I draw it down and to the *right*?
>
>The reason is that the coordinates you are passing to QuickDraw routines are
>NOT pixel locations.  They are the locations BETWEEN pixels.  
>
>Thus, if you draw a line from (0,0) to (4,0), with a pensize of (1,1), it
>will be 5 pixels long.  But if you draw (0,0) to (-4,0) with a pensize of
>(1,1), the line will be still be 5 pixels long, but have a RIGHT location
>at coordinate 1.  The key is that the "pen" hangs down and to the right of
>the "pen location".  And LINE drawing takes place using the pen.
>
>You should re-read the beginning of the Quickdraw chapter in IM-I for a 
>much clearer description of the graphics model used within QD.

And Jon Waette comments:
>Maybe because the pen has a physical size, and its centre is
>not placed on the grid intersection? Try setting the pen size
>(1,0) or (0,1) and see what happens.

If I read Art correctly, he's not concerned about the pixels themselves;
he's concerned about the region formed by his LineTo()s.  And, as IM
I-181 says, "Only the line endpoints and shape boundaries affect the
region definition;  the pen mode, pattern and size do not affect it."

The fact that the pen hangs down and right is irrelevant to region-
building.  However, the way that the pixels are drawn will tell you how
the region's boundaries are drawn.  Art is concerned, not that the
pixels are drawn funny, but that his region will be built funny.  That's
a problem with the way LineTo() chooses where to go, and that's not
something you can cure by messing with the pen.  You _might_ be able to
patch things up, to some degree, by picking your endpoints in an attempt
to outsmart the algorithm, but that has nothing to do with the pen
hanging one way or t'other.

Of course, maybe I read Art's question incorrectly...?  Art, I would
advise testing out your region with the region itself, not by looking
at the pixels drawn by the same set of LineTo()s--the two are not the
same.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "Estimated number of DOS viruses in existence today:  1,500
  Number of Macintosh-based viruses:  Less than 40
  New DOS viruses discovered in summer '92:  More than 100"   - ComputerWorld
Newsgroups: comp.sys.mac.programmer
Subject: Re: Stallman and friends (Wrong Group!!!!!)
From: seth@physc1.byu.edu
Date: 7 Jan 93 23:07:09 -0700
Distribution: world
Organization: Brigham Young University


In reference to the GNU flmae war going on here, I too am glad that threads
like this go on freely here. I am somewhat new to mac programming, and to
programming in general I guess, and I never even knew that the FSF existed,
or that people try to patent simple algorithms, etc. I had vaguely heard about
GNU, GCC, EMACS, etc., and while I am not suddenly a GNU et al expert, I at 
least have an idea what it is. I consider that valuable, as I want to get into
the "real" mac programming scene, and I am a lone wolf here; about the only
people I know in the mac programming world I know only on-line, and so my only
link is the net and personal email. I like to read c.s.m.p articles and 
postings just to see what is going on at all. I am not currently involved in 
anything related to most of the postings and questions people ask, but I have
become much more aware just by reading the posts anyway. If some people have
a problem with a certain topic of discussion, they certainly are free to 
either kill the thread on their end, or just ignore it, whatever. And one more
thing; thanks a lot for all the people who answer questions from novices like
myself. I really appreciate it, and am sure others do too. Who cares if 
people post just about every month some question that has been asked a million
times before (I am new...., what is a good compiler..., what is ResEdit...,
and all the rest). That is what this newsgroup is for in part. If everyone on
this newsgroup were a guru and knew everything, this newsgroup wouldn't have
a purpose for being, and hey, people have to start somewhere. 

Seth Leigh
BYU Physics Dept.

Newsgroups: comp.sys.mac.programmer
From: sho@planets.risc.rockwell.com (Sho Kuwamoto)
Subject: Re: Window Zooming
Reply-To: sho@risc.rockwell.com (Sho Kuwamoto)
Organization: Rockwell International Science Center, Thousand Oaks, Ca.
Date: Mon, 4 Jan 93 18:09:24 GMT

In article <1993Jan1.122830.1@vaxc> matsrc@vaxa.hofstra.edu writes:
>A window is put in its standard state, which is smaller than
>the screen  (like a Finder window). It is then moved elsewhere on the
>screen, but to another valid position for its standard state. When the
>user clicks on the zoom box, you would like FindWindow to return
>inZoomIn because the window is in its standard state, but how will
>FindWindow know that?

I ignore the difference between inZoomIn and inZoomOut, and
use my own code to figure out whether the window needs to be
zoomed in or out.  Window zooming works differently now than
it did when first implemented, and it's too hard to force
the new behavior to fit into the old mechanism.

>(2) Which takes precedence when switching to the standard state:  The
>desire to leave the top left corner fixed, or the desire to leave space
>on the right of the main screen for Finder icons? 

I don't bother leaving space for the Finder icons.  I can
see going either way on this one, I suppose.

-Sho
--
sho@physics.purdue.edu
From: wickberg@mv.us.adobe.com (Andreas Wickberg)
Newsgroups: comp.sys.mac.programmer
Subject: Re: THINK C 5.04 bug, or is it me?
Date: 10 Jan 93 00:48:46 GMT
Followup-To: comp.sys.mac.programmer
Organization: Adobe Systems

In article <Arne.Venstad-080193101130@mac-df04.er.sintef.no>,
Arne.Venstad@DELAB.SINTEF.no (Arne Venstad) wrote:
> 
> Dear net friends,
> 
> After going from THINK C 4.05 to THINK C 5.04 my XFCN started to execute
> erroneously. Parts of my code:
> 
> ...
> typedef struct irow {
> 	long iPtr;
> 	short length;
> } Row;
> ...
>     Row *source,*target;
>     ...
>     source=...;
>     target=...;
>     ...
> 				while (source!=target)  /* As somebody may guess, this is an attempt to */
> 					 *target--=*target;    /* make a block move on overlapping areas. */
>     ...
> 

Looks like a moving target :-)

C doesn't specify in what order the sides of an assignment gets evaluated -
don't rely on your local compiler. It looks as if 4.05 evaluate the left
hand first, while 5.04 evaluate the right hand first. Try to uncheck
suppress loads if it is checked in Edit:Options:Code optimization.

BTW, a simple block move should be faster that coping odd sized blocks.

Andreas Wickberg

PS. Hur {r v{dret i Norge s} h{r }rs? DS.

> Arne Venstad    E-mail: Arne.Venstad@delab.sintef.no
> SINTEF DELAB
> N-7034 Trondheim,
> Norway.
From: bpb9204@tamsun.tamu.edu (Brent Burton)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think C bug? [sprintf]
Date: 7 Jan 1993 11:02:39 -0600
Organization: Texas A&M Univ., Inc.
NNTP-Posting-Host: tamsun.tamu.edu

mssmith@afterlife.ncsc.mil (M. Scott Smith) writes:
|Does anyone know of any bugs in the sprintf() function of Think C v5.x?
|
|I don't have time to elaborate, but I've found that it doesn't do what
|it's supposed to.  It seems more than three arguments cause it to bomb.

Hmm, I used it all the time and I never had a problem with it, no
matter how many arguments I passed.

|It should be identical to printf, except the first parameter passed is
|a string to "print to."  But this doesn't seem to work in Think C.
|
|If this is a bug, are there any work-arounds?

Are you sure the string you are passing to store the result (the first 
argument) is large enough?

char s[20];
  sprintf(s, "%d", 5);  

Will obviously work, but if there is something like

char s[20];
  sprintf(s, "The number is now %d.\n", 5);

will not, since the string (with 5) will need 22 places and you overrun s.

Just be sure to #include <stdio.h>.

Hope this gives some help, I can't think of why it wouldn't work since I've
never had problems.

-Brent
-- 
+-------------------------+
| Brent Burton    N5VMG   |    
| bpb9204@tamsun.tamu.edu |  
+-------------------------+
From: jsd@cs.bham.ac.uk (Jetinder Singh)
Newsgroups: comp.sys.mac.programmer
Subject: Where can I get MacsBug  ?
Date: 7 Jan 93 19:44:17 GMT
Organization: Birmingham University
X-Xxmessage-Id: <A772E1578701C708@holly.cs.bham.ac.uk>
X-Xxdate: Fri, 8 Jan 93 13:44:23 GMT
X-Useragent: Nuntius v1.1.1d16

I'm looking for the MacsBug debugger to use on my  Quadra 700, where I'm
using Think C 5.04. Preferably in  the United Kingdom. Does anyone know
of where I get it and the manuals ?


Jetinder
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.system
From: jmunkki@vipunen.hut.fi (Juri Munkki)
Subject: Remote keyboard & mouse control?
Reply-To: jmunkki@vipunen.hut.fi (Juri Munkki)
Organization: Helsinki University of Technology
Date: Mon, 11 Jan 1993 01:44:12 GMT

I seem to remember that one of last year's MacHack contest entries was a
program that allowed you to use the keyboard and mouse of a networked Mac
to control another one.

A utility like this would possibly quite useful to me. Has a hack like
this been published or have I just been dreaming? I'm not looking for
anything as fancy as Timbuktu.

-- 
  Juri Munkki					       Windsurf: fast sailing
 jmunkki@hut.fi					      Macintosh: fast software
From: tal691@huxley.anu.edu.au (Tonio Loewald)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Why the Piracy? Here's why...
Date: 12 Jan 93 09:46:53 GMT
Organization: Australian National University
NNTP-Posting-Host: 150.203.2.12

Software piracy may be wrong, but it's NECESSARY.

Software piracy is all that stands between us and even higher software
prices. (The major exception to this is in highly competitive horizontal
markets, such as word-processors, and even this is debateable.)

I cite the following evidence:

The price of SEGA Megadrive/Genesis games vs. Computer Games.
The cost of Authorware Professional vs. Macromedia Director.
The cost of AutoCAD vs. MiniCAD.

In each case, roughly comparable products that are difficult or impossible
to pirate are much more expensive.

As for the moral absolutist who began this discussion -- anything that is
even a little bit wrong you shouldn't do -- eating beef is wrong, it is
environmentally unsound, involves the murder of an animal after first
making it extremely terrified, but most of us indulge.

(I am no exception.)

Tonio

-- 
Tonio Loewald | tal691@huxley.anu.edu.au | Life is short. Be nice.
"You can lie/You can cry/For all the good it'll do you, you can
die/But when it's done/And the police come/And they lay you down
for dead/Just remember what I said" (Paul Simon-not the senator)
From: clausb@hpbbrd.bbn.hp.com (Claus Brod)
Date: Fri, 8 Jan 1993 09:12:18 GMT
Subject: Re: Porting GCC to the Mac (was: Re: Sozobon (or other free C's): would this strategy work?)
Organization: HP Mechanical Design Division
Newsgroups: comp.sys.mac.programmer,comp.sys.atari.st.tech
Distribution: comp
X-Newsreader: TIN [version 1.1.8 PL6]

David Spencer (spencer@panix.com) wrote:
> >  To encourage people to port GCC, Richard Stallman
> >(author of GCC) has written a 190-page manual describing in detail how
> >to port GCC.  I don't believe any other program comes with such
> >carefully written porting instructions.
> 
> A very nice book on practical compiler theory.

Is it available via ftp?

Tnx,

Claus

-- 
--clausb@hpbeo79.bbn.hp.com----------------------------------------------
Claus Brod, MDD, HP Boeblingen   	Things. Take. Time. (Piet Hein)
--#include <std_disclaimer>----------------------------------------------
Newsgroups: comp.sys.mac.programmer
From: fixer@faxcsl.dcrt.nih.gov (Chris Clinging Desperately Tate)
Subject: LAddRow() returns zero?
Reply-To: fixer@faxcsl.dcrt.nih.gov
Organization: Computer Systems Laboratory, DCRT, NIH
Date: Tue, 12 Jan 1993 17:37:15 GMT

I'm trying to build a single-column list in a modal dialog, but am having
little success.  LNew() seems to work fine; I use (0,0)(1,0) for dataBounds,
and get a valid handle back.

However, LAddRow() is consistently returning 0.  I'm calling it with something
like:

     short       i;
     ListHandle  listH;
     ...
     i = LAddRow(1, (**listH).dataBounds.bottom + 1, listH);

(**listH).dataBounds.bottom is being duly incremented by this call, but the
return value is always zero.  The same thing happens if I use a large constant
such as 9999 instead of (**listH).dataBounds.bottom + 1 to force an
out-of-bounds row number, so I don't think that's a problem.

Anybody have any ideas what's going wrong?  I suspect I'll be kicking myself
soon, but at present I'm well and truly stumped.

------------------------------------------------------------------------------
Christopher Tate             | Return of the CryptoSig (tm):
Management Systems Designers |    LR KMBVALMH ZKM HD CNDMH, LV CLYY.  LR
                             |    MDVALMH AKT HDMU CNDMH, BDX'QU DQUNYDDEUJ
fixer@faxcsl.dcrt.nih.gov    |    TDIUVALMH.
Newsgroups: comp.sys.mac.programmer
From: rduta@nyx.cs.du.edu (Radu)
Subject: Re: Need disassembler utility
Summary: Disasemblers
Keywords: Disasembler
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Date: Thu, 7 Jan 93 18:21:30 GMT

As far as Disasembers go you have quite a few options.  I beleave there are
three out there.  There is the CODE viewer for Resedit, there is a program
called "DisAsm" (which is PD or shareware), and there is MacNosy ( a comertial
product).  Oh yea, there is also Resourcer, which is like Resedit only better,
but it's also comertial


--
********************************************************************************
I only kill to know I'm alive!
Newsgroups: comp.sys.mac.programmer
From: misc042@cantua.canterbury.ac.nz (Mr M J Miller)
Subject: printing a textEdit record-How?
Organization: University of Canterbury, Christchurch, New Zealand.
X-Newsreader: TIN [version 1.1 PL8]
Date: Sat, 9 Jan 1993 01:31:42 GMT


Hi,
How does one prepare for printing a textedit record?
ie how does one "pageinate" it and then draw it to the
printers port?

I know all about drawing in general  into the printers port
etc and all that stuff but how to map the textedit record onto
the printers port?

Please no SEE IM vol 101 page 3000000 'cause I aint got em!

Any usefull help will be appreciated.
	MJM.
misc042@cantua.canterbury.ac.nz OR
m.miller@csc.canterbury.ac.nz
(I am no way employed by,
	or a spokesperson of,
		the University of Canterbury)