Skip to content

Commit c8dc63d

Browse files
authored
Clean up display related variable names differing only in case (#529)
Unify the LispDisplayRequested... and lispDisplayRequested... variables from the SDL and X11 display modules. Move the storage definitions for LispDisplayRequested... to main.c leaving external references in the modules that utilize them.
1 parent 511a1b5 commit c8dc63d

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ extern char backgroundColorName[64];
327327
#endif
328328
char windowTitle[255] = "Medley";
329329
extern char windowTitle[255];
330-
int lispDisplayRequestedWidth = 1024;
331-
extern int lispDisplayRequestedWidth;
332-
int lispDisplayRequestedHeight = 768;
333-
extern int lispDisplayRequestedHeight;
330+
unsigned LispDisplayRequestedWidth = 1024, LispDisplayRequestedHeight = 768;
331+
extern unsigned LispDisplayRequestedWidth, LispDisplayRequestedHeight;
332+
int LispDisplayRequestedX = 0, LispDisplayRequestedY = 0;
333+
extern int LispDisplayRequestedX, LispDisplayRequestedY;
334334
int pixelScale = 1;
335335
extern int pixelScale;
336336

@@ -474,7 +474,7 @@ int main(int argc, char *argv[])
474474
#ifdef SDL
475475
else if ((strcmp(argv[i], "-sc") == 0) || (strcmp(argv[i], "-SC") == 0)) {
476476
if (argc > ++i) {
477-
int read = sscanf(argv[i], "%dx%d", &lispDisplayRequestedWidth, &lispDisplayRequestedHeight);
477+
int read = sscanf(argv[i], "%dx%d", &LispDisplayRequestedWidth, &LispDisplayRequestedHeight);
478478
if(read != 2) {
479479
(void)fprintf(stderr, "Could not parse -sc argument %s\n", argv[i]);
480480
exit(1);
@@ -717,7 +717,7 @@ int main(int argc, char *argv[])
717717
make_dsp_instance(currentdsp, 0, 0, 0, 1); /* All defaults the first time */
718718
#endif /* DOS || XWINDOW */
719719
#if defined(SDL)
720-
init_SDL(windowTitle, lispDisplayRequestedWidth, lispDisplayRequestedHeight, pixelScale);
720+
init_SDL(windowTitle, LispDisplayRequestedWidth, LispDisplayRequestedHeight, pixelScale);
721721
#endif /* SDL */
722722
/* Load sysout to VM space and returns real sysout_size(not 0) */
723723
sysout_size = sysout_loader(sysout_name, sysout_size);

src/xinit.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ unsigned LispWindowRequestedHeight = DEF_WIN_HEIGHT;
5050

5151
extern int LispDisplayRequestedX, LispDisplayRequestedY;
5252
extern unsigned LispDisplayRequestedWidth, LispDisplayRequestedHeight;
53-
int LispDisplayRequestedX, LispDisplayRequestedY;
54-
unsigned LispDisplayRequestedWidth, LispDisplayRequestedHeight;
5553

5654
extern Colormap Colors;
5755
Colormap Colors;

0 commit comments

Comments
 (0)