Ethereal-dev: Re: [Ethereal-dev] MGCP plugin

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ed Warnicke <hagbard@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 9 Nov 2000 07:13:51 -0500 (EST)
You are right to question these functions and I appreciate you pointing 
this out to me.  I was unaware of the isalpha() and isdigit() functions 
in the standard C library.  I looked into them and determined that your 
suggestion for using isdigit() is a good one.  I will make the change 
this evening.  I do not however want to use isalpha().  According to the 
man page on isalpha() on my box (Debian Woody):

isalpha()
              checks for an alphabetic character; in the standard
              "C"  locale,  it  is  equivalent  to (isupper(c) ||
              islower(c)).  In some locales, there may  be  addi-
              tional characters for which isalpha() is true--let-
              ters which are neither upper case nor lower case.

RFC 2705 (MGCP) in laying out its grammar defines its ALPHA as in RFC 
2234 which defines ALPHA as 

      ALPHA          =  %x41-5A / %x61-7A   ; A-Z / a-z

I thus can't use isalpha() because in some locales it may return true 
for other characters which do not match this definition.  

Or at least that's my reading of the situation.  Please feel free to
correct me if I'm mistaken (which I may well be).

Thank you very much for the suggestion, I do appreciate it.

Ed

On Thu, 9 Nov 2000, Gilbert Ramirez wrote:

> On Wed, 8 Nov 2000 22:45:47 -0500 (EST)
> Ed Warnicke <hagbard@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > OK.  Here is the correction to that problem as well as several others 
> > plus a bit of cleanup .  Please check this out and then check it in if it 
> > looks good to you.
> > 
> > Ed
> 
> I checked it in. I question the definition of is_digit() and is_alpha() functions
> in your code, however. Why not use isdigit() and isalpha() from the C library?
> 
> I have not added the Win32 Makefile.nmake yet.
> 
> --gilbert
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>