home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / fixed512.com < prev    next >
Encoding:
Text File  |  1995-06-28  |  1.4 KB  |  49 lines

  1. $! v = 'f$verify(0)'
  2. $!
  3. $!    FIXED512.COM:    Uses the FILE utility or SET FILE/ATTR
  4. $!            to convert binary stream_LF file headers
  5. $!            to FIXED 512.
  6. $!
  7. $!    Author:    F.Macrides (macrides@sci.wfeb.edu)
  8. $!
  9. $!    Usage:  @Lynx_Dir:FIXED512 <stream_LF file that's actually binary>
  10. $! 
  11. $!===========================================================================
  12. $!
  13. $!  Get and build Joe Meadow's FILE utility for VAX and AXP:
  14. $!    ftp://ftp.wku.edu/vms/fileserv/file.zip
  15. $!  and define it here, or system-wide, as a foreign command.
  16. $!
  17. $! FILE := $device:[directory]FILE.EXE
  18. $!-----------------------------------------------------------
  19. $!
  20. $!  Just exit and leave the file stream_LF if we didn't get
  21. $!  the filename as P1, or if it's not a valid file spec.
  22. $!
  23. $ IF P1 .EQS. "" THEN EXIT
  24. $ IF F$SEARCH(P1) .EQS. "" THEN EXIT
  25. $!-----------------------------------------------------------
  26. $!
  27. $!  If we have FILE installed, use it.
  28. $!
  29. $ If f$type(FILE) .eqs. "STRING"
  30. $ Then
  31. $  FILE 'P1'-
  32.    /TYPE=FIXED -
  33.    /ATTRIBUTES=NOIMPLIEDCC -
  34.    /CHARACTERISTICS=BEST_TRY_CONTIGUOUS -
  35.    /RECORD_SIZE=512 -
  36.    /MAXIMUM_RECORD_SIZE=512
  37. $  EXIT
  38. $ EndIf
  39. $!-----------------------------------------------------------
  40. $!
  41. $!  If we get to here, and we're VMS v6+,
  42. $!  we'll use SET FILE/ATTR to do it.
  43. $!
  44. $ If f$extract(1,1,f$getsyi("VERSION")) .ge. 6
  45. $ Then
  46. $   SET FILE/ATTR=(RFM:FIX,LRL:512,MRS:512,RAT:NONE) 'P1'
  47. $ EndIf
  48. $ EXIT
  49.