summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-03-23 10:25:55 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-03-23 10:40:50 -0400
commitc83aa65bca2870613b32661213d03b79a2d690c2 (patch)
tree6e6c04767a7be27ad071b925b73c91ec7f8eb108
parent361735b2cdf76b8bdc22fda05f0a829f7d61afef (diff)
parentcd76a94a328719df61c15b02f25f984b43cce19e (diff)
Merge branch 'master' into coveritycoverity
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml10
-rw-r--r--COPYING2
-rw-r--r--Makefile93
-rw-r--r--README.md55
-rw-r--r--RELEASES.md139
-rw-r--r--bfs.1679
-rw-r--r--bfs.h8
-rw-r--r--bftw.c1476
-rw-r--r--bftw.h131
-rw-r--r--cmdline.h57
-rw-r--r--color.c1101
-rw-r--r--color.h25
-rw-r--r--darray.c103
-rw-r--r--darray.h110
-rw-r--r--diag.c66
-rw-r--r--diag.h60
-rw-r--r--dstring.c55
-rw-r--r--dstring.h38
-rw-r--r--eval.c598
-rw-r--r--eval.h10
-rw-r--r--exec.c120
-rw-r--r--exec.h8
-rw-r--r--expr.h6
-rw-r--r--fsade.c340
-rw-r--r--fsade.h70
-rw-r--r--main.c75
-rw-r--r--mtab.c235
-rw-r--r--mtab.h25
-rw-r--r--opt.c429
-rw-r--r--parse.c1754
-rw-r--r--passwd.c280
-rw-r--r--passwd.h117
-rw-r--r--printf.c383
-rw-r--r--printf.h18
-rw-r--r--spawn.c232
-rw-r--r--spawn.h103
-rw-r--r--stat.c135
-rw-r--r--stat.h70
-rwxr-xr-xtests.sh1828
-rwxr-xr-xtests/find-color.sh44
-rwxr-xr-xtests/ls-color.sh48
-rw-r--r--tests/mksock.c131
-rw-r--r--tests/test_H_loops.out4
-rw-r--r--tests/test_L.out5
-rw-r--r--tests/test_L_acl.out2
-rw-r--r--tests/test_L_capable.out2
-rw-r--r--tests/test_L_depth.out5
-rw-r--r--tests/test_L_loops_continue.out11
-rw-r--r--tests/test_L_mount.out5
-rw-r--r--tests/test_L_unique.out1
-rw-r--r--tests/test_L_unique_depth.out3
-rw-r--r--tests/test_L_unique_loops.out3
-rw-r--r--tests/test_L_xattr.out2
-rw-r--r--tests/test_L_xdev.out5
-rw-r--r--tests/test_L_xtype_f.out2
-rw-r--r--tests/test_L_xtype_l.out3
-rw-r--r--tests/test_S_bfs.out19
-rw-r--r--tests/test_S_dfs.out19
-rw-r--r--tests/test_S_ids.out19
-rw-r--r--tests/test_acl.out1
-rw-r--r--tests/test_and_false_or_true.out1
-rw-r--r--tests/test_asince.out3
-rw-r--r--tests/test_capable.out1
-rw-r--r--tests/test_closed_stdin.out19
-rw-r--r--tests/test_color.out20
-rw-r--r--tests/test_color_L.out20
-rw-r--r--tests/test_color_L_ln_target.out20
-rw-r--r--tests/test_color_L_no_stat.out20
-rw-r--r--tests/test_color_escapes.out20
-rw-r--r--tests/test_color_ext.out20
-rw-r--r--tests/test_color_ext0.out20
-rw-r--r--tests/test_color_ext_override.out20
-rw-r--r--tests/test_color_ext_underride.out20
-rw-r--r--tests/test_color_ln_target.out20
-rw-r--r--tests/test_color_ls.out12
-rw-r--r--tests/test_color_mh.out20
-rw-r--r--tests/test_color_mh0.out20
-rw-r--r--tests/test_color_mi.out20
-rw-r--r--tests/test_color_missing_colon.out20
-rw-r--r--tests/test_color_no_stat.out20
-rw-r--r--tests/test_color_nul.outbin0 -> 20 bytes
-rw-r--r--tests/test_color_or.out20
-rw-r--r--tests/test_color_or0_mi.out20
-rw-r--r--tests/test_color_or0_mi0.out20
-rw-r--r--tests/test_color_or_mi.out20
-rw-r--r--tests/test_color_or_mi0.out20
-rw-r--r--tests/test_color_rs_lc_rc_ec.out20
-rw-r--r--tests/test_color_st0_tw0_ow.out20
-rw-r--r--tests/test_color_st0_tw0_ow0.out20
-rw-r--r--tests/test_color_st0_tw_ow.out20
-rw-r--r--tests/test_color_st0_tw_ow0.out20
-rw-r--r--tests/test_color_st_tw0_ow.out20
-rw-r--r--tests/test_color_st_tw0_ow0.out20
-rw-r--r--tests/test_color_st_tw_ow0.out20
-rw-r--r--tests/test_color_star.out20
-rw-r--r--tests/test_color_su0_sg.out20
-rw-r--r--tests/test_color_su0_sg0.out20
-rw-r--r--tests/test_color_su_sg0.out20
-rw-r--r--tests/test_colors.out12
-rw-r--r--tests/test_comma_redundant_false.out1
-rw-r--r--tests/test_comma_redundant_true.out1
-rw-r--r--tests/test_data_flow_and_swap.out12
-rw-r--r--tests/test_data_flow_or_swap.out12
-rw-r--r--tests/test_deep_stricter.out16
-rw-r--r--tests/test_empty_special.out14
-rw-r--r--tests/test_execdir_ulimit.out40
-rw-r--r--tests/test_exit.out15
-rw-r--r--tests/test_expr_flag_path.out2
-rw-r--r--tests/test_expr_path_flag.out2
-rw-r--r--tests/test_flag_expr_path.out2
-rw-r--r--tests/test_follow.out5
-rw-r--r--tests/test_gid_minus_plus.out19
-rw-r--r--tests/test_gid_plus_plus.out19
-rw-r--r--tests/test_inum_bind_mount.out2
-rw-r--r--tests/test_inum_mount.out1
-rw-r--r--tests/test_links_minus.out1
-rw-r--r--tests/test_mount.out4
-rw-r--r--tests/test_msince.out3
-rw-r--r--tests/test_newermt.out3
-rw-r--r--tests/test_newermt_epoch_minus_one.out5
-rw-r--r--tests/test_nogroup_ulimit.out0
-rw-r--r--tests/test_not_prune.out13
-rw-r--r--tests/test_nouser_ulimit.out0
-rw-r--r--tests/test_ok_closed_stdin.out0
-rw-r--r--tests/test_okdir_closed_stdin.out0
-rw-r--r--tests/test_path_expr_flag.out2
-rw-r--r--tests/test_path_flag_expr.out2
-rw-r--r--tests/test_printf_H.out31
-rw-r--r--tests/test_printf_empty.out0
-rw-r--r--tests/test_printf_types.out23
-rw-r--r--tests/test_prune.out3
-rw-r--r--tests/test_prune_or_print.out13
-rw-r--r--tests/test_s.out11
-rw-r--r--tests/test_type_bind_mount.out1
-rw-r--r--tests/test_type_multi.out1
-rw-r--r--tests/test_uid_minus_plus.out19
-rw-r--r--tests/test_uid_plus_plus.out19
-rw-r--r--tests/test_unique.out2
-rw-r--r--tests/test_unique_depth.out19
-rw-r--r--tests/test_xattr.out2
-rw-r--r--tests/test_xdev.out4
-rw-r--r--tests/test_xtype_bind_mount.out2
-rw-r--r--tests/test_xtype_f.out2
-rw-r--r--tests/test_xtype_multi.out3
-rw-r--r--time.c314
-rw-r--r--time.h86
-rw-r--r--trie.c692
-rw-r--r--trie.h157
-rw-r--r--util.c196
-rw-r--r--util.h97
151 files changed, 10670 insertions, 3290 deletions
diff --git a/.gitignore b/.gitignore
index b251086..99776af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*.o
*.d
/bfs
+/tests/mksock
diff --git a/.travis.yml b/.travis.yml
index 7756b52..d7bd7ef 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,16 @@ before_install:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
addons:
+ apt:
+ packages:
+ - gcc-multilib
+ - acl
+ - libacl1-dev
+ - attr
+ - libattr1-dev
+ - libcap2-bin
+ - libcap-dev
+
coverity_scan:
project:
name: "tavianator/bfs"
diff --git a/COPYING b/COPYING
index f99675f..9a254ab 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-Copyright (C) 2015-2017 Tavian Barnes <tavianator@tavianator.com>
+Copyright (C) 2015-2020 Tavian Barnes <tavianator@tavianator.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
diff --git a/Makefile b/Makefile
index cb6a4a0..5bd8ab8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
############################################################################
# bfs #
-# Copyright (C) 2015-2017 Tavian Barnes <tavianator@tavianator.com> #
+# Copyright (C) 2015-2020 Tavian Barnes <tavianator@tavianator.com> #
# #
# Permission to use, copy, modify, and/or distribute this software for any #
# purpose with or without fee is hereby granted. #
@@ -15,23 +15,28 @@
############################################################################
ifeq ($(wildcard .git),)
-VERSION := 1.2.3
+VERSION := 1.6
else
VERSION := $(shell git describe --always)
endif
+ifndef OS
+OS := $(shell uname)
+endif
+
CC ?= gcc
INSTALL ?= install
MKDIR ?= mkdir -p
RM ?= rm -f
-WFLAGS ?= -Wall -Wmissing-declarations
+WFLAGS ?= -Wall -Wmissing-declarations -Wstrict-prototypes
CFLAGS ?= -g $(WFLAGS)
LDFLAGS ?=
DEPFLAGS ?= -MD -MP -MF $(@:.o=.d)
DESTDIR