summaryrefslogtreecommitdiff
path: root/bin/expr
AgeCommit message (Collapse)Author
2024-07-15Remove residual blank line at start of MakefileWarner Losh
This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
2023-08-16Remove $FreeBSD$: two-line nroff patternWarner Losh
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16Remove $FreeBSD$: one-line sh patternWarner Losh
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16Remove $FreeBSD$: two-line .h patternWarner Losh
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-04-18Update/fix Makefile.depend for userlandSimon J. Gerraty
2018-04-14expr(1): Fix overflow detection when operand is INTMAX_MINConrad Meyer
PR: 227329 Submitted by: Tobias Stoeckmann <tobias AT stoeckmann.org> Notes: svn path=/head/; revision=332499
2017-10-31DIRDEPS_BUILD: Update dependencies.Bryan Drewery
Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
2017-08-02Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper
`SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
2017-08-02Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper
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
2016-10-05Document origins of expr & authorsSevan Janiyan
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1 PR: 173979 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Notes: svn path=/head/; revision=306719
2016-05-04Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper
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
2016-03-10MFHGlen Barber
Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
2016-03-09DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery
Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
2016-03-02MFHGlen Barber
Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
2016-02-24DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery
These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
2016-02-09Explicitly add unmarked bin/ binaries to the runtime package.Glen Barber
Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295439
2016-02-02First pass to fix the 'tests' packages.Glen Barber
Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
2015-10-12Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper
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
2015-06-13Add META_MODE support.Simon J. Gerraty
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
2015-06-08dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=284172
2015-05-27Merge sync of headSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=283595
2015-04-26Pet manlintBaptiste Daroussin
Notes: svn path=/head/; revision=282002
2015-04-26Use mdoc(7) macros for curly bracesBaptiste Daroussin
Notes: svn path=/head/; revision=281998
2015-03-22Build expr with -fwrapv, since it relies on signed integer wrappingDimitry Andric
having defined behavior. Reported by: rodrigc MFC after: 3 days Notes: svn path=/head/; revision=280357
2015-01-27Fix overflow check for multiplication:Stefan Eßer
- Add special test to detect the case of -1 * INTMAX_MIN - Protect against elimination of the test division by the optimizer Garrett Cooper noticed that the overflow checks were incomplete, and Bruce Evans suggested the use of the "volatile" qualifier to counter the effect of the undefined behaviour, when the prior multiplication caused overflow, and he also suggested improvements to the comments. Reviewed by: bde MFC after: 1 week Notes: svn path=/head/; revision=277798
2015-01-19Integrate contrib/netbsd-tests/bin/expr into the build/kyua as bin/expr/testsEnji Cooper
MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=277358
2014-05-16Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=266219
2014-05-10Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=265802
2013-09-05Merge from headSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=255263
2013-04-19Add the Clang specific -Wmissing-variable-declarations to WARNS=6.Ed Schouten
This compiler flag enforces that that people either mark variables static or use an external declarations for the variable, similar to how -Wmissing-prototypes works for functions. Due to the fact that Yacc/Lex generate code that cannot trivially be changed to not warn because of this (lots of yy* variables), add a NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this specific compiler warning. Announced on: toolchain@ Notes: svn path=/head/; revision=249657
2013-03-11Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=248169
2013-02-16Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=246868
2012-08-22Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar
Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
2012-05-22Remove redundant declaration of yyparseKevin Lo
Reported by: tinderbox Notes: svn path=/head/; revision=235771
2012-05-13Minor mdoc nits.Joel Dahl
Notes: svn path=/head/; revision=235400
2012-03-19rm[0].rm_so must be zero (an explicit check is made for zero in theEitan Adler
outer if condition) Reviewed by: se Approved by: cperciva Notes: svn path=/head/; revision=233137
2012-02-25Whitespace cleanup:Glen Barber
o Wrap sentences on to new lines o Cleanup trailing whitespace Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157 Notes: svn path=/head/; revision=232158
2012-02-25Fix various typos in manual pages.Glen Barber
Submitted by: amdmi3 PR: 165431 MFC after: 1 week Notes: svn path=/head/; revision=232157
2011-07-09Fix style, since this file has just been touched in a major way.Stefan Eßer
No actual code changes. Notes: svn path=/head/; revision=223883
2011-07-09Some refactoring for easier maintenance of the code. This is a follow-upStefan Eßer
to re-establishment of 64bit arithmetic, but is committed separately, to not obscure that conversion. This commit does not change the observed behaviour of expr in any way. Style will be fixed in a follow-up commit. Notes: svn path=/head/; revision=223882
2011-07-09Make /bin/expr support 64bit numeric range and range checks by default,Stefan Eßer
again. This brings back the behaviour of expr in FreeBSD-4, which had been reverted due to an assumed incompatbility with POSIX.1 for FreeBSD-5. This issue has been discussed in the freebsd-standards list, and the consensus was, that POSIX.1 is in fact not violated by this extension, since it affects only cases of POSIX undefined behaviour (overflow of signed long). Other operating systems did upgrade their versions of expr to support 64bit range, after it had been initially brought to FreeBSD. They have used it for a decade without problems, meanwhile. The -e option is retained, but it will only select less strict checking of numeric parameters (leading white-space, leading "+" are allowed and skipped, an empty string is considered to represent 0 in numeric context.) The call of check_utility_compat() as a means of establishing backwards compatibility with FreeBSD-4 is considered obsolete, but preserved in this commit. It is expected to be removed in a later revision of this file. Reviewed by: bde, das, jilles MFC after: 2 month (those parts that do not violate POLA) Notes: svn path=/head/; revision=223881
2010-09-09expr(1): Add sh(1) versions of examples, remove an incorrect example.Jilles Tjoelker
The three examples are better done using sh(1) itself these days. The example expr -- "$a" : ".*" is incorrect in the general case, as "$a" may be an operator. MFC after: 2 weeks Notes: svn path=/head/; revision=212390
2007-03-04Fix markup.Ruslan Ermilov
Notes: svn path=/head/; revision=167210
2007-02-18Correct typos containing my login name (plus one more in expr.y).Ceri Davies
Found courtesy of a recursive grep in the wrong directory. Notes: svn path=/head/; revision=166813
2005-01-16Add the new standard EXIT STATUS section where appropriate.Ruslan Ermilov
Sort standard sections in the (documented) preferred order. Notes: svn path=/head/; revision=140353
2005-01-13Removed harmful empty lines that crept in during the copyrightRuslan Ermilov
header update. Notes: svn path=/head/; revision=140169
2005-01-10/*- or .\"- or #- to begin license clauses.Warner Losh
Notes: svn path=/head/; revision=139969
2004-07-12Remove BUGS section that talked about missing multibyte character support.Tim J. Robbins
We have support now that the regular expression routines do. Notes: svn path=/head/; revision=132029
2004-07-03Document missing multibyte character handling in utilities specifiedTim J. Robbins
by POSIX. Notes: svn path=/head/; revision=131513
2003-06-13Get this area compiling with the highest WARNS= that it works with.Mark Murray
Obsolete WFORMAT= junk also removed where possible. OK'ed by: obrien Tested on: sparc64, alpha, i386 Notes: svn path=/head/; revision=116282