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>


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


   3 .\" The contents of this file are subject to the terms of the
   4 .\" Common Development and Distribution License (the "License").
   5 .\" You may not use this file except in compliance with the License.
   6 .\"
   7 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   8 .\" or http://www.opensolaris.org/os/licensing.
   9 .\" See the License for the specific language governing permissions
  10 .\" and limitations under the License.
  11 .\"
  12 .\" When distributing Covered Code, include this CDDL HEADER in each
  13 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  14 .\" If applicable, add the following below this CDDL HEADER, with the
  15 .\" fields enclosed by brackets "[]" replaced with your own identifying
  16 .\" information: Portions Copyright [yyyy] [name of copyright owner]
  17 .\"
  18 .\" CDDL HEADER END
  19 .\"
  20 .\" Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  21 .\" Use is subject to license terms.
  22 .\"
  23 .TH HDRCHK 1ONBLD "Jul 02, 2008"
  24 .SH NAME
  25 hdrchk \- check that header files conform to ON standards
  26 .SH SYNOPSIS
  27 .nf
  28 \fBhdrchk\fR [\fB-a\fP] \fIfile\fR [\fIfile ...\fR]\fP
  29 .fi

  30 .SH DESCRIPTION

  31 .LP
  32 .I hdrchk
  33 verifies that C header files (*.h) conform to the standards of the ON
  34 consolidation.
  35 See HEADER STANDARDS for details.

  36 .SH OPTIONS

  37 .TP 10
  38 .B -a
  39 Apply (more lenient) application header rules.

  40 .SH HEADER STANDARDS
  41 .LP
  42 Standards for all header files:
  43 .TP 4
  44 .B 1.
  45 Begin with a comment containing a copyright message.

  46 .TP 4
  47 .B 2.
  48 Enclosed in a guard of the form:
  49 .LP
  50 .nf
  51         #ifndef GUARD
  52         #define GUARD
  53         #endif /* [!]GUARD */
  54 .fi
  55 .sp
  56 .RS 4n
  57 The preferred form is without the bang character, but either is
  58 acceptable.
  59 .RE

  60 .TP 4
  61 .B 3.
  62 Has a valid ident declaration.
  63 .LP
  64 Additional standards for system header files:
  65 .TP 4
  66 .B 1.
  67 The file guard must take the form '_\fBFILENAME\fP_H[_]', where
  68 \fBFILENAME\fP matches the basename of the file.
  69 If it is installed in a subdirectory, it should be of the
  70 form '_\fBDIR\fP_\fBFILENAME\fP_H[_]', though this is not currently enforced.
  71 The form without the trailing underscore is preferred in both cases.

  72 .TP 4
  73 .B 2.
  74 All #include directives must use the <> form.

  75 .TP 4
  76 .B 3.
  77 If the header file contains anything besides comments and preprocessor
  78 directives, then it must be enclosed in a C++ guard of the form:
  79 .LP
  80 .nf
  81         #ifdef __cplusplus
  82         extern "C" {
  83         #endif
  84 
  85         #ifdef __cplusplus
  86         }
  87         #endif
  88 .fi
  89