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

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

?? shell.c

?? 新版輕量級嵌入式數(shù)據(jù)庫
?? 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.135 2006/03/19 13:00:25 drh Exp $*/#include <stdlib.h>#include <string.h>#include <stdio.h>#include <assert.h>#include "sqlite3.h"#include <ctype.h>#if !defined(_WIN32) && !defined(WIN32) && !defined(__MACOS__)# include <signal.h># include <pwd.h># include <unistd.h># include <sys/types.h>#endif#ifdef __MACOS__# include <console.h># include <signal.h># include <unistd.h># include <extras.h># include <Files.h># include <Folders.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/* Make sure isatty() has a prototype.*/extern int isatty();/*** 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: "   ...> " *//*** 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.  "isatty" is true if text** is coming from a terminal.  In that case, we issue a prompt and** attempt to use "readline" for command-line editing.  If "isatty"** is false, use "local_getline" instead of "readline" and issue no prompt.**** 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 ) 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 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 */  char *zKey;                 /* Encryption key */};/*** 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;  }}/*** 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){  if( z==0 ){    fprintf(p->out,"%s",p->nullvalue);  }else if( isNumber(z, 0) ){    fprintf(p->out,"%s",z);  }else{    output_c_string(p->out, 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]);        if( len>w ) w = len;      }      if( p->cnt++>0 ) fprintf(p->out,"\n");      for(i=0; i<nArg; i++){        fprintf(p->out,"%*s = %s\n", w, azCol[i],                 azArg[i] ? azArg[i] : p->nullvalue);      }      break;    }    case MODE_Column: {      if( p->cnt++==0 ){        for(i=0; i<nArg; i++){          int w, n;          if( i<ArraySize(p->colWidth) ){             w = p->colWidth[i];          }else{             w = 0;          }          if( w<=0 ){            w = strlen(azCol[i] ? azCol[i] : "");            if( w<10 ) w = 10;            n = strlen(azArg && azArg[i] ? azArg[i] : p->nullvalue);            if( w<n ) w = n;          }          if( i<ArraySize(p->actualWidth) ){            p->actualWidth[i] = w;          }          if( p->showHeader ){            fprintf(p->out,"%-*.*s%s",w,w,azCol[i], i==nArg-1 ? "\n": "  ");          }        }        if( p->showHeader ){          for(i=0; i<nArg; i++){            int w;            if( i<ArraySize(p->actualWidth) ){               w = p->actualWidth[i];            }else{               w = 10;            }            fprintf(p->out,"%-*.*s%s",w,w,"-----------------------------------"                   "----------------------------------------------------------",                    i==nArg-1 ? "\n": "  ");          }        }      }      if( azArg==0 ) break;      for(i=0; i<nArg; i++){        int w;        if( i<ArraySize(p->actualWidth) ){           w = p->actualWidth[i];        }else{           w = 10;        }        fprintf(p->out,"%-*.*s%s",w,w,            azArg[i] ? azArg[i] : p->nullvalue, i==nArg-1 ? "\n": "  ");      }      break;    }    case MODE_Semi:    case MODE_List: {      if( p->cnt++==0 && p->showHeader ){        for(i=0; i<nArg; i++){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天堂av在线一区| 欧美久久久久中文字幕| 欧美日韩国产经典色站一区二区三区| 5月丁香婷婷综合| 亚洲欧美日本韩国| 粉嫩嫩av羞羞动漫久久久 | 成人动漫中文字幕| 欧美人与禽zozo性伦| 国产精品系列在线| 极品少妇xxxx精品少妇偷拍| 欧美日韩一区二区欧美激情| 国产欧美一区二区精品久导航| 亚洲国产日韩在线一区模特| 懂色中文一区二区在线播放| 日韩欧美中文字幕一区| 夜夜精品浪潮av一区二区三区| 福利一区福利二区| 久久久噜噜噜久久中文字幕色伊伊| 丝袜亚洲另类欧美| 欧美午夜精品久久久久久超碰| 1000部国产精品成人观看| 国产精品911| 国产午夜精品在线观看| 国产一区在线观看视频| 精品国产123| 老司机免费视频一区二区三区| 正在播放亚洲一区| 三级久久三级久久久| 欧美视频在线一区二区三区| 国产精品久久久久久久久图文区 | 91网站黄www| 亚洲日韩欧美一区二区在线| www.亚洲在线| 亚洲人妖av一区二区| www.色精品| 日韩一区欧美一区| 色激情天天射综合网| 亚洲综合免费观看高清完整版在线| 91免费版pro下载短视频| 最新日韩av在线| 91成人免费网站| 亚洲va中文字幕| 欧美xxxx在线观看| 国产福利一区在线| 国产精品毛片a∨一区二区三区| www.日韩精品| 亚洲成人资源在线| 欧美成人精品1314www| 国产在线国偷精品免费看| 亚洲国产精品成人久久综合一区| 成人激情午夜影院| 一区二区三区蜜桃网| 5858s免费视频成人| 国产一区二区三区免费在线观看| 国产日韩欧美高清| 欧日韩精品视频| 久久91精品国产91久久小草| 国产精品免费视频观看| 色又黄又爽网站www久久| 日精品一区二区三区| 久久久国产综合精品女国产盗摄| 99久久精品国产观看| 丝瓜av网站精品一区二区| 2017欧美狠狠色| 色菇凉天天综合网| 日本成人在线看| 国产精品久久久久久久久免费相片| 日本道精品一区二区三区| 日韩在线观看一区二区| 国产精品美女久久久久久 | 久久久综合九色合综国产精品| 成人av在线网| 免费一区二区视频| 亚洲卡通动漫在线| 26uuu久久天堂性欧美| 日本精品一区二区三区高清| 国产主播一区二区三区| 亚洲欧洲综合另类| 欧美一区二区三区在线观看| 成人看片黄a免费看在线| 视频一区二区三区中文字幕| 国产精品久久午夜| 欧美成人bangbros| 欧美午夜精品久久久| 成人av在线网| 国产精品主播直播| 日韩不卡在线观看日韩不卡视频| 亚洲色图丝袜美腿| 久久精品欧美一区二区三区麻豆| 欧美日韩国产高清一区二区三区 | 不卡电影一区二区三区| 蜜桃久久久久久久| 亚洲一区二区在线视频| 国产精品乱子久久久久| 日韩精品一区二区三区四区| 欧美性生活久久| 色婷婷国产精品综合在线观看| 国模无码大尺度一区二区三区| 视频一区免费在线观看| 一区二区不卡在线视频 午夜欧美不卡在 | 一区二区三区四区av| 久久免费的精品国产v∧| 91精品国产欧美日韩| 欧美三区在线观看| 色先锋资源久久综合| 99久久久无码国产精品| 国产精品18久久久久| 麻豆精品久久精品色综合| 日韩电影在线免费看| 日韩不卡一区二区三区| 同产精品九九九| 日韩avvvv在线播放| 香蕉乱码成人久久天堂爱免费| 亚洲欧美日韩人成在线播放| 亚洲日本在线天堂| 亚洲免费色视频| 亚洲精品一二三四区| 亚洲一区二区视频| 天天综合色天天| 麻豆成人91精品二区三区| 青青草97国产精品免费观看无弹窗版| 日韩精品乱码av一区二区| 日本视频一区二区| 麻豆精品在线播放| 国产91清纯白嫩初高中在线观看| 高清不卡一区二区| 色综合久久精品| 欧美日韩和欧美的一区二区| 4438x成人网最大色成网站| 日韩一区二区三区精品视频| 日韩精品一区二区三区老鸭窝 | 欧美色男人天堂| 日韩一区二区免费视频| 2024国产精品| 亚洲国产精品二十页| 亚洲精品老司机| 蜜桃视频第一区免费观看| 精品亚洲成a人在线观看| 国产91露脸合集magnet| 色综合久久综合网97色综合| 欧美日韩精品免费观看视频 | 韩国毛片一区二区三区| 粉嫩av一区二区三区在线播放| 色屁屁一区二区| 日韩精品一区二区三区中文精品| 国产亚洲女人久久久久毛片| 中文字幕在线观看一区| 图片区日韩欧美亚洲| 国产剧情一区在线| 91国偷自产一区二区开放时间 | 日韩欧美国产电影| 中文字幕一区二区三区精华液 | 国产日韩欧美电影| 亚洲成av人影院| 国产白丝精品91爽爽久久| 一本色道a无线码一区v| 日韩一卡二卡三卡| 亚洲欧美一区二区三区国产精品| 日本欧美加勒比视频| 99re亚洲国产精品| 欧美www视频| 午夜精品一区在线观看| 99久久99精品久久久久久 | 韩国毛片一区二区三区| 欧美中文一区二区三区| 国产亚洲制服色| 午夜成人在线视频| 97精品久久久久中文字幕| 久久综合久久鬼色| 日韩国产高清在线| 在线视频一区二区免费| 欧美国产激情一区二区三区蜜月| 天堂资源在线中文精品| 91香蕉视频污| 国产女人aaa级久久久级| 老司机精品视频在线| 欧洲国内综合视频| 国精产品一区一区三区mba桃花| 欧美日韩精品一二三区| 亚洲日本青草视频在线怡红院| 国产在线乱码一区二区三区| 91.麻豆视频| 亚洲国产日日夜夜| 色猫猫国产区一区二在线视频| 国产精品日日摸夜夜摸av| 国产经典欧美精品| 国产亚洲综合色| 国产一区二区成人久久免费影院| 日韩一区二区三区四区| 爽好多水快深点欧美视频| 欧美人与z0zoxxxx视频| 亚洲图片欧美综合| 欧美日韩一区中文字幕| 一二三区精品福利视频| 欧美自拍丝袜亚洲| 亚洲成人av一区二区| 91精品欧美一区二区三区综合在| 亚洲777理论| 欧美一区二区三区免费视频 | 国产乱理伦片在线观看夜一区|