aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/complete.c14
-rw-r--r--src/os_unix.c4
-rw-r--r--src/sqliteInt.h8
-rw-r--r--src/tokenize.c10
-rw-r--r--src/vdbeInt.h9
-rw-r--r--src/vdbeaux.c5
6 files changed, 30 insertions, 20 deletions
diff --git a/src/complete.c b/src/complete.c
index 6571df63f..ae61d8ab0 100644
--- a/src/complete.c
+++ b/src/complete.c
@@ -16,7 +16,7 @@
** separating it out, the code will be automatically omitted from
** static links that do not use it.
**
-** $Id: complete.c,v 1.5 2007/08/21 19:33:56 drh Exp $
+** $Id: complete.c,v 1.6 2007/08/27 23:26:59 drh Exp $
*/
#include "sqliteInt.h"
#ifndef SQLITE_OMIT_COMPLETE
@@ -24,8 +24,16 @@
/*
** This is defined in tokenize.c. We just have to import the definition.
*/
-extern const char sqlite3IsIdChar[];
-#define IdChar(C) (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsIdChar[c-0x20]))
+#ifndef SQLITE_AMALGAMATION
+#ifdef SQLITE_ASCII
+extern const char sqlite3IsAsciiIdChar[];
+#define IdChar(C) (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsAsciiIdChar[c-0x20]))
+#endif
+#ifdef SQLITE_EBCDIC
+extern const char sqlite3IsEbcdicIdChar[];
+#define IdChar(C) (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
+#endif
+#endif /* SQLITE_AMALGAMATION */
/*
diff --git a/src/os_unix.c b/src/os_unix.c
index 1b23fef1e..ae36615aa 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2588,10 +2588,10 @@ static void unixDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
}
leaveMutex();
}
-void *unixDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){
+static void *unixDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){
return dlsym(pHandle, zSymbol);
}
-void unixDlClose(sqlite3_vfs *pVfs, void *pHandle){
+static void unixDlClose(sqlite3_vfs *pVfs, void *pHandle){
dlclose(pHandle);
}
#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 86951a31c..1ebc23825 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.601 2007/08/27 21:49:34 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.602 2007/08/27 23:26:59 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -198,7 +198,11 @@ typedef UINT8_TYPE i8; /* 1-byte signed integer */
** Macros to determine whether the machine is big or little endian,
** evaluated at runtime.
*/
+#ifdef SQLITE_AMALGAMATION
+const int sqlite3One;
+#else
extern const int sqlite3one;
+#endif
#if defined(i386) || defined(__i386__) || defined(_M_IX86)
# define SQLITE_BIGENDIAN 0
# define SQLITE_LITTLEENDIAN 1
@@ -1756,7 +1760,9 @@ sqlite3_value *sqlite3ValueNew(sqlite3 *);
char *sqlite3Utf16to8(sqlite3 *, const void*, int);
int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);
+#ifndef SQLITE_AMALGAMATION
extern const unsigned char sqlite3UpperToLower[];
+#endif
void sqlite3RootPageMoved(Db*, int, int);
void sqlite3Reindex(Parse*, Token*, Token*);
void sqlite3AlterFunctions(sqlite3*);
diff --git a/src/tokenize.c b/src/tokenize.c
index 7134c599f..b4a9b9bc4 100644
--- a/src/tokenize.c
+++ b/src/tokenize.c
@@ -15,7 +15,7 @@
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
-** $Id: tokenize.c,v 1.135 2007/08/22 20:18:22 drh Exp $
+** $Id: tokenize.c,v 1.136 2007/08/27 23:26:59 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -85,7 +85,7 @@ const unsigned char ebcdicToAscii[] = {
** But the feature is undocumented.
*/
#ifdef SQLITE_ASCII
-const char sqlite3IsIdChar[] = {
+const char sqlite3IsAsciiIdChar[] = {
/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2x */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 3x */
@@ -94,10 +94,10 @@ const char sqlite3IsIdChar[] = {
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 6x */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 7x */
};
-#define IdChar(C) (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsIdChar[c-0x20]))
+#define IdChar(C) (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsAsciiIdChar[c-0x20]))
#endif
#ifdef SQLITE_EBCDIC
-const char sqlite3IsIdChar[] = {
+const char sqlite3IsEbcdicIdChar[] = {
/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 4x */
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, /* 5x */
@@ -112,7 +112,7 @@ const char sqlite3IsIdChar[] = {
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, /* Ex */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, /* Fx */
};
-#define IdChar(C) (((c=C)>=0x42 && sqlite3IsIdChar[c-0x40]))
+#define IdChar(C) (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
#endif
diff --git a/src/vdbeInt.h b/src/vdbeInt.h
index 37a049e11..cef5cfc24 100644
--- a/src/vdbeInt.h
+++ b/src/vdbeInt.h
@@ -25,13 +25,6 @@
#define keyToInt(X) (X)
#define intToKey(X) (X)
-/*
-** The makefile scans the vdbe.c source file and creates the following
-** array of string constants which are the names of all VDBE opcodes. This
-** array is defined in a separate source code file named opcode.c which is
-** automatically generated by the makefile.
-*/
-extern const char *const sqlite3OpcodeNames[];
/*
** SQL is translated into a sequence of instructions to be
@@ -406,6 +399,8 @@ int sqlite3VdbeMemNumerify(Mem*);
int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*);
void sqlite3VdbeMemRelease(Mem *p);
int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
+const char *sqlite3OpcodeName(int);
+
#ifndef NDEBUG
void sqlite3VdbeMemSanity(Mem*);
int sqlite3VdbeOpcodeNoPush(u8);
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 0c946bdc7..8bf6b831a 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -19,6 +19,7 @@
#include "vdbeInt.h"
+
/*
** When debugging the code generator in a symbolic debugger, one can
** set the sqlite3_vdbe_addop_trace to 1 and all opcodes will be printed
@@ -669,7 +670,7 @@ void sqlite3VdbePrintOp(FILE *pOut, int pc, Op *pOp){
if( pOut==0 ) pOut = stdout;
zP3 = displayP3(pOp, zPtr, sizeof(zPtr));
fprintf(pOut, zFormat1,
- pc, sqlite3OpcodeNames[pOp->opcode], pOp->p1, pOp->p2, zP3);
+ pc, sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, zP3);
fflush(pOut);
}
#endif
@@ -734,7 +735,7 @@ int sqlite3VdbeList(
pMem++;
pMem->flags = MEM_Static|MEM_Str|MEM_Term;
- pMem->z = (char*)sqlite3OpcodeNames[pOp->opcode]; /* Opcode */
+ pMem->z = (char*)sqlite3OpcodeName(pOp->opcode); /* Opcode */
assert( pMem->z!=0 );
pMem->n = strlen(pMem->z);
pMem->type = SQLITE_TEXT;