Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@
/* #define QT_GRAPHICS */ /* Qt interface */
/* #define GNOME_GRAPHICS */ /* Gnome interface */
/* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */
/* #define LISP_GRAPHICS */ /* lisp interface */

/*
* Define the default window system. This should be one that is compiled
* into your system (see defines above). Known window systems are:
*
* tty, X11, mac, amii, BeOS, Qt, Gem, Gnome
* tty, X11, mac, amii, BeOS, Qt, Gem, Gnome, lisp
*/

/* MAC also means MAC windows */
Expand Down
74 changes: 74 additions & 0 deletions include/winlisp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#ifndef WINLISP_H
#define WINLISP_H

#define LISP_VERSION "0.15.1"

#ifndef E
#define E extern
#endif

#if defined(BOS) || defined(NHSTDC)
#define DIMENSION_P int
#else
#ifdef WIDENED_PROTOTYPES
#define DIMENSION_P unsigned int
#else
#define DIMENSION_P Dimension
#endif
#endif

extern struct window_procs tty_procs;

/* ### winlisp.c ### */
E void FDECL(win_lisp_init, (int) );
E void FDECL(lisp_init_nhwindows, (int *, char **) );
E void NDECL(lisp_player_selection);
E void NDECL(lisp_askname);
E void NDECL(lisp_get_nh_event);
E void FDECL(lisp_exit_nhwindows, (const char *) );
E void FDECL(lisp_suspend_nhwindows, (const char *) );
E void NDECL(lisp_resume_nhwindows);
E winid FDECL(lisp_create_nhwindow, (int) );
E void FDECL(lisp_clear_nhwindow, (winid));
E void FDECL(lisp_display_nhwindow, (winid, BOOLEAN_P));
E void FDECL(lisp_destroy_nhwindow, (winid));
E void FDECL(lisp_curs, (winid, int, int) );
E void FDECL(lisp_status_update,
(int, genericptr_t, int, int, int, unsigned long *) );
E void FDECL(lisp_putstr, (winid, int, const char *) );
E void FDECL(lisp_display_file, (const char *, BOOLEAN_P));
E void FDECL(lisp_start_menu, (winid));
E void FDECL(lisp_add_menu, (winid, int, const ANY_P *, CHAR_P, CHAR_P, int,
const char *, BOOLEAN_P));
E void FDECL(lisp_end_menu, (winid, const char *) );
E int FDECL(lisp_select_menu, (winid, int, MENU_ITEM_P **) );
E char FDECL(lisp_message_menu, (char, int, const char *mesg));
E void NDECL(lisp_update_inventory);
E void NDECL(lisp_mark_synch);
E void NDECL(lisp_wait_synch);
#ifdef CLIPPING
E void FDECL(lisp_cliparound, (int, int) );
#endif
#ifdef POSITIONBAR
E void FDECL(lisp_update_positionbar, (char *) );
#endif
E void FDECL(lisp_print_glyph, (winid, XCHAR_P, XCHAR_P, int, int) );
E void FDECL(lisp_raw_print, (const char *) );
E void FDECL(lisp_raw_print_bold, (const char *) );
E int NDECL(lisp_nhgetch);
E int FDECL(lisp_nh_poskey, (int *, int *, int *) );
E void NDECL(lisp_nhbell);
E int NDECL(lisp_doprev_message);
E char FDECL(lisp_yn_function, (const char *, const char *, CHAR_P));
E void FDECL(lisp_getlin, (const char *, char *) );
E int NDECL(lisp_get_ext_cmd);
E void FDECL(lisp_number_pad, (int) );
E void NDECL(lisp_delay_output);

/* other defs that really should go away (they're tty specific) */
E void NDECL(lisp_start_screen);
E void NDECL(lisp_end_screen);

E void FDECL(lisp_outrip, (winid, int) );

#endif /* WINLISP_H */
2 changes: 1 addition & 1 deletion src/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4452,7 +4452,7 @@ struct ext_func_tab extcmdlist[] = {
dovampireshapechange, IFBURIED | AUTOCOMPLETE },
{ '!', "shell", "do a shell escape",
dosh_core, IFBURIED | GENERALCMD
#ifndef SHELL
#if !defined(SHELL) || defined(WIN_LISP)
| CMD_NOT_AVAILABLE
#endif /* SHELL */
},
Expand Down
2 changes: 1 addition & 1 deletion src/mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ struct obj *otmp UNUSED;
if (!(mr = nh_getenv("MAILREADER")))
mr = DEF_MAILREADER;

if (child(1)) {
if (child(0)) {
(void) execl(mr, mr, (char *) 0);
nh_terminate(EXIT_FAILURE);
}
Expand Down
7 changes: 7 additions & 0 deletions src/windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ extern struct window_procs Gnome_procs;
#ifdef MSWIN_GRAPHICS
extern struct window_procs mswin_procs;
#endif
#ifdef LISP_GRAPHICS
#include "winlisp.h"
extern struct window_procs lisp_procs;
#endif
#ifdef WINCHAIN
extern struct window_procs chainin_procs;
extern void FDECL(chainin_procs_init, (int));
Expand Down Expand Up @@ -142,6 +146,9 @@ static struct win_choices {
#ifdef MSWIN_GRAPHICS
{ &mswin_procs, 0 CHAINR(0) },
#endif
#ifdef LISP_GRAPHICS
{ &lisp_procs, win_lisp_init CHAINR(0) },
#endif
#ifdef WINCHAIN
{ &chainin_procs, chainin_procs_init, chainin_procs_chain },
{ (struct window_procs *) &chainout_procs, chainout_procs_init,
Expand Down
19 changes: 15 additions & 4 deletions sys/unix/Makefile.src
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,12 @@ WINBEOBJ =
# ../win/BeOS/NHMenuWindow.cpp ../win/BeOS/NHMapWindow.cpp tile.c
#WINBEOBJ = winbe.o NHWindow.o NHMenuWindow.o NHMapWindow.o tile.o
#
# Files for the lisp port
WINLISPSRC = ../win/lisp/winlisp.c tile.c
WINLISPOBJ = winlisp.o tile.o
#
#WINSRC = $(WINTTYSRC)
#WINOBJ = $(WINTTYOBJ)
#WINSRC = $(WINLISPSRC)
#WINOBJ = $(WINLISPOBJ)
#
# Curses - Karl Garrison, Tangles
#WINSRC = $(WINCURSESSRC)
Expand Down Expand Up @@ -326,6 +329,10 @@ WINGEMLIB = -le_gem -lgem
# libraries for BeOS
WINBELIB = -lbe
#
# libraries for lisp port
WINLISPLIB =
#WINLIB = $(WINLISPLIB)
#
# libraries for curses port
# link with ncurses
WINCURSESLIB = -lncursesw
Expand Down Expand Up @@ -473,7 +480,7 @@ SYSCXXSRC = ../sys/share/cppregex.cpp
GENCSRC = vis_tab.c #tile.c

# all windowing-system-dependent .c (for dependencies and such)
WINCSRC = $(WINTTYSRC) $(WINCURSESSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC)
WINCSRC = $(WINTTYSRC) $(WINCURSESSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) $(WINLISPSRC)
# all windowing-system-dependent .cpp (for dependencies and such)
WINCXXSRC = $(WINQTSRC) $(WINQT4SRC) $(WINBESRC)

Expand Down Expand Up @@ -885,6 +892,9 @@ load_img.o: ../win/gem/load_img.c ../include/load_img.h
$(CC) $(CFLAGS) -c -o $@ ../win/gem/load_img.c
gr_rect.o: ../win/gem/gr_rect.c ../include/gr_rect.h
$(CC) $(CFLAGS) -c -o $@ ../win/gem/gr_rect.c
winlisp.o: ../win/lisp/winlisp.c $(HACK_H) ../include/winlisp.h \
../include/func_tab.h ../include/dlb.h ../include/patchlevel.h
$(CC) $(CFLAGS) -c ../win/lisp/winlisp.c
tile.o: tile.c $(HACK_H)
cppregex.o: ../sys/share/cppregex.cpp
$(CXX) $(CXXFLAGS) -c -o $@ ../sys/share/cppregex.cpp
Expand Down Expand Up @@ -1091,7 +1101,8 @@ vision.o: vision.c $(HACK_H) ../include/vis_tab.h
weapon.o: weapon.c $(HACK_H)
were.o: were.c $(HACK_H)
wield.o: wield.c $(HACK_H)
windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h
windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h \
../include/winlisp.h
wizard.o: wizard.c $(HACK_H) ../include/qtext.h
worm.o: worm.c $(HACK_H) ../include/lev.h
worn.o: worn.c $(HACK_H)
Expand Down
13 changes: 8 additions & 5 deletions sys/unix/hints/linux
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
CFLAGS+=-DVAR_PLAYGROUND=\"$(HACKDIR)/var\"
CFLAGS+=-DCONFIG_ERROR_SECURE=FALSE
CFLAGS+=-DCURSES_GRAPHICS
CFLAGS+=-DLISP_GRAPHICS
CFLAGS+=-DPANICLOG_FMT2
CFLAGS+=-DFCMASK=0644
CFLAGS+=-DTTY_TILES_ESCCODES
Expand Down Expand Up @@ -61,13 +62,15 @@ LINK=$(CC)
# Only needed for GLIBC stack trace:
LFLAGS=-rdynamic

WINSRC = $(WINTTYSRC) $(WINCURSESSRC)
WINOBJ = $(WINTTYOBJ) $(WINCURSESOBJ)
WINLIB = $(WINTTYLIB) $(WINCURSESLIB)
WINSRC0 = $(WINTTYSRC) $(WINCURSESSRC) $(WINLISPSRC)
WINOBJ0 = $(WINTTYOBJ) $(WINCURSESOBJ) $(WINLISPOBJ)
WINLIB = $(WINTTYLIB) $(WINCURSESLIB) $(WINLISPLIB)

# if TTY_TILES_ESCCODES
WINSRC += tile.c
WINOBJ += tile.o
WINSRC0 += tile.c
WINSRC = $(sort $(WINSRC0))
WINOBJ0 += tile.o
WINOBJ = $(sort $(WINOBJ0))

WINTTYLIB=-lncursesw -ltinfo

Expand Down
7 changes: 7 additions & 0 deletions util/makedefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,10 @@ const char *build_date;
#else
statusbuf[0] = '\0';
#endif
#ifdef LISP_GRAPHICS
Strcat(statusbuf, " lisp-patch ");
Strcat(statusbuf, LISP_VERSION);
#endif

subbuf[0] = '\0';
#ifdef PORT_SUB_ID
Expand Down Expand Up @@ -1790,6 +1794,9 @@ static struct win_info window_opts[] = {
#ifdef MAC /* defunct OS 9 interface */
{ "mac", "Mac" },
#endif
#ifdef LISP_GRAPHICS
{ "lisp", "lisp" },
#endif
#ifdef AMIGA_INTUITION /* unmaintained/defunct */
{ "amii", "Amiga Intuition" },
#endif
Expand Down
Loading
Loading