예제 #1
0
파일: sys_dos.c 프로젝트: basecq/q2dos
void Sys_Error (char *error, ...)
{
	va_list		argptr;

	if (!dedicated || !dedicated->value)
		dos_restoreintr(9); /* FS: Give back the keyboard */

	Sys_SetTextMode();

	printf ("Sys_Error: ");
	va_start (argptr,error);
	vprintf (error,argptr);
	va_end (argptr);
	printf ("\n");

	__dpmi_free_physical_address_mapping(&info);
	__djgpp_nearptr_disable(); /* FS: Everyone else is a master DOS DPMI programmer.  Pretty sure CWSDPMI is already taking care of this... */

#if 0
{	/* we crash here so we can get a backtrace.  Yes it is ugly, and no this should never be in production! */
	volatile int j,k;
	fflush(stdout);
	j=0;
	k=5/j;	/* divide by zero! */
}
#endif
	exit (1);
}
예제 #2
0
void Sys_Shutdown (void)
{
	if (!isDedicated)
		dos_restoreintr(9);

	if (unlockmem)
	{
		dos_unlockmem (&start_of_memory, end_of_memory - (int)&start_of_memory);
		dos_unlockmem (quakeparms.membase, quakeparms.memsize);
	}
}
예제 #3
0
파일: sys_dos.c 프로젝트: basecq/q2dos
void Sys_Quit (void)
{
	if(!dedicated || !dedicated->value)
		dos_restoreintr(9); /* FS: Give back the keyboard */

	if (unlockmem)
	{
		dos_unlockmem (&start_of_memory,
					   end_of_memory - (int)&start_of_memory);
	}

	Sys_SetTextMode();

	__dpmi_free_physical_address_mapping(&info);
	__djgpp_nearptr_disable(); /* FS: Everyone else is a master DOS DPMI programmer.  Pretty sure CWSDPMI is already taking care of this... */

	exit (0);
}