FRIGN
8db1632409
Drop maxdigits in expr(1)
...
This just begs for off-by-ones. Just drop it and use BUFSIZ.
We'll survive it.
2015-03-23 22:56:26 +01:00
FRIGN
f668afa1ff
Style fix in expr(1)
...
(*valp). --> valp->
2015-03-23 22:44:07 +01:00
FRIGN
50ecbd43ad
Can't use sizeof on malloc'ed array in expr(1)
...
Thanks emg for reporting this!
2015-03-23 22:31:36 +01:00
FRIGN
d49f6f2044
Audit expr(1)
...
No bugs found, but I changed intmax_t to long long to make it more
predictable and removed some of the kitchen-sinking.
Don't return structs themselves, as this is not very elegant.
Do it like functions like stat(), which take a pointer to a
struct to fill.
2015-03-22 14:35:15 +01:00
Evan Gates
cf5114a133
untypedef expr, find, test, as is existing style in sbase
2015-03-17 20:04:26 +00:00
Evan Gates
07c4f784a6
don't mix declarations and code (and one ** to *[])
2015-03-06 07:33:58 +00:00
FRIGN
7cc4ef0734
Don't break the coding-style
2015-02-26 19:07:02 +01:00
Evan Gates
bf4c5d1fcd
expr comments, cleanup, UTF-8 support
2015-02-26 17:26:47 +00:00
FRIGN
b47dab2d4d
Don't be too pedantic in expr.c
2015-02-20 13:45:57 +01:00
Hiltjo Posthuma
31f0624f3d
code-style: minor cleanup and nitpicking
2015-02-20 13:29:38 +01:00
FRIGN
31572c8b0e
Clean up #includes
2015-02-14 21:12:23 +01:00
Jakob Kramer
0fcad66c75
make use of en*alloc functions
2015-02-11 01:17:21 +00:00
sin
6f73cd1c97
Relax with caps in usage
2015-01-25 18:31:25 +00:00
FRIGN
b98bf41ecc
Add mandoc-manpage for expr(1)
...
and mark it as finished in README.
Upon further checking, expr(1) turns out to be implicitly UTF-8 compliant.
2015-01-25 16:49:46 +01:00
FRIGN
85df198b59
Refactor expr.c
...
Finish up what has been begun.
2014-11-17 15:05:49 +00:00
FRIGN
abdd0671f7
Refactor expr.c
2014-11-17 10:05:19 +00:00
sin
7b8d7fb78e
Fix uninitialized use of ret in expr(1)
2014-11-16 14:52:44 +00:00
Hiltjo Posthuma
b3ae1a7b4b
expr: improvements
...
- handle divide by zero.
- use eregcomp().
- use emalloc().
- use snprintf() for safety and add a buffer size argument to valstr() just
to be sure.
- code-style fixes.
2014-11-16 14:37:22 +00:00
sin
da715252b3
Add license heading at the top in expr.c
2014-11-16 12:57:54 +00:00
sin
15097f6ab3
Don't use C++ type comments
2014-11-16 12:54:47 +00:00
Evan Gates
6240d26beb
new expr using shunting-yard instead of recursive descent (this time with tabs)
2014-11-16 12:52:48 +00:00
sin
41d78c398b
Staticise symbols
2014-10-16 12:30:52 +01:00
sin
a1784b721d
Fix build error
...
Remove __dead.
2014-09-29 14:10:54 +01:00
sin
618aecd2ec
Import expr(1) from OpenBSD
...
Cleanup + manpage to be done.
2014-09-29 13:44:49 +01:00