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

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

?? cryptshell.c

?? 定時器for timer for ic chip
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*
** 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.185 2008/08/11 19:12:35 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 seconds */
static double timeDiff(struct timeval *pStart, struct timeval *pEnd){
  return (pEnd->tv_usec - pStart->tv_usec)*0.000001 + 
         (double)(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",
       timeDiff(&sBegin.ru_utime, &sEnd.ru_utime),
       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_IOTRACE
static 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_IOTRACE
static 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 */
  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_Explain  8  /* Like MODE_Column, but do not truncate data */

static const char *modeDescr[] = {
  "line",
  "column",
  "list",
  "semi",
  "html",
  "insert",
  "tcl",
  "csv",
  "explain",
};

/*
** 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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区精华| 91尤物视频在线观看| 91精品国产综合久久精品图片| 亚洲午夜久久久久久久久电影院| 91视频com| 午夜日韩在线电影| 日韩欧美成人一区| 成人精品一区二区三区中文字幕| 中文字幕免费不卡| 91成人在线观看喷潮| 日韩和的一区二区| 26uuu久久天堂性欧美| 国产精品亚洲а∨天堂免在线| 中文字幕欧美国产| 在线观看国产日韩| 麻豆国产欧美一区二区三区| 久久久影院官网| 色婷婷综合久久久中文字幕| 亚洲一区二区三区中文字幕在线| 欧美人体做爰大胆视频| 久久99日本精品| 国产精品三级视频| 欧美午夜精品一区二区三区| 久久国产夜色精品鲁鲁99| 中文字幕欧美区| 欧美剧在线免费观看网站| 久久99精品国产.久久久久久| 国产精品视频免费看| 欧美日韩在线不卡| 国产成人亚洲综合色影视| 亚洲卡通欧美制服中文| 精品久久99ma| 97aⅴ精品视频一二三区| 琪琪一区二区三区| 自拍av一区二区三区| 日韩欧美在线一区二区三区| www.欧美.com| 国产在线精品一区二区不卡了 | 蜜桃传媒麻豆第一区在线观看| 国产三级一区二区| 欧美一区日本一区韩国一区| av在线播放一区二区三区| 日本麻豆一区二区三区视频| 日韩一区在线免费观看| 欧美岛国在线观看| 欧美三区免费完整视频在线观看| 国产一区二区伦理片| 午夜精品久久一牛影视| 亚洲视频一区二区免费在线观看| 精品美女在线播放| 91精品国产91久久久久久一区二区| 成人精品高清在线| 国产毛片精品视频| 喷白浆一区二区| 亚洲成av人片在www色猫咪| 自拍偷拍欧美激情| 亚洲国产精品传媒在线观看| 欧美不卡一区二区三区四区| 欧美丰满少妇xxxbbb| 欧美羞羞免费网站| 色综合久久天天| 波多野结衣中文字幕一区二区三区| 蜜桃视频免费观看一区| 视频一区免费在线观看| 亚洲大片免费看| 一区二区三区加勒比av| 亚洲美女在线国产| 最新国产成人在线观看| 中文字幕中文乱码欧美一区二区| 国产亚洲综合在线| 国产日韩精品一区二区浪潮av| 亚洲精品在线观看网站| 欧美一区二区在线看| 欧美精品色综合| 欧美精品自拍偷拍动漫精品| 欧美日韩久久久久久| 欧美日韩国产色站一区二区三区| 欧美年轻男男videosbes| 欧美日韩一区小说| 欧美嫩在线观看| 制服丝袜国产精品| 欧美一级视频精品观看| 亚洲精品在线电影| 久久久蜜桃精品| 欧美国产精品v| 亚洲免费观看高清完整版在线观看熊 | 青青草国产精品亚洲专区无| 青青草97国产精品免费观看无弹窗版| 丝袜亚洲另类欧美综合| 奇米四色…亚洲| 国产精品一区一区三区| 成人黄页在线观看| 欧美在线观看一二区| 3atv在线一区二区三区| 精品欧美一区二区久久| 国产三级一区二区| 亚洲综合色在线| 久久99久久久欧美国产| 国产精品夜夜嗨| 日本黄色一区二区| 日韩一区二区在线看| 国产欧美久久久精品影院| 亚洲老妇xxxxxx| 日韩1区2区3区| 国产成人精品一区二| 99国产欧美另类久久久精品| 在线观看亚洲一区| 精品欧美乱码久久久久久1区2区| 欧美激情一区二区三区全黄| 亚洲在线视频免费观看| 激情综合亚洲精品| 色8久久人人97超碰香蕉987| 日韩精品一区在线| 中文字幕五月欧美| 免费久久99精品国产| 成人精品免费视频| 91麻豆精品国产91久久久资源速度 | a亚洲天堂av| 欧美日韩国产成人在线免费| 久久久精品国产免费观看同学| 亚洲日本一区二区三区| 美国三级日本三级久久99| 91香蕉视频mp4| 精品国偷自产国产一区| 一区二区三区小说| 国产激情精品久久久第一区二区 | 不卡一区二区三区四区| 91精品国产综合久久香蕉的特点| 国产欧美一区二区精品婷婷| 天堂精品中文字幕在线| 99久久国产免费看| 久久久午夜精品| 日本午夜精品一区二区三区电影| 不卡的电影网站| 久久综合九色欧美综合狠狠| 一二三四社区欧美黄| 成人伦理片在线| 久久伊99综合婷婷久久伊| 亚洲国产欧美另类丝袜| 99久久国产免费看| 久久精品一级爱片| 免费一级片91| 51精品国自产在线| 亚洲午夜久久久久久久久电影网 | 91精品国产欧美一区二区成人| 亚洲欧美电影一区二区| 国产精品综合av一区二区国产馆| 777午夜精品视频在线播放| 亚洲私人黄色宅男| 成人av高清在线| 久久蜜桃av一区精品变态类天堂| 蜜臀久久99精品久久久久宅男| 欧美精品少妇一区二区三区| 亚洲国产中文字幕在线视频综合| 99视频有精品| 国产精品视频看| 成人综合婷婷国产精品久久| 久久综合九色综合97_久久久| 蜜臀av性久久久久蜜臀aⅴ| 欧美日韩成人综合天天影院| 一区av在线播放| 在线国产亚洲欧美| 亚洲精品高清在线| 色婷婷精品久久二区二区蜜臂av | 欧美一级理论片| 亚洲成人黄色小说| 欧美日韩1234| 视频一区国产视频| 日韩精品最新网址| 六月婷婷色综合| 精品精品国产高清一毛片一天堂| 麻豆精品在线播放| 精品久久久久av影院 | 亚洲一区二区三区中文字幕在线| 91一区二区三区在线播放| 亚洲少妇屁股交4| 91国偷自产一区二区开放时间 | 91在线国产福利| 亚洲愉拍自拍另类高清精品| 欧美日韩你懂得| 日韩影视精彩在线| 精品欧美一区二区三区精品久久| 国产在线精品免费| 国产精品久久久久久久蜜臀| 99久久久精品| 亚洲成a人片在线观看中文| 日韩欧美国产电影| 国产精品69久久久久水密桃 | 亚洲国产日韩a在线播放性色| 欧美日韩一本到| 国产资源在线一区| 1000精品久久久久久久久| 日本丶国产丶欧美色综合| 秋霞午夜鲁丝一区二区老狼| 精品成人私密视频| 9色porny自拍视频一区二区| 亚洲妇熟xx妇色黄| 久久精品水蜜桃av综合天堂| 色偷偷久久一区二区三区| 日本美女一区二区|