1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-17 07:17:16 +00:00

Compare commits

...

13 Commits

Author SHA1 Message Date
Frank Halasz
e68fb0dd57 Trying macos-12 in buildRelease.yml since the workflow fails for macos-latest (= macos-14). 2024-11-10 23:09:12 -08:00
Frank Halasz
11978b714f Update docker/ github actions to current versions to account for deprecation of node12 - on which previous versions were based 2024-11-10 22:44:06 -08:00
Frank Halasz
d55b9e55c6 Add workflow_dispatch (in addition to push and pull_request) to build.yml triggers - for testing 2024-11-10 22:27:33 -08:00
Frank Halasz
666cceff7e Update github actions to account for deprecation of macos-12 runners and the move of ubuntu-latest runner to ubuntu-24.04. Use explicit versions instead of latest to prevent issues when latest changes unexpectedly. 2024-11-10 21:58:34 -08:00
Nick Briggs
cea720feb2 Remove tabs embedded in strings used for formatting output (#515)
Files gcfinal.c and testool.c both contain literal TAB characters embedded
in printf() format strings in an attempt to align output.
The output formatting depends on the user's simulated tab settings and
therefore may not produce the expected results.

The output formatting is rewritten to make tab characters unnecessary.
2024-10-31 13:36:31 -07:00
Nick Briggs
a3f3775c0a Add missing includes and include file if compiling with COLOR defined.
File rawcolordefs.h was completely missing.
Both llcolordefs.h and rawcolordefs.h must be included in subr.c if -DCOLOR
Make newColorizeFont8() local to rawcolor.c
2024-10-22 10:13:00 -07:00
Nick Briggs
d2d4f18ade Correct error message when debug frame extension limit exceeded 2024-10-22 09:56:06 -07:00
Nick Briggs
c3b7d1707d Switch X11 options to use shared windowTitle and cleanup icon title variable name 2024-10-18 16:21:58 -07:00
Nick Briggs
532731b716 Cleanup options variables, spelling errors, declarations
Options for requested width, height, and pixel scaling and window title can
be shared between display subsystems.

Include correct header for local sdl function definitions rather than
manually duplicating a reference for init_SDL().

Correct a typo in comments on build_lisp_map().
2024-10-18 16:07:46 -07:00
Nick Briggs
29e5b374fe Update CMakeLists.txt to suggested syntax for SDL projects. 2024-10-17 14:26:16 -07:00
Nick Briggs
0c7b1cccd4 Merge pull request #514 from Interlisp/cleanup-USHORT-bitfields
Remove USHORT and direct "unsigned short" uses in struct bitfields
2024-10-15 19:27:13 -07:00
Nick Briggs
86ba485c3e Replace "unsigned short" use for bit-fields with DLword
Where bit-fields are defined in a structure that represents a Lisp
DLword object the DLword type is now used as the base type instead of
"unsigned short".
2024-10-14 13:17:26 -07:00
Nick Briggs
b88ea87fa8 Remove USHORT definition and replace uses with DLword
USHORT unnecessarily duplicates the DLword type that represents a
single Lisp 16-bit word.
2024-10-14 12:57:02 -07:00
18 changed files with 163 additions and 149 deletions

View File

@@ -1,6 +1,6 @@
name: Build
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]
defaults:
run:
@@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12, ubuntu-22.04, ubuntu-20.04]
os: [macos-12, macos-13, macos-14, macos-15, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: Install X11 dependencies on MacOS
@@ -37,7 +37,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12, ubuntu-22.04, ubuntu-20.04]
os: [macos-12, macos-13, macos-14, macos-15, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
env:
BUILD_TYPE: Release
steps:

View File

@@ -29,7 +29,7 @@ jobs:
buildBuilder:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
# Checkout maiko

View File

@@ -84,7 +84,7 @@ jobs:
# the result of a workflow_dispatch or a workflow_call
inputs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
draft: ${{ steps.one.outputs.draft }}
force: ${{ steps.one.outputs.force }}
@@ -116,7 +116,7 @@ jobs:
sentry:
needs: inputs
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
release_not_built: ${{ steps.check.outputs.release_not_built }}
@@ -152,7 +152,7 @@ jobs:
|| needs.inputs.outputs.force == 'true'
)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
# Checkout the actions for this repo owner
@@ -185,14 +185,14 @@ jobs:
# Setup the Docker Machine Emulation environment.
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
# Setup the Docker Buildx funtion
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
# Do the Docker Build using the Dockerfile in the repository we
# checked out. Save the results in a directory under /tmp to be used
@@ -204,7 +204,7 @@ jobs:
# Dockerfile, NOT HERE IN THE WORKFLOW.
#
- name: Build Docker Image and Save It Locally
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: |
@@ -266,7 +266,7 @@ jobs:
|| needs.inputs.outputs.force == 'true'
)
runs-on: macos-latest
runs-on: macos-12
steps:
@@ -487,7 +487,7 @@ jobs:
|| needs.inputs.outputs.force == 'true'
)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
@@ -554,7 +554,7 @@ jobs:
complete:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
build_successful: ${{ steps.output.outputs.build_successful }}

View File

@@ -87,11 +87,11 @@ IF(MAIKO_DISPLAY_X11)
ENDIF()
IF(MAIKO_DISPLAY_SDL STREQUAL "2")
FIND_PACKAGE(SDL2 REQUIRED)
FIND_PACKAGE(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
SET(MAIKO_DISPLAY_SDL_DEFINITIONS
"-DSDL=2"
)
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS "${SDL2_INCLUDE_DIRS}")
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS SDL2::Headers)
SET(MAIKO_DISPLAY_SDL_LIBRARIES SDL2::SDL2)
SET(MAIKO_DISPLAY_SDL_SRCS
src/sdl.c
@@ -101,11 +101,11 @@ IF(MAIKO_DISPLAY_SDL STREQUAL "2")
)
MESSAGE("-- Configured for SDL2 display")
ELSEIF(MAIKO_DISPLAY_SDL STREQUAL "3")
FIND_PACKAGE(SDL3 REQUIRED)
FIND_PACKAGE(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
SET(MAIKO_DISPLAY_SDL_DEFINITIONS
"-DSDL=3"
)
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS "${SDL3_INCLUDE_DIRS}")
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS SDL3::Headers)
SET(MAIKO_DISPLAY_SDL_LIBRARIES SDL3::SDL3)
SET(MAIKO_DISPLAY_SDL_SRCS
src/sdl.c

View File

@@ -18,7 +18,7 @@
*/
/**********************************************************************/
#include "lispemul.h" /* for LispPTR, DLword */
#include "version.h" /* for USHORT */
#include "version.h" /* for BIGVM */
#define ADDREF 0 /* for gclookup routine. */
#define DELREF 1 /* for gclookup routine. */
@@ -131,10 +131,10 @@
#ifdef BIGVM
struct hashentry
{ /* GC hashtable entry */
unsigned short count :15;
unsigned short stackref :1;
unsigned short segnum :15;
unsigned short collision :1;
DLword count :15;
DLword stackref :1;
DLword segnum :15;
DLword collision :1;
};
struct htlinkptr
@@ -162,10 +162,10 @@ struct htoverflow
#else
struct hashentry
{ /* GC hashtable entry */
USHORT count :6;
USHORT stackref :1;
USHORT segnum :8;
USHORT collision :1;
DLword count :6;
DLword stackref :1;
DLword segnum :8;
DLword collision :1;
};
struct htlinkptr
@@ -200,10 +200,10 @@ struct htoverflow
#ifdef BIGVM
struct hashentry
{ /* GC hashtable entry */
USHORT collision :1;
USHORT segnum :15;
USHORT stackref :1;
USHORT count :15;
DLword collision :1;
DLword segnum :15;
DLword stackref :1;
DLword count :15;
};
struct htlinkptr
@@ -231,10 +231,10 @@ struct htoverflow
#else
struct hashentry
{ /* GC hashtable entry */
USHORT collision :1;
USHORT segnum :8;
USHORT stackref :1;
USHORT count :6;
DLword collision :1;
DLword segnum :8;
DLword stackref :1;
DLword count :6;
};
struct htlinkptr

View File

@@ -267,22 +267,22 @@ struct state {
/* For bit test */
typedef struct wbits {
USHORT LSB : 1;
USHORT B14 : 1;
USHORT B13 : 1;
USHORT B12 : 1;
USHORT B11 : 1;
USHORT B10 : 1;
USHORT B9 : 1;
USHORT B8 : 1;
USHORT B7 : 1;
USHORT B6 : 1;
USHORT B5 : 1;
USHORT B4 : 1;
USHORT B3 : 1;
USHORT B2 : 1;
USHORT B1 : 1;
USHORT xMSB : 1;
DLword LSB : 1;
DLword B14 : 1;
DLword B13 : 1;
DLword B12 : 1;
DLword B11 : 1;
DLword B10 : 1;
DLword B9 : 1;
DLword B8 : 1;
DLword B7 : 1;
DLword B6 : 1;
DLword B5 : 1;
DLword B4 : 1;
DLword B3 : 1;
DLword B2 : 1;
DLword B1 : 1;
DLword xMSB : 1;
} WBITS;
#define PUTBASEBIT68K(base68k, offset, bitvalue) \

8
inc/rawcolordefs.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef RAWCOLORDEFS_H
#define RAWCOLORDEFS_H 1
#include "lispemul.h" /* for LispPTR */
void C_slowbltchar(LispPTR *args);
LispPTR Colorize_Bitmap(LispPTR args[]);
void Draw_8BppColorLine(LispPTR *args);
void Uncolorize_Bitmap(LispPTR args[]);
#endif

View File

@@ -79,22 +79,22 @@ typedef struct fnhead {
} FNHEAD;
typedef struct frameex1 {
unsigned short flags : 3;
unsigned short fast : 1;
unsigned short nil2 : 1; /* not used, prev: This frame treats N-func */
unsigned short incall : 1;
unsigned short validnametable : 1;
DLword flags : 3;
DLword fast : 1;
DLword nil2 : 1; /* not used, prev: This frame treats N-func */
DLword incall : 1;
DLword validnametable : 1;
/* 0: look for FunctionHeader
1: look for NameTable on this FrameEx */
unsigned short nopush : 1;
unsigned short usecount : 8;
DLword nopush : 1;
DLword usecount : 8;
DLword alink; /* alink pointer (Low addr) */
#ifdef BIGVM
LispPTR fnheader; /* pointer to FunctionHeader (Hi2 addr) */
#else
DLword lofnheader; /* pointer to FunctionHeader (Low addr) */
unsigned short hi1fnheader : 8; /* pointer to FunctionHeader (Hi1 addr) */
unsigned short hi2fnheader : 8; /* pointer to FunctionHeader (Hi2 addr) */
DLword hi1fnheader : 8; /* pointer to FunctionHeader (Hi1 addr) */
DLword hi2fnheader : 8; /* pointer to FunctionHeader (Hi2 addr) */
#endif /* BIGVM */
DLword nextblock; /* pointer to FreeStackBlock */
DLword pc; /* Program counter */
@@ -102,23 +102,23 @@ typedef struct frameex1 {
LispPTR nametable; /* ptr to NameTable of this FrameEx (Hi2 addr) */
#else
DLword lonametable; /* ptr to NameTable of this FrameEx (Low addr) */
unsigned short hi1nametable : 8; /* ptr to NameTable of this FrameEx (Hi1 addr) */
unsigned short hi2nametable : 8; /* ptr to NameTable of this FrameEx (Hi2 addr) */
DLword hi1nametable : 8; /* ptr to NameTable of this FrameEx (Hi1 addr) */
DLword hi2nametable : 8; /* ptr to NameTable of this FrameEx (Hi2 addr) */
#endif /* BIGVM */
DLword blink; /* blink pointer (Low addr) */
DLword clink; /* clink pointer (Low addr) */
} FX;
typedef struct frameex2 {
unsigned short flags : 3;
unsigned short fast : 1;
unsigned short nil2 : 1; /* not used, prev: This frame treats N-func */
unsigned short incall : 1;
unsigned short validnametable : 1;
DLword flags : 3;
DLword fast : 1;
DLword nil2 : 1; /* not used, prev: This frame treats N-func */
DLword incall : 1;
DLword validnametable : 1;
/* 0: look for FunctionHeader
1: look for NameTable on this FrameEx */
unsigned short nopush : 1;
unsigned short usecount : 8;
DLword nopush : 1;
DLword usecount : 8;
DLword alink; /* alink pointer (Low addr) */
LispPTR fnheader; /* pointer to FunctionHeader */
DLword nextblock; /* pointer to FreeStackBlock */
@@ -135,19 +135,19 @@ typedef struct fxblock {
} FXBLOCK;
typedef struct basic_frame {
unsigned short flags : 3;
unsigned short nil : 3;
unsigned short residual : 1;
unsigned short padding : 1;
unsigned short usecnt : 8;
DLword flags : 3;
DLword nil : 3;
DLword residual : 1;
DLword padding : 1;
DLword usecnt : 8;
DLword ivar; /* stk offset of IVARs for this frame ?? */
} Bframe;
typedef struct stkword {
unsigned short flags : 3;
unsigned short nil : 5;
unsigned short usecount : 8;
DLword flags : 3;
DLword nil : 5;
DLword usecount : 8;
} StackWord;
typedef struct stack_block {
@@ -185,33 +185,33 @@ typedef struct fnhead {
unsigned nil3 : 2; /* not used */
unsigned nil2 : 2; /* not used */
#endif /* BIGVM */
unsigned short argtype : 2; /* ?? */
unsigned short byteswapped : 1; /* code was reswapped. */
unsigned short nil4 : 1; /* not used, prev: native translated? */
unsigned short fvaroffset : 8;
DLword argtype : 2; /* ?? */
DLword byteswapped : 1; /* code was reswapped. */
DLword nil4 : 1; /* not used, prev: native translated? */
DLword fvaroffset : 8;
/* DLword offset from head of NameTable */
unsigned short nlocals : 8; /* ?? */
DLword nlocals : 8; /* ?? */
DLword ntsize; /* size of NameTable */
/* NameTable of variable length is following with this structure. */
} FNHEAD;
typedef struct frameex1 {
DLword alink; /* alink pointer (Low addr) */
unsigned short usecount : 8;
unsigned short nopush : 1;
unsigned short validnametable : 1;
DLword usecount : 8;
DLword nopush : 1;
DLword validnametable : 1;
/* 0: look for FunctionHeader
1: look for NameTable on this FrameEx */
unsigned short incall : 1;
unsigned short nil2 : 1; /* not used, prev: This frame treats N-func */
unsigned short fast : 1;
unsigned short flags : 3; /* hi word */
DLword incall : 1;
DLword nil2 : 1; /* not used, prev: This frame treats N-func */
DLword fast : 1;
DLword flags : 3; /* hi word */
#ifdef BIGVM
LispPTR fnheader; /* pointer to FunctionHeader (Hi2 addr) */
#else
unsigned short hi2fnheader : 8; /* pointer to FunctionHeader (Hi2 addr) */
unsigned short hi1fnheader : 8; /* pointer to FunctionHeader (Hi1 addr) */
DLword hi2fnheader : 8; /* pointer to FunctionHeader (Hi2 addr) */
DLword hi1fnheader : 8; /* pointer to FunctionHeader (Hi1 addr) */
DLword lofnheader; /* pointer to FunctionHeader (Low addr) */
#endif /* BIGVM */
@@ -221,8 +221,8 @@ typedef struct frameex1 {
#ifdef BIGVM
LispPTR nametable; /* pointer to NameTable of this FX (Hi2 addr) */
#else
unsigned short hi2nametable : 8; /* pointer to NameTable of this FX (Hi2 addr) */
unsigned short hi1nametable : 8; /* pointer to NameTable of this FX (Hi1 addr) */
DLword hi2nametable : 8; /* pointer to NameTable of this FX (Hi2 addr) */
DLword hi1nametable : 8; /* pointer to NameTable of this FX (Hi1 addr) */
DLword lonametable; /* pointer to NameTable of this FX (Low addr) */
#endif /* BIGVM */
@@ -232,15 +232,15 @@ typedef struct frameex1 {
typedef struct frameex2 {
DLword alink; /* alink pointer (Low addr) */
unsigned short usecount : 8;
unsigned short nopush : 1;
unsigned short validnametable : 1;
DLword usecount : 8;
DLword nopush : 1;
DLword validnametable : 1;
/* 0: look for FunctionHeader
1: look for NameTable on this FrameEx */
unsigned short incall : 1;
unsigned short nil2 : 1; /* not used, prev: This frame treats N-func */
unsigned short fast : 1;
unsigned short flags : 3;
DLword incall : 1;
DLword nil2 : 1; /* not used, prev: This frame treats N-func */
DLword fast : 1;
DLword flags : 3;
LispPTR fnheader; /* pointer to FunctionHeader (swapped) */
@@ -261,18 +261,18 @@ typedef struct fxblock {
typedef struct basic_frame {
DLword ivar;
unsigned short usecnt : 8;
unsigned short padding : 1;
unsigned short residual : 1;
unsigned short nil : 3;
unsigned short flags : 3;
DLword usecnt : 8;
DLword padding : 1;
DLword residual : 1;
DLword nil : 3;
DLword flags : 3;
} Bframe;
typedef struct stkword {
USHORT usecount : 8;
USHORT nil : 5;
USHORT flags : 3;
DLword usecount : 8;
DLword nil : 5;
DLword flags : 3;
} StackWord;
typedef struct stack_block {

View File

@@ -227,9 +227,6 @@ typedef unsigned char u_char;
typedef unsigned long u_int;
typedef unsigned short u_short;
#undef UNALIGNED_FETCH_OK
typedef unsigned USHORT;
#else
typedef unsigned short USHORT;
#endif /* DOS */
/****************************************************************/

View File

@@ -589,8 +589,8 @@ void bt1(FX *startFX) {
BT_morep;
while ((fnobj->framename != ATOM_T) && (fx->alink != 11)) {
if (fnum > URMAXFXNUM - 1) {
/* Internal buf overflow,more than 100 stacks */
printf("***There are more than 100 stack frames.\n");
/* Internal buf overflow, too many stack frames */
printf("***There are more than %d stack frames.\n", URMAXFXNUM);
printf(
"If you want to continue, Uraid will smash its internal table for FX pointer. Do you "
"accept?(Y or N)\n");

View File

@@ -552,15 +552,15 @@ void printarrayblock(LispPTR base) {
printf(" Length: %d cells.\n\n", bbase->arlen);
addr = ((LispPTR *)bbase) - 20;
for (; addr < (LispPTR *)bbase; addr++) printf("%p %8x\n", (void *)addr, *addr);
printf("%p %8x <- array header\n", (void *)addr, *addr);
for (; addr < (LispPTR *)bbase; addr++) printf("%16p %8x\n", (void *)addr, *addr);
printf("%16p %8x <- array header\n", (void *)addr, *addr);
addr++;
for (; addr < (LispPTR *)bbase + 20; addr++) printf("%p %8x\n", (void *)addr, *addr);
for (; addr < (LispPTR *)bbase + 20; addr++) printf("%16p %8x\n", (void *)addr, *addr);
printf(". . .\n");
addr = ((LispPTR *)btrailer) - 20;
for (; addr < (LispPTR *)btrailer; addr++) printf("%p %8x\n", (void *)addr, *addr);
printf("%p %8x <- array trailer\n", (void *)addr, *addr);
for (; addr < (LispPTR *)btrailer; addr++) printf("%16p %8x\n", (void *)addr, *addr);
printf("%16p %8x <- array trailer\n", (void *)addr, *addr);
addr++;
for (; addr < (LispPTR *)btrailer + 20; addr++) printf("%p %8x\n", (void *)addr, *addr);
for (; addr < (LispPTR *)btrailer + 20; addr++) printf("%16p %8x\n", (void *)addr, *addr);
}

View File

@@ -243,7 +243,7 @@ int flushing = FALSE; /* see dbprint.h if set, all debug/trace printing will cal
extern DspInterface currentdsp;
#endif /* DOS || XWINDOW */
#ifdef SDL
extern int init_SDL(char*, int, int, int);
#include "sdldefs.h" /* for init_SDL */
#endif
extern const time_t MDate;
extern int nokbdflag;
@@ -324,6 +324,15 @@ extern char foregroundColorName[64];
char backgroundColorName[64] = {0};
extern char backgroundColorName[64];
#endif
char windowTitle[255] = "Medley";
extern char windowTitle[255];
int lispDisplayRequestedWidth = 1024;
extern int lispDisplayRequestedWidth;
int lispDisplayRequestedHeight = 768;
extern int lispDisplayRequestedHeight;
int pixelScale = 1;
extern int pixelScale;
/************************************************************************/
/* */
/* M A I N E N T R Y P O I N T */
@@ -338,9 +347,6 @@ int main(int argc, char *argv[])
extern int TIMER_INTERVAL;
extern fd_set LispReadFds;
long tmpint;
int width = 1024, height = 768;
int pixelscale = 1;
char *windowtitle = "Medley";
#ifdef MAIKO_ENABLE_FOREIGN_FUNCTION_INTERFACE
if (dld_find_executable(argv[0]) == 0) {
@@ -365,7 +371,6 @@ int main(int argc, char *argv[])
// arg processing changes argc/argv
if (argc > 1 && argv[1][0] != '-') {
strncpy(sysout_name_first_arg, argv[1], MAXPATHLEN);
i++;
}
@@ -468,7 +473,7 @@ int main(int argc, char *argv[])
#ifdef SDL
else if ((strcmp(argv[i], "-sc") == 0) || (strcmp(argv[i], "-SC") == 0)) {
if (argc > ++i) {
int read = sscanf(argv[i], "%dx%d", &width, &height);
int read = sscanf(argv[i], "%dx%d", &lispDisplayRequestedWidth, &lispDisplayRequestedHeight);
if(read != 2) {
(void)fprintf(stderr, "Could not parse -sc argument %s\n", argv[i]);
exit(1);
@@ -479,7 +484,7 @@ int main(int argc, char *argv[])
}
} else if ((strcmp(argv[i], "-pixelscale") == 0) || (strcmp(argv[i], "-PIXELSCALE") == 0)) {
if (argc > ++i) {
int read = sscanf(argv[i], "%d", &pixelscale);
int read = sscanf(argv[i], "%d", &pixelScale);
if(read != 1) {
(void)fprintf(stderr, "Could not parse -pixelscale argument %s\n", argv[i]);
exit(1);
@@ -491,7 +496,7 @@ int main(int argc, char *argv[])
} else if ((strcmp(argv[i], "-t") == 0) || (strcmp(argv[i], "-T") == 0)
|| (strcmp(argv[i], "-title") == 0) || (strcmp(argv[i], "-TITLE") == 0)) {
if (argc > ++i) {
windowtitle = argv[i];
strncpy(windowTitle, argv[i], sizeof(windowTitle) - 1);
} else {
(void)fprintf(stderr, "Missing argument after -title\n");
exit(1);
@@ -711,13 +716,12 @@ int main(int argc, char *argv[])
make_dsp_instance(currentdsp, 0, 0, 0, 1); /* All defaults the first time */
#endif /* DOS || XWINDOW */
#if defined(SDL)
init_SDL(windowtitle, width, height, pixelscale);
init_SDL(windowTitle, lispDisplayRequestedWidth, lispDisplayRequestedHeight, pixelScale);
#endif /* SDL */
/* Load sysout to VM space and returns real sysout_size(not 0) */
sysout_size = sysout_loader(sysout_name, sysout_size);
build_lisp_map(); /* built up map */
build_lisp_map(); /* build up map */
init_ifpage(sysout_size); /* init interface page */
init_iopage();
init_miscstats();

View File

@@ -419,7 +419,7 @@ loop:
/* */
/************************************************************************/
void newColorizeFont8(PILOTBBT *pbt, u_char backcolor, u_char forecolor, LispPTR srctype, LispPTR ope)
static void newColorizeFont8(PILOTBBT *pbt, u_char backcolor, u_char forecolor, LispPTR srctype, LispPTR ope)
{
DLword *nbase;
u_char *dbase;

View File

@@ -1565,9 +1565,7 @@ int init_SDL(char *windowtitle, int w, int h, int s) {
sdl_displayheight = h;
sdl_windowwidth = w * s;
sdl_windowheight = h * s;
int width = sdl_displaywidth;
int height = sdl_displayheight;
printf("requested width: %d, height: %d\n", width, height);
printf("requested width: %d, height: %d\n", sdl_displaywidth, sdl_displayheight);
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
printf("SDL could not be initialized. SDL_Error: %s\n", SDL_GetError());
return 1;
@@ -1608,7 +1606,8 @@ int init_SDL(char *windowtitle, int w, int h, int s) {
#endif
printf("Creating texture...\n");
sdl_texture = SDL_CreateTexture(sdl_renderer, sdl_pixelformat->format,
SDL_TEXTUREACCESS_STREAMING, width, height);
SDL_TEXTUREACCESS_STREAMING,
sdl_displaywidth, sdl_displayheight);
sdl_foreground_color = sdl_MapColorName(sdl_pixelformat,
foregroundColorName[0] ? foregroundColorName : "black");
sdl_background_color = sdl_MapColorName(sdl_pixelformat,

View File

@@ -64,6 +64,11 @@
#include "uutilsdefs.h" // for suspend_lisp, check_unix_password, unix_fu...
#include "vmemsavedefs.h" // for lisp_finish, vmem_save0
#ifdef COLOR
#include "rawcolordefs.h"
#include "llcolordefs.h"
#endif
extern LispPTR *PENDINGINTERRUPT68k;
/***********************************************************/

View File

@@ -683,9 +683,10 @@ int print_opcode(int pc, DLbyte *addr, struct fnhead *fnobj) {
extern unsigned int oplength[256];
int len = oplength[op] + 1;
printf(" 0%o (0x%x) ", pc, pc);
for (i = 0; i < len; i++) printf("%o ", 0xFF & GETBYTE(addr + i));
printf(" %s", opcode_table[op]);
printf(" 0%04o (0x%04x) ", pc, pc);
for (i = 0; i < len; i++) printf("%4o", 0xFF & GETBYTE(addr + i));
for (; i < 9; i++) printf(" ");
printf("%s", opcode_table[op]);
switch (op) {
case 0:

View File

@@ -39,8 +39,8 @@ extern DLword *DisplayRegion68k;
extern int Current_Hot_X, Current_Hot_Y; /* X Cursor hotspots */
extern char Window_Title[255];
extern char Icon_Title[255];
extern char windowTitle[255];
extern char iconTitle[255];
extern int save_argc;
extern char **save_argv;
@@ -91,8 +91,8 @@ void Create_LispWindow(DspInterface dsp)
unsigned int GravSize;
char *WT, *IT;
WT = Window_Title;
IT = Icon_Title;
WT = windowTitle;
IT = iconTitle;
GravSize = (dsp->ScrollBarWidth / 2) - dsp->InternalBorderWidth;
Col2 = dsp->Visible.width;

View File

@@ -81,14 +81,14 @@ extern char Display_Name[128];
char Display_Name[128];
extern char iconpixmapfile[1024];
char iconpixmapfile[1024];
extern char Window_Title[255];
char Window_Title[255];
extern char Icon_Title[255];
char Icon_Title[255];
extern char iconTitle[255];
char iconTitle[255];
extern char cursorColor[255];
char cursorColor[255] = {0};
extern char foregroundColorName[64];
extern char backgroundColorName[64];
extern char windowTitle[255];
extern char sysout_name_cl[];
extern char sysout_name_xrm[];
@@ -247,14 +247,14 @@ void read_Xoption(int *argc, char *argv[])
}
if (XrmGetResource(rDB, "ldex.title", "Ldex.Title", str_type, &value) == True) {
(void)strncpy(Window_Title, value.addr, value.size);
(void)strncpy(windowTitle, value.addr, sizeof(windowTitle) - 1);
} else {
(void)strcpy(Window_Title, WINDOW_NAME);
(void)strncpy(windowTitle, WINDOW_NAME, sizeof(windowTitle) - 1);
}
if (XrmGetResource(rDB, "ldex.icontitle", "Ldex.icontitle", str_type, &value) == True) {
(void)strncpy(Icon_Title, value.addr, value.size);
(void)strncpy(iconTitle, value.addr, value.size);
} else {
(void)strcpy(Icon_Title, "Medley");
(void)strcpy(iconTitle, "Medley");
}
if (XrmGetResource(rDB, "ldex.iconbitmap", "Ldex.Iconbitmap", str_type, &value) == True) {