[BACK]Return to pr_comment.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / indent

Diff for /src/usr.bin/indent/pr_comment.c between version 1.2 and 1.3

version 1.2, 1996/06/26 05:34:33 version 1.3, 1997/07/25 22:00:47
Line 75 
Line 75 
  * beginning of the input line are removed   * beginning of the input line are removed
  */   */
   
   void
 pr_comment()  pr_comment()
 {  {
     int         now_col;        /* column we are in now */      int         now_col;        /* column we are in now */
Line 86 
Line 86 
     char       *t_ptr;          /* used for moving string */      char       *t_ptr;          /* used for moving string */
     int         unix_comment;   /* tri-state variable used to decide if it is      int         unix_comment;   /* tri-state variable used to decide if it is
                                  * a unix-style comment. 0 means only blanks                                   * a unix-style comment. 0 means only blanks
                                  * since /*, 1 means regular style comment, 2                                   * since / *, 1 means regular style comment, 2
                                  * means unix style comment */                                   * means unix style comment */
     int         break_delim = comment_delimiter_on_blankline;      int         break_delim = comment_delimiter_on_blankline;
     int         l_just_saw_decl = ps.just_saw_decl;      int         l_just_saw_decl = ps.just_saw_decl;
     /*      /*
      * int         ps.last_nl = 0;      /* true iff the last significant thing       * int         ps.last_nl = 0;       true iff the last significant thing
      * weve seen is a newline       * weve seen is a newline
      */       */
     int         one_liner = 1;  /* true iff this comment is a one-liner */      int         one_liner = 1;  /* true iff this comment is a one-liner */
Line 116 
Line 116 
     else {      else {
         if (*buf_ptr == '-' || *buf_ptr == '*' || *buf_ptr == '\n') {          if (*buf_ptr == '-' || *buf_ptr == '*' || *buf_ptr == '\n') {
             ps.box_com = true;  /* a comment with a '-', '*' or newline              ps.box_com = true;  /* a comment with a '-', '*' or newline
                                  * immediately after the /* is assumed to be                                   * immediately after the / * is assumed to be
                                  * a boxed comment */                                   * a boxed comment */
             break_delim = 0;              break_delim = 0;
         }          }
Line 159 
Line 159 
             buf_ptr++;              buf_ptr++;
     }      }
     ps.comment_delta = 0;      ps.comment_delta = 0;
     *e_com++ = '/';             /* put '/*' into buffer */      *e_com++ = '/';             /* put '/ *' into buffer */
     *e_com++ = '*';      *e_com++ = '*';
     if (*buf_ptr != ' ' && !ps.box_com)      if (*buf_ptr != ' ' && !ps.box_com)
         *e_com++ = ' ';          *e_com++ = ' ';

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3