comparison src/event-msw.c @ 2421:ab71ad6ff3dd

[xemacs-hg @ 2004-12-06 03:50:53 by ben] (none) README.packages: Document use of --package-prefix. Fix error in specifying standard package location. make-docfile.c: Use QXE_PATH_MAX. info.el: Correct doc string giving example package path. menubar-items.el: Move Prefix Rectangle command up one level. xemacs/packages.texi: Add long form of Lisp Reference Manual to links. Add links pointing to Lisp Reference Manual for more detailed package discussion. lispref/range-tables.texi: Document range-table changes. internals/internals.texi: Update history section. elhash.c, elhash.h, profile.c: Create inchash_eq() to allow direct incrementing of hash-table entry. Use in profile.c to try to reduce profiling overhead. Increase initial size of profile hash tables to reduce profiling overhead. buffer.c, device-msw.c, dialog-msw.c, dired-msw.c, editfns.c, event-msw.c, events.c, glyphs-msw.c, keymap.c, objects-msw.c, process-nt.c, syswindows.h, text.c, text.h, unexnt.c: Rename xetcs* -> qxetcs* for consistency with qxestr*. Rename ei*_c(_*) -> ei*_ascii(_*) since they work with ASCII-only strings not "C strings", whatever those are. This is the last place where "c" was incorrectly being used for "ascii". dialog-msw.c, dumper.c, event-msw.c, fileio.c, glyphs-gtk.c, glyphs-x.c, nt.c, process-nt.c, realpath.c, sysdep.c, sysfile.h, unexcw.c, unexnext.c, unexnt.c: Try to avoid differences in systems that do or do not include final null byte in PATH_MAX. Create PATH_MAX_INTERNAL and PATH_MAX_EXTERNAL and use them everywhere. Rewrite code in dumper.c to avoid use of PATH_MAX. When necessary in nt.c, use _MAX_PATH instead of MAX_PATH to be consistent with other places. text.c: Code to short-circuit when binary or Unicode was not working due to EOL wrapping. Fix this code to work when either no EOL autodetection or no CR's or LF's in the text. lisp.h, rangetab.c, rangetab.h, regex.c, search.c: Implement different types of ranges (open/closed start and end). Change default to be start-closed, end-open.
author ben
date Mon, 06 Dec 2004 03:52:23 +0000
parents ecf1ebac70d8
children 3d8143fc88e1
comparison
equal deleted inserted replaced
2420:ad56e5a6d09f 2421:ab71ad6ff3dd
3205 /* WARNING: We can't just write a '\0' into the 79th 3205 /* WARNING: We can't just write a '\0' into the 79th
3206 "character" because tttextw->szText is in WCHAR's but we 3206 "character" because tttextw->szText is in WCHAR's but we
3207 may be copying an ANSI string into it. Easiest to just 3207 may be copying an ANSI string into it. Easiest to just
3208 zero the whole thing. */ 3208 zero the whole thing. */
3209 xzero (*tttextw->szText); 3209 xzero (*tttextw->szText);
3210 xetcsncpy ((Extbyte *) tttextw->szText, btextext, 79); 3210 qxetcsncpy ((Extbyte *) tttextw->szText, btextext, 79);
3211 } 3211 }
3212 else 3212 else
3213 tttextw->lpszText = NULL; 3213 tttextw->lpszText = NULL;
3214 #endif 3214 #endif
3215 } 3215 }
3780 &VOIDP_CAST (ppf)) == S_OK) 3780 &VOIDP_CAST (ppf)) == S_OK)
3781 { 3781 {
3782 Extbyte *fname_unicode; 3782 Extbyte *fname_unicode;
3783 WIN32_FIND_DATAW wfd; 3783 WIN32_FIND_DATAW wfd;
3784 LPWSTR resolved = 3784 LPWSTR resolved =
3785 alloca_array (WCHAR, PATH_MAX + 1); 3785 alloca_array (WCHAR, PATH_MAX_EXTERNAL + 1);
3786 3786
3787 TO_EXTERNAL_FORMAT (DATA, (fname, fnamelen), 3787 TO_EXTERNAL_FORMAT (DATA, (fname, fnamelen),
3788 C_STRING_ALLOCA, 3788 C_STRING_ALLOCA,
3789 fname_unicode, 3789 fname_unicode,
3790 Qmswindows_unicode); 3790 Qmswindows_unicode);
3804 is safe even if it's actually the other way around. */ 3804 is safe even if it's actually the other way around. */
3805 #if defined (CYGWIN_HEADERS) && W32API_INSTALLED_VER < W32API_VER(2,2) 3805 #if defined (CYGWIN_HEADERS) && W32API_INSTALLED_VER < W32API_VER(2,2)
3806 /* Another Cygwin prototype error, 3806 /* Another Cygwin prototype error,
3807 fixed in v2.2 of w32api */ 3807 fixed in v2.2 of w32api */
3808 XECOMCALL4 (psl, GetPath, (LPSTR) resolved, 3808 XECOMCALL4 (psl, GetPath, (LPSTR) resolved,
3809 PATH_MAX, &wfd, 0) 3809 PATH_MAX_EXTERNAL, &wfd, 0)
3810 #else 3810 #else
3811 XECOMCALL4 (psl, GetPath, resolved, 3811 XECOMCALL4 (psl, GetPath, resolved,
3812 PATH_MAX, &wfd, 0) 3812 PATH_MAX_EXTERNAL, &wfd, 0)
3813 #endif 3813 #endif
3814 == S_OK) 3814 == S_OK)
3815 TO_INTERNAL_FORMAT (C_STRING, resolved, 3815 TO_INTERNAL_FORMAT (C_STRING, resolved,
3816 ALLOCA, (fname, fnamelen), 3816 ALLOCA, (fname, fnamelen),
3817 Qmswindows_tstr); 3817 Qmswindows_tstr);
3840 &VOIDP_CAST (ppf)) == S_OK) 3840 &VOIDP_CAST (ppf)) == S_OK)
3841 { 3841 {
3842 Extbyte *fname_unicode; 3842 Extbyte *fname_unicode;
3843 WIN32_FIND_DATAA wfd; 3843 WIN32_FIND_DATAA wfd;
3844 LPSTR resolved = 3844 LPSTR resolved =
3845 alloca_array (CHAR, PATH_MAX + 1); 3845 alloca_array (CHAR, PATH_MAX_EXTERNAL + 1);
3846 3846
3847 /* Always Unicode. Not obvious from the 3847 /* Always Unicode. Not obvious from the
3848 IPersistFile documentation, but look under 3848 IPersistFile documentation, but look under
3849 "Shell Link" for example code. */ 3849 "Shell Link" for example code. */
3850 TO_EXTERNAL_FORMAT (DATA, (fname, fnamelen), 3850 TO_EXTERNAL_FORMAT (DATA, (fname, fnamelen),
3854 3854
3855 if (XECOMCALL2 (ppf, Load, 3855 if (XECOMCALL2 (ppf, Load,
3856 (LPWSTR) fname_unicode, 3856 (LPWSTR) fname_unicode,
3857 STGM_READ) == S_OK 3857 STGM_READ) == S_OK
3858 && XECOMCALL4 (psl, GetPath, resolved, 3858 && XECOMCALL4 (psl, GetPath, resolved,
3859 PATH_MAX, &wfd, 0) == S_OK) 3859 PATH_MAX_EXTERNAL, &wfd, 0) == S_OK)
3860 TO_INTERNAL_FORMAT (C_STRING, resolved, 3860 TO_INTERNAL_FORMAT (C_STRING, resolved,
3861 ALLOCA, (fname, fnamelen), 3861 ALLOCA, (fname, fnamelen),
3862 Qmswindows_tstr); 3862 Qmswindows_tstr);
3863 3863
3864 XECOMCALL0 (ppf, Release); 3864 XECOMCALL0 (ppf, Release);