From 4dc6b4cf4202b204f877de876815cac7d2537068 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 24 Sep 2024 14:24:20 +0200 Subject: [PATCH] remove X11 dependencies --- Makefile | 15 ++++++++------- src/x_func.c | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 2aad1f7..d154664 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,8 @@ CFLAGS ?= -O$(OPTIM) \ LIBS = -lm -lChf -lXm -lutil -X11CFLAGS = $(shell pkg-config --cflags x11 xext) -X11LIBS = $(shell pkg-config --libs x11 xext xt) +# X11CFLAGS = $(shell pkg-config --cflags x11 xext) +# X11LIBS = $(shell pkg-config --libs x11 xext xt) SDLCFLAGS = $(shell pkg-config --cflags sdl2) SDLLIBS = $(shell pkg-config --libs sdl2) @@ -58,10 +58,11 @@ DOTOS = src/ui48_config.o \ src/ui48_sdl2.o \ src/ui48_ncurses.o \ src/ui48_emulator.o \ - src/ui48_main.o # \ - # src/x11_lcd.o \ - # src/x11.o \ - # src/x11_main.o + src/ui48_main.o +# \ +# src/x11_lcd.o \ +# src/x11.o \ +# src/x11_main.o MSFS = src/MSFs/cpu.msf \ src/MSFs/debug.msf \ @@ -111,10 +112,10 @@ override CFLAGS := -std=c11 \ $(call cc-option,-Wlogical-op) \ $(call cc-option,-Wno-unknown-warning-option) \ $(EXTRA_WARNING_FLAGS) \ - $(X11CFLAGS) \ $(SDLCFLAGS) \ $(NCURSESCFLAGS) \ $(CFLAGS) +# $(X11CFLAGS) \ override CPPFLAGS := -I./src/ -D_GNU_SOURCE=1 \ $(CPPFLAGS) diff --git a/src/x_func.c b/src/x_func.c index 390d4c0..75154e1 100644 --- a/src/x_func.c +++ b/src/x_func.c @@ -94,8 +94,8 @@ static char rcs_id[] = "$Id: x_func.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $"; #include #include -#include /* Main X header */ -#include /* Main Xt header */ +/* #include /\* Main X header *\/ */ +/* #include /\* Main Xt header *\/ */ #include "config.h" #include "machdep.h" @@ -133,7 +133,7 @@ static char* NameFromD1( void ) { Address addr = cpu_status.D1; /* Points to the IDNT body */ int len = ByteFromAddress( addr ); /* IDNT length */ - char* name = XtMalloc( len + 1 ); /* IDNT name buffer */ + char* name = malloc( len + 1 ); /* IDNT name buffer */ int c; /* Read the name; toascii() is there to avoid 'strange' characters */ @@ -300,19 +300,19 @@ static void SetupXfer( int msg, const char* def_msg, FsbContinuation cont ) debug1( DEBUG_C_TRACE, X_FUNC_I_CALLED, "SetupXfer" ); if ( CpuHaltAllowed() ) { - char* fsb_title = XtNewString( ChfGetMessage( CHF_MODULE_ID, msg, def_msg ) ); + /* char* fsb_title = XtNewString( ChfGetMessage( CHF_MODULE_ID, msg, def_msg ) ); */ - char* fsb_file = NameFromD1(); + /* char* fsb_file = NameFromD1(); */ - // ActivateFSB( fsb_title, fsb_file, cont ); + /* // ActivateFSB( fsb_title, fsb_file, cont ); */ - /* Free *before* CpuHaltRequest() because it does not return, and - ActivateFSB() copied its argument when necessary. - */ - XtFree( fsb_title ); - XtFree( fsb_file ); + /* /\* Free *before* CpuHaltRequest() because it does not return, and */ + /* ActivateFSB() copied its argument when necessary. */ + /* *\/ */ + /* XtFree( fsb_title ); */ + /* XtFree( fsb_file ); */ - ( void )CpuHaltRequest(); + /* ( void )CpuHaltRequest(); */ } else { ChfCondition X_FUNC_E_NO_HALT, CHF_ERROR ChfEnd; ChfSignal();