09/12/85 indent, ind Syntax as a command: ind oldpath {newpath} {-control_args} Function: improves the readability of a PL/I source segment by indenting it according to a set of standard conventions described below. Arguments: oldpath is the pathname of the input source segment. Source segments with suffixes for PL/I, create_data_segment, and reductions are recognized. If the segment does not have a recognized suffix, indent uses a segment of .pl1, name.cds, or name.rd, in that order. newpath is the pathname of the output source segment. The output segment must have the same suffix as the input segment. If you omit newpath, the indented copy of the program replaces the original one in oldpath. However, if errors are detected during indentation and you don't give newpath, the original copy is not replaced; instead, the pathname of the temporary file containing the indented copy is printed in an error message. Control arguments: -brief, -bf suppresses warning comments on invalid or non-PL/I characters found outside of a string or comment; such characters are never removed. When you select -brief, those errors whose warning messages are suppressed do not prevent the original copy from being replaced. -comment STR, -cm STR sets the comment column to STR. Comments are lined up in this column unless they occur in the beginning of a line or are preceded by a blank line. If -comment is omitted, the default is 61. -indent STR, -ind STR sets indentation for each level to STR. Each do, begin, proc, and procedure statement indents additional STR spaces until the matching end statement is encountered. If omitted, the default is five. -lmargin STR, -lm STR sets the left margin (indentation for normal program statements) to STR. If omitted, the default is 11. Notes on conventions: Declaration statements are indented five spaces for dcl declarations and 10 for declare declarations. Identifiers appearing on different lines of the same declare statement are lined up under the first identifier on the first line of the statement. Structure declarations are indented according to level number; after level two, each additional level is indented two additional spaces. An additional level of indentation is also provided for the then clause of an if statement; else clauses are lined up with the corresponding if. Statements continuing over more than one line have an additional five spaces of indentation for the second line and all succeeding ones. Multiple spaces are replaced by a single space except within strings or for nonleading spaces and tabs in comments. Trailing spaces and tabs are removed from all lines. Spaces are inserted before left parentheses, after commas, and around the constructs =, ->, <=, >=, and ^=. Spaces are deleted if they are found after a left parenthesis or before a right parenthesis. Tabs are used wherever possible to conserve storage in the output segment. Parentheses are counted and balanced at every semicolon. If they do not balance or if the input segment ends in a string or comment, a warning message is printed. Language keywords (do, begin, end, etc.) are recognized only at parenthesis level zero, and most keywords are recognized only if they appear to begin a statement. The indent command treats comments which begin with /****^ as unindentable comments. These comments are copied directly into the indented source program without reformatting or indentation. This follows the format_pl1 convention for identifying comments which are never to be reformatted. Notes on restrictions: The only case in which indent splits a line is when lines are longer than 350 characters, since they overflow indent's buffer size. Labeled end statements do not close multiple open do statements. This command assumes that the identifiers begin, end, procedure, proc, declare, and dcl are reserved words when they appear at the beginning of a statement. If the input contains a statement like do = do + 1; indent interprets it to mean that the statement delimits a do group and does not indent correctly. Structure level numbers greater than 99 do not indent correctly. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved