1. 13 Sep, 2014 1 commit
    • Eli Zaretskii's avatar
      Fix expansion and encoding of sound file names on MS-Windows. · a6cc335a
      Eli Zaretskii authored
       src/sound.c (Fplay_sound_internal): Encode the sound file name in
       the ANSI codepage.  Expand it against data-directory, as per docs,
       not against the current directory.  No need to make a local copy
       of the file name; pass the encoded file name directly to
       do_play_sound.  (Bug#18463)
       src/w32.c (ansi_encode_filename): If w32_get_short_filename returns
       NULL, and the file name is not encodable in ANSI codepage, return
       the string with "?" replacement characters, which will fail the
       caller.  This avoids returning a random value in that case.
      a6cc335a
  2. 04 Jul, 2014 1 commit
  3. 11 Apr, 2014 1 commit
  4. 10 Mar, 2014 2 commits
  5. 06 Feb, 2014 1 commit
    • Eli Zaretskii's avatar
      Another fix for handling of file names on Windows 9X. · 829f4f22
      Eli Zaretskii authored
       src/w32.c (pMultiByteToWideChar, pWideCharToMultiByte): New
       variables: pointers through which to call the respective APIs.
       (filename_to_utf16, filename_from_utf16, filename_to_ansi)
       (filename_from_ansi, sys_link, check_windows_init_file): Call
       MultiByteToWideChar and WideCharToMultiByte through pointers.
       This is required on Windows 9X, where we dynamically load
       UNICOWS.DLL which has their non-stub implementations.
       (maybe_load_unicows_dll): Assign addresses to these 2 function
       pointers after loading UNICOWS.DLL.
       src/w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
       MultiByteToWideChar and WideCharToMultiByte through function
       pointers.
       src/w32.h (pMultiByteToWideChar, pWideCharToMultiByte): New
       declarations.
      829f4f22
  6. 05 Feb, 2014 1 commit
  7. 18 Jan, 2014 1 commit
    • Eli Zaretskii's avatar
      Fix file name handling on MS-Windows 9X. · 5197f0c2
      Eli Zaretskii authored
       src/w32.c (maybe_load_unicows_dll): New function.
       src/emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
       on, to make sure we can convert file names to and from UTF-8 on
       Windows 9X.  This fixes a failure to start up because Emacs cannot
       find term/w32-win.el.  Reported by oslsachem <oslsachem@gmail.com>.
       src/w32font.c [WINDOWSNT]: Include w32.h.
       (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
       of implementing the same stuff.
       Remove now unused g_b_init_is_windows_9x.
       src/w32.h (maybe_load_unicows_dll): Add prototype.
      
       nt/runemacs.c (ensure_unicows_dll): Don't tell in the message box
       that "emacs -nw" can do without UNICOWS.DLL on Windows 9X.  See
       w32.c:maybe_load_unicows_dll and its callers for the reason.
      5197f0c2
  8. 01 Jan, 2014 1 commit
  9. 31 Dec, 2013 2 commits
  10. 30 Dec, 2013 1 commit
  11. 18 Dec, 2013 1 commit
    • Glenn Morris's avatar
      Add load-prefer-newer option, to load .el if newer than .elc · 1f41ee56
      Glenn Morris authored
      * src/lread.c (Fload): Pass load_prefer_newer to openp.
      Don't bother checking mtime if openp already did it.
      (openp): Add `newer' argument, to check all suffixes
      and find the newest file.
      (syms_of_lread) <load_prefer_newer>: New option. 
      
      * src/callproc.c (call_process):
      * src/charset.c (load_charset_map_from_file):
      * src/emacs.c (init_cmdargs):
      * src/image.c (x_create_bitmap_from_file, x_find_image_file):
      * src/lisp.h (openp):
      * lread.c (Flocate_file_internal):
      * src/process.c (Fformat_network_address):
      * src/sound.c (Fplay_sound_internal):
      * src/w32.c (check_windows_init_file):
      * src/w32proc.c (sys_spawnve): Update for new arg spec of openp.
      
      * lisp/Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t.
      
      * etc/NEWS: Mention this.
      
      Fixes: debbugs:2061
      1f41ee56
  12. 17 Dec, 2013 1 commit
  13. 14 Dec, 2013 1 commit
    • Eli Zaretskii's avatar
      Fix copy-file on MS-Windows with file names outside of current locale. · ec4440cf
      Eli Zaretskii authored
       src/fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
       Windows-specific code to w32.c.  Change error message text to
       match that of Posix platforms.
       src/w32.c (w32_copy_file): New function, most of the code copied and
       reworked from Fcopy_file.  Improve error handling.  Plug memory
       leak when errors are thrown.  Support file names outside of the
       current codepage.  (Bug#7100)
      ec4440cf
  14. 12 Dec, 2013 1 commit
  15. 09 Dec, 2013 2 commits
  16. 07 Dec, 2013 3 commits
  17. 05 Dec, 2013 1 commit
  18. 03 Dec, 2013 1 commit
  19. 23 Nov, 2013 3 commits
  20. 18 Nov, 2013 1 commit
  21. 16 Nov, 2013 5 commits
  22. 09 Nov, 2013 2 commits
  23. 08 Nov, 2013 1 commit
  24. 04 Nov, 2013 1 commit
    • Paul Eggert's avatar
      Port to stricter C99 platforms. · 91f2d272
      Paul Eggert authored
      Especially, C99 prohibits nesting a struct X inside struct Y if
      struct X has a flexible array member.
      Also, merge from gnulib, incorporating:
      2013-11-03 intprops: port to Oracle Studio c99
      * lib/intprops.h: Update from gnulib.
      * src/alloc.c (struct sdata): New type.
      (sdata): Implement in terms of struct sdata.
      Remove u member; all uses replaced by next_vector, set_next_vector.
      (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
      (SDATA_DATA_OFFSET): Now a constant, not a macro.
      (struct sblock): Rename first_data member to data, which is now
      a flexible array member.  All uses changed.
      (next_vector, set_next_vector, large_vector_vec): New functions.
      (vector_alignment): New constant.
      (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
      (struct large-vector): Now merely a NEXT member, since the old approach
      ran afoul of stricter C99.  All uses changed to use
      large_vector_vec or large_vector_offset.
      (large_vector_offset): New constant.
      * src/dispnew.c: Include tparam.h, for tgetent.
      Do not include term.h; no longer needed.
      * src/gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
      * src/lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
      (struct Lisp_Vector): Use a flexible array member for contents,
      instead of a union with a member that is an array of size 1.
      All uses changed.
      (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
      fact that the struct no longer contains a union.
      (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
      (struct Lisp_Save_Value, struct Lisp_Free):
      Use unsigned, not int, for spacers, to avoid c99 warning.
      (union specbinding): Use unsigned, not bool, for bitfield, as
      bool is not portable to pre-C99 hosts.
      91f2d272
  25. 02 Nov, 2013 3 commits
  26. 26 Oct, 2013 1 commit