schwarze
da79231ed2
Fix three more buglets:
...
1. Another off-by-one: if a mail file name ends in an (escaped)
percent sign, do not forget to check whether the next byte is the
percent sign introducing the message (MAILPATH='filename\%%msg').
2. If the message is empty, use the default message rather than
printing a blank line (MAILPATH='filename%').
3. If the file name is empty, don't bother with mballoc(): the
subsequent stat(2) can never succeed. (MAILPATH='%msg').
Found while reviewing the previous commit by tedu@.
OK tedu@.
2019-01-14 08:48:16 +00:00
tedu
0dd2a5d5b0
do not peek before the beginning of a string
...
ok deraadt schwarze tb
2019-01-14 00:59:19 +00:00
tedu
b582ba36ad
short circuit mail check if MAIL is unset. ok anton
2019-01-07 20:50:43 +00:00
cheloha
36de39ea5c
Count $MAILCHECK with the monotonic clock.
...
So that ksh still looks for new mail every $MAILCHECK seconds,
even if the system clock is rolled backward.
ok anton@
2018-06-25 15:22:30 +00:00
tobias
517d388001
Support 64 bit integers on 32 bit architectures.
...
No binary change on amd64 and there should be no differences on any
other 64 bit architecture either (because long = int64_t).
ok cheloha, tb
2018-04-09 17:53:36 +00:00
mmcc
5601821256
Move string.h include from sh.h to the files that use it.
...
ok nicm@
2015-10-19 14:42:16 +00:00
mmcc
b608f594c7
Apply style(9) to header includes.
...
ok nicm@
2015-10-19 02:15:45 +00:00
tedu
a7642eb44f
remove null check before afree. from Michael McConville
2015-10-09 19:36:27 +00:00
nicm
8c046d2474
Remove unnecessary casts, from Michael McConville. No binary change.
2015-09-17 14:21:33 +00:00
tedu
bfd561bcdd
remove casts and null checks before free. from Michael McConville
...
ok deraadt
2015-09-01 13:12:31 +00:00
sobrado
c12f192ff2
remove trailing whitespaces; use tabs instead of spaces where appropriate;
...
no binary changes.
2013-11-28 10:33:37 +00:00
deraadt
2b525172df
remove unneccessary time_t * cast
2013-04-16 22:13:14 +00:00
deraadt
7a8124d8e0
lots of indentation cleanup, now ksh is readable like our other code.
...
double checked to make sure no binaries change, and eyed by niallo
2005-03-30 17:16:37 +00:00
millert
0e7d3a0122
Use stdbool.h instead of rolling our own bools.
2004-12-22 17:14:34 +00:00
otto
c5d5393cb5
Ansification plus some minor knf. No binary change on i386 and
...
sparc64, binary change in lex.o on macppc due to introduction of
dopprompt() prototype. ok millert@
2004-12-20 11:34:26 +00:00
millert
7894b443ac
deregister
2004-12-18 21:25:44 +00:00
millert
94e42df60f
Get rid of #ifdef KSH since we don't care about building a V7 style sh and
...
the #ifdef KSH code is required to make a POSIX sh. From Matthias Kilian
2004-12-18 21:04:52 +00:00
millert
69b9f96b1e
Remove unused OS dependent #ifdef blocks, #defines and macro abstraction.
...
First step in making the ksh code easier to read. From Matthias Kilian
2004-12-18 20:55:52 +00:00
millert
f00c508658
patches from pdksh 5.2.13.11
1999-06-15 01:18:32 +00:00
millert
18bbba6b0c
sync with pdksh-unstable-5.2.13.6
1999-01-10 17:55:01 +00:00
millert
3b01593416
pdksh-5.2.13 + local changes
1998-06-25 19:01:27 +00:00
niklas
0a9fc39cae
Revert one of the $_ changes made 970102, as it makes sh crash when mail
...
arrives and mailchecking is on. I doubt this case was meant to be altered
at that time judging from the documentation fix it went along with.
However to be really sure I would like to see what POSIX has to say about
the mail notification message format. Is $_ meant to be expanded to the
mailbox path? If so, this revertion is correct, otherwise, another fix ought
to be made. I have no POSIX spec though.
1997-11-16 12:07:28 +00:00
kstailey
4c69a2c11c
back out
1997-06-19 13:58:37 +00:00
kstailey
40158a98ef
(foo *)0 -> NULL
1997-06-18 22:42:27 +00:00
downsj
731405d5d4
After discussing $_ with the maintainer, revert ksh behaviour and completely
...
eliminate it from sh.
1997-01-02 17:37:25 +00:00
downsj
dcacb75796
update to pdksh-5.2.8
1996-08-19 20:08:39 +00:00
downsj
7cb960a23c
Import pdksh 5.2.7.
1996-08-14 06:19:10 +00:00