/* vsprintf with automatic memory allocation.
Copyright (C) 1999, 2002-2013 Free Software Foundation, Inc.
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 3, 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, see <http://www.gnu.org/licenses/>. */
/* This file can be parametrized with the following macros:
VASNPRINTF The name of the function being defined.
FCHAR_T The element type of the format string.
DCHAR_T The element type of the destination (result) string.
FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters
in the format string are ASCII. MUST be set if
FCHAR_T and DCHAR_T are not the same type.
DIRECTIVE Structure denoting a format directive.
Depends on FCHAR_T.
DIRECTIVES Structure denoting the set of format directives of a
format string. Depends on FCHAR_T.
PRINTF_PARSE Function that parses a format string.
Depends on FCHAR_T.
DCHAR_CPY memcpy like function for DCHAR_T[] arrays.
DCHAR_SET memset like function for DCHAR_T[] arrays.
DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays.
SNPRINTF The system's snprintf (or similar) function.
This may be either snprintf or swprintf.
TCHAR_T The element type of the argument and result string
of the said SNPRINTF function. This may be either
char or wchar_t. The code exploits that
sizeof (TCHAR_T) | sizeof (DCHAR_T) and
alignof (TCHAR_T) <= alignof (DCHAR_T).
DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type.
DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[].
DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t.
DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t.
DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */
/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifndef VASNPRINTF
# include <config.h>
#endif
#ifndef IN_LIBINTL
# include <alloca.h>
#endif
/* Specification. */
#ifndef VASNPRINTF
# if WIDE_CHAR_VERSION
# include "vasnwprintf.h"
# else
# include "vasnprintf.h"
# endif
#endif
#include <locale.h> /* localeconv() */
#include <stdio.h> /* snprintf(), sprintf() */
#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
#include <string.h> /* memcpy(), strlen() */
#include <errno.h> /* errno */
#include <limits.h> /* CHAR_BIT */
#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
#if HAVE_NL_LANGINFO
# include <langinfo.h>
#endif
#ifndef VASNPRINTF
# if WIDE_CHAR_VERSION
# include "wprintf-parse.h"
# else
# include "printf-parse.h"
# endif
#endif
/* Checked size_t computations. */
#include "xsize.h"
#include "verify.h"
#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
# include <math.h>
# include "float+.h"
#endif
#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
# include <math.h>
# include "isnand-nolibm.h"
#endif
#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
# include <math.h>
# include "isnanl-nolibm.h"
# include "fpucw.h"
#endif
#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
# include <math.h>
# include "isnand-nolibm.h"
# include "printf-frexp.h"
#endif
#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
# include <math.h>
# include "isnanl-nolibm.h"
# include "printf-frexpl.h"
# include "fpucw.h"
#endif
/* Default parameters. */
#ifndef VASNPRINTF
# if WIDE_CHAR_VERSION
# define VASNPRINTF vasnwprintf
# define FCHAR_T wchar_t
# define DCHAR_T wchar_t
# define TCHAR_T wchar_t
# define DCHAR_IS_TCHAR 1
# define DIRECTIVE wchar_t_directive
# define DIRECTIVES wchar_t_directives
# define PRINTF_PARSE wprintf_parse
# define DCHAR_CPY wmemcpy
# define DCHAR_SET wmemset
# else
# define VASNPRINTF vasnprintf
# define FCHAR_T char
# define DCHAR_T char
# define TCHAR_T char
# define DCHAR_IS_TCHAR 1
# define DIRECTIVE char_directive
# define DIRECTIVES char_directives
# define PRINTF_PARSE printf_parse
# define DCHAR_CPY memcpy
# define DCHAR_SET memset
# endif
#endif
#if WIDE_CHAR_VERSION
/* TCHAR_T is wchar_t. */
# define USE_SNPRINTF 1
# if HAVE_DECL__SNWPRINTF
/* On Windows, the function swprintf() has a different signature than
on Unix; we use the function _snwprintf() or - on mingw - snwprintf()
instead. The mingw function snwprintf() has fewer bugs than the
MSVCRT function _snwprintf(), so prefer that. */
# if defined __MINGW32__
# define SNPRINTF snwprintf
# else
# define SNPRINTF _snwprintf
# endif
# else
/* Unix. */
# define SNPRINTF swprintf
# endif
#else
/* TCHAR_T is char. */
/* Use snprintf if it exists under the name 'snprintf' or '_snprintf'.
But don't use it on BeOS, since BeOS snprintf produces no output if the
size argument is >= 0x3000000.
Also don't use it on Linux libc5, since there snprintf with size = 1
writes any output without bounds, like sprintf. */
# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1)
# define USE_SNPRINTF 1
# else
# define USE_SNPRINTF 0
# endif
# if HAVE_DECL__SNPRINTF
/* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT
function _snprintf(), so prefer that. */
# if defined __MINGW32__
# define SNPRINTF snprintf
/* Here we need to call the native snprintf, not rpl_snprintf. */
# undef snprintf
# else
# define SNPRINTF _snprintf
# endif
# else
/* Unix. */
# define SNPRINTF snprintf
/* Here we need to call the native snprintf, not rpl_snprintf. */
# undef snprintf
# endif
#endif
/* Here we need to call the native sprintf, not rpl_sprintf. */
#undef sprintf
/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized"
warnings in this file. Use -Dlint to suppress them. */
#ifdef lint
# define IF_LINT(Code) Code
#else
# define IF_LINT(Code) /* empty */
#endif
/* Avoid some warnings from "gcc -Wshadow".
This file doesn't use the exp() and remainder() functions. */
#undef exp
#define exp expo
#undef remainder
#define remainder rem
#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION
# if (HAVE_STRNLEN && !defined _AIX)
# define local_strnlen strnlen
# else
# ifndef local_strnlen_defined
# define local_strnlen_defined 1
static size_t
local_strnlen (const char *string, size_t maxlen)
{
const char *end = memchr (string, '\0', maxlen);
return end ? (size_t) (end - string) : maxlen;
}
# endif
# endif
#endif
#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
# if HAVE_WCSLEN
# define local_wcslen wcslen
# else
/* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
a dependency towards this library, here is a local substitute.
Define this substi
没有合适的资源?快使用搜索试试~ 我知道了~
C++ 条码,二维码生成程序(Qt 界面)
共159个文件
h:67个
c:58个
dll:19个
5星 · 超过95%的资源 需积分: 50 100 下载量 60 浏览量
2016-04-06
11:26:36
上传
评论 6
收藏 8.88MB RAR 举报
温馨提示
C++ 条码,二维码生成程序(Qt 界面),整合 BarCode,QREncode 两个开源库, 当然也有扫描识别部分没加进来 ,扫描识别使用 zxing opensource project, 已经测试过,有 android(java) 和 C++ 版本,有时间再整理上传。
资源推荐
资源详情
资源评论
收起资源包目录
C++ 条码,二维码生成程序(Qt 界面) (159个子文件)
Makefile.am 74KB
vasnprintf.c 218KB
getopt.c 40KB
qrinput.c 38KB
printf-parse.c 22KB
qrenc.c 22KB
ean.c 20KB
qrencode.c 20KB
code128.c 17KB
qrspec.c 15KB
error.c 10KB
rscode.c 9KB
library.c 9KB
strerror-override.c 9KB
ps.c 9KB
sigprocmask.c 8KB
svg.c 8KB
stdio-write.c 7KB
split.c 7KB
pcl.c 7KB
mqrspec.c 7KB
code93.c 7KB
mask.c 7KB
code39.c 7KB
printf-args.c 6KB
open.c 6KB
memchr.c 6KB
code11.c 5KB
write.c 5KB
codabar.c 5KB
i25.c 4KB
stat.c 4KB
plessey.c 4KB
getopt1.c 4KB
bitstream.c 4KB
mmask.c 4KB
msi.c 4KB
msvc-inval.c 4KB
rint.c 4KB
fd-hook.c 4KB
fopen.c 3KB
fstat.c 2KB
strerror.c 2KB
calloc.c 2KB
snprintf.c 2KB
raise.c 2KB
malloc.c 1KB
close.c 1KB
float.c 1KB
strdup.c 1KB
msvc-nothrow.c 1KB
memcpy.c 1KB
asnprintf.c 1KB
itold.c 1KB
free.c 927B
memset.c 924B
unistd.c 84B
math.c 80B
xsize.c 78B
tmainwnd.cpp 9KB
qtsvgpixmapcache.cpp 2KB
main.cpp 668B
Qt5Widgets.dll 6.24MB
Qt5Core.dll 5.14MB
Qt5Gui.dll 5.09MB
Qt5Network.dll 1.46MB
qwindows.dll 1.35MB
qwindows.dll 1.35MB
libstdc++-6.dll 1002KB
qsqlite.dll 786KB
qoffscreen.dll 654KB
Qt5Svg.dll 324KB
Qt5Sql.dll 253KB
qjpeg.dll 241KB
libgcc_s_dw2-1.dll 117KB
qsqlmysql.dll 71KB
BarCode.dll 54KB
QrEncode.dll 49KB
libwinpthread-1.dll 48KB
qminimal.dll 31KB
qsvg.dll 28KB
testQRGenerator.exe 38KB
math.h 73KB
math.in.h 64KB
unistd.h 61KB
stdio.h 58KB
string.h 51KB
unistd.in.h 51KB
stdio.in.h 48KB
config.h 48KB
wchar.h 44KB
stdlib.h 44KB
string.in.h 39KB
wchar.in.h 33KB
stdlib.in.h 32KB
stat.h 32KB
signal.h 26KB
fcntl.h 22KB
time.h 21KB
qrencode.h 20KB
共 159 条
- 1
- 2
资源评论
- yesu_shangdi2016-10-12源代码没有加上来 只有放进了编译好的库文件
- qq_345785072017-09-19您好。可以简单的提供条形码的形成吗?我下下来的时候,没办法编译,是不是哪个路径需要更改!
Aisy_D
- 粉丝: 18
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功