Re: yucky patch

From: Duane Wessels <wessels@dont-contact.us>
Date: Wed, 10 Feb 1999 21:34:33 -0700

Henrik Nordstrom writes:

>Recommended action is to use unsigned char instead of char.

I don't have a problem with that.

>If the compiler still complains then send the compiler vendor to do
>something about it.
>
>Quote from Linux manpage on isXXXX functions:
> These functions check whether c, which must have the value
> of an unsigned char or EOF, falls into a certain character
> class according to the current locale.

My reason for using an int cast is:

FreeBSD man page:

     SYNOPSIS
     #include <ctype.h>
     int isalnum(int c)
     int isalpha(int c)
     int isascii(int c)
     int iscntrl(int c)

HP-UX man page:
 SYNOPSIS
      #include <ctype.h>
      int isalnum(int c);
      int isalpha(int c);
      int iscntrl(int c);
      int isdigit(int c);

DUNIX4 man page:
  SYNOPSIS
  #include <ctype.h>
  int isalnum(int c);
  int isalpha(int c);
  int isascii(int c);
  int iscntrl(int c);

IRIX man page:
    SYNOPSIS
     #include <ctype.h>
     int isalpha(int c);
     int isupper(int c);
     int islower(int c);
     int isdigit(int c);

However, I have been chided for believing man pages.

Duane W.
Received on Tue Jul 29 2003 - 13:15:57 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:04 MST