rem: printf ("%s %s\n",
add: fprintf (stderr, "%s %s\n",
context: DoPlanetaryAnalysis (SYSTEM_INFOPTR SysInfoPtr, PPLANET_DESC		pPlanetDesc){	DWORD old_seed;					/* Earth Starbase */	if (pPlanetDesc->data_index == (BYTE)~0)		return (0);	old_seed = SeedRandom (pPlanetDesc->rand_seed);	CalcSysInfo (SysInfoPtr);#ifdef DEBUG{	BYTE ColorClass[6][8] = {		"Red",		"Orange",		"Yellow",		"Green",		"Blue",		"White",		} ;	BYTE SizeName[3][12] = {		"Dwarf",		"Giant",		"Supergiant",		};	printf ("%s %s\n",			ColorClass[SysInfoPtr->StarIntensity],			SizeName[SysInfoPtr->StarSize]);	printf ("Stellar Energy: %d (sol = 3)\n", SysInfoPtr->StarEnergy);}#endif /* DEBUG */	{		SIZE radius;		SysInfoPtr->PlanetInfo.PlanDataPtr =				&PlanData[pPlanetDesc->data_index & ~PLANET_SHIELDED];		if (pPlanetDesc->pPrevDesc == pSolarSysState->SunDesc)			radius = pPlanetDesc->radius;		else			radius = pPlanetDesc->pPrevDesc->radius;		SysInfoPtr->PlanetInfo.PlanetToSunDist = radius;		SysInfoPtr->PlanetInfo.SurfaceTemperature =				CalcTemp (SysInfoPtr, radius);		switch (LONIBBLE (SysInfoPtr->PlanetInfo.PlanDataPtr->AtmoAndDensity))		{			case GAS_DENSITY:				SysInfoPtr->PlanetInfo.PlanetDensity = 20;				break;			case LIGHT_DENSITY:				SysInfoPtr->PlanetInfo.PlanetDensity = 33;				break;			case LOW_DENSITY:				SysInfoPtr->PlanetInfo.PlanetDensity = 60;				break;			case NORMAL_DENSITY:				SysInfoPtr->PlanetInfo.PlanetDensity = 100;				break;			case HIGH_DENSITY:				SysInfoPtr->PlanetInfo.PlanetDensity = 150;				break;			case SUPER_DENSITY:				SysInfoPtr->PlanetInfo.PlanetDensity = 200;				break;		}		SysInfoPtr->PlanetInfo.PlanetDensity +=				(SysInfoPtr->PlanetInfo.PlanetDensity / 20)				- ((COUNT)Random ()				% (SysInfoPtr->PlanetInfo.PlanetDensity / 10));		switch (PLANSIZE (SysInfoPtr->PlanetInfo.PlanDataPtr->Type))		{			case SMALL_ROCKY_WORLD:#define SMALL_RADIUS 25				SysInfoPtr->PlanetInfo.PlanetRadius = CalcRadius (SMALL_RADIUS);				break;			case LARGE_ROCKY_WORLD:#define LARGE_RADIUS 75				SysInfoPtr->PlanetInfo.PlanetRadius = CalcRadius (LARGE_RADIUS);				break;			case GAS_GIANT:#define MIN_GAS_RADIUS 300#define MAX_GAS_RADIUS 1500				SysInfoPtr->PlanetInfo.PlanetRadius =						CalcFromBase (MIN_GAS_RADIUS, MAX_GAS_RADIUS - MIN_GAS_RADIUS);				break;		}		SysInfoPtr->PlanetInfo.RotationPeriod = CalcRotation (&SysInfoPtr->PlanetInfo);		SysInfoPtr->PlanetInfo.SurfaceGravity =				CalcGravity (SysInfoPtr->PlanetInfo.PlanetDensity,				SysInfoPtr->PlanetInfo.PlanetRadius);		SysInfoPtr->PlanetInfo.AxialTilt = CalcTilt ();		if ((SysInfoPtr->PlanetInfo.Tectonics =				CalcTectonics (SysInfoPtr->PlanetInfo.PlanDataPtr->BaseTectonics,				SysInfoPtr->PlanetInfo.SurfaceTemperature)) > MAX_TECTONICS)			SysInfoPtr->PlanetInfo.Tectonics = MAX_TECTONICS;		SysInfoPtr->PlanetInfo.AtmoDensity =				GeneratePlanetComposition (&SysInfoPtr->PlanetInfo,				SysInfoPtr->PlanetInfo.SurfaceTemperature, radius);		SysInfoPtr->PlanetInfo.Tectonics >>= 5;		SysInfoPtr->PlanetInfo.Weather >>= 5;#ifdef DEBUG		radius = (SIZE)((DWORD)UNSCALE_RADIUS (radius) * 100 / UNSCALE_RADIUS (EARTH_RADIUS));		printf ("\tOrbital Distance   : %d.%02d AU\n", radius / 100, radius % 100);		//printf ("\tPlanetary Mass : %d.%02d Earth masses\n",		// SysInfoPtr->PlanetInfo.PlanetMass / 100,		// SysInfoPtr->PlanetInfo.PlanetMass % 100);		printf ("\tPlanetary Radius   : %d.%02d Earth radii\n",				SysInfoPtr->PlanetInfo.PlanetRadius / 100,				SysInfoPtr->PlanetInfo.PlanetRadius % 100);		printf ("\tSurface Gravity: %d.%02d gravities\n",				SysInfoPtr->PlanetInfo.SurfaceGravity / 100,				SysInfoPtr->PlanetInfo.SurfaceGravity % 100);		printf ("\tSurface Temperature: %d degrees C\n",				SysInfoPtr->PlanetInfo.SurfaceTemperature );		printf ("\tAxial Tilt : %d degrees\n",				abs (SysInfoPtr->PlanetInfo.AxialTilt));		printf ("\tTectonics : Class %u\n",				SysInfoPtr->PlanetInfo.Tectonics + 1);		printf ("\tAtmospheric Density: %u.%02u ",				SysInfoPtr->PlanetInfo.AtmoDensity / EARTH_ATMOSPHERE,				(SysInfoPtr->PlanetInfo.AtmoDensity * 100 / EARTH_ATMOSPHERE) % 100);		if (SysInfoPtr->PlanetInfo.AtmoDensity == 0)		{			printf ("(Vacuum)\n");		}		else if (SysInfoPtr->PlanetInfo.AtmoDensity < THIN_ATMOSPHERE)		{			printf ("(Thin)\n");		}		else if (SysInfoPtr->PlanetInfo.AtmoDensity < NORMAL_ATMOSPHERE)		{			printf ("(Normal)\n");		}		else if (SysInfoPtr->PlanetInfo.AtmoDensity < THICK_ATMOSPHERE)		{			printf ("(Thick)\n");		}		else if (SysInfoPtr->PlanetInfo.AtmoDensity < SUPER_THICK_ATMOSPHERE)		{			printf ("(Super thick)\n");		}		else		{			printf ("(Gas Giant atmosphere)\n");		}		printf ("\tWeather   : Class %u\n",				SysInfoPtr->PlanetInfo.Weather + 1);		if (SysInfoPtr->PlanetInfo.RotationPeriod >= 480)		{			printf ("\tLength of day  : %d.%d Earth days\n",					SysInfoPtr->PlanetInfo.RotationPeriod / 240,					SysInfoPtr->PlanetInfo.RotationPeriod % 240);		}		else		{			printf ("\tLength of day  : %d.%d Earth hours\n",					SysInfoPtr->PlanetInfo.RotationPeriod / 10,					SysInfoPtr->PlanetInfo.RotationPeriod % 10);		}#endif /* DEBUG */	}	return (SeedRandom (old_seed));}