Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
4994:76af7fc13e81 | 5000:44d7bde26046 |
---|---|
745 | 745 |
746 for (i = 0, next = argv_list; i < n; i++, next = XCDR (next)) | 746 for (i = 0, next = argv_list; i < n; i++, next = XCDR (next)) |
747 { | 747 { |
748 CHECK_STRING (XCAR (next)); | 748 CHECK_STRING (XCAR (next)); |
749 | 749 |
750 (*argv)[i] = LISP_STRING_TO_EXTERNAL_MALLOC (XCAR (next), | 750 (*argv)[i] = |
751 Qcommand_argument_encoding); | 751 (Wexttext *) LISP_STRING_TO_EXTERNAL_MALLOC |
752 (XCAR (next), Qcommand_argument_encoding); | |
752 } | 753 } |
753 (*argv) [n] = 0; | 754 (*argv) [n] = 0; |
754 *argc = i; | 755 *argc = i; |
755 } | 756 } |
756 | 757 |
3009 | 3010 |
3010 run_temacs_argc = nargs + 1; | 3011 run_temacs_argc = nargs + 1; |
3011 run_temacs_argv = xnew_array (Wexttext *, nargs + 2); | 3012 run_temacs_argv = xnew_array (Wexttext *, nargs + 2); |
3012 | 3013 |
3013 run_temacs_argv[0] = | 3014 run_temacs_argv[0] = |
3014 LISP_STRING_TO_EXTERNAL_MALLOC (Fcar (Vcommand_line_args), | 3015 (Wexttext *) LISP_STRING_TO_EXTERNAL_MALLOC (Fcar (Vcommand_line_args), |
3015 Qcommand_argument_encoding); | 3016 Qcommand_argument_encoding); |
3016 for (i = 0; i < nargs; i++) | 3017 for (i = 0; i < nargs; i++) |
3017 { | 3018 { |
3018 CHECK_STRING (args[i]); | 3019 CHECK_STRING (args[i]); |
3019 | 3020 |
3020 run_temacs_argv[i + 1] = | 3021 run_temacs_argv[i + 1] = |
3022 (Wexttext *) | |
3021 LISP_STRING_TO_EXTERNAL_MALLOC (args[i], Qcommand_argument_encoding); | 3023 LISP_STRING_TO_EXTERNAL_MALLOC (args[i], Qcommand_argument_encoding); |
3022 } | 3024 } |
3023 run_temacs_argv[nargs + 1] = 0; | 3025 run_temacs_argv[nargs + 1] = 0; |
3024 | 3026 |
3025 catchlist = NULL; /* Important! Otherwise free_cons() calls in | 3027 catchlist = NULL; /* Important! Otherwise free_cons() calls in |
3412 dcam_saveval = memcmp (ptr, (Rawbyte *) ptr + 1, len - 1); | 3414 dcam_saveval = memcmp (ptr, (Rawbyte *) ptr + 1, len - 1); |
3413 else | 3415 else |
3414 { | 3416 { |
3415 /* We can't do the off-by-one trick with only one byte, so instead, | 3417 /* We can't do the off-by-one trick with only one byte, so instead, |
3416 we compare to a fixed-sized buffer. */ | 3418 we compare to a fixed-sized buffer. */ |
3417 char randval[1]; | 3419 Rawbyte randval[1]; |
3418 randval[0] = 0; | 3420 randval[0] = 0; |
3419 dcam_saveval = memcmp (randval, ptr, len); | 3421 dcam_saveval = memcmp (randval, ptr, len); |
3420 } | 3422 } |
3421 } | 3423 } |
3422 else | 3424 else |