1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Make sure the argument to ctype.h macros is always an unsigned character.

Ticket #839. (CVS 1881)

FossilOrigin-Name: b065973898c06a81c69b70b3fa91c79334bd9b9a
This commit is contained in:
drh
2004-08-08 20:22:17 +00:00
parent 8dcd7cab83
commit 4c755c0f53
13 changed files with 74 additions and 73 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.58 2004/07/22 01:19:35 drh Exp $
** $Id: pragma.c,v 1.59 2004/08/08 20:22:18 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -24,8 +24,8 @@
/*
** Interpret the given string as a boolean value.
*/
static int getBoolean(const char *z){
static char *azTrue[] = { "yes", "on", "true" };
static int getBoolean(const u8 *z){
static const u8 *azTrue[] = { "yes", "on", "true" };
int i;
if( z[0]==0 ) return 0;
if( isdigit(z[0]) || (z[0]=='-' && isdigit(z[1])) ){
@@ -47,9 +47,9 @@ static int getBoolean(const char *z){
** to support legacy SQL code. The safety level used to be boolean
** and older scripts may have used numbers 0 for OFF and 1 for ON.
*/
static int getSafetyLevel(char *z){
static int getSafetyLevel(u8 *z){
static const struct {
const char *zWord;
const u8 *zWord;
int val;
} aKey[] = {
{ "no", 0 },