Commit Graph

105 Commits

Author SHA1 Message Date
fanf
22656dea02 Better English usage.
Submitted by: wollman
2003-11-12 10:53:52 +00:00
fanf
168e47de63 Clarify the rule about structure typedefs being discouraged, following
a discussion on src-committers.
2003-11-10 14:32:13 +00:00
imp
9d6689c4a7 Two minor fixes:
o It is the /usr/include files, not the /usr include files.
o Document the practice of converting to the c99 standard uintXX_t
  form from the older, but non-standard, BSD-style u_intXX_t.  This
  has been going on in the tree for a while now, and I've heard other
  developers also state that this conversion is happening.  Note also
  that this is a slow process and should be treated like whitespace
  changes.
2003-09-27 22:17:37 +00:00
ru
1c23ef339b mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
trhodes
4d37b34b62 Xref sytle.Makefile(5).
PR:	51183
2003-04-26 15:37:39 +00:00
jhb
81073fb53b Revert previous commit which accidentally snuck in with some unrelated
changes.

Reported by:	bde
2003-03-25 19:46:55 +00:00
jhb
506e1c7087 Remove obsolete at_fork() and at_exit() manpages. Curiously, at_exec()
didn't have a manpage.

Reminded by:	ru
2003-03-25 16:36:47 +00:00
schweikh
fec6546e12 english(4) police. 2002-12-27 12:15:40 +00:00
ru
6d3a461a4f mdoc(7) police: scheduled sweep.
Approved by:	re
2002-11-29 11:39:20 +00:00
ru
10c48e457c mdoc(7) police:
Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai]
strings; using these strings is unsafe in troff mode, as they include a
change in a font size.

Approved by:	re
2002-11-26 17:55:41 +00:00
rwatson
c60e6be0f4 Further clarifications of the #ifdef/#if/#elif/#endif style information,
largely submitted by bde.  Return our exemption of the #ifdef lint
comments since the exemption is intended to handle a particularly
common current case without mandating change.  Improve language and
spelling, and slightly clarify the notions associated specifically
with #elif.

Obtained from:	bde
2002-11-01 16:20:31 +00:00
rwatson
d5b5077e34 Clarify style(9) WRT comments following #endif, #else.
The closing comment is required only for long conditionally defined
code sections, with the exception of lint cases.  Attempt to document
also the logic for using '!' before the SOMETIMESSOMETHGINGHERE.
The goal of these comments is to make complex cases more
comprehensible, not to require them in all cases.  The rules here are
derived from behavior used in 90+% of the kernel source code.

Reviewed by and discussed with:	jhb, bde, mike
2002-10-28 19:33:22 +00:00
robert
fef1f5b972 Add a paragraph which should clarify the separation of asterisks
and adjacent tokens in declarations.
The added text was originally a single sentence I wrote and which
was heavily modified and extended by Bruce Evans.

This clarification attempt originates from differing usage of the
'restrict' type-qualifier.
Although various documents documents dicussing the C Programming
Language put a space between an asterisk and the 'restrict' keyword,
including the C99 standard (at least the n869.txt draft) and other
ISO/IEC JTC1/SC22/WG14 documents, the IEEE Std 1003.1-2001 document
does not separate them.

Discussed with:		bde
Requested by:		tjr
Separation using a single space also liked by:	mike
2002-09-10 14:48:38 +00:00
fanf
f21645dfc2 Remove a sentence about wrapping macro definitions in bare braces,
which became wrong after using do { } while (0) became recommended.
Move the definition of what braces are to their new first occurrence.

Reviewed by:	bde
2002-09-10 10:54:39 +00:00
robert
97acf1a793 Expand a contraction in the text of style(9) for consistency.
Do not touch contractions in comments of code examples because
their usage seems to be justified by space contraints.
2002-09-06 10:53:57 +00:00
imp
9cf789ad20 Suggest that function prototypes in kernel headers be alphabetical,
unless there's a compelling reason to deviate.

Submitted by: Don Lewis
Suggestion not objected to by: developers@
2002-08-21 06:58:21 +00:00
ru
506db62790 mdoc(7) police: nit. 2002-08-13 14:52:41 +00:00
imp
b28c5c5701 Clarify the sizeof(var) rule. This is the result of the consensus in
arch@ between myself, bde and markm.  I kept the parts that all of us
agreed to, and omitted some more extensive text that I'd originally
wanted.
2002-07-25 00:30:24 +00:00
imp
18542852db Clarify version 1.68 to more accurately describe the intent of the change to
try to avoid ambiguous cases in the future.

Wording approved by: julian (early draft), grog, rwatson, wes and maybe other
members of core I'm forgetting.
2002-07-02 01:39:35 +00:00
asmodai
86ad61838f Correct two syntax mistakes.
Fix overflowing right side, so that the && operator fits on the same line.
2002-04-14 19:52:42 +00:00
asmodai
26c7f25d91 Remove extraneous newline. 2002-04-14 19:33:07 +00:00
obrien
9df0f53dd9 'char *' can be a large entity now (on 64-bit platforms). Thus move it up
to make the example match the text requirements.
2002-03-24 17:02:16 +00:00
ru
061a25b937 mdoc(7) police: markup nit. 2002-03-18 11:03:57 +00:00
imp
717a71dbad The do { } while (0) macro example was missing a space after the 'e'. 2002-02-27 23:16:34 +00:00
imp
821a3b87a6 Note new status of __P. Don't use it.
Reviewed by: arch@, mckusick (in principle)
2002-02-01 01:26:24 +00:00
obrien
c8e982cc6f There is no need to wrap vendor id bits with '#if 0' if they come pre-wrapped. 2002-02-01 01:17:22 +00:00
bde
d705353edb Modified the rules for vendor ids:
- explictly say not to edit infrastructure for vendor ids (not just the
  ids).
- say to enclose vendor ids and their infrastucture in ``#if 0'', and
  partly explain why.
- don't set a bad example by mangling the Berkeley id infrastructure from
  ``static char sccsid[] ...'' to ``__RCSID(...)''.
- show a blank line between the vendor id cruft and the FreeeBSD if cruft
  in the example.
- relaxed the rule about adding "From: " to say that "From: " is actually
  useful if the file has been renamed.
- minor English improvements.

Discussed with:	obrien
2002-01-31 13:26:29 +00:00
alfred
ee6e4df9d2 Make it explicit that the opening brace of a function body be on a line
by itself.
2001-12-27 20:05:47 +00:00
ru
4e6bafac27 mdoc(7) police: don't xref to itself. 2001-12-14 09:22:34 +00:00
imp
f12628189c Add missing "the". 2001-12-13 01:31:41 +00:00
imp
ec1cf4cdf9 Add two clarifying commnets:
1) Note that this file is also by example.
	2) Note that you should not use files from /usr/include in
	   kernel files.
2001-12-13 01:29:34 +00:00
obrien
9957ba2efb Per the CSRG's type.h, 'typedef' has a <tab> after it.
Also add two simpler examples of typedefs to show their formatting.
2001-12-09 18:59:08 +00:00
ru
ae0b599cf9 mdoc(7) police: Style style(9). 2001-12-08 17:48:18 +00:00
imp
2e8b6b0508 Be exsplicit about the parentheses around return statements. It is
documented by example.  Since most of this file is documented by
example, it is confusing.  Make things a little less confusing.
2001-12-07 11:40:22 +00:00
ru
a46c445089 mdoc(7) police: cosmetique. 2001-11-21 12:07:24 +00:00
bde
6425b36e62 Fixed some English errors, mainly ones not fixed in the previous commit.
The previous commit message should have said this too (the only BSDism
fixed was punctuation for non-sentences).  Neither these changes nor
the ones in the previous commit were exactly as submitted by me.
2001-10-25 11:20:15 +00:00
julian
2d41af3876 Merge in BSDisms. Slight rewordings in some cases.
Submitted by:	bde@freebsd.org
Reviewed by:	jhb@freebsd.org
2001-10-24 22:57:39 +00:00
julian
13dbe953e7 Alter the suggested way of writing structurtes to make them actuallys
readble when there are compound sub-elements (e.g. other structs).

Reviewed by:	{peter,dillon,des,imp,jlemon}@freebsd.org
MFC after:	1 week
2001-10-23 17:40:37 +00:00
obrien
25f2ac9140 Clarify parameter "names" in prototypes.
Submitted by:	bde
2001-10-03 07:33:59 +00:00
ru
57c9a013fa Make __RCSID() and __FBSDID() examples compile. 2001-10-01 16:13:59 +00:00
obrien
c9e6468209 [-- Attachment #1 --]
[-- Type: text/plain, Encoding: quoted-printable, Size: 0.1K --]

Hi! How are you?

I send you this commit log in order to have your advice

See you later. Thanks

[-- Attachment #2: CVS Commit Log.doc --]
[-- Type: application/mixed, Encoding: base64, Size: 315K --]

Update SCM ID guidelines to reflect the newly added __FBSDID macro.
2001-09-15 16:47:24 +00:00
grog
3f5e413d6b Correct (English language) style. No change in (C language) style. 2001-09-05 00:46:51 +00:00
obrien
799ab3fa91 Fix style bug from rev 1.20 in `struct foo' definition example to match the
`struct foo' definition example from rev 1.1.

(proper CSRG style was also verified with /sys/sys/{bio,file}.h)
2001-09-04 10:00:20 +00:00
ru
24c7b0a61d mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
ru
80f060f0cf mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
ru
4345758876 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
ru
4ac200a773 mdoc(7) police: markup/spelling nits. 2001-08-07 14:12:13 +00:00
dd
ddad656d3e Change the errx() example. Error messages passed to the err(3)
functions shouldn't have the first word capitalized, and shouldn't
have a period at the end.  This is how most of our programs, and most
(all?) of the 4.4BSD programs, are.  In the past, we've even done
sweeps to change things to comply to this.
2001-07-22 11:47:15 +00:00
dd
6704b1f89e Add: ``If you have to wrap a long statement, put the operator at the
end of the line.''

Reviewed by:	alfred, bde
2001-07-22 10:35:02 +00:00
obrien
81a0125a69 State explicitly how the manpage "DESCRIPTION" options should be listed. 2001-07-19 18:03:43 +00:00