aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2007-02-16 17:12:59 +0000
committerJuanma Barranquero2007-02-16 17:12:59 +0000
commit71b8f73572849e0a3f40ea37e2f2587e660a4ddc (patch)
treef2536aa7e36092e2a99c5b16a26ef83468086f92
parent3b58be21ad635ed6ae5a94c6b24187fb1ffb4f43 (diff)
downloademacs-71b8f73572849e0a3f40ea37e2f2587e660a4ddc.tar.gz
emacs-71b8f73572849e0a3f40ea37e2f2587e660a4ddc.zip
Comment changes and clarifications.
-rw-r--r--lib-src/emacsclient.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index b557e5c7236..ea1e6cd7af8 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -484,13 +484,45 @@ file_name_absolute_p (filename)
484 if (filename[0] == '\0') return FALSE; 484 if (filename[0] == '\0') return FALSE;
485 485
486#ifdef WINDOWSNT 486#ifdef WINDOWSNT
487 /* X:\xxx is always absolute; X:xxx is an error and will fail. */ 487 /* X:\xxx is always absolute. */
488 if (isalpha (filename[0]) 488 if (isalpha (filename[0])
489 && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/')) 489 && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/'))
490 return TRUE; 490 return TRUE;
491 491
492 /* Both \xxx and \\xxx\yyy are absolute. */ 492 /* Both \xxx and \\xxx\yyy are absolute. */
493 if (filename[0] == '\\') return TRUE; 493 if (filename[0] == '\\') return TRUE;
494
495 /*
496 FIXME: There's a corner case not dealt with, "x:y", where:
497
498 1) x is a valid drive designation (usually a letter in the A-Z range)
499 and y is a path, relative to the current directory on drive x. This
500 is absolute, *after* fixing the y part to include the current
501 directory in x.
502
503 2) x is a relative file name, and y is an NTFS stream name. This is a
504 correct relative path, but it is very unusual.
505
506 The trouble is that first case items are also valid examples of the
507 second case, i.e., "c:test" can be understood as drive:path or as
508 file:stream.
509
510 The "right" fix would involve checking whether
511 - the current drive/partition is NTFS,
512 - x is a valid (and accesible) drive designator,
513 - x:y already exists as a file:stream in the current directory,
514 - y already exists on the current directory of drive x,
515 - the auspices are favorable,
516 and then taking an "informed decision" based on the above.
517
518 Whatever the result, Emacs currently does a very bad job of dealing
519 with NTFS file:streams: it cannot visit them, and the only way to
520 create one is by setting `buffer-file-name' to point to it (either
521 manually or with emacsclient). So perhaps resorting to 1) and ignoring
522 2) for now is the right thing to do.
523
524 Anyway, something to decide After the Release.
525 */
494#endif 526#endif
495 527
496 return FALSE; 528 return FALSE;
@@ -884,7 +916,7 @@ w32_give_focus ()
884{ 916{
885 HMODULE hUser32; 917 HMODULE hUser32;
886 918
887 /* It should'nt happen when dealing with TCP sockets. */ 919 /* It shouldn't happen when dealing with TCP sockets. */
888 if (!emacs_pid) return; 920 if (!emacs_pid) return;
889 921
890 if (!(hUser32 = LoadLibrary ("user32.dll"))) return; 922 if (!(hUser32 = LoadLibrary ("user32.dll"))) return;