#
c2356a44 |
| 09-Jan-2024 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
asa: Rewrite to fix line termination issue.
The standard is somewhat unclear, but on the balance, I believe that the phrase “the rest of the input line” should be interpreted to mean the rest of the
asa: Rewrite to fix line termination issue.
The standard is somewhat unclear, but on the balance, I believe that the phrase “the rest of the input line” should be interpreted to mean the rest of the input line including the terminating newline if and only if there is one. This means the current implementation is incorrect on two points:
- First, it suppresses the previous line's newline in the '1' case.
- Second, it unconditionally emits a newline at the end of the output for non-empty input, even if the input did not end with a newline.
Resolve this by rewriting the main loop. Instead of special-casing the first line and then assuming that every line ends with a newline, we remember how each line ends and emit that either at the beginning of the next line or at the end of the file except in the one case ('+') where the standard explicitly says not to.
While here, try to reduce diff to upstream a little and update their RCS tag to reflect the fact that while we've diverged significantly from them, we've incorporated all their changes. Remove the useless second RCS tag.
We also update the tests to account for the change in interpretation of the '1' case and add a test case for unterminated input.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D43326
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/
|
#
498a0a9c |
| 07-Jul-2023 |
Alfonso Gregory <gfunni234@gmail.com> |
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dea
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2.
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
show more ...
|
#
f08f90e6 |
| 15-Jun-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
asa: Read from stdin if *argv is "-".
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40563
|
#
9e379f96 |
| 15-Jun-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
asa: Error out if writing to stdout failed.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40562
|
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, release/11.2.0 |
|
#
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, release/11.0.1, release/11.0.0, 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 |
|
#
f682f10c |
| 21-May-2005 |
Ruslan Ermilov <ru@FreeBSD.org> |
Sync program's usage() with manpage's SYNOPSIS.
|
Revision tags: 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 |
|
#
a3778ff6 |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
#include <unistd.h> for getopt() and friends.
PR: 36130 Approved by: mike
|
#
66562e1a |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Use getopt() to reject options (asa has none), and to the "--" end of options marker. Exit non-zero if we cannot open one of the input files. Update standards conformance and exit status statements i
Use getopt() to reject options (asa has none), and to the "--" end of options marker. Exit non-zero if we cannot open one of the input files. Update standards conformance and exit status statements in manual page.
PR: 36130 Approved by: mike
show more ...
|
#
8a99cbd5 |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Remove __P, Don't prototype main(), C89-style function declarations, char **argv -> char *argv[] for main()
PR: 36130 Approved by: mike
|
#
81c126e7 |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
style(9): remove space between function name and opening parentheses, sort variables, NULL is the null-pointer constant, remove unnecessary braces.
PR: 36130 Approved by: mike
|
#
3990fae7 |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Add the POSIX.2 asa utility, which interprets FORTRAN carriage-control characters.
PR: 36130 Approved by: mike Obtained from: NetBSD
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, 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 |
|
#
f682f10c |
| 21-May-2005 |
Ruslan Ermilov <ru@FreeBSD.org> |
Sync program's usage() with manpage's SYNOPSIS.
|
Revision tags: 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 |
|
#
a3778ff6 |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
#include <unistd.h> for getopt() and friends.
PR: 36130 Approved by: mike
|
#
66562e1a |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Use getopt() to reject options (asa has none), and to the "--" end of options marker. Exit non-zero if we cannot open one of the input files. Update standards conformance and exit status statements i
Use getopt() to reject options (asa has none), and to the "--" end of options marker. Exit non-zero if we cannot open one of the input files. Update standards conformance and exit status statements in manual page.
PR: 36130 Approved by: mike
show more ...
|
#
8a99cbd5 |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Remove __P, Don't prototype main(), C89-style function declarations, char **argv -> char *argv[] for main()
PR: 36130 Approved by: mike
|
#
81c126e7 |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
style(9): remove space between function name and opening parentheses, sort variables, NULL is the null-pointer constant, remove unnecessary braces.
PR: 36130 Approved by: mike
|
#
3990fae7 |
| 15-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Add the POSIX.2 asa utility, which interprets FORTRAN carriage-control characters.
PR: 36130 Approved by: mike Obtained from: NetBSD
|