aboutsummaryrefslogtreecommitdiff
path: root/ext/misc
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2025-03-14 11:14:52 +0000
committerstephan <stephan@noemail.net>2025-03-14 11:14:52 +0000
commit5390f95f071ae83d2d89742b7a94ec1bfec6f6ff (patch)
tree3eba9019d68ded8463afa908365f262326ede5d9 /ext/misc
parent69eaadbee3dc5912aba995288bfb20eeeb1222e6 (diff)
parent1560045c328e5dc3b9a09e9c975b8626f984ef4f (diff)
downloadsqlite-5390f95f071ae83d2d89742b7a94ec1bfec6f6ff.tar.gz
sqlite-5390f95f071ae83d2d89742b7a94ec1bfec6f6ff.zip
Minor doc corrections for the sahpool-digest fix and merge in current trunk.
FossilOrigin-Name: 500f2e6ec74b4c0e4ac0365ba4e0d81ed6df8dd09dc0f8af65d294c3453f8865
Diffstat (limited to 'ext/misc')
-rw-r--r--ext/misc/amatch.c4
-rw-r--r--ext/misc/btreeinfo.c2
-rw-r--r--ext/misc/completion.c7
-rw-r--r--ext/misc/csv.c2
-rw-r--r--ext/misc/decimal.c7
-rw-r--r--ext/misc/fuzzer.c4
-rw-r--r--ext/misc/ieee754.c2
-rw-r--r--ext/misc/normalize.c2
-rw-r--r--ext/misc/percentile.c2
-rw-r--r--ext/misc/series.c8
-rw-r--r--ext/misc/shathree.c2
-rw-r--r--ext/misc/uint.c2
-rw-r--r--ext/misc/vfstrace.c2
13 files changed, 26 insertions, 20 deletions
diff --git a/ext/misc/amatch.c b/ext/misc/amatch.c
index dd9bee53d..b3fcbac50 100644
--- a/ext/misc/amatch.c
+++ b/ext/misc/amatch.c
@@ -482,9 +482,9 @@ struct amatch_rule {
amatch_rule *pNext; /* Next rule in order of increasing rCost */
char *zFrom; /* Transform from (a string from user input) */
amatch_cost rCost; /* Cost of this transformation */
- amatch_langid iLang; /* The langauge to which this rule belongs */
+ amatch_langid iLang; /* The language to which this rule belongs */
amatch_len nFrom, nTo; /* Length of the zFrom and zTo strings */
- char zTo[4]; /* Tranform to V.W value (extra space appended) */
+ char zTo[4]; /* Transform to V.W value (extra space appended) */
};
/*
diff --git a/ext/misc/btreeinfo.c b/ext/misc/btreeinfo.c
index 02f8c0319..9c726f5f1 100644
--- a/ext/misc/btreeinfo.c
+++ b/ext/misc/btreeinfo.c
@@ -49,7 +49,7 @@
** USAGE EXAMPLES:
**
** Show the table btrees in a schema order with the tables with the most
-** rows occuring first:
+** rows occurring first:
**
** SELECT name, nEntry
** FROM sqlite_btreeinfo
diff --git a/ext/misc/completion.c b/ext/misc/completion.c
index 54abc0ae1..0a6db1a22 100644
--- a/ext/misc/completion.c
+++ b/ext/misc/completion.c
@@ -41,6 +41,11 @@ SQLITE_EXTENSION_INIT1
#ifndef SQLITE_OMIT_VIRTUALTABLE
+#ifndef IsAlnum
+#define IsAlnum(X) isalnum((unsigned char)X)
+#endif
+
+
/* completion_vtab is a subclass of sqlite3_vtab which will
** serve as the underlying representation of a completion virtual table
*/
@@ -377,7 +382,7 @@ static int completionFilter(
}
if( pCur->zLine!=0 && pCur->zPrefix==0 ){
int i = pCur->nLine;
- while( i>0 && (isalnum(pCur->zLine[i-1]) || pCur->zLine[i-1]=='_') ){
+ while( i>0 && (IsAlnum(pCur->zLine[i-1]) || pCur->zLine[i-1]=='_') ){
i--;
}
pCur->nPrefix = pCur->nLine - i;
diff --git a/ext/misc/csv.c b/ext/misc/csv.c
index b38500f4b..8331265aa 100644
--- a/ext/misc/csv.c
+++ b/ext/misc/csv.c
@@ -315,7 +315,7 @@ typedef struct CsvTable {
} CsvTable;
/* Allowed values for tstFlags */
-#define CSVTEST_FIDX 0x0001 /* Pretend that constrained searchs cost less*/
+#define CSVTEST_FIDX 0x0001 /* Pretend that constrained search cost less*/
/* A cursor for the CSV virtual table */
typedef struct CsvCursor {
diff --git a/ext/misc/decimal.c b/ext/misc/decimal.c
index 9365ae68b..60488a001 100644
--- a/ext/misc/decimal.c
+++ b/ext/misc/decimal.c
@@ -27,6 +27,9 @@ SQLITE_EXTENSION_INIT1
# define UNUSED_PARAMETER(X) (void)(X)
#endif
+#ifndef IsSpace
+#define IsSpace(X) isspace((unsigned char)X)
+#endif
/* A decimal object */
typedef struct Decimal Decimal;
@@ -76,7 +79,7 @@ static Decimal *decimalNewFromText(const char *zIn, int n){
p->nFrac = 0;
p->a = sqlite3_malloc64( n+1 );
if( p->a==0 ) goto new_from_text_failed;
- for(i=0; isspace(zIn[i]); i++){}
+ for(i=0; IsSpace(zIn[i]); i++){}
if( zIn[i]=='-' ){
p->sign = 1;
i++;
@@ -731,7 +734,7 @@ static void decimalSubFunc(
decimal_free(pB);
}
-/* Aggregate funcion: decimal_sum(X)
+/* Aggregate function: decimal_sum(X)
**
** Works like sum() except that it uses decimal arithmetic for unlimited
** precision.
diff --git a/ext/misc/fuzzer.c b/ext/misc/fuzzer.c
index 03d7af06e..e16d005d9 100644
--- a/ext/misc/fuzzer.c
+++ b/ext/misc/fuzzer.c
@@ -97,7 +97,7 @@
** LIMIT 20
**
** The query above gives the 20 closest words to the $word being tested.
-** (Note that for good performance, the vocubulary.w column should be
+** (Note that for good performance, the vocabulary.w column should be
** indexed.)
**
** A similar query can be used to find all words in the dictionary that
@@ -207,7 +207,7 @@ struct fuzzer_rule {
** Every stem is added to a hash table as it is output. Generation of
** duplicate stems is suppressed.
**
-** Active stems (those that might generate new outputs) are kepts on a linked
+** Active stems (those that might generate new outputs) are kept on a linked
** list sorted by increasing cost. The cost is the sum of rBaseCost and
** pRule->rCost.
*/
diff --git a/ext/misc/ieee754.c b/ext/misc/ieee754.c
index 99489fe9c..5ddb4a2fe 100644
--- a/ext/misc/ieee754.c
+++ b/ext/misc/ieee754.c
@@ -79,7 +79,7 @@
** WITH c(name,bin) AS (VALUES
** ('minimum positive value', x'0000000000000001'),
** ('maximum subnormal value', x'000fffffffffffff'),
-** ('mininum positive nornal value', x'0010000000000000'),
+** ('minimum positive normal value', x'0010000000000000'),
** ('maximum value', x'7fefffffffffffff'))
** SELECT c.name, decimal_mul(ieee754_mantissa(c.bin),pow2.v)
** FROM pow2, c WHERE pow2.x=ieee754_exponent(c.bin);
diff --git a/ext/misc/normalize.c b/ext/misc/normalize.c
index 08d7733b9..800e12911 100644
--- a/ext/misc/normalize.c
+++ b/ext/misc/normalize.c
@@ -286,7 +286,7 @@ static const unsigned char sqlite3CtypeMap[256] = {
#define TK_VARIABLE TK_LITERAL
#define TK_BLOB TK_LITERAL
-/* Disable nuisence warnings about case fall-through */
+/* Disable nuisance warnings about case fall-through */
#if !defined(deliberate_fall_through) && defined(__GCC__) && __GCC__>=7
# define deliberate_fall_through __attribute__((fallthrough));
#else
diff --git a/ext/misc/percentile.c b/ext/misc/percentile.c
index 06865185d..98e45cc3a 100644
--- a/ext/misc/percentile.c
+++ b/ext/misc/percentile.c
@@ -205,7 +205,7 @@ static int percentBinarySearch(Percentile *p, double y, int bExact){
/*
** Generate an error for a percentile function.
**
-** The error format string must have exactly one occurrance of "%%s()"
+** The error format string must have exactly one occurrence of "%%s()"
** (with two '%' characters). That substring will be replaced by the name
** of the function.
*/
diff --git a/ext/misc/series.c b/ext/misc/series.c
index aff979692..04644dd60 100644
--- a/ext/misc/series.c
+++ b/ext/misc/series.c
@@ -139,7 +139,7 @@ static sqlite3_int64 genSeqMember(
smBase += (mxI64 - mxI64/2) * smStep;
}
/* Under UBSAN (or on 1's complement machines), must do this last term
- * in steps to avoid the dreaded (and harmless) signed multiply overlow. */
+ * in steps to avoid the dreaded (and harmless) signed multiply overflow. */
if( ix>=2 ){
sqlite3_int64 ix2 = (sqlite3_int64)ix/2;
smBase += ix2*smStep;
@@ -519,8 +519,7 @@ static int seriesFilter(
pCur->ss.iBase += ((d+szStep-1)/szStep)*szStep;
}
if( pCur->ss.iTerm>iMax ){
- sqlite3_uint64 d = pCur->ss.iTerm - iMax;
- pCur->ss.iTerm -= ((d+szStep-1)/szStep)*szStep;
+ pCur->ss.iTerm = iMax;
}
}else{
sqlite3_int64 szStep = -pCur->ss.iStep;
@@ -530,8 +529,7 @@ static int seriesFilter(
pCur->ss.iBase -= ((d+szStep-1)/szStep)*szStep;
}
if( pCur->ss.iTerm<iMin ){
- sqlite3_uint64 d = iMin - pCur->ss.iTerm;
- pCur->ss.iTerm += ((d+szStep-1)/szStep)*szStep;
+ pCur->ss.iTerm = iMin;
}
}
}
diff --git a/ext/misc/shathree.c b/ext/misc/shathree.c
index fc05a3b73..b08eb813e 100644
--- a/ext/misc/shathree.c
+++ b/ext/misc/shathree.c
@@ -64,7 +64,7 @@
**
** typeof(Y)='blob' The hash is taken over prefix "Bnnn:" followed
** by the binary content of the blob. The "nnn"
-** in the prefix is the mimimum-length decimal
+** in the prefix is the minimum-length decimal
** representation of the byte-length of the blob.
**
** According to the rules above, all of the following SELECT statements
diff --git a/ext/misc/uint.c b/ext/misc/uint.c
index 286314fef..a527b2f07 100644
--- a/ext/misc/uint.c
+++ b/ext/misc/uint.c
@@ -16,7 +16,7 @@
** of digits compare in numeric order.
**
** * Leading zeros are handled properly, in the sense that
-** they do not mess of the maginitude comparison of embedded
+** they do not mess of the magnitude comparison of embedded
** strings of digits. "x00123y" is equal to "x123y".
**
** * Only unsigned integers are recognized. Plus and minus
diff --git a/ext/misc/vfstrace.c b/ext/misc/vfstrace.c
index c274558d1..a3cb12197 100644
--- a/ext/misc/vfstrace.c
+++ b/ext/misc/vfstrace.c
@@ -120,7 +120,7 @@
**
** Individual APIs can be enabled or disabled by name, with or without
** the initial "x" character. For example, to set up for tracing lock
-** primatives only:
+** primitives only:
**
** PRAGMA vfstrace('-all, +Lock,Unlock,ShmLock');
**