-/*
-
- Copyright (C) 1976
- by the
- Board of Trustees
- of the
- University of Illinois
-
- All rights reserved
-
-
-NAME:
- pr_comment
-
-FUNCTION:
- This routine takes care of scanning and printing comments.
-
-ALGORITHM:
- 1) Decide where the comment should be aligned, and if lines should
- be broken.
- 2) If lines should not be broken and filled, just copy up to end of
- comment.
- 3) If lines should be filled, then scan thru input_buffer copying
- characters to com_buf. Remember where the last blank, tab, or
- newline was. When line is filled, print up to last blank and
- continue copying.
-
-PARAMETERS:
- None
-
-RETURNS:
- Nothing
-
-GLOBALS:
- combuf =
- s_com
- e_com =
-
- buf_ptr =
- buf_end
-
- bl_line
- col_1
- com_col =
- com_ind
- decl_com_ind
- decl_on_line
- had_eof
- ind_level
- ind_size
- line_no =
- max_col
- out_com = Count number of comments
- unindent_displace
- use_ff =
-
-CALLS:
- count_spaces
- dump_line
- fill_buffer
- printf (lib)
-
-CALLED BY:
- main
-
-HISTORY:
- November 1976 D A Willcox of CAC Initial coding
- 12/6/76 D A Willcox of CAC Modification to handle
- UNIX-style comments
-
-*/\f
-
-/* this routine processes comments. It makes an attempt to keep comments from
- going over the max line length. If a line is too long, it moves everything
- from the last blank to the next comment line. Blanks and tabs from the
- beginning of the input line are removed */
-
-#include "indent_globs.h";
-
-
-pr_comment () {
- int now_col;
- /* column we are in now */
- int box_com;
- /* set to true when we are in a "boxed" comment. In that case, the first
- non-blank char should be lined up with the / in /* */
- int col_1_com;
- /* this comment should not be touched */
- char *last_bl;
- /* points to the last blank in the output buffer */
- char achar;
- char *t_ptr; /* used for movinf string */
- int unix_comment;
- /* tri-state variable used to decide if it is a unix-style comment. 0 means
- only blanks since /*, 1 means regular style comment, 2 means unix style
- comment */