This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove unwanted spaces when looking up builtin types
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Siva Chandra <sivachandra at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 7 Jan 2015 11:03:37 +0400
- Subject: Re: [PATCH] Remove unwanted spaces when looking up builtin types
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gy=Vk3jQrwFZaMXW-nwgm4-U13wvK0_Mx1S_w7nzZ5Mdw at mail dot gmail dot com> <CAGyQ6gyvQ8kzit0LpkY0Nv6kLXQf5iTLCwYOYgoTJf-F-6F7XQ at mail dot gmail dot com>
> +/* 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