summaryrefslogtreecommitdiff
path: root/usr.bin/wc
Commit message (Collapse)AuthorAgeFilesLines
* wc(1): document SIGINFO handling in the manual page.Eugene Grosbein2020-04-111-1/+13
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=359801
* wc(1): account for possibility of file == NULLKyle Evans2020-02-051-2/+2
| | | | | | | | | | | | 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
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-1/+2
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* Add Makefile.depend.optionsSimon J. Gerraty2019-12-111-0/+8
| | | | | | | | | | | | | | | | | | | | Leaf directories that have dependencies impacted by options need a Makefile.depend.options file to avoid churn in Makefile.depend DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc can be set in local.dirdeps-options.mk which can add to those set in Makefile.depend.options See share/mk/dirdeps-options.mk Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22469 Notes: svn path=/head/; revision=355616
* cap_fileargs: chase r346315, update fileargs_init in consumersEd Maste2019-04-171-1/+1
| | | | | | | | | | 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
* s/caph_enter_capser/caph_enter_casper/gMariusz Zaborski2018-11-121-1/+1
| | | | | | | Reported by: npn Notes: svn path=/head/; revision=340382
* s/caph_enter_with_casper/caph_enter_casper/Mariusz Zaborski2018-11-121-1/+1
| | | | | | | Reported by: npn Notes: svn path=/head/; revision=340380
* wc: We should sandbox wc only if Capers is available.Mariusz Zaborski2018-11-121-1/+1
| | | | Notes: svn path=/head/; revision=340377
* wc: sandbox wc using capsicumMariusz Zaborski2018-11-122-1/+37
| | | | | | | | Reviewed by: AllanJude, emaste Differential Revision: https://reviews.freebsd.org/D14409 Notes: svn path=/head/; revision=340374
* wc(1): Fix 'wc -L'Conrad Meyer2018-08-022-13/+12
| | | | | | | | | | | | | | | | 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
* wc(1): Restore regular file char count fast pathConrad Meyer2017-12-101-44/+41
| | | | | | | | | | | | | 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): Extend non-controversial optimizations to '-c' modeConrad Meyer2017-12-091-50/+51
| | | | | | | | | | | | | | | | | | | | | | 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
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | 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
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | 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
* Add more text to explain --libxo flag.Craig Rodrigues2015-12-011-1/+8
| | | | Notes: svn path=/head/; revision=291607
* Make libxo depend on libutil because it uses humanize_number after r287111Enji Cooper2015-10-181-1/+1
| | | | | | | | | | | Remove overlinking in lib/libxo/tests, sbin/savecore, and usr.bin/{iscsictl,wc,xo} PR: 203673 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289490
* Update META_MODE dependencies.Bryan Drewery2015-09-171-0/+1
| | | | Notes: svn path=/head/; revision=287905
* Upgrade libxo to 0.4.5.Marcel Moolenaar2015-08-241-1/+1
| | | | | | | | | | Local changes incorporated by 0.4.5: r284340 Local changes retained: r276260, r282117 Obtained from: https://github.com/Juniper/libxo Notes: svn path=/head/; revision=287111
* Clean out some externally visible "more then" grammarPedro F. Giffuni2015-08-111-2/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=286615
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge sync of headSimon J. Gerraty2015-05-272-3/+15
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated/new dependenciesSimon J. Gerraty2014-11-191-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=274694
| * Merge from head@274682Simon J. Gerraty2014-11-193-19/+45
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * | 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/+19
| | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | Fix SIGINFO race causing final results to be lost to stderr.Bryan Drewery2015-04-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Close the file list before opening the container that holds theMarcel Moolenaar2015-02-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |/ |/| | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | Fix a SIGSEGV when emitting XML or JSON when reading stdin. In thatMarcel Moolenaar2014-11-071-3/+1
| | | | | | | | | | | | | | case the file variable is NULL. Notes: svn path=/head/; revision=274210
* | Separate references by a comma.Marcel Moolenaar2014-11-061-2/+2
| | | | | | | | Notes: svn path=/head/; revision=274180
* | Document that wc(1) supports libxo(3).Marcel Moolenaar2014-11-051-1/+4
| | | | | | | | Notes: svn path=/head/; revision=274126
* | Convert to use libxo.Marcel Moolenaar2014-11-052-17/+42
|/ | | | | | | | Obtained from: Phil Shafer <phil@juniper.net> Sponsored by: Juniper Networks, Inc. Notes: svn path=/head/; revision=274125
* Add missing static keywords to wc(1)Ed Schouten2011-11-061-2/+2
| | | | Notes: svn path=/head/; revision=227201
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-112-8/+0
| | | | | | | | | | | | 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
* Use better type for siginfo (volatile sig_atomic_t instead of int).Pawel Jakub Dawidek2010-05-171-1/+2
| | | | | | | Pointed out by: jh Notes: svn path=/head/; revision=208210
* On SIGINFO print current values on stderr.Pawel Jakub Dawidek2010-05-161-44/+68
| | | | Notes: svn path=/head/; revision=208170
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Add missing `void' keyword for function without arguments.Ed Schouten2009-12-291-1/+1
| | | | Notes: svn path=/head/; revision=201181
* Add a -L option to wc(1), for finger compatibility with the GNUGiorgos Keramidas2008-12-062-11/+60
| | | | | | | | | | | | | 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
* Prevent a line from being broken on a line boundary.Ruslan Ermilov2006-12-211-1/+1
| | | | Notes: svn path=/head/; revision=165455
* Improve markup.Ruslan Ermilov2006-12-211-4/+9
| | | | Notes: svn path=/head/; revision=165454
* Fix mismerge.Tom Rhodes2005-02-261-1/+1
| | | | | | | Noticed by: tjr Notes: svn path=/head/; revision=142544
* Add better mdoc(7) mark up, clean up wording, better describe the effectsTom Rhodes2005-02-231-6/+23
| | | | | | | | | | | of some arguments. PR: 47705 Based on a patch submitted by: Gary W. Swearingen <swear@attbi.com> Glanced at by: simon Notes: svn path=/head/; revision=142332
* Expand *n't contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141846
* Sort sections.Ruslan Ermilov2005-01-181-4/+4
| | | | Notes: svn path=/head/; revision=140420