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

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

?? shell.c

?? 嵌入式數據系統軟件!
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*** 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++){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av高清久久久| 亚洲第一福利一区| 精品三级av在线| 欧美电影在线免费观看| 欧美三级欧美一级| 欧美日韩国产综合草草| 欧美三级韩国三级日本一级| 欧美午夜一区二区| 欧美日韩国产美| 91精品国产入口| 日韩精品一区二区三区视频| 精品国产乱码久久久久久夜甘婷婷| 欧美另类一区二区三区| 日韩一区二区在线观看| 欧美www视频| 国产日韩av一区| 亚洲欧洲精品一区二区三区不卡| 国产精品激情偷乱一区二区∴| 中文字幕一区二区三区在线观看 | 成人欧美一区二区三区在线播放| 中文字幕 久热精品 视频在线| 欧美激情一区三区| 自拍偷拍亚洲激情| 丝袜美腿亚洲色图| 免费人成在线不卡| 国产精品1区2区3区在线观看| av一区二区三区在线| 欧美日本在线一区| 国产日韩欧美高清| 亚洲精品免费电影| 老司机免费视频一区二区| 国产精品一二三在| 在线观看视频一区| 亚洲精品一区二区三区影院| 自拍偷自拍亚洲精品播放| 日本免费新一区视频| 国产成人精品免费一区二区| 在线视频国内自拍亚洲视频| 精品久久久久久最新网址| 日韩一区中文字幕| 九九久久精品视频| 在线精品视频小说1| 精品999在线播放| 亚洲一卡二卡三卡四卡五卡| 国产露脸91国语对白| 欧美日韩亚洲高清一区二区| 日本一区二区三区国色天香| 图片区日韩欧美亚洲| 99久久99久久久精品齐齐| 欧美一区二区视频在线观看2022| 国产精品进线69影院| 久久精品国产免费| 欧美日韩国产影片| 亚洲人被黑人高潮完整版| 精品一区二区三区免费观看| 欧美视频中文一区二区三区在线观看| 欧美精品一区二区精品网| 亚洲国产欧美在线| 色综合久久久久网| 亚洲欧洲韩国日本视频| 国产自产v一区二区三区c| 欧美久久免费观看| 一区二区在线观看视频在线观看| 国产成人一区在线| 欧美r级电影在线观看| 午夜精品免费在线| 欧美在线免费播放| 综合亚洲深深色噜噜狠狠网站| 国产福利精品一区| 日韩女优av电影| 久久av资源站| 精品欧美黑人一区二区三区| 日本视频一区二区| 91精品国产综合久久香蕉麻豆| 亚洲国产色一区| 欧美日韩国产成人在线免费| 亚洲国产精品久久久久秋霞影院| 91成人在线观看喷潮| 亚洲一区二区精品视频| 日本高清无吗v一区| 18成人在线视频| 91免费国产在线| 亚洲成a人片综合在线| 91福利精品视频| 天天综合色天天综合色h| 欧美一区永久视频免费观看| 麻豆91免费看| 久久伊人中文字幕| 成人精品免费看| 成人免费一区二区三区在线观看| 91丨porny丨在线| 亚洲高清三级视频| 欧美精品久久久久久久多人混战| 日本不卡视频一二三区| 日韩欧美一级二级三级久久久 | 国产视频一区二区在线| 成人久久视频在线观看| 一区二区三区在线视频免费| 欧美日韩精品三区| 国产真实精品久久二三区| 国产精品欧美一区喷水| 欧美在线你懂的| 日本vs亚洲vs韩国一区三区二区 | 1区2区3区欧美| 欧美日韩另类国产亚洲欧美一级| 日本人妖一区二区| 国产精品美女一区二区在线观看| 色婷婷av一区| 麻豆91精品视频| 亚洲精品少妇30p| 日韩免费在线观看| 91麻豆国产自产在线观看| 奇米在线7777在线精品| 国产精品素人视频| 欧美一区二区国产| 不卡视频在线看| 日本成人在线看| 日韩美女精品在线| 精品日韩在线观看| 91丝袜美腿高跟国产极品老师 | 国产精品无人区| 欧美裸体bbwbbwbbw| 国产精品一区二区久久精品爱涩 | 国产精品色噜噜| 欧美日本在线看| 91麻豆精品一区二区三区| 激情六月婷婷久久| 亚洲一区在线观看免费| 国产亚洲制服色| 日韩西西人体444www| 色8久久人人97超碰香蕉987| 国产成人综合自拍| 日本亚洲最大的色成网站www| 亚洲视频一区二区在线| 精品国产乱码久久久久久影片| 欧美亚日韩国产aⅴ精品中极品| 成人爽a毛片一区二区免费| 日本美女视频一区二区| 亚洲观看高清完整版在线观看| 国产精品久久久久影院| 精品久久久久久久久久久久久久久 | 国产精品精品国产色婷婷| 精品国产成人系列| 337p亚洲精品色噜噜噜| 欧美性高清videossexo| 在线视频你懂得一区二区三区| 91在线无精精品入口| 国产精品一品二品| 国产二区国产一区在线观看 | 精品欧美一区二区在线观看| 7777精品伊人久久久大香线蕉的 | 亚洲成av人片一区二区| 亚洲综合色噜噜狠狠| 亚洲欧美福利一区二区| 亚洲欧美偷拍卡通变态| 亚洲欧洲成人精品av97| 中文字幕一区av| 亚洲欧美视频在线观看| 亚洲精品免费电影| 亚洲二区在线观看| 日日摸夜夜添夜夜添国产精品| 午夜精品久久久久久久| 日本欧美一区二区| 久久成人免费日本黄色| 国产精品综合二区| 成人激情图片网| 日本高清视频一区二区| 欧美精品视频www在线观看| 日韩视频一区二区三区在线播放| 日韩午夜激情视频| 久久久三级国产网站| 国产欧美日本一区二区三区| 国产精品网站在线播放| 亚洲激情图片小说视频| 亚洲成a天堂v人片| 久久av资源站| av高清久久久| 69av一区二区三区| 久久久久久久久久久黄色| 中国av一区二区三区| 亚洲一二三四久久| 麻豆一区二区99久久久久| 国产一区二区成人久久免费影院| 国产精品资源在线| 一本色道久久综合狠狠躁的推荐| 欧美老人xxxx18| 国产午夜久久久久| 亚洲国产成人精品视频| 麻豆国产精品官网| 99久久久国产精品| 7777精品伊人久久久大香线蕉 | 免费观看一级欧美片| 丁香婷婷综合激情五月色| 欧美性猛交xxxxxxxx| 中日韩av电影| 久久精品国产精品青草| 97se亚洲国产综合在线| 日韩欧美的一区二区| 亚洲嫩草精品久久| 加勒比av一区二区|