summaryrefslogtreecommitdiffstats
path: root/fixed512.com
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:12:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:12:14 +0000
commit982972c2aada53f83389987317fb6cbee9ce5a91 (patch)
tree25420c3b905b2e00f02a895d877fd0669025ee35 /fixed512.com
parentInitial commit. (diff)
downloadlynx-982972c2aada53f83389987317fb6cbee9ce5a91.tar.xz
lynx-982972c2aada53f83389987317fb6cbee9ce5a91.zip
Adding upstream version 2.8.9rel.1.upstream/2.8.9rel.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fixed512.com')
-rw-r--r--fixed512.com54
1 files changed, 54 insertions, 0 deletions
diff --git a/fixed512.com b/fixed512.com
new file mode 100644
index 0000000..50b50fd
--- /dev/null
+++ b/fixed512.com
@@ -0,0 +1,54 @@
+$! v = 'f$verify(0)'
+$!
+$! FIXED512.COM: Uses the FILE utility or SET FILE/ATTR
+$! to convert binary stream_LF file headers
+$! to FIXED 512.
+$!
+$! Author: F.Macrides (macrides@sci.wfeb.edu)
+$!
+$! Usage: @Lynx_Dir:FIXED512 <stream_LF file that's actually binary>
+$!
+$! Lynx performs the conversion via internal code if the file is
+$! recognized as binary. This command procedure can be used externally
+$! if that detection failed, e.g., for binary files downloaded from FTP
+$! servers with extensions that hadn't been mapped to a binary MIME
+$! type in the Lynx configuration files.
+$!
+$!===========================================================================
+$!
+$! Get and build Joe Meadow's FILE utility for VAX and AXP:
+$! ftp://ftp.wku.edu/vms/fileserv/file.zip
+$! and define it here, or system-wide, as a foreign command.
+$!
+$! FILE := $device:[directory]FILE.EXE
+$!-----------------------------------------------------------
+$!
+$! Just exit and leave the file stream_LF if we didn't get
+$! the filename as P1, or if it's not a valid file spec.
+$!
+$ IF P1 .EQS. "" THEN EXIT
+$ IF F$SEARCH(P1) .EQS. "" THEN EXIT
+$!-----------------------------------------------------------
+$!
+$! If we have FILE installed, use it.
+$!
+$ If f$type(FILE) .eqs. "STRING"
+$ Then
+$ FILE 'P1'-
+ /TYPE=FIXED -
+ /ATTRIBUTES=NOIMPLIEDCC -
+ /CHARACTERISTICS=BEST_TRY_CONTIGUOUS -
+ /RECORD_SIZE=512 -
+ /MAXIMUM_RECORD_SIZE=512
+$ EXIT
+$ EndIf
+$!-----------------------------------------------------------
+$!
+$! If we get to here, and we're VMS v6+,
+$! we'll use SET FILE/ATTR to do it.
+$!
+$ If f$extract(1,1,f$getsyi("VERSION")) .ge. 6
+$ Then
+$ SET FILE/ATTR=(RFM:FIX,LRL:512,MRS:512,RAT:NONE) 'P1'
+$ EndIf
+$ EXIT