i++;
continue;
}
- if (!isdigit((int) *i))
+ if (!isdigit((unsigned char) *i))
return 0;
i++;
}
{
while (*string != '\0')
{
- *string = toupper(*string);
+ *string = toupper((unsigned char) *string);
string++;
}
}
{
while (*string != '\0')
{
- *string = tolower(*string);
+ *string = tolower((unsigned char) *string);
string++;
}
}
* accesssing the array directly... */
/* Look at the next letter in the word */
-#define Next_Letter (toupper(word[w_idx+1]))
+#define Next_Letter (toupper((unsigned char) word[w_idx+1]))
/* Look at the current letter in the word */
-#define Curr_Letter (toupper(word[w_idx]))
+#define Curr_Letter (toupper((unsigned char) word[w_idx]))
/* Go N letters back. */
-#define Look_Back_Letter(n) (w_idx >= n ? toupper(word[w_idx-n]) : '\0')
+#define Look_Back_Letter(n) \
+ (w_idx >= (n) ? toupper((unsigned char) word[w_idx-(n)]) : '\0')
/* Previous letter. I dunno, should this return null on failure? */
#define Prev_Letter (Look_Back_Letter(1))
/* Look two letters down. It makes sure you don't walk off the string. */
-#define After_Next_Letter (Next_Letter != '\0' ? toupper(word[w_idx+2]) \
- : '\0')
-#define Look_Ahead_Letter(n) (toupper(Lookahead(word+w_idx, n)))
+#define After_Next_Letter \
+ (Next_Letter != '\0' ? toupper((unsigned char) word[w_idx+2]) : '\0')
+#define Look_Ahead_Letter(n) toupper((unsigned char) Lookahead(word+w_idx, n))
/* Allows us to safely look ahead an arbitrary # of letters */
#define Phone_Len (p_idx)
/* Note is a letter is a 'break' in the word */
-#define Isbreak(c) (!isalpha(c))
+#define Isbreak(c) (!isalpha((unsigned char) (c)))
int
/*-- The first phoneme has to be processed specially. --*/
/* Find our first letter */
- for (; !isalpha(Curr_Letter); w_idx++)
+ for (; !isalpha((unsigned char) (Curr_Letter)); w_idx++)
{
/* On the off chance we were given nothing but crap... */
if (Curr_Letter == '\0')
*/
/* Ignore non-alphas */
- if (!isalpha(Curr_Letter))
+ if (!isalpha((unsigned char) (Curr_Letter)))
continue;
/* Drop duplicates, except CC */
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pgcrypto.c,v 1.11 2001/11/20 15:50:53 momjian Exp $
+ * $Id: pgcrypto.c,v 1.12 2001/12/30 23:09:41 tgl Exp $
*/
#include <postgres.h>
p = VARDATA(name);
for (i = 0; i < len; i++)
- buf[i] = tolower(p[i]);
+ buf[i] = tolower((unsigned char) p[i]);
buf[len] = 0;
err = provider_lookup(buf, &res);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.85 2001/12/29 21:28:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.86 2001/12/30 23:09:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
if (tzp == NULL)
return -1;
- if (isdigit(*field[i]) || ptype != 0)
+ if (isdigit((unsigned char) *field[i]) || ptype != 0)
{
char *cp;
/* otherwise, this is a time and/or time zone */
else
{
- if (isdigit(*field[i]))
+ if (isdigit((unsigned char) *field[i]))
{
char *cp;
}
for (i = 1; i < 10; i++)
{
- if (!isdigit(rest[i]))
+ if (!isdigit((unsigned char) rest[i]))
break;
}
for (; i < 10; i++)
while (isspace((unsigned char) old_statement[++opos]));
}
if (strnicmp(&old_statement[opos], "call", lit_call_len) ||
- !isspace(old_statement[opos + lit_call_len]))
+ !isspace((unsigned char) old_statement[opos + lit_call_len]))
{
opos--;
continue;
in_dquote = TRUE;
else
{
- if (isspace(oldchar))
+ if (isspace((unsigned char) oldchar))
{
if (!prev_token_end)
{