summary refs log tree commit diff
diff options
context:
space:
mode:
authorherbert <herbert@gondor.apana.org.au>2005-03-02 21:20:19 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2005-09-26 18:33:04 +1000
commit2e43b44b3563aedd882d08bbdeca80b045b35bb1 (patch)
treeb922d51cb749e12e250cc3e9d1b34974ad969957
parentEnclose abort insode ifdef DEBUG. (diff)
downloaddash-2e43b44b3563aedd882d08bbdeca80b045b35bb1.tar.gz
dash-2e43b44b3563aedd882d08bbdeca80b045b35bb1.zip
Optimised FILGZ test.
Diffstat (limited to '')
-rw-r--r--ChangeLog2
-rw-r--r--src/bltin/test.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 62b37b9..e609421 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 2005-03-02  Herbert Xu <herbert@gondor.apana.org.au>
 
 	* Renamed symbols to avoid conflict with libc.
-	* Enclose abort inside ifdef DEBUG.
+	* Optimisations in bltin/test.c.
 
 2005-02-28  Herbert Xu <herbert@gondor.apana.org.au>
 
diff --git a/src/bltin/test.c b/src/bltin/test.c
index 6a2e02c..f0d62b7 100644
--- a/src/bltin/test.c
+++ b/src/bltin/test.c
@@ -376,7 +376,7 @@ filstat(char *nm, enum token mode)
 	case FILSTCK:
 		return (s.st_mode & S_ISVTX) != 0;
 	case FILGZ:
-		return s.st_size > (off_t)0;
+		return !!s.st_size;
 	case FILUID:
 		return s.st_uid == geteuid();
 	case FILGID:
='logsubject'>Consolidate hilex formatters into hilex.cJune McEnroe 2021-01-12Remove hacky tagging from hilexJune McEnroe God that makes the lexers so much simpler. 2021-01-12Add htagml -iJune McEnroe 2021-01-12Render tag index in HTMLJune McEnroe 2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe This simplifies some things, adds support for line number tag definitions, and should enable combining htagml with other preprocessors in the future. 2021-01-12Split fields by tab onlyJune McEnroe Also don't fail hard on non-forward-search definitions. 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe