示例#1
0
文件: sys_linux.cpp 项目: luaman/zq
int			 main (int argc, char **argv)
{
	double	 time, oldtime, newtime;

#ifdef PARANOID
	signal(SIGFPE, floating_point_exception_handler);
#else
	signal(SIGFPE, SIG_IGN);
#endif

#ifdef hpux
	// makes it possible to access unaligned pointers (e.g. inside structures)
	//   must be linked with libhpp.a to work (add -lhppa to LDFLAGS)
	allow_unaligned_data_access();
#endif

	// we need to check for -noconinput and -nostdout
	// before Host_Init is called
	COM_InitArgv (argc, argv);

	noconinput = COM_CheckParm("-noconinput");
	if (!noconinput)
		fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY);

	if (COM_CheckParm("-nostdout"))
		nostdout = 1;

#if id386
	Sys_SetFPCW();
#endif

	Host_Init (argc, argv, 32*1024*1024);

	oldtime = Sys_DoubleTime ();
	while (1)
	{
		if (dedicated)
			NET_Sleep (10);

		// find time spent rendering last frame
		newtime = Sys_DoubleTime ();
		time = newtime - oldtime;

		Host_Frame(time);
		oldtime = newtime;
	}
    return 0;
}
示例#2
0
CEnvironment::CEnvironment()
{

#if defined (MXHPUXIA)
        allow_unaligned_data_access();
#endif

	cpu = 0;
	pin = 0;
	trace_pin = 0;
	nodenumber	=	0;
	nodename[0] =	'\0';
	volume[0]	=	'\0';
	subvolume[0]=	'\0';
	progname[0] =	'\0';
}
示例#3
0
文件: sys_null.c 项目: luaman/zq
int main (int argc, char **argv)
{
#ifdef hpux
	// makes it possible to access unaligned pointers (e.g. inside structures)
	//   must be linked with libhpp.a to work (add -lhppa to LDFLAGS)
	allow_unaligned_data_access();
#endif

	printf ("Host_Init\n");
	Host_Init (argc, argv, 5861376);
	while (1)
	{
		Host_Frame (0.1);
	}

	return 0;
}
示例#4
0
文件: unalign.c 项目: apc-llc/cernlib
/*>    ROUTINE UNALIGN
  CERN PROGLIB# T002    UNALIGN         .VERSION KERNBIT  1.08  920316
  ORIG. 91/xx/xx Lee Roberts-SSC

  Interface to allow_unaligned_data_access when using option +ppu

  HP has chosen NOT to allow unaligned accesses by default. This
  routine is needed by tests who do like KERNNUMT.

*/
void allow_unaligned_data_access_()
{
     allow_unaligned_data_access();
}