OpenBSD CVS

CVS log for src/bin/ksh/c_test.c


[BACK] Up to [local] / src / bin / ksh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.28 / (download) - annotate - [select for diffs], Sat Jun 10 07:24:21 2023 UTC (12 months ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.27: +5 -14 lines
Diff to previous 1.27 (colored)

ksh: remove broken special handling of test -t

Drop the vestiges of the pre-POSIX support of `test -t' defaulting to fd
1.  It doesn't work and it always succeed since "-t" is treated as a
string by default when no argument (fd) is specified.

diff by Lucas (lucas [at] sexy [dot] is) with minor change by me.
ok millert@

Revision 1.27 / (download) - annotate - [select for diffs], Fri Jun 28 13:34:59 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jun 19 18:18:22 2019 UTC (4 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.25: +3 -6 lines
Diff to previous 1.25 (colored)

Allow string greater/less than than operators to work with test aka [.
Previously they were only recognized in [[ ... ]] expressions.  This
changes sh/ksh to be consistent with test(1) as well as shells like
bash and dash.  OK jca@ jmc@

Revision 1.25 / (download) - annotate - [select for diffs], Mon Apr 9 17:53:36 2018 UTC (6 years, 2 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

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

Revision 1.24 / (download) - annotate - [select for diffs], Tue Dec 26 19:10:31 2017 UTC (6 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.23: +18 -27 lines
Diff to previous 1.23 (colored)

The hack for /dev/fd support on systems without it was removed a
long time ago.  Update the comments and replace test_stat() calls
with stat() since test_stat() now just calls stat() directly.  Also
rename the "mode" parameter to "amode" in test_eaccess() to match
access(2) and make it clear that this is the access mode and not
the file mode.  OK jca@

Revision 1.23 / (download) - annotate - [select for diffs], Mon Dec 14 13:59:42 2015 UTC (8 years, 5 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

Move system headers from sh.h to those files that actually need them.

ok mmcc@ a while ago

Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 19 14:42:16 2015 UTC (8 years, 7 months ago) by mmcc
Branch: MAIN
Changes since 1.21: +3 -1 lines
Diff to previous 1.21 (colored)

Move string.h include from sh.h to the files that use it.

ok nicm@

Revision 1.21 / (download) - annotate - [select for diffs], Mon Oct 19 02:15:45 2015 UTC (8 years, 7 months ago) by mmcc
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored)

Apply style(9) to header includes.

ok nicm@

Revision 1.20 / (download) - annotate - [select for diffs], Fri Sep 18 07:28:24 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored)

Last of the (thing *)0 -> NULL, from Michael McConville. No binary
change.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Sep 15 18:15:05 2015 UTC (8 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

correct spelling of NULL from (char *)0. from Michael McConville.
ok md5

Revision 1.18 / (download) - annotate - [select for diffs], Sun Mar 1 20:11:06 2009 UTC (15 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.17: +17 -9 lines
Diff to previous 1.17 (colored)

Fix PR #723: test(1) operator precedence inconsistent with POSIX
Make sure ksh builtin test and test(1) do not differ.
From Christiano Farina Haesbaert. ok miod@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 30 17:16:37 2005 UTC (19 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.16: +71 -74 lines
Diff to previous 1.16 (colored)

lots of indentation cleanup, now ksh is readable like our other code.
double checked to make sure no binaries change, and eyed by niallo

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 28 21:33:04 2005 UTC (19 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

spacing

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 2 07:53:01 2005 UTC (19 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Introduce POSIX hex and octal (0x... and 0...) constants in arithmetic
expressions.  Work by Matthias Kilian, based on an old diff by myself.
Note: MAKEDEV should be updated. Tested by many, thanks.

ok millert@ deraadt@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Dec 22 17:14:34 2004 UTC (19 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Use stdbool.h instead of rolling our own bools.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 20 11:34:26 2004 UTC (19 years, 5 months ago) by otto
Branch: MAIN
Changes since 1.12: +28 -61 lines
Diff to previous 1.12 (colored)

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@

Revision 1.12 / (download) - annotate - [select for diffs], Sat Dec 18 21:04:52 2004 UTC (19 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.11: +1 -3 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Sat Dec 18 20:55:52 2004 UTC (19 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.10: +14 -84 lines
Diff to previous 1.10 (colored)

Remove unused OS dependent #ifdef blocks, #defines and macro abstraction.
First step in making the ksh code easier to read.  From Matthias Kilian

Revision 1.10 / (download) - annotate - [select for diffs], Fri Oct 10 19:09:07 2003 UTC (20 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.9: +6 -10 lines
Diff to previous 1.9 (colored)

The special case code for "test -x" over NFS was incorrect.  The
right thing to do is to try access(2) first (since that occurs on the
NFS server side) and only check for the absence of an execute bit
when access(2) succeeds.  Closes PR 3465

Revision 1.9 / (download) - annotate - [select for diffs], Fri Feb 28 09:45:09 2003 UTC (21 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

typos; from Brian Poole

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jun 9 05:47:27 2002 UTC (22 years ago) by todd
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

knf

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jul 14 13:37:23 1999 UTC (24 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.6: +19 -5 lines
Diff to previous 1.6 (colored)

pdksh-5.2.14

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jun 15 01:18:33 1999 UTC (25 years ago) by millert
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

patches from pdksh 5.2.13.11

Revision 1.5 / (download) - annotate - [select for diffs], Thu Jun 25 19:01:47 1998 UTC (25 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.4: +39 -5 lines
Diff to previous 1.4 (colored)

pdksh-5.2.13 + local changes

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jun 19 13:58:38 1997 UTC (26 years, 11 months ago) by kstailey
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.3: +6 -5 lines
Diff to previous 1.3 (colored)

back out

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 18 22:42:29 1997 UTC (26 years, 11 months ago) by kstailey
Branch: MAIN
Changes since 1.2: +6 -7 lines
Diff to previous 1.2 (colored)

(foo *)0 -> NULL

Revision 1.2 / (download) - annotate - [select for diffs], Mon Aug 19 20:08:47 1996 UTC (27 years, 9 months ago) by downsj
Branch: MAIN
Changes since 1.1: +5 -2 lines
Diff to previous 1.1 (colored)

update to pdksh-5.2.8

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Aug 14 06:19:10 1996 UTC (27 years, 10 months ago) by downsj
Branch: pdksh
CVS Tags: pdksh-527
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Import pdksh 5.2.7.

Revision 1.1 / (download) - annotate - [select for diffs], Wed Aug 14 06:19:10 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.