| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes to units.1:
- Change the description to a more descriptive "conversion calculator".
- Sort options.
- Split the description into sections to make it easier to navigate the
manual page.
- Improve the description of various options.
- Document the default value of the output format.
- Use more mdoc macros for better readability.
- Document the behavior of the PATH environmental variable.
- Improve examples.
- Add sections: EXIT STATUS, DIAGNOSTICS, and HISTORY.
- Document that units(1) cannot convert negative values and it handles long
unit lists poorly.
- Update the documentation of the -V flag to match the implementation.
units(1) prints its version and the units data file instead of its
version and usage information.
Changes to units.c:
- Update usage information.
- Sort longopts elements.
This commit does not attempts to change the current behavior of units(1).
What's left to do is probably defining a better versioning (at the moment
units(1) always reports "FreeBSD units" as its version) and changing the
behavior of the -V flag to only print version.
Reviewed by: allanjude (earlier version), bcr
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D18977
Notes:
svn path=/head/; revision=357449
|
| |
|
|
|
|
|
| |
Use caph_{rights,ioctls,fcntls}_limit to simplify the code.
Notes:
svn path=/head/; revision=340138
|
| |
|
|
|
|
|
| |
No functional change intended.
Notes:
svn path=/head/; revision=335395
|
| |
|
|
|
|
|
|
|
| |
- prefer braces to abusing the `,` operator
- mark dead function as dead
- remove dead break
Notes:
svn path=/head/; revision=335265
|
| |
|
|
|
|
|
|
|
| |
CID: 978392
Reviewed by: des
MFC After: 1 week
Notes:
svn path=/head/; revision=328008
|
| |
|
|
|
|
|
|
| |
PR: 209850
MFC After: 3 days
Notes:
svn path=/head/; revision=327578
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
| |
- this matches GNU units 2.12
add ISO country codes from units 2.12
Notes:
svn path=/head/; revision=298253
|
| |
|
|
|
|
|
|
| |
- it only holds a single constant
- it doesn't exist in the GNU variant
Notes:
svn path=/head/; revision=298251
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 support for the output-format argument. This also exposes subtle
rounding differences between GNU units and our units.
Notes:
svn path=/head/; revision=268792
|
| |
|
|
|
|
|
| |
Remove unused constant. Add 'static' where able.
Notes:
svn path=/head/; revision=268282
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
terse output is used when calling units from another script.
Notes:
svn path=/head/; revision=268277
|
| |
|
|
|
|
|
|
| |
- Add support for --help for compatibility
- Make usage() static
Notes:
svn path=/head/; revision=268271
|
| |
|
|
|
|
|
|
|
| |
Things brings additional compatibility with units 2.10
Discussed with: wblock (man page)
Notes:
svn path=/head/; revision=268269
|
| |
|
|
|
|
|
| |
Obtained From: DragonflyBSD
Notes:
svn path=/head/; revision=266117
|
| |
|
|
|
|
|
| |
Add missing el_end() call
Notes:
svn path=/head/; revision=265907
|
| |
|
|
|
|
|
|
|
| |
- Unbreak the -f option: it was missing a ':'
- gunits -V spits out more information than just its version: attempt to do so
as well.
Notes:
svn path=/head/; revision=265904
|
| |
|
|
|
|
|
| |
No need to replicate strdup
Notes:
svn path=/head/; revision=265903
|
| |
|
|
|
|
|
|
|
|
| |
For better readability, don't compare pointers with 0 or assign 0
to them. Use NULL instead.
Inspired by: DragonflyBSD
Notes:
svn path=/head/; revision=264475
|
| |
|
|
|
|
|
| |
Inspired by: DragonflyBSD
Notes:
svn path=/head/; revision=264474
|
| |
|
|
|
|
|
|
|
|
| |
For increased compatibility with GNU units: support a -v option which
produces more verbose output when spitting out the answer.
GNU -v does additional work in the version, information, and check output which
we do not (yet?) replicate.
Notes:
svn path=/head/; revision=264470
|
| |
|
|
|
|
|
|
| |
For increased compatibility with GNU units: support a -U option which tests for the
existence of the default units file and prints it to the screen.
Notes:
svn path=/head/; revision=264463
|
| |
|
|
|
|
|
|
| |
GNU units(1) supports reading up to 25 -f options. We support an arbitrary
number.
Notes:
svn path=/head/; revision=264462
|
| |
|
|
|
|
|
|
| |
Parse the config file after setting the defaults to permit the user to change
things (e.g., editing mode)
Notes:
svn path=/head/; revision=264459
|
| |
|
|
|
|
|
|
|
| |
Add line editing and history support to units(1) via libedit.
Reviewed by: bdrewery
Notes:
svn path=/head/; revision=264458
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The units program is likely little used. It is even less likely that a script
will want the units program to print out its version number by passing -v.
GNU units uses -V for version and -v for verbosity.
Increase compatibility between these two versions (written by the same author)
by switching our flag as well.
Take this opportunity to remove bogus information about the version number and
just call it 'FreeBSD units'.
Discussed with: cperciva, rwatson
Notes:
svn path=/head/; revision=264216
|
| |
|
|
| |
Notes:
svn path=/head/; revision=263940
|
| |
|
|
| |
Notes:
svn path=/head/; revision=227194
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than linear relations. We can now convert degC to degF.
586 units, 56 prefixes
You have: 24 degC
You want: degF
75.2
You have: degC
You want: K
(-> x*1 +273.15)
(<- y*1 -273.15)
Notes:
svn path=/head/; revision=181786
|
| |
|
|
| |
Notes:
svn path=/head/; revision=100826
|
| |
|
|
| |
Notes:
svn path=/head/; revision=78698
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Fix a bug where the recursion on prefixes where if recusrion failed
then the next attempt started too far along the string.
2) Up some internal limits that we were about to hit off.
3) Change the constness and signedness of some things and complete missing
prototypes.
4) Remove the readerror function 'cos it could print out the wrong
wrong file name. Replace it with more useful error messages.
5) Use sizeof when passing buffers to fgets.
6) Warn about empty prefix definitions.
Reviewed by: iedowse
Notes:
svn path=/head/; revision=73229
|
| |
|
|
|
|
|
|
|
| |
Some string-related cleanups inspired by OpenBSD.
Reviewed by: asmodai
Notes:
svn path=/head/; revision=64053
|
| |
|
|
| |
Notes:
svn path=/head/; revision=50477
|
| |
|
|
| |
Notes:
svn path=/head/; revision=28502
|
| |
|
|
| |
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
|
| |
|
|
|
|
|
| |
Remove ';' typo attached to if statement.
Notes:
svn path=/head/; revision=16190
|
|
|
Submitted by: Jeremy Prior
Obtained from: NetBSD
Notes:
svn path=/vendor/NetBSD/dist/; revision=16186
|