| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
file could reasonably be NULL here if we we're using stdin. Albeit less
likely in normal usage, one could actually hit either of these warnings on
stdin.
ubmitted by: sigsys@gmail.com
MFC after: 3 days
Notes:
svn path=/head/; revision=357572
|
|
|
|
|
|
|
|
|
|
| |
Reported by: ci.freebsd.org (8 times so far)
MFC after: 3 weeks
MFC with: r346315
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=346316
|
|
|
|
|
|
|
| |
Reported by: npn
Notes:
svn path=/head/; revision=340382
|
|
|
|
|
|
|
| |
Reported by: npn
Notes:
svn path=/head/; revision=340380
|
|
|
|
| |
Notes:
svn path=/head/; revision=340377
|
|
|
|
|
|
|
|
| |
Reviewed by: AllanJude, emaste
Differential Revision: https://reviews.freebsd.org/D14409
Notes:
svn path=/head/; revision=340374
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I inadvertently broke 'wc -L' in r326736. We must skip the fast path if -L
was specified, in addition to the existing check for the -l option.
Document long-standing -L behavior (count varies depending on whether wc(1)
is run with the -m option or not) in wc.1. That behavior dates back to the
introduction of the -L option, but was not documented.
PR: 230300
Reported by: <amstrnad+bugzilla AT gmail.com>
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=337203
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fstat(2) is going to be a lot faster than reading all of the bytes in a
file, if we just need a character count for a regular file. This fast path
was accidentally broken in r326736.
PR: 224160
Reported by: bde
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=326749
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wc(1)'s slow path for counting words or multibyte characters requires
conversion of the 8-bit input stream to wide characters. However, a faster
path can be used for counting only lines ('-l' -- newlines have the same
representation in all supported encodings) or bytes ('-c').
The existing line count optimization was not used if the input was the
implicit stdin. Additionally, it wasn't used if only byte counting was
requested. This change expands the fast path to both of these scenarios.
Expanding the buffer size from 64 kB helps reduce the number of read(2)
calls needed, but exactly what impact that change has and what size to
expand the buffer to are still under discussion.
PR: 224160
Tested by: wosch (earlier version)
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=326736
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 3-Clause license.
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.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Notes:
svn path=/head/; revision=326025
|
|
|
|
|
|
|
|
|
|
|
|
| |
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
Notes:
svn path=/head/; revision=314436
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a SIGINFO comes in after the file is read then the 'siginfo' flag is set to
1 and the next call to show_cnt() (at exit) would print the data to stderr
rather than the expected stdout.
This was found with spamming Poudriere with SIGINFO which caused a 'wc -l'
execution to return no data rather than an expected number.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=281617
|
|
|
|
|
|
|
|
|
|
|
| |
totals, otherwise we end up emitting invalid JSON -- provided
libxo does not prevent us from doing that.
PR: 197499
Submitted by: allanjude@
Notes:
svn path=/head/; revision=278590
|
|
|
|
|
|
|
| |
case the file variable is NULL.
Notes:
svn path=/head/; revision=274210
|
|
|
|
|
|
|
|
| |
Obtained from: Phil Shafer <phil@juniper.net>
Sponsored by: Juniper Networks, Inc.
Notes:
svn path=/head/; revision=274125
|
|
|
|
| |
Notes:
svn path=/head/; revision=227201
|
|
|
|
|
|
|
|
|
|
|
|
| |
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
Also add $FreeBSD$ to a few files to keep svn happy.
Discussed with: imp, rwatson
Notes:
svn path=/head/; revision=216370
|
|
|
|
|
|
|
| |
Pointed out by: jh
Notes:
svn path=/head/; revision=208210
|
|
|
|
| |
Notes:
svn path=/head/; revision=208170
|
|
|
|
| |
Notes:
svn path=/head/; revision=201181
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wc utility. The -L option can be used to report the length of
the longest line wc has seen in one or more files. It is
disabled by default, and wc uses the standard `-lwc'.
Submitted by: Sheldon Givens, sheldon at sigsegv.ca
Reviewed by: kib
MFC after: 1 week
Notes:
svn path=/head/; revision=185714
|
|
|
|
|
|
|
|
|
| |
Add FreeBSD Id to Makefile.
Approved by: ssouhlal
Notes:
svn path=/head/; revision=139364
|
|
|
|
|
|
|
|
| |
simplify the read buffering now that we can feed partial multibyte
characters to mbrtowc().
Notes:
svn path=/head/; revision=128049
|
|
|
|
| |
Notes:
svn path=/head/; revision=101670
|
|
|
|
|
|
|
|
|
| |
a space or not.
Noticed by: bde
Notes:
svn path=/head/; revision=98291
|
|
|
|
|
|
|
| |
was opened, not the link itself. Remove dead code.
Notes:
svn path=/head/; revision=98245
|
|
|
|
|
|
|
|
|
|
| |
counts bytes). In locales that don't have multibyte characters, -m
is effectively an alias for -c.
This brings wc(1) up to P1003.1-2001 conformance.
Notes:
svn path=/head/; revision=98165
|
|
|
|
| |
Notes:
svn path=/head/; revision=92922
|
|
|
|
|
|
|
|
|
| |
is to put a copyright in the object file.
Submitted by: bde
Notes:
svn path=/head/; revision=91792
|
|
|
|
|
|
|
|
|
| |
Make use of `static' storage-class for local functions.
Replace uses of `u_quad_t' with `uintmax_t'.
Notes:
svn path=/head/; revision=91481
|
|
|
|
|
|
|
| |
Not added to Makefgile as WARNS=2 will be made default.
Notes:
svn path=/head/; revision=87676
|
|
|
|
| |
Notes:
svn path=/head/; revision=50477
|
|
|
|
|
|
|
| |
Requested by: bde
Notes:
svn path=/head/; revision=49685
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
u_quad_int instead of u_long for counters. (NetBSD's rev 1.15 - 1.18)
Deprecate register. (NetBSD's rev 1.13)
The diffs from NetBSD were not applied verbatim, because we don't care
about NO_QUAD right now.
PR: 12959
Reported by: Nicholas Barnes <nb@ravenbrook.com>
Obtained from: NetBSD
Notes:
svn path=/head/; revision=49461
|
|
|
|
| |
Notes:
svn path=/head/; revision=28696
|
|
|
|
|
|
|
| |
posix standard on the topic.
Notes:
svn path=/head/; revision=24360
|
|
|
|
| |
Notes:
svn path=/head/; revision=23012
|
|
|
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
Notes:
svn path=/head/; revision=21673
|
|
|
|
|
|
|
|
|
|
| |
if there was a per-file error. My test case of `wc /proc/curproc/*'
works reasonably now (much like `size /proc/curproc/*'.
Reviewed by: wosch
Notes:
svn path=/head/; revision=15233
|
|
|
|
|
|
|
| |
until someone rewrite wc(1).
Notes:
svn path=/head/; revision=15179
|
|
|
|
| |
Notes:
svn path=/head/; revision=13380
|
|
Notes:
svn path=/cvs2svn/branches/CHRISTOS/; revision=1590
|