PATCH: mirc dcc send

Marcus Meissner marcus at jet.franken.de
Fri May 25 06:00:09 CDT 2001


Hi,

This fixes bug 248.

Ciao, Marcus

Changelog:
	don't just assume everything is a Dos Device, or mirc will not get
	any DCC sends.

Index: dos_fs.c
===================================================================
RCS file: /home/wine/wine/files/dos_fs.c,v
retrieving revision 1.82
diff -u -r1.82 dos_fs.c
--- dos_fs.c	2001/04/20 18:38:41	1.82
+++ dos_fs.c	2001/05/25 12:01:57
@@ -2183,11 +2183,28 @@
         memcpy( target, devices, min(bufsize,sizeof(devices)) );
         return min(bufsize,sizeof(devices));
     }
-    strcpy(buffer,"\\DEV\\");
-    strcat(buffer,devname);
-    if ((s=strchr(buffer,':'))) *s='\0';
-    lstrcpynA(target,buffer,bufsize);
-    return strlen(buffer)+1;
+    /* In theory all that are possible and have been defined.
+     * Now just those below, since mirc uses it to check for special files.
+     *
+     * (It is more complex, and supports netmounted stuff, and \\.\ stuff, 
+     *  but currently we just ignore that.)
+     */
+#define CHECK(x) (strstr(devname,#x)==devname)
+    if (CHECK(con) || CHECK(com) || CHECK(lpt) || CHECK(nul)) {
+	strcpy(buffer,"\\DEV\\");
+	strcat(buffer,devname);
+	if ((s=strchr(buffer,':'))) *s='\0';
+	lstrcpynA(target,buffer,bufsize);
+	return strlen(buffer)+1;
+    } else {
+	if (strchr(devname,':') || devname[0]=='\\') {
+	    /* This might be a DOS device we do not handle yet ... */
+	    FIXME("(%) not detected as DOS device!\n",devname);
+	}
+	SetLastError(ERROR_DEV_NOT_EXIST);
+	return 0;
+    }
+
 }
 
 




More information about the wine-patches mailing list