Download Latest Version geomlib.tar.gz (58.3 kB)
Email in envelope

Get an email when there's a new version of CFD Utilities

Home / XLINE
Name Modified Size InfoDownloads / Week
Parent folder
build 2014-02-05 173 Bytes
README 2013-10-31 3.3 kB
xline.f 2013-08-23 7.7 kB
Totals: 3 Items   11.1 kB 0
Purpose:

   XLINE is a program originally intended to remove the %%EOF lines
   from PostScript files generated by DISSPLA applications.  (For some
   reason, they prevent plot pages after the first from printing on a
   LaserWriter.)  In case of future similar needs, the target string
   has been made variable (via a second command line argument).

   The target string must have the correct case and START the line.  If
   it is not strictly uppercase, or if it contains embedded blanks, etc.,
   it must be enclosed in double quotes (") on the command line.
   (Single quotes (') didn't work for VMS - DCL expands symbols so denoted,
   but now, under Unix and with getargs in liu of getprm, they appear OK.)

   A next higher version of the file is produced, with the offending
   lines removed.  The original file is left intact.

   [Later: version numbers are defunct VMSisms.  The output file name is
   now the input file name with '.xline' appended.]

   If the target string is %%EOF, the last-occurring such line is NOT
   removed, as it may well be needed for clean termination of the
   subsequent printing.

Sample usage:

   xline qplot.ps         ! Removes %%EOF lines; ensures a final %%EOF
   xline file.txt *DECK   ! Removes lines starting with *DECK (uppercase)
   xline file.txt "*deck" ! Removes lines starting with *deck (mixed case)
   xline file.txt "? ?"   ! Removes lines starting with ? ? (embedded bl.)
   xline file.txt '? ?'   ! Should do the same
   xline file.txt !       ! Removes lines starting with !

Procedures:

   GETARGS       Gets the command line argument(s)
   STRIPPER      Handy for dealing with non-uppercase or embedded blanks

Environment:  VAX/VMS; FORTRAN 77 (originally)
              Unix/Linux; Fortran 90 (now)

History:

   02/28/91  D.Saunders  Initial adaptation from XDECK ('82 - '86) -
                         no longer a preferred style, but...
   02/27/05   "     "    Replaced '0..' with / in formats.
                         Abandoned version numbers: added '.xline' to
                         the input file name.
                         Changed the use of " to use of % because the
                         command line string comes out wrong if either
                         " or ' is used as the delimiter with getprm.
                         Also, the command line arguments are repacked
                         with a single blank between them before xline
                         sees them, so leading or embedded blanks in
                         the target string are not an option.
                         E.g.:  xline test.txt Surface     and
                                xline test.txt %Surface%
                         will both remove a line starting with Surface,
                         but    xline test.txt %surface% will not.
   08/23/13   "     "    Replaced early GETPRM utility with preferred
                         GETARGS utility.  The style inherited from XDECK
                         is tiresome.  Now embedded blanks appear OK.
                         Forget about using % as a delimiter too: single or
                         double quotes should serve likely needs.

Author:  David Saunders, NASA Ames/Sterling Software, Palo Alto, CA.
Source: README, updated 2013-10-31