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>

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/hdrchk.1onbld
          +++ new/usr/src/tools/scripts/hdrchk.1onbld
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13  .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  14   14  .\" If applicable, add the following below this CDDL HEADER, with the
  15   15  .\" fields enclosed by brackets "[]" replaced with your own identifying
  16   16  .\" information: Portions Copyright [yyyy] [name of copyright owner]
  17   17  .\"
  18   18  .\" CDDL HEADER END
  19   19  .\"
  20   20  .\" Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  21   21  .\" Use is subject to license terms.
  22   22  .\"
  23      -.TH hdrchk 1ONBLD "02 July 2008"
       23 +.TH HDRCHK 1ONBLD "Jul 02, 2008"
  24   24  .SH NAME
  25   25  hdrchk \- check that header files conform to ON standards
  26   26  .SH SYNOPSIS
  27   27  .nf
  28   28  \fBhdrchk\fR [\fB-a\fP] \fIfile\fR [\fIfile ...\fR]\fP
  29   29  .fi
  30      -.LP
  31   30  .SH DESCRIPTION
  32      -.IX "OS-Net build tools" "hdrchk" "" "\fBhdrchk\fP"
  33   31  .LP
  34   32  .I hdrchk
  35   33  verifies that C header files (*.h) conform to the standards of the ON
  36   34  consolidation.
  37   35  See HEADER STANDARDS for details.
  38      -.LP
  39   36  .SH OPTIONS
  40      -.LP
  41   37  .TP 10
  42   38  .B -a
  43   39  Apply (more lenient) application header rules.
  44      -.LP
  45   40  .SH HEADER STANDARDS
  46   41  .LP
  47   42  Standards for all header files:
  48   43  .TP 4
  49   44  .B 1.
  50   45  Begin with a comment containing a copyright message.
  51      -.LP
  52   46  .TP 4
  53   47  .B 2.
  54   48  Enclosed in a guard of the form:
  55   49  .LP
  56   50  .nf
  57   51          #ifndef GUARD
  58   52          #define GUARD
  59   53          #endif /* [!]GUARD */
  60   54  .fi
  61   55  .sp
  62   56  .RS 4n
  63   57  The preferred form is without the bang character, but either is
  64   58  acceptable.
  65   59  .RE
  66      -.LP
  67   60  .TP 4
  68   61  .B 3.
  69   62  Has a valid ident declaration.
  70   63  .LP
  71   64  Additional standards for system header files:
  72   65  .TP 4
  73   66  .B 1.
  74   67  The file guard must take the form '_\fBFILENAME\fP_H[_]', where
  75   68  \fBFILENAME\fP matches the basename of the file.
  76   69  If it is installed in a subdirectory, it should be of the
  77   70  form '_\fBDIR\fP_\fBFILENAME\fP_H[_]', though this is not currently enforced.
  78   71  The form without the trailing underscore is preferred in both cases.
  79      -.LP
  80   72  .TP 4
  81   73  .B 2.
  82   74  All #include directives must use the <> form.
  83      -.LP
  84   75  .TP 4
  85   76  .B 3.
  86   77  If the header file contains anything besides comments and preprocessor
  87   78  directives, then it must be enclosed in a C++ guard of the form:
  88   79  .LP
  89   80  .nf
  90   81          #ifdef __cplusplus
  91   82          extern "C" {
  92   83          #endif
  93   84  
  94   85          #ifdef __cplusplus
  95   86          }
  96   87          #endif
  97   88  .fi
  98   89  
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX