Mercurial > hg > xemacs-beta
diff src/emacs.c @ 5000:44d7bde26046
fix compile errors, fix revert-buffer bug on binary/Latin 1 files, Mule-ize some files
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-07 Ben Wing <ben@xemacs.org>
* emacs.c (make_argc_argv):
Cast to Wexttext * to fix compile error.
* nt.c (init_user_info):
Cast to CIbyte * to fix compile error.
* nt.c (open_unc_volume):
To fix compile error, store pathname into an Extbyte * variable
then write into the dest, casting to LPTSTR.
* emacs.c (debug_can_access_memory):
* fileio.c (Fmake_temp_name):
* fileio.c (a_write):
* fns.c:
* fns.c (check_losing_bytecode):
* fns.c (plists_differ):
* fns.c (internal_equal_trapping_problems):
* fns.c (base64_value_to_char):
* fns.c (base64_conversion_error):
* fns.c (STORE_BYTE):
* fns.c (vars_of_fns):
* lisp.h:
* nt.c (init_user_info):
* nt.c (mswindows_readdir):
* nt.c (mswindows_executable_type):
Replace raw `char *' or `unsigned char *' with characterized type --
Rawbyte, Binbyte, Boolbyte, Ibyte or Ascbyte. This should fix at
least one real bug -- in a_write(), the "speedy insert" code that
checks for an unchanged region declared the file data read in as
char[] but then compared the value to an Ichar. Hence, any chars
in the range 128-255 would always appear changed -- in particular,
this algorithm would fail completely with binary data.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sun, 07 Feb 2010 05:21:40 -0600 |
parents | 3c3c1d139863 |
children | c2e0c3af5fe3 |
line wrap: on
line diff
--- a/src/emacs.c Sat Feb 06 04:27:47 2010 -0600 +++ b/src/emacs.c Sun Feb 07 05:21:40 2010 -0600 @@ -747,8 +747,9 @@ { CHECK_STRING (XCAR (next)); - (*argv)[i] = LISP_STRING_TO_EXTERNAL_MALLOC (XCAR (next), - Qcommand_argument_encoding); + (*argv)[i] = + (Wexttext *) LISP_STRING_TO_EXTERNAL_MALLOC + (XCAR (next), Qcommand_argument_encoding); } (*argv) [n] = 0; *argc = i; @@ -3011,13 +3012,14 @@ run_temacs_argv = xnew_array (Wexttext *, nargs + 2); run_temacs_argv[0] = - LISP_STRING_TO_EXTERNAL_MALLOC (Fcar (Vcommand_line_args), - Qcommand_argument_encoding); + (Wexttext *) LISP_STRING_TO_EXTERNAL_MALLOC (Fcar (Vcommand_line_args), + Qcommand_argument_encoding); for (i = 0; i < nargs; i++) { CHECK_STRING (args[i]); run_temacs_argv[i + 1] = + (Wexttext *) LISP_STRING_TO_EXTERNAL_MALLOC (args[i], Qcommand_argument_encoding); } run_temacs_argv[nargs + 1] = 0; @@ -3414,7 +3416,7 @@ { /* We can't do the off-by-one trick with only one byte, so instead, we compare to a fixed-sized buffer. */ - char randval[1]; + Rawbyte randval[1]; randval[0] = 0; dcam_saveval = memcmp (randval, ptr, len); }