]> granicus.if.org Git - graphviz/commitdiff
Fix smyrnaPath to use correct path separator depending on system
authorerg <devnull@localhost>
Thu, 8 Oct 2009 20:56:39 +0000 (20:56 +0000)
committererg <devnull@localhost>
Thu, 8 Oct 2009 20:56:39 +0000 (20:56 +0000)
cmd/smyrna/main.c

index 2e150faa694670846502f5911cf514e1c693468a..309782fccaedb1015aa0781182f74aa405d04fe5 100755 (executable)
@@ -67,11 +67,15 @@ unsigned char SmyrnaVerbose;
 char*
 smyrnaPath (char* suffix)
 {
-       static char* buf[1024];
+    static char* buf[1024];
+#ifdef WIN32
     char* pathSep = "\\";
-       assert (smyrnaDir);
-       if ((strlen(smyrnaDir)+strlen(suffix)+ strlen(suffix) + 2) > 512)
-               return NULL;
+#else
+    char* pathSep = "/";
+#endif
+    assert (smyrnaDir);
+    if ((strlen(smyrnaDir)+strlen(suffix)+ strlen(suffix) + 2) > 512)
+       return NULL;
     sprintf (buf, "%s%s%s", smyrnaDir, pathSep, suffix);
     return buf;
 }