From 6fe2bc3aab9ab7637e602e778349d240d441a804 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Wed, 30 May 2018 23:29:02 +0100 Subject: [PATCH] VERSA: Fix handling of multiple files given as JCL. Two bugs in my JCL-parsing code: - B was getting clobbered at some point in the loop, so rfn"rfn only stored the first filename in the right place. - The device's finish routine wasn't being called. For the hargld backend, this meant that the last few lines of each file weren't always being written to disk. --- src/dcp/versa.211 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/dcp/versa.211 b/src/dcp/versa.211 index 1e6b69c5..c051aaa6 100644 --- a/src/dcp/versa.211 +++ b/src/dcp/versa.211 @@ -599,9 +599,9 @@ go: setom jcount ;init to -1 movem jfn2 .suset [.rsname,,jdir] - movei b,jdev move d,[440700,,jbuf] -next: call rfn"rfn ;parse filename +next: movei b,jdev + call rfn"rfn ;parse filename push p,a ;save terminating char push p,d ;and pointer @@ -649,13 +649,15 @@ rest: syscal open,[[.bii,,dskich] ? jdev ? jfn1 ? jfn2 ? jdir] found: tlz z,-1 call @z ;call the handler + move z,spoolr"device ;flush the output device + call @device"finish(z) + pop p,d pop p,a - caie a,", ;any more filenames? - return + cain a,", ;any more filenames? + jrst next - ibp d ;skip the comma and parse again - jrst next + return .end