diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/3rdparty/kexisql | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/3rdparty/kexisql')
25 files changed, 212 insertions, 212 deletions
diff --git a/kexi/3rdparty/kexisql/src/btree.c b/kexi/3rdparty/kexisql/src/btree.c index 02e01249..3a79a624 100644 --- a/kexi/3rdparty/kexisql/src/btree.c +++ b/kexi/3rdparty/kexisql/src/btree.c @@ -47,7 +47,7 @@ ** the file really is a valid BTree database, a pointer to a list of unused ** pages in the file, and some meta information. The root of the first ** BTree begins on page 2 of the file. (Pages are numbered beginning with -** 1, not 0.) Thus a minimum database contains 2 pages. +** 1, not 0.) Thus a minimum database tqcontains 2 pages. */ #include "sqliteInt.h" #include "pager.h" @@ -101,7 +101,7 @@ typedef struct FreelistInfo FreelistInfo; ** This routine rounds up a number of bytes to the next multiple of 4. ** ** This might need to change for computer architectures that require -** and 8-byte alignment boundry for structures. +** and 8-byte tqalignment boundry for structures. */ #define ROUNDUP(X) ((X+3) & ~3) @@ -128,7 +128,7 @@ static const char zMagicHeader[] = /* ** The first page of the database file contains a magic header string -** to identify the file as an SQLite database file. It also contains +** to identify the file as an SQLite database file. It also tqcontains ** a pointer to the first free page of the file. Page 2 contains the ** root of the principle BTree. The file might contain other BTrees ** rooted on pages above 2. @@ -313,9 +313,9 @@ struct FreelistInfo { ** page to hold as many as two more cells than it might otherwise hold. ** The extra two entries in apCell[] are an allowance for this situation. ** -** The pParent field points back to the parent page. This allows us to +** The pParent field points back to the tqparent page. This allows us to ** walk up the BTree from any leaf to the root. Care must be taken to -** unref() the parent page pointer when this page is no longer referenced. +** unref() the tqparent page pointer when this page is no longer referenced. ** The pageDestructor() routine handles that chore. */ struct MemPage { @@ -326,7 +326,7 @@ struct MemPage { u8 isInit; /* True if auxiliary data is initialized */ u8 idxShift; /* True if apCell[] indices have changed */ u8 isOverfull; /* Some apCell[] points outside u.aDisk[] */ - MemPage *pParent; /* The parent of this page. NULL for root */ + MemPage *pParent; /* The tqparent of this page. NULL for root */ int idxParent; /* Index in pParent->apCell[] of this node */ int nFree; /* Number of free bytes in u.aDisk[] */ int nCell; /* Number of entries on this page */ @@ -567,8 +567,8 @@ static void freeSpace(Btree *pBt, MemPage *pPage, int start, int size){ ** Initialize the auxiliary information for a disk block. ** ** The pParent parameter must be a pointer to the MemPage which -** is the parent of the page being initialized. The root of the -** BTree (usually page 2) has no parent and so for that page, +** is the tqparent of the page being initialized. The root of the +** BTree (usually page 2) has no tqparent and so for that page, ** pParent==NULL. ** ** Return SQLITE_OK on success. If we see that the page does @@ -726,7 +726,7 @@ int sqliteBtreeOpen( } /* -** Close an open database and invalidate all cursors. +** Close an open database and tqinvalidate all cursors. */ static int fileBtreeClose(Btree *pBt){ while( pBt->pCursor ){ @@ -1414,7 +1414,7 @@ static int moveToChild(BtCursor *pCur, int newPgno){ } /* -** Move the cursor up to the parent page. +** Move the cursor up to the tqparent page. ** ** pCur->idx is set to the cell index that contains the pointer ** to the page we are coming from. If we are coming from the @@ -1451,7 +1451,7 @@ static void moveToParent(BtCursor *pCur){ }else{ /* The MemPage.idxShift flag indicates that cell indices might have ** changed since idxParent was set and hence idxParent might be out - ** of date. So recompute the parent cell index by scanning all cells + ** of date. So recompute the tqparent cell index by scanning all cells ** and locating the one that points to the child we just came from. */ int i; @@ -1998,9 +1998,9 @@ static void reparentPage(Pager *pPager, Pgno pgno, MemPage *pNewParent,int idx){ } /* -** Reparent all children of the given page to be the given page. +** Retqparent all tqchildren of the given page to be the given page. ** In other words, for every child of pPage, invoke reparentPage() -** to make sure that each child knows that pPage is its parent. +** to make sure that each child knows that pPage is its tqparent. ** ** This routine gets called after you memcpy() one page into ** another. @@ -2141,7 +2141,7 @@ static void copyPage(MemPage *pTo, MemPage *pFrom){ ** of pPage so that all pages have about the same amount of free space. ** Usually one sibling on either side of pPage is used in the balancing, ** though both siblings might come from one side if pPage is the first -** or last child of its parent. If pPage has fewer than two siblings +** or last child of its tqparent. If pPage has fewer than two siblings ** (something which can only happen if pPage is the root page or a ** child of root) then all available siblings participate in the balancing. ** @@ -2168,16 +2168,16 @@ static void copyPage(MemPage *pTo, MemPage *pFrom){ ** if the page is overfull. Part of the job of this routine is to ** make sure all Cells for pPage once again fit in pPage->u.aDisk[]. ** -** In the course of balancing the siblings of pPage, the parent of pPage +** In the course of balancing the siblings of pPage, the tqparent of pPage ** might become overfull or underfull. If that happens, then this routine -** is called recursively on the parent. +** is called recursively on the tqparent. ** ** If this routine fails for any reason, it might leave the database ** in a corrupted state. So if this routine fails, the database should ** be rolled back. */ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ - MemPage *pParent; /* The parent of pPage */ + MemPage *pParent; /* The tqparent of pPage */ int nCell; /* Number of cells in apCell[] */ int nOld; /* Number of pages in apOld[] */ int nNew; /* Number of pages in apNew[] */ @@ -2215,8 +2215,8 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ } /* - ** Find the parent of the page to be balanceed. - ** If there is no parent, it means this page is the root page and + ** Find the tqparent of the page to be balanceed. + ** If there is no tqparent, it means this page is the root page and ** special rules apply. */ pParent = pPage->pParent; @@ -2291,7 +2291,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ assert( pParent->isInit ); /* - ** Find the Cell in the parent page whose h.leftChild points back + ** Find the Cell in the tqparent page whose h.leftChild points back ** to pPage. The "idx" variable is the index of that cell. If pPage ** is the rightmost child of pParent then set idx to pParent->nCell */ @@ -2321,7 +2321,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ ** the siblings. An attempt is made to find NN siblings on either ** side of pPage. More siblings are taken from one side, however, if ** pPage there are fewer than NN siblings on the other side. If pParent - ** has NB or fewer children then all children of pParent are taken. + ** has NB or fewer tqchildren then all tqchildren of pParent are taken. */ nxDiv = idx - NN; if( nxDiv + NB > pParent->nCell ){ @@ -2547,7 +2547,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ } /* - ** Reparent children of all cells. + ** Retqparent tqchildren of all cells. */ for(i=0; i<nNew; i++){ reparentChildPages(pBt, apNew[i]); @@ -2555,7 +2555,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){ reparentChildPages(pBt, pParent); /* - ** balance the parent page. + ** balance the tqparent page. */ rc = balance(pBt, pParent, pCur); @@ -2794,7 +2794,7 @@ static int fileBtreeCreateTable(Btree *pBt, int *piTable){ } /* -** Erase the given database page and all its children. Return +** Erase the given database page and all its tqchildren. Return ** the page to the freelist. */ static int clearDatabasePage(Btree *pBt, Pgno pgno, int freePageFlag){ @@ -3274,8 +3274,8 @@ static int keyCompare( ** 3. Make sure no key is less than or equal to zLowerBound. ** 4. Make sure no key is greater than or equal to zUpperBound. ** 5. Check the integrity of overflow pages. -** 6. Recursively call checkTreePage on all children. -** 7. Verify that the depth of all children is the same. +** 6. Recursively call checkTreePage on all tqchildren. +** 7. Verify that the depth of all tqchildren is the same. ** 8. Make sure this page is at least 33% full or else it is ** the root of the tree. */ diff --git a/kexi/3rdparty/kexisql/src/btree_rb.c b/kexi/3rdparty/kexisql/src/btree_rb.c index 3954fe6d..8d905ef0 100644 --- a/kexi/3rdparty/kexisql/src/btree_rb.c +++ b/kexi/3rdparty/kexisql/src/btree_rb.c @@ -123,7 +123,7 @@ struct BtRbNode { int nData; void *pData; u8 isBlack; /* true for a black node, 0 for a red node */ - BtRbNode *pParent; /* Nodes parent node, NULL for the tree head */ + BtRbNode *pParent; /* Nodes tqparent node, NULL for the tree head */ BtRbNode *pLeft; /* Nodes left child, or NULL */ BtRbNode *pRight; /* Nodes right child, or NULL */ @@ -319,7 +319,7 @@ static void print_node(BtRbNode *pNode) /* * Check the following properties of the red-black tree: - * (1) - If a node is red, both of it's children are black + * (1) - If a node is red, both of it's tqchildren are black * (2) - Each path from a given node to a leaf (NULL) node passes thru the * same number of black nodes * @@ -329,7 +329,7 @@ static void check_redblack_tree(BtRbTree * tree, char ** msg) { BtRbNode *pNode; - /* 0 -> came from parent + /* 0 -> came from tqparent * 1 -> came from left * 2 -> came from right */ int prev_step = 0; @@ -400,34 +400,34 @@ static void check_redblack_tree(BtRbTree * tree, char ** msg) /* * Node pX has just been inserted into pTree (by code in sqliteRbtreeInsert()). - * It is possible that pX is a red node with a red parent, which is a violation + * It is possible that pX is a red node with a red tqparent, which is a violation * of the red-black tree properties. This function performs rotations and * color changes to rebalance the tree */ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX) { /* In the first iteration of this loop, pX points to the red node just - * inserted in the tree. If the parent of pX exists (pX is not the root + * inserted in the tree. If the tqparent of pX exists (pX is not the root * node) and is red, then the properties of the red-black tree are * violated. * * At the start of any subsequent iterations, pX points to a red node - * with a red parent. In all other respects the tree is a legal red-black + * with a red tqparent. In all other respects the tree is a legal red-black * binary tree. */ while( pX != pTree->pHead && !pX->pParent->isBlack ){ BtRbNode *pUncle; - BtRbNode *pGrandparent; + BtRbNode *pGrandtqparent; - /* Grandparent of pX must exist and must be black. */ - pGrandparent = pX->pParent->pParent; - assert( pGrandparent ); - assert( pGrandparent->isBlack ); + /* Grandtqparent of pX must exist and must be black. */ + pGrandtqparent = pX->pParent->pParent; + assert( pGrandtqparent ); + assert( pGrandtqparent->isBlack ); /* Uncle of pX may or may not exist. */ - if( pX->pParent == pGrandparent->pLeft ) - pUncle = pGrandparent->pRight; + if( pX->pParent == pGrandtqparent->pLeft ) + pUncle = pGrandtqparent->pRight; else - pUncle = pGrandparent->pLeft; + pUncle = pGrandtqparent->pLeft; /* If the uncle of pX exists and is red, we do the following: * | | @@ -438,16 +438,16 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX) * X(r) X(r) * * BEFORE AFTER - * pX is then set to G. If the parent of G is red, then the while loop + * pX is then set to G. If the tqparent of G is red, then the while loop * will run again. */ if( pUncle && !pUncle->isBlack ){ - pGrandparent->isBlack = 0; + pGrandtqparent->isBlack = 0; pUncle->isBlack = 1; pX->pParent->isBlack = 1; - pX = pGrandparent; + pX = pGrandtqparent; }else{ - if( pX->pParent == pGrandparent->pLeft ){ + if( pX->pParent == pGrandtqparent->pLeft ){ if( pX == pX->pParent->pRight ){ /* If pX is a right-child, do the following transform, essentially * to change pX into a left-child: @@ -474,10 +474,10 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX) * * BEFORE AFTER */ - assert( pGrandparent == pX->pParent->pParent ); - pGrandparent->isBlack = 0; + assert( pGrandtqparent == pX->pParent->pParent ); + pGrandtqparent->isBlack = 0; pX->pParent->isBlack = 1; - rightRotate( pTree, pGrandparent ); + rightRotate( pTree, pGrandtqparent ); }else{ /* This code is symetric to the illustrated case above. */ @@ -485,10 +485,10 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX) pX = pX->pParent; rightRotate(pTree, pX); } - assert( pGrandparent == pX->pParent->pParent ); - pGrandparent->isBlack = 0; + assert( pGrandtqparent == pX->pParent->pParent ); + pGrandtqparent->isBlack = 0; pX->pParent->isBlack = 1; - leftRotate( pTree, pGrandparent ); + leftRotate( pTree, pGrandtqparent ); } } } @@ -768,7 +768,7 @@ static int memRbtreeInsert( memcpy(pData, pDataInput, nData); /* Move the cursor to a node near the key to be inserted. If the key already - * exists in the table, then (match == 0). In this case we can just replace + * exists in the table, then (match == 0). In this case we can just tqreplace * the data associated with the entry, we don't need to manipulate the tree. * * If there is no exact match, then the cursor points at what would be either @@ -951,10 +951,10 @@ static int memRbtreeDelete(RbtCursor* pCur) } /* First do a standard binary-tree delete (node pZ is to be deleted). How - * to do this depends on how many children pZ has: + * to do this depends on how many tqchildren pZ has: * - * If pZ has no children or one child, then splice out pZ. If pZ has two - * children, splice out the successor of pZ and replace the key and data of + * If pZ has no tqchildren or one child, then splice out pZ. If pZ has two + * tqchildren, splice out the successor of pZ and replace the key and data of * pZ with the key and data of the spliced out successor. */ if( pZ->pLeft && pZ->pRight ){ BtRbNode *pTmp; @@ -1008,7 +1008,7 @@ static int memRbtreeDelete(RbtCursor* pCur) } /* pZ now points at the spliced out node. pChild is the only child of pZ, or - * NULL if pZ has no children. If pZ is black, and not the tree root, then we + * NULL if pZ has no tqchildren. If pZ is black, and not the tree root, then we * will have violated the "same number of black nodes in every path to a * leaf" property of the red-black tree. The code in do_delete_balancing() * repairs this. */ diff --git a/kexi/3rdparty/kexisql/src/build.c b/kexi/3rdparty/kexisql/src/build.c index 1dece406..2fb19064 100644 --- a/kexi/3rdparty/kexisql/src/build.c +++ b/kexi/3rdparty/kexisql/src/build.c @@ -526,7 +526,7 @@ void sqliteStartTable( /* Begin generating the code that will insert the table record into ** the SQLITE_MASTER table. Note in particular that we must go ahead ** and allocate the record number for the table entry now. Before any - ** PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause + ** PRIMARY KEY or UNITQUE keywords are parsed. Those keywords will cause ** indices to be created and the table record must come before the ** indices. Hence, the record number for the table must be allocated ** now. @@ -1461,7 +1461,7 @@ void sqliteDeferForeignKey(Parse *pParse, int isDeferred){ ** Create a new index for an SQL table. pIndex is the name of the index ** and pTable is the name of the table that is to be indexed. Both will ** be NULL for a primary key or an index that is created to satisfy a -** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable +** UNITQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable ** as the table to be indexed. pParse->pNewTable is a table that is ** currently being constructed by a CREATE TABLE statement. ** @@ -1531,7 +1531,7 @@ void sqliteCreateIndex( ** index, then we will continue to process this index. ** ** If pName==0 it means that we are - ** dealing with a primary key or UNIQUE constraint. We have to invent our + ** dealing with a primary key or UNITQUE constraint. We have to invent our ** own name. */ if( pName && !db->init.busy ){ @@ -1673,7 +1673,7 @@ void sqliteCreateIndex( ** we don't want to recreate it. ** ** If pTable==0 it means this index is generated as a primary key - ** or UNIQUE constraint of a CREATE TABLE statement. Since the table + ** or UNITQUE constraint of a CREATE TABLE statement. Since the table ** has just been created, it contains no data and the index initialization ** step can be skipped. */ @@ -1767,7 +1767,7 @@ void sqliteDropIndex(Parse *pParse, SrcList *pName){ goto exit_drop_index; } if( pIndex->autoIndex ){ - sqliteErrorMsg(pParse, "index associated with UNIQUE " + sqliteErrorMsg(pParse, "index associated with UNITQUE " "or PRIMARY KEY constraint cannot be dropped", 0); goto exit_drop_index; } diff --git a/kexi/3rdparty/kexisql/src/encode.c b/kexi/3rdparty/kexisql/src/encode.c index 899901b5..3e14e641 100644 --- a/kexi/3rdparty/kexisql/src/encode.c +++ b/kexi/3rdparty/kexisql/src/encode.c @@ -67,7 +67,7 @@ ** (2) Copy each input character into the output buffer, one by ** one, adding the offset value as you copy. ** -** (3) If the value of an input character plus offset is 0x00, replace +** (3) If the value of an input character plus offset is 0x00, tqreplace ** that one character by the two-character sequence 0x01 0x01. ** If the sum is 0x01, replace it with 0x01 0x02. If the sum ** is 0x27, replace it with 0x01 0x03. @@ -101,7 +101,7 @@ */ /* -** Encode a binary buffer "in" of size n bytes so that it contains +** Encode a binary buffer "in" of size n bytes so that it tqcontains ** no instances of characters '\'' or '\000'. The output is ** null-terminated and can be used as a string value in an INSERT ** or UPDATE statement. Use sqlite_decode_binary() to convert the @@ -231,7 +231,7 @@ int main(int argc, char **argv){ } for(j=0; out[j]; j++){ if( out[j]=='\'' ){ - printf(" ERROR contains (')\n"); + printf(" ERROR tqcontains (')\n"); exit(1); } } diff --git a/kexi/3rdparty/kexisql/src/func.c b/kexi/3rdparty/kexisql/src/func.c index 1e176258..cf0b8baf 100644 --- a/kexi/3rdparty/kexisql/src/func.c +++ b/kexi/3rdparty/kexisql/src/func.c @@ -32,10 +32,10 @@ static void minmaxFunc(sqlite_func *context, int argc, const char **argv){ const char *zBest; int i; int (*xCompare)(const char*, const char*); - int mask; /* 0 for min() or 0xffffffff for max() */ + int tqmask; /* 0 for min() or 0xffffffff for max() */ if( argc==0 ) return; - mask = (int)sqlite_user_data(context); + tqmask = (int)sqlite_user_data(context); zBest = argv[0]; if( zBest==0 ) return; if( argv[1][0]=='n' ){ @@ -45,7 +45,7 @@ static void minmaxFunc(sqlite_func *context, int argc, const char **argv){ } for(i=2; i<argc; i+=2){ if( argv[i]==0 ) return; - if( (xCompare(argv[i], zBest)^mask)<0 ){ + if( (xCompare(argv[i], zBest)^tqmask)<0 ){ zBest = argv[i]; } } @@ -285,7 +285,7 @@ static void versionFunc(sqlite_func *context, int argc, const char **argv){ ** change. This function may disappear. Do not write code that depends ** on this function. ** -** Implementation of the QUOTE() function. This function takes a single +** Implementation of the TQUOTE() function. This function takes a single ** argument. If the argument is numeric, the return value is the same as ** the argument. If the argument is NULL, the return value is the string ** "NULL". Otherwise, the argument is enclosed in single quotes with @@ -365,7 +365,7 @@ static void soundexFunc(sqlite_func *context, int argc, const char **argv){ static void randStr(sqlite_func *context, int argc, const char **argv){ static const unsigned char zSrc[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789" ".-!,:*^+=_|?/<> "; int iMin, iMax, n, r, i; @@ -514,7 +514,7 @@ struct MinMaxCtx { static void minmaxStep(sqlite_func *context, int argc, const char **argv){ MinMaxCtx *p; int (*xCompare)(const char*, const char*); - int mask; /* 0 for min() or 0xffffffff for max() */ + int tqmask; /* 0 for min() or 0xffffffff for max() */ assert( argc==2 ); if( argv[0]==0 ) return; /* Ignore NULL values */ @@ -523,11 +523,11 @@ static void minmaxStep(sqlite_func *context, int argc, const char **argv){ }else{ xCompare = strcmp; } - mask = (int)sqlite_user_data(context); - assert( mask==0 || mask==-1 ); + tqmask = (int)sqlite_user_data(context); + assert( tqmask==0 || tqmask==-1 ); p = sqlite_aggregate_context(context, sizeof(*p)); if( p==0 || argc<1 ) return; - if( p->z==0 || (xCompare(argv[0],p->z)^mask)<0 ){ + if( p->z==0 || (xCompare(argv[0],p->z)^tqmask)<0 ){ int len; if( p->zBuf[0] ){ sqliteFree(p->z); diff --git a/kexi/3rdparty/kexisql/src/insert.c b/kexi/3rdparty/kexisql/src/insert.c index 660a2a56..8c303573 100644 --- a/kexi/3rdparty/kexisql/src/insert.c +++ b/kexi/3rdparty/kexisql/src/insert.c @@ -541,7 +541,7 @@ insert_cleanup: /* ** Generate code to do a constraint check prior to an INSERT or an UPDATE. ** -** When this routine is called, the stack contains (from bottom to top) +** When this routine is called, the stack tqcontains (from bottom to top) ** the following values: ** ** 1. The recno of the row to be updated before the update. This @@ -567,7 +567,7 @@ insert_cleanup: ** aIdxUsed!=0 and aIdxUsed[i]!=0. ** ** This routine also generates code to check constraints. NOT NULL, -** CHECK, and UNIQUE constraints are all checked. If a constraint fails, +** CHECK, and UNITQUE constraints are all checked. If a constraint fails, ** then the appropriate action is performed. There are five possible ** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE. ** @@ -595,7 +595,7 @@ insert_cleanup: ** value for that column. If the default value ** is NULL, the action is the same as ABORT. ** -** UNIQUE REPLACE The other row that conflicts with the row +** UNITQUE REPLACE The other row that conflicts with the row ** being inserted is removed. ** ** CHECK REPLACE Illegal. The results in an exception. @@ -753,7 +753,7 @@ void sqliteGenerateConstraintChecks( } } - /* Test all UNIQUE constraints by creating entries for each UNIQUE + /* Test all UNITQUE constraints by creating entries for each UNITQUE ** index and making sure that duplicate entries do not already exist. ** Add the new records to the indices as we go. */ @@ -777,7 +777,7 @@ void sqliteGenerateConstraintChecks( /* Find out what action to take in case there is an indexing conflict */ onError = pIdx->onError; - if( onError==OE_None ) continue; /* pIdx is not a UNIQUE index */ + if( onError==OE_None ) continue; /* pIdx is not a UNITQUE index */ if( overrideError!=OE_Default ){ onError = overrideError; }else if( pParse->db->onError!=OE_Default ){ @@ -843,7 +843,7 @@ void sqliteGenerateConstraintChecks( default: assert(0); } contAddr = sqliteVdbeCurrentAddr(v); -#if NULL_DISTINCT_FOR_UNIQUE +#if NULL_DISTINCT_FOR_UNITQUE sqliteVdbeChangeP2(v, jumpInst1, contAddr); #endif sqliteVdbeChangeP2(v, jumpInst2, contAddr); diff --git a/kexi/3rdparty/kexisql/src/main.c b/kexi/3rdparty/kexisql/src/main.c index c883f2ea..4fc118c8 100644 --- a/kexi/3rdparty/kexisql/src/main.c +++ b/kexi/3rdparty/kexisql/src/main.c @@ -90,7 +90,7 @@ int sqliteInitCallback(void *pInit, int argc, char **argv, char **azColName){ db->init.iDb = 0; }else{ /* If the SQL column is blank it means this is an index that - ** was created to be the PRIMARY KEY or to fulfill a UNIQUE + ** was created to be the PRIMARY KEY or to fulfill a UNITQUE ** constraint for a CREATE TABLE. The index should have already ** been created when we processed the CREATE TABLE. All we have ** to do here is record the root page number for that index. diff --git a/kexi/3rdparty/kexisql/src/os.c b/kexi/3rdparty/kexisql/src/os.c index 16576924..fc0f91e2 100644 --- a/kexi/3rdparty/kexisql/src/os.c +++ b/kexi/3rdparty/kexisql/src/os.c @@ -172,7 +172,7 @@ static unsigned int elapse; ** ** If you close a file descriptor that points to a file that has locks, ** all locks on that file that are owned by the current process are -** released. To work around this problem, each OsFile structure contains +** released. To work around this problem, each OsFile structure tqcontains ** a pointer to an openCnt structure. There is one openCnt structure ** per open inode, which means that multiple OsFiles can point to a single ** openCnt. When an attempt is made to close an OsFile, if there are @@ -531,11 +531,11 @@ int sqliteOsOpenReadWrite( if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrShPerm, &(id->refNum)) != noErr ){ - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrPerm, &(id->refNum)) != noErr ){ - if (FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if (FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; else @@ -650,7 +650,7 @@ int sqliteOsOpenExclusive(const char *zFilename, OsFile *id, int delFlag){ if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdWrPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; # else @@ -724,7 +724,7 @@ int sqliteOsOpenReadOnly(const char *zFilename, OsFile *id){ if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr ) return SQLITE_CANTOPEN; FSGetDataForkName(&dfName); - if( FSOpenFork(&fsRef, dfName.length, dfName.unicode, + if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode, fsRdPerm, &(id->refNum)) != noErr ) return SQLITE_CANTOPEN; # else @@ -800,7 +800,7 @@ int sqliteOsTempFileName(char *zBuf){ }; static unsigned char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; struct stat buf; @@ -827,7 +827,7 @@ int sqliteOsTempFileName(char *zBuf){ #if OS_WIN static char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; const char *zDir; @@ -854,7 +854,7 @@ int sqliteOsTempFileName(char *zBuf){ #if OS_MAC static char zChars[] = "abcdefghijklmnopqrstuvwxyz" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "0123456789"; int i, j; char *zDir; @@ -1398,20 +1398,20 @@ int sqliteOsReadLock(OsFile *id){ params.ioParam.ioRefNum = id->refNumRF; params.ioParam.ioPosMode = fsFromStart; params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; while( cnt-->0 && (res = PBLockRangeSync(¶ms))!=noErr ){ UInt32 finalTicks; Delay(1, &finalTicks); /* 1/60 sec */ } if( res == noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; PBUnlockRangeSync(¶ms); params.ioParam.ioPosOffset = FIRST_LOCKBYTE+lk; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; res = PBLockRangeSync(¶ms); params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); } if( res == noErr ){ @@ -1504,24 +1504,24 @@ int sqliteOsWriteLock(OsFile *id){ params.ioParam.ioRefNum = id->refNumRF; params.ioParam.ioPosMode = fsFromStart; params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; while( cnt-->0 && (res = PBLockRangeSync(¶ms))!=noErr ){ UInt32 finalTicks; Delay(1, &finalTicks); /* 1/60 sec */ } if( res == noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE + id->locked; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; if( id->locked==0 || PBUnlockRangeSync(¶ms)==noErr ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; res = PBLockRangeSync(¶ms); }else{ res = afpRangeNotLocked; } params.ioParam.ioPosOffset = FIRST_LOCKBYTE; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); } if( res == noErr ){ @@ -1611,13 +1611,13 @@ int sqliteOsUnlock(OsFile *id){ rc = SQLITE_OK; }else if( id->locked<0 ){ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1; - params.ioParam.ioReqCount = N_LOCKBYTE; + params.ioParam.ioRetqCount = N_LOCKBYTE; PBUnlockRangeSync(¶ms); rc = SQLITE_OK; id->locked = 0; }else{ params.ioParam.ioPosOffset = FIRST_LOCKBYTE+id->locked; - params.ioParam.ioReqCount = 1; + params.ioParam.ioRetqCount = 1; PBUnlockRangeSync(¶ms); rc = SQLITE_OK; id->locked = 0; diff --git a/kexi/3rdparty/kexisql/src/pager.c b/kexi/3rdparty/kexisql/src/pager.c index 0ce24086..5259e085 100644 --- a/kexi/3rdparty/kexisql/src/pager.c +++ b/kexi/3rdparty/kexisql/src/pager.c @@ -435,7 +435,7 @@ static PgHdr *pager_lookup(Pager *pPager, Pgno pgno){ /* ** Unlock the database and clear the in-memory cache. This routine ** sets the state of the pager back to what it was when it was first -** opened. Any outstanding pages are invalidated and subsequent attempts +** opened. Any outstanding pages are tqinvalidated and subsequent attempts ** to access those pages will likely result in a coredump. */ static void pager_reset(Pager *pPager){ @@ -1059,7 +1059,7 @@ int sqlitepager_truncate(Pager *pPager, Pgno nPage){ ** Shutdown the page cache. Free all memory and close all files. ** ** If a transaction was in progress when this routine is called, that -** transaction is rolled back. All outstanding pages are invalidated +** transaction is rolled back. All outstanding pages are tqinvalidated ** and their memory is freed. Any attempt to use a page associated ** with this page cache after this function returns will likely ** result in a coredump. @@ -1920,7 +1920,7 @@ int sqlitepager_overwrite(Pager *pPager, Pgno pgno, void *pData){ ** a transaction then removed from the freelist during a later part ** of the same transaction and reused for some other purpose. When it ** is first added to the freelist, this routine is called. When reused, -** the dont_rollback() routine is called. But because the page contains +** the dont_rollback() routine is called. But because the page tqcontains ** critical data, we still need to be sure it gets rolled back in spite ** of the dont_rollback() call. */ diff --git a/kexi/3rdparty/kexisql/src/parse.c b/kexi/3rdparty/kexisql/src/parse.c index 46353691..77b09c5b 100644 --- a/kexi/3rdparty/kexisql/src/parse.c +++ b/kexi/3rdparty/kexisql/src/parse.c @@ -97,7 +97,7 @@ typedef union { IdList* yy320; ExprList* yy322; int yy372; - struct {int value; int mask;} yy407; + struct {int value; int tqmask;} yy407; int yy441; } YYMINORTYPE; #define YYSTACKDEPTH 100 @@ -711,7 +711,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* FLOAT => nothing */ 0, /* NULL => nothing */ 0, /* PRIMARY => nothing */ - 0, /* UNIQUE => nothing */ + 0, /* UNITQUE => nothing */ 0, /* CHECK => nothing */ 0, /* REFERENCES => nothing */ 0, /* COLLATE => nothing */ @@ -840,7 +840,7 @@ static const char *yyTokenName[] = { "STAR", "SLASH", "REM", "CONCAT", "UMINUS", "UPLUS", "BITNOT", "STRING", "JOIN_KW", "INTEGER", "CONSTRAINT", "DEFAULT", - "FLOAT", "NULL", "PRIMARY", "UNIQUE", + "FLOAT", "NULL", "PRIMARY", "UNITQUE", "CHECK", "REFERENCES", "COLLATE", "ON", "DELETE", "UPDATE", "INSERT", "SET", "DEFERRABLE", "FOREIGN", "DROP", "UNION", @@ -935,7 +935,7 @@ static const char *yyRuleName[] = { /* 53 */ "ccons ::= NULL onconf", /* 54 */ "ccons ::= NOT NULL onconf", /* 55 */ "ccons ::= PRIMARY KEY sortorder onconf", - /* 56 */ "ccons ::= UNIQUE onconf", + /* 56 */ "ccons ::= UNITQUE onconf", /* 57 */ "ccons ::= CHECK LP expr RP onconf", /* 58 */ "ccons ::= REFERENCES nm idxlist_opt refargs", /* 59 */ "ccons ::= defer_subclause", @@ -962,7 +962,7 @@ static const char *yyRuleName[] = { /* 80 */ "conslist ::= tcons", /* 81 */ "tcons ::= CONSTRAINT nm", /* 82 */ "tcons ::= PRIMARY KEY LP idxlist RP onconf", - /* 83 */ "tcons ::= UNIQUE LP idxlist RP onconf", + /* 83 */ "tcons ::= UNITQUE LP idxlist RP onconf", /* 84 */ "tcons ::= CHECK expr onconf", /* 85 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt", /* 86 */ "defer_subclause_opt ::=", @@ -1115,7 +1115,7 @@ static const char *yyRuleName[] = { /* 233 */ "expritem ::= expr", /* 234 */ "expritem ::=", /* 235 */ "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf", - /* 236 */ "uniqueflag ::= UNIQUE", + /* 236 */ "uniqueflag ::= UNITQUE", /* 237 */ "uniqueflag ::=", /* 238 */ "idxlist_opt ::=", /* 239 */ "idxlist_opt ::= LP idxlist RP", @@ -2183,7 +2183,7 @@ static void yy_reduce( #line 191 "parse.y" {sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy372,0,0);} #line 2185 "parse.c" - /* No destructor defined for UNIQUE */ + /* No destructor defined for UNITQUE */ break; case 57: /* No destructor defined for CHECK */ @@ -2218,33 +2218,33 @@ static void yy_reduce( break; case 62: #line 207 "parse.y" -{ yygotominor.yy372 = (yymsp[-1].minor.yy372 & yymsp[0].minor.yy407.mask) | yymsp[0].minor.yy407.value; } +{ yygotominor.yy372 = (yymsp[-1].minor.yy372 & yymsp[0].minor.yy407.tqmask) | yymsp[0].minor.yy407.value; } #line 2222 "parse.c" break; case 63: #line 209 "parse.y" -{ yygotominor.yy407.value = 0; yygotominor.yy407.mask = 0x000000; } +{ yygotominor.yy407.value = 0; yygotominor.yy407.tqmask = 0x000000; } #line 2227 "parse.c" /* No destructor defined for MATCH */ /* No destructor defined for nm */ break; case 64: #line 210 "parse.y" -{ yygotominor.yy407.value = yymsp[0].minor.yy372; yygotominor.yy407.mask = 0x0000ff; } +{ yygotominor.yy407.value = yymsp[0].minor.yy372; yygotominor.yy407.tqmask = 0x0000ff; } #line 2234 "parse.c" /* No destructor defined for ON */ /* No destructor defined for DELETE */ break; case 65: #line 211 "parse.y" -{ yygotominor.yy407.value = yymsp[0].minor.yy372<<8; yygotominor.yy407.mask = 0x00ff00; } +{ yygotominor.yy407.value = yymsp[0].minor.yy372<<8; yygotominor.yy407.tqmask = 0x00ff00; } #line 2241 "parse.c" /* No destructor defined for ON */ /* No destructor defined for UPDATE */ break; case 66: #line 212 "parse.y" -{ yygotominor.yy407.value = yymsp[0].minor.yy372<<16; yygotominor.yy407.mask = 0xff0000; } +{ yygotominor.yy407.value = yymsp[0].minor.yy372<<16; yygotominor.yy407.tqmask = 0xff0000; } #line 2248 "parse.c" /* No destructor defined for ON */ /* No destructor defined for INSERT */ @@ -2342,7 +2342,7 @@ static void yy_reduce( #line 238 "parse.y" {sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy320,yymsp[0].minor.yy372,0,0);} #line 2344 "parse.c" - /* No destructor defined for UNIQUE */ + /* No destructor defined for UNITQUE */ /* No destructor defined for LP */ /* No destructor defined for RP */ break; @@ -3428,7 +3428,7 @@ static void yy_reduce( #line 740 "parse.y" { yygotominor.yy372 = OE_Abort; } #line 3430 "parse.c" - /* No destructor defined for UNIQUE */ + /* No destructor defined for UNITQUE */ break; case 237: #line 741 "parse.y" diff --git a/kexi/3rdparty/kexisql/src/parse.h b/kexi/3rdparty/kexisql/src/parse.h index 188a336c..35949283 100644 --- a/kexi/3rdparty/kexisql/src/parse.h +++ b/kexi/3rdparty/kexisql/src/parse.h @@ -92,7 +92,7 @@ #define TK_FLOAT 92 #define TK_NULL 93 #define TK_PRIMARY 94 -#define TK_UNIQUE 95 +#define TK_UNITQUE 95 #define TK_CHECK 96 #define TK_REFERENCES 97 #define TK_COLLATE 98 diff --git a/kexi/3rdparty/kexisql/src/parse.y b/kexi/3rdparty/kexisql/src/parse.y index 29bb493b..ad0f3716 100644 --- a/kexi/3rdparty/kexisql/src/parse.y +++ b/kexi/3rdparty/kexisql/src/parse.y @@ -193,12 +193,12 @@ ccons ::= COLLATE id(C). { // %type refargs {int} refargs(A) ::= . { A = OE_Restrict * 0x010101; } -refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.mask) | Y.value; } -%type refarg {struct {int value; int mask;}} -refarg(A) ::= MATCH nm. { A.value = 0; A.mask = 0x000000; } -refarg(A) ::= ON DELETE refact(X). { A.value = X; A.mask = 0x0000ff; } -refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.mask = 0x00ff00; } -refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.mask = 0xff0000; } +refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.tqmask) | Y.value; } +%type refarg {struct {int value; int tqmask;}} +refarg(A) ::= MATCH nm. { A.value = 0; A.tqmask = 0x000000; } +refarg(A) ::= ON DELETE refact(X). { A.value = X; A.tqmask = 0x0000ff; } +refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.tqmask = 0x00ff00; } +refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.tqmask = 0xff0000; } %type refact {int} refact(A) ::= SET NULL. { A = OE_SetNull; } refact(A) ::= SET DEFAULT. { A = OE_SetDflt; } diff --git a/kexi/3rdparty/kexisql/src/pragma.c b/kexi/3rdparty/kexisql/src/pragma.c index 4f102657..7b100a70 100644 --- a/kexi/3rdparty/kexisql/src/pragma.c +++ b/kexi/3rdparty/kexisql/src/pragma.c @@ -114,7 +114,7 @@ static int changeTempStorage(Parse *pParse, const char *zStorageType){ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){ static const struct { const char *zName; /* Name of the pragma */ - int mask; /* Mask for the db->flags value */ + int tqmask; /* Mask for the db->flags value */ } aPragma[] = { { "vdbe_trace", SQLITE_VdbeTrace }, { "full_column_names", SQLITE_FullColNames }, @@ -131,13 +131,13 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){ if( strcmp(zLeft,zRight)==0 && (v = sqliteGetVdbe(pParse))!=0 ){ sqliteVdbeOp3(v, OP_ColumnName, 0, 1, aPragma[i].zName, P3_STATIC); sqliteVdbeOp3(v, OP_ColumnName, 1, 0, "boolean", P3_STATIC); - sqliteVdbeCode(v, OP_Integer, (db->flags & aPragma[i].mask)!=0, 0, + sqliteVdbeCode(v, OP_Integer, (db->flags & aPragma[i].tqmask)!=0, 0, OP_Callback, 1, 0, 0); }else if( getBoolean(zRight) ){ - db->flags |= aPragma[i].mask; + db->flags |= aPragma[i].tqmask; }else{ - db->flags &= ~aPragma[i].mask; + db->flags &= ~aPragma[i].tqmask; } return 1; } diff --git a/kexi/3rdparty/kexisql/src/select.c b/kexi/3rdparty/kexisql/src/select.c index 7ae02d33..cc13aec8 100644 --- a/kexi/3rdparty/kexisql/src/select.c +++ b/kexi/3rdparty/kexisql/src/select.c @@ -1634,7 +1634,7 @@ substExprList(ExprList *pList, int iTable, ExprList *pEList){ */ static int flattenSubquery( Parse *pParse, /* The parsing context */ - Select *p, /* The parent or outer SELECT statement */ + Select *p, /* The tqparent or outer SELECT statement */ int iFrom, /* Index in p->pSrc->a[] of the inner subquery */ int isAgg, /* True if outer SELECT uses aggregate functions */ int subqueryIsAgg /* True if the subquery uses aggregate functions */ @@ -1707,7 +1707,7 @@ static int flattenSubquery( ** the FROM clause of the outer query. Before doing this, remember ** the cursor number for the original outer query FROM element in ** iParent. The iParent cursor will never be used. Subsequent code - ** will scan expressions looking for iParent references and replace + ** will scan expressions looking for iParent references and tqreplace ** those references with expressions that resolve to the subquery FROM ** elements we are now copying in. */ @@ -1985,10 +1985,10 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){ ** This routine does NOT free the Select structure passed in. The ** calling function needs to do that. ** -** The pParent, parentTab, and *pParentAgg fields are filled in if this +** The pParent, tqparentTab, and *pParentAgg fields are filled in if this ** SELECT is a subquery. This routine may try to combine this SELECT -** with its parent to form a single flat query. In so doing, it might -** change the parent query from a non-aggregate to an aggregate query. +** with its tqparent to form a single flat query. In so doing, it might +** change the tqparent query from a non-aggregate to an aggregate query. ** For that reason, the pParentAgg flag is passed as a pointer, so it ** can be changed. ** @@ -2003,7 +2003,7 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){ ** pParent will be NULL. During the processing of the outer query, this ** routine is called recursively to handle the subquery. For the recursive ** call, pParent will point to the outer query. Because the subquery is -** the second element in a three-way join, the parentTab parameter will +** the second element in a three-way join, the tqparentTab parameter will ** be 1 (the 2nd value of a 0-indexed array.) */ int sqliteSelect( @@ -2012,7 +2012,7 @@ int sqliteSelect( int eDest, /* How to dispose of the results */ int iParm, /* A parameter used by the eDest disposal method */ Select *pParent, /* Another SELECT for which this is a sub-query */ - int parentTab, /* Index in pParent->pSrc of this query */ + int tqparentTab, /* Index in pParent->pSrc of this query */ int *pParentAgg /* True if pParent uses aggregate functions */ ){ int i; @@ -2228,11 +2228,11 @@ int sqliteSelect( goto select_end; } - /* Check to see if this is a subquery that can be "flattened" into its parent. + /* Check to see if this is a subquery that can be "flattened" into its tqparent. ** If flattening is a possiblity, do so and return immediately. */ if( pParent && pParentAgg && - flattenSubquery(pParse, pParent, parentTab, *pParentAgg, isAgg) ){ + flattenSubquery(pParse, pParent, tqparentTab, *pParentAgg, isAgg) ){ if( isAgg ) *pParentAgg = 1; return rc; } @@ -2409,15 +2409,15 @@ int sqliteSelect( } /* If this was a subquery, we have now converted the subquery into a - ** temporary table. So delete the subquery structure from the parent + ** temporary table. So delete the subquery structure from the tqparent ** to prevent this subquery from being evaluated again and to force the ** the use of the temporary table. */ if( pParent ){ - assert( pParent->pSrc->nSrc>parentTab ); - assert( pParent->pSrc->a[parentTab].pSelect==p ); + assert( pParent->pSrc->nSrc>tqparentTab ); + assert( pParent->pSrc->a[tqparentTab].pSelect==p ); sqliteSelectDelete(p); - pParent->pSrc->a[parentTab].pSelect = 0; + pParent->pSrc->a[tqparentTab].pSelect = 0; } /* The SELECT was successfully coded. Set the return code to 0 diff --git a/kexi/3rdparty/kexisql/src/sqlite.h b/kexi/3rdparty/kexisql/src/sqlite.h index dd227cd0..4264cc1b 100644 --- a/kexi/3rdparty/kexisql/src/sqlite.h +++ b/kexi/3rdparty/kexisql/src/sqlite.h @@ -828,7 +828,7 @@ int sqlite_rekey( ); /* -** Encode a binary buffer "in" of size n bytes so that it contains +** Encode a binary buffer "in" of size n bytes so that it tqcontains ** no instances of characters '\'' or '\000'. The output is ** null-terminated and can be used as a string value in an INSERT ** or UPDATE statement. Use sqlite_decode_binary() to convert the diff --git a/kexi/3rdparty/kexisql/src/sqliteInt.h b/kexi/3rdparty/kexisql/src/sqliteInt.h index dd0710f9..ca5a85e9 100644 --- a/kexi/3rdparty/kexisql/src/sqliteInt.h +++ b/kexi/3rdparty/kexisql/src/sqliteInt.h @@ -45,16 +45,16 @@ /* ** If the following macro is set to 1, then NULL values are considered ** distinct when determining whether or not two entries are the same -** in a UNIQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL, +** in a UNITQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL, ** OCELOT, and Firebird all work. The SQL92 spec explicitly says this ** is the way things are suppose to work. ** ** If the following macro is set to 0, the NULLs are indistinct for -** a UNIQUE index. In this mode, you can only have a single NULL entry -** for a column declared UNIQUE. This is the way Informix and SQL Server +** a UNITQUE index. In this mode, you can only have a single NULL entry +** for a column declared UNITQUE. This is the way Informix and SQL Server ** work. */ -#define NULL_DISTINCT_FOR_UNIQUE 1 +#define NULL_DISTINCT_FOR_UNITQUE 1 /* ** The maximum number of attached databases. This must be at least 2 @@ -563,7 +563,7 @@ struct FKey { ** occurs. IGNORE means that the particular row that caused the constraint ** error is not inserted or updated. Processing continues and no error ** is returned. REPLACE means that preexisting database rows that caused -** a UNIQUE constraint violation are removed so that the new insert or +** a UNITQUE constraint violation are removed so that the new insert or ** update can proceed. Processing continues and no error is reported. ** ** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys. @@ -623,7 +623,7 @@ struct Index { Table *pTable; /* The SQL table being indexed */ int tnum; /* Page containing root of this index in database file */ u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */ - u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */ + u8 autoIndex; /* True if is automatically created (ex: by UNITQUE) */ u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */ Index *pNext; /* The next index associated with the same table */ }; @@ -1053,9 +1053,9 @@ struct TriggerStep { * * struct TriggerStack has a "pNext" member, to allow linked lists to be * constructed. When coding nested triggers (triggers fired by other triggers) - * each nested trigger stores its parent trigger's TriggerStack as the "pNext" + * each nested trigger stores its tqparent trigger's TriggerStack as the "pNext" * pointer. Once the nested trigger has been coded, the pNext value is restored - * to the pTriggerStack member of the Parse stucture and coding of the parent + * to the pTriggerStack member of the Parse stucture and coding of the tqparent * trigger continues. * * Before a nested trigger is coded, the linked list pointed to by the diff --git a/kexi/3rdparty/kexisql/src/tclsqlite.c b/kexi/3rdparty/kexisql/src/tclsqlite.c index fdc2f5e8..7256eafe 100644 --- a/kexi/3rdparty/kexisql/src/tclsqlite.c +++ b/kexi/3rdparty/kexisql/src/tclsqlite.c @@ -999,7 +999,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** DBNAME that is used to control that connection. The database ** connection is deleted when the DBNAME command is deleted. ** -** The second argument is the name of the directory that contains +** The second argument is the name of the directory that tqcontains ** the sqlite database that is to be accessed. ** ** For testing purposes, we also support the following: diff --git a/kexi/3rdparty/kexisql/src/threadtest.c b/kexi/3rdparty/kexisql/src/threadtest.c index 89c79a4c..89b84a10 100644 --- a/kexi/3rdparty/kexisql/src/threadtest.c +++ b/kexi/3rdparty/kexisql/src/threadtest.c @@ -107,7 +107,7 @@ char **db_query(sqlite *db, const char *zFile, const char *zFormat, ...){ va_end(ap); memset(&sResult, 0, sizeof(sResult)); sResult.zFile = zFile; - if( verbose ) printf("QUERY %s: %s\n", zFile, zSql); + if( verbose ) printf("TQUERY %s: %s\n", zFile, zSql); rc = sqlite_exec(db, zSql, db_query_callback, &sResult, &zErrMsg); if( rc==SQLITE_SCHEMA ){ if( zErrMsg ) free(zErrMsg); diff --git a/kexi/3rdparty/kexisql/src/tokenize.c b/kexi/3rdparty/kexisql/src/tokenize.c index 68cb9f99..40fe48ef 100644 --- a/kexi/3rdparty/kexisql/src/tokenize.c +++ b/kexi/3rdparty/kexisql/src/tokenize.c @@ -130,7 +130,7 @@ static Keyword aKeywordTable[] = { { "TRANSACTION", TK_TRANSACTION, }, { "TRIGGER", TK_TRIGGER, }, { "UNION", TK_UNION, }, - { "UNIQUE", TK_UNIQUE, }, + { "UNITQUE", TK_UNITQUE, }, { "UPDATE", TK_UPDATE, }, { "USING", TK_USING, }, { "VACUUM", TK_VACUUM, }, diff --git a/kexi/3rdparty/kexisql/src/util.c b/kexi/3rdparty/kexisql/src/util.c index 09a13c7b..12c3b2d2 100644 --- a/kexi/3rdparty/kexisql/src/util.c +++ b/kexi/3rdparty/kexisql/src/util.c @@ -805,7 +805,7 @@ void sqliteRealToSortable(double r, char *z){ ** This means we can not use the traditional base-64 digit set. */ static const char zDigit[] = "0123456789" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "|~"; if( r<0.0 ){ diff --git a/kexi/3rdparty/kexisql/src/vdbe.c b/kexi/3rdparty/kexisql/src/vdbe.c index fb52ef38..dcf56bf5 100644 --- a/kexi/3rdparty/kexisql/src/vdbe.c +++ b/kexi/3rdparty/kexisql/src/vdbe.c @@ -233,7 +233,7 @@ static int hardDynamicify(Mem *pStack){ } /* -** An ephemeral string value (signified by the MEM_Ephem flag) contains +** An ephemeral string value (signified by the MEM_Ephem flag) tqcontains ** a pointer to a dynamically allocated string where some other entity ** is responsible for deallocating that string. Because the stack entry ** does not control the string, it might be deleted without the stack @@ -309,7 +309,7 @@ static int toInt(const char *zNum, int *pNum){ ** Convert the given stack entity into a integer if it isn't one ** already. ** -** Any prior string or real representation is invalidated. +** Any prior string or real representation is tqinvalidated. ** NULLs are converted into 0. */ #define Integerify(P) if(((P)->flags&MEM_Int)==0){ hardIntegerify(P); } @@ -2741,7 +2741,7 @@ case OP_IsUnique: { /* The last four bytes of the key are different from R. Convert the ** last four bytes of the key into an integer and push it onto the ** stack. (These bytes are the record number of an entry that - ** violates a UNIQUE constraint.) + ** violates a UNITQUE constraint.) */ pTos++; pTos->i = v; @@ -4151,8 +4151,8 @@ case OP_FileOpen: { ** Read a single line of input from the open file (the file opened using ** FileOpen). If we reach end-of-file, jump immediately to P2. If ** we are able to get another line, split the line apart using P3 as -** a delimiter. There should be P1 fields. If the input line contains -** more than P1 fields, ignore the excess. If the input line contains +** a delimiter. There should be P1 fields. If the input line tqcontains +** more than P1 fields, ignore the excess. If the input line tqcontains ** fewer than P1 fields, assume the remaining fields contain NULLs. ** ** Input ends if a line consists of just "\.". A field containing only diff --git a/kexi/3rdparty/kexisql/src/vdbeInt.h b/kexi/3rdparty/kexisql/src/vdbeInt.h index 79b6b51a..3daa74c3 100644 --- a/kexi/3rdparty/kexisql/src/vdbeInt.h +++ b/kexi/3rdparty/kexisql/src/vdbeInt.h @@ -161,7 +161,7 @@ struct sqlite_func { /* ** An Agg structure describes an Aggregator. Each Agg consists of -** zero or more Aggregator elements (AggElem). Each AggElem contains +** zero or more Aggregator elements (AggElem). Each AggElem tqcontains ** a key and one or more values. The values are used in processing ** aggregate functions in a SELECT. The key is used to implement ** the GROUP BY clause of a select. diff --git a/kexi/3rdparty/kexisql/src/where.c b/kexi/3rdparty/kexisql/src/where.c index 714972f8..2b94ad3c 100644 --- a/kexi/3rdparty/kexisql/src/where.c +++ b/kexi/3rdparty/kexisql/src/where.c @@ -29,14 +29,14 @@ struct ExprInfo { ** p->pLeft is not the column of any table */ short int idxRight; /* p->pRight is a column in this table number. -1 if ** p->pRight is not the column of any table */ - unsigned prereqLeft; /* Bitmask of tables referenced by p->pLeft */ - unsigned prereqRight; /* Bitmask of tables referenced by p->pRight */ - unsigned prereqAll; /* Bitmask of tables referenced by p */ + unsigned prereqLeft; /* Bittqmask of tables referenced by p->pLeft */ + unsigned prereqRight; /* Bittqmask of tables referenced by p->pRight */ + unsigned prereqAll; /* Bittqmask of tables referenced by p */ }; /* ** An instance of the following structure keeps track of a mapping -** between VDBE cursor numbers and bitmasks. The VDBE cursor numbers +** between VDBE cursor numbers and bittqmasks. The VDBE cursor numbers ** are small integers contained in SrcList_item.iCursor and Expr.iTable ** fields. For any given WHERE clause, we want to track which cursors ** are being used, so we assign a single bit in a 32-bit word to track @@ -81,12 +81,12 @@ static int exprSplit(int nSlot, ExprInfo *aSlot, Expr *pExpr){ } /* -** Initialize an expression mask set +** Initialize an expression tqmask set */ #define initMaskSet(P) memset(P, 0, sizeof(*P)) /* -** Return the bitmask for the given cursor. Assign a new bitmask +** Return the bittqmask for the given cursor. Assign a new bittqmask ** if this is the first time the cursor has been seen. */ static int getMask(ExprMaskSet *pMaskSet, int iCursor){ @@ -103,13 +103,13 @@ static int getMask(ExprMaskSet *pMaskSet, int iCursor){ } /* -** Destroy an expression mask set +** Destroy an expression tqmask set */ #define freeMaskSet(P) /* NO-OP */ /* ** This routine walks (recursively) an expression tree and generates -** a bitmask indicating which tables are used in that expression +** a bittqmask indicating which tables are used in that expression ** tree. ** ** In order for this routine to work, the calling function must have @@ -120,26 +120,26 @@ static int getMask(ExprMaskSet *pMaskSet, int iCursor){ ** the VDBE cursor number of the table. */ static int exprTableUsage(ExprMaskSet *pMaskSet, Expr *p){ - unsigned int mask = 0; + unsigned int tqmask = 0; if( p==0 ) return 0; if( p->op==TK_COLUMN ){ - mask = getMask(pMaskSet, p->iTable); - if( mask==0 ) mask = -1; - return mask; + tqmask = getMask(pMaskSet, p->iTable); + if( tqmask==0 ) tqmask = -1; + return tqmask; } if( p->pRight ){ - mask = exprTableUsage(pMaskSet, p->pRight); + tqmask = exprTableUsage(pMaskSet, p->pRight); } if( p->pLeft ){ - mask |= exprTableUsage(pMaskSet, p->pLeft); + tqmask |= exprTableUsage(pMaskSet, p->pLeft); } if( p->pList ){ int i; for(i=0; i<p->pList->nExpr; i++){ - mask |= exprTableUsage(pMaskSet, p->pList->a[i].pExpr); + tqmask |= exprTableUsage(pMaskSet, p->pList->a[i].pExpr); } } - return mask; + return tqmask; } /* @@ -302,7 +302,7 @@ static void disableTerm(WhereLevel *pLevel, Expr **ppExpr){ /* ** Generate the beginning of the loop used for WHERE clause processing. -** The return value is a pointer to an (opaque) structure that contains +** The return value is a pointer to an (opaque) structure that tqcontains ** information needed to terminate the loop. Later, the calling routine ** should invoke sqliteWhereEnd() with the return value of this function ** in order to complete the WHERE clause processing. @@ -391,7 +391,7 @@ WhereInfo *sqliteWhereBegin( int nExpr; /* Number of subexpressions in the WHERE clause */ int loopMask; /* One bit set for each outer loop */ int haveKey; /* True if KEY is on the stack */ - ExprMaskSet maskSet; /* The expression mask set */ + ExprMaskSet tqmaskSet; /* The expression tqmask set */ int iDirectEq[32]; /* Term of the form ROWID==X for the N-th table */ int iDirectLt[32]; /* Term of the form ROWID<X or ROWID<=X */ int iDirectGt[32]; /* Term of the form ROWID>X or ROWID>=X */ @@ -407,7 +407,7 @@ WhereInfo *sqliteWhereBegin( ** array fills up, the last entry might point to an expression which ** contains additional unfactored AND operators. */ - initMaskSet(&maskSet); + initMaskSet(&tqmaskSet); memset(aExpr, 0, sizeof(aExpr)); nExpr = exprSplit(ARRAYSIZE(aExpr), aExpr, pWhere); if( nExpr==ARRAYSIZE(aExpr) ){ @@ -440,24 +440,24 @@ WhereInfo *sqliteWhereBegin( /* Analyze all of the subexpressions. */ for(i=0; i<nExpr; i++){ - exprAnalyze(&maskSet, &aExpr[i]); + exprAnalyze(&tqmaskSet, &aExpr[i]); /* If we are executing a trigger body, remove all references to - ** new.* and old.* tables from the prerequisite masks. + ** new.* and old.* tables from the prerequisite tqmasks. */ if( pParse->trigStack ){ int x; if( (x = pParse->trigStack->newIdx) >= 0 ){ - int mask = ~getMask(&maskSet, x); - aExpr[i].prereqRight &= mask; - aExpr[i].prereqLeft &= mask; - aExpr[i].prereqAll &= mask; + int tqmask = ~getMask(&tqmaskSet, x); + aExpr[i].prereqRight &= tqmask; + aExpr[i].prereqLeft &= tqmask; + aExpr[i].prereqAll &= tqmask; } if( (x = pParse->trigStack->oldIdx) >= 0 ){ - int mask = ~getMask(&maskSet, x); - aExpr[i].prereqRight &= mask; - aExpr[i].prereqLeft &= mask; - aExpr[i].prereqAll &= mask; + int tqmask = ~getMask(&tqmaskSet, x); + aExpr[i].prereqRight &= tqmask; + aExpr[i].prereqLeft &= tqmask; + aExpr[i].prereqAll &= tqmask; } } } @@ -476,13 +476,13 @@ WhereInfo *sqliteWhereBegin( ** ** Actually, if there are more than 32 tables in the join, only the ** first 32 tables are candidates for indices. This is (again) due - ** to the limit of 32 bits in an integer bitmask. + ** to the limit of 32 bits in an integer bittqmask. */ loopMask = 0; for(i=0; i<pTabList->nSrc && i<ARRAYSIZE(iDirectEq); i++){ int j; int iCur = pTabList->a[i].iCursor; /* The cursor for this table */ - int mask = getMask(&maskSet, iCur); /* Cursor mask for this table */ + int tqmask = getMask(&tqmaskSet, iCur); /* Cursor tqmask for this table */ Table *pTab = pTabList->a[i].pTab; Index *pIdx; Index *pBestIdx = 0; @@ -524,7 +524,7 @@ WhereInfo *sqliteWhereBegin( } } if( iDirectEq[i]>=0 ){ - loopMask |= mask; + loopMask |= tqmask; pWInfo->a[i].pIdx = 0; continue; } @@ -651,7 +651,7 @@ WhereInfo *sqliteWhereBegin( pWInfo->a[i].pIdx = pBestIdx; pWInfo->a[i].score = bestScore; pWInfo->a[i].bRev = 0; - loopMask |= mask; + loopMask |= tqmask; if( pBestIdx ){ pWInfo->a[i].iCur = pParse->nTab++; pWInfo->peakNTab = pParse->nTab; @@ -1132,7 +1132,7 @@ WhereInfo *sqliteWhereBegin( pLevel->p1 = pLevel->iCur; pLevel->p2 = start; } - loopMask |= getMask(&maskSet, iCur); + loopMask |= getMask(&tqmaskSet, iCur); /* Insert code to test every subexpression that can be completely ** computed using the current set of tables. @@ -1179,7 +1179,7 @@ WhereInfo *sqliteWhereBegin( if( pushKey && !haveKey ){ sqliteVdbeAddOp(v, OP_Recno, pTabList->a[0].iCursor, 0); } - freeMaskSet(&maskSet); + freeMaskSet(&tqmaskSet); return pWInfo; } diff --git a/kexi/3rdparty/kexisql/tool/lemon.c b/kexi/3rdparty/kexisql/tool/lemon.c index b801e6b3..84f73d17 100644 --- a/kexi/3rdparty/kexisql/tool/lemon.c +++ b/kexi/3rdparty/kexisql/tool/lemon.c @@ -298,7 +298,7 @@ char *Strsafe(); void Strsafe_init(/* void */); int Strsafe_insert(/* char * */); -char *Strsafe_find(/* char * */); +char *Strsafe_tqfind(/* char * */); /* Routines for handling symbols of the grammar */ @@ -306,7 +306,7 @@ struct symbol *Symbol_new(); int Symbolcmpp(/* struct symbol **, struct symbol ** */); void Symbol_init(/* void */); int Symbol_insert(/* struct symbol *, char * */); -struct symbol *Symbol_find(/* char * */); +struct symbol *Symbol_tqfind(/* char * */); struct symbol *Symbol_Nth(/* int */); int Symbol_count(/* */); struct symbol **Symbol_arrayof(/* */); @@ -317,14 +317,14 @@ int Configcmp(/* struct config *, struct config * */); struct state *State_new(); void State_init(/* void */); int State_insert(/* struct state *, struct config * */); -struct state *State_find(/* struct config * */); +struct state *State_tqfind(/* struct config * */); struct state **State_arrayof(/* */); /* Routines used for efficiency in Configlist_add */ void Configtable_init(/* void */); int Configtable_insert(/* struct config * */); -struct config *Configtable_find(/* struct config * */); +struct config *Configtable_tqfind(/* struct config * */); void Configtable_clear(/* int(*)(struct config *) */); /****************** From the file "action.c" *******************************/ /* @@ -510,7 +510,7 @@ struct lemon *lemp; /* Find the start symbol */ if( lemp->start ){ - sp = Symbol_find(lemp->start); + sp = Symbol_tqfind(lemp->start); if( sp==0 ){ ErrorMsg(lemp->filename,0, "The specified start symbol \"%s\" is not \ @@ -571,7 +571,7 @@ struct lemon *lemp; bp = Configlist_basis(); /* Get a state with the same basis */ - stp = State_find(bp); + stp = State_tqfind(bp); if( stp ){ /* A state with the same basis already exists! Copy all the follow-set ** propagation links from the state under construction into the @@ -755,7 +755,7 @@ struct lemon *lemp; /* Add the accepting token */ if( lemp->start ){ - sp = Symbol_find(lemp->start); + sp = Symbol_tqfind(lemp->start); if( sp==0 ) sp = lemp->rule->lhs; }else{ sp = lemp->rule->lhs; @@ -933,7 +933,7 @@ int dot; /* Index into the RHS of the rule where the dot goes */ assert( currentend!=0 ); model.rp = rp; model.dot = dot; - cfp = Configtable_find(&model); + cfp = Configtable_tqfind(&model); if( cfp==0 ){ cfp = newconfig(); cfp->rp = rp; @@ -961,7 +961,7 @@ int dot; assert( currentend!=0 ); model.rp = rp; model.dot = dot; - cfp = Configtable_find(&model); + cfp = Configtable_tqfind(&model); if( cfp==0 ){ cfp = newconfig(); cfp->rp = rp; @@ -2542,10 +2542,10 @@ struct lemon *lemp; /* Search for the file "name" which is in the same directory as ** the exacutable */ -PRIVATE char *pathsearch(argv0,name,modemask) +PRIVATE char *pathsearch(argv0,name,modetqmask) char *argv0; char *name; -int modemask; +int modetqmask; { char *pathlist; char *path,*cp; @@ -2578,7 +2578,7 @@ int modemask; *cp = c; if( c==0 ) pathlist = ""; else pathlist = &cp[1]; - if( access(path,modemask)==0 ) break; + if( access(path,modetqmask)==0 ) break; } } } @@ -3470,7 +3470,7 @@ char *y; { char *z; - z = Strsafe_find(y); + z = Strsafe_tqfind(y); if( z==0 && (z=malloc( strlen(y)+1 ))!=0 ){ strcpy(z,y); Strsafe_insert(z); @@ -3581,7 +3581,7 @@ char *data; /* Return a pointer to data assigned to the given key. Return NULL ** if no such key. */ -char *Strsafe_find(key) +char *Strsafe_tqfind(key) char *key; { int h; @@ -3605,7 +3605,7 @@ char *x; { struct symbol *sp; - sp = Symbol_find(x); + sp = Symbol_tqfind(x); if( sp==0 ){ sp = (struct symbol *)malloc( sizeof(struct symbol) ); MemoryCheck(sp); @@ -3738,7 +3738,7 @@ char *key; /* Return a pointer to data assigned to the given key. Return NULL ** if no such key. */ -struct symbol *Symbol_find(key) +struct symbol *Symbol_tqfind(key) char *key; { int h; @@ -3944,7 +3944,7 @@ struct config *key; /* Return a pointer to data assigned to the given key. Return NULL ** if no such key. */ -struct state *State_find(key) +struct state *State_tqfind(key) struct config *key; { int h; @@ -4087,7 +4087,7 @@ struct config *data; /* Return a pointer to data assigned to the given key. Return NULL ** if no such key. */ -struct config *Configtable_find(key) +struct config *Configtable_tqfind(key) struct config *key; { int h; diff --git a/kexi/3rdparty/kexisql/tool/lempar.c b/kexi/3rdparty/kexisql/tool/lempar.c index 5604fe10..b6ffceb0 100644 --- a/kexi/3rdparty/kexisql/tool/lempar.c +++ b/kexi/3rdparty/kexisql/tool/lempar.c @@ -58,7 +58,7 @@ #define YY_NO_ACTION (YYNSTATE+YYNRULE+2) #define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1) #define YY_ERROR_ACTION (YYNSTATE+YYNRULE) -/* Next is the action table. Each entry in this table contains +/* Next is the action table. Each entry in this table tqcontains ** ** + An integer which is the number representing the look-ahead ** token |