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

📄 zperr.c

📁 Linux下ztelnet 的rz、sz源码
💻 C
字号:
/*  zperr.c - "stderr" output stuff  Copyright (C) 1996, 1997 Uwe Ohse  This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by  the Free Software Foundation; either version 2, or (at your option)  any later version.  This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.  You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  originally written by Uwe Ohse*/#include "zglobal.h"#include <stdio.h>#include <stdlib.h>#include <errno.h>#ifdef __STDC__#  define WAYTOGO#  include <stdarg.h>#  define VA_START(args, lastarg) va_start(args, lastarg)#else#  include <varargs.h>#  define VA_START(args, lastarg) va_start(args)#endifvoid#ifdef WAYTOGOzperr(const char *fmt, ...)#elsezperr(fmt, va_alist)	const char *fmt;	va_dcl#endif{    va_list ap;	if (Verbose<=0)		return;	fprintf(stderr,_("Retry %d: "),errors);    VA_START(ap, fmt);    vfprintf(stderr,fmt, ap);    va_end(ap);    putc('\n',stderr);}void#ifdef WAYTOGOzpfatal(const char *fmt, ...)#elsezpfatal(fmt, va_alist)	const char *fmt;	va_dcl#endif{    va_list ap;    int err=errno;	if (Verbose<=0)		return;	fprintf(stderr,"%s: ",program_name);    VA_START(ap, fmt);    vfprintf(stderr,fmt, ap);    va_end(ap);	fprintf(stderr,": %s\n",strerror(err));}void #ifdef WAYTOGOvfile(const char *format, ...)#elsevfile(format, va_alist)	const char *format;	va_dcl#endif{    va_list ap;	if (Verbose < 3)		return;    VA_START(ap, format);    vfprintf(stderr,format, ap);    va_end(ap);    putc('\n',stderr);}#ifndef vstringf/* if using gcc this function is not needed */void #ifdef WAYTOGOvstringf(const char *format, ...)#elsevstringf(format, va_alist)	const char *format;	va_dcl#endif{    va_list ap;    VA_START(ap, format);    vfprintf(stderr,format, ap);    va_end(ap);}#endif

⌨️ 快捷键说明

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