wdvi

network DVI viewer
Log | Files | Refs

commit 564f8fc25097aa873be9141d125c0c0ba2bc6265
parent 57304886adde735184c5941bb67a669ac3a5cd9a
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Mon, 16 Aug 2021 17:39:32 +0000

Assume VMS=0

Diffstat:
Mdvi-draw.c | 3---
Mfilefind.c | 4----
Mfont-open.c | 10----------
Msqueeze.c | 2--
Mutil.c | 16----------------
Mxdvi.c | 65-----------------------------------------------------------------
Mxdvi.h | 16----------------
7 files changed, 0 insertions(+), 116 deletions(-)

diff --git a/dvi-draw.c b/dvi-draw.c @@ -114,9 +114,6 @@ BMUNIT bit_masks[33] = { #endif #endif -#ifdef VMS -#define off_t int -#endif extern off_t lseek(); #ifndef SEEK_SET /* if <unistd.h> is not provided (or for <X11R5) */ diff --git a/filefind.c b/filefind.c @@ -58,11 +58,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #ifndef ST_NLINK_TRICK -#if defined(VMS) -#define ST_NLINK_TRICK 0 -#else #define ST_NLINK_TRICK 1 -#endif #endif /* !defined(ST_NLINK_TRICK) */ extern char *xstrdup ARGS((const char *)); diff --git a/font-open.c b/font-open.c @@ -38,15 +38,9 @@ NOTE: * documentation closely enough. */ -#ifndef VMS #define PATH_SEP ':' #define DEFAULT_TAIL "/%f.%d%p" #define DEFAULT_VF_TAIL "/%f.vf" -#else /* VMS */ -#define PATH_SEP '/' -#define DEFAULT_TAIL ":%f.%d%p" -#define DEFAULT_VF_TAIL ":%f.vf" -#endif /* VMS */ #ifndef DEFAULT_FONT_SIZES /* default sizes for current dpi */ @@ -1807,11 +1801,7 @@ try_size(font, dpi, ret_path) #endif #ifndef EXIT_SUCCESS -#ifndef VMS #define EXIT_SUCCESS 0 -#else -#define EXIT_SUCCESS 1 -#endif #endif #if HAVE_SYS_WAIT_H diff --git a/squeeze.c b/squeeze.c @@ -100,9 +100,7 @@ char *s ; lastspecial = 0 ; } char buf[BUFLENGTH] ; -#ifndef VMS int -#endif main(argc, argv) int argc ; char *argv[] ; diff --git a/util.c b/util.c @@ -40,10 +40,6 @@ NOTE: # include <sys/stat.h> #endif -#ifdef VMS -#include <rmsdef.h> -#endif /* VMS */ - #if defined(macII) && !__STDC__ /* stdlib.h doesn't define these */ extern void *malloc(); extern void *realloc(); @@ -483,28 +479,16 @@ close_small_file() */ FILE * -#ifndef VMS xfopen(filename, type) const char *filename; const char *type; #define TYPE type -#else -xfopen(filename, type, type2) - const char *filename; - const char *type; - const char *type2; -#define TYPE type, type2 -#endif /* VMS */ { FILE *f; if (n_files_left == 0) close_a_file(); f = fopen(filename, TYPE); -#ifndef VMS if (f == NULL && (errno == EMFILE || errno == ENFILE)) -#else /* VMS */ - if (f == NULL && errno == EVMSERR && vaxc$errno == RMS$_ACC) -#endif /* VMS */ { n_files_left = 0; close_a_file(); diff --git a/xdvi.c b/xdvi.c @@ -204,30 +204,6 @@ static const unsigned char drag_omni_mask[] = { 0x80, 0x03, 0x00, 0xe0, 0x0f, 0x00, 0xc0, 0x07, 0x00, 0x80, 0x03, 0x00, 0x00, 0x01, 0x00}; -#ifdef VMS -/* - * Magnifying glass cursor - * - * Developed by Tom Sawyer, April 1990 - * Contibuted by Hunter Goatley, January 1991 - * - */ - -#define mag_glass_width 16 -#define mag_glass_height 16 -#define mag_glass_x_hot 6 -#define mag_glass_y_hot 6 -static char mag_glass_bits[] = { - 0xf8, 0x03, 0x0c, 0x06, 0xe2, 0x09, 0x13, 0x1a, 0x01, 0x14, 0x01, 0x14, - 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x03, 0x10, 0x02, 0x18, 0x0c, 0x34, - 0xf8, 0x6f, 0x00, 0xd8, 0x00, 0xb0, 0x00, 0xe0 -}; -#include <decw$cursor.h> /* Include the DECWindows cursor symbols */ -static int DECWCursorFont; /* Space for the DECWindows cursor font */ -static Pixmap MagnifyPixmap; /* Pixmap to hold our special mag-glass */ -#include <X11/Xresource.h> /* Motif apparently needs this one */ -#endif /* VMS */ - /* * Command line flags. */ @@ -283,9 +259,7 @@ static const char *subst_val[] = { static XrmOptionDescRec options[] = { {"-s", ".shrinkFactor", XrmoptionSepArg, (XPointer) NULL}, -#ifndef VMS {"-S", ".densityPercent", XrmoptionSepArg, (XPointer) NULL}, -#endif {"-density", ".densityPercent", XrmoptionSepArg, (XPointer) NULL}, #if COLOR {"-nocolor", ".color", XrmoptionNoArg, (XPointer) "off"}, @@ -414,9 +388,6 @@ static const char base_translations[] = "" "^<Key>o:open-dvi-file()\n" "^<Key>p:print()\n" "a<Key>p:show-display-attributes()\n" -#ifdef VMS -"^<Key>z:quit()\n" -#endif "\"q\":quit()\n" "\"d\":down()\n" "\"f\":forward-page()\n" @@ -570,12 +541,6 @@ static XtResource application_resources[] = { offset(_hush_chk), XtRString, "false"}, {"safer", "Safer", XtRBoolean, sizeof(Boolean), offset(safer), XtRString, "false"}, -#ifdef VMS -{"foreground", "Foreground", XtRString, sizeof(char *), - offset(fore_color), XtRString, (XtPointer) NULL}, -{"background", "Background", XtRString, sizeof(char *), - offset(back_color), XtRString, (XtPointer) NULL}, -#endif {"iconGeometry", "IconGeometry", XtRString, sizeof(char *), offset(icon_geometry), XtRString, (XtPointer) NULL}, {"keepPosition", "KeepPosition", XtRBoolean, sizeof(Boolean), @@ -692,12 +657,8 @@ static XtResource app_pixel_resources[] = { /* get these later */ static const char *usagestr[] = { /* shrinkFactor */ "shrink", -#ifndef VMS /* S */ "density", /* density */ silent, -#else - /* density */ "density", -#endif #ifdef GREY /* gamma */ "g", #endif @@ -739,11 +700,7 @@ static const char *usagestr[] = { /* hl */ "color", /* bd */ "^-hl", "-bd <color>", /* cr */ "color", -#ifndef VMS /* display */ "^-cr", "-display <host:display>", -#else - /* display */ "^-cr", "-display <host::display>", -#endif /* geometry */ "^-cr", "-geometry <geometry>", /* icongeometry */ "geometry", /* iconic */ "^-icongeometry", "-iconic", @@ -1695,22 +1652,13 @@ main(argc, argv) * Step 1: Process command-line options and resources. */ -#ifndef VMS prog = rindex(*argv, '/'); -#else - prog = rindex(*argv, ']'); -#endif if (prog != NULL) ++prog; else prog = *argv; -#ifdef VMS - if (index(prog, '.') != NULL) *index(prog, '.') = '\0'; -#endif - #if SELFAUTO argv0 = argv[0]; #endif - top_level = XtInitialize(prog, "XDvi", options, XtNumber(options), &argc, argv); XtAddActions(Actions, num_actions); @@ -2455,21 +2403,8 @@ argument is to override any papersize specials in the dvi file.\n\n", stderr); DefaultGCOfScreen(SCRN) = copyGC; -#ifndef VMS ready_cursor = XCreateFontCursor(DISP, XC_cross); redraw_cursor = XCreateFontCursor(DISP, XC_watch); -#else - DECWCursorFont = XLoadFont(DISP, "DECW$CURSOR"); - XSetFont(DISP, highGC, DECWCursorFont); - redraw_cursor = XCreateGlyphCursor(DISP, DECWCursorFont, DECWCursorFont, - decw$c_wait_cursor, decw$c_wait_cursor + 1, - &resource.fore_color, &resource.back_color); - MagnifyPixmap = XCreateBitmapFromData(DISP, RootWindowOfScreen(SCRN), - mag_glass_bits, mag_glass_width, mag_glass_height); - ready_cursor = XCreatePixmapCursor(DISP, MagnifyPixmap, MagnifyPixmap, - &resource.back_color, &resource.fore_color, - mag_glass_x_hot, mag_glass_y_hot); -#endif /* VMS */ { XColor bg_Color; diff --git a/xdvi.h b/xdvi.h @@ -89,14 +89,6 @@ typedef char Bool3; /* Yes/No/Maybe */ #define False 0 #define Maybe 2 -#ifdef VMS -#include <string.h> -#define index strchr -#define rindex strrchr -#define bzero(a, b) (void) memset ((void *) (a), 0, (size_t) (b)) -#define bcopy(a, b, c) (void) memmove ((void *) (b), (void *) (a), (size_t) (c)) -#endif - #include <stdio.h> #include <setjmp.h> @@ -216,18 +208,10 @@ typedef char Bool3; /* Yes/No/Maybe */ #endif #ifndef OPEN_MODE -#ifndef VMS #define OPEN_MODE "r" -#else /* VMS */ -#define OPEN_MODE "r", "ctx=stm" -#endif /* VMS */ #endif /* OPEN_MODE */ -#ifndef VMS #define OPEN_MODE_ARGS const char * -#else -#define OPEN_MODE_ARGS const char *, const char * -#endif #define Printf (void) printf #define Puts (void) puts