Problem: 1391709

Title: many illegal typedefs of form, reproduce w/MW, all warnings

Received: Sep 27 1996 9:42AM


Following is a bunch of bugs I discovered in MacApp 11 attempting to build an MPW tool on a fresh install on ETO 21 Latest MPW and Codewarrior 10. I've attempted to keep them organized and provide fixes for all For MPW builds, you may assume the following build commands:
	Set -e MABuildFolder 'Splinter:Builds:MacApp:' 
	MABuild MacApp -Sym -AutoBuild -ModelFar -Link '-sym 3.3' -BuildFolder "{MABuildFolder}"
I like to use a spearate build folder so I can keep source and headers on a smaller volume and have all easily recreated files in a folder that cam be tossed if I need disk space.
:Libraries:Core:Includes:UTheDebugger.h
:Libraries:Core:Sources:UTheDebugger.cp
	fixed many illegal typedefs of form, reproduce w/MW, all warnings
	typedef struct foo
	{
	};
	
	becomes
	typedef struct foo
	{
	} foo; // <-- added foo here
	
:Libraries:MPWTool:Sources:UCPlusTool.cp
	add missing #include  for UnloadSeg
	change implementation of TCPlusTool::Run() to add missing MAstatic_cast calls
	fix crash if error thrown from a tool.  Also added fflush(stdout) so diagnostics
	are not buried in stdout.  Full implementation follows:
	
	void TCPlusTool::Run()
	{
		TRY
		{
			while (++fArgvIndex < fArgc)		// fArgc is the number of args plus one
			{
				RotateCursor(++fCursorCount);
				ProcessArg(fArgv[fArgvIndex]);
			}
	
			UnloadSeg(&InitUCPlusTool);
			fRetCode = RC_Normal;
	
			if (fProgress)
				DoStartProgress();
	
			DoToolAction();
			
			fflush(stdout);
	
			if (fTime)
			{
				long currentTicks = TickCount();
				long elapsedTicks = currentTicks - fStartTicks;
				long double elapsedSecs = (double)elapsedTicks / 60.0;
				fprintf(stderr, "Elapsed time: %-1.2Lf seconds\n", elapsedSecs);
			}
		}
		CATCH_ALL
		{
			OSErr theErr = fi.error;
			CChar255 theText;
	
			fflush(stdout);
	
			if (theErr != noErr)
			{
				GetSysErrText(theErr, theText);
				fprintf(stderr, "%s %s: %s\n", kErrorMarker,
						MAstatic_cast(const char*, fProgName),
						MAstatic_cast(const char*, theText));
				fRetCode = RC_Abort;
			}
	
		}
		ENDTRY
	
		fflush(stderr);
	
		exit(MAstatic_cast(short, fRetCode));
	}

Fix:

Changed as recommended but only for compatibility.