Commit 07e5c0b0 authored by Dan Nicolaescu's avatar Dan Nicolaescu

* cmdargs.texi (Misc Variables): Remove Sun windows info.

* MACHINES: Remove Sun windows info.

* term/sun-mouse.el:
* obsolete/sun-fns.el:
* obsolete/sun-curs.el: Remove files.

* term/sun.el (select-previous-complex-command):

* sunfns.c: Remove file

* m/sun386.h:
* m/sun2.h:
* m/sparc.h: Remove Sun windows code.
parent 88406d6e
2007-11-01 Dan Nicolaescu <dann@ics.uci.edu>
* cmdargs.texi (Misc Variables): Remove Sun windows info.
2007-10-27 Emanuele Giaquinta <e.giaquinta@glauco.it> (tiny change)
* gnus-faq.texi ([5.12]): Remove reference to discontinued service.
......
......@@ -635,9 +635,6 @@ Emacs switches the DOS display to a mode where all 16 colors can be used
for the background, so all four bits of the background color are
actually used.
@item WINDOW_GFX
Used when initializing the Sun windows system.
@item PRELOAD_WINSOCK
On MS-Windows, if you set this variable, Emacs will load and initialize
the network library at startup, instead of waiting until the first
......
2007-11-01 Dan Nicolaescu <dann@ics.uci.edu>
* MACHINES: Remove Sun windows info.
2007-10-30 Michael Olson <mwolson@gnu.org>
* NEWS: Add entry for Remember Mode.
......
......@@ -1158,17 +1158,6 @@ Sun 3, Sun 4 (sparc), Sun 386 (m68k-sun-sunos, sparc-sun-sunos, i386-sun-sunos,
src/s/sunos4-1.h to src/config.h. This problem is due to obsolete
software in the nonshared standard library.
If you want to use SunWindows, define HAVE_SUN_WINDOWS
in config.h to enable a special interface called `emacstool'.
The definition must *precede* the #include "machine.h".
System version 3.2 is required for this facility to work.
We recommend that you instead use the X window system, which
has technical advantages, is an industry standard, and is also
free software. The FSF does not support the SunWindows code;
we installed it only on the understanding we would not let it
divert our efforts from what we think is important.
If you are compiling for X windows, and the X window library was
compiled to use the 68881, then you must edit config.h according
the comments at the end of `src/m/sun3.h'.
......
......@@ -33,6 +33,8 @@ a GIF library.
** Support for systems without alloca has been removed.
** Support for Sun windows has been removed.
** The `emacstool' utility has been removed.
......
;;; sun-curs.el --- cursor definitions for Sun windows
;; Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Jeff Peck <peck@sun.com>
;; Keywords: hardware
;; This file is part of GNU Emacs.
;; GNU Emacs 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 3, or (at your option)
;; any later version.
;; GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; Code:
;;;
;;; Added some more cursors and moved the hot spots
;;; Cursor defined by 16 pairs of 16-bit numbers
;;;
;;; 9-dec-86 Jeff Peck, Sun Microsystems Inc. <peck@sun.com>
(eval-when-compile (require 'cl))
(defvar *edit-icon*)
(defvar char)
;; These are from term/sun-mouse.el
(defvar *mouse-window*)
(defvar *mouse-x*)
(defvar *mouse-y*)
(defvar menu)
(require 'sun-fns)
(eval-and-compile
(defvar sc::cursors nil "List of known cursors"))
(defmacro defcursor (name x y string)
(if (not (memq name sc::cursors))
(setq sc::cursors (cons name sc::cursors)))
(list 'defconst name (list 'vector x y string)))
;;; push should be defined in common lisp, but if not use this:
;(defmacro push (v l)
; "The ITEM is evaluated and consed onto LIST, a list-valued atom"
; (list 'setq l (list 'cons v l)))
;;;
;;; The standard default cursor
;;;
(defcursor sc:right-arrow 15 0
(concat '(0 1 0 3 0 7 0 15 0 31 0 63 0 127 0 15
0 27 0 25 0 48 0 48 0 96 0 96 0 192 0 192)))
;;(sc:set-cursor sc:right-arrow)
(defcursor sc:fat-left-arrow 0 8
(concat '(1 0 3 0 7 0 15 0 31 0 63 255 127 255 255 255
255 255 127 255 63 255 31 0 15 0 7 0 3 0 1 0)))
(defcursor sc:box 8 8
(concat '(15 252 8 4 8 4 8 4 8 4 8 4 8 4 8 4
8 132 8 4 8 4 8 4 8 4 8 4 8 4 15 252)))
(defcursor sc:hourglass 8 8
(concat "\177\376\100\002\040\014\032\070"
"\017\360\007\340\003\300\001\200"
"\001\200\002\100\005\040\010\020"
"\021\210\043\304\107\342\177\376"))
(defun sc:set-cursor (icon)
"Change the Sun mouse cursor to ICON.
If ICON is nil, switch to the system default cursor,
Otherwise, ICON should be a vector or the name of a vector of [x y 32-chars]"
(interactive "XIcon Name: ")
(if (symbolp icon) (setq icon (symbol-value icon)))
(sun-change-cursor-icon icon))
;; This does not make much sense...
(make-local-variable '*edit-icon*)
(defvar icon-edit nil)
(make-variable-buffer-local 'icon-edit)
(or (assq 'icon-edit minor-mode-alist)
(push '(icon-edit " IconEdit") minor-mode-alist))
(defun sc:edit-cursor (icon)
"convert icon to rectangle, edit, and repack"
(interactive "XIcon Name: ")
(if (not icon) (setq icon (sc::menu-choose-cursor (selected-window) 1 1)))
(if (symbolp icon) (setq icon (symbol-value icon)))
(if (get-buffer "icon-edit") (kill-buffer "icon-edit"))
(switch-to-buffer "icon-edit")
(local-set-mouse '(text right) 'sc::menu-function)
(local-set-mouse '(text left) '(sc::pic-ins-at-mouse 32))
(local-set-mouse '(text middle) '(sc::pic-ins-at-mouse 64))
(local-set-mouse '(text left middle) 'sc::hotspot)
(sc::display-icon icon)
(picture-mode)
(setq icon-edit t) ; for mode line display
)
(defun sc::pic-ins-at-mouse (char)
"Picture insert char at mouse location"
(mouse-move-point *mouse-window* (min 15 *mouse-x*) (min 15 *mouse-y*))
(move-to-column (1+ (min 15 (current-column))) t)
(delete-char -1)
(insert char)
(sc::goto-hotspot))
(defmenu sc::menu
("Cursor Menu")
("Pack & Use" sc::pack-buffer-to-cursor)
("Pack to Icon" sc::pack-buffer-to-icon
(sc::menu-choose-cursor *menu-window* *menu-x* *menu-y*))
("New Icon" call-interactively 'sc::make-cursor)
("Edit Icon" sc:edit-cursor
(sc::menu-choose-cursor *menu-window* *menu-x* *menu-y*))
("Set Cursor" sc:set-cursor
(sc::menu-choose-cursor *menu-window* *menu-x* *menu-y*))
("Reset Cursor" sc:set-cursor nil)
("Help" sc::edit-icon-help-menu)
("Quit" sc::quit-edit)
)
(defun sc::menu-function (window x y)
(sun-menu-evaluate window (1+ x) y sc::menu))
(defun sc::quit-edit ()
(interactive)
(bury-buffer (current-buffer))
(switch-to-buffer (other-buffer) 'no-record))
(defun sc::make-cursor (symbol)
(interactive "SIcon Name: ")
(eval (list 'defcursor symbol 0 0 ""))
(sc::pack-buffer-to-icon (symbol-value symbol)))
(defmenu sc::edit-icon-help-menu
("Simple Icon Editor")
("Left => CLEAR")
("Middle => SET")
("L & M => HOTSPOT")
("Right => MENU"))
(defun sc::edit-icon-help ()
(message "Left=> CLEAR Middle=> SET Left+Middle=> HOTSPOT Right=> MENU"))
(defun sc::pack-buffer-to-cursor ()
(sc::pack-buffer-to-icon *edit-icon*)
(sc:set-cursor *edit-icon*))
(defun sc::menu-choose-cursor (window x y)
"Presents a menu of cursor names, and returns one or nil"
(let ((curs sc::cursors)
(items))
(while curs
(push (sc::menu-item-for-cursor (car curs)) items)
(setq curs (cdr curs)))
(push (list "Choose Cursor") items)
(setq menu (menu-create items))
(sun-menu-evaluate window x y menu)))
(defun sc::menu-item-for-cursor (cursor)
"apply function to selected cursor"
(list (symbol-name cursor) 'quote cursor))
(defun sc::hotspot (window x y)
(aset *edit-icon* 0 x)
(aset *edit-icon* 1 y)
(sc::goto-hotspot))
(defun sc::goto-hotspot ()
(goto-line (1+ (aref *edit-icon* 1)))
(move-to-column (aref *edit-icon* 0)))
(defun sc::display-icon (icon)
(setq *edit-icon* (copy-sequence icon))
(let ((string (aref *edit-icon* 2))
(index 0))
(while (< index 32)
(let ((char (aref string index))
(bit 128))
(while (> bit 0)
(insert (sc::char-at-bit char bit))
(setq bit (lsh bit -1))))
(if (eq 1 (% index 2)) (newline))
(setq index (1+ index))))
(sc::goto-hotspot))
(defun sc::char-at-bit (char bit)
(if (> (logand char bit) 0) "@" " "))
(defun sc::pack-buffer-to-icon (icon)
"Pack 16 x 16 field into icon string"
(goto-char (point-min))
(aset icon 0 (aref *edit-icon* 0))
(aset icon 1 (aref *edit-icon* 1))
(aset icon 2 (mapconcat 'sc::pack-one-line "1234567890123456" ""))
(sc::goto-hotspot)
)
(defun sc::pack-one-line (dummy)
(let (char chr1 chr2)
(setq char 0 chr1 (mapconcat 'sc::pack-one-char "12345678" "") chr1 char)
(setq char 0 chr2 (mapconcat 'sc::pack-one-char "12345678" "") chr2 char)
(forward-line 1)
(concat (char-to-string chr1) (char-to-string chr2))
))
(defun sc::pack-one-char (dummy)
"pack following char into char, unless eolp"
(if (or (eolp) (char-equal (following-char) 32))
(setq char (lsh char 1))
(setq char (1+ (lsh char 1))))
(if (not (eolp))(forward-char)))
(provide 'sun-curs)
;;; arch-tag: 7cc861e5-e2d9-4191-b211-2baaaab54e78
;;; sun-curs.el ends here
This diff is collapsed.
This diff is collapsed.
......@@ -47,14 +47,6 @@
(setq this-command 'kill-region-and-unmark)
(set-mark-command t))
(defun select-previous-complex-command ()
"Select Previous-complex-command"
(interactive)
(if (zerop (minibuffer-depth))
(repeat-complex-command 1)
;; FIXME: this function does not seem to exist. -stef'01
(previous-complex-command 1)))
(defun rerun-prev-command ()
"Repeat Previous-complex-command."
(interactive)
......
2007-11-01 Dan Nicolaescu <dann@ics.uci.edu>
* sunfns.c: Remove file
* m/sun386.h:
* m/sun2.h:
* m/sparc.h: Remove Sun windows code.
2007-10-31 Stefan Monnier <monnier@iro.umontreal.ca>
* keyboard.c (syms_of_keyboard): Initialize the initial_kboard.
......
......@@ -64,18 +64,6 @@ NOTE-END */
#define SEGMENT_MASK (SEGSIZ - 1)
/* Arrange to link with sun windows, if requested. */
/* For details on emacstool and sunfns, see etc/SUN-SUPPORT */
/* These programs require Sun UNIX 4.2 Release 3.2 or greater */
#ifdef HAVE_SUN_WINDOWS
#define OTHER_FILES ${etcdir}emacstool
#define LIBS_MACHINE -lsuntool -lsunwindow -lpixrect
#define OBJECTS_MACHINE sunfns.o
#define SYMS_MACHINE syms_of_sunfns ()
#define PURESIZE 130000
#endif
#if !defined (__NetBSD__) && !defined (__linux__) && !defined (__OpenBSD__)
/* This really belongs in s/sun.h. */
......
......@@ -85,17 +85,5 @@ NOTE-END */
#define SEGMENT_MASK (SEGSIZ - 1)
/* Arrange to link with sun windows, if requested. */
/* For details on emacstool and sunfns, see etc/SUN-SUPPORT */
/* These programs require Sun UNIX 4.2 Release 3.2 or greater */
#ifdef HAVE_SUN_WINDOWS
#define OTHER_FILES ${libsrc}emacstool
#define LIBS_MACHINE -lsuntool -lsunwindow -lpixrect
#define OBJECTS_MACHINE sunfns.o
#define SYMS_MACHINE syms_of_sunfns ()
#define PURESIZE 132000
#endif
/* arch-tag: 543c3570-74ca-4099-aa47-db7c7b691c8e
(do not change this comment) */
......@@ -56,18 +56,6 @@ NOTE-END */
#define LIBS_TERMCAP -ltermcap
/* Arrange to link with sun windows, if requested. */
/* For details on emacstool and sunfns, see etc/SUN-SUPPORT */
/* These programs require Sun UNIX 4.2 Release 3.2 or greater */
#ifdef HAVE_SUN_WINDOWS
#define OTHER_FILES ${etcdir}emacstool
#define LIBS_MACHINE -lsuntool -lsunwindow -lpixrect
#define OBJECTS_MACHINE sunfns.o
#define SYMS_MACHINE syms_of_sunfns ()
#define PURESIZE 132000
#endif
/* Roadrunner uses 'COFF' format */
#define COFF
......
/* Functions for Sun Windows menus and selection buffer.
Copyright (C) 1987, 1999, 2001, 2002, 2003, 2004,
2005, 2006, 2007 Free Software Foundation, Inc.
This file is probably totally obsolete. In any case, the FSF is
unwilling to support it. We agreed to include it in our distribution
only on the understanding that we would spend no time at all on it.
If you have complaints about this file, send them to peck@sun.com.
If no one at Sun wants to maintain this, then consider it not
maintained at all. It would be a bad thing for the GNU project if
this file took our effort away from higher-priority things.
This file is part of GNU Emacs.
GNU Emacs 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 3, or (at your option)
any later version.
GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* Author: Jeff Peck, Sun Microsystems, Inc. <peck@sun.com>
Original ideas by David Kastan and Eric Negaard, SRI International
Major help from: Steve Greenbaum, Reasoning Systems, Inc.
<froud@kestrel.arpa>
who first discovered the Menu_Base_Kludge.
*/
/*
* Emacs Lisp-Callable functions for sunwindows
*/
#include <config.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <sunwindow/window_hs.h>
#include <suntool/selection.h>
#include <suntool/menu.h>
#include <suntool/walkmenu.h>
#include <suntool/frame.h>
#include <suntool/window.h>
#include <fcntl.h>
#undef NULL /* We don't need sunview's idea of NULL */
#include "lisp.h"
#include "window.h"
#include "buffer.h"
#include "termhooks.h"
/* conversion to/from character & frame coordinates */
/* From Gosling Emacs SunWindow driver by Chris Torek */
/* Chars to frame coords. Note that we speak in zero origin. */
#define CtoSX(cx) ((cx) * Sun_Font_Xsize)
#define CtoSY(cy) ((cy) * Sun_Font_Ysize)
/* Frame coords to chars */
#define StoCX(sx) ((sx) / Sun_Font_Xsize)
#define StoCY(sy) ((sy) / Sun_Font_Ysize)
#define CHECK_GFX(x) if((win_fd<0)&&(Fsun_window_init(),(win_fd<0)))return(x)
int win_fd = -1;
struct pixfont *Sun_Font; /* The font */
int Sun_Font_Xsize; /* Width of font */
int Sun_Font_Ysize; /* Height of font */
#define Menu_Base_Kludge /* until menu_show_using_fd gets fixed */
#ifdef Menu_Base_Kludge
static Frame Menu_Base_Frame;
static int Menu_Base_fd;
static Lisp_Object sm_kludge_string;
#endif
struct cursor CurrentCursor; /* The current cursor */
static short CursorData[16]; /* Build cursor here */
static mpr_static(CursorMpr, 16, 16, 1, CursorData);
static struct cursor NewCursor = {0, 0, PIX_SRC ^ PIX_DST, &CursorMpr};
#define RIGHT_ARROW_CURSOR /* if you want the right arrow */
#ifdef RIGHT_ARROW_CURSOR
/* The default right-arrow cursor, with XOR drawing. */
static short ArrowCursorData[16] = {
0x0001,0x0003,0x0007,0x000F,0x001F,0x003F,0x007F,0x000F,
0x001B,0x0019,0x0030,0x0030,0x0060,0x0060,0x00C0,0x00C0};
static mpr_static(ArrowCursorMpr, 16, 16, 1, ArrowCursorData);
struct cursor DefaultCursor = {15, 0, PIX_SRC ^ PIX_DST, &ArrowCursorMpr};
#else
/* The default left-arrow cursor, with XOR drawing. */
static short ArrowCursorData[16] = {
0x8000,0xC000,0xE000,0xF000,0xF800,0xFC00,0xFE00,0xF000,
0xD800,0x9800,0x0C00,0x0C00,0x0600,0x0600,0x0300,0x0300};
static mpr_static(ArrowCursorMpr, 16, 16, 1, ArrowCursorData);
struct cursor DefaultCursor = {0, 0, PIX_SRC ^ PIX_DST, &ArrowCursorMpr};
#endif
/*
* Initialize window
*/
DEFUN ("sun-window-init", Fsun_window_init, Ssun_window_init, 0, 1, 0,
doc: /* One time setup for using Sun Windows with mouse.
Unless optional argument FORCE is non-nil, is a noop after its first call.
Returns a number representing the file descriptor of the open Sun Window,
or -1 if can not open it. */)
(force)
Lisp_Object force;
{
char *cp;
static int already_initialized = 0;
if ((! already_initialized) || (!NILP(force))) {
cp = getenv("WINDOW_GFX");
if (cp != 0) win_fd = emacs_open (cp, O_RDWR, 0);
if (win_fd > 0)
{
Sun_Font = pf_default();
Sun_Font_Xsize = Sun_Font->pf_defaultsize.x;
Sun_Font_Ysize = Sun_Font->pf_defaultsize.y;
Fsun_change_cursor_icon (Qnil); /* set up the default cursor */
already_initialized = 1;
#ifdef Menu_Base_Kludge
/* Make a frame to use for putting the menu on, and get its fd. */
Menu_Base_Frame = window_create(0, FRAME,
WIN_X, 0, WIN_Y, 0,
WIN_ROWS, 1, WIN_COLUMNS, 1,
WIN_SHOW, FALSE,
FRAME_NO_CONFIRM, 1,
0);
Menu_Base_fd = (int) window_get(Menu_Base_Frame, WIN_FD);
#endif
}
}
return(make_number(win_fd));
}
/*
* Mouse sit-for (allows a shorter interval than the regular sit-for
* and can be interrupted by the mouse)
*/
DEFUN ("sit-for-millisecs", Fsit_for_millisecs, Ssit_for_millisecs, 1, 1, 0,
doc: /* Like sit-for, but ARG is milliseconds.
Perform redisplay, then wait for ARG milliseconds or until
input is available. Returns t if wait completed with no input.
Redisplay does not happen if input is available before it starts. */)
(n)
Lisp_Object n;
{
struct timeval Timeout;
int waitmask = 1;
CHECK_NUMBER (n);
Timeout.tv_sec = XINT(n) / 1000;
Timeout.tv_usec = (XINT(n) - (Timeout.tv_sec * 1000)) * 1000;
if (detect_input_pending()) return(Qnil);
redisplay_preserve_echo_area (16);
/*
* Check for queued keyboard input/mouse hits again
* (A bit screen update can take some time!)
*/
if (detect_input_pending()) return(Qnil);
select(1,&waitmask,0,0,&Timeout);
if (detect_input_pending()) return(Qnil);
return(Qt);
}
/*
* Sun sleep-for (allows a shorter interval than the regular sleep-for)
*/
DEFUN ("sleep-for-millisecs",
Fsleep_for_millisecs,
Ssleep_for_millisecs, 1, 1, 0,
doc: /* Pause, without updating display, for ARG milliseconds. */)
(n)
Lisp_Object n;
{
unsigned useconds;
CHECK_NUMBER (n);
useconds = XINT(n) * 1000;
usleep(useconds);
return(Qt);
}
DEFUN ("update-display", Fupdate_display, Supdate_display, 0, 0, 0,
doc: /* Perform redisplay. */)
()
{
redisplay_preserve_echo_area (17);
return(Qt);
}
/*
* Change the Sun mouse icon
*/
DEFUN ("sun-change-cursor-icon",
Fsun_change_cursor_icon,
Ssun_change_cursor_icon, 1, 1, 0,
doc: /* Change the Sun mouse cursor icon.
ICON is a lisp vector whose 1st element
is the X offset of the cursor hot-point, whose 2nd element is the Y offset
of the cursor hot-point and whose 3rd element is the cursor pixel data
expressed as a string. If ICON is nil then the original arrow cursor is used. */)
(Icon)
Lisp_Object Icon;
{
register unsigned char *cp;
register short *p;
register int i;
Lisp_Object X_Hot, Y_Hot, Data;
CHECK_GFX (Qnil);
/*
* If the icon is null, we just restore the DefaultCursor
*/
if (NILP(Icon))
CurrentCursor = DefaultCursor;
else {
/*
* extract the data from the vector
*/
CHECK_VECTOR (Icon);
if (XVECTOR(Icon)->size < 3) return(Qnil);
X_Hot = XVECTOR(Icon)->contents[0];
Y_Hot = XVECTOR(Icon)->contents[1];
Data = XVECTOR(Icon)->contents[2];
CHECK_NUMBER (X_Hot);
CHECK_NUMBER (Y_Hot);
CHECK_STRING (Data);
if (SCHARS (Data) != 32) return(Qnil);
/*
* Setup the new cursor
*/
NewCursor.cur_xhot = X_Hot;
NewCursor.cur_yhot = Y_Hot;
cp = SDATA (Data);
p = CursorData;
i = 16;
while(--i >= 0)
*p++ = (cp[0] << 8) | cp[1], cp += 2;
CurrentCursor = NewCursor;
}
win_setcursor(win_fd, &CurrentCursor);
return(Qt);
}
/*
* Interface for sunwindows selection
*/
static Lisp_Object Current_Selection;
static
sel_write (sel, file)
struct selection *sel;
FILE *file;
{
fwrite (SDATA (Current_Selection), sizeof (char),
sel->sel_items, file);
}
static