summaryrefslogtreecommitdiff
path: root/macros/plain/contrib/transparent-io/TrIOextract.org
diff options
context:
space:
mode:
Diffstat (limited to 'macros/plain/contrib/transparent-io/TrIOextract.org')
-rw-r--r--macros/plain/contrib/transparent-io/TrIOextract.org42
1 files changed, 42 insertions, 0 deletions
diff --git a/macros/plain/contrib/transparent-io/TrIOextract.org b/macros/plain/contrib/transparent-io/TrIOextract.org
new file mode 100644
index 0000000000..939b36720e
--- /dev/null
+++ b/macros/plain/contrib/transparent-io/TrIOextract.org
@@ -0,0 +1,42 @@
+#n extract TrIO information from a .log file
+/^This is TeX, Version 3.141592653/{
+ s/^This is.*/\\def\\TrIOeEMnvVfilenames{% password-protected name/p
+}
+/^\*\*/{
+ s/.*/\\TRIOifcase\\TrIOcnt\\TrIOstop{case 0 in auto}%/p
+}
+/^TrIO >>>/{
+ x
+ s/}%%/ \\TrIOfile}%/p
+ x
+ s/\(.*\)/\\TrIOmessage{\1}%%/
+ h
+ s/.*: /\\TRIOor\\TRIOdef\\TrIOiocmd{\\/
+ s/input/TRIOinput/
+ s/INPUT/TrIOcCkPxXtransfer\\TRIOinput/
+ s/openin/TRIOaAmNzZopenin/
+ s/immediate /TRIOimmediate\\/
+ s/openout/TRIObBlOyYopenout/
+ /TRIOinput/s/\\TRIOdef/\\TRIOgdef/
+ s/%%/%/p
+}
+/^Please type another input file name/{
+ s/.*: /\\TrIOenvinput\\TRIOgdef\\TrIOfile{/
+ s/$/ }%/
+ x
+ H
+}
+/^\\FilenameOPEN.*=/{
+ s/.*=/\\TrIOenvopen\\TRIOdef\\TrIOfile{/
+ s/$/}%/
+ x
+ s/^.*\n//g
+ H
+}
+${
+ x
+ s/}%%/ \\TrIOfile}%/p
+}
+$a\
+\\TRIOelse\\TrIOstop{unknown case ( \\TrIOcnt) in auto}%\
+\\TRIOfi\\TrIOfFLouUexecute}