This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove unwanted spaces when looking up builtin types


> +/* Return 1 if C is a whitespace character, 0 otherwise.  */
> +
> +static int
> +whitespace_p (const char c)
> +{
> +  if (c == ' ' || c == '\n' || c == '\t')
> +    return 1;
> +  else
> +    return 0;

Why not using isspace directly? Apologies if this was explained
before, but then, a comment would be helpful, and maybe a more
specific function name.  My first reaction to this kind of routine
was that this should be in one of our "utils" files, so as to allow
other parts of the code to use it as well.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]