1 02/29/84  convert_ec, cvec
  2 
  3 Syntax:  cvec path {-control_args}
  4 
  5 
  6 Function:  converts an exec_com from one version to another.  By
  7 default, it converts a Version 1 (old version) exec_com to Version 2,
  8 inserting the line "&version 2" at the beginning.
  9 
 10 
 11 Arguments:
 12 path
 13    is the pathname of an exec_com or absin segment.  The ec suffix is
 14    added if neither suffix is present.  The star convention is allowed.
 15 
 16 
 17 Control arguments:
 18 -chase
 19    finds and chases links matching path if path is a starname.  The
 20    default is -chase if path is not a starname, -no_chase if path is a
 21    starname.
 22 -check, -ck
 23    prints warning and error messages but does not change the segment or
 24    produce an output file.
 25 -force, -fc
 26    in the absence of -output_file and -check, forces the original
 27    segment to be overwritten even if errors occur.  The default is to
 28    create a copy in the process directory if errors occur.
 29 -no_chase
 30    does not operate on links.  The default is -chase if path is not a
 31    starname, -no_chase if path is a starname.
 32 
 33 
 34 -no_check, -nck
 35    converts the segment in addition to printing warning and error
 36    messages.  (Default)
 37 -no_force, -nfc
 38    does not replace the original segment or create an output file with
 39    -output_file if errors (as opposed to warnings) occur.  (Default)
 40 -output_file path, -of path
 41    places the converted segment in path instead of the original segment
 42    specified by path.  The equal convention is allowed in path.  If the
 43    output segment already exists, it is overwritten.  If errors occur,
 44    the converted segment is placed instead in the process directory.
 45 
 46 
 47 -severity N, -sv N
 48    suppresses warnings/errors with severities lower than N, where N is
 49    a number from 0 to 3.  The default is 2.  Severities are as follows:
 50       0   warnings requiring no conversion.
 51       1   warnings (nonstandard but valid syntax), such as
 52           unrecognized &strings converted to &&string.
 53       2   errors that can be converted, such as unrecognized &string
 54           at the beginning of a line converted to a comment.
 55       3   errors that cannot be converted.
 56 
 57 
 58 Access required: Read access on path1, write access on the output file
 59 or append on the parent of the output file if the output file does not
 60 exist.
 61 
 62 
 63 Notes:  Use of -output_file is recommended rather than overwriting the
 64 original segment, so that original and converted copies can be
 65 compared.  The simple conversion rules can, in complicated cases,
 66 change the intent of expressions; therefore, a copy of the original
 67 should be kept until the converted exec_com has been shown to operate
 68 correctly.
 69 
 70 
 71 List of conversions (v1 -> v2):
 72 leading and trailing white space -> literals such as &SP
 73    this conversion is performed because Version 2 strips leading and
 74    trailing white space from lines.
 75 &<whitespace> -> &-
 76    new comment sequence.
 77 &...& -> &&...&&
 78    strings of two or more ampersands are doubled.
 79 &(...) -> &&(...)
 80    unrecognized by Version 1, this construct is used in Version 1 ec's
 81    to pass &(...) parameters to other programs.
 82 &NN -> &(NN)
 83    Version 2 requires parameters with two or more digits to have the
 84    digits enclosed in parentheses.
 85 
 86 
 87 &0, &q0 -> &ec_path
 88 &r0 -> "&ec_path"
 89    new construct to get the expanded, suffixed pathname of the ec.
 90 &if [...] -> &if &[...]
 91    the &[...] construct is uniformly required to expand active
 92    functions in control lines.
 93 &command_line ... -> &trace &command ...
 94 &comment_line ... -> &trace &comment ...
 95 &control_line ... -> &trace &control ...
 96 &input_line ... -> &trace &input ...
 97    new tracing statement &trace.
 98 
 99 
100 &unrecognized (beginning of line) -> &-&unrecognized
101    comment entire line if it begins with unrecognized keyword.
102 &unrecognized -> &&unrecognized
103    all other unrecognized Version 1 &keywords are converted to
104    literals.
105