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

📄 ps_error.c

📁 PSlib是一个用来生成PostScript文件的类库。提供了一个生成PostScript文件的简单方法。
💻 C
字号:
#include <stdlib.h>#include <stdarg.h>#include <stdio.h>#include "ps_intern.h"/* _ps_errorhandler() {{{ * Default error handler, set if none is provided by application. */void _ps_errorhandler(PSDoc *p, int error, const char *str, void *data) {	fprintf(stderr, "PSLib: %s\n", str);}/* }}} *//* ps_error() {{{ * Output an error using the errorhandler for the given document. */void ps_error(PSDoc *p, int type, const char *fmt, ...) {	char msg[256];	va_list ap;	if(type == PS_Warning && p->warnings == ps_false)		return;	va_start(ap, fmt);	vsprintf(msg, fmt, ap);	if (!p->in_error) {		p->in_error = 1; /* avoid recursive errors */		(p->errorhandler)(p, type, msg, p->user_data);	}	/* If the error handler returns the error was non-fatal */	p->in_error = 0;	va_end(ap);}/* }}} */

⌨️ 快捷键说明

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