Lines Matching +full:existing +full:- +full:parts
1 .\"-
2 .\" Copyright (c) 1995-2022 The FreeBSD Project
44 .Bd -literal
50 * VERY important single-line comments look like this.
53 /* Most single-line comments look like this. */
58 * Multi-line comments look like this. Make them real sentences. Fill
63 Single-line comments should be consistently either C or C++ within a file.
64 Multi-line comments should also be consistently either C or C++, but may differ
65 from single-line comments.
67 The copyright header should be a multi-line comment, with the first
69 .Bd -literal
70 /*-
71 * SPDX-License-Identifier: BSD-2-Clause
73 * Copyright (c) 1984-2025 John Q. Public
81 .Dq Li "/*-" .
89 Use the appropriate SPDX-License-Identifier line before the copyright.
97 a pre-existing
116 Non-C/C++ source files follow the example above, while C/C++ source files
138 .Bd -literal
161 .Bd -literal
162 #include <sys/types.h> /* Non-local includes in angle brackets. */
170 .Bd -literal
186 .Bd -literal
196 .Bd -literal
201 .Bd -literal
214 The expansions of expression-like macros are either a single token
225 Right-justify the
233 Any final statement-terminating semicolon should be
235 for pretty-printers and editors.
236 .Bd -literal
288 .Bd -literal
307 .St -isoC-99
311 .Bx Ns -style
317 .Bx Ns -style .
318 Like white-space commits, care should be taken in making
351 .Bd -literal
363 .Ic typedef Ns -names
386 .Bd -literal
401 .Bd -literal
420 Typedefs are difficult to use in stand-alone header files:
424 back-door mechanism for obtaining the typedef.
432 .Bd -literal
449 Functions used from other parts of the kernel are prototyped in the
463 to break precedents in the existing code and use the current
469 .Bd -literal
480 .Bd -literal
485 .Bd -literal
491 .Bd -literal
518 parts of the
527 Code which is unreachable for non-obvious reasons may be marked /*
530 .Bd -literal
531 while ((ch = getopt(argc, argv, "abNn:")) != -1)
545 warnx("illegal number, -n argument -- %s",
554 argc -= optind;
572 .Bd -literal
590 Parts of a
593 .Bd -literal
603 .Bd -literal
613 .Bd -literal
630 .Bd -literal
652 .Bd -literal
664 .Bd -literal
665 a = b->c[0] + ~d == (e || f) || g && h ? i : j >> 1;
670 .Bd -literal
682 .Bd -literal
695 .Bd -literal
740 .Bd -literal
745 .Bd -literal
753 .Bd -literal
758 .Bd -literal
763 .Bd -literal
768 .Bd -literal
786 .Bd -literal
804 .Bd -literal
828 document required the blank line convention, so it is widely used in existing
847 .Bl -enum
874 .Dq either-or
878 .Bd -literal -offset 4n
879 "usage: f [-aDde] [-b b_arg] [-m m_arg] req1 req2 [opt1 [opt2]]\en"
880 "usage: f [-a | -b] [-c [-dEe] [-n number]]\en"
882 .Bd -literal
883 (void)fprintf(stderr, "usage: f [-ab]\en");
897 The guidelines for third-party maintained modules and device drivers are more
934 .Bl -tag -width indent