-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 */
-
-
- last_bl = 0; /* no blanks found so far */
- box_com = col_1_com = false;
- /* at first, assume that we are not in a boxed comment or some other comment
- that should not be touched */
- ++out_coms; /* keep track of number of comments */
- unix_comment = 0; /* set flag to let us figure out if there is a
- unix-style comment */
-
-/*----------------------------------------------------------*\
-| Figure where to align and how to treat the comment
-\*----------------------------------------------------------*/
-
- if (col_1) { /* if comment starts in column 1 it should not
- be touched */
- col_1_com = box_com = true;
- com_col = 1;
- }
- else {
- if (*buf_ptr == '-')
- box_com = true; /* a comment with a '-' immediately after the /*
- is assumed to be a boxed comment */
- if ( /* bl_line && */ (s_lab == e_lab) && (s_code == e_code)) {
- /* klg: check only if this line is blank */
- /*
- * If this (*and previous lines are*) blank,
- * don't put comment way out at left
- */
- com_col = (ind_level - unindent_displace) * ind_size + 1;
- if (com_col <= 1)
- com_col = 2;
+pr_comment()
+{
+ int now_col; /* column we are in now */
+ int adj_max_col; /* Adjusted max_col for when we decide to
+ * spill comments over the right margin */
+ 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 moving 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 */
+ int break_delim = comment_delimiter_on_blankline;
+ int l_just_saw_decl = ps.just_saw_decl;
+ /*
+ * int ps.last_nl = 0; /* true iff the last significant
+ * thing weve seen is a newline
+ */
+ int one_liner = 1; /* true iff this comment is a one-liner */
+ adj_max_col = max_col;
+ ps.just_saw_decl = 0;
+ last_bl = 0; /* no blanks found so far */
+ ps.box_com = col_1_com = false; /* at first, assume that we are
+ * not in a boxed comment or some
+ * other comment that should not
+ * be touched */
+ ++ps.out_coms; /* keep track of number of comments */
+ unix_comment = 1; /* set flag to let us figure out if there
+ * is a unix-style comment ** DISABLED:
+ * use 0 to reenable this hack! */
+
+ /* Figure where to align and how to treat the comment */
+
+ if (ps.col_1 && !format_col1_comments) { /* if comment starts in
+ * column 1 it should not
+ * be touched */
+ col_1_com = ps.box_com = true;
+ ps.com_col = 1;
+ } else {
+ if (*buf_ptr == '-' || *buf_ptr == '*') {
+ ps.box_com = true; /* a comment with a '-' or '*' immediately
+ * after the /* is assumed to be a boxed
+ * comment */
+ col_1_com = true;
+ break_delim = 0;