Print this page
6282 ONBLD man pages not pbchk clean
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
   1 cstyle(1ONBLD)                illumos Build Tools               cstyle(1ONBLD)
   2 
   3 
   4 
   5 NAME
   6        cstyle - check for some common stylistic errors in C source files
   7 
   8 SYNOPSIS
   9        cstyle [-chpvCP] [-o constructs] [file...]
  10 
  11 DESCRIPTION
  12        cstyle inspects C source files (*.c and *.h) for common sylistic
  13        errors.  It attempts to check for the cstyle documented in
  14        /shared/ON/general_docs/cstyle.ms.pdf.  Note that there is much in that
  15        document that cannot be checked for; just because your code is
  16        cstyle(1ONBLD) clean does not mean that you've followed Sun's C style.
  17        Caveat emptor.
  18 
  19 OPTIONS
  20        The following options are supported:
  21 


  92 
  93            Will trigger this error.  Instead, do:
  94 
  95            if (this_is_a_long_variable == another_variable)
  96            a = b + c;
  97 
  98        empty if/for/while body not on its own line
  99            For visibility, empty bodies for if, for, and while statements
 100            should be on their own line.  For example:
 101 
 102            while (do_something(&x) == 0);
 103 
 104            Will trigger this error.  Instead, do:
 105 
 106            while (do_something(&x) == 0)
 107            ;
 108 
 109 
 110 
 111 
 112                                  28 March 2005                  cstyle(1ONBLD)
   1 CSTYLE(1ONBLD)                illumos Build Tools               CSTYLE(1ONBLD)
   2 
   3 
   4 
   5 NAME
   6        cstyle - check for some common stylistic errors in C source files
   7 
   8 SYNOPSIS
   9        cstyle [-chpvCP] [-o constructs] [file...]
  10 
  11 DESCRIPTION
  12        cstyle inspects C source files (*.c and *.h) for common sylistic
  13        errors.  It attempts to check for the cstyle documented in
  14        /shared/ON/general_docs/cstyle.ms.pdf.  Note that there is much in that
  15        document that cannot be checked for; just because your code is
  16        cstyle(1ONBLD) clean does not mean that you've followed Sun's C style.
  17        Caveat emptor.
  18 
  19 OPTIONS
  20        The following options are supported:
  21 


  92 
  93            Will trigger this error.  Instead, do:
  94 
  95            if (this_is_a_long_variable == another_variable)
  96            a = b + c;
  97 
  98        empty if/for/while body not on its own line
  99            For visibility, empty bodies for if, for, and while statements
 100            should be on their own line.  For example:
 101 
 102            while (do_something(&x) == 0);
 103 
 104            Will trigger this error.  Instead, do:
 105 
 106            while (do_something(&x) == 0)
 107            ;
 108 
 109 
 110 
 111 
 112                                 March 28, 2005                  CSTYLE(1ONBLD)