This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] GNU coding standard
- From: Michael Snyder <msnyder at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 27 Dec 2001 11:31:31 -0800
- Subject: [PATCH] GNU coding standard
- Organization: Red Hat, Inc.
Fix up my recent changes to GNU coding standard, by moving
relational operators to the beginnings of lines.
2001-12-27 Michael Snyder <msnyder@redhat.com>
* maint.c (match_substring): GNU coding standards fixes.
(print_bfd_section_info): Ditto.
(print_objfile_section_info): Ditto.
Index: maint.c
===================================================================
RCS file: /cvs/src/src/gdb/maint.c,v
retrieving revision 1.20
diff -c -3 -p -r1.20 maint.c
*** maint.c 2001/12/27 15:37:35 1.20
--- maint.c 2001/12/27 19:31:00
*************** match_substring (const char *string, con
*** 197,210 ****
while ((tok = strstr (string, substr)) != NULL)
{
/* Got a partial match. Is it a whole word? */
! if (tok == string ||
! tok[-1] == ' ' ||
! tok[-1] == '\t')
{
/* Token is delimited at the front... */
! if (tok[substr_len] == ' ' ||
! tok[substr_len] == '\t' ||
! tok[substr_len] == '\0')
{
/* Token is delimited at the rear. Got a whole-word match. */
return 1;
--- 197,210 ----
while ((tok = strstr (string, substr)) != NULL)
{
/* Got a partial match. Is it a whole word? */
! if (tok == string
! || tok[-1] == ' '
! || tok[-1] == '\t')
{
/* Token is delimited at the front... */
! if (tok[substr_len] == ' '
! || tok[substr_len] == '\t'
! || tok[substr_len] == '\0')
{
/* Token is delimited at the rear. Got a whole-word match. */
return 1;
*************** print_bfd_section_info (bfd *abfd,
*** 311,319 ****
flagword flags = bfd_get_section_flags (abfd, asect);
const char *name = bfd_section_name (abfd, asect);
! if (arg == NULL || *((char *) arg) == '\0' ||
! match_substring ((char *) arg, name) ||
! match_bfd_flags ((char *) arg, flags))
{
CORE_ADDR addr, endaddr;
--- 311,319 ----
flagword flags = bfd_get_section_flags (abfd, asect);
const char *name = bfd_section_name (abfd, asect);
! if (arg == NULL || *((char *) arg) == '\0'
! || match_substring ((char *) arg, name)
! || match_bfd_flags ((char *) arg, flags))
{
CORE_ADDR addr, endaddr;
*************** print_objfile_section_info (bfd *abfd,
*** 331,339 ****
flagword flags = bfd_get_section_flags (abfd, asect->the_bfd_section);
const char *name = bfd_section_name (abfd, asect->the_bfd_section);
! if (string == NULL || *string == '\0' ||
! match_substring (string, name) ||
! match_bfd_flags (string, flags))
{
print_section_info (name, flags, asect->addr, asect->endaddr,
asect->the_bfd_section->filepos);
--- 331,339 ----
flagword flags = bfd_get_section_flags (abfd, asect->the_bfd_section);
const char *name = bfd_section_name (abfd, asect->the_bfd_section);
! if (string == NULL || *string == '\0'
! || match_substring (string, name)
! || match_bfd_flags (string, flags))
{
print_section_info (name, flags, asect->addr, asect->endaddr,
asect->the_bfd_section->filepos);