1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-15 14:27:19 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Nick Briggs
75c668f1cd The pointers Atomspace, Spospspace, Snegspace, Arrayspace can be removed (#402)
These pointers are neither initialized nor referenced anywhere in the code.
2021-10-10 16:55:33 -07:00
Nick Briggs
a25368714f Use SHELL rather than /bin/csh when forking shells. Issue Interlisp/medley#384 (#400)
As long as $(SHELL) names an executable that appears in /etc/shells (as determined
by the getusershell() function) use that.  It used to always use /bin/csh, but some
modern distros do not ship with csh installed.  Using the user's preferred shell
seems like a better choice, while allowing the choice from /etc/shells gives some
additional flexibility.
2021-10-08 17:58:29 -07:00
Nick Briggs
3cdbccd0c7 Implement -noscroll option to ldex to disable X window scroll bars (#399)
Adds a -noscroll option, parsed as an X option, also accessible via
resource ldex*noscroll, which avoids adding the bottom and side scroll
bars and the bit-gravity control buttons to the main Lisp display window.

Unless the geometry given for the X window in which the Lisp screen is
displayed is at least as big as the Lisp screen part of the Lisp screen
(bottom, right) will not be visible.

On macOS with XQuartz, maximizing the X window will bring it to
the size of the Lisp screen (or the size of the display, whichever is smaller)
2021-09-30 10:44:37 -07:00
Nick Briggs
4d2bf13347 Add description for ethernet related flags to compile-flags 2021-09-25 15:01:21 -07:00
Nick Briggs
f7e40d1ed5 Use symbolic constants for COLOR related subrs rather than numbers
cases for subrs UNCOLORIZE-BITMAP, COLORIZE-BITMAP, COLOR-8BPPDRAWLINE (which
are not compiled into current code) can have the numbers replaced by the
symbolic constants that are now defined in subrs.h
2021-09-19 14:19:42 -07:00
Nick Briggs
9bb5a4298c Use symbolic constant for subr CAUSE-INTERRUPT switch/case rather than number (0222) 2021-09-19 14:12:47 -07:00
11 changed files with 209 additions and 188 deletions

View File

@@ -124,6 +124,17 @@ BIGATOMS True if this emulator will support 3-byte symbols, instead of
NEWBITBLT True if we want to use assembler BITBLT code, rather than
have code created inline by macro calls.
USE_DLPI True if the ethernet API is via the SysV Data Link Provider
Interface. Solaris uses DLPI.
USE_NIT True if the ethernet API is via the Network Interface Tap.
SunOS uses NIT.
PKTFILTER True if the ethernet packets are to be filtered before being
passed to the Lisp ethernet handler. Available on Sun systems
for both the NIT and DLPI cases.
bitbltsub.c:#ifdef GETBASE
testdisplay.c:#ifdef NOTUSED
uraid.c:#ifdef ETHERINT

View File

@@ -31,7 +31,6 @@
#include "lispemul.h" /* for LispPTR, DLword */
#include "miscstat.h" /* for MISCSTAT */
extern DLword *Atomspace; /* ATOMSPACE */
extern DLword *Stackspace; /* STACKSPACE*/
extern DLword *Plistspace; /* PLISTSPACE */
extern DLword *DTDspace; /* DTDSPACE */
@@ -41,8 +40,6 @@
extern DLword *AtomSpace; /* New atoms, initial set */
extern DLword *Defspace; /* DEFSPACE */
extern DLword *Valspace; /* VALSPACE */
extern DLword *Spospspace; /* POSITIVE Smallp */
extern DLword *Snegspace; /* NEGATIVE Smallp */
/* For Virtual Mem Management */
#ifdef BIGVM
@@ -82,7 +79,6 @@ extern DLword *UFNTable ;
/* FLEX STORAGES */
extern DLword *Arrayspace; /* Start of ARRAYSPACE */
extern DLword *MDS_space_bottom; /* Start of MDS (pre -2) */
extern DLword *PnCharspace ; /* Space for PN char codes (Thin only) */

View File

@@ -75,7 +75,6 @@
DLword *Lisp_world; /* lispworld */
/********** 68k address for Lisp Space **********/
DLword *Atomspace;
DLword *Stackspace;
DLword *Plistspace;
DLword *DTDspace;
@@ -85,8 +84,6 @@ DLword *Pnamespace;
DLword *AtomSpace;
DLword *Defspace;
DLword *Valspace;
DLword *Spospspace;
DLword *Snegspace;
/********** For Virtual Memory Management **********/
#ifdef BIGVM
@@ -124,7 +121,6 @@ DLword *HTcoll;
DLword *DisplayRegion;
int DisplayInitialized = NIL;
DLword *Arrayspace;
DLword *MDS_space_bottom;
DLword *PnCharspace;
struct dtd *ListpDTD;
@@ -210,7 +206,8 @@ int UnixPipeIn;
int UnixPipeOut;
int UnixPID;
int please_fork = 1;
/* disable X11 scroll bars if requested */
int noscroll = 0;
/*** STACK handle staff(Takeshi) **/
LispPTR *STACKOVERFLOW_word;
LispPTR *GuardStackAddr_word;

View File

@@ -267,7 +267,6 @@ LispPTR compare_lisp_chars(register const char *char1, register const char *char
LispPTR make_atom(const char *char_base, DLword offset, DLword length, short int non_numericp)
/* if it is NIL then these chars are treated as NUMBER */
{
extern DLword *Spospspace;
extern DLword *AtomHT;
extern DLword *Pnamespace;
extern DLword *AtomSpace;

View File

@@ -340,17 +340,17 @@ void OP_subrcall(int subr_no, int argnum) {
C_slowbltchar(args);
break;
case 0215:
case sb_UNCOLORIZE_BITMAP:
POP_SUBR_ARGS;
Uncolorize_Bitmap(args);
break;
case 0216:
case sb_COLORIZE_BITMAP:
POP_SUBR_ARGS;
Colorize_Bitmap(args);
break;
case 0217:
case sb_COLOR_8BPPDRAWLINE:
POP_SUBR_ARGS;
Draw_8BppColorLine(args);
break;
@@ -673,7 +673,7 @@ void OP_subrcall(int subr_no, int argnum) {
TopOfStack = with_symbol(args[0], args[1], args[2], args[3], args[4], args[5]);
break;
case 0222: /* Cause an interrupt to occur. Used by */
case sb_CAUSE_INTERRUPT: /* Cause an interrupt to occur. Used by */
/* Lisp INTERRUPTED to re-set an interrupt */
/* when it's uninterruptible. */
POP_SUBR_ARGS;

View File

@@ -351,7 +351,7 @@ static int FindAvailablePty(char *Slave) {
/* => byte count (<= 512), NIL (no data), or T (EOF) */
/* 10 Set Window Size, Arg2 = rows, Arg3 = columns */
/* 11 Fork PTY to Shell (obsoletes command 4) */
/* Arg1 = termtype, Arg2 = csh command string */
/* Arg1 = termtype, Arg2 = shell command string */
/* => Job # or NIL */
/* 12 Create Unix Socket */
/* Arg1 = pathname to bind socket to (string) */

View File

@@ -75,76 +75,78 @@ static inline ssize_t SAFEREAD(int f, char *b, int c)
/* */
/************************************************************************/
/* Creates a PTY connection to a csh */
/* Creates a PTY connection to a shell */
static int ForkUnixShell(int slot, char *PtySlave, char *termtype, char *shellarg)
{
int PID, SlaveFD;
struct termios tio;
char *argvec[4] = {NULL, NULL, NULL, NULL};
char *shell = NULL;
char *userShell = NULL;
PID = fork();
if (PID == 0) {
char *argvec[4];
if (0 > setsid()) /* create us a new session for tty purposes */
perror("setsid");
/* Open the slave side */
SlaveFD = open(PtySlave, O_RDWR);
if (SlaveFD == -1) {
perror("Slave Open");
perror(PtySlave);
exit(0);
}
#ifdef OS5
ioctl(SlaveFD, I_PUSH, "ptem");
ioctl(SlaveFD, I_PUSH, "ldterm");
#endif /* OS5 */
/* Set up as basic display terminal: canonical erase,
kill processing, echo, backspace to erase, echo ctrl
chars as ^x, kill line by backspacing */
tcgetattr(SlaveFD, &tio);
tio.c_lflag |= ICANON | ECHO | ECHOE | ECHOCTL | ECHOKE;
tcsetattr(SlaveFD, TCSANOW, &tio);
(void)dup2(SlaveFD, 0);
(void)dup2(SlaveFD, 1);
(void)dup2(SlaveFD, 2);
(void)close(SlaveFD);
/* set the LDESHELL variable so the underlying .cshrc can see it and
configure the shell appropriately, though this may not be so important any more */
setenv("LDESHELL", "YES", 1);
if (termtype[0] != 0) { /* set the TERM environment var */
setenv("TERM", termtype, 1);
}
/* Start up csh */
argvec[0] = "csh";
if (shellarg[0] != 0) { /* setup to run command */
argvec[1] = "-c"; /* read commands from next arg */
argvec[2] = shellarg;
argvec[3] = (char *)0;
} else
argvec[1] = (char *)0;
execv("/bin/csh", argvec);
/* Should never get here */
perror("execv");
exit(0);
} else { /* not the forked process. */
if (PID != 0) {
if (shellarg != shcom) free(shellarg);
return (PID);
}
/* Set the process group so all the kids get the bullet too
if (setpgrp(PID, PID) != 0)
perror("setpgrp"); */
if (0 > setsid()) /* create us a new session for tty purposes */
perror("setsid");
return (PID);
/* Open the slave side */
SlaveFD = open(PtySlave, O_RDWR);
if (SlaveFD == -1) {
perror("Slave Open");
perror(PtySlave);
exit(0);
}
#ifdef OS5
ioctl(SlaveFD, I_PUSH, "ptem");
ioctl(SlaveFD, I_PUSH, "ldterm");
#endif /* OS5 */
/* Set up as basic display terminal: canonical erase,
kill processing, echo, backspace to erase, echo ctrl
chars as ^x, kill line by backspacing */
tcgetattr(SlaveFD, &tio);
tio.c_lflag |= ICANON | ECHO | ECHOE | ECHOCTL | ECHOKE;
tcsetattr(SlaveFD, TCSANOW, &tio);
(void)dup2(SlaveFD, 0);
(void)dup2(SlaveFD, 1);
(void)dup2(SlaveFD, 2);
(void)close(SlaveFD);
/* set the LDESHELL variable so the underlying shell initialization can see it and
configure the shell appropriately, though this may not be so important any more */
setenv("LDESHELL", "YES", 1);
if (termtype[0] != 0) { /* set the TERM environment var */
setenv("TERM", termtype, 1);
}
/* Start up shell -- use SHELL environment variable as long as it's in /etc/shells */
shell = getenv("SHELL");
for (userShell = getusershell(); userShell != NULL && strcmp(shell, userShell) != 0; userShell = getusershell());
if (userShell == NULL) {
perror("$(SHELL) not found in /etc/shells");
exit(0);
}
/* argvec entries initialized to NULL */
argvec[0] = strrchr(userShell, '/') + 1;
if (shellarg[0] != 0) { /* setup to run command */
argvec[1] = "-c"; /* read commands from next arg */
argvec[2] = shellarg;
}
execv(userShell, argvec);
/* Should never get here */
perror("execv");
exit(0);
}
/* fork_Unix is the secondary process spawned right after LISP is

View File

@@ -51,6 +51,7 @@
extern DLword *Lisp_world;
extern char Display_Name[128];
extern DLword *DisplayRegion68k;
extern int noscroll;
bool Lisp_Xinitialized = false;
int xsync = False;
@@ -86,15 +87,16 @@ void init_Xevent(DspInterface dsp)
XSelectInput(dsp->display_id, dsp->LispWindow, dsp->EnableEventMask);
XSelectInput(dsp->display_id, dsp->DisplayWindow, dsp->EnableEventMask);
XSelectInput(dsp->display_id, dsp->HorScrollBar, BarMask);
XSelectInput(dsp->display_id, dsp->VerScrollBar, BarMask);
XSelectInput(dsp->display_id, dsp->HorScrollButton, NoEventMask);
XSelectInput(dsp->display_id, dsp->VerScrollButton, NoEventMask);
XSelectInput(dsp->display_id, dsp->NEGrav, GravMask);
XSelectInput(dsp->display_id, dsp->SEGrav, GravMask);
XSelectInput(dsp->display_id, dsp->SWGrav, GravMask);
XSelectInput(dsp->display_id, dsp->NWGrav, GravMask);
if (noscroll == 0) {
XSelectInput(dsp->display_id, dsp->HorScrollBar, BarMask);
XSelectInput(dsp->display_id, dsp->VerScrollBar, BarMask);
XSelectInput(dsp->display_id, dsp->HorScrollButton, NoEventMask);
XSelectInput(dsp->display_id, dsp->VerScrollButton, NoEventMask);
XSelectInput(dsp->display_id, dsp->NEGrav, GravMask);
XSelectInput(dsp->display_id, dsp->SEGrav, GravMask);
XSelectInput(dsp->display_id, dsp->SWGrav, GravMask);
XSelectInput(dsp->display_id, dsp->NWGrav, GravMask);
}
} /*end init_Xevent */
/************************************************************************/
@@ -237,8 +239,13 @@ DspInterface X_init(DspInterface dsp, char *lispbitmap, int width_hint, int heig
Xscreen = ScreenOfDisplay(dsp->display_id, DefaultScreen(dsp->display_id));
/* Set the scrollbar and border widths */
dsp->ScrollBarWidth = SCROLL_WIDTH;
dsp->InternalBorderWidth = DEF_BDRWIDE;
if (noscroll == 0) {
dsp->ScrollBarWidth = SCROLL_WIDTH;
dsp->InternalBorderWidth = DEF_BDRWIDE;
} else {
dsp->ScrollBarWidth = 0;
dsp->InternalBorderWidth = 0;
}
dsp->Visible.x = LispDisplayRequestedX;
dsp->Visible.y = LispDisplayRequestedY;

View File

@@ -58,6 +58,7 @@ Cursor WaitCursor, DefaultCursor, VertScrollCursor, VertThumbCursor, ScrollUpCur
extern int LispWindowRequestedX, LispWindowRequestedY;
extern unsigned LispWindowRequestedWidth, LispWindowRequestedHeight;
extern int noscroll;
/************************************************************************/
/* */
@@ -187,86 +188,87 @@ void Create_LispWindow(DspInterface dsp)
set_Xcursor(dsp, scrollup_cursor.cuimage, (int)scrollup_cursor.cuhotspotx,
(int)(15 - scrollup_cursor.cuhotspoty), &ScrollUpCursor, 0);
/********************************/
/* Make all the toolkit windows */
/********************************/
dsp->VerScrollBar = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col2,
0 - dsp->InternalBorderWidth, /* y */
dsp->ScrollBarWidth, /* width */
dsp->Visible.height, dsp->InternalBorderWidth,
BlackPixelOfScreen(screen), WhitePixelOfScreen(screen));
DefineCursor(dsp, dsp->VerScrollBar, &VertScrollCursor);
XMapWindow(dsp->display_id, dsp->VerScrollBar);
if (noscroll == 0) {
/********************************/
/* Make all the toolkit windows */
/********************************/
dsp->VerScrollBar = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col2,
0 - dsp->InternalBorderWidth, /* y */
dsp->ScrollBarWidth, /* width */
dsp->Visible.height, dsp->InternalBorderWidth,
BlackPixelOfScreen(screen), WhitePixelOfScreen(screen));
DefineCursor(dsp, dsp->VerScrollBar, &VertScrollCursor);
XMapWindow(dsp->display_id, dsp->VerScrollBar);
dsp->HorScrollBar = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow,
0 - dsp->InternalBorderWidth, Row2, /* y */
dsp->Visible.width, /* width */
dsp->ScrollBarWidth, dsp->InternalBorderWidth,
BlackPixelOfScreen(screen), WhitePixelOfScreen(screen));
DefineCursor(dsp, dsp->HorScrollBar, &HorizScrollCursor);
XChangeWindowAttributes(dsp->display_id, dsp->HorScrollBar, CWOverrideRedirect,
&Lisp_SetWinAttributes);
XMapWindow(dsp->display_id, dsp->HorScrollBar);
dsp->HorScrollBar = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow,
0 - dsp->InternalBorderWidth, Row2, /* y */
dsp->Visible.width, /* width */
dsp->ScrollBarWidth, dsp->InternalBorderWidth,
BlackPixelOfScreen(screen), WhitePixelOfScreen(screen));
DefineCursor(dsp, dsp->HorScrollBar, &HorizScrollCursor);
XChangeWindowAttributes(dsp->display_id, dsp->HorScrollBar, CWOverrideRedirect,
&Lisp_SetWinAttributes);
XMapWindow(dsp->display_id, dsp->HorScrollBar);
dsp->VerScrollButton = XCreateSimpleWindow(
dsp->display_id, dsp->VerScrollBar, 0 - dsp->InternalBorderWidth, /* x */
(int)((dsp->Visible.y * dsp->Visible.height) / dsp->Display.height), /* y */
dsp->ScrollBarWidth, /* width */
(int)((dsp->Visible.height * dsp->Visible.height) / dsp->Display.height) + 1,
dsp->InternalBorderWidth, BlackPixelOfScreen(screen), WhitePixelOfScreen(screen));
XChangeWindowAttributes(dsp->display_id, dsp->VerScrollButton, CWOverrideRedirect,
&Lisp_SetWinAttributes);
XSetWindowBackgroundPixmap(dsp->display_id, dsp->VerScrollButton, dsp->ScrollBarPixmap);
XClearWindow(dsp->display_id, dsp->VerScrollButton);
XMapWindow(dsp->display_id, dsp->VerScrollButton);
dsp->VerScrollButton = XCreateSimpleWindow(
dsp->display_id, dsp->VerScrollBar, 0 - dsp->InternalBorderWidth, /* x */
(int)((dsp->Visible.y * dsp->Visible.height) / dsp->Display.height), /* y */
dsp->ScrollBarWidth, /* width */
(int)((dsp->Visible.height * dsp->Visible.height) / dsp->Display.height) + 1,
dsp->InternalBorderWidth, BlackPixelOfScreen(screen), WhitePixelOfScreen(screen));
XChangeWindowAttributes(dsp->display_id, dsp->VerScrollButton, CWOverrideRedirect,
&Lisp_SetWinAttributes);
XSetWindowBackgroundPixmap(dsp->display_id, dsp->VerScrollButton, dsp->ScrollBarPixmap);
XClearWindow(dsp->display_id, dsp->VerScrollButton);
XMapWindow(dsp->display_id, dsp->VerScrollButton);
dsp->HorScrollButton = XCreateSimpleWindow(
dsp->display_id, dsp->HorScrollBar,
(int)((dsp->Visible.x * dsp->Visible.width) / dsp->Display.width),
0 - dsp->InternalBorderWidth, /* y */
(int)((dsp->Visible.width * dsp->Visible.width) / dsp->Display.width) + 1,
dsp->ScrollBarWidth, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XChangeWindowAttributes(dsp->display_id, dsp->HorScrollButton, CWOverrideRedirect,
&Lisp_SetWinAttributes);
XSetWindowBackgroundPixmap(dsp->display_id, dsp->HorScrollButton, dsp->ScrollBarPixmap);
XClearWindow(dsp->display_id, dsp->HorScrollButton);
XMapWindow(dsp->display_id, dsp->HorScrollButton);
dsp->HorScrollButton = XCreateSimpleWindow(
dsp->display_id, dsp->HorScrollBar,
(int)((dsp->Visible.x * dsp->Visible.width) / dsp->Display.width),
0 - dsp->InternalBorderWidth, /* y */
(int)((dsp->Visible.width * dsp->Visible.width) / dsp->Display.width) + 1,
dsp->ScrollBarWidth, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XChangeWindowAttributes(dsp->display_id, dsp->HorScrollButton, CWOverrideRedirect,
&Lisp_SetWinAttributes);
XSetWindowBackgroundPixmap(dsp->display_id, dsp->HorScrollButton, dsp->ScrollBarPixmap);
XClearWindow(dsp->display_id, dsp->HorScrollButton);
XMapWindow(dsp->display_id, dsp->HorScrollButton);
dsp->NWGrav = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col2, Row2, GravSize,
GravSize, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XSetWindowBackgroundPixmap(dsp->display_id, dsp->NWGrav, dsp->GravityOnPixmap);
DefineCursor(dsp, dsp->NWGrav, &DefaultCursor);
XChangeWindowAttributes(dsp->display_id, dsp->NWGrav, CWOverrideRedirect, &Lisp_SetWinAttributes);
XClearWindow(dsp->display_id, dsp->NWGrav);
XMapWindow(dsp->display_id, dsp->NWGrav);
dsp->NWGrav = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col2, Row2, GravSize,
GravSize, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XSetWindowBackgroundPixmap(dsp->display_id, dsp->NWGrav, dsp->GravityOnPixmap);
DefineCursor(dsp, dsp->NWGrav, &DefaultCursor);
XChangeWindowAttributes(dsp->display_id, dsp->NWGrav, CWOverrideRedirect, &Lisp_SetWinAttributes);
XClearWindow(dsp->display_id, dsp->NWGrav);
XMapWindow(dsp->display_id, dsp->NWGrav);
dsp->SEGrav = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col3, Row3, GravSize,
GravSize, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XSetWindowBackgroundPixmap(dsp->display_id, dsp->SEGrav, dsp->GravityOffPixmap);
DefineCursor(dsp, dsp->SEGrav, &DefaultCursor);
XChangeWindowAttributes(dsp->display_id, dsp->SEGrav, CWOverrideRedirect, &Lisp_SetWinAttributes);
XClearWindow(dsp->display_id, dsp->NWGrav);
XMapWindow(dsp->display_id, dsp->SEGrav);
dsp->SEGrav = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col3, Row3, GravSize,
GravSize, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XSetWindowBackgroundPixmap(dsp->display_id, dsp->SEGrav, dsp->GravityOffPixmap);
DefineCursor(dsp, dsp->SEGrav, &DefaultCursor);
XChangeWindowAttributes(dsp->display_id, dsp->SEGrav, CWOverrideRedirect, &Lisp_SetWinAttributes);
XClearWindow(dsp->display_id, dsp->NWGrav);
XMapWindow(dsp->display_id, dsp->SEGrav);
dsp->SWGrav = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col2, Row3, GravSize,
GravSize, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XSetWindowBackgroundPixmap(dsp->display_id, dsp->SWGrav, dsp->GravityOffPixmap);
DefineCursor(dsp, dsp->SWGrav, &DefaultCursor);
XClearWindow(dsp->display_id, dsp->NWGrav);
XMapWindow(dsp->display_id, dsp->SWGrav);
dsp->NEGrav = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col3, Row2, GravSize,
GravSize, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XSetWindowBackgroundPixmap(dsp->display_id, dsp->NEGrav, dsp->GravityOffPixmap);
DefineCursor(dsp, dsp->NEGrav, &DefaultCursor);
XClearWindow(dsp->display_id, dsp->NWGrav);
XMapWindow(dsp->display_id, dsp->NEGrav);
dsp->SWGrav = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col2, Row3, GravSize,
GravSize, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XSetWindowBackgroundPixmap(dsp->display_id, dsp->SWGrav, dsp->GravityOffPixmap);
DefineCursor(dsp, dsp->SWGrav, &DefaultCursor);
XClearWindow(dsp->display_id, dsp->NWGrav);
XMapWindow(dsp->display_id, dsp->SWGrav);
dsp->NEGrav = XCreateSimpleWindow(dsp->display_id, dsp->LispWindow, Col3, Row2, GravSize,
GravSize, dsp->InternalBorderWidth, BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen));
XSetWindowBackgroundPixmap(dsp->display_id, dsp->NEGrav, dsp->GravityOffPixmap);
DefineCursor(dsp, dsp->NEGrav, &DefaultCursor);
XClearWindow(dsp->display_id, dsp->NWGrav);
XMapWindow(dsp->display_id, dsp->NEGrav);
}
/* DefineCursor( dsp, dsp->DisplayWindow, &WaitCursor ); */
XLOCK;

View File

@@ -68,6 +68,7 @@ static XrmOptionDescRec opTable[] = {
{"-m", "*memory", XrmoptionSepArg, (XPointer)NULL},
{"-NF", "*NoFork", XrmoptionIsArg, (XPointer)NULL},
{"-NoFork", "*NoFork", XrmoptionIsArg, (XPointer)NULL},
{"-noscroll", "*noscroll", XrmoptionIsArg, (XPointer) NULL},
{"-INIT", "*Init", XrmoptionIsArg, (XPointer)NULL},
{"-EtherNet", "*EtherNet", XrmoptionSepArg, (XPointer)NULL},
{"-E", "*EtherNet", XrmoptionSepArg, (XPointer)NULL},
@@ -85,7 +86,7 @@ char Window_Title[255];
char Icon_Title[255];
extern char sysout_name[];
extern int sysout_size, for_makeinit, please_fork;
extern int sysout_size, for_makeinit, please_fork, noscroll;
/* diagnostic flag for sysout dumping */
/* extern int maxpages; */
@@ -173,8 +174,7 @@ void read_Xoption(int *argc, char *argv[])
}
sysout_name[0] = '\0';
if (*argc == 2) /* There was probably a sysoutarg */
{
if (*argc == 2) { /* There was probably a sysoutarg */
(void)strncpy(sysout_name, argv[1], PATH_MAX - 1);
} else if ((envname = getenv("LDESRCESYSOUT")) != NULL) {
strncpy(sysout_name, envname, PATH_MAX - 1);
@@ -184,8 +184,9 @@ void read_Xoption(int *argc, char *argv[])
envname = getenv("HOME");
(void)strcat(sysout_name, envname);
(void)strcat(sysout_name, "/lisp.virtualmem");
if (access(sysout_name, R_OK) != 0) { (void)strcat(sysout_name, ""); }
}
if (access(sysout_name, R_OK) != 0) {
sysout_name[0] = '\0';
}
/* In order to access other DB's we have to open the main display now */
@@ -278,6 +279,10 @@ void read_Xoption(int *argc, char *argv[])
please_fork = 0;
}
if (XrmGetResource(rDB, "ldex.noscroll", "Ldex.noscroll", str_type, &value) == True) {
noscroll = 1;
}
/* if (XrmGetResource(rDB,
"ldex.maxpages",
"Ldex.maxpages",

View File

@@ -30,7 +30,7 @@ int Mouse_Included = FALSE;
extern Cursor WaitCursor, DefaultCursor, VertScrollCursor, VertThumbCursor, ScrollUpCursor,
ScrollDownCursor, HorizScrollCursor, HorizThumbCursor, ScrollLeftCursor, ScrollRightCursor;
extern int noscroll;
extern DspInterface currentdsp;
extern DLword *EmCursorX68K, *EmCursorY68K;
@@ -109,33 +109,35 @@ static void lisp_Xconfigure(DspInterface dsp, int x, int y, int lspWinWidth, int
XLOCK;
XMoveResizeWindow(dsp->display_id, dsp->DisplayWindow, 0, 0, dsp->Visible.width,
dsp->Visible.height);
/* Scroll bars */
XMoveResizeWindow(dsp->display_id, dsp->VerScrollBar, Col2, 0 - dsp->InternalBorderWidth, /* y */
dsp->ScrollBarWidth, /* width */
dsp->Visible.height); /* height */
XMoveResizeWindow(dsp->display_id, dsp->HorScrollBar, 0 - dsp->InternalBorderWidth, Row2, /* y */
dsp->Visible.width, /* width */
dsp->ScrollBarWidth); /* height */
if (noscroll == 0) {
/* Scroll bars */
XMoveResizeWindow(dsp->display_id, dsp->VerScrollBar, Col2, 0 - dsp->InternalBorderWidth, /* y */
dsp->ScrollBarWidth, /* width */
dsp->Visible.height); /* height */
XMoveResizeWindow(dsp->display_id, dsp->HorScrollBar, 0 - dsp->InternalBorderWidth, Row2, /* y */
dsp->Visible.width, /* width */
dsp->ScrollBarWidth); /* height */
/* Scroll buttons */
XMoveResizeWindow(
dsp->display_id, dsp->HorScrollButton,
(int)((dsp->Visible.x * dsp->Visible.width) / dsp->Display.width), /* x */
0 - dsp->InternalBorderWidth, /* y */
(int)((dsp->Visible.width * dsp->Visible.width) / dsp->Display.width) + 1, /* width */
dsp->ScrollBarWidth); /* height */
XMoveResizeWindow(
dsp->display_id, dsp->VerScrollButton, 0 - dsp->InternalBorderWidth, /* x */
(int)((dsp->Visible.y * dsp->Visible.height) / dsp->Display.height), /* y */
dsp->ScrollBarWidth, /* width */
(int)((dsp->Visible.height * dsp->Visible.height) / dsp->Display.height) + 1); /* height */
/* Scroll buttons */
XMoveResizeWindow(
dsp->display_id, dsp->HorScrollButton,
(int)((dsp->Visible.x * dsp->Visible.width) / dsp->Display.width), /* x */
0 - dsp->InternalBorderWidth, /* y */
(int)((dsp->Visible.width * dsp->Visible.width) / dsp->Display.width) + 1, /* width */
dsp->ScrollBarWidth); /* height */
XMoveResizeWindow(
dsp->display_id, dsp->VerScrollButton, 0 - dsp->InternalBorderWidth, /* x */
(int)((dsp->Visible.y * dsp->Visible.height) / dsp->Display.height), /* y */
dsp->ScrollBarWidth, /* width */
(int)((dsp->Visible.height * dsp->Visible.height) / dsp->Display.height) + 1); /* height */
/* Gravity windows */
XMoveResizeWindow(dsp->display_id, dsp->NWGrav, Col2, Row2, GravSize, GravSize);
XMoveResizeWindow(dsp->display_id, dsp->NEGrav, Col3, Row2, GravSize, GravSize);
XMoveResizeWindow(dsp->display_id, dsp->SEGrav, Col3, Row3, GravSize, GravSize);
XMoveResizeWindow(dsp->display_id, dsp->SWGrav, Col2, Row3, GravSize, GravSize);
Scroll(dsp, dsp->Visible.x, dsp->Visible.y);
/* Gravity windows */
XMoveResizeWindow(dsp->display_id, dsp->NWGrav, Col2, Row2, GravSize, GravSize);
XMoveResizeWindow(dsp->display_id, dsp->NEGrav, Col3, Row2, GravSize, GravSize);
XMoveResizeWindow(dsp->display_id, dsp->SEGrav, Col3, Row3, GravSize, GravSize);
XMoveResizeWindow(dsp->display_id, dsp->SWGrav, Col2, Row3, GravSize, GravSize);
Scroll(dsp, dsp->Visible.x, dsp->Visible.y);
}
XFlush(dsp->display_id);
XUNLOCK(dsp);
} /* end lisp_Xconfigure */