Oops, Ben is quite right about the rather appalling design of
[u/mdw/putty] / winmisc.c
index a4f666e..2266341 100644 (file)
--- a/winmisc.c
+++ b/winmisc.c
@@ -12,3 +12,26 @@ void platform_get_x11_auth(char *display, int *proto,
 {
     /* We don't support this at all under Windows. */
 }
+
+Filename filename_from_str(const char *str)
+{
+    Filename ret;
+    strncpy(ret.path, str, sizeof(ret.path));
+    ret.path[sizeof(ret.path)-1] = '\0';
+    return ret;
+}
+
+const char *filename_to_str(const Filename *fn)
+{
+    return fn->path;
+}
+
+int filename_equal(Filename f1, Filename f2)
+{
+    return !strcmp(f1.path, f2.path);
+}
+
+int filename_is_null(Filename fn)
+{
+    return !*fn.path;
+}