Mercurial > hg > xemacs-beta
comparison src/process-nt.c @ 2526:902d5bd9b75c
[xemacs-hg @ 2005-01-28 02:36:11 by ben]
Support symlinks under Windows
nt.c, fileio.c: Fix sync comments.
config.h.in, dired-msw.c, emacs.c, event-msw.c, fileio.c, glyphs.c, lisp.h, nt.c, process-nt.c, realpath.c, sound.c, symsinit.h, sysdep.c, sysfile.h, syswindows.h, win32.c: Add support for treating shortcuts under Windows as symbolic links.
Enabled with mswindows-shortcuts-are-links (t by default). Rewrite
lots of places to use PATHNAME_CONVERT_OUT, which is moved to
sysfile.h. Add PATHNAME_RESOLVE_LINKS, which only does things
under Windows.
Add profiling section for expand_file_name calls.
nt.c, sysdep.c: Unicode-ize.
realpath.c: Renamed from readlink_and_correct_case. Fix some problems with
Windows implementation due to incorrect understanding of workings
of the function.
sound.c, ntplay.c, sound.h: Rename play_sound_file to nt_play_sound_file and pass
internally-formatted data to it to avoid converting out and back
again.
text.h: is_c -> is_ascii.
author | ben |
---|---|
date | Fri, 28 Jan 2005 02:36:28 +0000 |
parents | 3d8143fc88e1 |
children | 19a72041c5ed 623d57b7fbe8 |
comparison
equal
deleted
inserted
replaced
2525:52f00344a629 | 2526:902d5bd9b75c |
---|---|
762 errors. This leads to bogus error message. */ | 762 errors. This leads to bogus error message. */ |
763 DWORD image_type; | 763 DWORD image_type; |
764 if (mswindows_is_executable (XSTRING_DATA (program))) | 764 if (mswindows_is_executable (XSTRING_DATA (program))) |
765 { | 765 { |
766 Extbyte *progext; | 766 Extbyte *progext; |
767 LISP_STRING_TO_TSTR (program, progext); | 767 LISP_PATHNAME_CONVERT_OUT (program, progext); |
768 image_type = qxeSHGetFileInfo (progext, 0, NULL, 0, SHGFI_EXETYPE); | 768 image_type = qxeSHGetFileInfo (progext, 0, NULL, 0, SHGFI_EXETYPE); |
769 } | 769 } |
770 else | 770 else |
771 { | 771 { |
772 DECLARE_EISTRING (progext); | 772 DECLARE_EISTRING (progext); |
773 eicpy_lstr (progext, program); | 773 Ibyte *prog2; |
774 LISP_PATHNAME_RESOLVE_LINKS (program, prog2); | |
775 eicpy_rawz (progext, prog2); | |
774 eicat_ascii (progext, ".exe"); | 776 eicat_ascii (progext, ".exe"); |
775 eito_external (progext, Qmswindows_tstr); | 777 eito_external (progext, Qmswindows_tstr); |
776 image_type = qxeSHGetFileInfo (eiextdata (progext), 0, NULL, 0, | 778 image_type = qxeSHGetFileInfo (eiextdata (progext), 0, NULL, 0, |
777 SHGFI_EXETYPE); | 779 SHGFI_EXETYPE); |
778 } | 780 } |
856 /* Luser wrote his/her own clever version */ | 858 /* Luser wrote his/her own clever version */ |
857 invalid_argument | 859 invalid_argument |
858 ("Bogus return value from `mswindows-construct-process-command-line'", | 860 ("Bogus return value from `mswindows-construct-process-command-line'", |
859 args_or_ret); | 861 args_or_ret); |
860 | 862 |
863 /* #### What about path names, which may be links? */ | |
861 LISP_STRING_TO_TSTR (args_or_ret, command_line); | 864 LISP_STRING_TO_TSTR (args_or_ret, command_line); |
862 | 865 |
863 UNGCPRO; /* args_or_ret */ | 866 UNGCPRO; /* args_or_ret */ |
864 } | 867 } |
865 | 868 |
992 ensure_console_window_exists (); | 995 ensure_console_window_exists (); |
993 | 996 |
994 { | 997 { |
995 Extbyte *curdirext; | 998 Extbyte *curdirext; |
996 | 999 |
997 LISP_STRING_TO_TSTR (cur_dir, curdirext); | 1000 LISP_PATHNAME_CONVERT_OUT (cur_dir, curdirext); |
998 | 1001 |
999 err = (qxeCreateProcess (NULL, command_line, NULL, NULL, TRUE, | 1002 err = (qxeCreateProcess (NULL, command_line, NULL, NULL, TRUE, |
1000 (XEUNICODE_P ? | 1003 (XEUNICODE_P ? |
1001 flags | CREATE_UNICODE_ENVIRONMENT : | 1004 flags | CREATE_UNICODE_ENVIRONMENT : |
1002 flags), proc_env, | 1005 flags), proc_env, |