Changeset 3871
- Timestamp:
- 2005年09月16日 01時32分13秒 (3 years ago)
- Files:
-
- trunk/lisp/ChangeLog.Meadow (modified) (1 diff)
- trunk/lisp/international/meadow.el (modified) (1 diff)
- trunk/lisp/international/mw32misc.el (modified) (1 diff)
- trunk/lisp/mw32reg.el (modified) (4 diffs)
- trunk/lisp/w32-fns.el (modified) (2 diffs)
- trunk/src/ChangeLog.Meadow (modified) (1 diff)
- trunk/src/coding.h (modified) (3 diffs)
- trunk/src/mw32fns.c (modified) (6 diffs)
- trunk/src/mw32font.c (modified) (6 diffs)
- trunk/src/mw32ime.c (modified) (6 diffs)
- trunk/src/mw32mci.c (modified) (3 diffs)
- trunk/src/mw32menu.c (modified) (5 diffs)
- trunk/src/mw32reg.c (modified) (38 diffs)
- trunk/src/mw32term.c (modified) (1 diff)
- trunk/src/mw32term.h (modified) (1 diff)
- trunk/src/w32proc.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/ChangeLog.Meadow
r3863 r3871 1 2005-09-15 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 3 * international/meadow.el (w32-shell-execute): Use 4 locale-coding-system instead of obsolete variable 5 w32-system-coding-system. 6 7 * international/mw32misc.el (set-w32-system-coding-system): Ditto. 8 9 * mw32reg.el (mw32-registry-get-string): Ditto. 10 (mw32-registry-get-string-list): Ditto. 11 12 * w32-fns.el (set-w32-system-coding-system): Ditto, syncing up 13 with Emcas CVS HEAD. 14 (w32-system-coding-system): Defined as varalias of 15 locale-coding-system, syncing up with Emacs CVS HEAD. 16 1 17 2005-09-10 MIYOSHI Masanori <miyoshi@meadowy.org> 2 18 trunk/lisp/international/meadow.el
r3805 r3871 286 286 (not (numberp show-flag))) 287 287 (error "show-flag must be number or nil:%S" show-flag)) 288 (let ((coding-system-for-write w32-system-coding-system)288 (let ((coding-system-for-write locale-coding-system) 289 289 (args (append 290 290 (list document) trunk/lisp/international/mw32misc.el
r3841 r3871 21 21 (interactive "zWindows-system-coding-system:") 22 22 (check-coding-system coding-system) 23 (setq w32-system-coding-system coding-system))23 (setq locale-coding-system coding-system)) 24 24 25 25 (fmakunbound 'font-menu-add-default) trunk/lisp/mw32reg.el
r3827 r3871 58 58 "Get string data in registry KEY from value NAME with decoding. 59 59 If NAME is nil, value of KEY is retrieved. 60 Returns string which is decoded by w32-system-coding-systemor60 Returns string which is decoded by `locale-coding-system' or 61 61 specified CODING." 62 62 (let ((data (mw32-registry-get key name))) … … 66 66 (if (memq type '(registry-sz registry-expand-sz)) 67 67 (decode-coding-string (car data) 68 (or coding w32-system-coding-system))68 (or coding locale-coding-system)) 69 69 (error "Registry data type is not fit for string")))))) 70 70 … … 72 72 "Get multiple string data in registry KEY from value NAME with decoding. 73 73 If NAME is nil, value of KEY is retrieved. 74 Returns list of string decoded by ` w32-system-coding-system' or74 Returns list of string decoded by `locale-coding-system' or 75 75 specified CODING." 76 76 (let ((data (mw32-registry-get key name))) … … 81 81 (mapcar (lambda (str) 82 82 (decode-coding-string str (or coding 83 w32-system-coding-system)))83 locale-coding-system))) 84 84 val) 85 85 (error "Registry data type is not fit for string list")))))) trunk/lisp/w32-fns.el
r3863 r3871 285 285 `w32-system-coding-system' is now an alias for `locale-coding-system'." 286 286 (interactive 287 (list (let ((default w32-system-coding-system))287 (list (let ((default locale-coding-system)) 288 288 (read-coding-system 289 289 (format "Coding system for system calls (default, %s): " … … 291 291 default)))) 292 292 (check-coding-system coding-system) 293 (setq w32-system-coding-system coding-system))293 (setq locale-coding-system coding-system)) 294 294 295 295 ;; locale-coding-system was introduced to do the same thing as 296 296 ;; w32-system-coding-system. Use that instead. 297 ( set-w32-system-coding-systemlocale-coding-system)297 (defvaralias 'w32-system-coding-system 'locale-coding-system) 298 298 299 299 ;;; Set to a system sound if you want a fancy bell. trunk/src/ChangeLog.Meadow
r3869 r3871 1 2005-09-15 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 3 * mw32term.h (Vw32_system_coding_system): removed. 4 (Vlocale_coding_system): New extern in replace of 5 Vw32_system_coding_system. 6 Fixed ticket:130 7 8 * mw32term.c (mw32-sh-get-file-info): Use locale-coding-system 9 instead of obsolete variable w32-system-coding-system. 10 11 * mw32fns.c (mw32_set_name): Ditto. 12 (mw32_set_title): Ditto. 13 (mw32-file-dialog): Ditto. 14 (mw32-file-dialog): Ditto. 15 16 * mw32ime.c (mw32_get_ime_reconversion_length): Ditto. 17 (mw32_get_ime_reconversion_string): Ditto. 18 (w32-ime-register-word-dialog): Ditto. 19 (w32-ime-set-composition-string): Ditto. 20 (w32-ime-get-composition-string): Ditto. 21 (w32-ime-get-candidate-list): Ditto. 22 23 * mw32reg.c (registry_to_reg_sz_size): Ditto. 24 (registry_to_reg_sz): Ditto. 25 (mw32-registry-list-keys): Ditto. 26 (mw32-registry-list-values): Ditto. 27 (mw32-registry-get): Ditto. 28 (mw32-registry-delete-key): Ditto. 29 (mw32-registry-delete-value): Ditto. 30 (mw32-registry-create-key): Ditto. 31 (mw32-registry-set): Ditto. 32 33 * mw32menu.c (appendmenu_encode): Ditto. 34 (modifymenu_encode): Ditto. 35 (insertmenu_encode): Ditto. 36 (add_menu_item): Ditto. 37 38 * mw32mci.c (mw32-mci-send-string): Ditto. 39 (mw32-mci-get-error-string): Ditto. 40 41 * w32proc.c (Vw32_system_coding_system): Removed. 42 (Vlocale_coding_system): New extern in replace of 43 Vw32_system_coding_system. 44 (w32-get-locale-info): Use locale-coding-system instead of 45 obsolete variable w32-system-coding-system. 46 47 * mw32font.c (Vw32_system_coding_system): Removed. 48 (logfont_to_lisp_object): Use locale-coding-system instead of 49 obsolete variable w32-system-coding-system. 50 (encode_logfont_name): Ditto. 51 (mw32_enumfontfamilyproc): Ditto. 52 (w32-enum-logfont): Ditto. 53 (syms_of_mw32font): Remove definition of w32-system-coding-system. 54 55 * coding.h (ENCODE_SYSTEM): Use locale-coding-system instead of 56 obsolete variable w32-system-coding-system. 57 (DECODE_SYSTEM): Ditto. 58 (Vw32_system_coding_system): removed. 59 1 60 2005-09-14 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 61 trunk/src/coding.h
r3809 r3871 595 595 for system functions, if any. */ 596 596 #define ENCODE_SYSTEM(str) \ 597 (! NILP (V w32_system_coding_system) \598 && XFASTINT (V w32_system_coding_system) != 0 \599 ? code_convert_string_norecord (str, V w32_system_coding_system, 1) \597 (! NILP (Vlocale_coding_system) \ 598 && XFASTINT (Vlocale_coding_system) != 0 \ 599 ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ 600 600 : str) 601 601 … … 603 603 for system functions, if any. */ 604 604 #define DECODE_SYSTEM(str) \ 605 (! NILP (V w32_system_coding_system) \606 && XFASTINT (V w32_system_coding_system) != 0 \607 ? code_convert_string_norecord (str, V w32_system_coding_system, 0) \605 (! NILP (Vlocale_coding_system) \ 606 && XFASTINT (Vlocale_coding_system) != 0 \ 607 ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ 608 608 : str) 609 609 … … 721 721 extern Lisp_Object Vdefault_file_name_coding_system; 722 722 723 #ifdef WINDOWSNT724 /* Coding system for w32 system strings, or nil if none. */725 extern Lisp_Object Vw32_system_coding_system;726 #endif727 723 #endif 728 724 trunk/src/mw32fns.c
r3870 r3871 1251 1251 int size; 1252 1252 char *ttext; 1253 MW32_ENCODE_TEXT (name, V w32_system_coding_system, &ttext, &size);1253 MW32_ENCODE_TEXT (name, Vlocale_coding_system, &ttext, &size); 1254 1254 BLOCK_INPUT; 1255 1255 SetWindowText (FRAME_MW32_WINDOW (f), ttext); … … 1308 1308 int size; 1309 1309 char *ttext; 1310 MW32_ENCODE_TEXT (name, V w32_system_coding_system, &ttext, &size);1310 MW32_ENCODE_TEXT (name, Vlocale_coding_system, &ttext, &size); 1311 1311 BLOCK_INPUT; 1312 1312 SetWindowText (FRAME_MW32_WINDOW (f), ttext); … … 4339 4339 directory and using "*" as pattern. */ 4340 4340 dir = Fexpand_file_name (dir, Qnil); 4341 init_dir = mw32_encode_lispy_string (V w32_system_coding_system,4341 init_dir = mw32_encode_lispy_string (Vlocale_coding_system, 4342 4342 Funix_to_dos_filename (dir), NULL); 4343 4343 … … 4350 4350 LPTSTR filename_tmp; 4351 4351 4352 filename_tmp = mw32_encode_lispy_string (V w32_system_coding_system, file, &size);4352 filename_tmp = mw32_encode_lispy_string (Vlocale_coding_system, file, &size); 4353 4353 memcpy (filename, filename_tmp, size); 4354 4354 filename[size / sizeof (filename[0])] = '\0'; … … 4380 4380 file_details.lpstrInitialDir = init_dir; 4381 4381 file_details.lpstrTitle 4382 = mw32_encode_lispy_string (V w32_system_coding_system,4382 = mw32_encode_lispy_string (Vlocale_coding_system, 4383 4383 prompt, NULL); 4384 4384 file_details.Flags = (OFN_HIDEREADONLY | OFN_NOCHANGEDIR … … 4392 4392 if (GetOpenFileName (&file_details)) 4393 4393 { 4394 file = mw32_decode_lispy_string (V w32_system_coding_system,4394 file = mw32_decode_lispy_string (Vlocale_coding_system, 4395 4395 filename, 0); 4396 4396 file = Fdos_to_unix_filename (file); trunk/src/mw32font.c
r3815 r3871 52 52 Lisp_Object Qfamily, Qraster, Qscalable; 53 53 54 Lisp_Object Vw32_system_coding_system;55 54 Lisp_Object Vw32_default_font_request_alist; 56 55 … … 864 863 865 864 nbytes = strlen (lf->lfFaceName); 866 setup_coding_system (Fcheck_coding_system (V w32_system_coding_system),865 setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 867 866 &coding); 868 867 bufsize = decoding_buffer_size (&coding, nbytes); … … 895 894 char *buf; 896 895 897 setup_coding_system (Fcheck_coding_system (V w32_system_coding_system),896 setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 898 897 &coding); 899 898 bufsize = encoding_buffer_size (&coding, LISPY_STRING_BYTES (src) + 1); … … 2573 2572 style_size = strlen (lpelf->elfStyle); 2574 2573 2575 setup_coding_system (Fcheck_coding_system (V w32_system_coding_system),2574 setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 2576 2575 &coding); 2577 2576 bufsize = decoding_buffer_size (&coding, max (fullname_size, style_size)); … … 2649 2648 2650 2649 CHECK_STRING (family); 2651 setup_coding_system (Fcheck_coding_system (V w32_system_coding_system),2650 setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 2652 2651 &coding); 2653 2652 bufsize = encoding_buffer_size (&coding, … … 2908 2907 staticpro (&Qcentering); 2909 2908 2910 DEFVAR_LISP ("w32-system-coding-system",2911 &Vw32_system_coding_system,2912 doc: /* coding system in windows system */);2913 Vw32_system_coding_system = Qnil;2914 2915 2909 DEFVAR_LISP ("w32-default-font-request-alist", 2916 2910 &Vw32_default_font_request_alist, trunk/src/mw32ime.c
r3868 r3871 298 298 str = Fbuffer_substring_no_properties (start, end); 299 299 300 MW32_ENCODE_TEXT (str, V w32_system_coding_system, &lpstr, &len);300 MW32_ENCODE_TEXT (str, Vlocale_coding_system, &lpstr, &len); 301 301 SET_PT_BOTH (pt, pt_byte); 302 302 … … 334 334 str = Fbuffer_substring_no_properties (start, end); 335 335 336 MW32_ENCODE_TEXT (str, V w32_system_coding_system, &lpstr, &len);336 MW32_ENCODE_TEXT (str, Vlocale_coding_system, &lpstr, &len); 337 337 338 338 Fgoto_char (start); … … 903 903 { 904 904 hkl = GetKeyboardLayout (0); 905 MW32_ENCODE_TEXT (reading, V w32_system_coding_system, &creading, &len);905 MW32_ENCODE_TEXT (reading, Vlocale_coding_system, &creading, &len); 906 906 regword.lpReading = creading; 907 MW32_ENCODE_TEXT (word, V w32_system_coding_system, &cword, &len);907 MW32_ENCODE_TEXT (word, Vlocale_coding_system, &cword, &len); 908 908 regword.lpWord = cword; 909 909 … … 1183 1183 if (size == 0) return Qnil; 1184 1184 1185 setup_coding_system (Fcheck_coding_system (V w32_system_coding_system),1185 setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 1186 1186 &coding); 1187 1187 size = encoding_buffer_size (&coding, size); … … 1353 1353 start_idx = end_idx; 1354 1354 str = Fdecode_coding_string (make_string (cs, size), 1355 V w32_system_coding_system,1355 Vlocale_coding_system, 1356 1356 Qt); 1357 1357 end_idx = start_idx + LISPY_STRING_BYTES (str); … … 1398 1398 Fcons (Fdecode_coding_string (build_string (((unsigned char *) lpcd) + 1399 1399 lpcd->dwOffset[i]), 1400 V w32_system_coding_system, Qt),1400 Vlocale_coding_system, Qt), 1401 1401 result); 1402 1402 } trunk/src/mw32mci.c
r3801 r3871 62 62 { 63 63 MCIERROR ret; 64 LPTSTR string = mw32_encode_lispy_string(V w32_system_coding_system,64 LPTSTR string = mw32_encode_lispy_string(Vlocale_coding_system, 65 65 command, NULL); 66 66 ret = (*mciSendStringProc) (string, … … 69 69 if (ret != 0) 70 70 return make_number (ret); 71 return mw32_decode_lispy_string (V w32_system_coding_system,71 return mw32_decode_lispy_string (Vlocale_coding_system, 72 72 return_string, 0); 73 73 } … … 95 95 if (!ret) 96 96 error ("Unknown Error code: %d", error_code); 97 return mw32_decode_lispy_string (V w32_system_coding_system,97 return mw32_decode_lispy_string (Vlocale_coding_system, 98 98 error_string, 0); 99 99 } trunk/src/mw32menu.c
r3847 r3871 343 343 char *ttext; 344 344 345 MW32_ENCODE_CSTR (name, V w32_system_coding_system, &ttext, &size);345 MW32_ENCODE_CSTR (name, Vlocale_coding_system, &ttext, &size); 346 346 return AppendMenu (hmenu, fuflags, idnewitem, ttext); 347 347 } … … 355 355 int size, len, menustrsize, menunum; 356 356 357 MW32_ENCODE_CSTR (name, V w32_system_coding_system, &ttext, &size);357 MW32_ENCODE_CSTR (name, Vlocale_coding_system, &ttext, &size); 358 358 menustr = (LPTSTR) alloca (sizeof (TCHAR) * (size + 1)); 359 359 … … 387 387 char *ttext; 388 388 389 MW32_ENCODE_CSTR (name, V w32_system_coding_system, &ttext, &size);389 MW32_ENCODE_CSTR (name, Vlocale_coding_system, &ttext, &size); 390 390 return InsertMenu (hmenu, uitem, fuflags, idnewitem, ttext); 391 391 } … … 431 431 #ifdef MEADOW /* 96.10.12 modified by himi */ 432 432 struct coding_system coding; 433 extern Lisp_Object V w32_system_coding_system;433 extern Lisp_Object Vlocale_coding_system; 434 434 int decodebufsize; 435 435 #endif … … 441 441 442 442 #ifdef MEADOW 443 setup_coding_system (Fcheck_coding_system (V w32_system_coding_system),443 setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 444 444 &coding); 445 445 decodebufsize = encoding_buffer_size (&coding, trunk/src/mw32reg.c
r3776 r3871 240 240 241 241 static DWORD 242 registry_to_reg_dword_size (Lisp_Object data)243 { 244 return sizeof (DWORD);242 registry_to_reg_dword_size (Lisp_Object data) 243 { 244 return sizeof (DWORD); 245 245 } 246 246 247 247 static DWORD 248 registry_to_reg_qword_size (Lisp_Object data)249 { 250 return sizeof (DWORD) * 2;248 registry_to_reg_qword_size (Lisp_Object data) 249 { 250 return sizeof (DWORD) * 2; 251 251 } 252 252 253 253 static DWORD 254 registry_to_reg_sz_size (Lisp_Object data)254 registry_to_reg_sz_size (Lisp_Object data) 255 255 { 256 256 char *text; 257 257 DWORD size; 258 258 259 MW32_ENCODE_TEXT (data, V w32_system_coding_system, &text, &size);259 MW32_ENCODE_TEXT (data, Vlocale_coding_system, &text, &size); 260 260 return size + 1; 261 261 } 262 262 263 263 static void 264 registry_to_reg_sz (LPBYTE pdata, DWORD size, Lisp_Object data)264 registry_to_reg_sz (LPBYTE pdata, DWORD size, Lisp_Object data) 265 265 { 266 266 char *text; 267 267 DWORD l; 268 268 269 MW32_ENCODE_TEXT (data, V w32_system_coding_system, &text, &l);269 MW32_ENCODE_TEXT (data, Vlocale_coding_system, &text, &l); 270 270 bcopy (text, pdata, size); 271 271 } 272 272 273 273 static DWORD 274 registry_to_reg_multi_sz_size (Lisp_Object data)274 registry_to_reg_multi_sz_size (Lisp_Object data) 275 275 { 276 276 DWORD size = 0; … … 287 287 288 288 static void 289 registry_to_reg_multi_sz (LPBYTE pdata, DWORD size, Lisp_Object data)289 registry_to_reg_multi_sz (LPBYTE pdata, DWORD size, Lisp_Object data) 290 290 { 291 291 Lisp_Object tail, string; … … 305 305 306 306 static Lisp_Object 307 registry_to_string (LPBYTE pdata, DWORD size)307 registry_to_string (LPBYTE pdata, DWORD size) 308 308 { 309 309 return build_string (pdata); … … 313 313 314 314 static Lisp_Object 315 registry_to_expand_string (LPBYTE pdata, DWORD size)315 registry_to_expand_string (LPBYTE pdata, DWORD size) 316 316 { 317 317 LPTSTR pstr; 318 318 Lisp_Object result; 319 319 320 pstr = alloca (REGSTRY_BUFFER_MAX);320 pstr = alloca (REGSTRY_BUFFER_MAX); 321 321 if (ExpandEnvironmentStrings (pdata, pstr, REGSTRY_BUFFER_MAX) == 0L) 322 322 return Qnil; … … 329 329 330 330 static Lisp_Object 331 registry_to_string_list (LPBYTE pdata, DWORD size)331 registry_to_string_list (LPBYTE pdata, DWORD size) 332 332 { 333 333 char *ptr = pdata; … … 345 345 346 346 static Lisp_Object 347 registry_to_raw_number (LPBYTE pdata, DWORD size)347 registry_to_raw_number (LPBYTE pdata, DWORD size) 348 348 { 349 349 /* Returns data as cons of higher 16bit and lower 16bit. */ … … 353 353 354 354 data = *(LPDWORD) pdata; 355 return Fcons (make_number (data >> 16), make_number(data & 0xFFFF));356 } 357 358 static Lisp_Object 359 registry_to_raw_qword_number (LPBYTE pdata, DWORD size)355 return Fcons (make_number (data >> 16), make_number (data & 0xFFFF)); 356 } 357 358 static Lisp_Object 359 registry_to_raw_qword_number (LPBYTE pdata, DWORD size) 360 360 { 361 361 int i; … … 371 371 372 372 static Lisp_Object 373 registry_to_unibyte_string (LPBYTE pdata, DWORD size)373 registry_to_unibyte_string (LPBYTE pdata, DWORD size) 374 374 { 375 375 return make_unibyte_string (pdata, size); … … 377 377 378 378 static void 379 registry_key_function_setup (registry_key *regkey)379 registry_key_function_setup (registry_key *regkey) 380 380 { 381 381 switch (regkey->type) … … 460 460 if (regkey->hkey != hrkey) 461 461 RegCloseKey (hrkey); 462 if (NILP (obj))462 if (NILP (obj)) 463 463 return Qnil; 464 464 … … 469 469 registry_delete_key (registry_key *regkey) 470 470 { 471 if (RegDeleteKey (regkey->hkey, regkey->subkey) != ERROR_SUCCESS)471 if (RegDeleteKey (regkey->hkey, regkey->subkey) != ERROR_SUCCESS) 472 472 { 473 473 Fsignal (Qerror, Fcons (build_string ("Invalid registry key"), … … 500 500 hrkey = regkey->hkey; 501 501 502 err = RegDeleteValue (hrkey, regkey->name);502 err = RegDeleteValue (hrkey, regkey->name); 503 503 if (regkey->hkey != hrkey) 504 504 RegCloseKey (hrkey); … … 522 522 LONG err; 523 523 524 err = RegCreateKeyEx (regkey->hkey, regkey->subkey, 0, NULL,524 err = RegCreateKeyEx (regkey->hkey, regkey->subkey, 0, NULL, 525 525 REG_OPTION_NON_VOLATILE, 526 526 KEY_WRITE, NULL, &hrkey, … … 535 535 } 536 536 537 RegCloseKey (hrkey);537 RegCloseKey (hrkey); 538 538 539 539 return Qt; … … 589 589 590 590 static int 591 registry_key_setup (registry_key *regkey, char *key_data, char *name_data)591 registry_key_setup (registry_key *regkey, char *key_data, char *name_data) 592 592 { 593 593 bzero (regkey, sizeof (registry_key)); … … 606 606 607 607 static void 608 registry_key_destory (registry_key *regkey)608 registry_key_destory (registry_key *regkey) 609 609 { 610 610 if (regkey->rootkey) xfree (regkey->rootkey); … … 613 613 614 614 static int 615 registry_data_valid_p (Lisp_Object data)615 registry_data_valid_p (Lisp_Object data) 616 616 { 617 617 Lisp_Object type_sym; … … 744 744 745 745 static Lisp_Object 746 registry_enum_all_keys (HKEY hkey, DWORD max_subkey_len, int with_data)746 registry_enum_all_keys (HKEY hkey, DWORD max_subkey_len, int with_data) 747 747 { 748 748 registry_key regkey; … … 753 753 struct gcpro gcpro1; 754 754 755 bzero (®key, sizeof (registry_key));755 bzero (®key, sizeof (registry_key)); 756 756 name_buf_siz = max_subkey_len+1; 757 757 name_buf = alloca (name_buf_siz); … … 783 783 784 784 static Lisp_Object 785 registry_enum_all_values (HKEY hkey, DWORD max_value_len, int with_data)785 registry_enum_all_values (HKEY hkey, DWORD max_value_len, int with_data) 786 786 { 787 787 registry_key regkey; … … 792 792 struct gcpro gcpro1; 793 793 794 bzero (®key, sizeof (registry_key));794 bzero (®key, sizeof (registry_key)); 795 795 name_buf_siz = max_value_len+1; 796 796 name_buf = alloca (name_buf_siz); … … 841 841 CHECK_STRING (key); 842 842 843 MW32_ENCODE_TEXT (key, V w32_system_coding_system, &key_data, &key_len);844 if (!registry_key_setup (®key, key_data, NULL))843 MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 844 if (!registry_key_setup (®key, key_data, NULL)) 845 845 { 846 846 errmsg = "Cannot open KEY, %s"; … … 863 863 } 864 864 865 result = registry_enum_all_keys (hkey, max_subkey_len, !NILP (with_data));865 result = registry_enum_all_keys (hkey, max_subkey_len, !NILP (with_data)); 866 866 867 867 quit: … … 869 869 registry_key_destory (®key); 870 870 871 if (errmsg) { 872 int nargs = 2; 873 Lisp_Object args[2]; 874 args[0] = build_string (errmsg); 875 args[1] = key; 876 Fsignal (Qerror, Fcons (Fformat (nargs, args), Qnil)); 877 } 871 if (errmsg) 872 { 873 int nargs = 2; 874 Lisp_Object args[2]; 875 args[0] = build_string (errmsg); 876 args[1] = key; 877 Fsignal (Qerror, Fcons (Fformat (nargs, args), Qnil)); 878 } 878 879 return result; 879 880 } … … 900 901 CHECK_STRING (key); 901 902 902 MW32_ENCODE_TEXT (key, V w32_system_coding_system, &key_data, &key_len);903 if (!registry_key_setup (®key, key_data, NULL))903 MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 904 if (!registry_key_setup (®key, key_data, NULL)) 904 905 { 905 906 errmsg = "Cannot open KEY, %s"; … … 923 924 } 924 925 925 result = registry_enum_all_values (hkey, max_value_len, !NILP (with_data));926 result = registry_enum_all_values (hkey, max_value_len, !NILP (with_data)); 926 927 927 928 quit: 928 929 if (hkey) RegCloseKey (hkey); 929 930 registry_key_destory (®key); 930 if (errmsg) { 931 int nargs = 2; 932 Lisp_Object args[2]; 933 args[0] = build_string (errmsg); 934 args[1] = key; 935 Fsignal (Qerror, Fcons (Fformat (nargs, args), Qnil)); 936 } 931 if (errmsg) 932 { 933 int nargs = 2; 934 Lisp_Object args[2]; 935 args[0] = build_string (errmsg); 936 args[1] = key; 937 Fsignal (Qerror, Fcons (Fformat (nargs, args), Qnil)); 938 } 937 939 return result; 938 940 } … … 980 982 CHECK_STRING (name); 981 983 982 MW32_ENCODE_TEXT (key, V w32_system_coding_system, &key_data, &key_len);984 MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 983 985 984 986 if (STRINGP (name)) 985 987 { 986 MW32_ENCODE_TEXT (name, V w32_system_coding_system,988 MW32_ENCODE_TEXT (name, Vlocale_coding_system, 987 989 &name_data, &name_len); 988 990 } … … 990 992 name_data = NULL; 991 993 992 if (!registry_key_setup (®key, key_data, name_data))994 if (!registry_key_setup (®key, key_data, name_data)) 993 995 { 994 996 registry_key_destory (®key); … … 1023 1025 dw = (XFASTINT (hword) << 16) + XFASTINT (lword); 1024 1026 1025 if (!NILP (hhword))1027 if (!NILP (hhword)) 1026 1028 { 1027 1029 CHECK_NUMBER (hhword); … … 1030 1032 } 1031 1033 1032 if (((dw & mask) == 0 && /* non negative number */ 1033 (NILP (hhword) || hdw == 0)) || 1034 ((dw & mask) == mask && /* negative number */ 1035 (NILP (hhword) || hdw == ~((DWORD)0)))) { 1036 return make_number ((long)dw); 1037 } else { 1038 /* not fit for emacs integer, cause overflow error */ 1039 Fsignal (Qoverflow_error, registry_integer_overflow_data); 1040 } 1041 1034 if (((dw & mask) == 0 /* non negative number */ 1035 && (NILP (hhword) || hdw == 0)) 1036 || ((dw & mask) == mask /* negative number */ 1037 && (NILP (hhword) || hdw == ~((DWORD)0)))) 1038 { 1039 return make_number ((long)dw); 1040 } 1041 else 1042 { 1043 /* not fit for emacs integer, cause overflow error */ 1044 Fsignal (Qoverflow_error, registry_integer_overflow_data); 1045 } 1046 1042 1047 /* never come here */ 1043 1048 return Qnil; … … 1058 1063 CHECK_STRING (key); 1059 1064 1060 MW32_ENCODE_TEXT (key, V w32_system_coding_system, &key_data, &key_len);1061 1062 if (!registry_key_setup (®key, key_data, NULL))1065 MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 1066 1067 if (!registry_key_setup (®key, key_data, NULL)) 1063 1068 { 1064 1069 registry_key_destory (®key); … … 1066 1071 } 1067 1072 1068 result = registry_delete_key (®key);1073 result = registry_delete_key (®key); 1069 1074 1070 1075 registry_key_destory (®key); … … 1088 1093 CHECK_STRING (name); 1089 1094 1090 MW32_ENCODE_TEXT (key, V w32_system_coding_system, &key_data, &key_len);1091 MW32_ENCODE_TEXT (name, V w32_system_coding_system, &name_data, &name_len);1092 1093 if (!registry_key_setup (®key, key_data, name_data))1095 MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 1096 MW32_ENCODE_TEXT (name, Vlocale_coding_system, &name_data, &name_len); 1097 1098 if (!registry_key_setup (®key, key_data, name_data)) 1094 1099 { 1095 1100 registry_key_destory (®key); … … 1097 1102 } 1098 1103 1099 result = registry_delete_value (®key);1104 result = registry_delete_value (®key); 1100 1105 1101 1106 registry_key_destory (®key); … … 1118 1123 CHECK_STRING (key); 1119 1124 1120 MW32_ENCODE_TEXT (key, V w32_system_coding_system, &key_data, &key_len);1121 1122 if (!registry_key_setup (®key, key_data, NULL))1125 MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 1126 1127 if (!registry_key_setup (®key, key_data, NULL)) 1123 1128 { 1124 1129 registry_key_destory (®key); … … 1126 1131 } 1127 1132 1128 result = registry_create_key (®key);1133 result = registry_create_key (®key); 1129 1134 1130 1135 registry_key_destory (®key); … … 1150 1155 return Qnil; 1151 1156 1152 MW32_ENCODE_TEXT (key, V w32_system_coding_system, &key_data, &key_len);1157 MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 1153 1158 1154 1159 if (STRINGP (name)) 1155 1160 { 1156 MW32_ENCODE_TEXT (name, V w32_system_coding_system,1161 MW32_ENCODE_TEXT (name, Vlocale_coding_system, 1157 1162 &name_data, &name_len); 1158 1163 } … … 1160 1165 name_data = NULL; 1161 1166 1162 if (!registry_key_setup (®key, key_data, name_data))1167 if (!registry_key_setup (®key, key_data, name_data)) 1163 1168 { 1164 1169 registry_key_destory (®key); trunk/src/mw32term.c
r3859 r3871 6518 6518 6519 6519 if (STRINGP (path)) 6520 path_string = mw32_encode_lispy_string (V w32_system_coding_system,6520 path_string = mw32_encode_lispy_string (Vlocale_coding_system, 6521 6521 (Funix_to_dos_filename (path)), 6522 6522 NULL); trunk/src/mw32term.h
r3870 r3871 921 921 window procedure. */ 922 922 extern HWND mw32_frame_window; 923 extern Lisp_Object V w32_system_coding_system;923 extern Lisp_Object Vlocale_coding_system; 924 924 925 925 struct coding_system; trunk/src/w32proc.c
r3809 r3871 120 120 121 121 #ifdef MEADOW 122 extern Lisp_Object V w32_system_coding_system;122 extern Lisp_Object Vlocale_coding_system; 123 123 #endif 124 124 … … 2019 2019 #ifdef MEADOW 2020 2020 return Fdecode_coding_string (build_string (full_name), 2021 V w32_system_coding_system, Qt);2021 Vlocale_coding_system, Qt); 2022 2022 #else 2023 2023 return build_string (full_name); … … 2033 2033 return Fdecode_coding_string (make_unibyte_string (full_name, 2034 2034 got_full - 1), 2035 V w32_system_coding_system, Qt);2035 Vlocale_coding_system, Qt); 2036 2036 #else 2037 2037 return make_unibyte_string (full_name, got_full);
