+/* 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;
+ /* 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;
+}
+