Mercurial > hg > xemacs-beta
changeset 819:6504113e7c2d
[xemacs-hg @ 2002-04-25 18:03:23 by andyp]
sync up windows branch from 21.4
author | andyp |
---|---|
date | Thu, 25 Apr 2002 18:04:24 +0000 |
parents | accc481aef34 |
children | f770374ae506 |
files | lib-src/Makefile.in.in lib-src/winclient.c lisp/ChangeLog lisp/files.el lisp/printer.el netinstall/ChangeLog netinstall/desktop.cc netinstall/init.cc netinstall/install.cc netinstall/res.rc nt/ChangeLog nt/xemacs.mak src/ChangeLog src/dialog-msw.c src/dired-msw.c src/emacs.c src/event-msw.c src/extents.c src/extents.h src/lisp.h src/nt.c src/realpath.c src/redisplay-gtk.c src/redisplay-msw.c src/redisplay-output.c src/redisplay-x.c src/redisplay.c src/redisplay.h src/scrollbar-msw.c src/syswindows.h src/win32.c |
diffstat | 31 files changed, 2045 insertions(+), 856 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/Makefile.in.in Thu Apr 25 06:09:18 2002 +0000 +++ b/lib-src/Makefile.in.in Thu Apr 25 18:04:24 2002 +0000 @@ -88,6 +88,9 @@ #ifdef HAVE_SHLIB ellcc\ #endif +#ifdef HAVE_MS_WINDOWS + winclient\ +#endif etags ctags b2m ootags PUBLIC_INSTALLABLE_SCRIPTS=\ @@ -357,6 +360,9 @@ minitar: ${srcdir}/../nt/minitar.c $(CC) $(cflags) ${srcdir}/../nt/minitar.c $(ldflags) -lz -o $@ +winclient: ${srcdir}/winclient.c + $(CC) $(cflags) ${srcdir}/winclient.c $(ldflags) -o $@ + hexl: ${srcdir}/hexl.c $(CC) $(cflags) ${srcdir}/hexl.c $(ldflags) -o $@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib-src/winclient.c Thu Apr 25 18:04:24 2002 +0000 @@ -0,0 +1,490 @@ +/* DDE client for XEmacs. + Copyright (C) 2002 Alastair J. Houghton + + This file is part of XEmacs. + + XEmacs is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + XEmacs is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with XEmacs; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Synched up with: Not in FSF. */ + +/* -- Pre-Include Defines --------------------------------------------------- */ + +#define STRICT + +/* -- Includes -------------------------------------------------------------- */ + +#include <windows.h> +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif +#include <stdlib.h> +#include <stdio.h> +#include <ctype.h> +#include <errno.h> + +static void error (const char* s1, const char* s2); +static void fatal (const char *s1, const char *s2); +static void * xmalloc (size_t size); +static char * getNextArg (const char **ptr, unsigned *len); + +/* -- Post-Include Defines -------------------------------------------------- */ + +/* Timeouts & delays */ +#define CONNECT_DELAY 500 /* ms */ +#define TRANSACTION_TIMEOUT 5000 /* ms */ +#define MAX_INPUT_IDLE_WAIT INFINITE /* ms */ + +/* DDE Strings */ +#define SERVICE_NAME "XEmacs" +#define TOPIC_NAME "System" +#define COMMAND_FORMAT "[open(\"%s%s\")]" + +/* XEmacs program name */ +#define PROGRAM_TO_RUN "xemacs.exe" + +/* -- Constants ------------------------------------------------------------- */ + +/* -- Global Variables ------------------------------------------------------ */ + +HINSTANCE hInstance; +DWORD idInst = 0; + +/* -- Function Declarations ------------------------------------------------- */ + +HDDEDATA CALLBACK ddeCallback (UINT uType, UINT uFmt, HCONV hconv, + HSZ hsz1, HSZ hsz2, HDDEDATA hdata, + DWORD dwData1, DWORD dwData2); + +int WINAPI WinMain (HINSTANCE hInst, + HINSTANCE hPrev, + LPSTR lpCmdLine, + int nCmdShow); + +static HCONV openConversation (void); +static void closeConversation (HCONV hConv); +static int doFile (HCONV hConv, LPSTR lpszFileName1, LPSTR lpszFileName2); +static int parseCommandLine (HCONV hConv, LPSTR lpszCommandLine); + +/* -- Function Definitions -------------------------------------------------- */ + +/* + * Name : ddeCallback + * Function: Gets called by DDEML. + * + */ + +HDDEDATA CALLBACK +ddeCallback (UINT uType, UINT uFmt, HCONV hconv, + HSZ hsz1, HSZ hsz2, HDDEDATA hdata, + DWORD dwData1, DWORD dwData2) +{ + return (HDDEDATA) NULL; +} + +/* + * Name : WinMain + * Function: The program's entry point function. + * + */ + +int WINAPI +WinMain (HINSTANCE hInst, + HINSTANCE hPrev, + LPSTR lpCmdLine, + int nCmdShow) +{ + HCONV hConv; + int ret = 0; + UINT uiRet; + + /* Initialise the DDEML library */ + uiRet = DdeInitialize (&idInst, + (PFNCALLBACK) ddeCallback, + APPCMD_CLIENTONLY + |CBF_FAIL_ALLSVRXACTIONS, + 0); + + if (uiRet != DMLERR_NO_ERROR) + { + MessageBox (NULL, "Could not initialise DDE management library.", + "winclient", MB_ICONEXCLAMATION | MB_OK); + + return 1; + } + + /* Open a conversation */ + hConv = openConversation (); + + if (hConv) + { + /* OK. Next, we need to parse the command line. */ + ret = parseCommandLine (hConv, lpCmdLine); + + /* Close the conversation */ + closeConversation (hConv); + } + + DdeUninitialize (idInst); + + return ret; +} + +/* + * Name : openConversation + * Function: Start a conversation. + * + */ + +static HCONV +openConversation (void) +{ + HSZ hszService = NULL, hszTopic = NULL; + HCONV hConv = NULL; + + /* Get the application (service) name */ + hszService = DdeCreateStringHandle (idInst, + SERVICE_NAME, + CP_WINANSI); + + if (!hszService) + { + MessageBox (NULL, "Could not create string handle for service.", + "winclient", MB_ICONEXCLAMATION | MB_OK); + + goto error; + } + + /* Get the topic name */ + hszTopic = DdeCreateStringHandle (idInst, + TOPIC_NAME, + CP_WINANSI); + + if (!hszTopic) + { + MessageBox (NULL, "Could not create string handle for topic.", + "winclient", MB_ICONEXCLAMATION | MB_OK); + + goto error; + } + + /* Try to connect */ + hConv = DdeConnect (idInst, hszService, hszTopic, NULL); + + if (!hConv) + { + STARTUPINFO sti; + PROCESS_INFORMATION pi; + int n; + + /* Try to start the program */ + ZeroMemory (&sti, sizeof (sti)); + sti.cb = sizeof (sti); + if (!CreateProcess (NULL, PROGRAM_TO_RUN, NULL, NULL, FALSE, 0, + NULL, NULL, &sti, &pi)) + { + MessageBox (NULL, "Could not start process.", + "winclient", MB_ICONEXCLAMATION | MB_OK); + + goto error; + } + + /* Wait for the process to enter an idle state */ + WaitForInputIdle (pi.hProcess, MAX_INPUT_IDLE_WAIT); + + /* Close the handles */ + CloseHandle (pi.hThread); + CloseHandle (pi.hProcess); + + /* Try to connect */ + for (n = 0; n < 5; n++) + { + Sleep (CONNECT_DELAY); + + hConv = DdeConnect (idInst, hszService, hszTopic, NULL); + + if (hConv) + break; + } + + if (!hConv) + { + /* Still couldn't connect. */ + MessageBox (NULL, "Could not connect to DDE server.", + "winclient", MB_ICONEXCLAMATION | MB_OK); + + goto error; + } + } + + /* Release the string handles */ + DdeFreeStringHandle (idInst, hszService); + DdeFreeStringHandle (idInst, hszTopic); + + return hConv; + + error: + if (hConv) + DdeDisconnect (hConv); + if (hszService) + DdeFreeStringHandle (idInst, hszService); + if (hszTopic) + DdeFreeStringHandle (idInst, hszTopic); + + return NULL; +} + +/* + * Name : closeConversation + * Function: Close a conversation. + * + */ + +static void +closeConversation (HCONV hConv) +{ + /* Shut down */ + DdeDisconnect (hConv); +} + +/* + * Name : doFile + * Function: Process a file. + * + */ + +int +doFile (HCONV hConv, LPSTR lpszFileName1, LPSTR lpszFileName2) +{ + char *buf = NULL; + unsigned len; + + /* Calculate the buffer length */ + len = strlen (lpszFileName1) + strlen (lpszFileName2) + + strlen (COMMAND_FORMAT); + + /* Allocate a buffer */ + buf = (char *) xmalloc (len); + + if (!buf) + { + MessageBox (NULL, "Not enough memory.", + "winclient", MB_ICONEXCLAMATION | MB_OK); + + return 1; + } + + /* Build the command */ + len = wsprintf (buf, COMMAND_FORMAT, lpszFileName1, lpszFileName2); + + len++; + + /* OK. We're connected. Send the message. */ + DdeClientTransaction (buf, len, hConv, NULL, + 0, XTYP_EXECUTE, TRANSACTION_TIMEOUT, NULL); + + free (buf); + + return 0; +} + +/* + * Name : getNextArg + * Function: Retrieve the next command line argument. + * + */ + +static char * +getNextArg (const char **ptr, unsigned *len) +{ + int in_quotes = 0, quit = 0, all_in_quotes = 0; + const char *p = *ptr, *start; + char *buf = NULL; + unsigned length = 0; + + /* Skip whitespace */ + while (*p && isspace (*p)) + p++; + + /* If this is the end, return NULL */ + if (!*p) + return NULL; + + /* Remember where we are */ + start = p; + + /* Find the next whitespace character outside quotes */ + if (*p == '"') + all_in_quotes = 1; + + while (*p && !quit) + { + switch (*p) + { + case '"': + in_quotes = 1 - in_quotes; + p++; + break; + + case '\\': + if (!in_quotes) + all_in_quotes = 0; + + p++; + + if (!*p) + break; + + p++; + break; + + default: + if (isspace (*p) && !in_quotes) + quit = 1; + else if (!in_quotes) + all_in_quotes = 0; + + if (!quit) + p++; + } + } + + /* Work out the length */ + length = p - start; + + /* Strip quotes if the argument is completely quoted */ + if (all_in_quotes) + { + start++; + length -= 2; + } + + /* Copy */ + buf = (char *) xmalloc (length + 1); + + if (!buf) + return NULL; + + strncpy (buf, start, length); + buf[length] = '\0'; + + /* Return the pointer and length */ + *ptr = p; + *len = length; + + return buf; +} + +/* + * Name : parseCommandLine + * Function: Process the command line. This program accepts a list of strings + * : (which may contain wildcards) representing filenames. + * + */ + +int +parseCommandLine (HCONV hConv, LPSTR lpszCommandLine) +{ + char *fullpath, *filepart; + char *arg; + unsigned len, pathlen; + int ret = 0; + HANDLE hFindFile = NULL; + WIN32_FIND_DATA wfd; + + /* Retrieve arguments */ + while ((arg = getNextArg ((const char**)&lpszCommandLine, &len)) != NULL) + { + /* First find the canonical path name */ + fullpath = filepart = NULL; + pathlen = GetFullPathName (arg, 0, fullpath, &filepart); + + fullpath = (char *) xmalloc (pathlen); + + if (!fullpath) + { + MessageBox (NULL, "Not enough memory.", "winclient", + MB_ICONEXCLAMATION | MB_OK); + + ret = 1; + free (arg); + + break; + } + + GetFullPathName (arg, pathlen, fullpath, &filepart); + + /* Find the first matching file */ + hFindFile = FindFirstFile (arg, &wfd); + + if (hFindFile == INVALID_HANDLE_VALUE) + ret = doFile (hConv, fullpath, ""); + else + { + /* Chop off the file part from the full path name */ + if (filepart) + *filepart = '\0'; + + /* For each matching file */ + do + { + /* Process it */ + ret = doFile (hConv, fullpath, wfd.cFileName); + + if (ret) + break; + } + while (FindNextFile (hFindFile, &wfd)); + + FindClose (hFindFile); + } + + /* Release the path name buffers */ + free (fullpath); + free (arg); + + if (ret) + break; + } + + return ret; +} + +static void +fatal (const char *s1, const char *s2) +{ + error (s1, s2); + exit (1); +} + +/* Print error message. `s1' is printf control string, `s2' is arg for it. */ +static void +error (const char* s1, const char* s2) +{ + fprintf (stderr, "winclient: "); + fprintf (stderr, s1, s2); + fprintf (stderr, "\n"); +} + +/* Like malloc but get fatal error if memory is exhausted. */ + +static void * +xmalloc (size_t size) +{ + void *result = malloc (size); + if (result == NULL) + fatal ("virtual memory exhausted", (char *) 0); + return result; +}
--- a/lisp/ChangeLog Thu Apr 25 06:09:18 2002 +0000 +++ b/lisp/ChangeLog Thu Apr 25 18:04:24 2002 +0000 @@ -1,3 +1,57 @@ +2002-04-09 Andy Piper <andy@xemacs.org> + + * files.el (revert-buffer): use revert-buffer-internal if it looks + like doing so will not result in any user-visible changes. + (revert-buffer-internal): new function. Do the actual process of + reversion and then see whether the result is any different to what + we have already. If it is not then do nothing. + +2002-02-04 Andy Piper <andy@xemacs.org> + + * files.el (convert-standard-filename): Fix for short filename + Peter Arius <pas@methodpark.de> + +2001-12-16 Andy Piper <andy@xemacs.org> + + * package-get.el (package-get-update-all): Make sure installed.db + gets updated after updating packages. + +2001-12-11 Andy Piper <andy@xemacs.org> + + * menubar.el (get-popup-menu-response): re-order so that it works + on more sane/facist window systems. + +2001-12-03 Andy Piper <andy@xemacs.org> + + * faces.el (frob-face-property): don't infloop in face frobbing + from Jan Vroonhof <jan@xemacs.org>. + +2001-11-30 Andy Piper <andy@xemacs.org> + + * printer.el (generic-print-region): fix for non-MS systems from + Mike Fabian. + +2001-11-30 Jan Vroonhof <jan@xemacs.org> + + * font.el (font-window-system-mappings): Add mapping for Gtk + (assume identical to X) + +2001-11-30 Jan Vroonhof <jan@xemacs.org> + + * faces.el (frob-face-property): Follow face fall-back hierarchy + properly for face properties without an instance. Only do manual + copy form 'default in last resort. This handles in particular + the case where 'default itself has only a fall-back (which is + the case by default on windows). + +2001-11-24 Andy Piper <andy@xemacs.org> + + * printer.el (generic-print-region): set default-frame-plist to + nil while creating the printer frame so that sizes reflect the + printed page. + + * faces.el (face-complain-about-font): Don't complain on printers. + 2002-04-25 Steve Youngs <youngs@xemacs.org> * mule/mule-charset.el (string-to-char-list): New. This used to
--- a/lisp/files.el Thu Apr 25 06:09:18 2002 +0000 +++ b/lisp/files.el Thu Apr 25 18:04:24 2002 +0000 @@ -377,7 +377,8 @@ (let ((name (copy-sequence filename)) (start 0)) ;; leave ':' if part of drive specifier - (if (eq (aref name 1) ?:) + (if (and (> (length name) 1) + (eq (aref name 1) ?:)) (setq start 2)) ;; destructively replace invalid filename characters with ! (while (string-match "[?*:<>|\"\000-\037]" name start) @@ -2809,7 +2810,12 @@ do all the work for this command. Otherwise, the hooks `before-revert-hook' and `after-revert-hook' are run at the beginning and the end, and if `revert-buffer-insert-file-contents-function' is -non-nil, it is called instead of rereading visited file contents." +non-nil, it is called instead of rereading visited file contents. + +If the buffer has not been obviously modified, and no auto-save file +exists, then `revert-buffer-internal' is +called. `revert-buffer-internal' will not actually change the buffer +at all if reversion would not cause any user-visible changes." ;; I admit it's odd to reverse the sense of the prefix argument, but ;; there is a lot of code out there which assumes that the first @@ -2821,6 +2827,8 @@ (if revert-buffer-function (funcall revert-buffer-function ignore-auto noconfirm) (let* ((opoint (point)) + (newbuf nil) + (delay-prompt nil) (auto-save-p (and (not ignore-auto) (recent-auto-save-p) buffer-auto-save-file-name @@ -2838,104 +2846,153 @@ (dolist (rx revert-without-query found) (when (string-match rx file-name) (setq found t))))) + ;; If we might perform an optimized revert then we + ;; want to delay prompting in case we don't need to + ;; do it at all + (and (not auto-save-p) + (not (buffer-modified-p)) + (setq delay-prompt t)) (yes-or-no-p (format "Revert buffer from file %s? " file-name))) (run-hooks 'before-revert-hook) - ;; If file was backed up but has changed since, - ;; we should make another backup. - (and (not auto-save-p) - (not (verify-visited-file-modtime (current-buffer))) - (setq buffer-backed-up nil)) - ;; Get rid of all undo records for this buffer. - (or (eq buffer-undo-list t) - (setq buffer-undo-list nil)) - ;; Effectively copy the after-revert-hook status, - ;; since after-find-file will clobber it. - (let ((global-hook (default-value 'after-revert-hook)) - (local-hook-p (local-variable-p 'after-revert-hook - (current-buffer))) - (local-hook (and (local-variable-p 'after-revert-hook - (current-buffer)) - after-revert-hook))) - (let (buffer-read-only - ;; Don't make undo records for the reversion. - (buffer-undo-list t)) - (if revert-buffer-insert-file-contents-function - (funcall revert-buffer-insert-file-contents-function - file-name auto-save-p) - (if (not (file-exists-p file-name)) - (error "File %s no longer exists!" file-name)) - ;; Bind buffer-file-name to nil - ;; so that we don't try to lock the file. - (let ((buffer-file-name nil)) - (or auto-save-p - (unlock-buffer))) - (widen) - ;; When reading in an autosave, it's encoded using - ;; `escape-quoted', so we need to use it. (It is always - ;; safe to specify `escape-quoted': - ;; - ;; 1. If file-coding but no Mule, `escape-quoted' is - ;; aliased to `binary'. - ;; 2. If no file-coding, all coding systems devolve into - ;; `binary'. - ;; 3. ASCII and ISO8859-1 are encoded the same in both - ;; `binary' and `escape-quoted', so they will be - ;; compatible for the most part.) - ;; - ;; Otherwise, use coding-system-for-read if explicitly - ;; given (e.g. the "Revert Buffer with Specified - ;; Encoding" menu entries), or use the coding system - ;; that the file was loaded as. - (let* ((coding-system-for-read - (if auto-save-p 'escape-quoted - (or coding-system-for-read - buffer-file-coding-system-when-loaded))) - ;; If the bfcs wasn't changed from its original - ;; value (other than possible EOL change), then we - ;; should update it for the new coding system. - (should-update-bfcs - (eq (coding-system-base + ;; Only perform our optimized revert if nothing obvious + ;; has changed. + (cond ((or auto-save-p + (buffer-modified-p) + (and (setq newbuf (revert-buffer-internal + file-name)) + (and delay-prompt + (yes-or-no-p + (format "Revert buffer from file %s? " + file-name))))) + ;; If file was backed up but has changed since, + ;; we should make another backup. + (and (not auto-save-p) + (not (verify-visited-file-modtime (current-buffer))) + (setq buffer-backed-up nil)) + ;; Get rid of all undo records for this buffer. + (or (eq buffer-undo-list t) + (setq buffer-undo-list nil)) + ;; Effectively copy the after-revert-hook status, + ;; since after-find-file will clobber it. + (let ((global-hook (default-value 'after-revert-hook)) + (local-hook-p (local-variable-p 'after-revert-hook + (current-buffer))) + (local-hook (and (local-variable-p 'after-revert-hook + (current-buffer)) + after-revert-hook))) + (let (buffer-read-only + ;; Don't make undo records for the reversion. + (buffer-undo-list t)) + (if revert-buffer-insert-file-contents-function + (funcall revert-buffer-insert-file-contents-function + file-name auto-save-p) + (if (not (file-exists-p file-name)) + (error "File %s no longer exists!" file-name)) + ;; Bind buffer-file-name to nil + ;; so that we don't try to lock the file. + (let ((buffer-file-name nil)) + (or auto-save-p + (unlock-buffer))) + (widen) + ;; When reading in an autosave, it's encoded using + ;; `escape-quoted', so we need to use it. (It is always + ;; safe to specify `escape-quoted': + ;; + ;; 1. If file-coding but no Mule, `escape-quoted' is + ;; aliased to `binary'. + ;; 2. If no file-coding, all coding systems devolve into + ;; `binary'. + ;; 3. ASCII and ISO8859-1 are encoded the same in both + ;; `binary' and `escape-quoted', so they will be + ;; compatible for the most part.) + ;; + ;; Otherwise, use coding-system-for-read if explicitly + ;; given (e.g. the "Revert Buffer with Specified + ;; Encoding" menu entries), or use the coding system + ;; that the file was loaded as. + (let* ((coding-system-for-read + (if auto-save-p 'escape-quoted + (or coding-system-for-read + buffer-file-coding-system-when-loaded))) + ;; If the bfcs wasn't changed from its original + ;; value (other than possible EOL change), then we + ;; should update it for the new coding system. + (should-update-bfcs + (eq (coding-system-base + buffer-file-coding-system-when-loaded) + (coding-system-base + buffer-file-coding-system))) + (old-bfcs buffer-file-coding-system) + ;; But if the EOL was changed, match it in the new + ;; value of bfcs. + (adjust-eol + (and should-update-bfcs + (not + (eq (get-coding-system + buffer-file-coding-system-when-loaded) + (get-coding-system + buffer-file-coding-system)))))) + (insert-file-contents file-name (not auto-save-p) + nil nil t) + (when should-update-bfcs + (setq buffer-file-coding-system old-bfcs) + (set-buffer-file-coding-system + (if adjust-eol + (coding-system-base + buffer-file-coding-system-when-loaded) buffer-file-coding-system-when-loaded) - (coding-system-base - buffer-file-coding-system))) - (old-bfcs buffer-file-coding-system) - ;; But if the EOL was changed, match it in the new - ;; value of bfcs. - (adjust-eol - (and should-update-bfcs - (not - (eq (get-coding-system - buffer-file-coding-system-when-loaded) - (get-coding-system - buffer-file-coding-system)))))) - (insert-file-contents file-name (not auto-save-p) - nil nil t) - (when should-update-bfcs - (setq buffer-file-coding-system old-bfcs) - (set-buffer-file-coding-system - (if adjust-eol - (coding-system-base - buffer-file-coding-system-when-loaded) - buffer-file-coding-system-when-loaded) - (not adjust-eol)))))) - (goto-char (min opoint (point-max))) - ;; Recompute the truename in case changes in symlinks - ;; have changed the truename. - ;XEmacs: already done by insert-file-contents - ;;(setq buffer-file-truename - ;;(abbreviate-file-name (file-truename buffer-file-name))) - (after-find-file nil nil t t preserve-modes) - ;; Run after-revert-hook as it was before we reverted. - (setq-default revert-buffer-internal-hook global-hook) - (if local-hook-p - (progn - (make-local-variable 'revert-buffer-internal-hook) - (setq revert-buffer-internal-hook local-hook)) - (kill-local-variable 'revert-buffer-internal-hook)) - (run-hooks 'revert-buffer-internal-hook)) + (not adjust-eol)))))) + (goto-char (min opoint (point-max))) + ;; Recompute the truename in case changes in symlinks + ;; have changed the truename. + ;;XEmacs: already done by insert-file-contents + ;;(setq buffer-file-truename + ;;(abbreviate-file-name (file-truename buffer-file-name))) + (after-find-file nil nil t t preserve-modes) + ;; Run after-revert-hook as it was before we reverted. + (setq-default revert-buffer-internal-hook global-hook) + (if local-hook-p + (progn + (make-local-variable 'revert-buffer-internal-hook) + (setq revert-buffer-internal-hook local-hook)) + (kill-local-variable 'revert-buffer-internal-hook)) + (run-hooks 'revert-buffer-internal-hook))) + ((null newbuf) + ;; The resultant buffer is identical, alter + ;; modtime, update mods and exit + (set-visited-file-modtime) + (after-find-file nil nil t t t)) + (t t)) t))))) +(defun revert-buffer-internal (&optional file-name) + (let* ((newbuf (get-buffer-create " *revert*")) + bmin bmax) + (save-excursion + (set-buffer newbuf) + (let (buffer-read-only + (buffer-undo-list t) + after-change-function + after-change-functions + before-change-function + before-change-functions) + (if revert-buffer-insert-file-contents-function + (funcall revert-buffer-insert-file-contents-function + file-name nil) + (if (not (file-exists-p file-name)) + (error "File %s no longer exists!" file-name)) + (widen) + (insert-file-contents file-name t nil nil t) + (setq bmin (point-min) + bmax (point-max))))) + (if (not (and (eq bmin (point-min)) + (eq bmax (point-max)) + (eq (compare-buffer-substrings + newbuf bmin bmax (current-buffer) bmin bmax) 0))) + newbuf + nil))) + (defun recover-file (file) "Visit file FILE, but get contents from its last auto-save file." ;; Actually putting the file name in the minibuffer should be used
--- a/lisp/printer.el Thu Apr 25 06:09:18 2002 +0000 +++ b/lisp/printer.el Thu Apr 25 18:04:24 2002 +0000 @@ -451,5 +451,5 @@ (setq copies (1- copies))))) ((and (not (eq system-type 'windows-nt)) (fboundp 'lpr-region)) - (declare-fboundp (lpr-region start end))) + (declare-fboundp (lpr-region (point-min) (point-max)))) (t (error "No print support available"))))
--- a/netinstall/ChangeLog Thu Apr 25 06:09:18 2002 +0000 +++ b/netinstall/ChangeLog Thu Apr 25 18:04:24 2002 +0000 @@ -1,3 +1,49 @@ +2002-02-04 Andy Piper <andy@xemacs.org> + + * install.cc (install_one): Munge installed filename to fit inside + dialog. + +2001-12-17 Andy Piper <andy@xemacs.org> + + * desktop.cc (do_desktop_setup): register the whole gamut of C++ + file types. + +2001-12-12 Andy Piper <andy@xemacs.org> + + * win32.h (CDECL): reorder to remove warnings. + + * Makefile.in.in: add new dependencies. + + * desktop.h: new file. + + * uninstall.cc: use it. + + * install.cc (uninstall_one): when uninstalling xemacs remove + shortcuts also. + + * desktop.cc (remove_xemacs_setup): split out from + remove_desktop_setup. + (remove_desktop_setup): call it. + +2001-12-05 Andy Piper <andy@xemacs.org> + + * win32.h: re-order declarations for native windows from Fabrice + Popineau. + +2001-11-22 Andy Piper <andy@xemacs.org> + + * Makefile.in.in (setup-bin.ini): cope with kit revisions. + + * source.cc (save_dialog): warning removal. + (load_dialog): ditto. + + * msg.cc: remove cvs id. + + * desktop.cc (find_xemacs_version): new function. Cope with kit + revisions. + (find_xemacs_exe_path): use it. + (find_xemacs_exe_name): ditto. + 2002-04-05 Stephen J. Turnbull <stephen@xemacs.org> * XEmacs 21.5.6 "bok choi" is released. @@ -405,7 +451,7 @@ * all: port from cygwin setup. -%%% $Id: ChangeLog,v 1.15 2002/04/05 08:57:32 stephent Exp $ -$Revision: 1.15 $ +%%% $Id: ChangeLog,v 1.16 2002/04/25 18:03:40 andyp Exp $ +$Revision: 1.16 $
--- a/netinstall/desktop.cc Thu Apr 25 06:09:18 2002 +0000 +++ b/netinstall/desktop.cc Thu Apr 25 18:04:24 2002 +0000 @@ -315,7 +315,10 @@ log (0, "Registering .cpp files"); setup_explorer ("cpp", "C++ Source file", batname); setup_explorer ("cc", "C++ Source file", batname); + setup_explorer ("cxx", "C++ Source file", batname); setup_explorer ("hh", "C++ Header file", batname); + setup_explorer ("hpp", "C++ Header file", batname); + setup_explorer ("hxx", "C++ Header file", batname); } if (reg_c) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netinstall/init.cc Thu Apr 25 18:04:24 2002 +0000 @@ -0,0 +1,65 @@ +/* Initialisation for netinstall. + Copyright (C) 2001 Andy Piper. + +This file is part of XEmacs. + +XEmacs is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +XEmacs is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with XEmacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include "win32.h" +#include <stdio.h> +#include <stdlib.h> +#include "dialog.h" +#include "log.h" +#include "resource.h" +#include "state.h" +#include "msg.h" +#include "regedit.h" +#include "reginfo.h" +#include "version.h" + +static void +init_root () +{ + int isnative, issystem; + root_dir = find_root_location (&issystem, &isnative); + if (root_dir) + { + if (isnative) + install_type = IDC_INSTALL_NATIVE; + else + install_type = IDC_INSTALL_CYGWIN; + + if (issystem) + root_scope = IDC_ROOT_SYSTEM; + else + root_scope = IDC_ROOT_USER; + root_dir_default = 0; + } +} + +void +do_init (HINSTANCE h) +{ + char cwd[_MAX_PATH]; + GetCurrentDirectory (sizeof (cwd), cwd); + local_dir = strdup (cwd); + log (0, "Current Directory: %s", cwd); + + HANDLE gnu = LoadImage (h, MAKEINTRESOURCE (IDB_GNU), + IMAGE_BITMAP, 0, 0, 0); + init_root(); +} +
--- a/netinstall/install.cc Thu Apr 25 06:09:18 2002 +0000 +++ b/netinstall/install.cc Thu Apr 25 18:04:24 2002 +0000 @@ -282,6 +282,7 @@ for (cp=local; *cp; cp++) if (*cp == '/' || *cp == '\\' || *cp == ':') base = cp+1; + SetWindowText (ins_pkgname, base); if (!exists (local) && exists (base)) @@ -315,14 +316,27 @@ tar_open (local); while ((fn = tar_next_file ())) { - char *dest_file; + char *dest_file, *disp_file; + int len; if (lst) fprintf (lst, "%s\n", fn); dest_file = map_filename (fn, type); + + // The installer uses a variable width font. Assume roughly 32 chars + // will fit and munge the file accordingly. +#define MAX_DISP_SIZE 50 + disp_file = strdup(dest_file); + if ((len = strlen(dest_file)) > MAX_DISP_SIZE) { + disp_file += (len - MAX_DISP_SIZE); + disp_file[0] = '.'; + disp_file[1] = '.'; + disp_file[2] = '.'; + } +#undef MAX_DISP_SIZE + SetWindowText (ins_filename, disp_file); - SetWindowText (ins_filename, dest_file); log (LOG_BABBLE, "Installing file %s", dest_file); if (tar_read_file (dest_file) != 0) {
--- a/netinstall/res.rc Thu Apr 25 06:09:18 2002 +0000 +++ b/netinstall/res.rc Thu Apr 25 18:04:24 2002 +0000 @@ -1,546 +1,546 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#define APSTUDIO_HIDDEN_SYMBOLS -#include "windows.h" -#undef APSTUDIO_HIDDEN_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_SOURCE DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Next >",IDOK,199,176,45,15, WS_GROUP - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - CONTROL "Download from the Internet",IDC_SOURCE_DOWNLOAD,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,127,102,152,10 - CONTROL "Install from the Internet",IDC_SOURCE_NETINST,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,127,121,87,10 - CONTROL "Install from Local Directory",IDC_SOURCE_CWD,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,127,140,104,10 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "Setup will use the following installation method.", - IDC_STATIC,112,11,170,17 - LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, - 32,166,17 - GROUPBOX "Installation method",IDC_STATIC,113,84,188,77 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_LOCAL_DIR DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Local package directory" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Next >",IDOK,199,176,45,15,WS_DISABLED - PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - EDITTEXT IDC_LOCAL_DIR,120,138,122,12,ES_AUTOHSCROLL - PUSHBUTTON "Browse...",IDC_LOCAL_DIR_BROWSE,252,137,38,14 - LTEXT "Setup will use the following folder to install XEmacs and / or packages from.", - IDC_STATIC,112,10,170,17 - LTEXT "To select a different folder, click Browse and select another folder.", - IDC_STATIC,112,36,170,18 - LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, - 63,166,17 - GROUPBOX "Local Package Directory",IDC_STATIC,112,126,186,31 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_ROOT DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Next >",IDOK,199,176,45,15 - PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - EDITTEXT IDC_ROOT_DIR,120,138,122,12,ES_AUTOHSCROLL - PUSHBUTTON "Browse...",IDC_ROOT_BROWSE,252,137,38,14 - LTEXT "Setup will use the following folder in which to install XEmacs and / or packages.", - IDC_STATIC,112,10,170,17 - LTEXT "To select a different folder, click Browse and select another folder.", - IDC_STATIC,112,35,170,18 - LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, - 63,166,17 - GROUPBOX "Installation Root Directory",IDC_STATIC,112,126,186,31 - CONTROL "All",IDC_ROOT_SYSTEM,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,177,110,25,8 - CONTROL "Just Me",IDC_ROOT_USER,"Button",BS_AUTORADIOBUTTON,220, - 110,50,8 - LTEXT "Installation Type :",IDC_STATIC,112,95,60,8 - LTEXT "Install For :",IDC_STATIC,112,110,43,8 - CONTROL "Native",IDC_INSTALL_NATIVE,"Button",BS_AUTORADIOBUTTON, - 177,93,37,10 - CONTROL "Cygwin",IDC_INSTALL_CYGWIN,"Button",BS_AUTORADIOBUTTON, - 220,93,39,10 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_SITE DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Next >",IDOK,199,176,45,15 - PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "Select Download Site",IDC_STATIC,113,11,135,11 - LISTBOX IDC_URL_LIST,121,24,179,136,LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_HSCROLL | WS_TABSTOP - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_OTHER_URL DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Next >",IDOK,199,176,45,15 - PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - EDITTEXT IDC_OTHER_URL,120,138,170,12,ES_AUTOHSCROLL - LTEXT "Setup will use the following URL to install XEmacs and / or packages from.", - IDC_STATIC,112,10,170,17 - LTEXT "To select a different URL, edit the text.",IDC_STATIC, - 112,36,170,18 - LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, - 58,166,17 - GROUPBOX "Select URL to download from",IDC_STATIC,112,126,186,31 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_NET DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Next >",IDOK,199,176,45,15,WS_GROUP - PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "Setup will use the following connection method.", - IDC_STATIC,112,11,170,17,NOT WS_GROUP - LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, - 32,166,17,NOT WS_GROUP - CONTROL "Use IE5 Settings",IDC_NET_IE5,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,128,93,69,10 - CONTROL "Direct Connection",IDC_NET_DIRECT,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,128,109,73,10 - CONTROL "Use HTTP/FTP Proxy:",IDC_NET_PROXY,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,128,124,88,10 - EDITTEXT IDC_PROXY_HOST,128,141,80,12,ES_AUTOHSCROLL | - WS_DISABLED - LTEXT "Proxy",IDC_STATIC,10,55,50,15,SS_CENTERIMAGE, - WS_EX_RIGHT - LTEXT "Port",IDC_STATIC,229,139,20,15,SS_CENTERIMAGE, - WS_EX_RIGHT - EDITTEXT IDC_PROXY_PORT,257,141,30,12,ES_AUTOHSCROLL | - WS_DISABLED - GROUPBOX "Installation method",IDC_STATIC,113,78,188,83 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_DLSTATUS DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "Downloading Packages",IDC_STATIC,112,10,170,17 - LTEXT "(URL)",IDC_DLS_URL,112,26,170,11 - LTEXT "(RATE)",IDC_DLS_RATE,112,41,166,11 - CONTROL "Progress1",IDC_DLS_PROGRESS,"msctls_progress32", - WS_BORDER,123,143,165,10 - GROUPBOX "Progress",IDC_STATIC,112,130,186,31 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_INSTATUS DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "Installing Packages",IDC_STATIC,112,10,170,17 - LTEXT "(PKG)",IDC_INS_PKG,112,26,170,11 - LTEXT "(FILE)",IDC_INS_FILE,112,41,166,11 - CONTROL "Progress1",IDC_INS_DISKFULL,"msctls_progress32", - WS_BORDER,123,143,165,10 - CONTROL "Progress1",IDC_INS_IPROGRESS,"msctls_progress32", - WS_BORDER,125,106,163,10 - CONTROL "Progress1",IDC_INS_PPROGRESS,"msctls_progress32", - WS_BORDER,125,67,163,10 - GROUPBOX "Disk",IDC_STATIC,112,130,186,31 - GROUPBOX "Package",IDC_STATIC,112,54,186,31 - GROUPBOX "Total",IDC_STATIC,112,93,186,31 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_UNINSTALL DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Uninstall XEmacs" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Cancel",IDCANCEL,199,176,45,15 - DEFPUSHBUTTON "Uninstall",IDOK,256,176,45,15 - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "Uninstalling Packages",IDC_STATIC,112,10,170,17 - LTEXT "(PKG)",IDC_UNINS_PKG,112,26,170,11 - LTEXT "(FILE)",IDC_UNINS_FILE,112,41,166,11 - CONTROL "Progress1",IDC_UNINS_DISKFULL,"msctls_progress32", - WS_BORDER,123,143,165,10 - CONTROL "Progress1",IDC_UNINS_IPROGRESS,"msctls_progress32", - WS_BORDER,125,106,163,10 - CONTROL "Progress1",IDC_UNINS_PPROGRESS,"msctls_progress32", - WS_BORDER,125,67,163,10 - GROUPBOX "Disk",IDC_STATIC,112,130,186,31 - GROUPBOX "Package",IDC_STATIC,112,54,186,31 - GROUPBOX "Total",IDC_STATIC,112,93,186,31 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_PROXY_AUTH DIALOG DISCARDABLE 0, 0, 215, 95 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - ICON IDI_XEMACS,IDC_STATIC,5,5,20,20 - EDITTEXT IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL - LTEXT "Proxy User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE, - WS_EX_RIGHT - EDITTEXT IDC_NET_PASSWD,65,43,145,12,ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "Password",IDC_STATIC,10,43,50,15,SS_CENTERIMAGE, - WS_EX_RIGHT - LTEXT "Proxy Authorization Required",IDC_STATIC,65,10,145,10 - DEFPUSHBUTTON "OK",IDOK,100,75,45,15,WS_DISABLED - PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15 -END - -IDD_NET_AUTH DIALOG DISCARDABLE 0, 0, 215, 95 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - ICON IDI_XEMACS,IDC_STATIC,5,5,20,20 - EDITTEXT IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL - LTEXT "User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE, - WS_EX_RIGHT - EDITTEXT IDC_NET_PASSWD,65,43,145,12,ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "Password",IDC_STATIC,10,43,50,15,SS_CENTERIMAGE, - WS_EX_RIGHT - LTEXT "Server Authorization Required",IDC_STATIC,65,10,145,10 - DEFPUSHBUTTON "OK",IDOK,100,75,45,15,WS_DISABLED - PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15 -END - -IDD_SPLASH DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Next >",IDOK,199,176,45,15 - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - ICON IDI_XEMACS,IDC_STATIC,107,10,20,20 - LTEXT "Welcome to the XEmacs Net Release Setup Program. This will install XEmacs and/or associated packages on your computer.", - IDC_STATIC,133,10,158,29 - LTEXT "Version (unknown)",IDC_VERSION,112,117,120,10 - LTEXT "Copyright (C) 2000 Red Hat Inc",IDC_STATIC,111,132,135, - 8 - LTEXT "http://www.xemacs.org/",IDC_STATIC,111,147,150,10 - LTEXT "It is strongly recommended that you exit all Windows programs before running this utility.", - IDC_STATIC,110,43,191,19 - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 -END - -IDD_CHOOSE DIALOG DISCARDABLE 0, 0, 311, 239 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Next >",IDOK,199,214,45,15 - PUSHBUTTON "< Back",IDC_BACK,154,214,45,15 - PUSHBUTTON "Cancel",IDCANCEL,256,214,45,15 - LTEXT "",IDC_STATIC,10,201,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "Select packages to install",IDC_STATIC,55,5,85,8 - ICON IDI_XEMACS,IDC_STATIC,5,5,21,20 - LTEXT "",IDC_LISTVIEW_POS,55,15,230,155,SS_SUNKEN | NOT - WS_VISIBLE | NOT WS_GROUP - CONTROL "SPIN",IDC_STATIC,"Static",SS_BITMAP,55,170,15,13 - LTEXT "= click to choose action, (p) = previous version, (x) = experimental", - IDC_STATIC,65,170,220,8 - PUSHBUTTON "Full/Part",IDC_CHOOSE_FULLPART,250,5,35,10 - PUSHBUTTON "Exp",IDC_CHOOSE_EXP,215,5,25,10 - PUSHBUTTON "Curr",IDC_CHOOSE_CURR,190,5,25,10 - PUSHBUTTON "Prev",IDC_CHOOSE_PREV,165,5,25,10 -END - -IDD_DESKTOP DIALOG DISCARDABLE 0, 0, 311, 201 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "XEmacs Setup" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Finish",IDOK,199,176,45,15 - PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 - PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 - LTEXT "Setup has now finished. To create desktop shortcuts, please select from the following options.", - IDC_STATIC,112,11,170,17 - LTEXT "To complete setup click Finish.",IDC_STATIC,112,32,166, - 17 - CONTROL "Create Desktop Icon",IDC_ROOT_DESKTOP,"Button", - BS_AUTOCHECKBOX,113,50,100,8 - CONTROL "Add to Start Menu",IDC_ROOT_MENU,"Button", - BS_AUTOCHECKBOX,113,66,100,8 - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 - CONTROL "Text",IDC_TXT_TYPE,"Button",BS_AUTOCHECKBOX,209,101,38, - 8 - CONTROL "Java",IDC_JAVA_TYPE,"Button",BS_AUTOCHECKBOX,113,100,50, - 8 - CONTROL "C",IDC_C_TYPE,"Button",BS_AUTOCHECKBOX,113,116,41,8 - CONTROL "C++",IDC_CPP_TYPE,"Button",BS_AUTOCHECKBOX,113,133,38,8 - CONTROL "E-Lisp",IDC_ELISP_TYPE,"Button",BS_AUTOCHECKBOX,113,148, - 38,8 - LTEXT "Register XEmacs for these file types:",IDC_STATIC,113, - 84,166,13 - LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP - LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP - CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 - CONTROL "IDL",IDC_IDL_TYPE,"Button",BS_AUTOCHECKBOX,209,116,38,8 -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" - "#include ""windows.h""\r\n" - "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_XEMACS ICON DISCARDABLE "xemacs.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// FILE -// - -XEMACS.ICON FILE DISCARDABLE "xemacs.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_SOURCE, DIALOG - BEGIN - VERTGUIDE, 113 - VERTGUIDE, 127 - END - - IDD_LOCAL_DIR, DIALOG - BEGIN - VERTGUIDE, 112 - HORZGUIDE, 10 - END - - IDD_ROOT, DIALOG - BEGIN - VERTGUIDE, 112 - HORZGUIDE, 103 - HORZGUIDE, 118 - END - - IDD_SITE, DIALOG - BEGIN - HORZGUIDE, 11 - HORZGUIDE, 161 - END - - IDD_NET, DIALOG - BEGIN - VERTGUIDE, 128 - BOTTOMMARGIN, 191 - HORZGUIDE, 153 - END - - IDD_INSTATUS, DIALOG - BEGIN - VERTGUIDE, 112 - VERTGUIDE, 125 - VERTGUIDE, 288 - END - - IDD_PROXY_AUTH, DIALOG - BEGIN - BOTTOMMARGIN, 49 - END - - IDD_NET_AUTH, DIALOG - BEGIN - BOTTOMMARGIN, 49 - END - - IDD_SPLASH, DIALOG - BEGIN - LEFTMARGIN, 10 - RIGHTMARGIN, 301 - TOPMARGIN, 10 - BOTTOMMARGIN, 191 - END - - IDD_CHOOSE, DIALOG - BEGIN - BOTTOMMARGIN, 229 - HORZGUIDE, 214 - END - - IDD_DESKTOP, DIALOG - BEGIN - VERTGUIDE, 113 - VERTGUIDE, 209 - HORZGUIDE, 124 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -SPIN BITMAP DISCARDABLE "choose-spin.bmp" -IDB_SPIN BITMAP DISCARDABLE "choose-spin.bmp" -IDB_RTARROW BITMAP DISCARDABLE "choose-rtarrow.bmp" -IDB_CHECK_YES BITMAP DISCARDABLE "check-yes.bmp" -IDB_CHECK_NO BITMAP DISCARDABLE "check-no.bmp" -IDB_CHECK_NA BITMAP DISCARDABLE "check-na.bmp" -GNU BITMAP DISCARDABLE "gnu.bmp" -IDB_GNU BITMAP DISCARDABLE "gnu.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE DISCARDABLE -BEGIN - IDS_ROOT_SLASH "Warning: we recommend you do NOT use the root of your hard drive as the XEmacs root. Proceed anyway?" - IDS_ROOT_SPACE "You should not choose a root path that include spaces in directory names. Proceed anyway?" - IDS_MIRROR_LST "http://www.xemacs.org/Download/mirrors.lst" - IDS_DIALOG_FAILED "Unable to create Dialog Box" - IDS_CYGWIN_FUNC_MISSING "Error: unable to find function `%s' in %s" - IDS_DOWNLOAD_SHORT "Download error: %s too short (%d, wanted %d)" - IDS_ERR_OPEN_WRITE "Can't open %s for writing: %s" - IDS_SETUPINI_MISSING "Unable to get setup.ini from %s" - IDS_OLD_SETUPINI "This setup.ini is older than the one you used last time you installed cygwin. Proceed anyway?" - IDS_ERR_RENAME "Can't rename %s to %s: %s" - IDS_NOTHING_INSTALLED "Nothing needed to be installed" - IDS_INSTALL_COMPLETE "Installation Complete" -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_ERR_OPEN_READ "Can't open %s for reading: %s" - IDS_ROOT_ABSOLUTE "The install directory must be absolute, with both a drive letter and leading slash, like C:\\Cygwin" - IDS_DOWNLOAD_COMPLETE "Download Complete" - IDS_CVSID "\n%%% $Id: res.rc,v 1.8 2002/03/13 08:52:27 ben Exp $\n" - IDS_NOLOGFILE "Cannot open log file %s for writing" - IDS_UNINSTALL_COMPLETE "Uninstalls complete." - IDS_WININET "Unable to find or load the Internet Explorer 5 DLLs" - IDS_ERR_CHDIR "Could not change dir to %s" - IDS_CREATE_DIR "The directory %s does not exist, create it?" - IDS_OLD_SETUP_VERSION "This setup is version %s, but setup.ini claims version %s is available.\nYou might want to upgrade to get the latest features and bug fixes." - IDS_DOWNLOAD_FAILED "Unable to download %s" - IDS_DOWNLOAD_INCOMPLETE "Download Incomplete. Try again?" - IDS_INSTALL_INCOMPLETE "Installation incomplete. Check /setup.log.full for details" - IDS_ROOT_NOCYGWIN "You should not install the Cygwin version without Cygwin installed. Proceed anyway?" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_SOURCE DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Next >",IDOK,199,176,45,15,WS_GROUP + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + CONTROL "Download from the Internet",IDC_SOURCE_DOWNLOAD,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,127,102,152,10 + CONTROL "Install from the Internet",IDC_SOURCE_NETINST,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,127,121,87,10 + CONTROL "Install from Local Directory",IDC_SOURCE_CWD,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,127,140,104,10 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Setup will use the following installation method.", + IDC_STATIC,112,11,170,17 + LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, + 32,166,17 + GROUPBOX "Installation method",IDC_STATIC,113,84,188,77 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_LOCAL_DIR DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Local package directory" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Next >",IDOK,199,176,45,15,WS_DISABLED + PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + EDITTEXT IDC_LOCAL_DIR,120,138,122,12,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_LOCAL_DIR_BROWSE,252,137,38,14 + LTEXT "Setup will use the following folder to install XEmacs and / or packages from.", + IDC_STATIC,112,10,170,17 + LTEXT "To select a different folder, click Browse and select another folder.", + IDC_STATIC,112,36,170,18 + LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, + 63,166,17 + GROUPBOX "Local Package Directory",IDC_STATIC,112,126,186,31 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_ROOT DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Next >",IDOK,199,176,45,15 + PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + EDITTEXT IDC_ROOT_DIR,120,138,122,12,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_ROOT_BROWSE,252,137,38,14 + LTEXT "Setup will use the following folder in which to install XEmacs and / or packages.", + IDC_STATIC,112,10,170,17 + LTEXT "To select a different folder, click Browse and select another folder.", + IDC_STATIC,112,35,170,18 + LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, + 63,166,17 + GROUPBOX "Installation Root Directory",IDC_STATIC,112,126,186,31 + CONTROL "All",IDC_ROOT_SYSTEM,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,177,110,25,8 + CONTROL "Just Me",IDC_ROOT_USER,"Button",BS_AUTORADIOBUTTON,220, + 110,50,8 + LTEXT "Installation Type :",IDC_STATIC,112,95,60,8 + LTEXT "Install For :",IDC_STATIC,112,110,43,8 + CONTROL "Native",IDC_INSTALL_NATIVE,"Button",BS_AUTORADIOBUTTON, + 177,93,37,10 + CONTROL "Cygwin",IDC_INSTALL_CYGWIN,"Button",BS_AUTORADIOBUTTON, + 220,93,39,10 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_SITE DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Next >",IDOK,199,176,45,15 + PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Select Download Site",IDC_STATIC,113,11,135,11 + LISTBOX IDC_URL_LIST,121,24,179,136,LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_OTHER_URL DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Next >",IDOK,199,176,45,15 + PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + EDITTEXT IDC_OTHER_URL,120,138,170,12,ES_AUTOHSCROLL + LTEXT "Setup will use the following URL to install XEmacs and / or packages from.", + IDC_STATIC,112,10,170,17 + LTEXT "To select a different URL, edit the text.",IDC_STATIC, + 112,36,170,18 + LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, + 58,166,17 + GROUPBOX "Select URL to download from",IDC_STATIC,112,126,186,31 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_NET DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Next >",IDOK,199,176,45,15,WS_GROUP + PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Setup will use the following connection method.", + IDC_STATIC,112,11,170,17,NOT WS_GROUP + LTEXT "To exit setup click Cancel at any time.",IDC_STATIC,112, + 32,166,17,NOT WS_GROUP + CONTROL "Use IE5 Settings",IDC_NET_IE5,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,128,93,69,10 + CONTROL "Direct Connection",IDC_NET_DIRECT,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,128,109,73,10 + CONTROL "Use HTTP/FTP Proxy:",IDC_NET_PROXY,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,128,124,88,10 + EDITTEXT IDC_PROXY_HOST,128,141,80,12,ES_AUTOHSCROLL | + WS_DISABLED + LTEXT "Proxy",IDC_STATIC,10,55,50,15,SS_CENTERIMAGE, + WS_EX_RIGHT + LTEXT "Port",IDC_STATIC,229,139,20,15,SS_CENTERIMAGE, + WS_EX_RIGHT + EDITTEXT IDC_PROXY_PORT,257,141,30,12,ES_AUTOHSCROLL | + WS_DISABLED + GROUPBOX "Installation method",IDC_STATIC,113,78,188,83 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_DLSTATUS DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Downloading Packages",IDC_STATIC,112,10,170,17 + LTEXT "(URL)",IDC_DLS_URL,112,26,170,11 + LTEXT "(RATE)",IDC_DLS_RATE,112,41,166,11 + CONTROL "Progress1",IDC_DLS_PROGRESS,"msctls_progress32", + WS_BORDER,123,143,165,10 + GROUPBOX "Progress",IDC_STATIC,112,130,186,31 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_INSTATUS DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Installing Packages",IDC_STATIC,112,10,170,17 + LTEXT "(PKG)",IDC_INS_PKG,112,26,170,11 + LTEXT "(FILE)",IDC_INS_FILE,112,41,183,11 + CONTROL "Progress1",IDC_INS_DISKFULL,"msctls_progress32", + WS_BORDER,123,143,165,10 + CONTROL "Progress1",IDC_INS_IPROGRESS,"msctls_progress32", + WS_BORDER,125,106,163,10 + CONTROL "Progress1",IDC_INS_PPROGRESS,"msctls_progress32", + WS_BORDER,125,67,163,10 + GROUPBOX "Disk",IDC_STATIC,112,130,186,31 + GROUPBOX "Package",IDC_STATIC,112,54,186,31 + GROUPBOX "Total",IDC_STATIC,112,93,186,31 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_UNINSTALL DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Uninstall XEmacs" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Cancel",IDCANCEL,199,176,45,15 + DEFPUSHBUTTON "Uninstall",IDOK,256,176,45,15 + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Uninstalling Packages",IDC_STATIC,112,10,170,17 + LTEXT "(PKG)",IDC_UNINS_PKG,112,26,170,11 + LTEXT "(FILE)",IDC_UNINS_FILE,112,41,166,11 + CONTROL "Progress1",IDC_UNINS_DISKFULL,"msctls_progress32", + WS_BORDER,123,143,165,10 + CONTROL "Progress1",IDC_UNINS_IPROGRESS,"msctls_progress32", + WS_BORDER,125,106,163,10 + CONTROL "Progress1",IDC_UNINS_PPROGRESS,"msctls_progress32", + WS_BORDER,125,67,163,10 + GROUPBOX "Disk",IDC_STATIC,112,130,186,31 + GROUPBOX "Package",IDC_STATIC,112,54,186,31 + GROUPBOX "Total",IDC_STATIC,112,93,186,31 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_PROXY_AUTH DIALOG DISCARDABLE 0, 0, 215, 95 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDI_XEMACS,IDC_STATIC,5,5,20,20 + EDITTEXT IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL + LTEXT "Proxy User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE, + WS_EX_RIGHT + EDITTEXT IDC_NET_PASSWD,65,43,145,12,ES_PASSWORD | ES_AUTOHSCROLL + LTEXT "Password",IDC_STATIC,10,43,50,15,SS_CENTERIMAGE, + WS_EX_RIGHT + LTEXT "Proxy Authorization Required",IDC_STATIC,65,10,145,10 + DEFPUSHBUTTON "OK",IDOK,100,75,45,15,WS_DISABLED + PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15 +END + +IDD_NET_AUTH DIALOG DISCARDABLE 0, 0, 215, 95 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDI_XEMACS,IDC_STATIC,5,5,20,20 + EDITTEXT IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL + LTEXT "User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE, + WS_EX_RIGHT + EDITTEXT IDC_NET_PASSWD,65,43,145,12,ES_PASSWORD | ES_AUTOHSCROLL + LTEXT "Password",IDC_STATIC,10,43,50,15,SS_CENTERIMAGE, + WS_EX_RIGHT + LTEXT "Server Authorization Required",IDC_STATIC,65,10,145,10 + DEFPUSHBUTTON "OK",IDOK,100,75,45,15,WS_DISABLED + PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15 +END + +IDD_SPLASH DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Next >",IDOK,199,176,45,15 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + ICON IDI_XEMACS,IDC_STATIC,107,10,20,20 + LTEXT "Welcome to the XEmacs Net Release Setup Program. This will install XEmacs and/or associated packages on your computer.", + IDC_STATIC,133,10,158,29 + LTEXT "Version (unknown)",IDC_VERSION,112,117,120,10 + LTEXT "Copyright (C) 2000 Red Hat Inc",IDC_STATIC,111,132,135, + 8 + LTEXT "http://www.xemacs.org/",IDC_STATIC,111,147,150,10 + LTEXT "It is strongly recommended that you exit all Windows programs before running this utility.", + IDC_STATIC,110,43,191,19 + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 +END + +IDD_CHOOSE DIALOG DISCARDABLE 0, 0, 311, 239 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Next >",IDOK,199,214,45,15 + PUSHBUTTON "< Back",IDC_BACK,154,214,45,15 + PUSHBUTTON "Cancel",IDCANCEL,256,214,45,15 + LTEXT "",IDC_STATIC,10,201,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "Select packages to install",IDC_STATIC,55,5,85,8 + ICON IDI_XEMACS,IDC_STATIC,5,5,21,20 + LTEXT "",IDC_LISTVIEW_POS,55,15,230,155,SS_SUNKEN | NOT + WS_VISIBLE | NOT WS_GROUP + CONTROL "SPIN",IDC_STATIC,"Static",SS_BITMAP,55,170,15,13 + LTEXT "= click to choose action, (p) = previous version, (x) = experimental", + IDC_STATIC,65,170,220,8 + PUSHBUTTON "Full/Part",IDC_CHOOSE_FULLPART,250,5,35,10 + PUSHBUTTON "Exp",IDC_CHOOSE_EXP,215,5,25,10 + PUSHBUTTON "Curr",IDC_CHOOSE_CURR,190,5,25,10 + PUSHBUTTON "Prev",IDC_CHOOSE_PREV,165,5,25,10 +END + +IDD_DESKTOP DIALOG DISCARDABLE 0, 0, 311, 201 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "XEmacs Setup" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Finish",IDOK,199,176,45,15 + PUSHBUTTON "< Back",IDC_BACK,154,176,45,15 + PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15 + LTEXT "Setup has now finished. To create desktop shortcuts, please select from the following options.", + IDC_STATIC,112,11,170,17 + LTEXT "To complete setup click Finish.",IDC_STATIC,112,32,166, + 17 + CONTROL "Create Desktop Icon",IDC_ROOT_DESKTOP,"Button", + BS_AUTOCHECKBOX,113,50,100,8 + CONTROL "Add to Start Menu",IDC_ROOT_MENU,"Button", + BS_AUTOCHECKBOX,113,66,100,8 + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 + CONTROL "Text",IDC_TXT_TYPE,"Button",BS_AUTOCHECKBOX,209,101,38, + 8 + CONTROL "Java",IDC_JAVA_TYPE,"Button",BS_AUTOCHECKBOX,113,100,50, + 8 + CONTROL "C",IDC_C_TYPE,"Button",BS_AUTOCHECKBOX,113,116,41,8 + CONTROL "C++",IDC_CPP_TYPE,"Button",BS_AUTOCHECKBOX,113,133,38,8 + CONTROL "E-Lisp",IDC_ELISP_TYPE,"Button",BS_AUTOCHECKBOX,113,148, + 38,8 + LTEXT "Register XEmacs for these file types:",IDC_STATIC,113, + 84,166,13 + LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP + LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP + CONTROL "GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62 + CONTROL "IDL",IDC_IDL_TYPE,"Button",BS_AUTOCHECKBOX,209,116,38,8 +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_XEMACS ICON DISCARDABLE "xemacs.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// FILE +// + +XEMACS.ICON FILE DISCARDABLE "xemacs.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_SOURCE, DIALOG + BEGIN + VERTGUIDE, 113 + VERTGUIDE, 127 + END + + IDD_LOCAL_DIR, DIALOG + BEGIN + VERTGUIDE, 112 + HORZGUIDE, 10 + END + + IDD_ROOT, DIALOG + BEGIN + VERTGUIDE, 112 + HORZGUIDE, 103 + HORZGUIDE, 118 + END + + IDD_SITE, DIALOG + BEGIN + HORZGUIDE, 11 + HORZGUIDE, 161 + END + + IDD_NET, DIALOG + BEGIN + VERTGUIDE, 128 + BOTTOMMARGIN, 191 + HORZGUIDE, 153 + END + + IDD_INSTATUS, DIALOG + BEGIN + VERTGUIDE, 112 + VERTGUIDE, 125 + VERTGUIDE, 288 + END + + IDD_PROXY_AUTH, DIALOG + BEGIN + BOTTOMMARGIN, 49 + END + + IDD_NET_AUTH, DIALOG + BEGIN + BOTTOMMARGIN, 49 + END + + IDD_SPLASH, DIALOG + BEGIN + LEFTMARGIN, 10 + RIGHTMARGIN, 301 + TOPMARGIN, 10 + BOTTOMMARGIN, 191 + END + + IDD_CHOOSE, DIALOG + BEGIN + BOTTOMMARGIN, 229 + HORZGUIDE, 214 + END + + IDD_DESKTOP, DIALOG + BEGIN + VERTGUIDE, 113 + VERTGUIDE, 209 + HORZGUIDE, 124 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +SPIN BITMAP DISCARDABLE "choose-spin.bmp" +IDB_SPIN BITMAP DISCARDABLE "choose-spin.bmp" +IDB_RTARROW BITMAP DISCARDABLE "choose-rtarrow.bmp" +IDB_CHECK_YES BITMAP DISCARDABLE "check-yes.bmp" +IDB_CHECK_NO BITMAP DISCARDABLE "check-no.bmp" +IDB_CHECK_NA BITMAP DISCARDABLE "check-na.bmp" +GNU BITMAP DISCARDABLE "gnu.bmp" +IDB_GNU BITMAP DISCARDABLE "gnu.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ROOT_SLASH "Warning: we recommend you do NOT use the root of your hard drive as the XEmacs root. Proceed anyway?" + IDS_ROOT_SPACE "You should not choose a root path that include spaces in directory names. Proceed anyway?" + IDS_MIRROR_LST "http://www.xemacs.org/Download/mirrors.lst" + IDS_DIALOG_FAILED "Unable to create Dialog Box" + IDS_CYGWIN_FUNC_MISSING "Error: unable to find function `%s' in %s" + IDS_DOWNLOAD_SHORT "Download error: %s too short (%d, wanted %d)" + IDS_ERR_OPEN_WRITE "Can't open %s for writing: %s" + IDS_SETUPINI_MISSING "Unable to get setup.ini from %s" + IDS_OLD_SETUPINI "This setup.ini is older than the one you used last time you installed cygwin. Proceed anyway?" + IDS_ERR_RENAME "Can't rename %s to %s: %s" + IDS_NOTHING_INSTALLED "Nothing needed to be installed" + IDS_INSTALL_COMPLETE "Installation Complete" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ERR_OPEN_READ "Can't open %s for reading: %s" + IDS_ROOT_ABSOLUTE "The install directory must be absolute, with both a drive letter and leading slash, like C:\\Cygwin" + IDS_DOWNLOAD_COMPLETE "Download Complete" + IDS_CVSID "\n%%% $Id: res.rc,v 1.9 2002/04/25 18:03:43 andyp Exp $\n" + IDS_NOLOGFILE "Cannot open log file %s for writing" + IDS_UNINSTALL_COMPLETE "Uninstalls complete." + IDS_WININET "Unable to find or load the Internet Explorer 5 DLLs" + IDS_ERR_CHDIR "Could not change dir to %s" + IDS_OLD_SETUP_VERSION "This setup is version %s, but setup.ini claims version %s is available.\nYou might want to upgrade to get the latest features and bug fixes." + IDS_DOWNLOAD_FAILED "Unable to download %s" + IDS_DOWNLOAD_INCOMPLETE "Download Incomplete. Try again?" + IDS_INSTALL_INCOMPLETE "Installation incomplete. Check /setup.log.full for details" + IDS_ROOT_NOCYGWIN "You should not install the Cygwin version without Cygwin installed. Proceed anyway?" + IDS_CREATE_DIR "The directory %s does not exist, create it?" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED +
--- a/nt/ChangeLog Thu Apr 25 06:09:18 2002 +0000 +++ b/nt/ChangeLog Thu Apr 25 18:04:24 2002 +0000 @@ -1,3 +1,7 @@ +2002-03-26 Vin Shelton <acs@xemacs.org> + + * xemacs.mak: Added special rule to build winclient.exe. + 2002-04-23 Jonathan Harris <jonathan@xemacs.org> * README: Document build for latest versions of zlib & png
--- a/nt/xemacs.mak Thu Apr 25 06:09:18 2002 +0000 +++ b/nt/xemacs.mak Thu Apr 25 18:04:24 2002 +0000 @@ -553,6 +553,12 @@ cd $(LIB_SRC) $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** wsock32.lib -link -incremental:no cd $(NT) + +$(LIB_SRC)/winclient.exe: $(LIB_SRC)/winclient.c + cd $(LIB_SRC) + $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** user32.lib -link -incremental:no + cd $(NT) + $(LIB_SRC)/minitar.exe : $(NT)/minitar.c $(CCV) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** "$(ZLIB_DIR)\zlib.lib" -link -incremental:no @@ -560,6 +566,7 @@ $(LIB_SRC)/etags.exe \ $(LIB_SRC)/hexl.exe \ $(LIB_SRC)/i.exe \ + $(LIB_SRC)/winclient.exe \ $(LIB_SRC)/make-docfile.exe \ $(LIB_SRC)/mmencode.exe \ $(LIB_SRC)/movemail.exe \
--- a/src/ChangeLog Thu Apr 25 06:09:18 2002 +0000 +++ b/src/ChangeLog Thu Apr 25 18:04:24 2002 +0000 @@ -1,3 +1,134 @@ +2002-04-24 Andy Piper <andy@xemacs.org> + + * redisplay.c (create_text_block): Don't actually add propagation + data if the line ends after we have added a glyph. + + * lisp.h (Dynarr_end): Fix definition. + +2002-04-22 Andy Piper <andy@xemacs.org> + + * extents.c (extent_fragment_update): check for glyphs we have + previously displayed. + * extents.c (print_extent_1): warning removal. + * extents.h: change prototype. + * redisplay-output.c (redisplay_normalize_glyph_area): calculate + widths correctly for wide glyphs. + * redisplay.c (position_redisplay_data_type): add end_glyph_width. + * redisplay.c (prop_type): add PROP_GLYPH. + * redisplay.c (struct prop_block): add glyph type + * redisplay.c (add_glyph_rune): when adding part of a glyph add it + to the propagation data. + * redisplay.c (create_text_block): if there is a glyph in the + propagation data use it to salt extent_fragment_update. + * redisplay.c (create_string_text_block): ditto. + +2002-04-13 Nix <nix@esperi.demon.co.uk> + + * redisplay.h (struct rune): Add ascent, descent, and yoffset fields. + * redisplay-output.c (compare_runes): Compare them. + * redisplay.c: Update copyright date. + * redisplay.c (pos_data): Add need_baseline_computation field. + * redisplay.c (add_glyph_rune): Update ascent, descent, and + need_baseline_computation; zero yoffset. Set max_pixmap_height + for all pixmaps, not just automatically positioned ones. + * redisplay.c (calculate_yoffset): New, compute yoffset values. + * redisplay.c (calculate_baseline): New, compute textual baseline. + * redisplay.c (add_glyph_rune): Call them. + * redisplay.c (create_text_block): Likewise. + * redisplay.c (create_overlay_glyph_block): Likewise. + * redisplay.c (add_margin_runes): Likewise. + * redisplay.c (create_string_text_block): Likewise. Fix tabdamage. + + * redisplay.h: (redisplay_calculate_display_boxes): Change prototype. + * redisplay-output.c (redisplay_calculate_display_boxes): Use yoffset. + * redisplay-msw.c (mswindows_output_blank): Pass 0 as yoffset. + * redisplay-msw.c (mswindows_output_string): Likewise. + * redisplay-msw.c (mswindows_output_display_block): Pass yoffset. + * redisplay-gtk.c (gtk_output_display_block): Likewise. + * redisplay-x.c (x_output_display_block): Likewise. + +2002-04-02 Andy Piper <andy@xemacs.org> + + * dired-msw.c (mswindows_get_files): + * nt.c (mswindows_stat): SetErrorMode() so that file errors are + completely handled by XEmacs. Suggested by Thomas Vogler + <mail@thomas-vogler.de>. + +2002-04-01 Andy Piper <andy@xemacs.org> + + * emacs.c (Fkill_emacs): Only output message box in interactive + mode. + +2002-03-14 Mike Alexander <mta@arbortext.com> + + * event-msw.c (mswindows_unwait_process): New, remove process from + wait list + * process-nt.c (nt_finalize_process_data): Call + mswindows_unwait_process + * console-msw.h: Declare mswindows_unwait_process + +2002-03-20 Andy Piper <andy@xemacs.org> + + * menubar-msw.c (mswindows_popup_menu): warning removal. + * dialog-msw.c (dialog_popped_down): ditto. + +2002-02-13 Andy Piper <andy@xemacs.org> + + * event-msw.c (mswindows_wnd_proc): only mark the frame visible if + we did in fact enqueue the XM_MAPFRAME event. + +2002-02-06 Adrian Aichner <adrian@xemacs.org> + + * redisplay.c (mark_redisplay): Remove call to + update_frame_window_mirror. + +2002-01-03 Andy Piper <andy@xemacs.org> + + * realpath.c (ABS_LENGTH): dtrt for cygwin systems using drive + letters. + (xrealpath): ditto. + +2001-12-11 Andy Piper <andy@xemacs.org> + + * dialog-msw.c (dialog_popped_down): new function. unset popup_up_p. + * dialog-msw.c (mswindows_make_dialog_box_internal): set + popup_up_p. + * menubar-msw.c (unsafe_handle_wm_initmenupopup_1): ditto. + * menubar-msw.c (mswindows_handle_wm_command): ditto. + * menubar-msw.c (mswindows_popup_menu): ditto. + +2001-11-24 Andy Piper <andy@xemacs.org> + + * window.c (Fsplit_window): Doc return type. + +2001-07-30 Adrian Aichner <adrian@xemacs.org> + + * event-msw.c: Typo fix. + * event-msw.c (mswindows_wnd_proc): Set FRAME_VISIBLE_P after + magic XM_MAPFRAME event has been sent. + +2001-11-23 Andy Piper <andy@xemacs.org> + + * event-msw.c (mswindows_wnd_proc): Don't pump mousewheel events. + +2001-11-21 Andy Piper <andy@xemacs.org> + + * scrollbar-msw.c (mswindows_handle_mousewheel_event): cope with + mouse events outside the frame. + +2001-11-15 Andy Piper <andy@xemacs.org> + + (Fmswindows_shell_execute): fix handling of URL's under cygwin (again). + +2001-11-14 Andy Piper <andy@xemacs.org> + + * nt.c (REG_ROOT): change registry key to XEmacs. + +2001-10-29 Andy Piper <andy@xemacs.org> + + * dialog-msw.c (handle_directory_dialog_box): quit if the user + cancels. + 2002-04-15 Ben Wing <ben@xemacs.org> * process.c: Need sysdep.h for environ. @@ -3066,12 +3197,6 @@ * (Ffile_name_absolute_p): ditto. * (Ffile_readable_p): ditto. -2001-07-30 Adrian Aichner <adrian@xemacs.org> - - * event-msw.c: Typo fix. - * event-msw.c (mswindows_wnd_proc): Set FRAME_VISIBLE_P after - magic XM_MAPFRAME event has been sent. - 2001-09-07 Stephen J. Turnbull <stephen@xemacs.org> * XEmacs 21.5.3 "asparagus" is released.
--- a/src/dialog-msw.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/dialog-msw.c Thu Apr 25 18:04:24 2002 +0000 @@ -782,7 +782,7 @@ int unbind_count = specpdl_depth (); record_unwind_protect (dialog_popped_down, Qnil); popup_up_p++; - + if (EQ (type, Qfile)) return unbind_to_1 (unbind_count, handle_file_dialog_box (f, keys)); else if (EQ (type, Qdirectory))
--- a/src/dired-msw.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/dired-msw.c Thu Apr 25 18:04:24 2002 +0000 @@ -189,6 +189,7 @@ int findex; DECLARE_EISTRING (win32pattern); HANDLE fh; + int errm; while (1) { @@ -221,6 +222,8 @@ */ findex = 0; fh = INVALID_HANDLE_VALUE; + errm = SetErrorMode (SEM_FAILCRITICALERRORS + | SEM_NOOPENFILEERRORBOX); while (1) { @@ -234,15 +237,21 @@ { fh = qxeFindFirstFile (eiextdata (win32pattern), &finddat); if (fh == INVALID_HANDLE_VALUE) - report_file_error ("Opening directory", dirfile); + { + SetErrorMode (errm); + report_file_error ("Opening directory", dirfile); + } } else { if (! qxeFindNextFile (fh, &finddat)) { - if (GetLastError () == ERROR_NO_MORE_FILES) - break; - FindClose (fh); + if (GetLastError() == ERROR_NO_MORE_FILES) + { + break; + } + FindClose(fh); + SetErrorMode (errm); report_file_error ("Reading directory", dirfile); } } @@ -283,6 +292,8 @@ FindClose (fh); break; } + + SetErrorMode (errm); return (files); }
--- a/src/emacs.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/emacs.c Thu Apr 25 18:04:24 2002 +0000 @@ -3045,7 +3045,7 @@ { static int already_paused; - if (already_paused) + if (already_paused || !noninteractive) return; if (!allow_further) already_paused = 1;
--- a/src/event-msw.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/event-msw.c Thu Apr 25 18:04:24 2002 +0000 @@ -3042,12 +3042,13 @@ } else { - if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) + if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) { mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); - /* APA: Now that the magic XM_MAPFRAME event has - * been sent we can mark the frame as visible (just - * like 21.1 did). */ - FRAME_VISIBLE_P (frame) = 1; + /* APA: Now that the magic XM_MAPFRAME event has + * been sent we can mark the frame as visible (just + * like 21.1 did). */ + FRAME_VISIBLE_P (frame) = 1; + } if (!msframe->sizing || mswindows_dynamic_frame_resize) redisplay ();
--- a/src/extents.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/extents.c Thu Apr 25 18:04:24 2002 +0000 @@ -2754,9 +2754,10 @@ face_index extent_fragment_update (struct window *w, struct extent_fragment *ef, - Bytebpos pos) + Bytebpos pos, Lisp_Object last_glyph) { int i; + int seen_glyph = NILP (last_glyph) ? 1 : 0; Extent_List *sel = buffer_or_string_stack_of_extents_force (ef->object)->extents; EXTENT lhe = 0; @@ -2797,11 +2798,15 @@ if (extent_start (e) == mempos && !NILP (extent_begin_glyph (e))) { Lisp_Object glyph = extent_begin_glyph (e); - struct glyph_block gb; - - gb.glyph = glyph; - gb.extent = wrap_extent (e); - Dynarr_add (ef->begin_glyphs, gb); + if (seen_glyph) { + struct glyph_block gb; + + gb.glyph = glyph; + gb.extent = wrap_extent (e); + Dynarr_add (ef->begin_glyphs, gb); + } + else if (EQ (glyph, last_glyph)) + seen_glyph = 1; } } @@ -2812,11 +2817,15 @@ if (extent_end (e) == mempos && !NILP (extent_end_glyph (e))) { Lisp_Object glyph = extent_end_glyph (e); - struct glyph_block gb; - - gb.glyph = glyph; - gb.extent = wrap_extent (e); - Dynarr_add (ef->end_glyphs, gb); + if (seen_glyph) { + struct glyph_block gb; + + gb.glyph = glyph; + gb.extent = wrap_extent (e); + Dynarr_add (ef->end_glyphs, gb); + } + else if (EQ (glyph, last_glyph)) + seen_glyph = 1; } } @@ -2951,9 +2960,9 @@ if (extent_detached_p (ext)) strcpy (bp, "detached"); else - sprintf (bp, "%ld, %ld", - (long) XINT (Fextent_start_position (obj)), - (long) XINT (Fextent_end_position (obj))); + sprintf (bp, "%d, %d", + XINT (Fextent_start_position (obj)), + XINT (Fextent_end_position (obj))); bp += strlen (bp); *bp++ = (extent_end_open_p (anc) ? ')': ']'); if (!NILP (extent_end_glyph (anc))) *bp++ = '*';
--- a/src/extents.h Thu Apr 25 06:09:18 2002 +0000 +++ b/src/extents.h Thu Apr 25 18:04:24 2002 +0000 @@ -348,8 +348,8 @@ struct frame *frm); face_index extent_fragment_update (struct window *w, struct extent_fragment *ef, - /* Note this is in Bytebposs */ - Bytebpos pos); + /* Note this is in Bytebpos' */ + Bytebpos pos, Lisp_Object last_glyph); void extent_fragment_delete (struct extent_fragment *ef);
--- a/src/lisp.h Thu Apr 25 06:09:18 2002 +0000 +++ b/src/lisp.h Thu Apr 25 18:04:24 2002 +0000 @@ -892,7 +892,7 @@ #define Dynarr_at(d, pos) ((d)->base[pos]) #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos)) #define Dynarr_begin(d) Dynarr_atp (d, 0) -#define Dynarr_end(d) Dynarr_atp (d, Dynarr_length (d)) +#define Dynarr_end(d) Dynarr_atp (d, Dynarr_length (d) - 1) #define Dynarr_sizeof(d) ((d)->cur * (d)->elsize) #ifdef ERROR_CHECK_STRUCTURES
--- a/src/nt.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/nt.c Thu Apr 25 18:04:24 2002 +0000 @@ -1458,6 +1458,7 @@ Bytecount len; int rootdir = FALSE; Extbyte *nameext; + int errm; if (path == NULL || buf == NULL) { @@ -1466,6 +1467,8 @@ } name = qxestrcpy (alloca_intbytes (qxestrlen (path) + 10), path); + errm = SetErrorMode (SEM_FAILCRITICALERRORS + | SEM_NOOPENFILEERRORBOX); get_volume_info (name, &path); /* must be valid filename, no wild cards or other invalid characters */ @@ -1511,6 +1514,7 @@ C_STRING_TO_TSTR (name, nameext); if (qxeGetDriveType (nameext) < 2) { + SetErrorMode (errm); errno = ENOENT; return -1; } @@ -1552,6 +1556,7 @@ fh = qxeFindFirstFile (nameext, &wfd); if (fh == INVALID_HANDLE_VALUE) { + SetErrorMode (errm); errno = ENOENT; return -1; } @@ -1621,6 +1626,8 @@ } } + SetErrorMode (errm); + #if 0 /* XEmacs: Removed the fake-inodes code here, which was if 0'd out. If you want it, look in w32.c in Emacs 20.6. */
--- a/src/realpath.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/realpath.c Thu Apr 25 18:04:24 2002 +0000 @@ -35,6 +35,20 @@ #define MAX_READLINKS 32 +#if defined (HAVE_SYS_PARAM_H) && !defined (WIN32_NATIVE) +#include <sys/param.h> +#endif + +#ifdef WIN32_NATIVE +#include <direct.h> +#endif + +#include <sys/stat.h> /* for S_IFLNK */ + +#if defined(WIN32_NATIVE) || defined(CYGWIN) +#define WIN32_FILENAMES +#endif + /* First char after start of absolute filename. */ #define ABS_START(name) (name + ABS_LENGTH (name)) @@ -45,8 +59,13 @@ # define readlink_and_correct_case mswindows_readlink_and_correct_case #else # ifdef CYGWIN -# define ABS_LENGTH(name) (IS_DIRECTORY_SEP (*name) ? \ - (IS_DIRECTORY_SEP (name[1]) ? 2 : 1) : 0) +# ifdef WIN32_FILENAMES +# define ABS_LENGTH(name) (mswindows_abs_start (name)) +static int mswindows_abs_start (const Intbyte * name); +# else +# define ABS_LENGTH(name) (IS_DIRECTORY_SEP (*name) ? \ + (IS_DIRECTORY_SEP (name[1]) ? 2 : 1) : 0) +# endif # define readlink_and_correct_case cygwin_readlink_and_correct_case # else # define ABS_LENGTH(name) (IS_DIRECTORY_SEP (*name) ? 1 : 0) @@ -154,7 +173,7 @@ } #endif /* CYGWIN */ -#ifdef WIN32_NATIVE +#ifdef WIN32_FILENAMES #ifndef ELOOP #define ELOOP 10062 /* = WSAELOOP in winsock.h */ #endif @@ -193,9 +212,11 @@ path = copy_path; max_path = copy_path + PATH_MAX - 2; -#ifdef WIN32_NATIVE + if (0) + ; +#ifdef WIN32_FILENAMES /* Check for c:/... or //server/... */ - if (abslen == 2 || abslen == 3) + else if (abslen == 2 || abslen == 3) { qxestrncpy (new_path, path, abslen); /* Make sure drive letter is lowercased. */ @@ -204,6 +225,8 @@ new_path += abslen; path += abslen; } +#endif +#ifdef WIN32_NATIVE /* No drive letter, but a beginning slash? Prepend drive letter. */ else if (abslen == 1) { @@ -212,7 +235,7 @@ path++; } /* Just a path name, prepend the current directory */ - else + else if (1) { get_initial_directory (new_path, PATH_MAX - 1); new_path += qxestrlen (new_path); @@ -221,7 +244,7 @@ } #else /* If it's a relative pathname use get_initial_directory for starters. */ - if (abslen == 0) + else if (abslen == 0) { get_initial_directory (new_path, PATH_MAX - 1); new_path += qxestrlen (new_path);
--- a/src/redisplay-gtk.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/redisplay-gtk.c Thu Apr 25 18:04:24 2002 +0000 @@ -422,8 +422,8 @@ struct display_box dbox; struct display_glyph_area dga; redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset, - start_pixpos, rb->width, - &dbox, &dga); + rb->object.dglyph.yoffset ,start_pixpos, + rb->width, &dbox, &dga); window = wrap_window (w); instance = glyph_image_instance (rb->object.dglyph.glyph,
--- a/src/redisplay-msw.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/redisplay-msw.c Thu Apr 25 18:04:24 2002 +0000 @@ -282,6 +282,7 @@ struct display_glyph_area dga; redisplay_calculate_display_boxes (dl, rb->xpos, /*rb->object.dglyph.xoffset*/ 0, + /*rb->object.dglyph.yoffset*/ 0, start_pixpos, rb->width, &db, &dga); /* blank the background in the appropriate color */ @@ -495,7 +496,7 @@ { struct display_box db; struct display_glyph_area dga; - redisplay_calculate_display_boxes (dl, xpos + xoffset, 0, + redisplay_calculate_display_boxes (dl, xpos + xoffset, 0, 0, clip_start, width, &db, &dga); /* blank the background in the appropriate color */ mswindows_update_dc (hdc, @@ -1145,8 +1146,8 @@ struct display_glyph_area dga; redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset, - start_pixpos, rb->width, - &dbox, &dga); + rb->object.dglyph.yoffset, + start_pixpos, rb->width, &dbox, &dga); window = wrap_window (w); instance = glyph_image_instance (rb->object.dglyph.glyph,
--- a/src/redisplay-output.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/redisplay-output.c Thu Apr 25 18:04:24 2002 +0000 @@ -232,7 +232,10 @@ else if (crb->type == RUNE_DGLYPH && (!EQ (crb->object.dglyph.glyph, drb->object.dglyph.glyph) || !EQ (crb->object.dglyph.extent, drb->object.dglyph.extent) || - crb->object.dglyph.xoffset != drb->object.dglyph.xoffset)) + crb->object.dglyph.xoffset != drb->object.dglyph.xoffset || + crb->object.dglyph.yoffset != drb->object.dglyph.yoffset || + crb->object.dglyph.ascent != drb->object.dglyph.ascent || + crb->object.dglyph.descent != drb->object.dglyph.descent)) return 0; /* Only check dirtiness if we know something has changed. */ else if (crb->type == RUNE_DGLYPH && @@ -1548,10 +1551,24 @@ dga->height = IMAGE_INSTANCE_PIXMAP_HEIGHT (p); dga->width = IMAGE_INSTANCE_PIXMAP_WIDTH (p); +#ifdef DEBUG_REDISPLAY + printf ("redisplay_output_pixmap(request) \ +[%dx%d@%d+%d] in [%dx%d@%d+%d]\n", + db->width, db->height, db->xpos, db->ypos, + dga->width, dga->height, dga->xoffset, dga->yoffset); +#endif + /* This makes the glyph area fit into the display area. */ if (!redisplay_normalize_glyph_area (db, dga)) return; +#ifdef DEBUG_REDISPLAY + printf ("redisplay_output_pixmap(normalized) \ +[%dx%d@%d+%d] in [%dx%d@%d+%d]\n", + db->width, db->height, db->xpos, db->ypos, + dga->width, dga->height, dga->xoffset, dga->yoffset); +#endif + /* Clear the area the pixmap is going into. The pixmap itself will always take care of the full width. We don't want to clear where it is going to go in order to avoid flicker. So, all we have to @@ -1745,7 +1762,28 @@ redisplay_normalize_glyph_area redisplay_normalize_display_box - Calculate the visible box for displaying src in dest. + Calculate the visible box for displaying glyphsrc in dest. + + display_box and display_glyph_area are used to represent an area to + displayed and where to display it. Using these two structures all + combinations of clipping and position can be accommodated. + + dest - display_box + + xpos - absolute horizontal position of area. + + ypos - absolute vertical position of area. + + glyphsrc - display_glyph_area + + xoffset - horizontal offset of the glyph, +ve means display + the glyph with the x position offset by xoffset, -ve means + display starting xoffset into the glyph. + + yoffset - vertical offset of the glyph, +ve means display the + glyph with y position offset by yoffset, -ve means display + starting xoffset into the glyph. + ****************************************************************************/ int redisplay_normalize_glyph_area (struct display_box* dest, @@ -1773,28 +1811,51 @@ return 0; } - /* Horizontal offsets. This works because xoffset can be -ve as well as +ve */ + /* Horizontal offsets. This works because xoffset can be -ve as well + as +ve. When we enter this function the glyphsrc width and + height are set to the actual glyph width and height irrespective + of how much can be displayed. We are trying to clip both the + offset into the image and the rightmost bounding box. Its + possible for the glyph width to be much larger than the area we + are displaying into (e.g. a large glyph in a small frame). */ if (dest->xpos + glyphsrc->xoffset + glyphsrc->width > dest->xpos + dest->width) { + /* glyphsrc offset is +ve we are trying to display offset from the + origin (the bounding box contains some space and then the + glyph). At most the width we want to display is dest->width - + glyphsrc->xoffset. */ if (glyphsrc->xoffset > 0) glyphsrc->width = dest->width - glyphsrc->xoffset; + /* glyphsrc offset is -ve we are trying to display hard up + against the dest corner inset into the glyphsrc by + xoffset.*/ + else if (glyphsrc->xoffset < 0) + { + glyphsrc->width += glyphsrc->xoffset; + glyphsrc->width = min (glyphsrc->width, dest->width); + } else glyphsrc->width = dest->width; } - if (glyphsrc->xoffset < 0) + else if (glyphsrc->xoffset < 0) glyphsrc->width += glyphsrc->xoffset; /* Vertical offsets. This works because yoffset can be -ve as well as +ve */ if (dest->ypos + glyphsrc->yoffset + glyphsrc->height > dest->ypos + dest->height) { - if (glyphsrc->yoffset > 0) + if ((glyphsrc->yoffset > 0) && (dest->height > glyphsrc->yoffset)) glyphsrc->height = dest->height - glyphsrc->yoffset; + else if (glyphsrc->yoffset < 0) + { + glyphsrc->height += glyphsrc->yoffset; + glyphsrc->height = min (glyphsrc->height, dest->height); + } else glyphsrc->height = dest->height; } - if (glyphsrc->yoffset < 0) + else if (glyphsrc->yoffset < 0) glyphsrc->height += glyphsrc->yoffset; return 1; @@ -1879,8 +1940,8 @@ ****************************************************************************/ int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, - int xoffset, int start_pixpos, int width, - struct display_box* dest, + int xoffset, int yoffset, int start_pixpos, + int width, struct display_box* dest, struct display_glyph_area* src) { dest->xpos = xpos; @@ -1889,10 +1950,11 @@ dest->height = DISPLAY_LINE_HEIGHT (dl); src->xoffset = -xoffset; - src->yoffset = -dl->top_clip; src->width = 0; src->height = 0; + src->yoffset = -dl->top_clip + yoffset; + if (start_pixpos >=0 && start_pixpos > xpos) { /* Oops, we're asking for a start outside of the displayable
--- a/src/redisplay-x.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/redisplay-x.c Thu Apr 25 18:04:24 2002 +0000 @@ -443,9 +443,10 @@ Lisp_Object instance; struct display_box dbox; struct display_glyph_area dga; + redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset, - start_pixpos, rb->width, - &dbox, &dga); + rb->object.dglyph.yoffset, start_pixpos, + rb->width, &dbox, &dga); window = wrap_window (w); instance = glyph_image_instance (rb->object.dglyph.glyph,
--- a/src/redisplay.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/redisplay.c Thu Apr 25 18:04:24 2002 +0000 @@ -145,9 +145,9 @@ to be skipped before anything is displayed. */ Bytebpos bi_start_col_enabled; int start_col_xoffset; /* Number of pixels that still need to - be skipped. This is used for - horizontal scrolling of glyphs, where we want - to be able to scroll over part of the glyph. */ + be skipped. This is used for + horizontal scrolling of glyphs, where we want + to be able to scroll over part of the glyph. */ int hscroll_glyph_width_adjust; /* how much the width of the hscroll glyph differs from space_width (w). @@ -161,18 +161,20 @@ struct extent_fragment *ef; face_index findex; - /* The height of a pixmap may either be predetermined if the user - has set a baseline value, or it may be dependent on whatever the - line ascent and descent values end up being, based just on font - information. In the first case we can immediately update the - values, thus their inclusion here. In the last case we cannot - determine the actual contribution to the line height until we - have finished laying out all text on the line. Thus we propagate - the max height of such pixmaps and do a final calculation after - all text has been added to the line. */ + /* The height of a pixmap may either be predetermined if the user has set a + baseline value, or it may be dependent on whatever the line ascent and + descent values end up being, based just on font and pixmap-ascent + information. In the first case we can immediately update the values, thus + their inclusion here. In the last case we cannot determine the actual + contribution to the line height until we have finished laying out all text + on the line. Thus we propagate the max height of such pixmaps and do a + final calculation (in calculate_baseline()) after all text has been added + to the line. */ int new_ascent; int new_descent; int max_pixmap_height; + int need_baseline_computation; + int end_glyph_width; /* Well, it is the kitchen sink after all ... */ Lisp_Object result_str; /* String where we put the result of generating a formatted string in the modeline. */ @@ -190,15 +192,24 @@ PROP_STRING, PROP_CHAR, PROP_MINIBUF_PROMPT, - PROP_BLANK + PROP_BLANK, + PROP_GLYPH }; /* Data that should be propagated to the next line. Either a single - Emchar or a string of Intbyte's. + Emchar, a string of Intbyte's or a glyph. The actual data that is propagated ends up as a Dynarr of these blocks. + prop_blocks are used to indicate that data that was supposed to go + on the previous line couldn't actually be displayed. Generally this + shouldn't happen if we are clipping the end of lines. If we are + wrapping then we need to display the propagation data before moving + on. Its questionable whether we should wrap or clip glyphs in this + instance. Most e-lisp relies on clipping so we preserve this + behavior. + #### It's unclean that both Emchars and Intbytes are here. */ @@ -227,6 +238,14 @@ int width; face_index findex; } p_blank; + + struct + { + /* Not used as yet, but could be used to wrap rather than clip glyphs. */ + int width; + Lisp_Object glyph; + } p_glyph; + } data; }; @@ -263,6 +282,9 @@ static void update_line_start_cache (struct window *w, Charbpos from, Charbpos to, Charbpos point, int no_regen); static int point_visible (struct window *w, Charbpos point, int type); +static void calculate_yoffset (struct display_line *dl, + struct display_block *fixup); +static void calculate_baseline (pos_data *data); static void sledgehammer_check_redisplay_structs (void); @@ -680,6 +702,108 @@ return bounds; } +/* This takes a display_block and its containing line and corrects the yoffset + of each glyph in the block to cater for the ascent of the line as a + whole. Must be called *after* the line-ascent is known! */ + +static void +calculate_yoffset (struct display_line *dl, struct display_block *fixup) +{ + int i; + for (i=0; i<Dynarr_length (fixup->runes); i++) + { + struct rune *r = Dynarr_atp (fixup->runes,i); + if (r->type == RUNE_DGLYPH) + { + if (r->object.dglyph.ascent < dl->ascent) + r->object.dglyph.yoffset = dl->ascent - r->object.dglyph.ascent + + r->object.dglyph.descent; + } + } +} + +/* Calculate the textual baseline (the ascent and descent values for the + display_line as a whole). + + If the baseline is completely blank, or contains no manually positioned + glyphs, then the textual baseline is simply the baseline of the default font. + (The `contains no manually positioned glyphs' part is actually done for + us by `add_emchar_rune'.) + + If the baseline contains pixmaps, and they're all manually positioned, then + the textual baseline location is constrained that way, and we need do no + work. + + If the baseline contains pixmaps, and at least one is automatically + positioned, then the textual ascent is the largest ascent on the line, and + the textual descent is the largest descent (which is how things are set up at + entry to this function anyway): except that if the max_ascent + max_descent + is too small for the height of the line (say you've adjusted the baseline of + a short glyph, and there's a tall one next to it), then take the ascent and + descent for the line individually from the largest of the explicitly set + ascent/descent, and the rescaled ascent/descent of the default font, scaled + such that the largest glyph will fit. + + This means that if you have a short glyph (but taller than the default + font's descent) forced right under the baseline, and a really tall + automatically positioned glyph, that the descent for the line is just big + enough for the manually positioned short glyph, and the tall one uses as + much of that space as the default font would were it as tall as the tall + glyph; but that the ascent is big enough for the tall glyph to fit. + + This behaviour means that under no circumstances will changing the baseline + of a short glyph cause a tall glyph to move around; nor will it move the + textual baseline more than necessary. (Changing a tall glyph's baseline + might move the text's baseline arbitrarily, of course.) */ + +static void +calculate_baseline (pos_data *data) +{ + /* Blank line: baseline is default font's baseline. */ + + if (!data->new_ascent && !data->new_descent) + { + /* We've got a blank line so initialize these values from the default + face. */ + default_face_font_info (data->window, &data->new_ascent, + &data->new_descent, 0, 0, 0); + } + + /* No automatically positioned glyphs? Return at once. */ + if (!data->need_baseline_computation) + return; + + /* Is the tallest glyph on the line automatically positioned? + If it's manually positioned, or it's automatically positioned + and there's enough room for it anyway, we need do no more work. */ + if (data->max_pixmap_height > data->new_ascent + data->new_descent) + { + int default_font_ascent, default_font_descent, default_font_height; + int scaled_default_font_ascent, scaled_default_font_descent; + + default_face_font_info (data->window, &default_font_ascent, + &default_font_descent, &default_font_height, + 0, 0); + + scaled_default_font_ascent = data->max_pixmap_height * + default_font_ascent / default_font_height; + + data->new_ascent = max (data->new_ascent, scaled_default_font_ascent); + + /* The ascent may have expanded now. Do we still need to grow the descent, + or are things big enough? + + The +1 caters for the baseline row itself. */ + if (data->max_pixmap_height > data->new_ascent + data->new_descent) + { + scaled_default_font_descent = (data->max_pixmap_height * + default_font_descent / default_font_height) + 1; + + data->new_descent = max (data->new_descent, scaled_default_font_descent); + } + } +} + /* Given a display line and a starting position, ensure that the contents of the display line accurately represent the visual representation of the buffer contents starting from the given @@ -875,11 +999,13 @@ } else data->last_char_width = -1; + if (!no_contribute_to_line_height) { data->new_ascent = max (data->new_ascent, (int) fi->ascent); data->new_descent = max (data->new_descent, (int) fi->descent); } + data->last_charset = charset; data->last_findex = data->findex; } @@ -1130,12 +1256,11 @@ static prop_block_dynarr * add_octal_runes (pos_data *data) { - prop_block_dynarr *prop, *add_failed; + prop_block_dynarr *add_failed, *prop = 0; Emchar orig_char = data->ch; int orig_cursor_type = data->cursor_type; /* Initialize */ - prop = NULL; add_failed = NULL; if (data->start_col) @@ -1195,7 +1320,7 @@ ADD_NEXT_OCTAL_RUNE_CHAR; data->cursor_type = orig_cursor_type; - return prop; + return NULL; } #undef ADD_NEXT_OCTAL_RUNE_CHAR @@ -1568,6 +1693,7 @@ Lisp_Object face; Lisp_Object instance; face_index findex; + prop_block_dynarr *retval = 0; if (cachel) width = cachel->width; @@ -1579,7 +1705,6 @@ if (data->start_col || data->start_col_xoffset) { - prop_block_dynarr *retval; int glyph_char_width = width / space_width (w); /* If we still have not fully scrolled horizontally after @@ -1615,17 +1740,41 @@ if (data->pixpos + width > data->max_pixpos) { /* If this is the first object we are attempting to add to - the line then we ignore the horizontal_clip threshold. - Otherwise we will loop until the bottom of the window - continually failing to add this glyph because it is wider - than the window. We could alternatively just completely - ignore the glyph and proceed from there but I think that - this is a better solution. */ + the line then we ignore the horizontal_clip threshold. + Otherwise we will loop until the bottom of the window + continually failing to add this glyph because it is wider + than the window. We could alternatively just completely + ignore the glyph and proceed from there but I think that + this is a better solution. + + This does, however, create a different problem in that we + can end up adding the object to every single line, never + getting any further - for instance an extent with a long + start-glyph that covers multitple following + characters. */ if (Dynarr_length (data->db->runes) && data->max_pixpos - data->pixpos < horizontal_clip) return ADD_FAILED; - else + else { + struct prop_block pb; + + /* We need to account for the width of the end-of-line + glyph if there is nothing more in the line to display, + since we will not display it in this instance. It seems + kind of gross doing it here, but otherwise we have to + search the runes in create_text_block(). */ + if (data->ch == '\n') + data->max_pixpos += data->end_glyph_width; width = data->max_pixpos - data->pixpos; + /* Add the glyph we are displaying, but clipping, to the + propagation data so that we don't try and do it + again. */ + retval = Dynarr_new (prop_block); + pb.type = PROP_GLYPH; + pb.data.p_glyph.glyph = gb->glyph; + pb.data.p_glyph.width = width; + Dynarr_add (retval, pb); + } } if (cachel) @@ -1641,6 +1790,8 @@ baseline = glyph_baseline (gb->glyph, data->window); + rb.object.dglyph.descent = 0; /* Gets reset lower down, if it is known. */ + if (glyph_contrib_p (gb->glyph, data->window)) { /* A pixmap that has not had a baseline explicitly set. Its @@ -1648,6 +1799,7 @@ if (NILP (baseline)) { int height = ascent + descent; + data->need_baseline_computation = 1; data->max_pixmap_height = max (data->max_pixmap_height, height); } @@ -1670,6 +1822,9 @@ data->new_ascent = max (data->new_ascent, pix_ascent); data->new_descent = max (data->new_descent, pix_descent); + data->max_pixmap_height = max (data->max_pixmap_height, height); + + rb.object.dglyph.descent = pix_descent; } /* Otherwise something is screwed up. */ @@ -1701,7 +1856,7 @@ data->findex = orig_findex; data->bi_charbpos = orig_charbpos; data->bi_start_col_enabled = orig_start_col_enabled; - return NULL; + return retval; } rb.findex = findex; @@ -1718,6 +1873,9 @@ rb.object.dglyph.glyph = gb->glyph; rb.object.dglyph.extent = gb->extent; rb.object.dglyph.xoffset = xoffset; + rb.object.dglyph.ascent = ascent; + rb.object.dglyph.yoffset = 0; /* Until we know better, assume that it has + a normal (textual) baseline. */ if (allow_cursor) { @@ -1753,7 +1911,7 @@ Dynarr_add (data->db->runes, rb); data->pixpos += width; - return NULL; + return retval; } else { @@ -1782,7 +1940,7 @@ abort (); /* there are no unknown types */ } - return NULL; /* shut up compiler */ + return NULL; } /* Add all glyphs at position POS_TYPE that are contained in the given @@ -1842,7 +2000,6 @@ is_surrogate_for_selected_frame (f)); int truncate_win = window_truncation_on (w); - int end_glyph_width; /* If the buffer's value of selective_display is an integer then only lines that start with less than selective_display columns of @@ -1940,10 +2097,10 @@ glyph. Save the width of the end glyph for later use. */ data.max_pixpos = dl->bounds.right_in; if (truncate_win) - end_glyph_width = GLYPH_CACHEL_WIDTH (w, TRUN_GLYPH_INDEX); + data.end_glyph_width = GLYPH_CACHEL_WIDTH (w, TRUN_GLYPH_INDEX); else - end_glyph_width = GLYPH_CACHEL_WIDTH (w, CONT_GLYPH_INDEX); - data.max_pixpos -= end_glyph_width; + data.end_glyph_width = GLYPH_CACHEL_WIDTH (w, CONT_GLYPH_INDEX); + data.max_pixpos -= data.end_glyph_width; if (cursor_in_echo_area && MINI_WINDOW_P (w) && echo_area_active (f)) { @@ -2036,10 +2193,25 @@ /* Check for face changes. */ if (initial || (!no_more_frags && data.bi_charbpos == data.ef->end)) { + Lisp_Object last_glyph = Qnil; + + /* Deal with glyphs that we have already displayed. The + theory is that if we end up with a PROP_GLYPH in the + propagation data then we are clipping the glyph and there + can be no propagation data before that point. The theory + works because we always recalculate the extent-fragments + for propagated data, we never actually propagate the + fragments that still need to be displayed. */ + if (*prop && Dynarr_atp (*prop, 0)->type == PROP_GLYPH) + { + last_glyph = Dynarr_atp (*prop, 0)->data.p_glyph.glyph; + Dynarr_free (*prop); + *prop = 0; + } /* Now compute the face and begin/end-glyph information. */ data.findex = /* Remember that the extent-fragment routines deal in Bytebpos's. */ - extent_fragment_update (w, data.ef, data.bi_charbpos); + extent_fragment_update (w, data.ef, data.bi_charbpos, last_glyph); get_display_tables (w, data.findex, &face_dt, &window_dt); @@ -2109,9 +2281,9 @@ } /* If there is propagation data, then it represents the current - buffer position being displayed. Add them and advance the - position counter. This might also add the minibuffer - prompt. */ + buffer position being displayed. Add them and advance the + position counter. This might also add the minibuffer + prompt. */ else if (*prop) { dl->used_prop_data = 1; @@ -2133,19 +2305,59 @@ here rather than doing them at the end of handling the previous run so that glyphs at the beginning and end of a line are handled correctly. */ - else if (Dynarr_length (data.ef->end_glyphs) > 0) - { - *prop = add_glyph_runes (&data, END_GLYPHS); - if (*prop) - goto done; - } - - /* If there are begin glyphs, add them to the line. */ - else if (Dynarr_length (data.ef->begin_glyphs) > 0) - { - *prop = add_glyph_runes (&data, BEGIN_GLYPHS); - if (*prop) - goto done; + else if (Dynarr_length (data.ef->end_glyphs) > 0 + || Dynarr_length (data.ef->begin_glyphs) > 0) + { + glyph_block_dynarr* tmpglyphs = 0; + /* #### I think this is safe, but could be wrong. */ + data.ch = BI_BUF_FETCH_CHAR (b, data.bi_charbpos); + + if (Dynarr_length (data.ef->end_glyphs) > 0) + { + *prop = add_glyph_runes (&data, END_GLYPHS); + tmpglyphs = data.ef->end_glyphs; + } + + /* If there are begin glyphs, add them to the line. */ + if (!*prop && Dynarr_length (data.ef->begin_glyphs) > 0) + { + *prop = add_glyph_runes (&data, BEGIN_GLYPHS); + tmpglyphs = data.ef->begin_glyphs; + } + + if (*prop) + { + /* If we just clipped a glyph and we are at the end of a + line and there are more glyphs to display then do + appropriate processing to not get a continuation + glyph. */ + if (*prop != ADD_FAILED + && Dynarr_atp (*prop, 0)->type == PROP_GLYPH + && data.ch == '\n') + { + /* If there are no more glyphs then do the normal + processing. + + #### This doesn't actually work if the same glyph is + present more than once in the block. To solve + this we would have to carry the index around + which might be problematic since the fragment is + recalculated for each line. */ + if (EQ (Dynarr_end (tmpglyphs)->glyph, + Dynarr_atp (*prop, 0)->data.p_glyph.glyph)) + { + Dynarr_free (*prop); + *prop = 0; + } + else { + data.blank_width = DEVMETH (d, eol_cursor_width, ()); + add_emchar_rune (&data); /* discard prop data. */ + goto done; + } + } + else + goto done; + } } /* If at end-of-buffer, we've already processed begin and @@ -2179,7 +2391,7 @@ /* We aren't going to be adding an end glyph so give its space back in order to make sure that the cursor can fit. */ - data.max_pixpos += end_glyph_width; + data.max_pixpos += data.end_glyph_width; if (selective > 0 && (bi_spaces_at_point @@ -2260,7 +2472,7 @@ /* We won't be adding a truncation or continuation glyph so give up the room allocated for them. */ - data.max_pixpos += end_glyph_width; + data.max_pixpos += data.end_glyph_width; if (!NILP (b->selective_display_ellipses)) { @@ -2469,7 +2681,7 @@ for the next newline. We also add the end-of-line glyph which we know will fit because we adjusted the right border before we starting laying out the line. */ - data.max_pixpos += end_glyph_width; + data.max_pixpos += data.end_glyph_width; data.findex = DEFAULT_INDEX; gb.extent = Qnil; @@ -2604,26 +2816,7 @@ else db->end_pos = dl->bounds.right_white; - /* update line height parameters */ - if (!data.new_ascent && !data.new_descent) - { - /* We've got a blank line so initialize these values from the default - face. */ - default_face_font_info (data.window, &data.new_ascent, - &data.new_descent, 0, 0, 0); - } - - if (data.max_pixmap_height) - { - int height = data.new_ascent + data.new_descent; - int pix_ascent, pix_descent; - - pix_descent = data.max_pixmap_height * data.new_descent / height; - pix_ascent = data.max_pixmap_height - pix_descent; - - data.new_ascent = max (data.new_ascent, pix_ascent); - data.new_descent = max (data.new_descent, pix_descent); - } + calculate_baseline (&data); dl->ascent = data.new_ascent; dl->descent = data.new_descent; @@ -2641,6 +2834,8 @@ dl->descent = descent; } + calculate_yoffset (dl, db); + dl->cursor_elt = data.cursor_x; /* #### lossage lossage lossage! Fix this shit! */ if (data.bi_charbpos > BI_BUF_ZV (b)) @@ -2729,14 +2924,15 @@ gb.extent = Qnil; add_glyph_rune (&data, &gb, BEGIN_GLYPHS, 0, 0); } - + if (data.max_pixmap_height) { int height = data.new_ascent + data.new_descent; int pix_ascent, pix_descent; - + pix_descent = data.max_pixmap_height * data.new_descent / height; pix_ascent = data.max_pixmap_height - pix_descent; + calculate_baseline (&data); data.new_ascent = max (data.new_ascent, pix_ascent); data.new_descent = max (data.new_descent, pix_descent); @@ -2748,6 +2944,8 @@ data.db->start_pos = dl->bounds.left_in; data.db->end_pos = data.pixpos; + calculate_yoffset (dl, data.db); + return data.pixpos - dl->bounds.left_in; } @@ -2819,20 +3017,13 @@ (reverse ? elt-- : elt++); } - if (data.max_pixmap_height) - { - int height = data.new_ascent + data.new_descent; - int pix_ascent, pix_descent; - - pix_descent = data.max_pixmap_height * data.new_descent / height; - pix_ascent = data.max_pixmap_height - pix_descent; - data.new_ascent = max (data.new_ascent, pix_ascent); - data.new_descent = max (data.new_descent, pix_descent); - } + calculate_baseline (&data); dl->ascent = data.new_ascent; dl->descent = data.new_descent; + calculate_yoffset (dl, data.db); + return data.pixpos; } @@ -4269,9 +4460,9 @@ /***************************************************************************/ -/* */ -/* displayable string routines */ -/* */ +/* */ +/* displayable string routines */ +/* */ /***************************************************************************/ /* Given a position for a string in a window, ensure that the given @@ -4312,7 +4503,6 @@ pos_data data; int truncate_win = b ? window_truncation_on (w) : 0; - int end_glyph_width = 0; /* We're going to ditch selective display for static text, it's an FSF thing and invisible extents are the way to go here. @@ -4420,13 +4610,7 @@ /* Set the right boundary adjusting it to take into account any end glyph. Save the width of the end glyph for later use. */ data.max_pixpos = dl->bounds.right_in; -#if 0 - if (truncate_win) - end_glyph_width = GLYPH_CACHEL_WIDTH (w, TRUN_GLYPH_INDEX); - else - end_glyph_width = GLYPH_CACHEL_WIDTH (w, CONT_GLYPH_INDEX); -#endif - data.max_pixpos -= end_glyph_width; + data.max_pixpos -= data.end_glyph_width; data.cursor_type = NO_CURSOR; data.cursor_x = -1; @@ -4482,11 +4666,19 @@ /* Check for face changes. */ if (initial || (!no_more_frags && data.bi_charbpos == data.ef->end)) { + Lisp_Object last_glyph = Qnil; + /* Deal with clipped glyphs that we have already displayed. */ + if (*prop && Dynarr_atp (*prop, 0)->type == PROP_GLYPH) + { + last_glyph = Dynarr_atp (*prop, 0)->data.p_glyph.glyph; + Dynarr_free (*prop); + *prop = 0; + } /* Now compute the face and begin/end-glyph information. */ data.findex = /* Remember that the extent-fragment routines deal in Bytebpos's. */ - extent_fragment_update (w, data.ef, data.bi_charbpos); + extent_fragment_update (w, data.ef, data.bi_charbpos, last_glyph); /* This is somewhat cheesy but the alternative is to propagate default_face into extent_fragment_update. */ if (data.findex == DEFAULT_INDEX) @@ -4578,17 +4770,23 @@ a line are handled correctly. */ else if (Dynarr_length (data.ef->end_glyphs) > 0) { + data.ch = XSTRING_CHAR (disp_string, data.bi_charbpos); *prop = add_glyph_runes (&data, END_GLYPHS); - if (*prop) + + if (*prop) { goto done; + } } /* If there are begin glyphs, add them to the line. */ else if (Dynarr_length (data.ef->begin_glyphs) > 0) { + data.ch = XSTRING_CHAR (disp_string, data.bi_charbpos); *prop = add_glyph_runes (&data, BEGIN_GLYPHS); - if (*prop) + + if (*prop) { goto done; + } } /* If at end-of-buffer, we've already processed begin and @@ -4622,7 +4820,7 @@ /* We aren't going to be adding an end glyph so give its space back in order to make sure that the cursor can fit. */ - data.max_pixpos += end_glyph_width; + data.max_pixpos += data.end_glyph_width; goto done; } @@ -4664,7 +4862,7 @@ *prop = add_blank_rune (&data, w, char_tab_width); /* add_blank_rune is only supposed to be called with - sizes guaranteed to fit in the available space. */ + sizes guaranteed to fit in the available space. */ assert (!(*prop)); if (prop_width) @@ -4720,7 +4918,7 @@ } } -done: + done: /* Determine the starting point of the next line if we did not hit the end of the buffer. */ @@ -4753,7 +4951,7 @@ for the next newline. We also add the end-of-line glyph which we know will fit because we adjusted the right border before we starting laying out the line. */ - data.max_pixpos += end_glyph_width; + data.max_pixpos += data.end_glyph_width; data.findex = default_face; gb.extent = Qnil; @@ -4782,7 +4980,7 @@ cachel = GLYPH_CACHEL (w, CONT_GLYPH_INDEX); } - if (end_glyph_width) + if (data.end_glyph_width) add_glyph_rune (&data, &gb, BEGIN_GLYPHS, 0, cachel); if (truncate_win && data.bi_charbpos == bi_string_zv) @@ -4862,26 +5060,7 @@ else db->end_pos = dl->bounds.right_white; - /* update line height parameters */ - if (!data.new_ascent && !data.new_descent) - { - /* We've got a blank line so initialize these values from the default - face. */ - default_face_font_info (data.window, &data.new_ascent, - &data.new_descent, 0, 0, 0); - } - - if (data.max_pixmap_height) - { - int height = data.new_ascent + data.new_descent; - int pix_ascent, pix_descent; - - pix_descent = data.max_pixmap_height * data.new_descent / height; - pix_ascent = data.max_pixmap_height - pix_descent; - - data.new_ascent = max (data.new_ascent, pix_ascent); - data.new_descent = max (data.new_descent, pix_descent); - } + calculate_baseline (&data); dl->ascent = data.new_ascent; dl->descent = data.new_descent; @@ -4899,6 +5078,8 @@ dl->descent = descent; } + calculate_yoffset (dl, db); + dl->cursor_elt = data.cursor_x; /* #### lossage lossage lossage! Fix this shit! */ if (data.bi_charbpos > bi_string_zv)
--- a/src/redisplay.h Thu Apr 25 06:09:18 2002 +0000 +++ b/src/redisplay.h Thu Apr 25 18:04:24 2002 +0000 @@ -147,6 +147,9 @@ If this is a rune in the modeline then this might be nil. */ + int ascent; /* Ascent of this glyph, in pixels. */ + int descent; /* Descent of this glyph, in pixels. */ + int yoffset; /* Offset from line top to reach glyph top */ int xoffset; /* Number of pixels that need to be chopped off the left of the glyph. This has the effect of shifting the @@ -774,9 +777,8 @@ int cursor_width, int cursor_height, int offset_bitmap); int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, - int xoffset, int start_pixpos, - int width, - struct display_box* dest, + int xoffset, int yoffset, int start_pixpos, + int width, struct display_box* dest, struct display_glyph_area* src); int redisplay_normalize_glyph_area (struct display_box* dest, struct display_glyph_area* glyphsrc);
--- a/src/scrollbar-msw.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/scrollbar-msw.c Thu Apr 25 18:04:24 2002 +0000 @@ -352,19 +352,22 @@ frame. */ if (ScreenToClient (FRAME_MSWINDOWS_HANDLE (XFRAME (frame)), &donde_esta) != 0) - /* stderr_out ("donde_esta: %d %d\n", donde_esta.x, donde_esta.y); */ - pixel_to_glyph_translation (XFRAME (frame), donde_esta.x, donde_esta.y, - &mene, &_mene, &tekel, &upharsin, - &needle_in_haystack, - &mens, &sana, &in, &corpore, &sano); - - if (needle_in_haystack) { - win = wrap_window (needle_in_haystack); - /* stderr_out ("found needle\n"); - debug_print (win); */ + /* stderr_out ("donde_esta: %d %d\n", donde_esta.x, donde_esta.y); */ + pixel_to_glyph_translation (XFRAME (frame), donde_esta.x, donde_esta.y, + &mene, &_mene, &tekel, &upharsin, + &needle_in_haystack, + &mens, &sana, &in, &corpore, &sano); + + if (needle_in_haystack) + { + win = wrap_window (needle_in_haystack); + /* stderr_out ("found needle\n"); + debug_print (win); */ + } } - else + + if (!needle_in_haystack) { win = FRAME_SELECTED_WINDOW (XFRAME (frame)); needle_in_haystack = XWINDOW (win);
--- a/src/syswindows.h Thu Apr 25 06:09:18 2002 +0000 +++ b/src/syswindows.h Thu Apr 25 18:04:24 2002 +0000 @@ -410,11 +410,14 @@ #else #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA #endif -#endif /* not BFFM_VALIDATEFAILED */ +#endif /* winnls.h defines */ +#ifndef MAC_CHARSET +#define MAC_CHARSET 77 +#endif #ifndef LOCALE_RETURN_NUMBER -#define LOCALE_RETURN_NUMBER 0x20000000 +#define LOCALE_RETURN_NUMBER 0x20000000 #endif /* OEM resources */
--- a/src/win32.c Thu Apr 25 06:09:18 2002 +0000 +++ b/src/win32.c Thu Apr 25 18:04:24 2002 +0000 @@ -332,24 +332,38 @@ if (STRINGP (document)) { #ifdef CYGWIN - Intbyte *docint = XSTRING_DATA (document); - /* If URL style file, the innards may have Cygwin mount points and - the like. so separate out the innards, process them, and put back - together. */ - if (qxestrncasecmp_c (docint, "file://", 7) == 0) - { - Intbyte *fname_windows; - Intbyte *docint_windows; + Extbyte *fname1; + Extbyte *fname2; + int pos, sz; + LISP_STRING_TO_TSTR (document, doc); - LOCAL_TO_WIN32_FILE_FORMAT (docint + 7, fname_windows); - docint_windows = alloca_intbytes (7 + qxestrlen (fname_windows) + 1); - qxestrcpy_c (docint_windows, "file://"); - qxestrcat (docint_windows, fname_windows); - C_STRING_TO_TSTR (docint, doc); + if ((fname1 = strchr (doc, ':')) != NULL + && *++fname1 == '/' && *++fname1 == '/') + { + /* If URL style file, the innards may have Cygwin mount points and + the like. so separate out the innards, process them, and put back + together. */ + if (qxestrncasecmp (doc, "file://", 7) == 0) + { + fname1++; + pos = fname1 - doc; + if (!(isalpha (fname1[0]) && (IS_DEVICE_SEP (fname1[1])))) + { + sz = cygwin_posix_to_win32_path_list_buf_size (fname1); + fname2 = alloca (sz + pos); + qxestrncpy (fname2, doc, pos); + doc = fname2; + fname2 += pos; + cygwin_posix_to_win32_path_list (fname1, fname2); + } + } } - else + else { + /* Not URL-style, must be a straight filename. */ + LOCAL_FILE_FORMAT_TO_TSTR (document, doc); + } #endif - LOCAL_FILE_FORMAT_TO_TSTR (document, doc); + } ret = (int) qxeShellExecute (NULL, opext, doc, parmext, path,