aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/units
Commit message (Collapse)AuthorAgeFilesLines
* capsicum: use a new capsicum helpers in toolsMariusz Zaborski2018-11-041-2/+1
| | | | | | | Use caph_{rights,ioctls,fcntls}_limit to simplify the code. Notes: svn path=/head/; revision=340138
* Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.Mariusz Zaborski2018-06-191-3/+3
| | | | | | | No functional change intended. Notes: svn path=/head/; revision=335395
* units: fix some nitsEitan Adler2018-06-161-4/+5
| | | | | | | | | - prefer braces to abusing the `,` operator - mark dead function as dead - remove dead break Notes: svn path=/head/; revision=335265
* units(1): units(1) free savescr in error condition tooEitan Adler2018-01-151-2/+8
| | | | | | | | | CID: 978392 Reviewed by: des MFC After: 1 week Notes: svn path=/head/; revision=328008
* units(1): add missing ':' for two short argumentsEitan Adler2018-01-051-1/+1
| | | | | | | | PR: 209850 MFC After: 3 days Notes: svn path=/head/; revision=327578
* 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
* Update URLs in usr.binEitan Adler2017-10-291-3/+3
| | | | | | | | | - http -> https - contents have moved locations - removal of URL if I could not find new location Notes: svn path=/head/; revision=325095
* Add supporting changes for `Add limited sandbox capability to "make check"`Enji Cooper2017-08-141-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-tests/... changes: - Add HAS_TESTS= to Makefiles with libraries and programs to enable iteration and propagate the appropriate environment down to *.test.mk. tests/... changes: - Add appropriate support Makefile.inc's to set HAS_TESTS in a minimal manner, since tests/... is a special subdirectory tree compared to the others. MFC after: 2 months MFC with: r322511 Reviewed by: arch (silence), testing (silence) Differential Revision: D12014 Notes: svn path=/head/; revision=322515
| * Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-021-0/+1
| | | | | | | | | | | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
* | Correct the -H longopt equivillantSevan Janiyan2017-08-121-2/+2
|/ | | | | | | | | | PR: 209876 Submitted by: <kdrakehp AT zoho DOT com> Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D11988 Notes: svn path=/head/; revision=322424
* Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-021-3/+1
| | | | | | | | | | | | | | directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Notes: svn path=/head/; revision=321912
* Escape No to avoid confusion with the No macroBaptiste Daroussin2017-02-111-9/+9
| | | | | | | | Reported by: make manlint MFC after: 2 days Notes: svn path=/head/; revision=313664
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* Bring a little more compability with GNU units 2.12Eitan Adler2016-04-212-14/+34
| | | | | | | | | | | | | | - notionally support a 'history file' flag. This doesn't do much now, but is there to prevent scripts written against GNU units from breaking - correctly gracefully quit rather than exit (this will make it easier to support a history file in the future) - remove the "t" flag from fopen which was there to support windows. We have not supported windows since at the latest, the introduction of capsicum. Notes: svn path=/head/; revision=298388
* Fix build breakage introduced by r298253.Xin LI2016-04-191-1/+1
| | | | Notes: svn path=/head/; revision=298257
* Rename units.lib -> definitions.unitsEitan Adler2016-04-193-3/+167
| | | | | | | | - this matches GNU units 2.12 add ISO country codes from units 2.12 Notes: svn path=/head/; revision=298253
* Remove pathnames.hEitan Adler2016-04-192-34/+1
| | | | | | | | - it only holds a single constant - it doesn't exist in the GNU variant Notes: svn path=/head/; revision=298251
* MFHGlen Barber2016-03-101-0/+11
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-091-0/+11
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+4
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-121-2/+0
| | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* Fix interaction between libedit initialization and CapsicumEdward Tomasz Napierala2015-08-081-5/+7
| | | | | | | | | | | | | in units(1). The most visible is the removal of libedit warnings about being unable to open termcap database. Reviewed by: eadler@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3322 Notes: svn path=/head/; revision=286446
* Only initialize libedit when necessaryJulio Merino2015-06-281-13/+14
| | | | | | | | | | | | | | | | | The code path to support units conversions from the command line need not initialize neither libedit nor the history. Therefore, only do that when in interactive mode. This hides the issue reported in PR bin/201167 whereby running commands of the form 'echo "$(units ft in)"' would corrupt the terminal. The real issue causing the corruption most likely still remains somewhere. PR: bin/201167 Differential Revision: D2935 Reviewed by: eadler Notes: svn path=/head/; revision=284912
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-2/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-197-93/+191
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | 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
| * | New/updated dependenciesSimon J. Gerraty2014-05-051-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265381
| * | Merge headSimon J. Gerraty2014-04-284-64/+154
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | 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
* | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|/ |/| | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | Fix structure of new tests (r268794) for usr.bin/units.Julio Merino2014-07-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make sure the tests go into the right directory. The location was wrong so they were overwriting the bin/chown tests! - Use the right naming scheme for the test program. - Remove the svn:executable property from the shell script. Notes: svn path=/head/; revision=269084
* | | Replace all uses of libncurses and libtermcap with their wide characterBrooks Davis2014-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy of the curses library. Exp-run: antoine PR: 189842 Discussed with: bapt Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=268804
* | | units(1): Add basic testsEitan Adler2014-07-173-0/+37
| | | | | | | | | | | | | | | | | | | | | Add some tests to help avoid breaking units Notes: svn path=/head/; revision=268794
* | | units(1): Add support for output-formatEitan Adler2014-07-172-14/+50
| | | | | | | | | | | | | | | | | | | | | | | | Add support for the output-format argument. This also exposes subtle rounding differences between GNU units and our units. Notes: svn path=/head/; revision=268792
* | | units(1): Clean upEitan Adler2014-07-051-18/+14
| | | | | | | | | | | | | | | | | | | | | Remove unused constant. Add 'static' where able. Notes: svn path=/head/; revision=268282
* | | units(1): Convert units.lib to use '#' instead of '/'.Eitan Adler2014-07-051-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | This allows us to run GNU units against our data files and compare the output. In addition, current units(1) does not support '/' as a comment at all. Notes: svn path=/head/; revision=268279
* | | units: Support start of line comments with '#'Eitan Adler2014-07-052-2/+2
| | | | | | | | | | | | | | | | | | | | | Modern GNU units(1) supports comments anywhere with '#' but take the easy route for now and at least support start of line # comments. Notes: svn path=/head/; revision=268278
* | | units(1): Add 'terse' supportEitan Adler2014-07-052-11/+24
| | | | | | | | | | | | | | | | | | | | | terse output is used when calling units from another script. Notes: svn path=/head/; revision=268277
* | | units(1): Add 'help' flagEitan Adler2014-07-042-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | - Add support for --help for compatibility - Make usage() static Notes: svn path=/head/; revision=268271
* | | units(1): Fix man pageEitan Adler2014-07-041-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Igor walks one way. I walked the other. Reported by: wblock Notes: svn path=/head/; revision=268270
* | | units(1): add long optionsEitan Adler2014-07-042-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Things brings additional compatibility with units 2.10 Discussed with: wblock (man page) Notes: svn path=/head/; revision=268269
* | | use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
* | | units(1): Fix minor typosEitan Adler2014-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | Obtained From: DragonflyBSD Notes: svn path=/head/; revision=266117
* | | units(1): call el_end()Eitan Adler2014-05-121-0/+1
| | | | | | | | | | | | | | | | | | | | | Add missing el_end() call Notes: svn path=/head/; revision=265907