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.
- 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.
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
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
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.
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
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)
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
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.