wdvi

network DVI viewer
Log | Files | Refs

commit cc9171323aa3640b49c53b938d1bfad28af076e4
parent 82390cf7ab74d8b001f37477aac8419673e2d011
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Mon,  6 Sep 2021 17:00:21 +0000

Use a default document on startup

When an error occurs our behavior will be to do nothing. Thus we need
a known good default state to always be in. Create a default.dvi
document to satisfy this.

Diffstat:
Adefault.tex | 14++++++++++++++
Mxdvi.c | 4+++-
2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/default.tex b/default.tex @@ -0,0 +1,14 @@ +\documentclass{article} +\usepackage[utf8]{inputenc} +\title{\texttt{wdvi(1)}} +\author{Kyle Milz} + +\begin{document} +\maketitle +Welcome to \texttt{wdvi}, a network enabled DVI viewer. This program is a +fork of Paul Vojtas xdvi with some features added and many removed. + +\texttt{wdvi(1)} does not have support for PostScript but may one day +have support for images. \texttt{wdvi(1)} can only use HTTPS to +fetch documents. +\end{document} diff --git a/xdvi.c b/xdvi.c @@ -1514,8 +1514,10 @@ or invalid argument:\n\t\"%s\", \"%s\".", if (dvi_name == NULL) { postpone_popups = False; - act_addr_go(NULL, NULL, NULL, 0); + dvi_file = fopen("default.dvi", "r"); + //act_addr_go(NULL, NULL, NULL, 0); dvi_name = "resume.dvi"; + ev_flags |= EV_NEWDOC; (void) read_events(EV_GE_NEWDOC); ev_flags &= ~EV_NEWDOC; postpone_popups = True;