0 Star 0 Fork 64

Lizhiqi / third_party_giflib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
qprintf.c 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
mamingshuai 提交于 2021-03-11 18:38 . update openharmony 1.0.1
/*****************************************************************************
qprintf.c - module to emulate a printf with a possible quiet (disable mode.)
A global variable GifNoisyPrint controls the printing of this routine
SPDX-License-Identifier: MIT
*****************************************************************************/
#include <stdio.h>
#include <stdbool.h>
#include <stdarg.h>
#include "gif_lib.h"
bool GifNoisyPrint = false;
/*****************************************************************************
Same as fprintf to stderr but with optional print.
******************************************************************************/
void
GifQprintf(char *Format, ...) {
va_list ArgPtr;
va_start(ArgPtr, Format);
if (GifNoisyPrint) {
char Line[128];
(void)vsnprintf(Line, sizeof(Line), Format, ArgPtr);
(void)fputs(Line, stderr);
}
va_end(ArgPtr);
}
void
PrintGifError(int ErrorCode) {
const char *Err = GifErrorString(ErrorCode);
if (Err != NULL)
fprintf(stderr, "GIF-LIB error: %s.\n", Err);
else
fprintf(stderr, "GIF-LIB undefined error %d.\n", ErrorCode);
}
/* end */
1
https://gitee.com/pssea/third_party_giflib.git
git@gitee.com:pssea/third_party_giflib.git
pssea
third_party_giflib
third_party_giflib
master

搜索帮助