From b217a57eb9eb4ef81db4a4f565449e52f5f4e2c0 Mon Sep 17 00:00:00 2001
From: drh
Date: Tue, 22 Aug 2000 13:40:18 +0000
Subject: [PATCH] :-) (CVS 138)
FossilOrigin-Name: c6b71d9b4b09243401072eaa278fd1b9757a9c3d
---
Makefile.in | 4 ++--
manifest | 20 ++++++++++----------
manifest.uuid | 2 +-
src/main.c | 7 ++++++-
src/shell.c | 6 ++++--
src/sqlite.h.in | 14 ++++++++++----
www/c_interface.tcl | 14 +++++++++++++-
7 files changed, 46 insertions(+), 21 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index f25a886aa6..5eafdcb388 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -127,8 +127,8 @@ parse.c: $(TOP)/src/parse.y lemon
cp $(TOP)/src/parse.y .
./lemon parse.y
-sqlite.h: $(TOP)/src/sqlite.h.in
- sed s/--VERS--/`cat ${TOP}/VERSION`/ $(TOP)/src/sqlite.h.in >sqlite.h
+sqlite.h: $(TOP)/src/sqlite.h.in
+ sed -e s/--VERS--/`cat ${TOP}/VERSION`/ $(TOP)/src/sqlite.h.in >sqlite.h
tokenize.o: $(TOP)/src/tokenize.c $(HDR)
$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/tokenize.c
diff --git a/manifest b/manifest
index c96b17a641..632bbbd797 100644
--- a/manifest
+++ b/manifest
@@ -1,7 +1,7 @@
-C :-)\s(CVS\s137)
-D 2000-08-22T13:27:22
+C :-)\s(CVS\s138)
+D 2000-08-22T13:40:19
F COPYRIGHT 74a8a6531a42e124df07ab5599aad63870fa0bd4
-F Makefile.in 8a4cc1bdcbb870f76d0c769136cf973af07586a4
+F Makefile.in 40e7bddffa1607ae6b39eaa05736f85014179ae6
F README 51f6a4e7408b34afa5bc1c0485f61b6a4efb6958
F VERSION 880d9396e60cb9e65a3af230f9467412553b6d50
F configure 078a370347baf9375baa8053857ca1e6bc84afa7 x
@@ -13,12 +13,12 @@ F src/dbbe.h 6337132f904e72ecb28b07390021c241397e4cbf
F src/delete.c 4d491eaf61b515516749c7ed68fa3b2ee8a09065
F src/expr.c 2fa63f086707176d09092e71832f9bbdc6a8ac85
F src/insert.c f146f149ad2422a1dc3bfa7a1651a25940f98958
-F src/main.c ba16b81890d962821bb90f0a4de9a29b0e495eb2
+F src/main.c 6cd0bb4a97538de366d62cb8614f57f529606e02
F src/parse.y 5d199034de5d29ebedb42c1c51f34db4df40cbe5
F src/select.c d382e96c2221d08367cc87976f2b574537c9de97
-F src/shell.c 9bbb37f344c9be466bb30b931f81e51c22c5f8a3
+F src/shell.c 061186b1a4f0884037d067f0f102ec5d382119b5
F src/shell.tcl 27ecbd63dd88396ad16d81ab44f73e6c0ea9d20e
-F src/sqlite.h.in fe04454ae51f9f3717179ffe5a10a25874643ced
+F src/sqlite.h.in d341439fc1432c7d7014bcff5f7b6e914571232c
F src/sqliteInt.h f6d1e139b3bfa4ceff2136684e19d76b53178ec0
F src/tclsqlite.c 89dc4ba2b521f3e919d6d7aaa4cc1c2aba8e16f3
F src/tokenize.c 097bec5843d4a0fb4509e036fee93bac080c5e73
@@ -60,7 +60,7 @@ F tool/renumberOps.awk 6d067177ad5f8d711b79577b462da9b3634bd0a9
F www/arch.fig 4e26e9dca3c49724fc8f554c695ddea9f2413156
F www/arch.png c4d908b79065a72e7dcf19317f36d1324c550e87
F www/arch.tcl 4f6a9afecc099a27bba17b4f8cc9561abc15dc40
-F www/c_interface.tcl 29593cf77025bab137b7ba64b9459eb5eb6b4873
+F www/c_interface.tcl 1b79e404a0dd46f44cd453a44b01df568c9586d1
F www/changes.tcl 197d2e5988a3cc77c313cfe000ba0c067bd3a37d
F www/crosscompile.tcl 19734ce7f18b16ff2ed8479412abf8aca56e1dcc
F www/fileformat.tcl cfb7fba80b7275555281ba2f256c00734bcdd1c9
@@ -70,7 +70,7 @@ F www/mingw.tcl fc5f4ba9d336b6e8c97347cc6496d6162461ef60
F www/opcode.tcl cb3a1abf8b7b9be9f3a228d097d6bf8b742c2b6f
F www/sqlite.tcl cb0d23d8f061a80543928755ec7775da6e4f362f
F www/vdbe.tcl bcbfc33bcdd0ebad95eab31286adb9e1bc289520
-P 6f4c080739333dbbc3556b5cf96f341f62167646
-R b5d26585ea2e71d67d64e7c3e6937e75
+P 5f6559ee7b82eb18078ddbb14d815d0ae0c7ff50
+R 64114100e2cc388d99f60e3d88077864
U drh
-Z 4f5a35213265d7d63373a8859f6cfa0e
+Z 3df5bf9d610de68f6a2e27fb03b18543
diff --git a/manifest.uuid b/manifest.uuid
index 40fb5c3d3f..f11019b9ac 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-5f6559ee7b82eb18078ddbb14d815d0ae0c7ff50
\ No newline at end of file
+c6b71d9b4b09243401072eaa278fd1b9757a9c3d
\ No newline at end of file
diff --git a/src/main.c b/src/main.c
index 0aded49f2a..67b1552605 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,7 +26,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.16 2000/08/02 13:47:42 drh Exp $
+** $Id: main.c,v 1.17 2000/08/22 13:40:19 drh Exp $
*/
#include "sqliteInt.h"
@@ -184,6 +184,11 @@ static int sqliteInit(sqlite *db, char **pzErrMsg){
return rc;
}
+/*
+** The version of the library
+*/
+const char sqlite_version[] = SQLITE_VERSION_STRING;
+
/*
** Open a new SQLite database. Construct an "sqlite" structure to define
** the state of this database and return a pointer to that structure.
diff --git a/src/shell.c b/src/shell.c
index 8297be6dfa..bc05f76edd 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -24,7 +24,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
-** $Id: shell.c,v 1.22 2000/08/22 13:27:22 drh Exp $
+** $Id: shell.c,v 1.23 2000/08/22 13:40:19 drh Exp $
*/
#include
#include
@@ -684,7 +684,9 @@ int main(int argc, char **argv){
int istty = isatty(0);
if( istty ){
printf(
- "Enter \".help\" for instructions\n"
+ "SQLite version %s\n"
+ "Enter \".help\" for instructions\n",
+ sqlite_version
);
}
while( (zLine = one_input_line(zSql, istty))!=0 ){
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 0056c0d2fa..1c43c2f3a9 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -24,16 +24,22 @@
** This header file defines the interface that the sqlite library
** presents to client programs.
**
-** @(#) $Id: sqlite.h.in,v 1.1 2000/08/17 10:22:34 drh Exp $
+** @(#) $Id: sqlite.h.in,v 1.2 2000/08/22 13:40:20 drh Exp $
*/
#ifndef _SQLITE_H_
#define _SQLITE_H_
/*
-** The version of the SQLite library
+** The version of the SQLite library.
*/
-#define SQLITE_VERSION --VERS--
-#define SQLITE_VERSION_STRING "--VERS--"
+#define SQLITE_VERSION "--VERS--"
+
+/*
+** The version string is also compiled into the library so that a program
+** can check to make sure that the lib*.a file and the *.h file are from
+** the same version.
+*/
+extern const char sqlite_version[];
/*
** Each open sqlite database is represented by an instance of the
diff --git a/www/c_interface.tcl b/www/c_interface.tcl
index c144716d83..15a73a0f6c 100644
--- a/www/c_interface.tcl
+++ b/www/c_interface.tcl
@@ -1,7 +1,7 @@
#
# Run this Tcl script to generate the sqlite.html file.
#
-set rcsid {$Id: c_interface.tcl,v 1.6 2000/07/28 14:32:51 drh Exp $}
+set rcsid {$Id: c_interface.tcl,v 1.7 2000/08/22 13:40:20 drh Exp $}
puts {
@@ -48,6 +48,8 @@ void sqlite_busy_handler(sqlite*, int (*)(void*,const char*,int), void*);
void sqlite_busy_timeout(sqlite*, int ms);
+const char sqlite_version[];
+
#define SQLITE_OK 0 /* Successful result */
#define SQLITE_INTERNAL 1 /* An internal logic error in SQLite */
#define SQLITE_ERROR 2 /* SQL error or missing database */
@@ -230,6 +232,16 @@ then sqlite_exec() is called and the input buffer is reset. If
the continuation prompt and another line of text is read and added to
the input buffer.
+Library version string
+
+The SQLite library exports the string constant named
+sqlite_version which contains the version number of the
+library. The header file contains a macro SQLITE_VERSION
+with the same information. If desired, a program can compare
+the SQLITE_VERSION macro against the sqlite_version
+string constant to verify that the version number of the
+header file and the library match.
+
Changing the libraries reponse to locked files
The GDBM library supports database locks at the file level.