From 9cac72771f1bef08e7c940787f3c775473e6851e Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 29 Jan 2021 01:11:46 +0700 Subject: [PATCH] Remove various unused externs. (#315) * `cursor_mask_gc` is removed as it isn't used anywhere. * `IconPixmap` is made into a static in `xmkicon.c` rather than being defined in `xlspwin.c`. --- src/keyevent.c | 2 +- src/xbbt.c | 2 -- src/xcursor.c | 15 +-------------- src/xinit.c | 2 +- src/xlspwin.c | 8 +++----- src/xmkicon.c | 6 +++--- src/xrdopt.c | 4 +--- src/xwinman.c | 2 +- 8 files changed, 11 insertions(+), 30 deletions(-) diff --git a/src/keyevent.c b/src/keyevent.c index defb651..79f0bc2 100644 --- a/src/keyevent.c +++ b/src/keyevent.c @@ -69,7 +69,7 @@ void Mouse_hndlr(void); /* Fields mouse events from driver */ #include "dbprint.h" #if (defined(DOS) || defined(XWINDOW)) #include "devif.h" -extern DspInterface currentdsp, colordsp; +extern DspInterface currentdsp; extern IOPAGE *IOPage68K; #endif /* DOS */ diff --git a/src/xbbt.c b/src/xbbt.c index 17a93fb..60c0c90 100644 --- a/src/xbbt.c +++ b/src/xbbt.c @@ -20,8 +20,6 @@ #include "devif.h" #include "xbbtdefs.h" -extern DspInterface currentdsp; - /************************************************************************/ /* */ /* c l i p p i n g _ X b i t b l t */ diff --git a/src/xcursor.c b/src/xcursor.c index f366fba..c7cb4b1 100644 --- a/src/xcursor.c +++ b/src/xcursor.c @@ -29,9 +29,8 @@ extern IOPAGE *IOPage; extern XGCValues gcv; -extern int Bitmap_Pad, Default_Depth; -GC cursor_source_gc, cursor_mask_gc; +GC cursor_source_gc; XColor cursor_fore_xcsd, cursor_back_xcsd, xced; extern Colormap Colors; @@ -43,11 +42,6 @@ struct MXCURSOR { Cursor Xid; } *cursorlist = NULL; -/* -Cursor LispCursor[2]; -int cursor_sw; -*/ - /* Hotspot X and Y values for current cursor. SUBTRACT these from */ /* mouse positions before reporting them upward to the sysout, and */ /* ADD these to the positions we get in SetMouseXY calls. This */ @@ -168,13 +162,6 @@ void init_Xcursor(Display *display, Window window) #endif /* AIX */ , &gcv); - cursor_mask_gc = XCreateGC(display, window, - GCForeground | GCBackground | GCFunction -#ifdef AIX - | GCPlaneMask -#endif /* AIX */ - , - &gcv); XAllocNamedColor(display, Colors, "black", &cursor_fore_xcsd, &xced); XAllocNamedColor(display, Colors, "white", &cursor_back_xcsd, &xced); diff --git a/src/xinit.c b/src/xinit.c index 0e9d6f7..4052041 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -51,7 +51,7 @@ extern DLword *DisplayRegion68k; bool Lisp_Xinitialized = false; int xsync = False; -int Byte_Order, Bitmap_Bit_Order, Bitmap_Pad, Default_Depth, Display_Height, Display_Width; +int Bitmap_Pad; int LispWindowRequestedX = 0; int LispWindowRequestedY = 0; diff --git a/src/xlspwin.c b/src/xlspwin.c index 722e903..c8f7f0e 100644 --- a/src/xlspwin.c +++ b/src/xlspwin.c @@ -36,7 +36,7 @@ extern DLword *EmKbdAd068K, *EmKbdAd168K, *EmKbdAd268K, *EmKbdAd368K, *EmKbdAd46 *EmRealUtilin68K; extern DLword *CTopKeyevent; extern LispPTR *KEYBUFFERING68k; -extern int URaid_req, KBDEventFlg; +extern int URaid_req; extern DLword *DisplayRegion68k; @@ -50,9 +50,9 @@ extern char **save_argv; extern DspInterface currentdsp; -Pixmap IconPixmap; -GC CopyInvert_GC; +#if 0 extern GC cursor_source_gc; +#endif XGCValues gcv; XEvent report; @@ -318,8 +318,6 @@ void lisp_Xvideocolor(int flag) } /* end lisp_Xvideocolor */ -extern int Current_Hot_X, Current_Hot_Y; /* Cursor hotspot */ - void set_Xmouseposition(int x, int y) { int dest_x, dest_y; diff --git a/src/xmkicon.c b/src/xmkicon.c index 07356d9..ac8c67d 100644 --- a/src/xmkicon.c +++ b/src/xmkicon.c @@ -26,10 +26,10 @@ XImage IconImage; -extern int Bitmap_Pad, Default_Depth, Lisp_icon_width, Lisp_icon_height; +extern int Bitmap_Pad, Lisp_icon_width, Lisp_icon_height; extern uint8_t Lisp_icon[]; -extern Pixmap IconPixmap; +static Pixmap IconPixmap; extern char iconpixmapfile[1024]; /************************************************************************/ @@ -62,7 +62,7 @@ Pixmap make_Xicon(DspInterface dsp) IconImage.byte_order = MSBFirst; #endif /* BYTESWAP */ IconImage.bitmap_unit = 8; - IconImage.bitmap_pad = Bitmap_Pad; + IconImage.bitmap_pad = Bitmap_Pad; /* TODO: Bitmap_Pad is never initialized. */ IconImage.depth = 1; IconImage.bytes_per_line = Lisp_icon_width / 8; #if defined(X_ICON_IN_X_BITMAP_FORMAT) diff --git a/src/xrdopt.c b/src/xrdopt.c index badf436..2af56cb 100644 --- a/src/xrdopt.c +++ b/src/xrdopt.c @@ -85,12 +85,10 @@ char Window_Title[255]; char Icon_Title[255]; extern char sysout_name[]; -extern int sysout_size, for_makeinit, please_fork, Scroll_Border; +extern int sysout_size, for_makeinit, please_fork; /* diagnostic flag for sysout dumping */ /* extern int maxpages; */ -int Lisp_Border = 2; - /*** Ethernet stuff (JRB) **/ #ifdef MAIKO_ENABLE_ETHERNET extern int ether_fd; diff --git a/src/xwinman.c b/src/xwinman.c index 5f7056a..ee6b78c 100644 --- a/src/xwinman.c +++ b/src/xwinman.c @@ -30,7 +30,7 @@ int Mouse_Included = FALSE; extern Cursor WaitCursor, DefaultCursor, VertScrollCursor, VertThumbCursor, ScrollUpCursor, ScrollDownCursor, HorizScrollCursor, HorizThumbCursor, ScrollLeftCursor, ScrollRightCursor; -extern DspInterface currentdsp, colordsp; +extern DspInterface currentdsp; extern DLword *EmCursorX68K, *EmCursorY68K; extern DLword *EmMouseX68K, *EmMouseY68K, *EmKbdAd068K, *EmRealUtilin68K;