contrib/gdb-7/gdb/linespec.c
static int 
is_objc_method_format (const char *s)
{
  if (s == NULL || *s == '\0')
    return 0;
  /* Handle arguments with the format FILENAME:SYMBOL.  */
  if ((s[0] == ':') && (strchr ("+-", s[1]) != NULL) 
      && (s[2] == '[') && strchr(s, ']'))
    return 1;
  /* Handle arguments that are just SYMBOL.  */
  else if ((strchr ("+-", s[0]) != NULL) && (s[1] == '[') && strchr(s, ']'))
    return 1;
  return 0;
}
/* Determines if the gives string corresponds to an Objective-C method
   representation, such as -[Foo bar:] or +[Foo bar].  Objective-C symbols
   are allowed to have spaces and parentheses in them.  */
Determines if the gives string corresponds to an Objective-C method
representation, such as -[Foo bar:] or +[Foo bar].  Objective-C symbols
are allowed to have spaces and parentheses in them.
Determines if the gives string corresponds to an Objective - C method representation such as - [ Foo bar : ] or + [ Foo bar ] . Objective - C symbols are allowed to have spaces and parentheses in them .
static int 
is_objc_method_format (const char *s)
{
  if (s == NULL || *s == '\0')
    return 0;
  if ((s[0] == ':') && (strchr ("+-", s[1]) != NULL) 
      && (s[2] == '[') && strchr(s, ']'))
    return 1;
  else if ((strchr ("+-", s[0]) != NULL) && (s[1] == '[') && strchr(s, ']'))
    return 1;
  return 0;
}
static int is_objc_method_format ( const char * s ) { if ( s == NULL || * s == ' \0 ' ) return 0 ; if ( ( s [ 0 ] == ' ' ) && ( strchr ( " " , s [ 1 ] ) != NULL ) && ( s [ 2 ] == ' ' ) && strchr ( s , ' ' ) ) return 1 ; else if ( ( strchr ( " " , s [ 0 ] ) != NULL ) && ( s [ 1 ] == ' ' ) && strchr ( s , ' ' ) ) return 1 ; return 0 ; }
Determines if the gives string corresponds to an Objective-C method
representation, such as -[Foo bar:] or +[Foo bar].
Determines if the gives string corresponds to an Objective - C method representation such as - [ Foo bar : ] or + [ Foo bar ] .
/* Handle arguments with the format FILENAME:SYMBOL.  */ /* Handle arguments that are just SYMBOL.  */