[comp.sys.mac.programmer] Detecting being a THINK C project

oster@dewey.soe.berkeley.edu (David Phillip Oster) (10/13/89)

Sometimes, it is useful for a program to know whether it is being run as a
THINK C project or as an application. A program can tell the difference
with the following routine:
Boolean IsRealApp(){
	return Count1Resources('CODE);
}
Call this just after your Init...() system calls. It works because when
your program is a real application it is also the current resourc file.
When you are running as a project, your .rsrc file is the currebt resource
file (connected by the pre-main glue.)

You might care abou this, say, to have your app allocate half-screen sized
windows if a source level debugger might be running, but full size for
real.