Changeset 3871

Show
Ignore:
Timestamp:
2005年09月16日 01時32分13秒 (3 years ago)
Author:
horiguti
Message:

Use locale-coding-system instad of w32-system-coding-system.
Make w32-system-coding-system alias of locale-coding-system following
CVS-HEAD of emacs.

Fixed ticket:130

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/ChangeLog.Meadow

    r3863 r3871  
     12005-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         
    1172005-09-10  MIYOSHI Masanori  <miyoshi@meadowy.org> 
    218 
  • trunk/lisp/international/meadow.el

    r3805 r3871  
    286286          (not (numberp show-flag))) 
    287287      (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) 
    289289        (args (append 
    290290               (list document) 
  • trunk/lisp/international/mw32misc.el

    r3841 r3871  
    2121  (interactive "zWindows-system-coding-system:") 
    2222  (check-coding-system coding-system) 
    23   (setq w32-system-coding-system coding-system)) 
     23  (setq locale-coding-system coding-system)) 
    2424 
    2525(fmakunbound 'font-menu-add-default) 
  • trunk/lisp/mw32reg.el

    r3827 r3871  
    5858  "Get string data in registry KEY from value NAME with decoding. 
    5959If NAME is nil, value of KEY is retrieved. 
    60 Returns string which is decoded by w32-system-coding-system or 
     60Returns string which is decoded by `locale-coding-system' or 
    6161specified CODING." 
    6262  (let ((data (mw32-registry-get key name))) 
     
    6666      (if (memq type '(registry-sz registry-expand-sz)) 
    6767          (decode-coding-string (car data) 
    68                                 (or coding w32-system-coding-system)) 
     68                                (or coding locale-coding-system)) 
    6969        (error "Registry data type is not fit for string")))))) 
    7070 
     
    7272  "Get multiple string data in registry KEY from value NAME with decoding. 
    7373If NAME is nil, value of KEY is retrieved. 
    74 Returns list of string decoded by `w32-system-coding-system' or 
     74Returns list of string decoded by `locale-coding-system' or 
    7575specified CODING." 
    7676  (let ((data (mw32-registry-get key name))) 
     
    8181            (mapcar (lambda (str) 
    8282                      (decode-coding-string str (or coding 
    83                                                     w32-system-coding-system))) 
     83                                                    locale-coding-system))) 
    8484                    val) 
    8585          (error "Registry data type is not fit for string list")))))) 
  • trunk/lisp/w32-fns.el

    r3863 r3871  
    285285`w32-system-coding-system' is now an alias for `locale-coding-system'." 
    286286  (interactive 
    287    (list (let ((default w32-system-coding-system)) 
     287   (list (let ((default locale-coding-system)) 
    288288           (read-coding-system 
    289289            (format "Coding system for system calls (default, %s): " 
     
    291291            default)))) 
    292292  (check-coding-system coding-system) 
    293   (setq w32-system-coding-system coding-system)) 
     293  (setq locale-coding-system coding-system)) 
    294294 
    295295;; locale-coding-system was introduced to do the same thing as 
    296296;; w32-system-coding-system. Use that instead. 
    297 (set-w32-system-coding-system locale-coding-system) 
     297(defvaralias 'w32-system-coding-system 'locale-coding-system) 
    298298 
    299299;;; Set to a system sound if you want a fancy bell. 
  • trunk/src/ChangeLog.Meadow

    r3869 r3871  
     12005-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 
    1602005-09-14  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
    261 
  • trunk/src/coding.h

    r3809 r3871  
    595595   for system functions, if any.  */ 
    596596#define ENCODE_SYSTEM(str)                                                 \ 
    597   (! NILP (Vw32_system_coding_system)                                    \ 
    598    && XFASTINT (Vw32_system_coding_system) != 0                                  \ 
    599    ? code_convert_string_norecord (str, Vw32_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)        \ 
    600600   : str) 
    601601 
     
    603603   for system functions, if any.  */ 
    604604#define DECODE_SYSTEM(str)                                                 \ 
    605   (! NILP (Vw32_system_coding_system)                                    \ 
    606    && XFASTINT (Vw32_system_coding_system) != 0                                  \ 
    607    ? code_convert_string_norecord (str, Vw32_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)        \ 
    608608   : str) 
    609609 
     
    721721extern Lisp_Object Vdefault_file_name_coding_system; 
    722722 
    723 #ifdef WINDOWSNT 
    724 /* Coding system for w32 system strings, or nil if none.  */ 
    725 extern Lisp_Object Vw32_system_coding_system; 
    726 #endif 
    727723#endif 
    728724 
  • trunk/src/mw32fns.c

    r3870 r3871  
    12511251      int size; 
    12521252      char *ttext; 
    1253       MW32_ENCODE_TEXT (name, Vw32_system_coding_system, &ttext, &size); 
     1253      MW32_ENCODE_TEXT (name, Vlocale_coding_system, &ttext, &size); 
    12541254      BLOCK_INPUT; 
    12551255      SetWindowText (FRAME_MW32_WINDOW (f), ttext); 
     
    13081308      int size; 
    13091309      char *ttext; 
    1310       MW32_ENCODE_TEXT (name, Vw32_system_coding_system, &ttext, &size); 
     1310      MW32_ENCODE_TEXT (name, Vlocale_coding_system, &ttext, &size); 
    13111311      BLOCK_INPUT; 
    13121312      SetWindowText (FRAME_MW32_WINDOW (f), ttext); 
     
    43394339     directory and using "*" as pattern.  */ 
    43404340  dir = Fexpand_file_name (dir, Qnil); 
    4341   init_dir = mw32_encode_lispy_string (Vw32_system_coding_system, 
     4341  init_dir = mw32_encode_lispy_string (Vlocale_coding_system, 
    43424342                                       Funix_to_dos_filename (dir), NULL); 
    43434343 
     
    43504350          LPTSTR filename_tmp; 
    43514351 
    4352           filename_tmp = mw32_encode_lispy_string (Vw32_system_coding_system, file, &size); 
     4352          filename_tmp = mw32_encode_lispy_string (Vlocale_coding_system, file, &size); 
    43534353          memcpy (filename, filename_tmp, size); 
    43544354          filename[size / sizeof (filename[0])] = '\0'; 
     
    43804380  file_details.lpstrInitialDir = init_dir; 
    43814381  file_details.lpstrTitle 
    4382     = mw32_encode_lispy_string (Vw32_system_coding_system, 
     4382    = mw32_encode_lispy_string (Vlocale_coding_system, 
    43834383                                prompt, NULL); 
    43844384  file_details.Flags = (OFN_HIDEREADONLY | OFN_NOCHANGEDIR 
     
    43924392  if (GetOpenFileName (&file_details)) 
    43934393    { 
    4394       file = mw32_decode_lispy_string (Vw32_system_coding_system, 
     4394      file = mw32_decode_lispy_string (Vlocale_coding_system, 
    43954395                                       filename, 0); 
    43964396      file = Fdos_to_unix_filename (file); 
  • trunk/src/mw32font.c

    r3815 r3871  
    5252Lisp_Object Qfamily, Qraster, Qscalable; 
    5353 
    54 Lisp_Object Vw32_system_coding_system; 
    5554Lisp_Object Vw32_default_font_request_alist; 
    5655 
     
    864863 
    865864  nbytes = strlen (lf->lfFaceName); 
    866   setup_coding_system (Fcheck_coding_system (Vw32_system_coding_system), 
     865  setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 
    867866                       &coding); 
    868867  bufsize = decoding_buffer_size (&coding, nbytes); 
     
    895894  char *buf; 
    896895 
    897   setup_coding_system (Fcheck_coding_system (Vw32_system_coding_system), 
     896  setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 
    898897                       &coding); 
    899898  bufsize = encoding_buffer_size (&coding, LISPY_STRING_BYTES (src) + 1); 
     
    25732572  style_size = strlen (lpelf->elfStyle); 
    25742573 
    2575   setup_coding_system (Fcheck_coding_system (Vw32_system_coding_system), 
     2574  setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 
    25762575                       &coding); 
    25772576  bufsize = decoding_buffer_size (&coding, max (fullname_size, style_size)); 
     
    26492648 
    26502649      CHECK_STRING (family); 
    2651       setup_coding_system (Fcheck_coding_system (Vw32_system_coding_system), 
     2650      setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 
    26522651                           &coding); 
    26532652      bufsize = encoding_buffer_size (&coding, 
     
    29082907  staticpro (&Qcentering); 
    29092908 
    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  
    29152909  DEFVAR_LISP ("w32-default-font-request-alist", 
    29162910               &Vw32_default_font_request_alist, 
  • trunk/src/mw32ime.c

    r3868 r3871  
    298298  str = Fbuffer_substring_no_properties (start, end); 
    299299 
    300   MW32_ENCODE_TEXT (str, Vw32_system_coding_system, &lpstr, &len); 
     300  MW32_ENCODE_TEXT (str, Vlocale_coding_system, &lpstr, &len); 
    301301  SET_PT_BOTH (pt, pt_byte); 
    302302 
     
    334334  str = Fbuffer_substring_no_properties (start, end); 
    335335 
    336   MW32_ENCODE_TEXT (str, Vw32_system_coding_system, &lpstr, &len); 
     336  MW32_ENCODE_TEXT (str, Vlocale_coding_system, &lpstr, &len); 
    337337 
    338338  Fgoto_char (start); 
     
    903903    { 
    904904      hkl = GetKeyboardLayout (0); 
    905       MW32_ENCODE_TEXT (reading, Vw32_system_coding_system, &creading, &len); 
     905      MW32_ENCODE_TEXT (reading, Vlocale_coding_system, &creading, &len); 
    906906      regword.lpReading = creading; 
    907       MW32_ENCODE_TEXT (word, Vw32_system_coding_system, &cword, &len); 
     907      MW32_ENCODE_TEXT (word, Vlocale_coding_system, &cword, &len); 
    908908      regword.lpWord = cword; 
    909909 
     
    11831183  if (size == 0) return Qnil; 
    11841184 
    1185   setup_coding_system (Fcheck_coding_system (Vw32_system_coding_system), 
     1185  setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 
    11861186                       &coding); 
    11871187  size = encoding_buffer_size (&coding, size); 
     
    13531353      start_idx = end_idx; 
    13541354      str = Fdecode_coding_string (make_string (cs, size), 
    1355                                    Vw32_system_coding_system, 
     1355                                   Vlocale_coding_system, 
    13561356                                   Qt); 
    13571357      end_idx = start_idx + LISPY_STRING_BYTES (str); 
     
    13981398        Fcons (Fdecode_coding_string (build_string (((unsigned char *) lpcd) + 
    13991399                                                    lpcd->dwOffset[i]), 
    1400                                       Vw32_system_coding_system, Qt), 
     1400                                      Vlocale_coding_system, Qt), 
    14011401               result); 
    14021402    } 
  • trunk/src/mw32mci.c

    r3801 r3871  
    6262    { 
    6363      MCIERROR ret; 
    64       LPTSTR string = mw32_encode_lispy_string(Vw32_system_coding_system, 
     64      LPTSTR string = mw32_encode_lispy_string(Vlocale_coding_system, 
    6565                                               command, NULL); 
    6666      ret = (*mciSendStringProc) (string, 
     
    6969      if (ret != 0) 
    7070        return make_number (ret); 
    71       return mw32_decode_lispy_string (Vw32_system_coding_system, 
     71      return mw32_decode_lispy_string (Vlocale_coding_system, 
    7272                                       return_string, 0); 
    7373    } 
     
    9595      if (!ret) 
    9696        error ("Unknown Error code: %d", error_code); 
    97       return mw32_decode_lispy_string (Vw32_system_coding_system, 
     97      return mw32_decode_lispy_string (Vlocale_coding_system, 
    9898                                       error_string, 0); 
    9999    } 
  • trunk/src/mw32menu.c

    r3847 r3871  
    343343  char *ttext; 
    344344 
    345   MW32_ENCODE_CSTR (name, Vw32_system_coding_system, &ttext, &size); 
     345  MW32_ENCODE_CSTR (name, Vlocale_coding_system, &ttext, &size); 
    346346  return AppendMenu (hmenu, fuflags, idnewitem, ttext); 
    347347} 
     
    355355  int size, len, menustrsize, menunum; 
    356356 
    357   MW32_ENCODE_CSTR (name, Vw32_system_coding_system, &ttext, &size); 
     357  MW32_ENCODE_CSTR (name, Vlocale_coding_system, &ttext, &size); 
    358358  menustr = (LPTSTR) alloca (sizeof (TCHAR) * (size + 1)); 
    359359 
     
    387387  char *ttext; 
    388388 
    389   MW32_ENCODE_CSTR (name, Vw32_system_coding_system, &ttext, &size); 
     389  MW32_ENCODE_CSTR (name, Vlocale_coding_system, &ttext, &size); 
    390390  return InsertMenu (hmenu, uitem, fuflags, idnewitem, ttext); 
    391391} 
     
    431431#ifdef MEADOW                   /* 96.10.12 modified by himi */ 
    432432      struct coding_system coding; 
    433       extern Lisp_Object Vw32_system_coding_system; 
     433      extern Lisp_Object Vlocale_coding_system; 
    434434      int decodebufsize; 
    435435#endif 
     
    441441 
    442442#ifdef MEADOW 
    443       setup_coding_system (Fcheck_coding_system (Vw32_system_coding_system), 
     443      setup_coding_system (Fcheck_coding_system (Vlocale_coding_system), 
    444444                           &coding); 
    445445      decodebufsize = encoding_buffer_size (&coding, 
  • trunk/src/mw32reg.c

    r3776 r3871  
    240240 
    241241static DWORD 
    242 registry_to_reg_dword_size(Lisp_Object data) 
    243 { 
    244   return sizeof(DWORD); 
     242registry_to_reg_dword_size (Lisp_Object data) 
     243{ 
     244  return sizeof (DWORD); 
    245245} 
    246246 
    247247static DWORD 
    248 registry_to_reg_qword_size(Lisp_Object data) 
    249 { 
    250   return sizeof(DWORD) * 2; 
     248registry_to_reg_qword_size (Lisp_Object data) 
     249{ 
     250  return sizeof (DWORD) * 2; 
    251251} 
    252252 
    253253static DWORD 
    254 registry_to_reg_sz_size(Lisp_Object data) 
     254registry_to_reg_sz_size (Lisp_Object data) 
    255255{ 
    256256  char *text; 
    257257  DWORD size; 
    258258 
    259   MW32_ENCODE_TEXT (data, Vw32_system_coding_system, &text, &size); 
     259  MW32_ENCODE_TEXT (data, Vlocale_coding_system, &text, &size); 
    260260  return size + 1; 
    261261} 
    262262 
    263263static void 
    264 registry_to_reg_sz(LPBYTE pdata, DWORD size, Lisp_Object data) 
     264registry_to_reg_sz (LPBYTE pdata, DWORD size, Lisp_Object data) 
    265265{ 
    266266  char *text; 
    267267  DWORD l; 
    268268 
    269   MW32_ENCODE_TEXT (data, Vw32_system_coding_system, &text, &l); 
     269  MW32_ENCODE_TEXT (data, Vlocale_coding_system, &text, &l); 
    270270  bcopy (text, pdata, size); 
    271271} 
    272272 
    273273static DWORD 
    274 registry_to_reg_multi_sz_size(Lisp_Object data) 
     274registry_to_reg_multi_sz_size (Lisp_Object data) 
    275275{ 
    276276  DWORD size = 0; 
     
    287287 
    288288static void 
    289 registry_to_reg_multi_sz(LPBYTE pdata, DWORD size, Lisp_Object data) 
     289registry_to_reg_multi_sz (LPBYTE pdata, DWORD size, Lisp_Object data) 
    290290{ 
    291291  Lisp_Object tail, string; 
     
    305305 
    306306static Lisp_Object 
    307 registry_to_string(LPBYTE pdata, DWORD size) 
     307registry_to_string (LPBYTE pdata, DWORD size) 
    308308{ 
    309309  return build_string (pdata); 
     
    313313 
    314314static Lisp_Object 
    315 registry_to_expand_string(LPBYTE pdata, DWORD size) 
     315registry_to_expand_string (LPBYTE pdata, DWORD size) 
    316316{ 
    317317  LPTSTR pstr; 
    318318  Lisp_Object result; 
    319319 
    320   pstr = alloca(REGSTRY_BUFFER_MAX); 
     320  pstr = alloca (REGSTRY_BUFFER_MAX); 
    321321  if (ExpandEnvironmentStrings (pdata, pstr, REGSTRY_BUFFER_MAX) == 0L) 
    322322    return Qnil; 
     
    329329 
    330330static Lisp_Object 
    331 registry_to_string_list(LPBYTE pdata, DWORD size) 
     331registry_to_string_list (LPBYTE pdata, DWORD size) 
    332332{ 
    333333  char *ptr = pdata; 
     
    345345 
    346346static Lisp_Object 
    347 registry_to_raw_number(LPBYTE pdata, DWORD size) 
     347registry_to_raw_number (LPBYTE pdata, DWORD size) 
    348348{ 
    349349  /* Returns data as cons of higher 16bit and lower 16bit. */ 
     
    353353 
    354354  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 
     358static Lisp_Object 
     359registry_to_raw_qword_number (LPBYTE pdata, DWORD size) 
    360360{ 
    361361  int i; 
     
    371371 
    372372static Lisp_Object 
    373 registry_to_unibyte_string(LPBYTE pdata, DWORD size) 
     373registry_to_unibyte_string (LPBYTE pdata, DWORD size) 
    374374{ 
    375375  return make_unibyte_string (pdata, size); 
     
    377377 
    378378static void 
    379 registry_key_function_setup(registry_key *regkey) 
     379registry_key_function_setup (registry_key *regkey) 
    380380{ 
    381381  switch (regkey->type) 
     
    460460  if (regkey->hkey != hrkey) 
    461461    RegCloseKey (hrkey); 
    462   if (NILP(obj)) 
     462  if (NILP (obj)) 
    463463    return Qnil; 
    464464 
     
    469469registry_delete_key (registry_key *regkey) 
    470470{ 
    471   if (RegDeleteKey(regkey->hkey, regkey->subkey) != ERROR_SUCCESS) 
     471  if (RegDeleteKey (regkey->hkey, regkey->subkey) != ERROR_SUCCESS) 
    472472    { 
    473473      Fsignal (Qerror, Fcons (build_string ("Invalid registry key"), 
     
    500500    hrkey = regkey->hkey; 
    501501 
    502   err = RegDeleteValue(hrkey, regkey->name); 
     502  err = RegDeleteValue (hrkey, regkey->name); 
    503503  if (regkey->hkey != hrkey) 
    504504    RegCloseKey (hrkey); 
     
    522522  LONG err; 
    523523 
    524   err = RegCreateKeyEx(regkey->hkey, regkey->subkey, 0, NULL, 
     524  err = RegCreateKeyEx (regkey->hkey, regkey->subkey, 0, NULL, 
    525525                       REG_OPTION_NON_VOLATILE, 
    526526                       KEY_WRITE, NULL, &hrkey, 
     
    535535    } 
    536536 
    537   RegCloseKey(hrkey); 
     537  RegCloseKey (hrkey); 
    538538 
    539539  return Qt; 
     
    589589 
    590590static int 
    591 registry_key_setup(registry_key *regkey, char *key_data, char *name_data) 
     591registry_key_setup (registry_key *regkey, char *key_data, char *name_data) 
    592592{ 
    593593  bzero (regkey, sizeof (registry_key)); 
     
    606606 
    607607static void 
    608 registry_key_destory(registry_key *regkey) 
     608registry_key_destory (registry_key *regkey) 
    609609{ 
    610610  if (regkey->rootkey) xfree (regkey->rootkey); 
     
    613613 
    614614static int 
    615 registry_data_valid_p(Lisp_Object data) 
     615registry_data_valid_p (Lisp_Object data) 
    616616{ 
    617617  Lisp_Object type_sym; 
     
    744744 
    745745static Lisp_Object 
    746 registry_enum_all_keys(HKEY hkey, DWORD max_subkey_len, int with_data) 
     746registry_enum_all_keys (HKEY hkey, DWORD max_subkey_len, int with_data) 
    747747{ 
    748748  registry_key regkey; 
     
    753753  struct gcpro gcpro1; 
    754754 
    755   bzero (&regkey, sizeof(registry_key)); 
     755  bzero (&regkey, sizeof (registry_key)); 
    756756  name_buf_siz = max_subkey_len+1; 
    757757  name_buf = alloca (name_buf_siz); 
     
    783783 
    784784static Lisp_Object 
    785 registry_enum_all_values(HKEY hkey, DWORD max_value_len, int with_data) 
     785registry_enum_all_values (HKEY hkey, DWORD max_value_len, int with_data) 
    786786{ 
    787787  registry_key regkey; 
     
    792792  struct gcpro gcpro1; 
    793793 
    794   bzero (&regkey, sizeof(registry_key)); 
     794  bzero (&regkey, sizeof (registry_key)); 
    795795  name_buf_siz = max_value_len+1; 
    796796  name_buf = alloca (name_buf_siz); 
     
    841841  CHECK_STRING (key); 
    842842 
    843   MW32_ENCODE_TEXT (key, Vw32_system_coding_system, &key_data, &key_len); 
    844   if (!registry_key_setup(&regkey, key_data, NULL)) 
     843  MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 
     844  if (!registry_key_setup (&regkey, key_data, NULL)) 
    845845    { 
    846846      errmsg = "Cannot open KEY, %s"; 
     
    863863    } 
    864864 
    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)); 
    866866 
    867867 quit: 
     
    869869  registry_key_destory (&regkey); 
    870870 
    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    } 
    878879  return result; 
    879880} 
     
    900901  CHECK_STRING (key); 
    901902 
    902   MW32_ENCODE_TEXT (key, Vw32_system_coding_system, &key_data, &key_len); 
    903   if (!registry_key_setup(&regkey, key_data, NULL)) 
     903  MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 
     904  if (!registry_key_setup (&regkey, key_data, NULL)) 
    904905    { 
    905906      errmsg = "Cannot open KEY, %s"; 
     
    923924    } 
    924925 
    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)); 
    926927 
    927928 quit: 
    928929  if (hkey) RegCloseKey (hkey); 
    929930  registry_key_destory (&regkey); 
    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    } 
    937939  return result; 
    938940} 
     
    980982    CHECK_STRING (name); 
    981983 
    982   MW32_ENCODE_TEXT (key, Vw32_system_coding_system, &key_data, &key_len); 
     984  MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 
    983985 
    984986  if (STRINGP (name)) 
    985987    { 
    986       MW32_ENCODE_TEXT (name, Vw32_system_coding_system, 
     988      MW32_ENCODE_TEXT (name, Vlocale_coding_system, 
    987989                        &name_data, &name_len); 
    988990    } 
     
    990992    name_data = NULL; 
    991993 
    992   if (!registry_key_setup(&regkey, key_data, name_data)) 
     994  if (!registry_key_setup (&regkey, key_data, name_data)) 
    993995    { 
    994996      registry_key_destory (&regkey); 
     
    10231025  dw = (XFASTINT (hword) << 16) + XFASTINT (lword); 
    10241026 
    1025   if (!NILP(hhword)) 
     1027  if (!NILP (hhword)) 
    10261028    { 
    10271029      CHECK_NUMBER (hhword); 
     
    10301032    } 
    10311033 
    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   
    10421047  /* never come here */ 
    10431048  return Qnil; 
     
    10581063  CHECK_STRING (key); 
    10591064 
    1060   MW32_ENCODE_TEXT (key, Vw32_system_coding_system, &key_data, &key_len); 
    1061  
    1062   if (!registry_key_setup(&regkey, key_data, NULL)) 
     1065  MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 
     1066 
     1067  if (!registry_key_setup (&regkey, key_data, NULL)) 
    10631068    { 
    10641069      registry_key_destory (&regkey); 
     
    10661071    } 
    10671072 
    1068   result = registry_delete_key(&regkey); 
     1073  result = registry_delete_key (&regkey); 
    10691074 
    10701075  registry_key_destory (&regkey); 
     
    10881093  CHECK_STRING (name); 
    10891094 
    1090   MW32_ENCODE_TEXT (key, Vw32_system_coding_system, &key_data, &key_len); 
    1091   MW32_ENCODE_TEXT (name, Vw32_system_coding_system, &name_data, &name_len); 
    1092  
    1093   if (!registry_key_setup(&regkey, 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 (&regkey, key_data, name_data)) 
    10941099    { 
    10951100      registry_key_destory (&regkey); 
     
    10971102    } 
    10981103 
    1099   result = registry_delete_value(&regkey); 
     1104  result = registry_delete_value (&regkey); 
    11001105 
    11011106  registry_key_destory (&regkey); 
     
    11181123  CHECK_STRING (key); 
    11191124 
    1120   MW32_ENCODE_TEXT (key, Vw32_system_coding_system, &key_data, &key_len); 
    1121  
    1122   if (!registry_key_setup(&regkey, key_data, NULL)) 
     1125  MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 
     1126 
     1127  if (!registry_key_setup (&regkey, key_data, NULL)) 
    11231128    { 
    11241129      registry_key_destory (&regkey); 
     
    11261131    } 
    11271132 
    1128   result = registry_create_key(&regkey); 
     1133  result = registry_create_key (&regkey); 
    11291134 
    11301135  registry_key_destory (&regkey); 
     
    11501155    return Qnil; 
    11511156 
    1152   MW32_ENCODE_TEXT (key, Vw32_system_coding_system, &key_data, &key_len); 
     1157  MW32_ENCODE_TEXT (key, Vlocale_coding_system, &key_data, &key_len); 
    11531158 
    11541159  if (STRINGP (name)) 
    11551160    { 
    1156       MW32_ENCODE_TEXT (name, Vw32_system_coding_system, 
     1161      MW32_ENCODE_TEXT (name, Vlocale_coding_system, 
    11571162                        &name_data, &name_len); 
    11581163    } 
     
    11601165    name_data = NULL; 
    11611166 
    1162   if (!registry_key_setup(&regkey, key_data, name_data)) 
     1167  if (!registry_key_setup (&regkey, key_data, name_data)) 
    11631168    { 
    11641169      registry_key_destory (&regkey); 
  • trunk/src/mw32term.c

    r3859 r3871  
    65186518 
    65196519  if (STRINGP (path)) 
    6520     path_string = mw32_encode_lispy_string (Vw32_system_coding_system, 
     6520    path_string = mw32_encode_lispy_string (Vlocale_coding_system, 
    65216521                                            (Funix_to_dos_filename (path)), 
    65226522                                            NULL); 
  • trunk/src/mw32term.h

    r3870 r3871  
    921921   window procedure. */ 
    922922extern HWND mw32_frame_window; 
    923 extern Lisp_Object Vw32_system_coding_system; 
     923extern Lisp_Object Vlocale_coding_system; 
    924924 
    925925struct coding_system; 
  • trunk/src/w32proc.c

    r3809 r3871  
    120120 
    121121#ifdef MEADOW 
    122 extern Lisp_Object Vw32_system_coding_system; 
     122extern Lisp_Object Vlocale_coding_system; 
    123123#endif 
    124124 
     
    20192019#ifdef MEADOW 
    20202020        return Fdecode_coding_string (build_string (full_name), 
    2021                                       Vw32_system_coding_system, Qt); 
     2021                                      Vlocale_coding_system, Qt); 
    20222022#else 
    20232023        return build_string (full_name); 
     
    20332033        return Fdecode_coding_string (make_unibyte_string (full_name, 
    20342034                                                           got_full - 1), 
    2035                                       Vw32_system_coding_system, Qt); 
     2035                                      Vlocale_coding_system, Qt); 
    20362036#else 
    20372037        return make_unibyte_string (full_name, got_full);