亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vasnprintf.c

?? 研讀AxCrypt對加解密的處理方法
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* vsprintf with automatic memory allocation.
   Copyright (C) 1999, 2002-2005 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU Library 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
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
   USA.  */

/* 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

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef IN_LIBINTL
# include <alloca.h>
#endif

/* Specification.  */
#if WIDE_CHAR_VERSION
# include "vasnwprintf.h"
#else
# include "vasnprintf.h"
#endif

#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, INT_MAX */
#include <float.h>	/* DBL_MAX_EXP, LDBL_MAX_EXP */
#if WIDE_CHAR_VERSION
# include "wprintf-parse.h"
#else
# include "printf-parse.h"
#endif

/* Checked size_t computations.  */
#include "xsize.h"

/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW.  */
#ifndef EOVERFLOW
# define EOVERFLOW E2BIG
#endif

#ifdef HAVE_WCHAR_T
# ifdef 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 substitute only once, even if this file is included
      twice in the same compilation unit.  */
#  ifndef local_wcslen_defined
#   define local_wcslen_defined 1
static size_t
local_wcslen (const wchar_t *s)
{
  const wchar_t *ptr;

  for (ptr = s; *ptr != (wchar_t) 0; ptr++)
    ;
  return ptr - s;
}
#  endif
# endif
#endif

#if WIDE_CHAR_VERSION
# define VASNPRINTF vasnwprintf
# define CHAR_T wchar_t
# define DIRECTIVE wchar_t_directive
# define DIRECTIVES wchar_t_directives
# define PRINTF_PARSE wprintf_parse
# define USE_SNPRINTF 1
# if HAVE_DECL__SNWPRINTF
   /* On Windows, the function swprintf() has a different signature than
      on Unix; we use the _snwprintf() function instead.  */
#  define SNPRINTF _snwprintf
# else
   /* Unix.  */
#  define SNPRINTF swprintf
# endif
#else
# define VASNPRINTF vasnprintf
# define CHAR_T char
# define DIRECTIVE char_directive
# define DIRECTIVES char_directives
# define PRINTF_PARSE printf_parse
# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
# if HAVE_DECL__SNPRINTF
   /* Windows.  */
#  define SNPRINTF _snprintf
# else
   /* Unix.  */
#  define SNPRINTF snprintf
# endif
#endif

CHAR_T *
VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
{
  DIRECTIVES d;
  arguments a;

  if (PRINTF_PARSE (format, &d, &a) < 0)
    {
      errno = EINVAL;
      return NULL;
    }

#define CLEANUP() \
  free (d.dir);								\
  if (a.arg)								\
    free (a.arg);

  if (printf_fetchargs (args, &a) < 0)
    {
      CLEANUP ();
      errno = EINVAL;
      return NULL;
    }

  {
    size_t buf_neededlength;
    CHAR_T *buf;
    CHAR_T *buf_malloced;
    const CHAR_T *cp;
    size_t i;
    DIRECTIVE *dp;
    /* Output string accumulator.  */
    CHAR_T *result;
    size_t allocated;
    size_t length;

    /* Allocate a small buffer that will hold a directive passed to
       sprintf or snprintf.  */
    buf_neededlength =
      xsum4 (7, d.max_width_length, d.max_precision_length, 6);
#if HAVE_ALLOCA
    if (buf_neededlength < 4000 / sizeof (CHAR_T))
      {
	buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
	buf_malloced = NULL;
      }
    else
#endif
      {
	size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
	if (size_overflow_p (buf_memsize))
	  goto out_of_memory_1;
	buf = (CHAR_T *) malloc (buf_memsize);
	if (buf == NULL)
	  goto out_of_memory_1;
	buf_malloced = buf;
      }

    if (resultbuf != NULL)
      {
	result = resultbuf;
	allocated = *lengthp;
      }
    else
      {
	result = NULL;
	allocated = 0;
      }
    length = 0;
    /* Invariants:
       result is either == resultbuf or == NULL or malloc-allocated.
       If length > 0, then result != NULL.  */

    /* Ensures that allocated >= needed.  Aborts through a jump to
       out_of_memory if needed is SIZE_MAX or otherwise too big.  */
#define ENSURE_ALLOCATION(needed) \
    if ((needed) > allocated)						     \
      {									     \
	size_t memory_size;						     \
	CHAR_T *memory;							     \
									     \
	allocated = (allocated > 0 ? xtimes (allocated, 2) : 12);	     \
	if ((needed) > allocated)					     \
	  allocated = (needed);						     \
	memory_size = xtimes (allocated, sizeof (CHAR_T));		     \
	if (size_overflow_p (memory_size))				     \
	  goto out_of_memory;						     \
	if (result == resultbuf || result == NULL)			     \
	  memory = (CHAR_T *) malloc (memory_size);			     \
	else								     \
	  memory = (CHAR_T *) realloc (result, memory_size);		     \
	if (memory == NULL)						     \
	  goto out_of_memory;						     \
	if (result == resultbuf && length > 0)				     \
	  memcpy (memory, result, length * sizeof (CHAR_T));		     \
	result = memory;						     \
      }

    for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
      {
	if (cp != dp->dir_start)
	  {
	    size_t n = dp->dir_start - cp;
	    size_t augmented_length = xsum (length, n);

	    ENSURE_ALLOCATION (augmented_length);
	    memcpy (result + length, cp, n * sizeof (CHAR_T));
	    length = augmented_length;
	  }
	if (i == d.count)
	  break;

	/* Execute a single directive.  */
	if (dp->conversion == '%')
	  {
	    size_t augmented_length;

	    if (!(dp->arg_index == ARG_NONE))
	      abort ();
	    augmented_length = xsum (length, 1);
	    ENSURE_ALLOCATION (augmented_length);
	    result[length] = '%';
	    length = augmented_length;
	  }
	else
	  {
	    if (!(dp->arg_index != ARG_NONE))
	      abort ();

	    if (dp->conversion == 'n')
	      {
		switch (a.arg[dp->arg_index].type)
		  {
		  case TYPE_COUNT_SCHAR_POINTER:
		    *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
		    break;
		  case TYPE_COUNT_SHORT_POINTER:
		    *a.arg[dp->arg_index].a.a_count_short_pointer = length;
		    break;
		  case TYPE_COUNT_INT_POINTER:
		    *a.arg[dp->arg_index].a.a_count_int_pointer = length;
		    break;
		  case TYPE_COUNT_LONGINT_POINTER:
		    *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
		    break;
#ifdef HAVE_LONG_LONG
		  case TYPE_COUNT_LONGLONGINT_POINTER:
		    *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
		    break;
#endif
		  default:
		    abort ();
		  }
	      }
	    else
	      {
		arg_type type = a.arg[dp->arg_index].type;
		CHAR_T *p;
		unsigned int prefix_count;
		int prefixes[2];
#if !USE_SNPRINTF
		size_t tmp_length;
		CHAR_T tmpbuf[700];
		CHAR_T *tmp;

		/* Allocate a temporary buffer of sufficient size for calling
		   sprintf.  */
		{
		  size_t width;
		  size_t precision;

		  width = 0;
		  if (dp->width_start != dp->width_end)
		    {
		      if (dp->width_arg_index != ARG_NONE)
			{
			  int arg;

			  if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
			    abort ();
			  arg = a.arg[dp->width_arg_index].a.a_int;
			  width = (arg < 0 ? (unsigned int) (-arg) : arg);
			}
		      else
			{
			  const CHAR_T *digitp = dp->width_start;

			  do
			    width = xsum (xtimes (width, 10), *digitp++ - '0');
			  while (digitp != dp->width_end);
			}
		    }

		  precision = 6;
		  if (dp->precision_start != dp->precision_end)
		    {
		      if (dp->precision_arg_index != ARG_NONE)
			{
			  int arg;

			  if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
			    abort ();
			  arg = a.arg[dp->precision_arg_index].a.a_int;
			  precision = (arg < 0 ? 0 : arg);
			}
		      else
			{
			  const CHAR_T *digitp = dp->precision_start + 1;

			  precision = 0;
			  while (digitp != dp->precision_end)
			    precision = xsum (xtimes (precision, 10), *digitp++ - '0');
			}
		    }

		  switch (dp->conversion)
		    {

		    case 'd': case 'i': case 'u':
# ifdef HAVE_LONG_LONG
		      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
			tmp_length =
			  (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
					  * 0.30103 /* binary -> decimal */
					  * 2 /* estimate for FLAG_GROUP */
					 )
			  + 1 /* turn floor into ceil */
			  + 1; /* account for leading sign */
		      else
# endif
		      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
			tmp_length =
			  (unsigned int) (sizeof (unsigned long) * CHAR_BIT
					  * 0.30103 /* binary -> decimal */
					  * 2 /* estimate for FLAG_GROUP */
					 )
			  + 1 /* turn floor into ceil */
			  + 1; /* account for leading sign */
		      else
			tmp_length =
			  (unsigned int) (sizeof (unsigned int) * CHAR_BIT
					  * 0.30103 /* binary -> decimal */
					  * 2 /* estimate for FLAG_GROUP */
					 )
			  + 1 /* turn floor into ceil */
			  + 1; /* account for leading sign */
		      break;

		    case 'o':
# ifdef HAVE_LONG_LONG
		      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
			tmp_length =
			  (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
					  * 0.333334 /* binary -> octal */
					 )
			  + 1 /* turn floor into ceil */
			  + 1; /* account for leading sign */
		      else
# endif
		      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
			tmp_length =
			  (unsigned int) (sizeof (unsigned long) * CHAR_BIT
					  * 0.333334 /* binary -> octal */
					 )
			  + 1 /* turn floor into ceil */
			  + 1; /* account for leading sign */
		      else
			tmp_length =
			  (unsigned int) (sizeof (unsigned int) * CHAR_BIT
					  * 0.333334 /* binary -> octal */
					 )
			  + 1 /* turn floor into ceil */
			  + 1; /* account for leading sign */
		      break;

		    case 'x': case 'X':
# ifdef HAVE_LONG_LONG
		      if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
			tmp_length =
			  (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
					  * 0.25 /* binary -> hexadecimal */
					 )
			  + 1 /* turn floor into ceil */
			  + 2; /* account for leading sign or alternate form */
		      else
# endif
		      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
			tmp_length =
			  (unsigned int) (sizeof (unsigned long) * CHAR_BIT
					  * 0.25 /* binary -> hexadecimal */
					 )
			  + 1 /* turn floor into ceil */
			  + 2; /* account for leading sign or alternate form */
		      else
			tmp_length =
			  (unsigned int) (sizeof (unsigned int) * CHAR_BIT
					  * 0.25 /* binary -> hexadecimal */
					 )
			  + 1 /* turn floor into ceil */
			  + 2; /* account for leading sign or alternate form */
		      break;

		    case 'f': case 'F':
# ifdef HAVE_LONG_DOUBLE
		      if (type == TYPE_LONGDOUBLE)
			tmp_length =
			  (unsigned int) (LDBL_MAX_EXP
					  * 0.30103 /* binary -> decimal */
					  * 2 /* estimate for FLAG_GROUP */
					 )
			  + 1 /* turn floor into ceil */
			  + 10; /* sign, decimal point etc. */
		      else
# endif
			tmp_length =
			  (unsigned int) (DBL_MAX_EXP
					  * 0.30103 /* binary -> decimal */
					  * 2 /* estimate for FLAG_GROUP */
					 )
			  + 1 /* turn floor into ceil */
			  + 10; /* sign, decimal point etc. */
		      tmp_length = xsum (tmp_length, precision);
		      break;

		    case 'e': case 'E': case 'g': case 'G':
		    case 'a': case 'A':
		      tmp_length =
			12; /* sign, decimal point, exponent etc. */
		      tmp_length = xsum (tmp_length, precision);
		      break;

		    case 'c':
# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION
		      if (type == TYPE_WIDE_CHAR)
			tmp_length = MB_CUR_MAX;
		      else
# endif
			tmp_length = 1;
		      break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美刺激午夜性久久久久久久| 日本 国产 欧美色综合| 国产精品亚洲午夜一区二区三区 | 九一久久久久久| 在线成人免费视频| 午夜精品爽啪视频| 制服视频三区第一页精品| 亚洲影视资源网| 欧美精品在线一区二区三区| 一区二区三区在线免费观看| 色婷婷av一区二区三区大白胸| 国产精品久久免费看| youjizz国产精品| 一二三四社区欧美黄| 欧美肥胖老妇做爰| 捆绑变态av一区二区三区| 欧美成人一区二区三区在线观看 | 99九九99九九九视频精品| 中文字幕乱码久久午夜不卡| 丁香婷婷综合五月| 亚洲国产精品综合小说图片区| 91精品在线一区二区| 国产在线播放一区| 亚洲精品一二三区| 精品国产污网站| 日本电影亚洲天堂一区| 日韩精品1区2区3区| 国产精品水嫩水嫩| 欧美美女一区二区在线观看| 国产一区二区三区综合| 亚洲自拍偷拍网站| 国产精品国产自产拍在线| 欧美日韩一级二级| 91网站在线观看视频| 老司机精品视频导航| 亚洲一二三区视频在线观看| 久久蜜桃香蕉精品一区二区三区| 色噜噜狠狠色综合欧洲selulu| 奇米影视7777精品一区二区| 一区二区在线观看视频在线观看| 精品国产制服丝袜高跟| 欧美色手机在线观看| 91色在线porny| 国产福利91精品一区| 国产九色sp调教91| 免费成人av在线| 亚洲va欧美va国产va天堂影院| 欧美国产日韩亚洲一区| 亚洲精品在线免费观看视频| 91精品国产综合久久久久久| 在线观看日韩高清av| 99久久伊人久久99| 成人午夜大片免费观看| 福利一区二区在线观看| 成人黄色在线视频| www.色精品| 欧美三级电影在线观看| 欧美欧美欧美欧美| 日韩一级片在线观看| 精品播放一区二区| 日本一区二区三区视频视频| 中文字幕成人网| 亚洲另类中文字| 亚洲第一在线综合网站| 日本一区二区三区dvd视频在线| 欧美大白屁股肥臀xxxxxx| 欧美另类一区二区三区| 337p亚洲精品色噜噜狠狠| 欧美探花视频资源| 国产成人亚洲综合a∨猫咪| 99久久综合99久久综合网站| 日本高清成人免费播放| 欧美日韩你懂得| 久久久91精品国产一区二区三区| 中文字幕免费一区| 日韩在线卡一卡二| gogogo免费视频观看亚洲一| 一本色道久久综合亚洲aⅴ蜜桃 | 亚洲欧美一区二区不卡| 日韩精品亚洲专区| 不卡av免费在线观看| 欧美一级片在线观看| 国产精品久久久久一区二区三区| 亚洲国产精品尤物yw在线观看| 极品尤物av久久免费看| 欧美视频一二三区| 欧美激情中文不卡| 国产福利不卡视频| 精品国产麻豆免费人成网站| 亚洲国产成人高清精品| 97超碰欧美中文字幕| 国产网红主播福利一区二区| 日本v片在线高清不卡在线观看| 99久久国产综合精品麻豆| 2017欧美狠狠色| 久久激情五月婷婷| 精品人伦一区二区色婷婷| 免费日韩伦理电影| 日韩一区二区三区三四区视频在线观看 | 亚洲一区二区三区四区五区黄| 国产成人在线色| 久久欧美一区二区| 国产美女精品人人做人人爽| 欧美一级片在线观看| 久久精品国产一区二区三| 欧美日韩夫妻久久| 久久99久久精品| 精品对白一区国产伦| 成人理论电影网| 一区二区欧美视频| 欧美精选一区二区| 国产麻豆精品在线观看| 久久久www成人免费毛片麻豆| 国产a精品视频| 一个色妞综合视频在线观看| 7777女厕盗摄久久久| 国产在线精品不卡| 最新欧美精品一区二区三区| 色94色欧美sute亚洲13| 日本亚洲电影天堂| 国产亚洲综合色| 欧美日韩在线观看一区二区| 久久综合综合久久综合| 国产精品三级电影| 日韩精品在线网站| 欧美性videosxxxxx| 国产伦精一区二区三区| 亚洲国产日韩精品| 中文字幕av一区二区三区| 欧美日韩在线播| 99国产精品久久久| 国产精品一区在线| 日韩黄色小视频| 亚洲夂夂婷婷色拍ww47| 久久久噜噜噜久噜久久综合| 色噜噜狠狠成人网p站| 国产精品一区二区免费不卡| 午夜激情久久久| 亚洲另类中文字| 欧美—级在线免费片| www国产精品av| 91精品国产免费久久综合| 欧美视频在线一区| 91丨porny丨最新| 91蝌蚪porny九色| 99久久国产综合精品色伊| 成人国产一区二区三区精品| 久久国产精品第一页| 久久精品国产亚洲一区二区三区| 亚洲一区av在线| 亚洲福利一二三区| 日韩福利电影在线观看| 国产精品美日韩| 国产精品家庭影院| 亚洲欧美电影一区二区| 一区二区三区国产精品| 亚洲成人资源网| 美日韩一区二区| 国产精品一二二区| 99精品欧美一区| 91精品国产综合久久国产大片| 欧美在线免费播放| 精品国产髙清在线看国产毛片| 337p粉嫩大胆色噜噜噜噜亚洲| 久久精品视频在线看| 中文字幕一区二区三区色视频 | 亚洲欧洲日韩av| 一区二区三区不卡在线观看| 天天操天天综合网| 高清成人免费视频| 在线播放欧美女士性生活| 精品精品国产高清a毛片牛牛| 中文字幕制服丝袜成人av| 夜夜爽夜夜爽精品视频| 亚洲一二三四在线观看| 国产一区二区三区精品欧美日韩一区二区三区 | 丁香六月久久综合狠狠色| 欧洲精品在线观看| 久久久久久久久久久久电影| 一区二区视频免费在线观看| 激情综合一区二区三区| 欧美午夜精品一区二区三区| 国产日韩精品视频一区| 日本亚洲免费观看| 欧美丝袜丝交足nylons| 国产精品久久久久aaaa| 日韩专区欧美专区| 欧美唯美清纯偷拍| 亚洲综合色噜噜狠狠| 99r国产精品| 国产精品久久久久久久久快鸭| 麻豆视频一区二区| 欧美日本一区二区三区四区| 国产精品不卡在线| 成人av中文字幕| 国产精品毛片久久久久久| 国产69精品久久99不卡| 久久青草国产手机看片福利盒子 | 亚洲欧美日韩国产中文在线| 国产99久久久久|