⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 error.c

📁 乒乓球游戏程序
💻 C
字号:
/*----------------------------------------------------------------
 * error.c -- error handling functions
 *----------------------------------------------------------------
 */

#include <stdio.h>
#include <stdlib.h>
#include <allegro.h>

#include "error.h"


/* error_x:
 *  This function does not return.  It terminates the program, 
 *  printing filename, line, s1 and (if it is not NULL) s2.
 *
 *  The filename and line number are normally supplied by the
 *  `error' macro defined in error.h.
 */
void error_x (char *filename, int line, char *s1, char *s2)
{
	set_gfx_mode (GFX_TEXT, 0, 0, 0, 0);
	fprintf (stderr, "Critical error:\n");
	fprintf (stderr, "%s:%d: %s", filename, line, s1);
	if (s2) fprintf (stderr, " (%s)", s2);
	fprintf (stderr, "\n");
	exit (EXIT_FAILURE);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -