Mercurial > hg > xemacs-beta
comparison src/nt.c @ 4982:3c3c1d139863
Automatic merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 05 Feb 2010 11:25:00 -0600 |
parents | 4aebb0131297 16112448d484 |
children | 44d7bde26046 |
comparison
equal
deleted
inserted
replaced
4981:4aebb0131297 | 4982:3c3c1d139863 |
---|---|
336 if (p != NULL) | 336 if (p != NULL) |
337 { | 337 { |
338 *p++ = '\\'; | 338 *p++ = '\\'; |
339 eicat_ch (o, '\\'); | 339 eicat_ch (o, '\\'); |
340 } | 340 } |
341 xfree (component, Ibyte *); | 341 xfree (component); |
342 } | 342 } |
343 else | 343 else |
344 { | 344 { |
345 xfree (full, Ibyte *); | 345 xfree (full); |
346 return 0; | 346 return 0; |
347 } | 347 } |
348 } | 348 } |
349 | 349 |
350 xfree (full, Ibyte *); | 350 xfree (full); |
351 return eicpyout_malloc (o, 0); | 351 return eicpyout_malloc (o, 0); |
352 } | 352 } |
353 | 353 |
354 static int | 354 static int |
355 is_unc_volume (const Ibyte *filename) | 355 is_unc_volume (const Ibyte *filename) |
393 && qxeRegQueryValueEx (hrootkey, keyext, NULL, lpdwtype, lpvalue, | 393 && qxeRegQueryValueEx (hrootkey, keyext, NULL, lpdwtype, lpvalue, |
394 &cbData) == ERROR_SUCCESS) | 394 &cbData) == ERROR_SUCCESS) |
395 return (lpvalue); | 395 return (lpvalue); |
396 | 396 |
397 if (lpvalue) | 397 if (lpvalue) |
398 xfree (lpvalue, LPBYTE); | 398 xfree (lpvalue); |
399 | 399 |
400 RegCloseKey (hrootkey); | 400 RegCloseKey (hrootkey); |
401 } | 401 } |
402 | 402 |
403 if (qxeRegOpenKeyEx (HKEY_LOCAL_MACHINE, XETEXT (REG_ROOT), 0, KEY_READ, | 403 if (qxeRegOpenKeyEx (HKEY_LOCAL_MACHINE, XETEXT (REG_ROOT), 0, KEY_READ, |
411 qxeRegQueryValueEx (hrootkey, keyext, NULL, lpdwtype, lpvalue, | 411 qxeRegQueryValueEx (hrootkey, keyext, NULL, lpdwtype, lpvalue, |
412 &cbData) == ERROR_SUCCESS) | 412 &cbData) == ERROR_SUCCESS) |
413 return (lpvalue); | 413 return (lpvalue); |
414 | 414 |
415 if (lpvalue) | 415 if (lpvalue) |
416 xfree (lpvalue, LPBYTE); | 416 xfree (lpvalue); |
417 | 417 |
418 RegCloseKey (hrootkey); | 418 RegCloseKey (hrootkey); |
419 } | 419 } |
420 | 420 |
421 return (NULL); | 421 return (NULL); |
497 | 497 |
498 envval = TSTR_TO_ITEXT (lpval); | 498 envval = TSTR_TO_ITEXT (lpval); |
499 eputenv (env_vars[i], (CIbyte *) envval); | 499 eputenv (env_vars[i], (CIbyte *) envval); |
500 } | 500 } |
501 | 501 |
502 xfree (lpval, LPBYTE); | 502 xfree (lpval); |
503 } | 503 } |
504 } | 504 } |
505 } | 505 } |
506 | 506 |
507 /* Another special case: on NT, the PATH variable is actually named | 507 /* Another special case: on NT, the PATH variable is actually named |
703 info = xnew (volume_info_data); | 703 info = xnew (volume_info_data); |
704 add_volume_info (root_dir, info); | 704 add_volume_info (root_dir, info); |
705 } | 705 } |
706 else | 706 else |
707 { | 707 { |
708 xfree (info->name, Ibyte *); | 708 xfree (info->name); |
709 xfree (info->type, Ibyte *); | 709 xfree (info->type); |
710 } | 710 } |
711 | 711 |
712 info->name = TSTR_TO_ITEXT_MALLOC (name); | 712 info->name = TSTR_TO_ITEXT_MALLOC (name); |
713 info->serialnum = serialnum; | 713 info->serialnum = serialnum; |
714 info->maxcomp = maxcomp; | 714 info->maxcomp = maxcomp; |
826 | 826 |
827 if (!(dirp = xnew_and_zero (DIR))) | 827 if (!(dirp = xnew_and_zero (DIR))) |
828 return NULL; | 828 return NULL; |
829 | 829 |
830 if (dir_pathname) | 830 if (dir_pathname) |
831 xfree (dir_pathname, Ibyte *); | 831 xfree (dir_pathname); |
832 dir_pathname = qxestrdup (filename); | 832 dir_pathname = qxestrdup (filename); |
833 | 833 |
834 return dirp; | 834 return dirp; |
835 } | 835 } |
836 | 836 |
848 else if (wnet_enum_handle != INVALID_HANDLE_VALUE) | 848 else if (wnet_enum_handle != INVALID_HANDLE_VALUE) |
849 { | 849 { |
850 retval = close_unc_volume (wnet_enum_handle); | 850 retval = close_unc_volume (wnet_enum_handle); |
851 wnet_enum_handle = INVALID_HANDLE_VALUE; | 851 wnet_enum_handle = INVALID_HANDLE_VALUE; |
852 } | 852 } |
853 xfree (dirp, DIR *); | 853 xfree (dirp); |
854 | 854 |
855 return retval; | 855 return retval; |
856 } | 856 } |
857 | 857 |
858 struct direct * | 858 struct direct * |
923 eicat_ch (linkname, '\\'); | 923 eicat_ch (linkname, '\\'); |
924 eicat_rawz (linkname, val); | 924 eicat_rawz (linkname, val); |
925 resolved = mswindows_read_link (eidata (linkname)); | 925 resolved = mswindows_read_link (eidata (linkname)); |
926 if (resolved) | 926 if (resolved) |
927 { | 927 { |
928 xfree (resolved, Ibyte *); | 928 xfree (resolved); |
929 len -= 4; | 929 len -= 4; |
930 val[len] = '\0'; | 930 val[len] = '\0'; |
931 } | 931 } |
932 } | 932 } |
933 } | 933 } |
934 | 934 |
935 eicpy_rawz (found, val); | 935 eicpy_rawz (found, val); |
936 if (need_to_free) | 936 if (need_to_free) |
937 xfree (val, Ibyte *); | 937 xfree (val); |
938 | 938 |
939 if (!NILP (Vmswindows_downcase_file_names)) | 939 if (!NILP (Vmswindows_downcase_file_names)) |
940 eilwr (found); | 940 eilwr (found); |
941 | 941 |
942 namlen = min (eilen (found), sizeof (dir_static.d_name) - 1); | 942 namlen = min (eilen (found), sizeof (dir_static.d_name) - 1); |
1688 { | 1688 { |
1689 /* check if link is valid */ | 1689 /* check if link is valid */ |
1690 Ibyte *resolved = mswindows_read_link (name); | 1690 Ibyte *resolved = mswindows_read_link (name); |
1691 if (resolved) | 1691 if (resolved) |
1692 { | 1692 { |
1693 xfree (resolved, Ibyte *); | 1693 xfree (resolved); |
1694 buf->st_mode = S_IFLNK; | 1694 buf->st_mode = S_IFLNK; |
1695 } | 1695 } |
1696 } | 1696 } |
1697 } | 1697 } |
1698 } | 1698 } |
1840 cwdext = (Extbyte *) _wgetdcwd (drivelet, NULL, 0); | 1840 cwdext = (Extbyte *) _wgetdcwd (drivelet, NULL, 0); |
1841 else | 1841 else |
1842 cwdext = _getdcwd (drivelet, NULL, 0); | 1842 cwdext = _getdcwd (drivelet, NULL, 0); |
1843 if (cwdext == NULL) return NULL; | 1843 if (cwdext == NULL) return NULL; |
1844 cwd = TSTR_TO_ITEXT_MALLOC (cwdext); | 1844 cwd = TSTR_TO_ITEXT_MALLOC (cwdext); |
1845 xfree (cwdext, Extbyte *); | 1845 xfree (cwdext); |
1846 return cwd; | 1846 return cwd; |
1847 } | 1847 } |
1848 | 1848 |
1849 | 1849 |
1850 /*--------------------------------------------------------------------*/ | 1850 /*--------------------------------------------------------------------*/ |
2131 if (!(longname = mswindows_get_long_filename (XSTRING_DATA (filename)))) | 2131 if (!(longname = mswindows_get_long_filename (XSTRING_DATA (filename)))) |
2132 return Qnil; | 2132 return Qnil; |
2133 | 2133 |
2134 canon = mswindows_canonicalize_filename (longname); | 2134 canon = mswindows_canonicalize_filename (longname); |
2135 ret = build_istring (canon); | 2135 ret = build_istring (canon); |
2136 xfree (canon, Ibyte *); | 2136 xfree (canon); |
2137 xfree (longname, Ibyte *); | 2137 xfree (longname); |
2138 return ret; | 2138 return ret; |
2139 } | 2139 } |
2140 | 2140 |
2141 | 2141 |
2142 void | 2142 void |