您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CL_Shutdown函数代码示例

51自学网 2021-06-01 20:02:43
  C++
这篇教程C++ CL_Shutdown函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CL_Shutdown函数的典型用法代码示例。如果您正苦于以下问题:C++ CL_Shutdown函数的具体用法?C++ CL_Shutdown怎么用?C++ CL_Shutdown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CL_Shutdown函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: signal_handler

static void signal_handler( int sig ){	static int try = 0;	switch( try++ )	{	case 0:		if( sig == SIGINT || sig == SIGTERM )		{			Com_Printf( "Received signal %d, exiting.../n", sig );			Com_Quit();		}		else		{			Com_Error( ERR_FATAL, "Received signal %d/n", sig );		}		break;	case 1:#ifndef DEDICATED_ONLY		printf( "Received signal %d, exiting.../n", sig );		CL_Shutdown();		_exit( 1 );		break;	case 2:#endif		printf( "Received signal %d, exiting.../n", sig );		_exit( 1 );		break;	default:		_exit( 1 );		break;	}}
开发者ID:ewirch,项目名称:qfusion,代码行数:34,


示例2: Sys_Error

void Sys_Error(char *error, ...){  va_list argptr;  char text[1024];#ifndef DEDICATED_ONLY  CL_Shutdown();#endif  Qcommon_Shutdown();  va_start(argptr, error);  vsprintf(text, error, argptr);  va_end(argptr);  fprintf(stderr, "Error: %s/n", text);  MessageBox(NULL, text, "Error", 0 /* MB_OK */);  if (qwclsemaphore) {    CloseHandle(qwclsemaphore);  }  /* Close stdout and stderr */#ifndef DEDICATED_ONLY  fclose(stdout);  fclose(stderr);#endif  exit(1);}
开发者ID:greck2908,项目名称:qengine,代码行数:30,


示例3: Sys_Quit

voidSys_Quit(void){	timeEndPeriod(1);#ifndef DEDICATED_ONLY	CL_Shutdown();#endif	Qcommon_Shutdown();	CloseHandle(qwclsemaphore);	if (dedicated && dedicated->value)	{		FreeConsole();	}	/* Close stdout and stderr */#ifndef DEDICATED_ONLY	fclose(stdout);	fclose(stderr);#endif	exit(0);}
开发者ID:tomgreen66,项目名称:yquake2,代码行数:25,


示例4: Sys_SigHandler

/*=================Sys_SigHandler=================*/void Sys_SigHandler( int signal ){	static qboolean signalcaught = qfalse;	//Com_Printf("signal: %d/n", signal);	if( signalcaught )	{		fprintf( stderr, "DOUBLE SIGNAL FAULT: Received signal %d, exiting.../n",			signal );	}	else	{		signalcaught = qtrue;		VM_Forced_Unload_Start();		fprintf( stderr, "Received signal %d, exiting.../n", signal );#ifndef DEDICATED		CL_Shutdown();#endif		SV_Shutdown( "Signal caught" );		VM_Forced_Unload_Done();	}	Sys_Exit( 0 ); // Exit with 0 to avoid recursive signals}
开发者ID:yiHahoi,项目名称:wolfcamql,代码行数:30,


示例5: Host_Shutdown

//FIXME: this is a callback from Sys_Quit and Sys_Error.  It would be better//to run quit through here before the final handoff to the sys code.void Host_Shutdown (void){	static qbool isdown = false;	if (isdown) {		printf ("recursive shutdown/n");		return;	}	isdown = true;	// on low-end systems quit process may last long time (was about 1 minute for me on old compo),	// at the same time may repeats repeats repeats some sounds, trying preventing this	S_StopAllSounds (true);	S_Update (vec3_origin, vec3_origin, vec3_origin, vec3_origin);	SV_Shutdown ("Server quit/n");#if (!defined WITH_PNG_STATIC && !defined WITH_JPEG_STATIC)	QLib_Shutdown();#endif	CL_Shutdown ();	NET_Shutdown ();	Con_Shutdown();#ifdef WITH_TCL	TCL_Shutdown ();#endif	qtvlist_deinit();}
开发者ID:kostya7,项目名称:ezquake-source,代码行数:31,


示例6: Com_Quit

/** Com_Quit* * Both client and server can use this, and it will* do the apropriate things.*/void Com_Quit( void ){	if( dynvars_initialized )	{		dynvar_t *quit = Dynvar_Lookup( "quit" );		if( quit )		{			// wsw : aiwa : added "quit" event for pluggable clean-up (e.g. IRC shutdown)			Dynvar_CallListeners( quit, NULL );		}		Dynvar_Destroy( quit );	}	SV_Shutdown( "Server quit/n" );	CL_Shutdown();	MM_Shutdown();	if( log_file )	{		FS_FCloseFile( log_file );		log_file = 0;	}	Sys_Quit();}
开发者ID:ShaitanShootout,项目名称:BM,代码行数:31,


示例7: Sys_Quit

void Sys_Quit (void){	CL_Shutdown ();	Qcommon_Shutdown ();    fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);	_exit(0);}
开发者ID:dschimmer,项目名称:omega-test,代码行数:7,


示例8: Sys_Error

/** Sys_Error*/void Sys_Error( const char *format, ... ){	static qboolean	recursive = qfalse;	va_list	argptr;	char string[1024];	// change stdin to non blocking	fcntl( 0, F_SETFL, fcntl( 0, F_GETFL, 0 ) & ~FNDELAY );	va_start( argptr, format );	Q_vsnprintfz( string, sizeof( string ), format, argptr );	va_end( argptr );	if( recursive )	{		fprintf( stderr, "Recursive Sys_Error: %s/n", string );		_exit( 1 );	}	recursive = qtrue;	fprintf( stderr, "Error: %s/n", string );	CL_Shutdown();	Qcommon_Shutdown();	_exit( 1 );}
开发者ID:ewirch,项目名称:qfusion,代码行数:31,


示例9: Sys_SigHandler

/*=================Sys_SigHandler=================*/void Sys_SigHandler( int signal ){	static qboolean signalcaught = qfalse;	if( signalcaught )	{		fprintf( stderr, "DOUBLE SIGNAL FAULT: Received signal %d, exiting.../n",			signal );	}	else	{		signalcaught = qtrue;		VM_Forced_Unload_Start();#ifndef DEDICATED		CL_Shutdown(va("Received signal %d", signal), qtrue, qtrue);#endif		SV_Shutdown(va("Received signal %d", signal) );		VM_Forced_Unload_Done();	}	if( signal == SIGTERM || signal == SIGINT )		Sys_Exit( 1 );	else		Sys_Exit( 2 );}
开发者ID:Hasimir,项目名称:ioq3,代码行数:30,


示例10: Sys_Quit

void Sys_Quit (void) {	CL_Shutdown ();//	int on = 1;//	setsockopt(0, SOL_SOCKET, SO_NONBLOCK, &on, sizeof(int));//jens	fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);	Sys_Exit(0);}
开发者ID:kallisti5,项目名称:quake3,代码行数:8,


示例11: Com_Quit_f

/*=============Com_Quit_fBoth client and server can use this, and it willdo the apropriate things.=============*/void Com_Quit_f( void ) {	// don't try to shutdown if we are in a recursive error	if ( !com_errorEntered ) {		SV_Shutdown ("Server quit/n");		CL_Shutdown ();		Com_Shutdown ();	}	Sys_Quit ();}
开发者ID:CairnTrenor,项目名称:OpenJK,代码行数:17,


示例12: main

int main(int argc, char *argv[] ){  CL_SimplexSolver solver;  CLV frameWidth;  CLV frameHeight;  CLV x;  CLV y;  CL_Constraint cn;  CL_Init();  CL_SetVarMap(CL_VarMapNew());  solver = CL_SimplexSolverNew();  frameWidth = CL_vNew("frameWidth",577,solver);  frameHeight = CL_vNew("frameHeight",651,solver);  CL_SimplexSolverAddStrongStay(solver,frameWidth,10);  CL_SimplexSolverAddStrongStay(solver,frameHeight,10);  x = CL_vNew("x",0,solver);#ifdef CL_BUILD_FD_SOLVER   y = CL_dvNew("y",4,6,9,15,20,FDN_EOL);#else  y = CL_vNew("y",4, solver);#endif    CL_vPrint(x,stdout);  printf("/n");  CL_vPrint(y,stdout);  printf("/n");   printf("x = %g, frameWidth = %g/n",CL_vValue(x),CL_vValue(frameWidth));  cn = CL_ParseConstraint("x = frameWidth/3", "strong");  printf("x = %g, frameWidth = %g/n",CL_vValue(x),CL_vValue(frameWidth));  CL_AddConstraint(solver,cn);  printf("x = %g, frameWidth = %g/n",CL_vValue(x),CL_vValue(frameWidth));  CL_Solve(solver);  printf("x = %g, frameWidth = %g/n",CL_vValue(x),CL_vValue(frameWidth));  printf("/"x/" has Value %g/n", CL_vValue(CL_vLookup("x")));  CL_SolverPrint(solver,stderr);  CL_SimplexSolverSetEditedValue(solver,frameWidth,620);  printf("x = %g, frameWidth = %g/n",CL_vValue(x),CL_vValue(frameWidth));  CL_SolverPrint(solver,stderr);  printf("x = %g, frameWidth = %g/n",CL_vValue(x),CL_vValue(frameWidth));  CL_SimplexSolverSetEditedValue(solver,frameWidth,700);  printf("x = %g, frameWidth = %g/n",CL_vValue(x),CL_vValue(frameWidth));  CL_TableauPrintExternalVariables(solver,stderr);  CL_Shutdown();  return 0;}
开发者ID:svilendobrev,项目名称:cassowarypy,代码行数:57,


示例13: Com_Error

/* * Both client and server can use this, and it will * do the apropriate things. */voidCom_Error(int code, char *fmt, ...){	va_list argptr;	static char msg[MAXPRINTMSG];	static qboolean recursive;	if (recursive)	{		Sys_Error("recursive error after: %s", msg);	}	recursive = true;	va_start(argptr, fmt);	vsnprintf(msg, MAXPRINTMSG, fmt, argptr);	va_end(argptr);	if (code == ERR_DISCONNECT)	{#ifndef DEDICATED_ONLY		CL_Drop();#endif		recursive = false;		longjmp(abortframe, -1);	}	else if (code == ERR_DROP)	{		Com_Printf("********************/nERROR: %s/n********************/n",				msg);		SV_Shutdown(va("Server crashed: %s/n", msg), false);#ifndef DEDICATED_ONLY		CL_Drop();#endif		recursive = false;		longjmp(abortframe, -1);	}	else	{		SV_Shutdown(va("Server fatal crashed: %s/n", msg), false);#ifndef DEDICATED_ONLY		CL_Shutdown();#endif	}	if (logfile)	{		fclose(logfile);		logfile = NULL;	}	Sys_Error("%s", msg);	recursive = false;}
开发者ID:tomgreen66,项目名称:yquake2,代码行数:60,


示例14: Com_Error

void QDECL Com_Error( int code, const char *fmt, ... ) {	va_list		argptr;	// when we are running automated scripts, make sure we	// know if anything failed	if ( com_buildScript && com_buildScript->integer ) {		code = ERR_FATAL;	}	if ( com_errorEntered ) {		Sys_Error( "recursive error after: %s", com_errorMessage );	}		com_errorEntered = qtrue;	//reset some game stuff here//	SCR_UnprecacheScreenshot();	va_start (argptr,fmt);	Q_vsnprintf (com_errorMessage, sizeof(com_errorMessage), fmt, argptr);	va_end (argptr);		if ( code != ERR_DISCONNECT ) {		Cvar_Get("com_errorMessage", "", CVAR_ROM);	//give com_errorMessage a default so it won't come back to life after a resetDefaults		Cvar_Set("com_errorMessage", com_errorMessage);	}	SG_Shutdown();				// close any file pointers	if ( code == ERR_DISCONNECT ) {		SV_Shutdown("Disconnect", qtrue);		CL_Disconnect();		CL_FlushMemory();		CL_StartHunkUsers();		com_errorEntered = qfalse;		throw ("DISCONNECTED/n");	} else if ( code == ERR_DROP ) {		// If loading/saving caused the crash/error - delete the temp file		SG_WipeSavegame("current");	// delete file		SV_Shutdown (va("Server crashed: %s/n",  com_errorMessage), qtrue);		CL_Disconnect();		CL_FlushMemory();		CL_StartHunkUsers();		Com_Printf (S_COLOR_RED"********************/n"S_COLOR_MAGENTA"ERROR: %s/n"S_COLOR_RED"********************/n", com_errorMessage);		com_errorEntered = qfalse;		throw ("DROPPED/n");	} else {		CL_Shutdown ();		SV_Shutdown (va(S_COLOR_RED"Server fatal crashed: %s/n", com_errorMessage), qtrue);	}	Com_Shutdown ();	Sys_Error ("%s", com_errorMessage);}
开发者ID:CairnTrenor,项目名称:OpenJK,代码行数:55,


示例15: Java_com_jeyries_quake2_Quake2_Quake2Quit

jint EXPORT_MEJava_com_jeyries_quake2_Quake2_Quake2Quit( JNIEnv* env,                                                  jobject thiz ){	//Sys_Quit();	CL_Shutdown ();	Qcommon_Shutdown ();	//fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);	// 	_exit(0);	return 0;}
开发者ID:FeltonLyndon,项目名称:quake2android,代码行数:11,


示例16: Com_Error

void NORETURN QDECL Com_Error( int code, const char *fmt, ... ) {	va_list		argptr;	static int	lastErrorTime;	static int	errorCount;	int			currentTime;	if ( com_errorEntered ) {		Sys_Error( "recursive error after: %s", com_errorMessage );	}	com_errorEntered = qtrue;	// when we are running automated scripts, make sure we	// know if anything failed	if ( com_buildScript && com_buildScript->integer ) {		code = ERR_FATAL;	}	// if we are getting a solid stream of ERR_DROP, do an ERR_FATAL	currentTime = Sys_Milliseconds();	if ( currentTime - lastErrorTime < 100 ) {		if ( ++errorCount > 3 ) {			code = ERR_FATAL;		}	} else {		errorCount = 0;	}	lastErrorTime = currentTime;#ifdef JK2_MODE	SCR_UnprecacheScreenshot();#endif		va_start (argptr,fmt);	Q_vsnprintf (com_errorMessage, sizeof(com_errorMessage), fmt, argptr);	va_end (argptr);		if ( code != ERR_DISCONNECT ) {		Cvar_Get("com_errorMessage", "", CVAR_ROM);	//give com_errorMessage a default so it won't come back to life after a resetDefaults		Cvar_Set("com_errorMessage", com_errorMessage);	}	SG_Shutdown();	// close any file pointers	if ( code == ERR_DISCONNECT || code == ERR_DROP ) {		throw code;	} else {		SV_Shutdown (va("Server fatal crashed: %s/n", com_errorMessage));		CL_Shutdown ();	}	Com_Shutdown ();	Sys_Error ("%s", com_errorMessage);}
开发者ID:Aura15,项目名称:OpenJK,代码行数:53,


示例17: Sys_Quit

void Sys_Quit (void){	timeEndPeriod( 1 );	CL_Shutdown();	Qcommon_Shutdown ();	CloseHandle (qwclsemaphore);	if (dedicated && dedicated->value)		FreeConsole ();	exit (0);}
开发者ID:basecq,项目名称:q2dos,代码行数:12,


示例18: Sys_Quit

void Sys_Quit (void){	timeEndPeriod( 1 );	CL_Shutdown();	Qcommon_Shutdown();	Sys_DestroyConsole();	exit (0);}
开发者ID:chrisnew,项目名称:quake2,代码行数:12,


示例19: Com_Quit

/*=============Com_QuitBoth client and server can use this, and it willdo the apropriate things.=============*/void Com_Quit (void){	SV_Shutdown ("Server quit/n", false);	CL_Shutdown ();	if (logfile) {		fclose (logfile);		logfile = NULL;	}	Sys_Quit ();}
开发者ID:chrisnew,项目名称:quake2,代码行数:20,


示例20: Sys_Quit

/** * @brief * @sa Qcommon_Shutdown */void Sys_Quit (void){#ifdef COMPILE_UFO	CL_Shutdown();	Qcommon_Shutdown();	Sys_ConsoleShutdown();#elif COMPILE_MAP	Mem_Shutdown();#endif	fcntl(STDIN_FILENO, F_SETFL, fcntl(STDIN_FILENO, F_GETFL, 0) & ~FNDELAY);	exit(0);}
开发者ID:stavrossk,项目名称:ufoai,代码行数:17,


示例21: Sys_Quit

void Sys_Quit (void){	timeEndPeriod(1);#ifdef COMPILE_UFO	CL_Shutdown();	Qcommon_Shutdown();#elif COMPILE_MAP	Mem_Shutdown();#endif	/* exit(0) */	ExitProcess(0);}
开发者ID:MyWifeRules,项目名称:ufoai-1,代码行数:14,


示例22: Sys_Error

/*=================Sys_Error=================*/void Sys_Error( const char *error, ... ){	va_list argptr;	char    string[1024];	va_start (argptr,error);	Q_vsnprintf (string, sizeof(string), error, argptr);	va_end (argptr);	CL_Shutdown( string );	Sys_ErrorDialog( string );	Sys_Exit( 3 );}
开发者ID:dahool,项目名称:alpha-ioq3,代码行数:19,


示例23: Com_Error

/*=============Com_ErrorBoth client and server can use this, and it willdo the apropriate things.=============*/void Com_Error (int code, char *fmt, ...){	va_list argptr;	static char msg[MAXPRINTMSG];	static qboolean recursive;//	assert(Q_streq(fmt, "Disconnected from server")); // jitdebug	if (recursive)		Sys_Error("Recursive error after: %s", msg);	recursive = true;	va_start(argptr,fmt);	_vsnprintf(msg, sizeof(msg), fmt, argptr); // jitsecurity -- prevent buffer overruns	va_end(argptr);	NULLTERMINATE(msg); // jitsecurity -- make sure string is null terminated.	switch (code) // jiterror	{	case ERR_BENIGN: // jiterror - don't close the app.  Just print the error to the console.		Com_Printf("*** ERROR: %s/n", msg);		recursive = false;		return;	case ERR_DISCONNECT:		CL_Drop();		recursive = false;		longjmp(abortframe, -1);		break;	case ERR_DROP:		Com_Printf("********************/nERROR: %s/n********************/n", msg);		SV_Shutdown(va("Server crashed: %s/n", msg), false);		CL_Drop();		recursive = false;		longjmp(abortframe, -1);		break;	case ERR_FATAL:	default:		SV_Shutdown(va("Server fatal crashed: %s/n", msg), false);		CL_Shutdown();	}	if (logfile)	{		fclose(logfile);		logfile = NULL;	}	Sys_Error("%s", msg);}
开发者ID:jitspoe,项目名称:starviewer,代码行数:57,


示例24: Sys_Quit

void Sys_Quit (void){	timeEndPeriod( 1 );	CL_Shutdown();	Qcommon_Shutdown ();	CloseHandle (qwclsemaphore);	if (dedicated && dedicated->value)		FreeConsole ();// shut down QHOST hooks if necessary	DeinitConProc ();	exit (0);}
开发者ID:AkBKukU,项目名称:Quake-2,代码行数:15,


示例25: Host_Shutdown

/*===============Host_ShutdownFIXME: this is a callback from Sys_Quit and Sys_Error.  It would be betterto run quit through here before the final handoff to the sys code.===============*/void Host_Shutdown (void){	static qbool isdown = false;		if (isdown)	{		printf ("recursive shutdown/n");		return;	}	isdown = true;	SV_Shutdown ("Server quit/n");	CL_Shutdown ();	NET_Shutdown ();	COM_Shutdown ();}
开发者ID:matatk,项目名称:agrip,代码行数:24,


示例26: Com_Error

/** * @note Both client and server can use this, and it will * do the appropriate things. */void Com_Error (int code, const char* fmt, ...){	va_list argptr;	static char msg[MAXPRINTMSG];	static bool recursive = false;	if (recursive)		Sys_Error("recursive error after: %s", msg);	recursive = true;	va_start(argptr, fmt);	Q_vsnprintf(msg, sizeof(msg), fmt, argptr);	va_end(argptr);	switch (code) {	case ERR_DISCONNECT:		Com_Printf("%s/n", msg);		CL_Drop();		recursive = false;		Com_Drop();	case ERR_DROP:		Com_Printf("********************/n");		Com_Printf("ERROR: %s/n", msg);		Com_Printf("********************/n");		Sys_Backtrace();		SV_Shutdown("Server crashed.", false);		CL_Drop();		recursive = false;		Com_Drop();	default:		Com_Printf("%s/n", msg);		SV_Shutdown("Server fatal crashed", false);		/* send an receive net messages a last time */		NET_Wait(0);		FS_CloseFile(&logfile);		if (pipefile.f != nullptr) {			FS_CloseFile(&pipefile);			FS_RemoveFile(va("%s/%s", FS_Gamedir(), pipefile.name));		}		CL_Shutdown();		Qcommon_Shutdown();		Sys_Error("Shutdown");	}}
开发者ID:ArkyRomania,项目名称:ufoai,代码行数:51,


示例27: Sys_Error

void	Sys_Error( const char *error, ...){     va_list     argptr;    char        string[1024];	// change stdin to non blocking    fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);    CL_Shutdown ();        va_start (argptr,error);    vsprintf (string,error,argptr);    va_end (argptr);    fprintf(stderr, "Sys_Error: %s/n", string);        Sys_Exit( 1 ); // bk010104 - use single exit point.} 
开发者ID:Boothand,项目名称:jk2mp,代码行数:17,


示例28: Sys_Error

void Sys_Error( const char *format, ... ){    va_list argptr;    char msg[1024];    CL_Shutdown();    va_start( argptr, format );    Q_vsnprintfz( msg, sizeof( msg ), format, argptr );    va_end( argptr );    SDL_ShowSimpleMessageBox( SDL_MESSAGEBOX_ERROR, APPLICATION, msg, NULL );    Qcommon_Shutdown();    exit( 1 );}
开发者ID:cfr,项目名称:qfusion,代码行数:17,


示例29: Sys_Quit

void Sys_Quit( void ){	timeEndPeriod( 1 );	SV_Shutdown( "Server quit/n" );	CL_Shutdown();	if( dedicated && dedicated->integer )		FreeConsole();	// shut down QHOST hooks if necessary	DeinitConProc();	Qcommon_Shutdown();	exit( 0 );}
开发者ID:Clever-Boy,项目名称:qfusion,代码行数:17,


示例30: Sys_Error

void Sys_Error(char *error, ...){	va_list argptr;	char string[1024];		/* change stdin to non blocking */	fcntl(0, F_SETFL, fcntl(0, F_GETFL, 0) & ~FNDELAY);		CL_Shutdown();	Qcommon_Shutdown();		va_start(argptr, error);	vsnprintf(string, 1024, error, argptr);	va_end(argptr);	fprintf(stderr, "Error: %s/n", string);		_exit(1);}
开发者ID:luaman,项目名称:qforge-2,代码行数:17,



注:本文中的CL_Shutdown函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CL_TRUEP函数代码示例
C++ CL_SET_VARG函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。