aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/asa
Commit message (Collapse)AuthorAgeFilesLines
* asa: Rewrite to fix line termination issue.Dag-Erling Smørgrav2024-01-092-58/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | 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
* asa: Add some unit tests.Dag-Erling Smørgrav2023-06-153-2/+106
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40564
* asa: Read from stdin if *argv is "-".Dag-Erling Smørgrav2023-06-151-7/+12
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40563
* asa: Error out if writing to stdout failed.Dag-Erling Smørgrav2023-06-151-0/+6
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40562
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-1/+3
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+18
|/ | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-05-211-1/+1
| | | | Notes: svn path=/head/; revision=146466
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* mdoc(7) police: minor markup nits.Ruslan Ermilov2002-05-301-11/+23
| | | | Notes: svn path=/head/; revision=97597
* #include <unistd.h> for getopt() and friends.Tim J. Robbins2002-05-151-0/+1
| | | | | | | | PR: 36130 Approved by: mike Notes: svn path=/head/; revision=96629
* Use getopt() to reject options (asa has none), and to the "--" end of optionsTim J. Robbins2002-05-152-21/+38
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=96628
* Remove __P,Tim J. Robbins2002-05-151-7/+3
| | | | | | | | | | | | Don't prototype main(), C89-style function declarations, char **argv -> char *argv[] for main() PR: 36130 Approved by: mike Notes: svn path=/head/; revision=96627
* style(9): remove space between function name and opening parentheses,Tim J. Robbins2002-05-151-23/+21
| | | | | | | | | | | sort variables, NULL is the null-pointer constant, remove unnecessary braces. PR: 36130 Approved by: mike Notes: svn path=/head/; revision=96626
* Add the POSIX.2 asa utility, which interprets FORTRAN carriage-controlTim J. Robbins2002-05-153-0/+221
characters. PR: 36130 Approved by: mike Obtained from: NetBSD Notes: svn path=/head/; revision=96625