| 1 |
if unknown ifi: string ifi; ifi:="~vicar~.mpx"; fi |
| 2 |
if unknown ofi: string ofi; ofi:="~vicar~.mpy"; fi |
| 3 |
selected_page:=1; |
| 4 |
write "if selected_page=1:" to ofi; |
| 5 |
forever: |
| 6 |
% re-declaration apparently cures problems with the string pool with |
| 7 |
% large DVI files, such as TeXbook.DVI (Oostrum's DOS implementation |
| 8 |
% swallows occasionally strings and issues "???" instead) |
| 9 |
string l_; l_:=readfrom ifi; |
| 10 |
exitif (l_=EOF); |
| 11 |
if (l_="mpxbreak"): |
| 12 |
l_:="elseif selected_page=" & decimal(incr(selected_page)) & ":"; |
| 13 |
fi |
| 14 |
write l_ to ofi; |
| 15 |
endfor |
| 16 |
write "errmessage " & |
| 17 |
ditto & "Non-existant page " & decimal(selected_page) & ditto & ";" |
| 18 |
to ofi; |
| 19 |
write "else:" to ofi; |
| 20 |
write "errmessage " & |
| 21 |
ditto & "Non-existant page " & ditto & " & decimal(selected_page);" |
| 22 |
to ofi; |
| 23 |
write "fi" to ofi; |
| 24 |
write "endinput" to ofi; |
| 25 |
end |