]> granicus.if.org Git - graphviz/commitdiff
avoid potential conflict with basename() defined in strings.h
authorellson <devnull@localhost>
Tue, 18 Oct 2005 18:22:10 +0000 (18:22 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 18:22:10 +0000 (18:22 +0000)
lib/common/input.c

index abfa4b62f2c1859327412249bf023c514144af26..c4275eb5d6a2175da876d9b721869407cd937cbe 100644 (file)
@@ -116,13 +116,13 @@ static char *getFlagOpt(int argc, char **argv, int *idx)
     return 0;
 }
 
-/* basename:
+/* dotneato_basename:
  * Partial implementation of real basename.
  * Skip over any trailing slashes or backslashes; then
  * find next (back)slash moving left; return string to the right.
  * If no next slash is found, return the whole string.
  */
-static char* basename (char* path)
+static char* dotneato_basename (char* path)
 {
     char* s = path;
     if (*s == '\0') return path; /* empty string */
@@ -152,7 +152,7 @@ void dotneato_args_initialize(GVC_t * gvc, int argc, char **argv)
     if (Config)
        exit (0);
 
-    CmdName = basename(argv[0]);
+    CmdName = dotneato_basename(argv[0]);
     i = gvlayout_select(gvc, CmdName);
     if (i == NO_SUPPORT)
        gvlayout_select(gvc, "dot");