+/* Return 1 if STRING is "." or "..", optionally followed by a directory
+ separator */
+int
+dot_or_dotdot (string)
+ const char *string;
+{
+ if (string == 0 || *string == '\0' || *string != '.')
+ return (0);
+
+ /* string[0] == '.' */
+ if (PATHSEP(string[1]) || (string[1] == '.' && PATHSEP(string[2])))
+ return (1);
+
+ return (0);
+}
+