From 88ec761548b66f58acc1a86cdd0fc164ca925476 Mon Sep 17 00:00:00 2001 From: SVN Migration Date: Sun, 15 Oct 2006 21:09:28 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'PECL_OPENSSL'. --- ext/pdo_sqlite/sqlite/tool/showdb.c | 86 ------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 ext/pdo_sqlite/sqlite/tool/showdb.c (limited to 'ext/pdo_sqlite/sqlite/tool/showdb.c') diff --git a/ext/pdo_sqlite/sqlite/tool/showdb.c b/ext/pdo_sqlite/sqlite/tool/showdb.c deleted file mode 100644 index b2ed562e95..0000000000 --- a/ext/pdo_sqlite/sqlite/tool/showdb.c +++ /dev/null @@ -1,86 +0,0 @@ -/* -** A utility for printing all or part of an SQLite database file. -*/ -#include -#include -#include -#include -#include -#include -#include - - -static int pagesize = 1024; -static int db = -1; -static int mxPage = 0; -static int perLine = 32; - -static void out_of_memory(void){ - fprintf(stderr,"Out of memory...\n"); - exit(1); -} - -static print_page(int iPg){ - unsigned char *aData; - int i, j; - aData = malloc(pagesize); - if( aData==0 ) out_of_memory(); - lseek(db, (iPg-1)*pagesize, SEEK_SET); - read(db, aData, pagesize); - fprintf(stdout, "Page %d:\n", iPg); - for(i=0; imxPage ){ - fprintf(stderr, - "Page argument should be LOWER?..UPPER?. Range 1 to %d\n", - mxPage); - exit(1); - } - while( iStart<=iEnd ){ - print_page(iStart); - iStart++; - } - } - } - close(db); -} -- cgit v1.2.1