remove X11 dependencies

This commit is contained in:
Gwenhael Le Moine 2024-09-24 14:24:20 +02:00
parent c21f364d2d
commit 4dc6b4cf42
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 20 additions and 19 deletions

View file

@ -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)

View file

@ -94,8 +94,8 @@ static char rcs_id[] = "$Id: x_func.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $";
#include <ctype.h>
#include <string.h>
#include <X11/Xlib.h> /* Main X header */
#include <X11/Intrinsic.h> /* Main Xt header */
/* #include <X11/Xlib.h> /\* Main X header *\/ */
/* #include <X11/Intrinsic.h> /\* 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();