diff src/ntplay.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 ecf1ebac70d8
children 16112448d484 4aebb0131297
line wrap: on
line diff
--- a/src/ntplay.c	Fri Jan 28 02:05:05 2005 +0000
+++ b/src/ntplay.c	Fri Jan 28 02:36:28 2005 +0000
@@ -35,14 +35,12 @@
 			      int volume, int convert);
 
 void
-play_sound_file (Extbyte *sound_file, int UNUSED (volume))
+nt_play_sound_file (Lisp_Object path, int UNUSED (volume))
 {
   DWORD flags = SND_ASYNC | SND_NODEFAULT | SND_FILENAME;
-  Lisp_Object fname =
-    Ffile_name_nondirectory (build_tstr_string (sound_file));
+  Lisp_Object fname = Ffile_name_nondirectory (path);
   Extbyte *fnameext;
 
-  CHECK_STRING (fname);
   LISP_STRING_TO_TSTR (fname, fnameext);
 
   if (qxeSearchPath (NULL, fnameext, NULL, 0, NULL, NULL) == 0)
@@ -50,9 +48,9 @@
       /* file isn't in the path so read it as data */
       int size;
       Binbyte *data;
-      int ofd = qxe_open (XSTRING_DATA (fname), O_RDONLY | OPEN_BINARY, 0);
+      int ofd = qxe_open (XSTRING_DATA (path), O_RDONLY | OPEN_BINARY, 0);
       
-      if (ofd <0)
+      if (ofd < 0)
 	return;
 
       size = lseek (ofd, 0, SEEK_END);