From deedcbb2fcadc2f06b4bb1c656d9ad7f5c3bdf6e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 1 Mar 2020 19:07:53 +0000 Subject: import 22.87.04 from sourceforge git-svn-id: svn://tug.org/texlive/trunk@53986 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/xdvik/CHANGES | 8 ++++ Build/source/texk/xdvik/ChangeLog | 6 +++ Build/source/texk/xdvik/configure | 24 +++++----- Build/source/texk/xdvik/configure.ac | 2 +- Build/source/texk/xdvik/dvi-draw.c | 6 +-- Build/source/texk/xdvik/events.c | 34 +++++++------- Build/source/texk/xdvik/gui/sfPath.c | 8 +++- Build/source/texk/xdvik/hypertex.c | 5 +- Build/source/texk/xdvik/main.c | 6 ++- Build/source/texk/xdvik/psgs.c | 85 ++++++++++++++-------------------- Build/source/texk/xdvik/psgs.h | 4 +- Build/source/texk/xdvik/special.c | 34 ++++---------- Build/source/texk/xdvik/string-utils.c | 2 +- Build/source/texk/xdvik/util.c | 2 +- Build/source/texk/xdvik/version.h | 2 +- Build/source/texk/xdvik/xdvi.1.in | 12 ++--- Build/source/texk/xdvik/xdvi.h | 17 +------ 17 files changed, 112 insertions(+), 145 deletions(-) (limited to 'Build/source/texk/xdvik') diff --git a/Build/source/texk/xdvik/CHANGES b/Build/source/texk/xdvik/CHANGES index 1886a612078..bd35043f486 100644 --- a/Build/source/texk/xdvik/CHANGES +++ b/Build/source/texk/xdvik/CHANGES @@ -9,6 +9,14 @@ Versions containing major changes are marked as `beta'; these may contain undetected bugs. Such versions shouldn't be used by distributors. + * 22.87.04 (2020-02-29): + + Added xdvi.desktop and a mechanism to install it (TeX Live r46347) + + Some changes in the man page (TeX Live r46371 and r50583) + + Adjust psgs.c to make it work with Ghostscript 9.27 + + Fixed bug #400 (eps picture overlays) and removed + GS_PIXMAP_CLEARING_HACK + + Updated support libraries from texlive 2020 (r53905) + * 22.87.03 (2016-04-02): + incorporated changes in xdvik itself from the TeX Live version: m4/xdvi-check-iconv.m4: Somewhat improved logic. diff --git a/Build/source/texk/xdvik/ChangeLog b/Build/source/texk/xdvik/ChangeLog index 6b5dd26b3f7..0b6898cccbd 100644 --- a/Build/source/texk/xdvik/ChangeLog +++ b/Build/source/texk/xdvik/ChangeLog @@ -1,3 +1,9 @@ +2020-03-01 Karl Berry + + * Import xdvi-22.87.04 from + https://sourceforge.net/projects/xdvi/files/xdvik, includes + changes made here. + 2019-07-22 Karl Berry * psgs.c (initGS): don't use now-gone-from-ghostscript execute diff --git a/Build/source/texk/xdvik/configure b/Build/source/texk/xdvik/configure index f3f15569bb2..ace80bf98db 100755 --- a/Build/source/texk/xdvik/configure +++ b/Build/source/texk/xdvik/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xdvik 22.87.03. +# Generated by GNU Autoconf 2.69 for xdvik 22.87.04. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xdvik' PACKAGE_TARNAME='xdvik' -PACKAGE_VERSION='22.87.03' -PACKAGE_STRING='xdvik 22.87.03' +PACKAGE_VERSION='22.87.04' +PACKAGE_STRING='xdvik 22.87.04' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1377,7 +1377,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xdvik 22.87.03 to adapt to many kinds of systems. +\`configure' configures xdvik 22.87.04 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1451,7 +1451,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xdvik 22.87.03:";; + short | recursive ) echo "Configuration of xdvik 22.87.04:";; esac cat <<\_ACEOF @@ -1606,7 +1606,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xdvik configure 22.87.03 +xdvik configure 22.87.04 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2445,7 +2445,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xdvik $as_me 22.87.03, which was +It was created by xdvik $as_me 22.87.04, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -8132,7 +8132,7 @@ fi # Define the identity of the package. PACKAGE='xdvik' - VERSION='22.87.03' + VERSION='22.87.04' cat >>confdefs.h <<_ACEOF @@ -17738,7 +17738,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -xdvik config.lt 22.87.03 +xdvik config.lt 22.87.04 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -19199,7 +19199,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -XDVIK_VERSION=22.87.03 +XDVIK_VERSION=22.87.04 ac_config_files="$ac_config_files Makefile tests/Makefile" @@ -19750,7 +19750,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xdvik $as_me 22.87.03, which was +This file was extended by xdvik $as_me 22.87.04, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19816,7 +19816,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xdvik config.status 22.87.03 +xdvik config.status 22.87.04 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/xdvik/configure.ac b/Build/source/texk/xdvik/configure.ac index 13aa33016b8..a25b166e1ab 100644 --- a/Build/source/texk/xdvik/configure.ac +++ b/Build/source/texk/xdvik/configure.ac @@ -6,7 +6,7 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -m4_define([xdvik_version], [22.87.03]) +m4_define([xdvik_version], [22.87.04]) AC_INIT([xdvik], xdvik_version, [tex-k@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([xdvi.c]) diff --git a/Build/source/texk/xdvik/dvi-draw.c b/Build/source/texk/xdvik/dvi-draw.c index e062f5f591b..c938508d00f 100644 --- a/Build/source/texk/xdvik/dvi-draw.c +++ b/Build/source/texk/xdvik/dvi-draw.c @@ -1,6 +1,6 @@ /* The rest of the code has the following copyright: -Copyright (c) 1990-2013 Paul Vojta and others +Copyright (c) 1990-2019 Paul Vojta and others Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -2282,10 +2282,6 @@ draw_page(void) #ifdef PS psp.interrupt(); - /* reset this flag too, just to make sure ... */ -# if defined(PS_GS) && GS_PIXMAP_CLEARING_HACK - had_ps_specials = False; -# endif #endif globals.ev.flags &= ~EV_MAG_GONE; #if 0 diff --git a/Build/source/texk/xdvik/events.c b/Build/source/texk/xdvik/events.c index e0709382484..729a487b0e4 100644 --- a/Build/source/texk/xdvik/events.c +++ b/Build/source/texk/xdvik/events.c @@ -1,6 +1,6 @@ /*======================================================================*\ -Copyright (c) 1990-2016 Paul Vojta and others +Copyright (c) 1990-2019 Paul Vojta and others Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -1702,6 +1702,9 @@ goto_page(int new_page, home_proc proc, Boolean force) (i.e. when accidentally changing page instead of unpausing) */ if (globals.pausing.flag) { +#if PS_GS + gs_erase_page(); +#endif XClearWindow(DISP, mane.win); } @@ -2608,6 +2611,9 @@ Act_set_shrink_factor(Widget w, XEvent *event, will survive changing shrink */ if (globals.pausing.flag) { +#if PS_GS + gs_erase_page(); +#endif XClearWindow(DISP, mane.win); } @@ -2656,6 +2662,9 @@ Act_shrink_to_dpi(Widget w, XEvent *event, /* like elsewhere */ if (globals.pausing.flag) { +#if PS_GS + gs_erase_page(); +#endif XClearWindow(DISP, mane.win); } #if 0 @@ -3142,11 +3151,11 @@ Act_set_gs_alpha(Widget w, XEvent *event, set_menu(&resource.gs_alpha, Act_set_gs_alpha, check_toggle); -#if GS_PIXMAP_CLEARING_HACK - had_ps_specials = False; /* else infinite loop and/or crash in redraw! */ -#endif /* like elsewhere */ if (globals.pausing.flag) { +#if PS_GS + gs_erase_page(); +#endif XClearWindow(DISP, mane.win); } @@ -6156,6 +6165,9 @@ redraw_page(void) #endif /* COLOR */ if (!globals.pausing.flag) { +#if PS_GS + gs_erase_page(); +#endif XClearWindow(DISP, mane.win); } @@ -6222,13 +6234,6 @@ do_pages(void) True, #endif &errflag)) { -#if PS_GS - if (resource.gs_alpha) { - /* restart gs so that user has a method for fixing GS artifacts with gs_alpha - by using `reload' (see also GS_PIXMAP_CLEARING_HACK) */ - ps_destroy(); - } -#endif statusline_info(STATUS_SHORT, "File reloaded."); } /* else { */ @@ -6264,13 +6269,6 @@ do_pages(void) can_exposures(&mane); can_exposures(&magnifier); -#if PS && PS_GS && GS_PIXMAP_CLEARING_HACK - if (had_ps_specials && !MAGNIFIER_ACTIVE) { - erasepage_gs(); - had_ps_specials = False; - } -#endif /* PS && PS_GS && GS_PIXMAP_CLEARING_HACK */ - if (globals.dvi_file.bak_fp != NULL) { TRACE_EVENTS((stderr, "redraw_page()")); redraw_page(); diff --git a/Build/source/texk/xdvik/gui/sfPath.c b/Build/source/texk/xdvik/gui/sfPath.c index 2b225a26bdb..421a8631bb1 100644 --- a/Build/source/texk/xdvik/gui/sfPath.c +++ b/Build/source/texk/xdvik/gui/sfPath.c @@ -199,13 +199,17 @@ SFreplaceText(SFDir *dir, char *str) { int len; - *(dir->path) = 0; + *(dir->path) = '\0'; len = strlen(str); + if (str[len - 1] == '/') { (void)strcat(SFcurrentPath, str); } else { - (void)strncat(SFcurrentPath, str, len - 1); + char *p = SFcurrentPath + strlen(SFcurrentPath); + + (void)memcpy(p, str, len - 1); + p[len - 1] = '\0'; } /* if (strncmp(SFcurrentPath, SFstartDir, strlen(SFstartDir))) { */ /* SFsetText(SFcurrentPath); */ diff --git a/Build/source/texk/xdvik/hypertex.c b/Build/source/texk/xdvik/hypertex.c index 736ae4b0b3c..2cb55d07406 100644 --- a/Build/source/texk/xdvik/hypertex.c +++ b/Build/source/texk/xdvik/hypertex.c @@ -902,7 +902,7 @@ add_anchor(struct htex_page_info *info, htexAnchorT type, if (str[0] != '#') { info->anchors[info->curr_cnt].a_href = xmalloc(len + 2); strcpy(info->anchors[info->curr_cnt].a_href, "#"); - strncat(info->anchors[info->curr_cnt].a_href, str, len); + memcpy(info->anchors[info->curr_cnt].a_href + 1, str, len); info->anchors[info->curr_cnt].a_href[len + 1] = '\0'; } else { @@ -924,7 +924,8 @@ add_anchor(struct htex_page_info *info, htexAnchorT type, else { info->anchors[info->curr_cnt].a_href = xmalloc(len + strlen("file:") + 1); strcpy(info->anchors[info->curr_cnt].a_href, "file:"); - strncat(info->anchors[info->curr_cnt].a_href, str, len); + memcpy(info->anchors[info->curr_cnt].a_href + strlen("file:"), + str, len); info->anchors[info->curr_cnt].a_href[len + strlen("file:")] = '\0'; } } diff --git a/Build/source/texk/xdvik/main.c b/Build/source/texk/xdvik/main.c index 644d25e9529..11814e7633a 100644 --- a/Build/source/texk/xdvik/main.c +++ b/Build/source/texk/xdvik/main.c @@ -455,8 +455,10 @@ is_good_dvi_file(const char *filename, Boolean from_history) if ((ret = REALPATH(real_filename, canonical_path)) == NULL) { /* REALPATH failed, use real_filename */ - strncpy(canonical_path, real_filename, MAXPATHLEN); - canonical_path[MAXPATHLEN] = '\0'; + size_t n = strnlen(real_filename, MAXPATHLEN); + + memcpy(canonical_path, real_filename, n); + canonical_path[n] = '\0'; ret = canonical_path; } free(real_filename); diff --git a/Build/source/texk/xdvik/psgs.c b/Build/source/texk/xdvik/psgs.c index bb70ef7dbe3..4d82c5182cb 100644 --- a/Build/source/texk/xdvik/psgs.c +++ b/Build/source/texk/xdvik/psgs.c @@ -1,6 +1,6 @@ /*========================================================================*\ -Copyright (c) 1994-2004 Paul Vojta +Copyright (c) 1994-2019 Paul Vojta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -141,10 +141,10 @@ static char *GS_outb_out; /* next byte to come out of buffer */ static int GS_write_ack; /* flag to set when done writing */ static Boolean GS_in_header; /* if we're sending a header */ static Boolean GS_in_doc; /* if we've sent header information */ +static Boolean GS_page_dirty = False; /* if we've drawn since last erase */ static int GS_ev_mask; /* events for which we'll stop */ static int GS_die_ack = 0; /* flags to set when GS dies */ static Boolean GS_timer_set; /* if there's a timer set */ -static Boolean GS_old; /* if we're using gs 2.xx */ #define GS_MASK_NORMAL EV_GE_NEWPAGE #define GS_MASK_HEADER EV_GE_PS_TOGGLE @@ -159,7 +159,6 @@ static Atom gs_colors_atom; static char line[LINELEN + 1]; static char *linepos = line; static char ackstr[] = "\347\310\376"; -static char oldstr[] = "\347\310\375"; static void gs_died(int, struct xchild *); @@ -253,10 +252,6 @@ read_from_gs(int fd, void *data) globals.ev.flags |= EV_ACK; if (globals.debug & DBG_PS) printf("Got GS ack; %d pending.\n", GS_pending); - } else if (memcmp(p, oldstr, 3) == 0) { - if (globals.debug & DBG_PS) - puts("Using old GS version."); - GS_old = True; } else continue; @@ -284,8 +279,7 @@ read_from_gs(int fd, void *data) if (linepos >= line + LINELEN) { p = line + LINELEN; if ((*--p != '\347' && *--p != '\347' && *--p != '\347') - || (memcmp(p, ackstr, line + LINELEN - p) != 0 - && memcmp(p, oldstr, line + LINELEN - p) != 0)) + || memcmp(p, ackstr, line + LINELEN - p) != 0) p = line + LINELEN; *p = '\0'; printf("gs: %s\n", line); @@ -477,7 +471,7 @@ waitack(void) } GS_die_ack = EV_ACK; - + for (;;) { /* loop because there might be stray ACKs. */ /* fprintf(stderr, "looping for stray ACKs, page %d\n", current_page); */ (void) read_events(EV_GE_ACK); @@ -578,7 +572,6 @@ initGS(void) static const char str2[] = "[0 1 1 0 0 0] concat\n" - "revision 300 lt{(\347\310\375) print flush}if\n" "stop\n%%xdvimark\n"; /* @@ -677,6 +670,7 @@ initGS(void) psp = gs_procs; GS_active = False; GS_in_header = True; + GS_page_dirty = False; GS_pending = 1; GS_mag = GS_shrink = -1; gs_xio.fd = GS_fd; @@ -740,6 +734,24 @@ gs_resume_prescan(void) psp = no_ps_procs; } +void +gs_erase_page(void) +{ + static const char str[] = " erasepage stop\n%%xdvimark\n"; + + if (!GS_page_dirty) return; + + if (globals.debug & DBG_PS) + puts("Erasing gs page"); + + if (GS_active) + XDVI_FATAL((stderr, "Internal error in gs_erase_page().")); + + ++GS_pending; + gs_send(str, sizeof(str) - 1); + waitack(); +} + static void gs_died(int status, struct xchild *child) { @@ -757,7 +769,7 @@ gs_died(int status, struct xchild *child) (void)close(child->io->fd); scanned_page = scanned_page_ps = scanned_page_reset; - GS_active = GS_in_doc = False; + GS_active = GS_in_doc = GS_page_dirty = False; GS_pending = 0; globals.ev.flags |= GS_die_ack; } @@ -783,7 +795,7 @@ destroy_gs(void) scanned_page = scanned_page_ps = scanned_page_reset; } - GS_active = GS_in_doc = False; + GS_active = GS_in_doc = GS_page_dirty = False; GS_pending = 0; } @@ -852,8 +864,12 @@ checkgs(Boolean in_header) { char buf[150]; - /* For gs 2, we pretty much have to start over to enlarge the window. */ - if ((GS_old && (globals.page.w > GS_page_w || globals.page.h > GS_page_h)) + /* + * For geometry changes, we pretty much have to restart Ghostscript. + * This is what Ghostview does (for example, in gv-3.7.4 + * this occurs in Setup() in Ghostview.c). + */ + if (globals.page.w > GS_page_w || globals.page.h > GS_page_h || GS_alpha != resource.gs_alpha) destroy_gs(); @@ -861,27 +877,6 @@ checkgs(Boolean in_header) (void)initGS(); if (!GS_active) { - /* check whether page_w or page_h have increased */ - if (globals.page.w > GS_page_w || globals.page.h > GS_page_h) { - if (globals.ev.flags & GS_ev_mask) - longjmp(globals.ev.canit, 1); - ++GS_pending; - sprintf(buf, - "H mark /HWSize [%d %d] /ImagingBBox [0 0 %d %d] " - "currentdevice putdeviceprops pop\n" - "initgraphics [0 1 1 0 0 0] concat stop\n" - "%%%%xdvimark\n", - GS_page_w = globals.page.w, - GS_page_h = globals.page.h, - globals.page.h, - globals.page.w); - gs_send(buf, strlen(buf)); - if (!in_header) { - globals.ev.flags |= EV_NEWPAGE; /* ||| redraw the page */ - longjmp(globals.ev.canit, 1); - } - } - if (magnification != GS_mag) { if (globals.ev.flags & GS_ev_mask) longjmp(globals.ev.canit, 1); @@ -962,6 +957,7 @@ drawraw_gs(const char *cp) return; if (globals.debug & DBG_PS) printf("raw ps sent to context: %s\n", cp); + GS_page_dirty = True; gs_send(cp, strlen(cp)); gs_send("\n", 1); } @@ -996,6 +992,7 @@ drawfile_gs(const char *cp, FILE *f) if (globals.debug & DBG_PS) printf("expanded path: |%s|\n", cp); + GS_page_dirty = True; gs_send("(", 1); gs_send(cp, strlen(cp)); gs_send(")run\n", 5); @@ -1078,21 +1075,7 @@ newdoc_gs(void) GS_mag = GS_shrink = -1; GS_in_doc = False; - if (!GS_old) GS_page_w = GS_page_h = 0; - } -} - -void erasepage_gs(void) -{ - /* In buffered mode, gs has no way of knowing that the screen has been - erased. Clear the gs window buffer with an erasepage command. */ - - if (resource.gs_alpha && GS_pid > 0 && !GS_active) { - if (globals.debug & DBG_PS) - puts("erasing page!"); - beginheader_gs(); - drawraw_gs("erasepage"); - endheader_gs(); + GS_page_w = GS_page_h = 0; } } diff --git a/Build/source/texk/xdvik/psgs.h b/Build/source/texk/xdvik/psgs.h index 9c7cb44b319..6b0764554e6 100644 --- a/Build/source/texk/xdvik/psgs.h +++ b/Build/source/texk/xdvik/psgs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2004 the xdvik development team + * Copyright (c) 2002-2019 the xdvik development team * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -26,6 +26,6 @@ extern Boolean initGS(void); extern void gs_resume_prescan(void); extern void restart_gs(void); -extern void erasepage_gs(void); +extern void gs_erase_page(void); #endif /* PSGS_H_ */ diff --git a/Build/source/texk/xdvik/special.c b/Build/source/texk/xdvik/special.c index 491c583b953..e971822179e 100644 --- a/Build/source/texk/xdvik/special.c +++ b/Build/source/texk/xdvik/special.c @@ -1,6 +1,6 @@ /*========================================================================*\ -Copyright (c) 1990-2016 Paul Vojta and others +Copyright (c) 1990-2019 Paul Vojta and others Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -107,14 +107,6 @@ This module is based on prior work as noted below. */ Boolean have_raw_postscript = False; -# if PS_GS && GS_PIXMAP_CLEARING_HACK -/* - Flag whether this page contains PS material; - used to flush the GS buffer -*/ -Boolean had_ps_specials = False; -# endif /* PS_GS && GS_PIXMAP_CLEARING_HACK */ - #endif @@ -2551,26 +2543,18 @@ applicationDoSpecial(char *cp, size_t len) warned_hypertex_too_old = True; } } - else { - /* When not ignoring SDict entries, the distiller and pagecolor - code in lshort.dvi from CTAN:info/lshort/russian/lshrtdvi.zip - causes a failed assertion for 'color_bot_size > 0' in dvi-draw.c; - there's something wrong with the parsing order/event handling here - (see bug #856547). - But we also don't want those entries to trigger erasepage_gs(), so - it's correct to ignore them here. - */ -#if PS_GS && GS_PIXMAP_CLEARING_HACK - had_ps_specials = True; -#endif - } + /* When not ignoring SDict entries, the distiller and pagecolor + code in lshort.dvi from CTAN:info/lshort/russian/lshrtdvi.zip + causes a failed assertion for 'color_bot_size > 0' in dvi-draw.c; + there's something wrong with the parsing order/event handling here + (see bug #856547). + But we also don't want those entries to trigger erasepage_gs() + [deleted in r3810], so it's correct to ignore them here. + */ return; } if (memicmp(cp, "psfile", 6) == 0 && (p = endofcommand(cp + 6)) != NULL) { epsf_special(p); -#if PS_GS && GS_PIXMAP_CLEARING_HACK - had_ps_specials = True; -#endif return; } if (memicmp(cp, "html:", 5) == 0) { diff --git a/Build/source/texk/xdvik/string-utils.c b/Build/source/texk/xdvik/string-utils.c index 1e9bd5e8ef7..769b2ac8ccc 100644 --- a/Build/source/texk/xdvik/string-utils.c +++ b/Build/source/texk/xdvik/string-utils.c @@ -703,7 +703,7 @@ replace_extension(const char *fname, const char *extension, size_t len = strlen(extension); if (len + (sep - fname) > buf_len) return; - strncpy(buf, fname, sep - fname); + memcpy(buf, fname, sep - fname); strcpy(buf + (sep - fname), extension); } return; diff --git a/Build/source/texk/xdvik/util.c b/Build/source/texk/xdvik/util.c index be5a9c28e0a..958a99c4788 100644 --- a/Build/source/texk/xdvik/util.c +++ b/Build/source/texk/xdvik/util.c @@ -1172,7 +1172,7 @@ parse_debugging_string(const char *arg) curr = last = arg; - while (curr != '\0') { + while (*curr != '\0') { Boolean matched = False; while (isspace((int)*curr)) diff --git a/Build/source/texk/xdvik/version.h b/Build/source/texk/xdvik/version.h index 068eff89cb2..aff3bf3cab3 100644 --- a/Build/source/texk/xdvik/version.h +++ b/Build/source/texk/xdvik/version.h @@ -2,7 +2,7 @@ #ifndef VERSION_H_ #define VERSION_H_ -#define XDVI_VERSION "22.87.03" +#define XDVI_VERSION "22.87.04" #ifdef MOTIF #define XDVI_GUI "(Motif toolkit)" diff --git a/Build/source/texk/xdvik/xdvi.1.in b/Build/source/texk/xdvik/xdvi.1.in index 72228c0aab9..d7da80723c8 100644 --- a/Build/source/texk/xdvik/xdvi.1.in +++ b/Build/source/texk/xdvik/xdvi.1.in @@ -2035,7 +2035,7 @@ Moves page down two thirds of a window-full. With a float argument to ``down'', moves down the corresponding fraction of a window-full. .\" Therefore, a more .\" ``smooth'' scrolling using the ``Up'' and ``Down'' keys can be -.\" achieved by the the following setting: +.\" achieved by the following setting: .\" .sp .\" xdvi.mainTranslations: #override\e .\" .br @@ -3224,7 +3224,7 @@ via the mechanism, as a single argument after the `!'. Any arguments listed in the .B Dvips options -field are segmented at whitespaces and passed as separate arguments to dvips. +field are segmented at whitespace and passed as separate arguments to dvips. If you e.g. want to print the file 2-up, you should enter the following string into the .B Printer @@ -4342,6 +4342,7 @@ directives). the .B Kpathsea documentation, +.BR https://ctan.org/pkg/xdvi/ . and the Xdvik home page at .BR http://xdvi.sourceforge.net/ . .SH AUTHORS @@ -4356,10 +4357,9 @@ is Paul Vojta, U.C. Berkeley. .PP Code for the xdvik variant has been contributed by many people, whose names are scattered across the -source files. Xdvik is hosted on -.B CTAN:dviware/xdvik -and on SourceForge; for the most up-to-date information, please -visit: +source files. +.PP +For the most up-to-date information, please visit: .PP .B http://xdvi.sourceforge.net .PP diff --git a/Build/source/texk/xdvik/xdvi.h b/Build/source/texk/xdvik/xdvi.h index 3b0600cc8ea..41cc3fcdfda 100644 --- a/Build/source/texk/xdvik/xdvi.h +++ b/Build/source/texk/xdvik/xdvi.h @@ -1,6 +1,6 @@ /*========================================================================*\ -Copyright (c) 1990-2014 Paul Vojta +Copyright (c) 1990-2019 Paul Vojta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -90,18 +90,6 @@ in xdvi.c. # define DEFAULT_PAPER "us" #endif -/* - * If this is set to 1, xdvi will explicitly clear the internal GS - * buffer after every page that contained a PS special (figure etc.) - * to avoid artifacts with later PS specials (overlapping lines etc.); - * see also bug #633420. This workaround will slow down the drawing of - * the next page considerably. Currently xdvi also sometimes dies with - * `Internal error in beginheader_gs()' - * when paging quickly through a file with this hack enabled. - * Set to 0 to disable the hack. - */ -#define GS_PIXMAP_CLEARING_HACK 1 - /* * Define to 1 if you want to use the experimental font creation code */ @@ -1055,9 +1043,6 @@ extern Boolean ignore_papersize_specials; extern Boolean have_raw_postscript; #if PS extern struct psprocs psp, no_ps_procs; -# ifdef PS_GS -extern Boolean had_ps_specials; -# endif #endif #ifdef MAGICK -- cgit v1.2.3