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

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

?? snprintf.c

?? android-w.song.android.widget
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* snprintf - formatted output to strings, with bounds checking and allocation *//* build a test version with   gcc -g -DDRIVER -I../.. -I../../include -o test-snprintf snprintf.c fmtu*long.o*/ /*   Unix snprintf implementation.   derived from inetutils/libinetutils/snprintf.c Version 1.1   Copyright (C) 2001,2006,2010 Free Software Foundation, Inc.   This file is part of GNU Bash, the Bourne Again SHell.   Bash 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 of the License, or   (at your option) any later version.   Bash 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 Bash.  If not, see <http://www.gnu.org/licenses/>.      Revision History:   1.1:      *  added changes from Miles Bader      *  corrected a bug with %f      *  added support for %#g      *  added more comments :-)   1.0:      *  supporting must ANSI syntaxic_sugars   0.0:      *  support %s %c %d THANKS(for the patches and ideas):     Miles Bader     Cyrille Rustom     Jacek Slabocewiz     Mike Parker(mouse)*//* * Currently doesn't handle (and bash/readline doesn't use): *	* *M$ width, precision specifications *	* %N$ numbered argument conversions *	* inf, nan floating values imperfect (if isinf(), isnan() not in libc) *	* support for `F' is imperfect with ldfallback(), since underlying *	  printf may not handle it -- should ideally have another autoconf test */#define FLOATING_POINT#ifdef HAVE_CONFIG_H#  include <config.h>#endif/* GCC 4.2 on Snow Leopard doesn't like the snprintf prototype */#if defined(DEBUG) && !defined (MACOSX)#  undef HAVE_SNPRINTF#  undef HAVE_ASPRINTF#  define HAVE_SNPRINTF 0#  define HAVE_ASPRINTF 0#endif#if defined(DRIVER) && !defined(HAVE_CONFIG_H)#define HAVE_LONG_LONG#define HAVE_LONG_DOUBLE#ifdef __linux__#define HAVE_PRINTF_A_FORMAT#endif#define HAVE_ISINF_IN_LIBC#define HAVE_ISNAN_IN_LIBC#define PREFER_STDARG#define HAVE_STRINGIZE#define HAVE_LIMITS_H#define HAVE_STDDEF_H#define HAVE_LOCALE_H#define intmax_t long#endif#if !HAVE_SNPRINTF || !HAVE_ASPRINTF#include <bashtypes.h>#if defined(PREFER_STDARG)#  include <stdarg.h>#else#  include <varargs.h>#endif#ifdef HAVE_LIMITS_H#  include <limits.h>#endif#include <bashansi.h>#ifdef HAVE_STDDEF_H#  include <stddef.h>#endif#include <chartypes.h>#ifdef HAVE_STDINT_H#  include <stdint.h>#endif#ifdef FLOATING_POINT#  include <float.h>	/* for manifest constants */#  include <stdio.h>	/* for sprintf */#endif#include <typemax.h>#ifdef HAVE_LOCALE_H#  include <locale.h>#endif#include "stdc.h"#include <shmbutil.h>#ifndef DRIVER#  include "shell.h"#else#  define FL_PREFIX     0x01    /* add 0x, 0X, or 0 prefix as appropriate */#  define FL_ADDBASE    0x02    /* add base# prefix to converted value */#  define FL_HEXUPPER   0x04    /* use uppercase when converting to hex */#  define FL_UNSIGNED   0x08    /* don't add any sign */extern char *fmtulong __P((unsigned long int, int, char *, size_t, int));extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int));#endif#ifndef FREE#  define FREE(x)	if (x) free (x)#endif/* Bound on length of the string representing an integer value of type T.   Subtract one for the sign bit if T is signed;   302 / 1000 is log10 (2) rounded up;   add one for integer division truncation;   add one more for a minus sign if t is signed.  */#define INT_STRLEN_BOUND(t) \  ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \     + 1 + TYPE_SIGNED (t))/* conversion flags */#define PF_ALTFORM	0x00001		/* # */#define PF_HEXPREFIX	0x00002		/* 0[Xx] */#define PF_LADJUST	0x00004		/* - */#define PF_ZEROPAD	0x00008		/* 0 */#define PF_PLUS		0x00010		/* + */#define PF_SPACE	0x00020		/* ' ' */#define PF_THOUSANDS	0x00040		/* ' */#define PF_DOT		0x00080		/* `.precision' */#define PF_STAR_P	0x00100		/* `*' after precision */#define PF_STAR_W	0x00200		/* `*' before or without precision *//* length modifiers */#define PF_SIGNEDCHAR	0x00400		/* hh */#define PF_SHORTINT	0x00800		/* h */#define PF_LONGINT	0x01000		/* l */#define PF_LONGLONG	0x02000		/* ll */#define PF_LONGDBL	0x04000		/* L */#define PF_INTMAX_T	0x08000		/* j */#define PF_SIZE_T	0x10000		/* z */#define PF_PTRDIFF_T	0x20000		/* t */#define PF_ALLOCBUF	0x40000		/* for asprintf, vasprintf */#define PFM_SN		0x01		/* snprintf, vsnprintf */#define PFM_AS		0x02		/* asprintf, vasprintf */#define ASBUFSIZE	128#define x_digs	"0123456789abcdef"#define X_digs	"0123456789ABCDEF"static char intbuf[INT_STRLEN_BOUND(unsigned long) + 1];static int decpoint;static int thoussep;static char *grouping;/*  * For the FLOATING POINT FORMAT : *  the challenge was finding a way to *  manipulate the Real numbers without having *  to resort to mathematical function(it *  would require to link with -lm) and not *  going down to the bit pattern(not portable) * *  so a number, a real is:      real = integral + fraction      integral = ... + a(2)*10^2 + a(1)*10^1 + a(0)*10^0      fraction = b(1)*10^-1 + b(2)*10^-2 + ...      where:       0 <= a(i) => 9        0 <= b(i) => 9      from then it was simple math *//* * size of the buffer for the integral part * and the fraction part  */#define MAX_INT  99 + 1 /* 1 for the null */#define MAX_FRACT 307 + 1/*  * These functions use static buffers to store the results, * and so are not reentrant */#define itoa(n) fmtulong(n, 10, intbuf, sizeof(intbuf), 0);#define dtoa(n, p, f) numtoa(n, 10, p, f)#define SWAP_INT(a,b) {int t; t = (a); (a) = (b); (b) = t;}#define GETARG(type)	(va_arg(args, type))/* Macros that do proper sign extension and handle length modifiers.  Used   for the integer conversion specifiers. */#define GETSIGNED(p) \  (((p)->flags & PF_LONGINT) \	? GETARG (long) \  	: (((p)->flags & PF_SHORTINT) ? (long)(short)GETARG (int) \				      : (long)GETARG (int)))#define GETUNSIGNED(p) \  (((p)->flags & PF_LONGINT) \	? GETARG (unsigned long) \	: (((p)->flags & PF_SHORTINT) ? (unsigned long)(unsigned short)GETARG (int) \				      : (unsigned long)GETARG (unsigned int)))#ifdef HAVE_LONG_DOUBLE#define GETLDOUBLE(p) GETARG (long double)#endif#define GETDOUBLE(p) GETARG (double)#define SET_SIZE_FLAGS(p, type) \  if (sizeof (type) > sizeof (int)) \    (p)->flags |= PF_LONGINT; \  if (sizeof (type) > sizeof (long)) \    (p)->flags |= PF_LONGLONG;/* this struct holds everything we need */struct DATA{  int length;  char *base;		/* needed for [v]asprintf */  char *holder;  int counter;  const char *pf;/* FLAGS */  int flags;  int justify;  int width, precision;  char pad;};/* the floating point stuff */#ifdef FLOATING_POINTstatic double pow_10 __P((int));static int log_10 __P((double));static double integral __P((double, double *));static char *numtoa __P((double, int, int, char **));#endifstatic void init_data __P((struct DATA *, char *, size_t, const char *, int));static void init_conv_flag __P((struct DATA *));/* for the format */#ifdef FLOATING_POINTstatic void floating __P((struct DATA *, double));static void exponent __P((struct DATA *, double));#endifstatic void number __P((struct DATA *, unsigned long, int));#ifdef HAVE_LONG_LONGstatic void lnumber __P((struct DATA *, unsigned long long, int));#endifstatic void pointer __P((struct DATA *, unsigned long));static void strings __P((struct DATA *, char *));#ifdef FLOATING_POINT#  define FALLBACK_FMTSIZE	32#  define FALLBACK_BASE		4096#  define LFALLBACK_BASE	5120#  ifdef HAVE_LONG_DOUBLEstatic void ldfallback __P((struct DATA *, const char *, const char *, long double));#  endifstatic void dfallback __P((struct DATA *, const char *, const char *, double));#endifstatic char *groupnum __P((char *));#ifndef HAVE_ISINF_IN_LIBCstatic int isinf __P((double));#endif#ifndef HAVE_ISNAN_IN_LIBCstatic int isnan __P((double));#endif#ifdef DRIVERstatic void memory_error_and_abort ();static void *xmalloc __P((size_t));static void *xrealloc __P((void *, size_t));static void xfree __P((void *));#else#  include <xmalloc.h>#endif/* those are defines specific to snprintf to hopefully * make the code clearer :-) */#define RIGHT 1#define LEFT  0#define NOT_FOUND -1#define FOUND 1#define MAX_FIELD 15/* round off to the precision */#define ROUND(d, p) \	    (d < 0.) ? \	     d - pow_10(-(p)->precision) * 0.5 : \	     d + pow_10(-(p)->precision) * 0.5/* set default precision */#define DEF_PREC(p) \	    if ((p)->precision == NOT_FOUND) \	      (p)->precision = 6/* put a char.  increment the number of chars written even if we've exceeded   the vsnprintf/snprintf buffer size (for the return value) */#define PUT_CHAR(c, p) \	do \	  { \	    if (((p)->flags & PF_ALLOCBUF) && ((p)->counter >= (p)->length - 1)) \	      { \		(p)->length += ASBUFSIZE; \		(p)->base = (char *)xrealloc((p)->base, (p)->length); \		(p)->holder = (p)->base + (p)->counter; /* in case reallocated */ \	      } \	    if ((p)->counter < (p)->length) \	      *(p)->holder++ = (c); \	    (p)->counter++; \	  } \	while (0)/* Output a string.  P->WIDTH has already been adjusted for padding. */#define PUT_STRING(string, len, p) \	do \	  { \	    PAD_RIGHT (p); \	    while ((len)-- > 0) \	      { \		PUT_CHAR (*(string), (p)); \		(string)++; \	      } \	    PAD_LEFT (p); \	  } \	while (0)#define PUT_PLUS(d, p, zero) \	    if ((d) > zero && (p)->justify == RIGHT) \	      PUT_CHAR('+', p)#define PUT_SPACE(d, p, zero) \	    if (((p)->flags & PF_SPACE) && (d) > zero) \	      PUT_CHAR(' ', p)/* pad right */ #define PAD_RIGHT(p) \	    if ((p)->width > 0 && (p)->justify != LEFT) \	      for (; (p)->width > 0; (p)->width--) \		 PUT_CHAR((p)->pad, p)/* pad left */#define PAD_LEFT(p) \	    if ((p)->width > 0 && (p)->justify == LEFT) \	      for (; (p)->width > 0; (p)->width--) \		 PUT_CHAR((p)->pad, p)/* pad with zeros from decimal precision */#define PAD_ZERO(p) \	if ((p)->precision > 0) \	  for (; (p)->precision > 0; (p)->precision--) \	    PUT_CHAR('0', p)/* if width and prec. in the args */#define STAR_ARGS(p) \	do { \	    if ((p)->flags & PF_STAR_W) \	      { \		(p)->width = GETARG (int); \		if ((p)->width < 0) \		  { \		    (p)->flags |= PF_LADJUST; \		    (p)->justify = LEFT; \		    (p)->width = -(p)->width; \		  } \	      } \	    if ((p)->flags & PF_STAR_P) \	      { \		(p)->precision = GETARG (int); \		if ((p)->precision < 0) \		  { \		    (p)->flags &= ~PF_STAR_P; \		    (p)->precision = NOT_FOUND; \		  } \	      } \	} while (0)#if defined (HAVE_LOCALE_H) && defined (HAVE_LOCALECONV)#  define GETLOCALEDATA(d, t, g) \      do \	{ \	  struct lconv *lv; \	  if ((d) == 0) { \	  (d) = '.'; (t) = -1; (g) = 0; /* defaults */ \	  lv = localeconv(); \	  if (lv) \	    { \	      if (lv->decimal_point && lv->decimal_point[0]) \	        (d) = lv->decimal_point[0]; \	      if (lv->thousands_sep && lv->thousands_sep[0]) \	        (t) = lv->thousands_sep[0]; \	      (g) = lv->grouping ? lv->grouping : ""; \	      if (*(g) == '\0' || *(g) == CHAR_MAX || (t) == -1) (g) = 0; \	    } \	  } \	} \      while (0);#else#  define GETLOCALEDATA(d, t, g) \      ( (d) = '.', (t) = ',', g = "\003" )#endif#ifdef FLOATING_POINT/* * Find the nth power of 10 */static doublepow_10(n)     int n;{   double P;  /* handle common cases with fast switch statement. */  switch (n)    {    case -3:	return .001;    case -2:	return .01;    case -1:	return .1;    case 0:	return 1.;    case 1:	return 10.;    case 2:	return 100.;    case 3:	return 1000.;    }  if (n < 0)    {      P = .0001;      for (n += 4; n < 0; n++)	P /= 10.;    }  else    {      P = 10000.;      for (n -= 4; n > 0; n--)	P *= 10.;    }  return P;}/* * Find the integral part of the log in base 10  * Note: this not a real log10()	 I just need and approximation(integerpart) of x in:	  10^x ~= r * log_10(200) = 2; * log_10(250) = 2; * * NOTE: do not call this with r == 0 -- an infinite loop results. */static intlog_10(r)     double r;{   int i = 0;  double result = 1.;  if (r < 0.)    r = -r;  if (r < 1.)    {      while (result >= r)	{	  result /= 10.;	  i++;	}      return (-i);    }  else    {      while (result <= r)	{	  result *= 10.;	  i++;	}      return (i - 1);    }}/* * This function return the fraction part of a double * and set in ip the integral part. * In many ways it resemble the modf() found on most Un*x */static doubleintegral(real, ip)     double real;     double *ip;{   int j;  double i, s, p;  double real_integral = 0.;  /* take care of the obvious */  /* equal to zero ? */  if (real == 0.)    {      *ip = 0.;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品国产| 精品一区二区影视| 蜜桃91丨九色丨蝌蚪91桃色| 风间由美性色一区二区三区| 欧美三日本三级三级在线播放| 久久精品在这里| 丝袜亚洲另类欧美| 一本久久a久久精品亚洲| 久久综合视频网| 日韩激情av在线| 欧美在线视频不卡| 国产精品久久久久9999吃药| 韩日精品视频一区| 日韩视频一区二区三区在线播放| 亚洲综合999| 一本大道久久a久久精品综合 | 色偷偷一区二区三区| 91蜜桃网址入口| 色偷偷一区二区三区| 久久精品夜色噜噜亚洲a∨| 七七婷婷婷婷精品国产| 欧美性xxxxx极品少妇| 中文字幕一区不卡| 波波电影院一区二区三区| 久久久久久久久一| 国产剧情在线观看一区二区| 精品国产123| 老司机免费视频一区二区三区| 欧美欧美欧美欧美| 午夜精品久久久久久久99樱桃| 色域天天综合网| 一区二区三区精品| 色视频欧美一区二区三区| 日韩美女视频19| 色香蕉久久蜜桃| 亚洲6080在线| 欧美一区二区观看视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美日韩国产综合视频在线观看| 亚洲国产精品久久艾草纯爱| 在线播放亚洲一区| 另类小说欧美激情| 国产日韩成人精品| 91在线免费看| 亚洲一区二区三区激情| 91麻豆精品91久久久久久清纯| 美女任你摸久久| 久久人人爽人人爽| 波多野结衣精品在线| 亚洲日本青草视频在线怡红院| 97se亚洲国产综合自在线观| 亚洲一区二区欧美| 欧美一区二区女人| 国产a久久麻豆| 曰韩精品一区二区| 日韩欧美视频一区| 国产aⅴ精品一区二区三区色成熟| 国产精品国产三级国产aⅴ入口 | 972aa.com艺术欧美| 亚洲精品高清在线| 欧美一级专区免费大片| 成人妖精视频yjsp地址| 伊人色综合久久天天人手人婷| 777欧美精品| 狠狠色狠狠色综合日日91app| 国产精品久久久久久久午夜片| 91福利国产成人精品照片| 老司机午夜精品99久久| 国产精品你懂的在线欣赏| 成人99免费视频| 亚洲美女视频在线观看| 日韩一区二区三| 99re热这里只有精品视频| 亚洲成人资源在线| 国产欧美视频在线观看| 欧美高清精品3d| 99国产精品久久久久久久久久| 天天做天天摸天天爽国产一区| 欧美国产综合一区二区| 欧美片在线播放| 不卡视频一二三四| 免费视频最近日韩| 一区二区三区免费网站| 久久午夜国产精品| 欧美一区二区久久久| 色老汉av一区二区三区| 国产成a人亚洲精品| 婷婷成人激情在线网| 亚洲三级在线观看| 日韩免费看网站| 亚洲欧美自拍偷拍色图| 91麻豆精品国产综合久久久久久| 粉嫩13p一区二区三区| 蜜臀av国产精品久久久久| 伊人性伊人情综合网| 国产精品嫩草影院av蜜臀| 亚洲精品一区二区三区99| 欧美精品在线一区二区三区| 色婷婷av一区二区| 成人av高清在线| 国产麻豆精品在线| 麻豆国产欧美日韩综合精品二区| 亚洲午夜羞羞片| 亚洲乱码中文字幕综合| 国产精品动漫网站| 国产精品久久看| 国产精品麻豆欧美日韩ww| 国产欧美一区二区三区沐欲| 欧美精品一区二区久久久| 欧美一区二区三区思思人| 欧美二区乱c少妇| 欧美日韩日日骚| 欧美日韩精品一区二区三区| 91国在线观看| 欧美变态口味重另类| 欧美三级一区二区| 欧美在线视频你懂得| 欧美唯美清纯偷拍| 欧美日韩亚洲综合一区二区三区| 在线亚洲欧美专区二区| 色综合av在线| 欧美日韩免费高清一区色橹橹| 91福利资源站| 欧美色综合影院| 在线成人免费视频| 日韩一级高清毛片| 亚洲精品免费在线播放| 亚洲综合久久久| 日韩高清在线一区| 狠狠色丁香婷婷综合久久片| 国产成人在线观看| a亚洲天堂av| 欧美日韩亚洲综合| 欧美大片国产精品| 国产欧美一区二区精品忘忧草| 中文字幕在线视频一区| 一区二区在线观看不卡| 日韩高清不卡一区| 亚洲h在线观看| xfplay精品久久| 国产欧美精品日韩区二区麻豆天美 | 国产精品1区2区3区在线观看| 国产白丝精品91爽爽久久 | 精品视频999| 日韩欧美国产综合一区| 国产欧美久久久精品影院| 亚洲精品高清在线| 久久精工是国产品牌吗| 大白屁股一区二区视频| 在线观看av一区二区| 欧美一级二级三级乱码| 国产精品青草综合久久久久99| 亚洲美女屁股眼交| 久久99久久久欧美国产| 99久久精品久久久久久清纯| 日韩美女精品在线| 免费成人性网站| 色综合中文字幕国产 | 国产伦精品一区二区三区免费迷 | 国产精品热久久久久夜色精品三区| 亚洲欧美日韩久久精品| 久久精品国产一区二区三区免费看| 成人激情小说乱人伦| 欧美一区二区三区婷婷月色 | 久久精品人人做人人爽人人| 一区二区三区.www| 国精产品一区一区三区mba桃花 | 亚洲综合免费观看高清在线观看| 国产一区视频网站| 欧美男女性生活在线直播观看| 国产女主播一区| 日韩国产高清影视| 在线精品视频免费观看| 中文在线一区二区| 精品一区二区三区欧美| 久久亚洲欧美国产精品乐播| 国产精品1区2区| 欧美精品黑人性xxxx| 欧美国产精品一区| 激情小说亚洲一区| 欧美一区二区在线播放| 一区二区三区在线免费播放| 成人h精品动漫一区二区三区| 精品国产麻豆免费人成网站| 日韩综合小视频| 欧美午夜宅男影院| 一区二区三区四区精品在线视频| 成人午夜视频网站| 久久精品人人做| 国产精品一线二线三线精华| 日韩天堂在线观看| 奇米影视一区二区三区小说| 欧美三级乱人伦电影| 亚洲一二三区不卡| 欧美在线一区二区三区| 亚洲国产一区视频| 欧美美女一区二区| 天堂蜜桃91精品| 日韩午夜电影在线观看| 久久精品国产在热久久|