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

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

?? shell.c

?? sqlite 3.3.8 支持加密的版本
?? C
?? 第 1 頁 / 共 4 頁
字號:
      nPrintCol = 80/(maxlen+2);
      if( nPrintCol<1 ) nPrintCol = 1;
      nPrintRow = (nRow + nPrintCol - 1)/nPrintCol;
      for(i=0; i<nPrintRow; i++){
        for(j=i+1; j<=nRow; j+=nPrintRow){
          char *zSp = j<=nPrintRow ? "" : "  ";
          printf("%s%-*s", zSp, maxlen, azResult[j] ? azResult[j] : "");
        }
        printf("\n");
      }
    }
    sqlite3_free_table(azResult);
  }else

  if( c=='t' && n>1 && strncmp(azArg[0], "timeout", n)==0 && nArg>=2 ){
    open_db(p);
    sqlite3_busy_timeout(p->db, atoi(azArg[1]));
  }else

  if( c=='w' && strncmp(azArg[0], "width", n)==0 ){
    int j;
    assert( nArg<=ArraySize(azArg) );
    for(j=1; j<nArg && j<ArraySize(p->colWidth); j++){
      p->colWidth[j-1] = atoi(azArg[j]);
    }
  }else

  {
    fprintf(stderr, "unknown command or invalid arguments: "
      " \"%s\". Enter \".help\" for help\n", azArg[0]);
  }

  return rc;
}

/*
** Return TRUE if the last non-whitespace character in z[] is a semicolon.
** z[] is N characters long.
*/
static int _ends_with_semicolon(const char *z, int N){
  while( N>0 && isspace((unsigned char)z[N-1]) ){ N--; }
  return N>0 && z[N-1]==';';
}

/*
** Test to see if a line consists entirely of whitespace.
*/
static int _all_whitespace(const char *z){
  for(; *z; z++){
    if( isspace(*(unsigned char*)z) ) continue;
    if( *z=='/' && z[1]=='*' ){
      z += 2;
      while( *z && (*z!='*' || z[1]!='/') ){ z++; }
      if( *z==0 ) return 0;
      z++;
      continue;
    }
    if( *z=='-' && z[1]=='-' ){
      z += 2;
      while( *z && *z!='\n' ){ z++; }
      if( *z==0 ) return 1;
      continue;
    }
    return 0;
  }
  return 1;
}

/*
** Return TRUE if the line typed in is an SQL command terminator other
** than a semi-colon.  The SQL Server style "go" command is understood
** as is the Oracle "/".
*/
static int _is_command_terminator(const char *zLine){
  while( isspace(*(unsigned char*)zLine) ){ zLine++; };
  if( zLine[0]=='/' && _all_whitespace(&zLine[1]) ) return 1;  /* Oracle */
  if( tolower(zLine[0])=='g' && tolower(zLine[1])=='o'
         && _all_whitespace(&zLine[2]) ){
    return 1;  /* SQL Server */
  }
  return 0;
}

/*
** Read input from *in and process it.  If *in==0 then input
** is interactive - the user is typing it it.  Otherwise, input
** is coming from a file or device.  A prompt is issued and history
** is saved only if input is interactive.  An interrupt signal will
** cause this routine to exit immediately, unless input is interactive.
*/
static void process_input(struct callback_data *p, FILE *in){
  char *zLine;
  char *zSql = 0;
  int nSql = 0;
  char *zErrMsg;
  int rc;
  while( fflush(p->out), (zLine = one_input_line(zSql, in))!=0 ){
    if( seenInterrupt ){
      if( in!=0 ) break;
      seenInterrupt = 0;
    }
    if( p->echoOn ) printf("%s\n", zLine);
    if( (zSql==0 || zSql[0]==0) && _all_whitespace(zLine) ) continue;
    if( zLine && zLine[0]=='.' && nSql==0 ){
      int rc = do_meta_command(zLine, p);
      free(zLine);
      if( rc ) break;
      continue;
    }
    if( _is_command_terminator(zLine) ){
      strcpy(zLine,";");
    }
    if( zSql==0 ){
      int i;
      for(i=0; zLine[i] && isspace((unsigned char)zLine[i]); i++){}
      if( zLine[i]!=0 ){
        nSql = strlen(zLine);
        zSql = malloc( nSql+1 );
        if( zSql==0 ){
          fprintf(stderr, "out of memory\n");
          exit(1);
        }
        strcpy(zSql, zLine);
      }
    }else{
      int len = strlen(zLine);
      zSql = realloc( zSql, nSql + len + 2 );
      if( zSql==0 ){
        fprintf(stderr,"%s: out of memory!\n", Argv0);
        exit(1);
      }
      strcpy(&zSql[nSql++], "\n");
      strcpy(&zSql[nSql], zLine);
      nSql += len;
    }
    free(zLine);
    if( zSql && _ends_with_semicolon(zSql, nSql) && sqlite3_complete(zSql) ){
      p->cnt = 0;
      open_db(p);
      rc = sqlite3_exec(p->db, zSql, callback, p, &zErrMsg);
      if( rc || zErrMsg ){
        /* if( in!=0 && !p->echoOn ) printf("%s\n",zSql); */
        if( zErrMsg!=0 ){
          printf("SQL error: %s\n", zErrMsg);
          sqlite3_free(zErrMsg);
          zErrMsg = 0;
        }else{
          printf("SQL error: %s\n", sqlite3_errmsg(p->db));
        }
      }
      free(zSql);
      zSql = 0;
      nSql = 0;
    }
  }
  if( zSql ){
    if( !_all_whitespace(zSql) ) printf("Incomplete SQL: %s\n", zSql);
    free(zSql);
  }
}

/*
** Return a pathname which is the user's home directory.  A
** 0 return indicates an error of some kind.  Space to hold the
** resulting string is obtained from malloc().  The calling
** function should free the result.
*/
static char *find_home_dir(void){
  char *home_dir = NULL;

#if !defined(_WIN32) && !defined(WIN32) && !defined(__MACOS__) && !defined(__OS2__)
  struct passwd *pwent;
  uid_t uid = getuid();
  if( (pwent=getpwuid(uid)) != NULL) {
    home_dir = pwent->pw_dir;
  }
#endif

#ifdef __MACOS__
  char home_path[_MAX_PATH+1];
  home_dir = getcwd(home_path, _MAX_PATH);
#endif

#if defined(_WIN32) || defined(WIN32) || defined(__OS2__)
  if (!home_dir) {
    home_dir = getenv("USERPROFILE");
  }
#endif

  if (!home_dir) {
    home_dir = getenv("HOME");
  }

#if defined(_WIN32) || defined(WIN32) || defined(__OS2__)
  if (!home_dir) {
    char *zDrive, *zPath;
    int n;
    zDrive = getenv("HOMEDRIVE");
    zPath = getenv("HOMEPATH");
    if( zDrive && zPath ){
      n = strlen(zDrive) + strlen(zPath) + 1;
      home_dir = malloc( n );
      if( home_dir==0 ) return 0;
      sqlite3_snprintf(n, home_dir, "%s%s", zDrive, zPath);
      return home_dir;
    }
    home_dir = "c:\\";
  }
#endif

  if( home_dir ){
    char *z = malloc( strlen(home_dir)+1 );
    if( z ) strcpy(z, home_dir);
    home_dir = z;
  }

  return home_dir;
}

/*
** Read input from the file given by sqliterc_override.  Or if that
** parameter is NULL, take input from ~/.sqliterc
*/
static void process_sqliterc(
  struct callback_data *p,        /* Configuration data */
  const char *sqliterc_override   /* Name of config file. NULL to use default */
){
  char *home_dir = NULL;
  const char *sqliterc = sqliterc_override;
  char *zBuf = 0;
  FILE *in = NULL;

  if (sqliterc == NULL) {
    home_dir = find_home_dir();
    if( home_dir==0 ){
      fprintf(stderr,"%s: cannot locate your home directory!\n", Argv0);
      return;
    }
    zBuf = malloc(strlen(home_dir) + 15);
    if( zBuf==0 ){
      fprintf(stderr,"%s: out of memory!\n", Argv0);
      exit(1);
    }
    sprintf(zBuf,"%s/.sqliterc",home_dir);
    free(home_dir);
    sqliterc = (const char*)zBuf;
  }
  in = fopen(sqliterc,"rb");
  if( in ){
    if( isatty(fileno(stdout)) ){
      printf("Loading resources from %s\n",sqliterc);
    }
    process_input(p,in);
    fclose(in);
  }
  free(zBuf);
  return;
}

/*
** Show available command line options
*/
static const char zOptions[] = 
  "   -init filename       read/process named file\n"
  "   -echo                print commands before execution\n"
  "   -[no]header          turn headers on or off\n"
  "   -column              set output mode to 'column'\n"
  "   -html                set output mode to HTML\n"
  "   -line                set output mode to 'line'\n"
  "   -list                set output mode to 'list'\n"
  "   -separator 'x'       set output field separator (|)\n"
  "   -nullvalue 'text'    set text string for NULL values\n"
  "   -version             show SQLite version\n"
;
static void usage(int showDetail){
  fprintf(stderr,
      "Usage: %s [OPTIONS] FILENAME [SQL]\n"  
      "FILENAME is the name of an SQLite database. A new database is created\n"
      "if the file does not previously exist.\n", Argv0);
  if( showDetail ){
    fprintf(stderr, "OPTIONS include:\n%s", zOptions);
  }else{
    fprintf(stderr, "Use the -help option for additional information\n");
  }
  exit(1);
}

/*
** Initialize the state information in data
*/
static void main_init(struct callback_data *data) {
  memset(data, 0, sizeof(*data));
  data->mode = MODE_List;
  strcpy(data->separator,"|");
  data->showHeader = 0;
  strcpy(mainPrompt,"sqlite> ");
  strcpy(continuePrompt,"   ...> ");
}

int main(int argc, char **argv){
  char *zErrMsg = 0;
  struct callback_data data;
  const char *zInitFile = 0;
  char *zFirstCmd = 0;
  int i;

#ifdef __MACOS__
  argc = ccommand(&argv);
#endif

  Argv0 = argv[0];
  main_init(&data);

  /* Make sure we have a valid signal handler early, before anything
  ** else is done.
  */
#ifdef SIGINT
  signal(SIGINT, interrupt_handler);
#endif

  /* Do an initial pass through the command-line argument to locate
  ** the name of the database file, the name of the initialization file,
  ** and the first command to execute.
  */
  for(i=1; i<argc-1; i++){
    if( argv[i][0]!='-' ) break;
    if( strcmp(argv[i],"-separator")==0 || strcmp(argv[i],"-nullvalue")==0 ){
      i++;
    }else if( strcmp(argv[i],"-init")==0 ){
      i++;
      zInitFile = argv[i];
    }
  }
  if( i<argc ){
    data.zDbFilename = argv[i++];
  }else{
#ifndef SQLITE_OMIT_MEMORYDB
    data.zDbFilename = ":memory:";
#else
    data.zDbFilename = 0;
#endif
  }
  if( i<argc ){
    zFirstCmd = argv[i++];
  }
  data.out = stdout;

#ifdef SQLITE_OMIT_MEMORYDB
  if( data.zDbFilename==0 ){
    fprintf(stderr,"%s: no database filename specified\n", argv[0]);
    exit(1);
  }
#endif

  /* Go ahead and open the database file if it already exists.  If the
  ** file does not exist, delay opening it.  This prevents empty database
  ** files from being created if a user mistypes the database name argument
  ** to the sqlite command-line tool.
  */
  if( access(data.zDbFilename, 0)==0 ){
    open_db(&data);
  }

  /* Process the initialization file if there is one.  If no -init option
  ** is given on the command line, look for a file named ~/.sqliterc and
  ** try to process it.
  */
  process_sqliterc(&data,zInitFile);

  /* Make a second pass through the command-line argument and set
  ** options.  This second pass is delayed until after the initialization
  ** file is processed so that the command-line arguments will override
  ** settings in the initialization file.
  */
  for(i=1; i<argc && argv[i][0]=='-'; i++){
    char *z = argv[i];
    if( strcmp(z,"-init")==0 ){
      i++;
    }else if( strcmp(z,"-html")==0 ){
      data.mode = MODE_Html;
    }else if( strcmp(z,"-list")==0 ){
      data.mode = MODE_List;
    }else if( strcmp(z,"-line")==0 ){
      data.mode = MODE_Line;
    }else if( strcmp(z,"-column")==0 ){
      data.mode = MODE_Column;
    }else if( strcmp(z,"-separator")==0 ){
      i++;
      sprintf(data.separator,"%.*s",(int)sizeof(data.separator)-1,argv[i]);
    }else if( strcmp(z,"-nullvalue")==0 ){
      i++;
      sprintf(data.nullvalue,"%.*s",(int)sizeof(data.nullvalue)-1,argv[i]);
    }else if( strcmp(z,"-header")==0 ){
      data.showHeader = 1;
    }else if( strcmp(z,"-noheader")==0 ){
      data.showHeader = 0;
    }else if( strcmp(z,"-echo")==0 ){
      data.echoOn = 1;
    }else if( strcmp(z,"-version")==0 ){
      printf("%s\n", sqlite3_libversion());
      return 0;
    }else if( strcmp(z,"-help")==0 || strcmp(z, "--help")==0 ){
      usage(1);
    }else{
      fprintf(stderr,"%s: unknown option: %s\n", Argv0, z);
      fprintf(stderr,"Use -help for a list of options.\n");
      return 1;
    }
  }

  if( zFirstCmd ){
    /* Run just the command that follows the database name
    */
    if( zFirstCmd[0]=='.' ){
      do_meta_command(zFirstCmd, &data);
      exit(0);
    }else{
      int rc;
      open_db(&data);
      rc = sqlite3_exec(data.db, zFirstCmd, callback, &data, &zErrMsg);
      if( rc!=0 && zErrMsg!=0 ){
        fprintf(stderr,"SQL error: %s\n", zErrMsg);
        exit(1);
      }
    }
  }else{
    /* Run commands received from standard input
    */
    if( isatty(fileno(stdout)) && isatty(fileno(stdin)) ){
      char *zHome;
      char *zHistory = 0;
      printf(
        "SQLite version %s\n"
        "Enter \".help\" for instructions\n",
        sqlite3_libversion()
      );
      zHome = find_home_dir();
      if( zHome && (zHistory = malloc(strlen(zHome)+20))!=0 ){
        sprintf(zHistory,"%s/.sqlite_history", zHome);
      }
#if defined(HAVE_READLINE) && HAVE_READLINE==1
      if( zHistory ) read_history(zHistory);
#endif
      process_input(&data, 0);
      if( zHistory ){
        stifle_history(100);
        write_history(zHistory);
        free(zHistory);
      }
      free(zHome);
    }else{
      process_input(&data, stdin);
    }
  }
  set_table_name(&data, 0);
  if( db ){
    if( sqlite3_close(db)!=SQLITE_OK ){
      fprintf(stderr,"error closing database: %s\n", sqlite3_errmsg(db));
    }
  }
  return 0;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲乱码国产乱码精品精小说| 亚洲一区电影777| 国产精品入口麻豆九色| 一区二区不卡在线播放 | 久久人人爽爽爽人久久久| 亚洲香蕉伊在人在线观| 欧美日韩久久久久久| 天天操天天色综合| 日韩免费视频一区二区| 美女在线一区二区| 久久这里只有精品视频网| 国产精品1区2区3区在线观看| 久久这里只有精品视频网| 成人国产免费视频| 亚洲欧美国产高清| 欧美一区日韩一区| 国产黑丝在线一区二区三区| 国产精品私房写真福利视频| 不卡av在线免费观看| 亚洲精品成人在线| 91麻豆精品国产| 国产在线观看一区二区| 国产精品久久久久久妇女6080| 一本在线高清不卡dvd| 偷拍日韩校园综合在线| 26uuu国产一区二区三区| 成人免费高清在线| 午夜视频在线观看一区二区三区| 欧美一区二区三区婷婷月色 | 国产精品性做久久久久久| 国产精品视频第一区| 色婷婷一区二区三区四区| 午夜精品久久久久久久久 | 欧美大胆一级视频| 99久久久精品| 麻豆成人综合网| 最新日韩av在线| 欧美一区二区三区四区五区| 99精品国产91久久久久久| 日韩电影免费在线观看网站| 国产精品毛片大码女人| 欧美一区二区三区啪啪| 91影院在线观看| 九九热在线视频观看这里只有精品| 国产精品久久久久久久久免费丝袜 | 在线中文字幕一区二区| 经典三级一区二区| 亚洲国产婷婷综合在线精品| 日本一区二区久久| 日韩欧美亚洲国产另类| 欧美视频在线播放| 成人高清视频免费观看| 国产在线精品免费av| 日韩中文字幕1| 亚洲一区自拍偷拍| 国产精品美女久久久久久| 日韩视频在线永久播放| 色欧美乱欧美15图片| 豆国产96在线|亚洲| 久久99国产精品久久99| 午夜电影一区二区三区| 一区二区免费在线播放| 亚洲天堂中文字幕| 国产精品欧美综合在线| 久久人人超碰精品| 欧美精品一区二区三区蜜桃视频| 欧美日韩国产首页在线观看| 色哟哟精品一区| 99精品久久久久久| 成人高清视频免费观看| 成人一区二区视频| 国产精一区二区三区| 黄网站免费久久| 久久99精品国产麻豆不卡| 天天综合天天综合色| 亚洲成av人片一区二区三区| 一区2区3区在线看| 午夜天堂影视香蕉久久| 视频一区在线视频| 日本不卡高清视频| 蜜桃视频在线观看一区| 日本sm残虐另类| 美女脱光内衣内裤视频久久影院| 五月天亚洲婷婷| 天堂午夜影视日韩欧美一区二区| 亚洲欧洲日韩女同| 亚洲欧美日韩国产综合| 亚洲精品成a人| 亚洲免费看黄网站| 亚洲午夜电影在线| 日本aⅴ亚洲精品中文乱码| 久久国产精品99精品国产| 激情六月婷婷久久| 国产成人自拍在线| 91影院在线观看| 欧美剧在线免费观看网站| 日韩色在线观看| 久久精品欧美日韩精品| 国产精品久久久久一区| 亚洲第一成人在线| 久久精品国产秦先生| 成人一级黄色片| av电影在线观看完整版一区二区| 色女孩综合影院| 91精品国产91综合久久蜜臀| 久久新电视剧免费观看| 亚洲人成7777| 美女脱光内衣内裤视频久久网站 | 一区二区视频在线看| 亚洲va中文字幕| 九九九久久久精品| 91丝袜美女网| 欧美成人r级一区二区三区| 国产人久久人人人人爽| 亚洲精品水蜜桃| 久久成人免费电影| 色诱视频网站一区| 欧美成人精品3d动漫h| 国产欧美视频在线观看| 亚洲综合区在线| 国产在线一区二区| 在线视频综合导航| 久久精品一区八戒影视| 亚洲线精品一区二区三区| 韩国午夜理伦三级不卡影院| 色综合激情久久| 国产亚洲综合在线| 五月激情综合色| aaa亚洲精品| 精品久久久久久最新网址| 一区二区三区久久| 国产一区亚洲一区| 欧美美女视频在线观看| 中文字幕一区三区| 久久99国产精品久久| 欧美午夜一区二区三区免费大片| 久久精品人人爽人人爽| 日本欧美在线看| 在线国产亚洲欧美| 国产精品每日更新在线播放网址| 秋霞午夜av一区二区三区| 色久综合一二码| 中日韩免费视频中文字幕| 美女高潮久久久| 欧美精品视频www在线观看| 国产精品久久久久久福利一牛影视 | 99精品视频一区二区三区| 日韩欧美卡一卡二| 午夜久久久影院| 在线观看www91| 日韩理论电影院| 大尺度一区二区| 2021久久国产精品不只是精品 | 日本午夜精品一区二区三区电影| 色婷婷久久久久swag精品| 综合久久综合久久| 东方aⅴ免费观看久久av| 亚洲精品在线观看视频| 免费在线观看日韩欧美| 欧美精品丝袜久久久中文字幕| 一区二区三区**美女毛片| 一本高清dvd不卡在线观看| 国产精品成人免费在线| 粉嫩绯色av一区二区在线观看| 久久免费精品国产久精品久久久久| 日本视频在线一区| 在线不卡欧美精品一区二区三区| 亚洲免费成人av| 91搞黄在线观看| 亚洲一区免费视频| 欧美日韩久久久久久| 午夜不卡av免费| 91精品国产欧美一区二区18| 日韩电影在线一区| 精品久久久久一区二区国产| 激情小说欧美图片| 久久久久久一级片| 国产成人在线电影| 国产精品青草综合久久久久99| 成人午夜电影网站| 成人欧美一区二区三区1314| 色婷婷久久久综合中文字幕| 一区二区三区不卡视频| 欧美日韩小视频| 免费在线观看成人| 久久久久久麻豆| av影院午夜一区| 婷婷一区二区三区| 欧美成人精品1314www| 国产成人午夜片在线观看高清观看| 国产午夜精品久久| 91免费观看视频在线| 亚洲一区中文日韩| 日韩欧美国产综合| 懂色av中文字幕一区二区三区 | 国产电影精品久久禁18| 中文字幕一区二区三区乱码在线 | 国产露脸91国语对白| 国产精品久久久久久久第一福利 | 黄一区二区三区|