History log of /netbsd-src/share/misc/style (Results 1 – 25 of 77)
Revision Date Author Comments
# 8641e70f 29-Jan-2024 rin <rin@NetBSD.org>

style: One more typo, NFC


# 5e0085c3 24-Jan-2024 rin <rin@NetBSD.org>

style: Fix typo, NFC

"it it" --> "it is" (across a newline)


# ce8aefde 07-Aug-2023 riastradh <riastradh@NetBSD.org>

style(5): Advise against new struct typedefs and explain why.

Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/07/11/msg028950.html

Positive feedback to general concept, negative

style(5): Advise against new struct typedefs and explain why.

Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/07/11/msg028950.html

Positive feedback to general concept, negative feedback to specifics
and phrasing of the first iteration but no objections to latest
iteration after several weeks at:
https://mail-index.netbsd.org/tech-kern/2023/07/16/msg028994.html

show more ...


# 5d22d06a 21-Apr-2023 rillig <rillig@NetBSD.org>

style: remove mentions of ANSI C

The distinction between traditional C and ISO C90 or later is no longer
needed in the style guide. Any old-style code is caught by the
compilers.

https://mail-index

style: remove mentions of ANSI C

The distinction between traditional C and ISO C90 or later is no longer
needed in the style guide. Any old-style code is caught by the
compilers.

https://mail-index.netbsd.org/tech-userlevel/2023/04/15/msg013768.html
https://mail-index.netbsd.org/tech-userlevel/2023/04/17/msg013776.html

show more ...


# 1266f92a 17-Apr-2023 dholland <dholland@NetBSD.org>

share/misc/style: Don't prescribe using "extern.h" for all prototypes.

That's very 80s.

No objection (or even response, amazingly enough) on tech-userlevel in
two weeks.


# e2b6784b 15-Apr-2023 rillig <rillig@NetBSD.org>

style: fix spelling of plural parentheses


# e67c09fd 14-Apr-2023 rillig <rillig@NetBSD.org>

style: don't require sorting variables in functions

Sorting the variables by size would be platform-dependent and thus is
not possible.

Sorting the variables alphabetically may or may not make the

style: don't require sorting variables in functions

Sorting the variables by size would be platform-dependent and thus is
not possible.

Sorting the variables alphabetically may or may not make the code easier
to read, and the example given below that rule doesn't follow it,
otherwise the correct order would be 'eight, eleven, nine, ten,
thirteen, twelve'.

https://mail-index.netbsd.org/tech-userlevel/2023/04/11/msg013749.html

show more ...


# 08f9e9d2 11-Apr-2023 riastradh <riastradh@NetBSD.org>

style(5): Omit redundant proscription against .c externs in previous.


# 9a8042f5 30-Mar-2023 riastradh <riastradh@NetBSD.org>

style(5): Forbid extern in .c files.

Discussed on tech-userlevel (bcc tech-kern):
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html


# 062c983c 14-Feb-2023 jschauma <jschauma@NetBSD.org>

exit with EXIT_FAILURE, not 1, as elsewhere


# 0d31e668 30-Dec-2022 jkoshy <jkoshy@NetBSD.org>

Move a style recommendation closer to the syntax that it describes.


# 6257508d 30-Dec-2022 jkoshy <jkoshy@NetBSD.org>

C99: Suggest using narrow scopes for loop indices.


# d73c699d 29-Dec-2022 jkoshy <jkoshy@NetBSD.org>

Terminate a sentence with a full stop.


# d723d0dd 10-Mar-2022 rillig <rillig@NetBSD.org>

share/misc/style: lint no longer needs CONSTCOND in do-while-loops

Since usr.bin/xlint/lint1/tree.c 1.202 from 2021-01-31, lint recognizes
the common idiom 'do { ... } while (0)' and no longer compl

share/misc/style: lint no longer needs CONSTCOND in do-while-loops

Since usr.bin/xlint/lint1/tree.c 1.202 from 2021-01-31, lint recognizes
the common idiom 'do { ... } while (0)' and no longer complains about
its constant condition; see tests/usr.bin/xlint/lint1/msg_161.c.

show more ...


# aba9e208 10-Mar-2022 rillig <rillig@NetBSD.org>

share/misc/style: clarify enum example code

The only purpose of the enum example is to show that enum constants are
written in uppercase.

The previous code could be mistakenly interpreted as requir

share/misc/style: clarify enum example code

The only purpose of the enum example is to show that enum constants are
written in uppercase.

The previous code could be mistakenly interpreted as requiring each
definition of an enum type to also define a global variable of that
type, and to make the variable name the abbreviated type name. Even if
the enum type were prefixed with 'typedef', choosing different names for
the tag and the typedef would not be necessary.

To avoid these possible misinterpretations above, remove the variable
name from the declaration.

show more ...


# 60c74c06 28-Mar-2021 christos <christos@NetBSD.org>

Clarify and explain the rationale for parentheses in sizeof and return as
discussed.


# 7829d102 28-Mar-2021 christos <christos@NetBSD.org>

- EXIT_FAILURE instead of 1
- %j instead of PRI for *intmax_t
- != -1 instead of < 0 for syscalls


# 95906832 29-Nov-2020 rillig <rillig@NetBSD.org>

style: fix typo


# ee750f0f 02-Aug-2020 riastradh <riastradh@NetBSD.org>

Remove confusing advice about macros that might expand to nothing.

Such macros should not exist; as advised earlier in the file, they
should expand to `__nothing' (literally) from <sys/cdefs.h> whic

Remove confusing advice about macros that might expand to nothing.

Such macros should not exist; as advised earlier in the file, they
should expand to `__nothing' (literally) from <sys/cdefs.h> which
itself expands to ((void)0) precisely so that the problem this advice
sought to avoid does not arise.

show more ...


# 07b8ffa6 02-Aug-2020 riastradh <riastradh@NetBSD.org>

Update style around single-line braces according to discussion.

https://mail-index.netbsd.org/tech-userlevel/2020/07/12/msg012536.html
https://mail-index.netbsd.org/tech-kern/2020/07/12/msg026594.ht

Update style around single-line braces according to discussion.

https://mail-index.netbsd.org/tech-userlevel/2020/07/12/msg012536.html
https://mail-index.netbsd.org/tech-kern/2020/07/12/msg026594.html

Retain some examples of technically unnecessary braces that likely
aid legibility from the previous commit.

show more ...


# ff75c762 02-Aug-2020 lukem <lukem@NetBSD.org>

style: revert previous

I misintepreted the consensus.


# 15dbb6ff 01-Aug-2020 lukem <lukem@NetBSD.org>

style: prefer braces for single statement control statements

Prefer to use { braces } around single statements after
control statements, instead of discouraging them.

Per discussion on tech-userlev

style: prefer braces for single statement control statements

Prefer to use { braces } around single statements after
control statements, instead of discouraging them.

Per discussion on tech-userlevel & tech-kern, where the significant
majority of developers who responded (including current and former
core members) prefer this new style.

show more ...


# 1a15e196 26-Jul-2020 rillig <rillig@NetBSD.org>

style: fix typo about enum constants being capitalized


# d4287bc5 28-Jan-2019 christos <christos@NetBSD.org>

document how we want to use __nothing


# fb99257d 23-May-2016 salazar <salazar@NetBSD.org>

fix spelling mistakes


1234