亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
中文字幕av资源一区| 免费看日韩a级影片| 日韩一二三区不卡| 欧美精品在线视频| 欧美日本在线看| 宅男在线国产精品| 日韩一级成人av| 26uuu国产电影一区二区| 久久久亚洲精品一区二区三区 | 欧美精品粉嫩高潮一区二区| 亚洲女同ⅹxx女同tv| 国产精品久久久久影视| 国产精品成人一区二区艾草| 中文字幕亚洲一区二区av在线| 国产精品日韩成人| 自拍偷自拍亚洲精品播放| 伊人开心综合网| 亚洲成在人线在线播放| 蜜桃av噜噜一区| 成人app网站| 在线观看视频一区二区 | 亚洲激情在线激情| 亚洲国产精品成人久久综合一区| 欧美国产欧美综合| 一级女性全黄久久生活片免费| 视频一区二区三区中文字幕| 九一久久久久久| 成人综合日日夜夜| 欧美视频一区在线观看| 精品久久久久久综合日本欧美| 国产女同性恋一区二区| 一级精品视频在线观看宜春院 | 乱一区二区av| 成人高清视频免费观看| 欧美日韩精品是欧美日韩精品| 欧美v国产在线一区二区三区| 国产精品国产自产拍高清av| 性欧美疯狂xxxxbbbb| 国产精品一二三在| 欧美三级蜜桃2在线观看| 久久精品夜色噜噜亚洲aⅴ| 一区二区三区不卡在线观看| 激情都市一区二区| 精品在线你懂的| 国产精品欧美一级免费| 亚洲国产aⅴ成人精品无吗| 国模套图日韩精品一区二区| 99国产精品视频免费观看| 日韩一区二区高清| 亚洲综合色视频| 国产精品亚洲第一区在线暖暖韩国| 一本高清dvd不卡在线观看| 26uuu色噜噜精品一区二区| 亚洲免费av观看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 91免费在线看| 欧美激情一区二区三区在线| 久久99在线观看| 欧美精品黑人性xxxx| 亚洲欧美在线另类| 成人精品视频一区二区三区尤物| 欧美一级二级三级乱码| 午夜久久电影网| 欧美性色黄大片| 一区二区三区在线观看视频| 成人国产精品视频| 国产婷婷色一区二区三区四区| 久久精品国产一区二区| 欧美成人福利视频| 久久99精品国产麻豆婷婷洗澡| 欧美精品 日韩| 日日噜噜夜夜狠狠视频欧美人| 欧美日韩一卡二卡| 亚洲成人手机在线| 制服丝袜亚洲网站| 免费人成精品欧美精品| 日韩欧美成人激情| 国产自产v一区二区三区c| 精品日韩欧美在线| 国产在线一区观看| 欧美国产日韩精品免费观看| 波多野结衣在线一区| 18欧美乱大交hd1984| 91女神在线视频| 亚洲丰满少妇videoshd| 欧美一区二区三区免费在线看| 日本网站在线观看一区二区三区| 欧美一级视频精品观看| 国模冰冰炮一区二区| 国产精品私人自拍| 色欧美片视频在线观看在线视频| 国产成人在线视频网站| 蜜桃视频在线观看一区二区| 3atv一区二区三区| 青青草97国产精品免费观看| www亚洲一区| 国产成人久久精品77777最新版本| 国产精品家庭影院| 欧洲生活片亚洲生活在线观看| 亚洲自拍偷拍九九九| 日韩亚洲欧美在线观看| 国产成人鲁色资源国产91色综| 亚洲男同性恋视频| 日韩精品资源二区在线| 丁香激情综合五月| 亚洲一区电影777| 国产日韩综合av| 欧美色综合影院| 国产suv精品一区二区三区| 一区二区三区四区不卡视频| 欧美日韩色综合| 免费在线观看视频一区| 亚洲国产成人私人影院tom| 在线观看成人免费视频| 国产自产高清不卡| 亚洲国产色一区| 久久久99免费| 欧美片网站yy| 成人午夜在线视频| 蜜臀av性久久久久蜜臀aⅴ| 亚洲天堂av老司机| 久久久久久综合| 欧美高清激情brazzers| 99免费精品视频| 国产在线精品免费| 舔着乳尖日韩一区| 成人欧美一区二区三区黑人麻豆| 欧美一区二区三区性视频| 色哟哟精品一区| 成人激情动漫在线观看| 久久超碰97人人做人人爱| 午夜亚洲国产au精品一区二区| 欧美激情一区在线| 久久免费看少妇高潮| 欧美大尺度电影在线| 91黄色小视频| 91免费精品国自产拍在线不卡| 国产成人丝袜美腿| 久草中文综合在线| 蜜桃久久久久久| 久久精品国内一区二区三区| 亚洲一线二线三线久久久| 亚洲视频狠狠干| 亚洲欧洲精品一区二区三区不卡| 精品国产一区二区三区久久久蜜月 | 亚洲欧美激情插| 欧美国产精品一区二区三区| 精品国产伦理网| 精品捆绑美女sm三区| 欧美一区国产二区| 日韩欧美国产麻豆| 日韩欧美www| 久久中文字幕电影| 国产欧美一区二区精品性色超碰 | 免费在线视频一区| 免费在线观看不卡| 麻豆久久久久久久| 国产一区二区成人久久免费影院 | 国产精品午夜免费| 综合欧美亚洲日本| 亚洲午夜久久久久久久久电影网| 亚洲成人第一页| 麻豆久久久久久久| 国产成人在线观看| 99久久婷婷国产| 欧美日韩国产不卡| 日韩欧美国产综合在线一区二区三区| 精品日韩在线一区| 欧美激情艳妇裸体舞| 亚洲婷婷国产精品电影人久久| 一区二区三区高清不卡| 免费在线观看成人| 国产精品99久久久久| 色婷婷一区二区三区四区| 欧美一区二区三区性视频| 久久精品一区蜜桃臀影院| 亚洲乱码中文字幕| 日本视频免费一区| 成人黄色国产精品网站大全在线免费观看 | 国产麻豆成人传媒免费观看| 99久精品国产| 日韩免费观看高清完整版在线观看| 久久精品一二三| 亚洲午夜在线电影| 国产精品1区2区3区在线观看| 91极品美女在线| 欧美www视频| 亚洲一区二区视频在线观看| 久久精品噜噜噜成人88aⅴ| 不卡一区二区三区四区| 91精品国产一区二区三区香蕉| 26uuu国产日韩综合| 亚洲国产精品一区二区尤物区| 国产在线精品一区二区三区不卡| 日本精品免费观看高清观看| 久久亚洲一区二区三区四区| 一区二区欧美精品| 国产aⅴ综合色| 91精品综合久久久久久| 亚洲人成电影网站色mp4|