[BACK]Return to psym_do.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / tests / usr.bin / indent

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/tests/usr.bin/indent/psym_do.c between version 1.3 and 1.4

version 1.3, 2022/04/24 09:04:12 version 1.4, 2022/04/24 10:36:37
Line 6 
Line 6 
  */   */
   
 //indent input  //indent input
 // TODO: add input  void function(void) {
           do stmt(); while (0);
           do {} while (0);
   }
 //indent end  //indent end
   
 //indent run-equals-input  //indent run
   void
   function(void)
   {
           do
                   stmt();
           while (0);
           do {
           } while (0);
   }
   //indent end
   
   
   /*
    * The keyword 'do' is followed by a statement, as opposed to 'while', which
    * is followed by a parenthesized expression.
    */
   //indent input
   void
   function(void)
   {
           do(var)--;while(var>0);
   }
   //indent end
   
   //indent run
   void
   function(void)
   {
           do
                   (var)--;
           while (var > 0);
   }
   //indent end

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

CVSweb <webmaster@jp.NetBSD.org>