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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? shell.c

?? 嵌入式數(shù)據(jù)系統(tǒng)軟件!
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
/*** 2001 September 15**** The author disclaims copyright to this source code.  In place of** a legal notice, here is a blessing:****    May you do good and not evil.**    May you find forgiveness for yourself and forgive others.**    May you share freely, never taking more than you give.***************************************************************************** This file contains code to implement the "sqlite" command line** utility for accessing SQLite databases.**** $Id: shell.c,v 1.170 2007/11/26 22:54:27 drh Exp $*/#include <stdlib.h>#include <string.h>#include <stdio.h>#include <assert.h>#include "sqlite3.h"#include <ctype.h>#include <stdarg.h>#if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__)# include <signal.h># include <pwd.h># include <unistd.h># include <sys/types.h>#endif#ifdef __OS2__# include <unistd.h>#endif#if defined(HAVE_READLINE) && HAVE_READLINE==1# include <readline/readline.h># include <readline/history.h>#else# define readline(p) local_getline(p,stdin)# define add_history(X)# define read_history(X)# define write_history(X)# define stifle_history(X)#endif#if defined(_WIN32) || defined(WIN32)# include <io.h>#else/* Make sure isatty() has a prototype.*/extern int isatty();#endif#if defined(_WIN32_WCE)/* Windows CE (arm-wince-mingw32ce-gcc) does not provide isatty() * thus we always assume that we have a console. That can be * overridden with the -batch command line option. */#define isatty(x) 1#endif#if !defined(_WIN32) && !defined(WIN32) && !defined(__OS2__)#include <sys/time.h>#include <sys/resource.h>/* Saved resource information for the beginning of an operation */static struct rusage sBegin;/* True if the timer is enabled */static int enableTimer = 0;/*** Begin timing an operation*/static void beginTimer(void){  if( enableTimer ){    getrusage(RUSAGE_SELF, &sBegin);  }}/* Return the difference of two time_structs in microseconds */static int timeDiff(struct timeval *pStart, struct timeval *pEnd){  return (pEnd->tv_usec - pStart->tv_usec) +          1000000*(pEnd->tv_sec - pStart->tv_sec);}/*** Print the timing results.*/static void endTimer(void){  if( enableTimer ){    struct rusage sEnd;    getrusage(RUSAGE_SELF, &sEnd);    printf("CPU Time: user %f sys %f\n",       0.000001*timeDiff(&sBegin.ru_utime, &sEnd.ru_utime),       0.000001*timeDiff(&sBegin.ru_stime, &sEnd.ru_stime));  }}#define BEGIN_TIMER beginTimer()#define END_TIMER endTimer()#define HAS_TIMER 1#else#define BEGIN_TIMER #define END_TIMER#define HAS_TIMER 0#endif/*** If the following flag is set, then command execution stops** at an error if we are not interactive.*/static int bail_on_error = 0;/*** Threat stdin as an interactive input if the following variable** is true.  Otherwise, assume stdin is connected to a file or pipe.*/static int stdin_is_interactive = 1;/*** The following is the open SQLite database.  We make a pointer** to this database a static variable so that it can be accessed** by the SIGINT handler to interrupt database processing.*/static sqlite3 *db = 0;/*** True if an interrupt (Control-C) has been received.*/static volatile int seenInterrupt = 0;/*** This is the name of our program. It is set in main(), used** in a number of other places, mostly for error messages.*/static char *Argv0;/*** Prompt strings. Initialized in main. Settable with**   .prompt main continue*/static char mainPrompt[20];     /* First line prompt. default: "sqlite> "*/static char continuePrompt[20]; /* Continuation prompt. default: "   ...> " *//*** Write I/O traces to the following stream.*/#ifdef SQLITE_ENABLE_IOTRACEstatic FILE *iotrace = 0;#endif/*** This routine works like printf in that its first argument is a** format string and subsequent arguments are values to be substituted** in place of % fields.  The result of formatting this string** is written to iotrace.*/#ifdef SQLITE_ENABLE_IOTRACEstatic void iotracePrintf(const char *zFormat, ...){  va_list ap;  char *z;  if( iotrace==0 ) return;  va_start(ap, zFormat);  z = sqlite3_vmprintf(zFormat, ap);  va_end(ap);  fprintf(iotrace, "%s", z);  sqlite3_free(z);}#endif/*** Determines if a string is a number of not.*/static int isNumber(const char *z, int *realnum){  if( *z=='-' || *z=='+' ) z++;  if( !isdigit(*z) ){    return 0;  }  z++;  if( realnum ) *realnum = 0;  while( isdigit(*z) ){ z++; }  if( *z=='.' ){    z++;    if( !isdigit(*z) ) return 0;    while( isdigit(*z) ){ z++; }    if( realnum ) *realnum = 1;  }  if( *z=='e' || *z=='E' ){    z++;    if( *z=='+' || *z=='-' ) z++;    if( !isdigit(*z) ) return 0;    while( isdigit(*z) ){ z++; }    if( realnum ) *realnum = 1;  }  return *z==0;}/*** A global char* and an SQL function to access its current value ** from within an SQL statement. This program used to use the ** sqlite_exec_printf() API to substitue a string into an SQL statement.** The correct way to do this with sqlite3 is to use the bind API, but** since the shell is built around the callback paradigm it would be a lot** of work. Instead just use this hack, which is quite harmless.*/static const char *zShellStatic = 0;static void shellstaticFunc(  sqlite3_context *context,  int argc,  sqlite3_value **argv){  assert( 0==argc );  assert( zShellStatic );  sqlite3_result_text(context, zShellStatic, -1, SQLITE_STATIC);}/*** This routine reads a line of text from FILE in, stores** the text in memory obtained from malloc() and returns a pointer** to the text.  NULL is returned at end of file, or if malloc()** fails.**** The interface is like "readline" but no command-line editing** is done.*/static char *local_getline(char *zPrompt, FILE *in){  char *zLine;  int nLine;  int n;  int eol;  if( zPrompt && *zPrompt ){    printf("%s",zPrompt);    fflush(stdout);  }  nLine = 100;  zLine = malloc( nLine );  if( zLine==0 ) return 0;  n = 0;  eol = 0;  while( !eol ){    if( n+100>nLine ){      nLine = nLine*2 + 100;      zLine = realloc(zLine, nLine);      if( zLine==0 ) return 0;    }    if( fgets(&zLine[n], nLine - n, in)==0 ){      if( n==0 ){        free(zLine);        return 0;      }      zLine[n] = 0;      eol = 1;      break;    }    while( zLine[n] ){ n++; }    if( n>0 && zLine[n-1]=='\n' ){      n--;      zLine[n] = 0;      eol = 1;    }  }  zLine = realloc( zLine, n+1 );  return zLine;}/*** Retrieve a single line of input text.**** zPrior is a string of prior text retrieved.  If not the empty** string, then issue a continuation prompt.*/static char *one_input_line(const char *zPrior, FILE *in){  char *zPrompt;  char *zResult;  if( in!=0 ){    return local_getline(0, in);  }  if( zPrior && zPrior[0] ){    zPrompt = continuePrompt;  }else{    zPrompt = mainPrompt;  }  zResult = readline(zPrompt);#if defined(HAVE_READLINE) && HAVE_READLINE==1  if( zResult && *zResult ) add_history(zResult);#endif  return zResult;}struct previous_mode_data {  int valid;        /* Is there legit data in here? */  int mode;  int showHeader;  int colWidth[100];};/*** An pointer to an instance of this structure is passed from** the main program to the callback.  This is used to communicate** state and mode information.*/struct callback_data {  sqlite3 *db;            /* The database */  int echoOn;            /* True to echo input commands */  int cnt;               /* Number of records displayed so far */  FILE *out;             /* Write results here */  int mode;              /* An output mode setting */  int writableSchema;    /* True if PRAGMA writable_schema=ON */  int showHeader;        /* True to show column names in List or Column mode */  char *zDestTable;      /* Name of destination table when MODE_Insert */  char separator[20];    /* Separator character for MODE_List */  int colWidth[100];     /* Requested width of each column when in column mode*/  int actualWidth[100];  /* Actual width of each column */  char nullvalue[20];    /* The text to print when a NULL comes back from                         ** the database */  struct previous_mode_data explainPrev;                         /* Holds the mode information just before                         ** .explain ON */  char outfile[FILENAME_MAX]; /* Filename for *out */  const char *zDbFilename;    /* name of the database file */};/*** These are the allowed modes.*/#define MODE_Line     0  /* One column per line.  Blank line between records */#define MODE_Column   1  /* One record per line in neat columns */#define MODE_List     2  /* One record per line with a separator */#define MODE_Semi     3  /* Same as MODE_List but append ";" to each line */#define MODE_Html     4  /* Generate an XHTML table */#define MODE_Insert   5  /* Generate SQL "insert" statements */#define MODE_Tcl      6  /* Generate ANSI-C or TCL quoted elements */#define MODE_Csv      7  /* Quote strings, numbers are plain */#define MODE_NUM_OF   8  /* The number of modes (not a mode itself) */static const char *modeDescr[MODE_NUM_OF] = {  "line",  "column",  "list",  "semi",  "html",  "insert",  "tcl",  "csv",};/*** Number of elements in an array*/#define ArraySize(X)  (sizeof(X)/sizeof(X[0]))/*** Output the given string as a quoted string using SQL quoting conventions.*/static void output_quoted_string(FILE *out, const char *z){  int i;  int nSingle = 0;  for(i=0; z[i]; i++){    if( z[i]=='\'' ) nSingle++;  }  if( nSingle==0 ){    fprintf(out,"'%s'",z);  }else{    fprintf(out,"'");    while( *z ){      for(i=0; z[i] && z[i]!='\''; i++){}      if( i==0 ){        fprintf(out,"''");        z++;      }else if( z[i]=='\'' ){        fprintf(out,"%.*s''",i,z);        z += i+1;      }else{        fprintf(out,"%s",z);        break;      }    }    fprintf(out,"'");  }}/*** Output the given string as a quoted according to C or TCL quoting rules.*/static void output_c_string(FILE *out, const char *z){  unsigned int c;  fputc('"', out);  while( (c = *(z++))!=0 ){    if( c=='\\' ){      fputc(c, out);      fputc(c, out);    }else if( c=='\t' ){      fputc('\\', out);      fputc('t', out);    }else if( c=='\n' ){      fputc('\\', out);      fputc('n', out);    }else if( c=='\r' ){      fputc('\\', out);      fputc('r', out);    }else if( !isprint(c) ){      fprintf(out, "\\%03o", c&0xff);    }else{      fputc(c, out);    }  }  fputc('"', out);}/*** Output the given string with characters that are special to** HTML escaped.*/static void output_html_string(FILE *out, const char *z){  int i;  while( *z ){    for(i=0; z[i] && z[i]!='<' && z[i]!='&'; i++){}    if( i>0 ){      fprintf(out,"%.*s",i,z);    }    if( z[i]=='<' ){      fprintf(out,"&lt;");    }else if( z[i]=='&' ){      fprintf(out,"&amp;");    }else{      break;    }    z += i + 1;  }}/*** If a field contains any character identified by a 1 in the following** array, then the string must be quoted for CSV.*/static const char needCsvQuote[] = {  1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 0, 1, 0, 0, 0, 0, 1,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 0,   0, 0, 0, 0, 0, 0, 0, 1,   1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,     1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 1, 1, 1, 1, 1, 1,   };/*** Output a single term of CSV.  Actually, p->separator is used for** the separator, which may or may not be a comma.  p->nullvalue is** the null value.  Strings are quoted using ANSI-C rules.  Numbers** appear outside of quotes.*/static void output_csv(struct callback_data *p, const char *z, int bSep){  FILE *out = p->out;  if( z==0 ){    fprintf(out,"%s",p->nullvalue);  }else{    int i;    for(i=0; z[i]; i++){      if( needCsvQuote[((unsigned char*)z)[i]] ){        i = 0;        break;      }    }    if( i==0 ){      putc('"', out);      for(i=0; z[i]; i++){        if( z[i]=='"' ) putc('"', out);        putc(z[i], out);      }      putc('"', out);    }else{      fprintf(out, "%s", z);    }  }  if( bSep ){    fprintf(p->out, p->separator);  }}#ifdef SIGINT/*** This routine runs when the user presses Ctrl-C*/static void interrupt_handler(int NotUsed){  seenInterrupt = 1;  if( db ) sqlite3_interrupt(db);}#endif/*** This is the callback routine that the SQLite library** invokes for each row of a query result.*/static int callback(void *pArg, int nArg, char **azArg, char **azCol){  int i;  struct callback_data *p = (struct callback_data*)pArg;  switch( p->mode ){    case MODE_Line: {      int w = 5;      if( azArg==0 ) break;      for(i=0; i<nArg; i++){        int len = strlen(azCol[i] ? azCol[i] : "");        if( len>w ) w = len;      }      if( p->cnt++>0 ) fprintf(p->out,"\n");      for(i=0; i<nArg; i++){

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91欧美一区二区| 九色porny丨国产精品| gogogo免费视频观看亚洲一| 国产欧美日本一区视频| 99久久99久久免费精品蜜臀| 综合久久国产九一剧情麻豆| 在线观看日韩电影| 日本不卡免费在线视频| 精品88久久久久88久久久| 国产成人丝袜美腿| 自拍偷拍亚洲激情| 欧美日本国产视频| 国产一区91精品张津瑜| 一区视频在线播放| 3d动漫精品啪啪| 黄色成人免费在线| 亚洲视频一区二区在线观看| 欧美亚洲国产一区二区三区va | 精品国产1区二区| 成人一区二区三区视频 | 中文字幕欧美区| 91久久国产最好的精华液| 日韩1区2区3区| 国产精品素人视频| 欧美视频一区二区三区四区| 精品一区二区免费在线观看| 亚洲色图一区二区三区| 欧美电影免费观看完整版| 色综合色综合色综合| 日本aⅴ免费视频一区二区三区| 欧美国产日本韩| 欧美一区二区不卡视频| 91麻豆国产精品久久| 国内久久精品视频| 亚洲成av人影院在线观看网| 国产精品入口麻豆九色| 日韩午夜精品视频| 91麻豆高清视频| 国产精品18久久久久久久久久久久| 一区二区久久久久久| 久久久国产精华| 91精品国产综合久久国产大片| av午夜一区麻豆| 国产一区二区主播在线| 日韩黄色免费网站| 一区二区三区在线视频免费| 亚洲国产高清aⅴ视频| 欧美成人精品1314www| 91久久一区二区| 波波电影院一区二区三区| 免费xxxx性欧美18vr| 五月婷婷综合网| 一区二区三区精品| 亚洲欧美自拍偷拍色图| 国产情人综合久久777777| 欧美成人精品1314www| 91麻豆精品91久久久久久清纯| 欧美在线一区二区| 91丨国产丨九色丨pron| 高清国产一区二区三区| 国产伦理精品不卡| 国产一区二区在线看| 蜜臀久久99精品久久久久久9 | 伊人色综合久久天天| 国产精品欧美综合在线| 国产亚洲综合性久久久影院| 日韩欧美第一区| 日韩女优毛片在线| 日韩精品一区二区三区三区免费| 日韩一区二区在线看片| 91精品国产综合久久小美女| 欧美老肥妇做.爰bbww视频| 欧美日韩一区二区三区在线看 | 精品一区二区三区在线视频| 日本中文在线一区| 美女网站视频久久| 激情深爱一区二区| 国产成人av电影在线| 成人在线视频首页| 91亚洲资源网| 欧美午夜精品一区| 91精品国产品国语在线不卡| 日韩精品中午字幕| 久久婷婷色综合| 国产精品人妖ts系列视频| 国产精品久久福利| 一区二区免费在线播放| 日本美女视频一区二区| 久久不见久久见免费视频1| 狠狠色丁香婷婷综合久久片| 国产成人av在线影院| 91视视频在线观看入口直接观看www| 日本精品一级二级| 欧美一区二区三区在线视频 | 777亚洲妇女| 欧美va天堂va视频va在线| 久久久91精品国产一区二区精品| 国产欧美日韩麻豆91| 亚洲精品v日韩精品| 奇米精品一区二区三区在线观看一 | 亚洲成av人影院| 麻豆精品一区二区综合av| 国产成人aaaa| 日本道免费精品一区二区三区| 91精品蜜臀在线一区尤物| 欧美精品一区二区三区一线天视频| 国产精品麻豆99久久久久久| 亚洲一区二区三区爽爽爽爽爽| 麻豆91小视频| 97精品超碰一区二区三区| 6080亚洲精品一区二区| 国产精品丝袜一区| 午夜在线电影亚洲一区| 国产福利91精品一区二区三区| 色天使色偷偷av一区二区| 日韩一区二区三区观看| 国产精品美女久久久久高潮| 亚洲大尺度视频在线观看| 国产成人精品免费网站| 在线观看日韩一区| 国产亚洲一本大道中文在线| 亚洲国产精品一区二区www| 国产a视频精品免费观看| 欧美疯狂做受xxxx富婆| 综合久久久久综合| 国产乱国产乱300精品| 欧美美女一区二区在线观看| 国产精品拍天天在线| 久久99精品久久久久婷婷| 日本高清不卡aⅴ免费网站| 久久久亚洲午夜电影| 日韩精品国产精品| 日本电影亚洲天堂一区| 中文字幕第一区二区| 激情久久五月天| 91麻豆精品国产91| 亚洲国产精品一区二区久久| 成人性生交大片| 久久毛片高清国产| 免费av网站大全久久| 欧美三级欧美一级| 亚洲日本一区二区三区| 国产suv精品一区二区三区| 欧美大胆一级视频| 丝袜美腿亚洲色图| 欧美四级电影网| 亚洲欧美另类综合偷拍| 成人精品高清在线| 国产亚洲精品bt天堂精选| 久久精品国产99国产| 欧美一级黄色大片| 天使萌一区二区三区免费观看| 在线看日韩精品电影| 亚洲综合色网站| 欧美影院一区二区三区| 一区二区三区在线视频播放| 一本大道久久a久久综合| 国产精品福利一区| 99久久久精品| 亚洲日本成人在线观看| 99热这里都是精品| 亚洲欧美日韩国产综合在线 | 一区二区三区 在线观看视频| 一本色道a无线码一区v| 亚洲视频一区在线观看| 色综合天天在线| 亚洲精品乱码久久久久久日本蜜臀| 成人国产免费视频| 亚洲色图制服丝袜| 在线观看亚洲精品| 性感美女极品91精品| 91麻豆精品久久久久蜜臀| 看片的网站亚洲| 久久久亚洲午夜电影| 成人午夜伦理影院| 一区二区三区在线观看网站| 欧美制服丝袜第一页| 蜜臀av一区二区在线免费观看| 久久综合九色综合欧美亚洲| 国产精品99久久久久久有的能看| 国产清纯美女被跳蛋高潮一区二区久久w| 国产福利91精品一区二区三区| 中文字幕av不卡| 国产成人免费在线观看| 国产精品女主播在线观看| 97se亚洲国产综合自在线不卡| 一区二区三区四区不卡在线| 欧美日韩在线直播| 极品少妇xxxx精品少妇| 日本一区二区三区高清不卡| 色94色欧美sute亚洲13| 青青草一区二区三区| 国产亚洲精品aa| 在线免费观看日韩欧美| 蜜桃视频免费观看一区| 欧美—级在线免费片| 欧美日韩精品是欧美日韩精品| 加勒比av一区二区| 一区二区三区欧美| 精品国产欧美一区二区|