Mercurial > hg > xemacs-beta
comparison src/dired.c @ 531:0493e9f3c27f
[xemacs-hg @ 2001-05-12 11:16:12 by ben]
event-msw.c: eliminate cygwin warnings.
dired.c, syswindows.h, win32.c: find the Net* functions the hard way to avoid errors on win 9x.
find-paths.el: fix error with null EXCLUDE-REGEXP.
font-lock.el: fix problem reported by hrvoje with buffers starting with a space.
lib-complete.el: add a variable to control where `find-library' looks, analogous to `find-function-source-path'.
etags.c: new version from Francesco.
Makefile.in.in: i'm getting real tired of incomplete commits. is this getting worse or something?
author | ben |
---|---|
date | Sat, 12 May 2001 11:16:25 +0000 |
parents | ef4d2466a29c |
children | 666d73d6ac56 |
comparison
equal
deleted
inserted
replaced
530:c948643d954f | 531:0493e9f3c27f |
---|---|
35 #include "opaque.h" | 35 #include "opaque.h" |
36 #include "syntax.h" | 36 #include "syntax.h" |
37 | 37 |
38 #ifdef WIN32_NATIVE | 38 #ifdef WIN32_NATIVE |
39 #include "syswindows.h" | 39 #include "syswindows.h" |
40 #include <lmaccess.h> | |
41 #include <lmapibuf.h> | |
42 #include <lmerr.h> | |
43 #endif | 40 #endif |
44 | 41 |
45 Lisp_Object Vcompletion_ignored_extensions; | 42 Lisp_Object Vcompletion_ignored_extensions; |
46 Lisp_Object Qdirectory_files; | 43 Lisp_Object Qdirectory_files; |
47 Lisp_Object Qfile_name_completion; | 44 Lisp_Object Qfile_name_completion; |
660 user_cache.user_names[user_cache.length].len), | 657 user_cache.user_names[user_cache.length].len), |
661 Qnative); | 658 Qnative); |
662 user_cache.length++; | 659 user_cache.length++; |
663 } | 660 } |
664 #else | 661 #else |
665 do | 662 if (xNetUserEnum) |
666 { | 663 { |
667 USER_INFO_0 *bufptr; | 664 do |
668 NET_API_STATUS status_status_statui_statum_statu; | |
669 int i; | |
670 | |
671 QUIT; | |
672 status_status_statui_statum_statu = | |
673 NetUserEnum (NULL, 0, 0, (LPBYTE *) &bufptr, 1024, &entriesread, | |
674 &totalentries, &resume_handle); | |
675 if (status_status_statui_statum_statu != NERR_Success && | |
676 status_status_statui_statum_statu != ERROR_MORE_DATA) | |
677 invalid_operation ("Error enumerating users", | |
678 make_int (GetLastError ())); | |
679 for (i = 0; i < entriesread; i++) | |
680 { | 665 { |
681 int nout = | 666 USER_INFO_0 *bufptr; |
682 WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, | 667 NET_API_STATUS status_status_statui_statum_statu; |
683 bufptr[i].usri0_name, | 668 int i; |
684 -1, 0, 0, "~", 0); | 669 |
685 void *outp = alloca (nout); | 670 QUIT; |
686 WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, | 671 status_status_statui_statum_statu = |
687 bufptr[i].usri0_name, -1, | 672 xNetUserEnum (NULL, 0, 0, (LPBYTE *) &bufptr, 1024, |
688 (LPSTR) outp, nout, "~", 0); | 673 &entriesread, &totalentries, &resume_handle); |
689 DO_REALLOC (user_cache.user_names, user_cache.size, | 674 if (status_status_statui_statum_statu != NERR_Success && |
690 user_cache.length + 1, struct user_name); | 675 status_status_statui_statum_statu != ERROR_MORE_DATA) |
691 TO_INTERNAL_FORMAT (C_STRING, outp, | 676 invalid_operation ("Error enumerating users", |
692 MALLOC, | 677 make_int (GetLastError ())); |
693 (user_cache. | 678 for (i = 0; i < entriesread; i++) |
694 user_names[user_cache.length].ptr, | 679 { |
695 user_cache. | 680 int nout = |
696 user_names[user_cache.length].len), | 681 WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, |
697 Qmswindows_tstr); | 682 bufptr[i].usri0_name, |
698 user_cache.length++; | 683 -1, 0, 0, "~", 0); |
684 void *outp = alloca (nout); | |
685 WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, | |
686 bufptr[i].usri0_name, -1, | |
687 (LPSTR) outp, nout, "~", 0); | |
688 DO_REALLOC (user_cache.user_names, user_cache.size, | |
689 user_cache.length + 1, struct user_name); | |
690 TO_INTERNAL_FORMAT (C_STRING, outp, | |
691 MALLOC, | |
692 (user_cache. | |
693 user_names[user_cache.length].ptr, | |
694 user_cache. | |
695 user_names[user_cache.length].len), | |
696 Qmswindows_tstr); | |
697 user_cache.length++; | |
698 } | |
699 xNetApiBufferFree (bufptr); | |
699 } | 700 } |
700 NetApiBufferFree (bufptr); | 701 while (entriesread != totalentries); |
701 } | 702 } |
702 while (entriesread != totalentries); | |
703 #endif | 703 #endif |
704 | 704 |
705 XCAR (cache_incomplete_p) = Qnil; | 705 XCAR (cache_incomplete_p) = Qnil; |
706 unbind_to (speccount, Qnil); | 706 unbind_to (speccount, Qnil); |
707 | 707 |