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

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

?? printf.c

?? sqlite庫
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** The "printf" code that follows dates from the 1980's.  It is in** the public domain.  The original comments are included here for** completeness.  They are very out-of-date but might be useful as** an historical reference.  Most of the "enhancements" have been backed** out so that the functionality is now the same as standard printf().******************************************************************************** The following modules is an enhanced replacement for the "printf" subroutines** found in the standard C library.  The following enhancements are** supported:****      +  Additional functions.  The standard set of "printf" functions**         includes printf, fprintf, sprintf, vprintf, vfprintf, and**         vsprintf.  This module adds the following:****           *  snprintf -- Works like sprintf, but has an extra argument**                          which is the size of the buffer written to.****           *  mprintf --  Similar to sprintf.  Writes output to memory**                          obtained from malloc.****           *  xprintf --  Calls a function to dispose of output.****           *  nprintf --  No output, but returns the number of characters**                          that would have been output by printf.****           *  A v- version (ex: vsnprintf) of every function is also**              supplied.****      +  A few extensions to the formatting notation are supported:****           *  The "=" flag (similar to "-") causes the output to be**              be centered in the appropriately sized field.****           *  The %b field outputs an integer in binary notation.****           *  The %c field now accepts a precision.  The character output**              is repeated by the number of times the precision specifies.****           *  The %' field works like %c, but takes as its character the**              next character of the format string, instead of the next**              argument.  For example,  printf("%.78'-")  prints 78 minus**              signs, the same as  printf("%.78c",'-').****      +  When compiled using GCC on a SPARC, this version of printf is**         faster than the library printf for SUN OS 4.1.****      +  All functions are fully reentrant.***/#include "sqliteInt.h"/*** Conversion types fall into various categories as defined by the** following enumeration.*/#define etRADIX       1 /* Integer types.  %d, %x, %o, and so forth */#define etFLOAT       2 /* Floating point.  %f */#define etEXP         3 /* Exponentional notation. %e and %E */#define etGENERIC     4 /* Floating or exponential, depending on exponent. %g */#define etSIZE        5 /* Return number of characters processed so far. %n */#define etSTRING      6 /* Strings. %s */#define etDYNSTRING   7 /* Dynamically allocated strings. %z */#define etPERCENT     8 /* Percent symbol. %% */#define etCHARX       9 /* Characters. %c *//* The rest are extensions, not normally found in printf() */#define etCHARLIT    10 /* Literal characters.  %' */#define etSQLESCAPE  11 /* Strings with '\'' doubled.  %q */#define etSQLESCAPE2 12 /* Strings with '\'' doubled and enclosed in '',                          NULL pointers replaced by SQL NULL.  %Q */#define etTOKEN      13 /* a pointer to a Token structure */#define etSRCLIST    14 /* a pointer to a SrcList */#define etPOINTER    15 /* The %p conversion *//*** An "etByte" is an 8-bit unsigned value.*/typedef unsigned char etByte;/*** Each builtin conversion character (ex: the 'd' in "%d") is described** by an instance of the following structure*/typedef struct et_info {   /* Information about each format field */  char fmttype;            /* The format field code letter */  etByte base;             /* The base for radix conversion */  etByte flags;            /* One or more of FLAG_ constants below */  etByte type;             /* Conversion paradigm */  etByte charset;          /* Offset into aDigits[] of the digits string */  etByte prefix;           /* Offset into aPrefix[] of the prefix string */} et_info;/*** Allowed values for et_info.flags*/#define FLAG_SIGNED  1     /* True if the value to convert is signed */#define FLAG_INTERN  2     /* True if for internal use only */#define FLAG_STRING  4     /* Allow infinity precision *//*** The following table is searched linearly, so it is good to put the** most frequently used conversion types first.*/static const char aDigits[] = "0123456789ABCDEF0123456789abcdef";static const char aPrefix[] = "-x0\000X0";static const et_info fmtinfo[] = {  {  'd', 10, 1, etRADIX,      0,  0 },  {  's',  0, 4, etSTRING,     0,  0 },  {  'g',  0, 1, etGENERIC,    30, 0 },  {  'z',  0, 6, etDYNSTRING,  0,  0 },  {  'q',  0, 4, etSQLESCAPE,  0,  0 },  {  'Q',  0, 4, etSQLESCAPE2, 0,  0 },  {  'c',  0, 0, etCHARX,      0,  0 },  {  'o',  8, 0, etRADIX,      0,  2 },  {  'u', 10, 0, etRADIX,      0,  0 },  {  'x', 16, 0, etRADIX,      16, 1 },  {  'X', 16, 0, etRADIX,      0,  4 },#ifndef SQLITE_OMIT_FLOATING_POINT  {  'f',  0, 1, etFLOAT,      0,  0 },  {  'e',  0, 1, etEXP,        30, 0 },  {  'E',  0, 1, etEXP,        14, 0 },  {  'G',  0, 1, etGENERIC,    14, 0 },#endif  {  'i', 10, 1, etRADIX,      0,  0 },  {  'n',  0, 0, etSIZE,       0,  0 },  {  '%',  0, 0, etPERCENT,    0,  0 },  {  'p', 16, 0, etPOINTER,    0,  1 },  {  'T',  0, 2, etTOKEN,      0,  0 },  {  'S',  0, 2, etSRCLIST,    0,  0 },};#define etNINFO  (sizeof(fmtinfo)/sizeof(fmtinfo[0]))/*** If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point** conversions will work.*/#ifndef SQLITE_OMIT_FLOATING_POINT/*** "*val" is a double such that 0.1 <= *val < 10.0** Return the ascii code for the leading digit of *val, then** multiply "*val" by 10.0 to renormalize.**** Example:**     input:     *val = 3.14159**     output:    *val = 1.4159    function return = '3'**** The counter *cnt is incremented each time.  After counter exceeds** 16 (the number of significant digits in a 64-bit float) '0' is** always returned.*/static int et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){  int digit;  LONGDOUBLE_TYPE d;  if( (*cnt)++ >= 16 ) return '0';  digit = (int)*val;  d = digit;  digit += '0';  *val = (*val - d)*10.0;  return digit;}#endif /* SQLITE_OMIT_FLOATING_POINT *//*** On machines with a small stack size, you can redefine the** SQLITE_PRINT_BUF_SIZE to be less than 350.  But beware - for** smaller values some %f conversions may go into an infinite loop.*/#ifndef SQLITE_PRINT_BUF_SIZE# define SQLITE_PRINT_BUF_SIZE 350#endif#define etBUFSIZE SQLITE_PRINT_BUF_SIZE  /* Size of the output buffer *//*** The root program.  All variations call this core.**** INPUTS:**   func   This is a pointer to a function taking three arguments**            1. A pointer to anything.  Same as the "arg" parameter.**            2. A pointer to the list of characters to be output**               (Note, this list is NOT null terminated.)**            3. An integer number of characters to be output.**               (Note: This number might be zero.)****   arg    This is the pointer to anything which will be passed as the**          first argument to "func".  Use it for whatever you like.****   fmt    This is the format string, as in the usual print.****   ap     This is a pointer to a list of arguments.  Same as in**          vfprint.**** OUTPUTS:**          The return value is the total number of characters sent to**          the function "func".  Returns -1 on a error.**** Note that the order in which automatic variables are declared below** seems to make a big difference in determining how fast this beast** will run.*/static int vxprintf(  void (*func)(void*,const char*,int),     /* Consumer of text */  void *arg,                         /* First argument to the consumer */  int useExtended,                   /* Allow extended %-conversions */  const char *fmt,                   /* Format string */  va_list ap                         /* arguments */){  int c;                     /* Next character in the format string */  char *bufpt;               /* Pointer to the conversion buffer */  int precision;             /* Precision of the current field */  int length;                /* Length of the field */  int idx;                   /* A general purpose loop counter */  int count;                 /* Total number of characters output */  int width;                 /* Width of the current field */  etByte flag_leftjustify;   /* True if "-" flag is present */  etByte flag_plussign;      /* True if "+" flag is present */  etByte flag_blanksign;     /* True if " " flag is present */  etByte flag_alternateform; /* True if "#" flag is present */  etByte flag_altform2;      /* True if "!" flag is present */  etByte flag_zeropad;       /* True if field width constant starts with zero */  etByte flag_long;          /* True if "l" flag is present */  etByte flag_longlong;      /* True if the "ll" flag is present */  etByte done;               /* Loop termination flag */  sqlite_uint64 longvalue;   /* Value for integer types */  LONGDOUBLE_TYPE realvalue; /* Value for real types */  const et_info *infop;      /* Pointer to the appropriate info structure */  char buf[etBUFSIZE];       /* Conversion buffer */  char prefix;               /* Prefix character.  "+" or "-" or " " or '\0'. */  etByte errorflag = 0;      /* True if an error is encountered */  etByte xtype;              /* Conversion paradigm */  char *zExtra;              /* Extra memory used for etTCLESCAPE conversions */  static const char spaces[] =   "                                                                         ";#define etSPACESIZE (sizeof(spaces)-1)#ifndef SQLITE_OMIT_FLOATING_POINT  int  exp, e2;              /* exponent of real numbers */  double rounder;            /* Used for rounding floating point values */  etByte flag_dp;            /* True if decimal point should be shown */  etByte flag_rtz;           /* True if trailing zeros should be removed */  etByte flag_exp;           /* True to force display of the exponent */  int nsd;                   /* Number of significant digits returned */#endif  func(arg,"",0);  count = length = 0;  bufpt = 0;  for(; (c=(*fmt))!=0; ++fmt){    if( c!='%' ){      int amt;      bufpt = (char *)fmt;      amt = 1;      while( (c=(*++fmt))!='%' && c!=0 ) amt++;      (*func)(arg,bufpt,amt);      count += amt;      if( c==0 ) break;    }    if( (c=(*++fmt))==0 ){      errorflag = 1;      (*func)(arg,"%",1);      count++;      break;    }    /* Find out what flags are present */    flag_leftjustify = flag_plussign = flag_blanksign =      flag_alternateform = flag_altform2 = flag_zeropad = 0;    done = 0;    do{      switch( c ){        case '-':   flag_leftjustify = 1;     break;        case '+':   flag_plussign = 1;        break;        case ' ':   flag_blanksign = 1;       break;        case '#':   flag_alternateform = 1;   break;        case '!':   flag_altform2 = 1;        break;        case '0':   flag_zeropad = 1;         break;        default:    done = 1;                 break;      }    }while( !done && (c=(*++fmt))!=0 );    /* Get the field width */    width = 0;    if( c=='*' ){      width = va_arg(ap,int);      if( width<0 ){        flag_leftjustify = 1;        width = -width;      }      c = *++fmt;    }else{      while( c>='0' && c<='9' ){        width = width*10 + c - '0';        c = *++fmt;      }    }    if( width > etBUFSIZE-10 ){      width = etBUFSIZE-10;    }    /* Get the precision */    if( c=='.' ){      precision = 0;      c = *++fmt;      if( c=='*' ){        precision = va_arg(ap,int);        if( precision<0 ) precision = -precision;        c = *++fmt;      }else{        while( c>='0' && c<='9' ){          precision = precision*10 + c - '0';          c = *++fmt;        }      }    }else{      precision = -1;    }    /* Get the conversion type modifier */    if( c=='l' ){      flag_long = 1;      c = *++fmt;      if( c=='l' ){        flag_longlong = 1;        c = *++fmt;      }else{        flag_longlong = 0;      }    }else{      flag_long = flag_longlong = 0;    }    /* Fetch the info entry for the field */    infop = 0;    for(idx=0; idx<etNINFO; idx++){      if( c==fmtinfo[idx].fmttype ){        infop = &fmtinfo[idx];        if( useExtended || (infop->flags & FLAG_INTERN)==0 ){          xtype = infop->type;        }        break;      }    }    zExtra = 0;    if( infop==0 ){      return -1;    }    /* Limit the precision to prevent overflowing buf[] during conversion */    if( precision>etBUFSIZE-40 && (infop->flags & FLAG_STRING)==0 ){      precision = etBUFSIZE-40;    }    /*    ** At this point, variables are initialized as follows:    **    **   flag_alternateform          TRUE if a '#' is present.    **   flag_altform2               TRUE if a '!' is present.    **   flag_plussign               TRUE if a '+' is present.    **   flag_leftjustify            TRUE if a '-' is present or if the    **                               field width was negative.    **   flag_zeropad                TRUE if the width began with 0.    **   flag_long                   TRUE if the letter 'l' (ell) prefixed    **                               the conversion character.    **   flag_longlong               TRUE if the letter 'll' (ell ell) prefixed    **                               the conversion character.    **   flag_blanksign              TRUE if a ' ' is present.    **   width                       The specified field width.  This is    **                               always non-negative.  Zero is the default.    **   precision                   The specified precision.  The default    **                               is -1.    **   xtype                       The class of the conversion.    **   infop                       Pointer to the appropriate info struct.    */    switch( xtype ){      case etPOINTER:        flag_longlong = sizeof(char*)==sizeof(i64);        flag_long = sizeof(char*)==sizeof(long int);        /* Fall through into the next case */      case etRADIX:        if( infop->flags & FLAG_SIGNED ){          i64 v;          if( flag_longlong )   v = va_arg(ap,i64);          else if( flag_long )  v = va_arg(ap,long int);          else                  v = va_arg(ap,int);          if( v<0 ){            longvalue = -v;            prefix = '-';          }else{            longvalue = v;            if( flag_plussign )        prefix = '+';            else if( flag_blanksign )  prefix = ' ';            else                       prefix = 0;          }        }else{          if( flag_longlong )   longvalue = va_arg(ap,u64);          else if( flag_long )  longvalue = va_arg(ap,unsigned long int);          else                  longvalue = va_arg(ap,unsigned int);          prefix = 0;        }        if( longvalue==0 ) flag_alternateform = 0;        if( flag_zeropad && precision<width-(prefix!=0) ){          precision = width-(prefix!=0);        }        bufpt = &buf[etBUFSIZE-1];        {          register const char *cset;      /* Use registers for speed */          register int base;          cset = &aDigits[infop->charset];          base = infop->base;          do{                                           /* Convert to ascii */            *(--bufpt) = cset[longvalue%base];            longvalue = longvalue/base;          }while( longvalue>0 );        }        length = &buf[etBUFSIZE-1]-bufpt;        for(idx=precision-length; idx>0; idx--){          *(--bufpt) = '0';                             /* Zero pad */        }        if( prefix ) *(--bufpt) = prefix;               /* Add sign */        if( flag_alternateform && infop->prefix ){      /* Add "0" or "0x" */          const char *pre;          char x;          pre = &aPrefix[infop->prefix];          if( *bufpt!=pre[0] ){            for(; (x=(*pre))!=0; pre++) *(--bufpt) = x;          }        }        length = &buf[etBUFSIZE-1]-bufpt;        break;      case etFLOAT:      case etEXP:      case etGENERIC:        realvalue = va_arg(ap,double);#ifndef SQLITE_OMIT_FLOATING_POINT

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕日韩一区| jizzjizzjizz欧美| 色94色欧美sute亚洲线路二| 亚洲色图色小说| 色综合天天天天做夜夜夜夜做| 成人欧美一区二区三区在线播放| 91老司机福利 在线| 亚洲地区一二三色| 日韩欧美在线不卡| 处破女av一区二区| 一区二区三区在线播| 欧美精品丝袜久久久中文字幕| 免费观看在线色综合| 久久久综合精品| 91黄色激情网站| 欧美aaa在线| 中文一区一区三区高中清不卡| 99热99精品| 日本午夜一本久久久综合| 精品国产一区二区三区久久影院| 国产精品一二三| 亚洲精品国产一区二区精华液| 欧美猛男gaygay网站| 免费人成精品欧美精品| 久久综合狠狠综合久久综合88| 99视频热这里只有精品免费| 性做久久久久久久久| xnxx国产精品| 91美女在线看| 久久er99热精品一区二区| 国产精品久久久久桃色tv| 欧美高清hd18日本| 成人黄色小视频| 日本系列欧美系列| 亚洲国产精品黑人久久久| 欧美精品在线观看播放| 国产成人免费视频一区| 午夜精品久久久| 国产精品久久久久aaaa樱花| 欧美精品欧美精品系列| 波多野结衣91| 蜜臀av一区二区三区| 亚洲女爱视频在线| 久久毛片高清国产| 7878成人国产在线观看| 91亚洲资源网| 成人免费毛片嘿嘿连载视频| 亚洲va欧美va人人爽| 欧美激情一区三区| 欧美成人vps| 欧美在线综合视频| 成人午夜大片免费观看| 激情五月播播久久久精品| 一区二区三区美女| 国产精品水嫩水嫩| 久久综合色8888| 欧美一区二区三区视频免费播放 | 欧美日韩在线观看一区二区| 国产精品综合久久| 九色综合国产一区二区三区| 亚洲一卡二卡三卡四卡| 国产精品久久久久影院老司| 精品播放一区二区| 日韩欧美一级精品久久| 欧美日韩久久不卡| 91久久精品一区二区三| 91黄色免费网站| 99re这里只有精品首页| 国产激情精品久久久第一区二区 | 91久久久免费一区二区| 成人免费视频视频在线观看免费 | 亚洲精品高清在线| 国产精品高清亚洲| 国产精品三级视频| 中文字幕第一区二区| 亚洲精品在线网站| 欧美精品一区二区三区蜜桃| 日韩欧美亚洲国产另类| 日韩亚洲欧美综合| 日韩欧美久久久| 欧美一区二区不卡视频| 666欧美在线视频| 91麻豆精品国产自产在线观看一区| 欧美最猛性xxxxx直播| 色婷婷久久久久swag精品| 在线视频国内自拍亚洲视频| 色94色欧美sute亚洲13| 欧美男人的天堂一二区| 日韩一级免费一区| 日韩精品一区二区三区视频| 国产精品色一区二区三区| 久久久久久亚洲综合| 国产欧美1区2区3区| 国产精品对白交换视频| 亚洲精品免费在线播放| 亚洲第一激情av| 麻豆91免费观看| 国产成人在线视频网站| av色综合久久天堂av综合| 91激情五月电影| 日韩一区二区三区电影| 国产三级一区二区| 亚洲精选免费视频| 日韩福利电影在线| 国产精品中文字幕一区二区三区| 成人午夜激情影院| 欧美在线观看视频一区二区三区| 91精品国产91热久久久做人人| 精品日产卡一卡二卡麻豆| 中文字幕免费观看一区| 亚洲一区二区影院| 精品夜夜嗨av一区二区三区| 成人三级伦理片| 欧美日韩一级黄| 国产日韩亚洲欧美综合| 一区二区三区四区激情| 精品亚洲成a人在线观看| thepron国产精品| 91精品在线一区二区| 欧美激情一二三区| 日本aⅴ亚洲精品中文乱码| 粉嫩嫩av羞羞动漫久久久 | 欧美日韩精品免费观看视频| 精品国产三级电影在线观看| 国产精品久久久久久久久久免费看| 亚洲国产美国国产综合一区二区 | 粉嫩欧美一区二区三区高清影视 | 91精品婷婷国产综合久久 | 欧美精品一区二区三区蜜臀| 自拍偷拍欧美精品| 男人的j进女人的j一区| 91麻豆福利精品推荐| 久久久精品日韩欧美| 亚洲国产成人高清精品| 成人avav影音| 2014亚洲片线观看视频免费| 亚洲宅男天堂在线观看无病毒| 99这里只有久久精品视频| 精品动漫一区二区三区在线观看| 亚洲一二三四在线| 99精品视频一区二区三区| 精品国产伦一区二区三区免费| 亚洲一区国产视频| 国产精品一级在线| 欧美电影免费观看高清完整版在线| 亚洲视频网在线直播| 国产激情偷乱视频一区二区三区| 91精品国产乱码久久蜜臀| 亚洲欧美韩国综合色| 国产成人综合网| 日韩美女主播在线视频一区二区三区| 亚洲色图制服丝袜| 粉嫩蜜臀av国产精品网站| 欧美一级二级在线观看| 亚洲国产成人av网| 91福利在线看| 亚洲综合色成人| 色综合久久中文字幕| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 欧美自拍偷拍一区| 中文字幕在线不卡一区| 成人综合婷婷国产精品久久免费| 日韩一区二区精品葵司在线 | 理论片日本一区| 3d动漫精品啪啪一区二区竹菊| 一区二区三区电影在线播| 一本色道久久加勒比精品 | 亚洲成人一二三| 欧美色倩网站大全免费| 亚洲影院理伦片| 在线观看视频欧美| 亚洲r级在线视频| 欧美日本在线观看| 丝袜诱惑亚洲看片| 欧美一二区视频| 久久精品国产**网站演员| 日韩欧美精品在线| 国产精品正在播放| 成人欧美一区二区三区1314| 色综合久久中文综合久久97| 亚洲一区二区美女| 91精品欧美一区二区三区综合在 | www.色综合.com| 亚洲欧美视频在线观看视频| 欧美艳星brazzers| 老司机精品视频导航| 国产亚洲一区二区三区四区| 成人高清免费在线播放| 一区二区在线观看免费视频播放 | 日韩一区二区免费在线观看| 日本不卡一二三区黄网| 久久美女高清视频| 色婷婷国产精品综合在线观看| 亚洲成av人片在线| 日韩一级免费观看| 99在线精品视频| 日韩精品一二三四| 国产日本亚洲高清| 欧美美女直播网站| 精一区二区三区|