#
5e3934b1 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.bin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
R
usr.bin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
01c66110 |
| 16-Jul-2018 |
Piotr Pawel Stefaniak <pstef@FreeBSD.org> |
indent(1): rewrite the integer/floating constant scanning part of lexi.c
Remove procedural code that did the scanning, which was faulty and didn't support complex constants such as 0x1p-61. Replace
indent(1): rewrite the integer/floating constant scanning part of lexi.c
Remove procedural code that did the scanning, which was faulty and didn't support complex constants such as 0x1p-61. Replace it with a finite state machine expressed as a transition table. The table was rewritten by hand from lx's output, given parts of grammar expressed as regular expressions.
lx is Katherine Flavel's lexer generator, currently available at https://github.com/katef/libfsm and the parts of grammar were taken from http://quut.com/c/ANSI-C-grammar-l-2011.html and extended to support binary integer constants which are a popular GCC extension.
Reported by: bde
show more ...
|
Revision tags: release/11.2.0 |
|
#
1479f36d |
| 03-Jun-2018 |
Piotr Pawel Stefaniak <pstef@FreeBSD.org> |
indent(1): remove troff output support
The troff output in indent was invented at Sun and the online documentation for some post-SunOS operating system includes this: The usual way to get a troff
indent(1): remove troff output support
The troff output in indent was invented at Sun and the online documentation for some post-SunOS operating system includes this: The usual way to get a troffed listing is with the command indent -troff program.c | troff -mindent
The indent manual page in FreeBSD 1.0 already lacks that information and troff -mindent complains about not being able to find the macro file. It seems that the file did exist on SunOS and was supposed to be imported into 4.3BSD together with the feature, but that has never happened.
Removal of troff output support simplifies a lot of indent's code.
vgrind(1) seems to be a promising replacement.
show more ...
|
#
63c3f226 |
| 03-Jun-2018 |
Piotr Pawel Stefaniak <pstef@FreeBSD.org> |
indent(1): improve predictability of lexi()
lexi() reads the input stream and categorizes the next token. indent will sometimes buffer up a sequence of tokens in order rearrange them. That is needed
indent(1): improve predictability of lexi()
lexi() reads the input stream and categorizes the next token. indent will sometimes buffer up a sequence of tokens in order rearrange them. That is needed for properly cuddling else or placing braces correctly according to the chosen style (KNF vs Allman) when comments are around. The loop that buffers tokens up uses lexi() to decide if it's time to stop buffering. Then the temporary buffer is used to feed lexi() the same tokens again, this time for normal processing.
The problem is that lexi() apart from recognizing the token, can change a lot of information about the current state, for example ps.last_nl, ps.keyword, buf_ptr. It also abandons leading whitespace, which is needed mainly for comment-related considerations. So the call to lexi() while tokens are buffered up and categorized can change the state before they're read again for normal processing which may easily result in changing interpretation of the current state and lead to incorrect output.
To work around the problems: 1) copy the whitespace into the save_com buffer so that it will be read again when processed 2) trick lexi() into modifying a temporary copy of the parser state instead of the original.
show more ...
|
#
1de7b4b8 |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
No functional change intended.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
91b95f3d |
| 04-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r311132 through r311305.
|
#
86adac04 |
| 02-Jan-2017 |
Piotr Pawel Stefaniak <pstef@FreeBSD.org> |
indent(1): add option -P for loading user-provided files as profiles
Without this change, indent(1) would only look to load options from ~/.indent.pro if it's there and -npro wasn't used on the comm
indent(1): add option -P for loading user-provided files as profiles
Without this change, indent(1) would only look to load options from ~/.indent.pro if it's there and -npro wasn't used on the command line. This option lets the user set their own path to the file.
Approved by: pfg (mentor) Differential Revision: https://reviews.freebsd.org/D9010
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|
#
a6bcfda4 |
| 04-Aug-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Use bsearch() for looking up type keywords.
Reference: https://github.com/pstef/freebsd_indent/commit/f3b8e6e57fd47364b2360b44011a2fad5d11adc7
Submitted by: Piotr Stefaniak Differential
indent(1): Use bsearch() for looking up type keywords.
Reference: https://github.com/pstef/freebsd_indent/commit/f3b8e6e57fd47364b2360b44011a2fad5d11adc7
Submitted by: Piotr Stefaniak Differential Revision: https://reviews.freebsd.org/D6966
show more ...
|
#
70a3049e |
| 01-Aug-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Use a dash in the license headers.
Use of the canonical dash avoids indent(1) from reformatting the license headers.
|
#
54d57555 |
| 31-Jul-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
indent(1): Simplify pr_comment().
Modify count_spaces() to take a third parameter "end" that will make the function return when the end is reached. This lets the caller pass a pointer to non nul-ter
indent(1): Simplify pr_comment().
Modify count_spaces() to take a third parameter "end" that will make the function return when the end is reached. This lets the caller pass a pointer to non nul-terminated sequence of characters. Rename count_spaces() to count_spaces_until() and reinstate count_spaces(), this time based on count_spaces_until().
Use count_spaces_until() to recalculate current column when going through a comment just before the fragment which decides if current line of the comment should be wrapped. This move simplifies this code by eliminating the need for keeping the column counter up to date every time e_com is advanced and also reduces spread of code that has to know how many columns a tab will produce.
Deduplicate code that decided if a comment needs a blank line at the top.
References: https://github.com/pstef/freebsd_indent/commit/d9fa3b481532a448095f8ddd14fd0797ce59230c https://github.com/pstef/freebsd_indent/commit/27185b4b336b0e2108a3d96aee6df80cced94192
Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Submitted by: Piotr Stefaniak
show more ...
|
Revision tags: release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs |
|
#
8c7e7698 |
| 30-Mar-2002 |
David Malone <dwmalone@FreeBSD.org> |
1) Const enough things to avoid warnings. 2) Cast ifdef_level to a size_t before comparing it to a ratio of size_ts. Ifdef_level should always be positive. 3) Complete prototype for chfont. 4) Cas
1) Const enough things to avoid warnings. 2) Cast ifdef_level to a size_t before comparing it to a ratio of size_ts. Ifdef_level should always be positive. 3) Complete prototype for chfont. 4) Cast some ptrdiff_ts to ints before using as a field width. 5) Avoid shadowing a local variable p with another local variable p.
show more ...
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
7916863d |
| 28-Oct-2001 |
Jens Schweikhardt <schweikh@FreeBSD.org> |
Make this compile cleanly when warnings are enabled: - ANSIfy function declarations - braces around initializers structs within structs - add parens in complicated expressions - disambiguate dang
Make this compile cleanly when warnings are enabled: - ANSIfy function declarations - braces around initializers structs within structs - add parens in complicated expressions - disambiguate dangling elses - no more implicit int - make functions static where possible - use prototypes - don't use varargs hack for diag()
Requested by: joerg MFC after: 2 weeks
show more ...
|
Revision tags: release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs |
|
#
8c7e7698 |
| 30-Mar-2002 |
David Malone <dwmalone@FreeBSD.org> |
1) Const enough things to avoid warnings. 2) Cast ifdef_level to a size_t before comparing it to a ratio of size_ts. Ifdef_level should always be positive. 3) Complete prototype for chfont. 4) Cas
1) Const enough things to avoid warnings. 2) Cast ifdef_level to a size_t before comparing it to a ratio of size_ts. Ifdef_level should always be positive. 3) Complete prototype for chfont. 4) Cast some ptrdiff_ts to ints before using as a field width. 5) Avoid shadowing a local variable p with another local variable p.
show more ...
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
7916863d |
| 28-Oct-2001 |
Jens Schweikhardt <schweikh@FreeBSD.org> |
Make this compile cleanly when warnings are enabled: - ANSIfy function declarations - braces around initializers structs within structs - add parens in complicated expressions - disambiguate dang
Make this compile cleanly when warnings are enabled: - ANSIfy function declarations - braces around initializers structs within structs - add parens in complicated expressions - disambiguate dangling elses - no more implicit int - make functions static where possible - use prototypes - don't use varargs hack for diag()
Requested by: joerg MFC after: 2 weeks
show more ...
|