diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches | 247 |
1 files changed, 247 insertions, 0 deletions
diff --git a/debian/patches b/debian/patches new file mode 100644 index 0000000..685d4df --- /dev/null +++ b/debian/patches @@ -0,0 +1,247 @@ +--- cassette.man~ ++++ cassette.man +@@ -15,13 +15,6 @@ + This manual page also describes the image formats that the emulator + supports and their limitations. + +-In this release, two cassette programs are supplied. The original +-\fBcassette\fP is a C-shell script; it should work with most versions +-of /bin/csh. If you do not have /bin/csh installed, you can use +-\fBcassette.sh\fP, which is a Bourne shell script. It requires a +-modern version of the Bourne shell that supports user-defined functions, +-so it may not work on older Unix systems. +- + .SH Commands + .B pos + generates a status message including the filename being used as the +--- trs_keyboard.c~ Thu Jun 14 12:02:00 2001 ++++ trs_keyboard.c Sat Jul 14 00:39:08 2001 +@@ -673,8 +673,8 @@ + /* 0xffe6 XK_Shift_Lock */ { TK_NULL, TK_Neutral }, + /* 0xffe7 XK_Meta_L */ { TK_Clear, TK_Neutral }, + /* 0xffe8 XK_Meta_R */ { TK_Down, TK_ForceShiftPersistent }, +-/* 0xffe9 XK_Alt_L */ { TK_Clear, TK_Neutral }, +-/* 0xffea XK_Alt_R */ { TK_Down, TK_ForceShiftPersistent }, ++/* 0xffe9 XK_Alt_L */ { TK_NULL, TK_Neutral }, ++/* 0xffea XK_Alt_R */ { TK_NULL, TK_Neutral }, + /* 0xffeb XK_Super_L */ { TK_NULL, TK_Neutral }, + /* 0xffec XK_Super_R */ { TK_NULL, TK_Neutral }, + /* 0xffed XK_Hyper_L */ { TK_NULL, TK_Neutral }, +Index: trs_xinterface.c +=================================================================== +--- trs_xinterface.c (revision 69) ++++ trs_xinterface.c (working copy) +@@ -916,6 +916,23 @@ + char buf[10]; + XComposeStatus status; + ++ /* ++ * Of Enter and Leave events, track which kind we saw last. X clients ++ * like "unclutter" will sythesize an Enter event on their own. ++ * ++ * Historically, xtrs assumed that every Enter would be preceded by a ++ * Leave. When this was not the case, xtrs would clobber the global ++ * autorepeat state to off; it wrongly stored the off state because the ++ * xtrs window already had focus. ++ * ++ * This enum is tri-valued with the zero value being UNDEF because we ++ * don't want to fake a Leave event the first time we Enter; that would ++ * cause restore_repeat() to read from repeat_state before it has been ++ * initialized, possibly storing a bogus global autorepeat state. ++ */ ++ enum enter_leave_t { UNDEF, ENTER, LEAVE }; ++ static enum enter_leave_t enter_leave; ++ + if (trs_model > 1) { + (void)trs_uart_check_avail(); + } +@@ -949,6 +966,17 @@ + #if XDEBUG + debug("EnterNotify\n"); + #endif ++ if (enter_leave == ENTER) { ++ /* ++ * The last Enter/Leave event we saw was an Enter; pretend we saw a ++ * Leave event first. ++ */ ++/*#if XDEBUG*/ ++ debug("faking a LeaveNotify event first\n"); ++/*#endif*/ ++ restore_repeat(); ++ } ++ enter_leave = ENTER; + save_repeat(); + trs_xlate_keysym(0x10000); /* all keys up */ + break; +@@ -957,6 +985,7 @@ + #if XDEBUG + debug("LeaveNotify\n"); + #endif ++ enter_leave = LEAVE; + restore_repeat(); + trs_xlate_keysym(0x10000); /* all keys up */ + break; +Index: trs_xinterface.c +=================================================================== +--- trs_xinterface.c (revision 104) ++++ trs_xinterface.c (revision 106) +@@ -82,6 +82,7 @@ + static Display *display; + static int screen; + static Window window; ++static Window help_window; + static GC gc; + static GC gc_inv; + static GC gc_xor; +@@ -625,6 +626,98 @@ + #endif + } + ++/* ++ * show help ++ */ ++ ++void trs_show_help() ++{ ++ XWindowAttributes parent_attrs; ++ unsigned int help_width = 495; ++ unsigned int help_height = 365; ++ unsigned int help_xpos, help_ypos; ++ unsigned long foreground, background; ++ GC help_gc; ++ XGCValues values; ++ char *help_font_name = "9x15"; ++ XFontStruct *help_font_info; ++ int font_height; ++ int text_line; ++ int i; ++ static char *helpitems[] = { ++ "F1: Model 4/4P F1 key", ++ "F2: Model 4/4P F2 key", ++ "F3: Model 4/4P F3 key", ++ "F4: Model 4/4P caps lock key", ++ "F5: TRS-80 @ key", ++ "F6: TRS-80 0 key", ++ "F7: signal disk change in emulated floppy drive", ++ "F8: exit emulator", ++ "F9: enter zbx debugger", ++ "F10: TRS-80 reset button", ++ "", ++ "LeftArrow, Backspace, Delete: TRS-80 left arrow key", ++ "RightArrow, Tab: TRS-80 right arrow key", ++ "UpArrow: TRS-80 up arrow key", ++ "DownArrow, Linefeed: TRS-80 down arrow key", ++ "", ++ "Esc, Break: TRS-80 break key", ++ "Home, Clear, LeftAlt: TRS-80 clear key", ++ "Control: Model 4/4P control key", ++ "RightAlt: shifted TRS-80 down arrow key", ++ "", ++ "F11 (Shift+F1 on some systems) toggles this help.", ++ "See the xtrs(1) manual page for more information.", ++ NULL ++ }; ++ ++ foreground = BlackPixel(display, screen); ++ background = WhitePixel(display, screen); ++ (void) XGetWindowAttributes(display, window, &parent_attrs); ++ if ((parent_attrs.width < help_width) ++ || (parent_attrs.height < help_height)) { ++ (void) fprintf(stderr, "%s: cannot display help window; parent window" ++ " dimensions not large enough to contain it\n", ++ program_name); ++ return; ++ } ++ ++ help_xpos = (parent_attrs.width - help_width) / 2; ++ help_ypos = (parent_attrs.height - help_height) / 2; ++ help_window = XCreateSimpleWindow(display, window, help_xpos, help_ypos, ++ help_width, help_height, 1, foreground, ++ background); ++ help_font_info = XLoadQueryFont(display, help_font_name); ++ if (NULL == help_font_info) { ++ (void) fprintf(stderr, "%s: cannot display help window; cannot open" ++ " \"%s\" font\n", program_name, help_font_name); ++ return; ++ } ++ help_gc = XCreateGC(display, help_window, 0, &values); ++ XSetFont(display, help_gc, help_font_info->fid); ++ XSetBackground(display, help_gc, WhitePixel(display,screen)); ++ XSetForeground(display, help_gc, BlackPixel(display,screen)); ++ ++ font_height = help_font_info->ascent + help_font_info->descent; ++ text_line = font_height; ++ ++ XMapWindow(display, help_window); ++ ++ for (i = 0; NULL != helpitems[i]; i++) { ++ size_t len; ++ int text_width; ++ ++ len = strlen(helpitems[i]); ++ text_width = XTextWidth(help_font_info, helpitems[i], len); ++ ++ XDrawString(display, help_window, help_gc, 10, text_line, helpitems[i], ++ len); ++ text_line += font_height; ++ } ++ ++ return; ++} ++ + /* exits if something really bad happens */ + void trs_screen_init() + { +@@ -998,6 +1091,14 @@ + #endif + switch (key) { + /* Trap some function keys here */ ++ case XK_F11: ++ if (!help_window) { ++ trs_show_help(); ++ } else { ++ XUnmapWindow(display, help_window); ++ help_window = 0; ++ } ++ break; + case XK_F10: + trs_reset(0); + key = 0; +Index: xtrs.man +=================================================================== +--- xtrs.man (revision 104) ++++ xtrs.man (working copy) +@@ -68,6 +68,9 @@ + signals a disk change in the emulated floppy drives (see below). F8 + exits the program. F9 enters the debugger (zbx). F10 is the reset button. + ++F11 (or Shift+F1 on some systems) toggles an overlay window which ++summarizes the above information. ++ + In Model III, 4, and 4P modes, the left and right shift keys are + distinct; in Model I mode, they are the same. The PageUp and PageDown + keys always activate the positions that correspond to the Model +Index: Makefile.local +=================================================================== +--- Makefile.local (revision 104) ++++ Makefile.local (working copy) +@@ -50,7 +50,7 @@ + # these lines. As of xtrs 2.7, it is now OK to use this feature again. + + READLINE = -DREADLINE +-READLINELIBS = -lreadline -lncurses ++READLINELIBS = -lreadline + + # If you want to debug the emulator, use the -g flag instead: + +--- Makefile.orig 2017-03-30 09:17:41.055300129 -0400 ++++ Makefile 2017-03-30 09:17:48.455224512 -0400 +@@ -143,7 +143,7 @@ + include Makefile.local + + CFLAGS = $(DEBUG) $(ENDIAN) $(DEFAULT_ROM) $(READLINE) $(DISKDIR) $(IFLAGS) \ +- $(APPDEFAULTS) -DKBWAIT -DHAVE_SIGIO ++ $(APPDEFAULTS) -DKBWAIT + LIBS = $(XLIB) $(READLINELIBS) $(EXTRALIBS) + + ZMACFLAGS = -h |