+ if (filename[0] && filename[0] == '/')
+ {
+ /* Absolute (unix-style) pathname. Do nothing */
+ strcat (fullpath, filename);
+ }
+#ifdef CYGWIN
+ else if (filename[0] && filename[0] == '\\' &&
+ filename[1] && filename[1] == '\\')
+ {
+ /* This path includes the server name (something like
+ "\\server\path"), so we assume it's absolute. Do nothing to
+ it. */
+ strcat (fullpath, filename);
+ }
+ else if (filename[0] &&
+ filename[1] && filename[1] == ':' &&
+ filename[2] && filename[2] == '\\')
+ {
+ /* Absolute pathname with drive letter. Convert "<drive>:"
+ to "//<drive>/". */
+ strcat (fullpath, "//");
+ strncat (fullpath, filename, 1);
+ strcat (fullpath, &filename[2]);
+ }
+#endif
+ else
+ {
+ /* Assume relative Unix style path. Get the current directory
+ and prepend it. FIXME: need to fix the case of DOS paths like
+ "\foo", where we need to get the current drive. */
+