aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/func.c b/src/func.c
index 611f1e78e..7a7ce8dc0 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,10 +16,9 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.209 2008/12/10 23:04:13 drh Exp $
+** $Id: func.c,v 1.210 2009/01/20 16:53:40 danielk1977 Exp $
*/
#include "sqliteInt.h"
-#include <ctype.h>
#include <stdlib.h>
#include <assert.h>
#include "vdbeInt.h"
@@ -276,14 +275,14 @@ static void upperFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
if( z1 ){
memcpy(z1, z2, n+1);
for(i=0; z1[i]; i++){
- z1[i] = (char)toupper(z1[i]);
+ z1[i] = (char)sqlite3Toupper(z1[i]);
}
sqlite3_result_text(context, z1, -1, sqlite3_free);
}
}
}
static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
- char *z1;
+ u8 *z1;
const char *z2;
int i, n;
if( argc<1 || SQLITE_NULL==sqlite3_value_type(argv[0]) ) return;
@@ -296,9 +295,9 @@ static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
if( z1 ){
memcpy(z1, z2, n+1);
for(i=0; z1[i]; i++){
- z1[i] = (char)tolower(z1[i]);
+ z1[i] = sqlite3Tolower(z1[i]);
}
- sqlite3_result_text(context, z1, -1, sqlite3_free);
+ sqlite3_result_text(context, (char *)z1, -1, sqlite3_free);
}
}
}
@@ -980,7 +979,7 @@ static void soundexFunc(
for(i=0; zIn[i] && !isalpha(zIn[i]); i++){}
if( zIn[i] ){
u8 prevcode = iCode[zIn[i]&0x7f];
- zResult[0] = toupper(zIn[i]);
+ zResult[0] = sqlite3Toupper(zIn[i]);
for(j=1; j<4 && zIn[i]; i++){
int code = iCode[zIn[i]&0x7f];
if( code>0 ){