update to SWI's latest
This commit is contained in:
parent
aba6d5741e
commit
23a7a52841
92
swi/console/Makefile.in
Normal file → Executable file
92
swi/console/Makefile.in
Normal file → Executable file
@ -2,52 +2,74 @@
|
|||||||
# Makefile for the SWI-Prolog console window.
|
# Makefile for the SWI-Prolog console window.
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
srcdir=@srcdir@
|
#
|
||||||
@VPATH@ @srcdir@
|
# default base directory for YAP installation
|
||||||
|
# (EROOT for architecture-dependent files)
|
||||||
|
#
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
ROOTDIR = $(prefix)
|
||||||
|
EROOTDIR = @exec_prefix@
|
||||||
|
#
|
||||||
|
# where YAP should look for libraries
|
||||||
|
#
|
||||||
|
LIBDIR=@libdir@/Yap
|
||||||
|
#
|
||||||
|
#
|
||||||
CC=@CC@
|
CC=@CC@
|
||||||
LDEXE=@LDEXE@
|
CPPFLAGS=@CPPFLAGS@
|
||||||
PLARCH=@PLARCH@
|
DEFS=-D_export="extern __declspec(dllexport)" -DUNICODE -D_UNICODE \
|
||||||
XLIBS=@XLIBS@
|
-D__WINDOWS__ -D__YAP_PROLOG__
|
||||||
SOEXT=@SO_EXT@
|
CFLAGS= @CFLAGS@ $(DEFS) $(CPPFLAGS) -I$(srcdir) -DRLC_VENDOR="\"YAP\""
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# You shouldn't need to change what follows.
|
||||||
|
#
|
||||||
|
INSTALL=@INSTALL@
|
||||||
|
INSTALL_DATA=@INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
||||||
|
RANLIB=@RANLIB@
|
||||||
|
AR=@AR@
|
||||||
|
VPATH=@srcdir@
|
||||||
|
srcdir=@srcdir@
|
||||||
|
|
||||||
COFLAGS=@COFLAGS@
|
SOURCES= \
|
||||||
CWFLAGS=@CWFLAGS@
|
$(srcdir)/complete.c $(srcdir)/console.c \
|
||||||
CIFLAGS=@CIFLAGS@
|
$(srcdir)/edit.c $(srcdir)/history.c \
|
||||||
CMFLAGS=@CMFLAGS@ -DUNICODE -D_UNICODE
|
$(srcdir)/menu.c
|
||||||
CPFLAGS=
|
HEADERS= \
|
||||||
CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS) $(CPFLAGS)
|
$(srcdir)/common.h $(srcdir)/console.h \
|
||||||
LDFLAGS=@LDFLAGS@ $(CPFLAGS)
|
$(srcdir)/console_i.h $(srcdir)/history.h \
|
||||||
|
$(srcdir)/menu.h
|
||||||
|
|
||||||
PLHOME=../../..
|
OBJECTS= complete.o console.o edit.o history.o menu.o
|
||||||
|
|
||||||
include $(srcdir)/../../common.mk
|
LIBS=-lgdi32 -lcomdlg32
|
||||||
|
|
||||||
OBJ= complete.o console.o edit.o history.o menu.o
|
all: ../../plterm.dll
|
||||||
OUT= $(PLHOME)/lib/$(PLARCH)/plterm.$(SOEXT)
|
|
||||||
INCLDIR=$(PLHOME)/include
|
|
||||||
HDR= $(INCLDIR)/console.h
|
|
||||||
|
|
||||||
all: $(OUT) $(HDR)
|
../../plterm.dll: libplterm.a
|
||||||
|
$(CC) $(CFLAGS) -shared -o ../../plterm.dll \
|
||||||
|
-Wl,--export-all-symbols \
|
||||||
|
-Wl,--enable-auto-import \
|
||||||
|
-Wl,--whole-archive libplterm.a \
|
||||||
|
-Wl,--no-whole-archive $(LIBS) $(LDFLAGS)
|
||||||
|
|
||||||
$(OUT): $(OBJ)
|
libplterm.a: $(OBJECTS) $(SOURCES) $(HEADERS)
|
||||||
$(CC) -shared $(COFLAGS) -o $@ -Wl,--out-implib,$@.a $(OBJ) $(XLIBS)
|
-rm -f libplterm.a
|
||||||
|
$(AR) rc libplterm.a $(OBJECTS)
|
||||||
|
$(RANLIB) libplterm.a
|
||||||
|
|
||||||
$(HDR): $(INCLDIR)
|
install:
|
||||||
|
|
||||||
$(INCLDIR):
|
clean:
|
||||||
mkdir -p $@
|
rm -f *.o *~ *.dll
|
||||||
|
|
||||||
|
.o: .c
|
||||||
|
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $@ -o $<
|
||||||
|
|
||||||
$(PLHOME)/include/console.h: $(srcdir)/console.h
|
|
||||||
cp -f $< $@
|
|
||||||
|
|
||||||
console.o: $(srcdir)/console_i.h $(srcdir)/console.h
|
console.o: $(srcdir)/console_i.h $(srcdir)/console.h
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o
|
|
||||||
rm -f *~
|
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f $(PLHOME)/lib/$(PLARCH)/plterm.$(SOEXT)
|
rm -f Makefile
|
||||||
rm -f $(PLHOME)/lib/$(PLARCH)/plterm.$(SOEXT).a
|
|
||||||
rm -f $(INCLDIR)/console.h
|
|
||||||
|
14
swi/console/console.c
Normal file → Executable file
14
swi/console/console.c
Normal file → Executable file
@ -222,7 +222,7 @@ static RlcQueue rlc_make_queue(int size);
|
|||||||
static int rlc_from_queue(RlcQueue q);
|
static int rlc_from_queue(RlcQueue q);
|
||||||
static int rlc_is_empty_queue(RlcQueue q);
|
static int rlc_is_empty_queue(RlcQueue q);
|
||||||
|
|
||||||
extern int main();
|
extern int main(int argc, char *argv[]);
|
||||||
|
|
||||||
static RlcUpdateHook _rlc_update_hook;
|
static RlcUpdateHook _rlc_update_hook;
|
||||||
static RlcTimerHook _rlc_timer_hook;
|
static RlcTimerHook _rlc_timer_hook;
|
||||||
@ -554,7 +554,7 @@ rlc_kill_wnd_proc(HWND hwnd, UINT message, UINT wParam, LONG lParam)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static TCHAR *
|
static TCHAR *
|
||||||
rlc_kill_window_class()
|
rlc_kill_window_class(void)
|
||||||
{ static TCHAR winclassname[32];
|
{ static TCHAR winclassname[32];
|
||||||
static WNDCLASS wndClass;
|
static WNDCLASS wndClass;
|
||||||
HINSTANCE instance = _rlc_hinstance;
|
HINSTANCE instance = _rlc_hinstance;
|
||||||
@ -702,7 +702,7 @@ reg_get_str(HKEY key, const TCHAR *name, TCHAR *value, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HKEY
|
static HKEY
|
||||||
reg_open_key(TCHAR **which, int create)
|
reg_open_key(TCHAR **which, int create)
|
||||||
{ HKEY key = HKEY_CURRENT_USER;
|
{ HKEY key = HKEY_CURRENT_USER;
|
||||||
DWORD disp;
|
DWORD disp;
|
||||||
@ -1019,7 +1019,7 @@ rlc_destroy(RlcData b)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
IsDownKey(code)
|
IsDownKey(int code)
|
||||||
{ short mask = GetKeyState(code);
|
{ short mask = GetKeyState(code);
|
||||||
|
|
||||||
return mask & 0x8000;
|
return mask & 0x8000;
|
||||||
@ -1449,7 +1449,7 @@ rlc_yield()
|
|||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rlc_init_word_chars()
|
rlc_init_word_chars(void)
|
||||||
{ int i;
|
{ int i;
|
||||||
|
|
||||||
for(i=0; i<CHAR_MAX; i++)
|
for(i=0; i<CHAR_MAX; i++)
|
||||||
@ -1565,7 +1565,7 @@ rlc_set_selection(RlcData b, int sl, int sc, int el, int ec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
rlc_translate_mouse(RlcData b, int x, int y, int *line, int *chr)
|
rlc_translate_mouse(RlcData b, int x, int y, int *line, int *chr)
|
||||||
{ int ln = b->window_start;
|
{ int ln = b->window_start;
|
||||||
int n = b->window_size; /* # lines */
|
int n = b->window_size; /* # lines */
|
||||||
@ -3717,7 +3717,7 @@ free_user_data(RlcData b)
|
|||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
noMemory()
|
noMemory(void)
|
||||||
{ MessageBox(NULL, _T("Not enough memory"), _T("Console"), MB_OK|MB_TASKMODAL);
|
{ MessageBox(NULL, _T("Not enough memory"), _T("Console"), MB_OK|MB_TASKMODAL);
|
||||||
|
|
||||||
ExitProcess(1);
|
ExitProcess(1);
|
||||||
|
4
swi/console/console.h
Normal file → Executable file
4
swi/console/console.h
Normal file → Executable file
@ -26,8 +26,12 @@
|
|||||||
#define _CONSOLE_H_INCLUDED
|
#define _CONSOLE_H_INCLUDED
|
||||||
|
|
||||||
#ifndef RLC_VENDOR
|
#ifndef RLC_VENDOR
|
||||||
|
#ifdef __YAP_PROLOG__
|
||||||
|
#define RLC_VENDOR _T("YAP")
|
||||||
|
#else
|
||||||
#define RLC_VENDOR TEXT("SWI")
|
#define RLC_VENDOR TEXT("SWI")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RLC_TITLE_MAX 256 /* max length of window title */
|
#define RLC_TITLE_MAX 256 /* max length of window title */
|
||||||
|
|
||||||
|
2
swi/console/edit.c
Normal file → Executable file
2
swi/console/edit.c
Normal file → Executable file
@ -634,7 +634,7 @@ read_line(rlc_console b)
|
|||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_dispatch_table()
|
init_dispatch_table(void)
|
||||||
{ static int done;
|
{ static int done;
|
||||||
|
|
||||||
if ( !done )
|
if ( !done )
|
||||||
|
2
swi/console/menu.c
Normal file → Executable file
2
swi/console/menu.c
Normal file → Executable file
@ -103,7 +103,7 @@ lookupMenuId(UINT id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
insertMenu(HMENU in, const TCHAR *label, const TCHAR *before)
|
insertMenu(HMENU in, const TCHAR *label, const TCHAR *before)
|
||||||
{ if ( !before )
|
{ if ( !before )
|
||||||
{ if ( !label )
|
{ if ( !label )
|
||||||
|
Reference in New Issue
Block a user